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

Pages: 1-

Curl programming language

Name: Anonymous 2010-06-06 11:12

Hey /prog/,

have you done anything in Curl (http://en.wikipedia.org/wiki/Curl_%28programming_language%29)? If so, is it any good? It looks kind of Lispy, and is attached to an apparently pretty decent RIA platform.

For those who have never heard of it, here's, some variations of factorial as code samples:

{define-proc {factorial n}
    {return {if n < 2
             then 1
             else n * {factorial (n - 1)}}}}

{define-proc {factorial n}
    {let result = 1}
    {for i = 2 to n do
        {set result = i * result}}
    {return result}}

{define-proc {factorial n}
    {let loop = {proc {acc, n}
                    {return {if n < 2
                             then acc
                             else {loop acc * n, n - 1}}}}}
    {return {loop 1, n}}}

Name: Anonymous 2010-06-06 11:21

Sorry, I prefer the Divergence programming language.

Name: Anonymous 2010-06-06 11:29

I like wget

Name: Anonymous 2010-06-06 12:02

>>3
faggot

Name: Anonymous 2010-06-06 12:32

That's like an uglier SexpCode.

Name: Anonymous 2010-06-06 12:56

>>1
Bloated sexps with braces instead of parens? Return statement? You've got to be kidding.

Name: Anonymous 2010-06-06 13:17

Love the homoiconicity, hate everything else

Name: Anonymous 2010-06-06 15:44

Pro version is available which provides additional enterprise class capabilities.

Name: Anonymous 2010-06-06 19:41

>>7
It actually is homoiconic, except code is not just made of lists and atoms, but also of expressions, statements and some other stuff, which can all still be manipulated through macros, though I don't know how expressive those macros can be, compared to CL's.

Name: Anonymous 2010-06-06 20:25

It reminds me of tcl, except that it doesn't cyber with Canadians as much.

Name: Anonymous 2010-06-06 20:36

Curly braces (or ``faggot braces'') are the ugliest characters in the ascii character set. Why couldn't they have used curvy, sexy parens?

Name: Anonymous 2010-06-06 20:47

>>11
Because parens are used for grouping expressions, and since those expressions can contain have infix operators, it's either using (curly) braces for function/macro/special-form application or having the left paren come after the function/macro/special-form name.

Name: Anonymous 2010-06-06 22:34

They could have at least used square brackets, which don't require the shift key to type on non-gay keyboard layouts.

Name: Anonymous 2010-06-07 1:19

>>13
Are you suggesting that Norwegians have any kind of concept of doing things other than fucking women for hours and killing everyone else they find with their penises?

Name: Anonymous 2010-06-07 4:16

>>14
i think you mean sweds, norwegians only fish and sleep.

Name: Anonymous 2010-06-07 5:42

>>13
You realize that most people who write Lisp code bind their [] keys to ()?

Name: Anonymous 2010-06-07 6:25

>>14
Are you suggesting the Scandinavian layouts require shift to type square brackets?

>>16
How gay.

Name: Anonymous 2010-06-07 15:52

OP here, forgot to mention that Curl is also a mark-up language, so you can mix code with mark-up or plain text as you wish.

Name: Anonymous 2010-06-07 15:53

>>18
Yeah, we got that from the link. Doesn't change anything, though. Sorry!

Name: Anonymous 2010-06-07 16:25

>>19
It kinda does, actually, because writing HTML in Curl's syntax and mixing it seamlessly with code seems to me a way better proposition than writing it in that eyesore of a syntax that SGML descendants have, and then having to use some crappy language unrelated language like Javascript to manipulate it.

Name: Anonymous 2010-06-07 17:19

Name: Anonymous 2010-06-07 17:20

>>20
Well, we've already seen its flaws>>5,6,8,11,13 and acknowledged what you've said in >>18>>7, so nothing has really changed.

Name: Anonymous 2010-06-07 17:33

>>21
No, BiwaScheme is the new Javascript

Name: Anonymous 2010-11-13 15:43

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