/g/ - Technology
install openbsd
[Make a Post]Formatting fucked up. Let's try indentation.
#! /usr/bin/env ns
<= n 1
<= l 1
<- "Enter number of numbers: "
<= nn [->]
>: [? [> [=> nn] 1] a [#!]]
<- "Number of numbers must be greater than one.\n"
>: e
<: a
<- "Enter number #" [=> n] ": "
<= [=> n] [->]
<= n [+ [=> n] 1]
>: [? [> [=> n] [=> nn]] c a]
<: c
<= r [=> [=> l]]
<: l
<= l [+ [=> l] 1]
<= r [+ [=> r] [=> [=> l]]]
>: [? [== [=> l] [- [=> n] 1]] f l]
<: f
<- "The result is " [=> r] "\n"
<: e
#! End of program
Sorry but Lisp is pure jewish intellectualism for the academic retards in their ivory towers.
Try SML or Ocaml if you want actual nice functional programming.
Or realize that functional programming as whole is a retarded idea that spawned a very limited number of useful concepts; map, reduce/fold, match.
>>1082
i dunno, haskell is pretty cool. functional programming is less jewish than oop though. fact.
>>1093
I wonder, did some guy name it "cabal" because he saw some pun and the word happened to be a kike term, or did a kike name it that to promote his desert cult?
I'm leaning on #2.
>>1078
>it's esolang implementation #28934238
if you replaced those cryptic command strings <= <- >: <: ? > and all that kind of shit with actual words, it would be way easier to read and program. but I do admit its cryptic nature gives it a pleasing appearance
[Catalog][Overboard][Update]
[Reply]7 replies
So today I was fiddling around with my toy lisp-like implementation and I came up with this shitty program to add an arbitrary number of numbers together.
#! /usr/bin/env ns
<= n 1
<= l 1
<- "Enter number of numbers: "
<= nn [->]
>: [? [> [=> nn] 1] a [#!]]
<- "Number of numbers must be greater than one.\n"
>: e
<: a
<- "Enter number #" [=> n] ": "
<= [=> n] [->]
<= n [+ [=> n] 1]
>: [? [> [=> n] [=> nn]] c a]
<: c
<= r [=> [=> l]]
<: l
<= l [+ [=> l] 1]
<= r [+ [=> r] [=> [=> l]]]
>: [? [== [=> l] [- [=> n] 1]] f l]
<: f
<- "The result is " [=> r] "\n"
<: e
#! End of program
Tell me, is this pajeet shit, or it is white man's artwork?