Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

how many klocs

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

Name: Anonymous 2008-07-20 15:42

Two, but if I remove the indentation, I can make it one.

Name: Anonymous 2008-07-20 16:33

>>2
Leah Culver?

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.

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.

Name: Anonymous 2008-07-20 16:45

>>5
Well, duh.

Name: Anonymous 2008-07-20 16:46

I have only one line of code in my project.

(begin-program)

Name: Anonymous 2008-07-20 16:47

>>3
No, a factorial in HASKELL.

Name: Anonymous 2008-07-20 19:07

>>8
Factorials should be bannable.

Name: Anonymous 2008-07-20 19:08

fact n = foldr1 (*) [1..n]

Name: Anonymous 2008-07-20 19:13

>>10
fact 0

Name: Anonymous 2008-07-20 19:16

>>9
You need to learn about HASKELL.

Name: Anonymous 2008-07-20 19:22

>>10
Why include 1?

Name: Anonymous 2008-07-20 19:24

>>13
Because the range [2..n] where n=1 doesn't make sense.

Name: Anonymous 2008-07-20 19:24

>>13
In case someone wants to fact 1.

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.

Name: Anonymous 2008-07-20 19:28

>>12
You need to learn something other than factorials.

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

Name: Anonymous 2008-07-20 19:30

>>16
failure ಠ_ಠ

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"

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

Name: Anonymous 2008-07-20 22:34

>>21
Throw my anus, Sepplesfag.

Name: Anonymous 2008-07-21 14:20

>>22
*grabs throw*

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"

Name: Anonymous 2008-07-21 15:04

>>21
import Control.Exception

Name: Anonymous 2008-07-21 19:43

>>22
Java and HMA fan!
I LOVE YOU!

Name: Anonymous 2008-07-25 3:12

0.4k. It's a Haskell toy.

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.

Name: Anonymous 2008-07-28 18:45

Real men pass continuations.

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.

Name: The Sussman 2008-07-28 21:48

>>30
Absolutely right.

Name: Anonymous 2008-07-28 23:36

>>28
Fullwidth and [n]fixedwidth[/n] aren't the same thing.

Name: 32 2008-07-28 23:40

Neither are [n] and [m], I suppose.

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"

Name: Anonymous 2008-07-29 16:53

>>34
Fullwidth will require Unicode skills.

Name: Anonymous 2008-07-29 17:13

I put on my robe and wizard hat.

Name: Anonymous 2008-07-29 17:30

>>36
Needs more fullwidth space:  

Name: Anonymous 2008-07-29 17:49

[p]Pteresting[/p]

Name: Anonymous 2008-07-29 17:50

[r]rrrrrrrrrrrrrrr[/r]

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

Name: Anonymous 2010-12-17 1:40

Erika once told me that Xarn is a bad boyfriend

Don't change these.
Name: Email:
Entire Thread Thread List