how many klocs
1
Name:
Anonymous
2008-07-20 15:40
hi guys how many klocs are your projects running? mine right now is 7.2k but most of my other ones are over 9000
2
Name:
Anonymous
2008-07-20 15:42
Two, but if I remove the indentation, I can make it one.
3
Name:
Anonymous
2008-07-20 16:33
4
Name:
Anonymous
2008-07-20 16:36
My current one has 3-4k in Sepples. It's a microscopy app.
I work in physics so they're usually small apps with a clear purpose.
5
Name:
Anonymous
2008-07-20 16:36
This is a very costly measuring unit because it encourages the writing of insipid code, but today I am less interested in how foolish a unit it is from even a pure business point of view. My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.
6
Name:
Anonymous
2008-07-20 16:45
7
Name:
Anonymous
2008-07-20 16:46
I have only one line of code in my project.
(begin-program)
8
Name:
Anonymous
2008-07-20 16:47
>>3
No, a factorial in HASKELL.
9
Name:
Anonymous
2008-07-20 19:07
>>8
Factorials should be bannable.
10
Name:
Anonymous
2008-07-20 19:08
fact n = foldr1 (*) [1..n]
11
Name:
Anonymous
2008-07-20 19:13
12
Name:
Anonymous
2008-07-20 19:16
>>9
You need to learn about HASKELL.
13
Name:
Anonymous
2008-07-20 19:22
14
Name:
Anonymous
2008-07-20 19:24
>>13
Because the range [2..n] where n=1 doesn't make sense.
15
Name:
Anonymous
2008-07-20 19:24
>>13
In case someone wants to
fact 1.
16
Name:
Anonymous
2008-07-20 19:27
>>11
fact n = if n < 1 error "simple toy function that expects numbers greater than 0" foldr1 (*) [1..n]
>>13
a general function that includes fact 1.
17
Name:
Anonymous
2008-07-20 19:28
>>12
You need to learn something other than factorials.
18
Name:
Anonymous
2008-07-20 19:30
loeb :: Functor f => f (f a -> a) -> f a
loeb f = fmap ($ loeb f) f
facts = loeb $ map const [1,1,2] ++ map (\n -> (\l -> n * l !! (n - 1))) [3..]
fact n = facts !! n
19
Name:
Anonymous
2008-07-20 19:30
20
Name:
Anonymous
2008-07-20 21:51
>>16
What about zero? 0! is by definition 1. And for
fuck 's sake, learn to Haskell.
fact n
| n >= 0 = product [1..n]
| otherwise = error "don't do that"
21
Name:
Anonymous
2008-07-20 22:16
Why doesn't Haskell have exceptions?
This would be cool!
fact n
| n >= 0 = product [1..n]
| otherwise = throw ArgumentError
22
Name:
Anonymous
2008-07-20 22:34
>>21
Throw my anus, Sepplesfag.
23
Name:
Anonymous
2008-07-21 14:20
24
Name:
Anonymous
2008-07-21 14:59
>>20
I like guards more.
fact n | n >= 0 = product [1..n]
fact _ = error "don't do that"
25
Name:
Anonymous
2008-07-21 15:04
>>21
import Control.Exception
26
Name:
Anonymous
2008-07-21 19:43
>>22
Java and HMA fan!
I LOVE YOU!
27
Name:
Anonymous
2008-07-25 3:12
0.4k. It's a Haskell toy.
28
Name:
Anonymous
2008-07-28 18:03
>>26
HMA fan
You guessed my identity and
I feel slightly uneasy about it :(
But actually I said Sepples because it has exceptions, it could just have well been the slow as fuck language JAVA or anything that throws shit. Real men return error codes.
My average project is roughly 11 dialogs in INSTANT.EXE.
29
Name:
Anonymous
2008-07-28 18:45
Real men pass continuations.
30
Name:
Anonymous
2008-07-28 19:42
>>28
It's not too hard to guess when the only people posting are
you ,
me and
THE SUSSMAN . And
THE SUSSMAN would never have posted something so silly.
31
Name:
The Sussman
2008-07-28 21:48
32
Name:
Anonymous
2008-07-28 23:36
>>28
Fullwidth and [n]fixedwidth[/n] aren't the same thing.
33
Name:
32
2008-07-28 23:40
Neither are [n] and [m] , I suppose.
34
Name:
Anonymous
2008-07-29 6:16
[n]Nteresting[/n]
Yes, the joke was bad
[f]shot in the dark[/f]
"So was that one"
35
Name:
Anonymous
2008-07-29 16:53
>>34
Fullwidth will require Unicode skills.
36
Name:
Anonymous
2008-07-29 17:13
I put on my robe and wizard hat.
37
Name:
Anonymous
2008-07-29 17:30
>>36
Needs more fullwidth space:
38
Name:
Anonymous
2008-07-29 17:49
[p]Pteresting[/p]
39
Name:
Anonymous
2008-07-29 17:50
[r]rrrrrrrrrrrrrrr[/r]
40
Name:
HMA MEME FAN
2008-07-29 18:02
>>35
A japanese IME is fine too
With [code] tags:
A japanese IME is fine too
41
Name:
Anonymous
2010-12-17 1:40
Erika once told me that Xarn is a bad boyfriend