Why do you prefer [n] programming language?

Please compose all posts in Emacs.

Moderators: phlip, Moderators General, Prelates

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Why do you prefer [n] programming language?

Postby ash.gti » Mon Feb 11, 2008 4:11 pm UTC

*** Note, I am trying to start a discussion talking about the unique qualities of various programming languages. There is already a thread for saying "X" Language is teh ubar. ***

http://99-bottles-of-beer.net/

Its always fun to see how many different ways something can be written. That site lists 1156 different languages and variations. Yes, there are plenty of repeats, but they use different styles and mechanisms to implement the song. Also, not all of them are turing complete.

But...

Why do you prefer whichever language you do prefer?

Is it because of a nice feature? Or a special syntax? Or perhaps its the first one you learned and it stuck with you?

What features of said language do you enjoy the most? And/or do you hate the most?

Some languages are extremely popular, like C/C++ and Java, and get talked about all the time but really, at least IMO, are not the most amazing languages ever. Yeah, C/C++ is very optimizable and object oriented (if your talking about the C++ parts)but so is Objective-C which doesn't get a whole lot of credit for its capabilities.

I personally prefer ruby over any other language for a number of reasons. Its based of a single root class. You can re-define classes so you, even root classes. You can over-ride functions, or add new ones like if I wanted to add a factorial method to the base integer class. Their blocks and procs are really helpful too. There is a lot of syntactic sugar that makes things nice, like how in a number of cases parenthesis are optional.

ri and rdoc very useful for getting documentation and generating documentation for your own work and projects.
# drinks WAY to much espresso

User avatar
Xanthir
My HERO!!!
Posts: 5334
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Why do you prefer [n] programming language?

Postby Xanthir » Tue Feb 12, 2008 8:34 pm UTC

I like Lisp because functional coding has appealed to me ever since I got introduced to it, though I'm *far* from dogmatic about it. It's simply an extremely useful technique that I like using, to the point where I get *really* pissed off when I'm in another language and have some construct that prevents me from using it functionally.

I like Lisp because I prefer using whatever paradigm is easiest, rather than whatever paradigm the language author decided he liked best. Lisp is built as a functional language, but there is plenty of procedural stuff built right in, along with an extremely flexible OO system. A bit of library work gives you continuations, aspect-oriented programming, you name it.

I like Lisp because it has true macros, because the syntax doesn't get in the way. The datatype for "code" is the list, a type with just enough structure to be useful but not so much that it's hard to use. Most languages use "string" as their code type, which has no structure and thus is difficult to program true macros in. On the other end, there are languages who use XML as their "code" data type, which offers *so much* structure that you drown in it.

I like Lisp because of the parentheses. ^_^


As well, I like HTML and CSS. They've got their issues, but HTML is fun because you use it to encode *meaning* into a document, which is something that felt quite strange when I was first wrapping my head around it but is quite fun now. I like CSS because it *feels* right to be able to hook style off of the meaning that HTML supplies, rather than using style to *define* the meaning.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Why do you prefer [n] programming language?

Postby ash.gti » Tue Feb 12, 2008 8:57 pm UTC

Man, the LISP 99 bottles of beer song is confusing... Probably because I don't know the syntax but...

Code: Select all

(labels ((foo (x)
   (and (<= 0 x) (cons x (foo (1- x))))))
   (format t (format nil
        "~~{~~&~~@(~~%~~R ~A ~A!~~)~~:*~~&~~@(~~R
~0@*~A!~~)~~&~~@(~2@*~A!~~)~~&~~@(~~[~A~~:;~~:*~~R~~:*~~] ~0@*~A!~~)~~}"
       "bottles of beer"
       "on the wall"
       "take one down, pass it around"   
       "no more"
       )
 (foo 99)))

Looks rather... um... full of ~~ ...

It looks a lot like Scheme to me. I know enough scheme to get out of my old programming class so it sorta make sense looking at the LISP program, but still What are all those tilda's doing?
# drinks WAY to much espresso

User avatar
Xanthir
My HERO!!!
Posts: 5334
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Why do you prefer [n] programming language?

Postby Xanthir » Tue Feb 12, 2008 9:13 pm UTC

Hahaha, that's a majorly obfuscated Lisp program. All the tildes are part of the FORMAT domain-specific language. I only use the most basic aspects of format typically, so you'll have to look up some documentation on what all the glyphs are for.

I think format may define a turing-complete language within itself.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Why do you prefer [n] programming language?

Postby ash.gti » Tue Feb 12, 2008 9:16 pm UTC

Xanthir wrote:I think format may define a turing-complete language within itself.


Dear god thats evil
# drinks WAY to much espresso

qbg
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: Why do you prefer [n] programming language?

Postby qbg » Tue Feb 12, 2008 9:16 pm UTC

There is going to be an echo in here...

I prefer Common Lisp because I'm a smug Lisp weenie. Okay, time for some better answers:

I prefer Common Lisp because of all of the great features it has, even if I don't use them all. The syntax isn't bad either...

I really enjoy the macros, it combination of of functional and imperative programming, and how types are handled is nice too. You can also do so much without even jumping into the object system! It is nice to use a The Right Thing language. Macros are really nice because if you should come across a situation where you need to hack around what you have, you can encapsulate it into a macro so you no longer need to hack around it.

Most of what little I hate about Common Lisp really boils down to not enough people using it (though that is changing).

You do have unlispy parts of the language, like the FORMAT minilanguage and LOOP's minilanguage. There are much clearer ways to write the program.


@ ash.gti: FORMAT's minilanguage supports loops and other crazy stuff...

qbg
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: Why do you prefer [n] programming language?

Postby qbg » Tue Feb 12, 2008 9:17 pm UTC

ash.gti wrote:
Xanthir wrote:I think format may define a turing-complete language within itself.


Dear god thats evil

Even worse, it is using format to create a format control string!

User avatar
Xanthir
My HERO!!!
Posts: 5334
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Why do you prefer [n] programming language?

Postby Xanthir » Tue Feb 12, 2008 9:19 pm UTC

Hey now, LOOP has some *very* good points to it. It can really deobfuscate your program when you're iterating. It's certainly better than a DO loop (::shudder::).

In general, domain-specific languages like FORMAT and LOOP can be *really* beneficial at making easy-to-write, easy-to-read, easy-to-use code, when they're done well. I think LOOP was done well, but I'm not sure about FORMAT... In any case, it's Lisp's macro system that makes this possible. LOOP (at least, extended LOOP) started out as a series of macros over DO (basic LOOP is already a macro over do - it just loops infinitely until you break out).

I'd like to hear about other languages, though!

Even worse, it is using format to create a format control string!

Yep, I didn't even notice that until just before starting this post. That's *really* evil.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Why do you prefer [n] programming language?

Postby ash.gti » Tue Feb 12, 2008 9:35 pm UTC

I use php on a daily basis and its... pretty okay.

I mean if you have used C its basically the same thing but you don't compile it.

php5 has a lot of nice things about it with classes and built-in functions. But its not based off a single object root, but does do a pretty good job with its OO implementation. It has some nice features that make working with the web very nice, like its 'magic' methods. __sleep() will put the class in a form that can be thrown into the session and then __wakeup() will get it back to exactly how it was before.

How do you feel about programming languages that choose convention over configuration? Like what ruby does. A lot of people don't like it because there are a lot of features to it that people would say are 'magic'. I never told it how to do that but it knows kinda things. Thats because the language is highly reflective but some people really don't like that.

For instance, in Ruby on Rails you can create a database call by simply doing find_all_* or find_* and replace the * with whatever your looking for. You never wrote that method but hey, thats not gonna stop it.

I also find it hilarious how ruby has the "Missing method" Method built-in to the base object. So if you call something that doesn't exist it try's that method before giving you an error, which is how the database calls work actually. It looks at the method you called and based off of how it starts, like find_all_* it will know what kind of SQL call it needs to make and checks if that part of the database exists.

php doesn't have that kind of functionality but its something I really like about ruby. But thats also because I prefer OO.
# drinks WAY to much espresso

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Why do you prefer [n] programming language?

Postby EvanED » Tue Feb 12, 2008 10:45 pm UTC

So there are a couple options for me. One of them is to say Lisp, but that has already been covered in detail. ;-) It's by far not a perfect language -- I'd like to see a hybrid of Common Lisp and Scheme for instance. It looks like Graham just released a version of Arc, which may be interesting. I should look at it. (I read a little about it a while ago, and it has syntactic sugar that I think is pretty neat and useful.) But anyway, I like it for one reason that stands above all else: macros. The semi-functional aspect is often very useful, but other languages give you that. I'm a static-typing person so I think I would enjoy O'Caml. (I've done a bit with SML.) But macros are almost unique to Lisp by my knowledge.

It's partly because of this that I prefer C++ out of the more traditional languages. You say this, "Yeah, C/C++ is very optimizable and object oriented (if your talking about the C++ parts)but so is Objective-C which doesn't get a whole lot of credit for its capabilities," but I personally think the OO bit is the least important part of the "C++ parts." You can do most of that in C with only minorly more obnoxious syntax, e.g. obj->foo(obj) instead of obj->foo(), or someclass_foo(obj) instead of obj->foo() (really the latter could be improved with function overloading which I wouldn't consider part of the OO part of C++ either).

No, some things that make C++ mostly unique among Algol-like languages are (Obj-C doesn't have any of this):

- Templates, which enable generic programming that is typechecked statically, and that thanks in part to operator overloading can be equally applicable to object types and primitive types. (More on templates in a second too.)

- Destructors, which enable RAII, which is made more necessary because of C++'s lack of garbage collection, but at the same time goes FAR BEYOND just what garbage collectors do. The ability to ensure that code will run on exit from a block in a simple and relatively elegant is a very powerful tool that is acutely missing from most other Algol-like languages with exceptions. It would still be useful and convenient in C, though it becomes more like syntactic sugar there.

- The combination of CPP macros and templates is a very powerful combination which enables adding new syntax to the language to an extent not found almost any other place except Lisp. (Dylan has it, but it's almost a Lisp, and O'Caml has CAMLP4. Those are the only ones I know, though there are probably more. Like I'm pretty sure Smalltalk makes if statements within the language for instance.) C++ doesn't support closures? It's possible to emulate them to a degree template metaprogramming. (See Boost::Lambda.) C++ doesn't support opaque typedefs? It's possible to emulate them to a degree with macros and template programming. C++ doesn't support a static assert? It's possible to emulate that with macros. Show me another language that doesn't give you language support for closures but where you can come up with a syntax which for really simple things gives even Lisp a run for its money (_1 + _2 is a lambda function that takes two arguments and returns their sum; compare to (lambda (x y) (+ x y)). (Of course, much more complex and the C++ syntax starts to loop reasonably ugly, and Lisp wins. It may also be possible to get better syntax with a Lisp macro.)

The only Algol-like language that I know that meets the above points is D, and that seems to have been created in part as a better C++. I haven't used it at all, so can't comment on it's qualities. It seems very promising; I only worry a little about tool support.

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Why do you prefer [n] programming language?

Postby ash.gti » Tue Feb 12, 2008 11:04 pm UTC

Used Objective-C++ any?

You can inherit C++ classes into Objective-C++ classes and still use C++ templates.

Its kinda a mixin of Objective-C, C++, and a few extensions to bridge some of the gaps between them.

I don't have much experience with it though. I tend to revert back to what I know and while I have technically compiled Objective-C++ stuff before, it was actually just C++ with a few Objective-C things thrown around. I wasn't really taking advantage of the Objective-C++ Features ><
# drinks WAY to much espresso

Rysto
Posts: 1459
Joined: Wed Mar 21, 2007 4:07 am UTC

Re: Why do you prefer [n] programming language?

Postby Rysto » Tue Feb 12, 2008 11:31 pm UTC

I'd like C and C++ a lot more if they had a clean, unambiguous syntax. Because they don't, extending the language is a bear(nobody has come into full compliance with C99 or C++98 yet!).

I think that eventually C++ has reached the point where nobody truly understands the full language anymore(with the possible exception of the folks at EDG). It's substantially harder to find good tools for working with C and C++ code(just building a symbol cross-reference is a significant problem). I expect that we will eventually hit the point where programmer productivity in other languages is so much higher than in C and C++ that it will actually become worthwhile for companies with large C++ codebases to switch.

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Why do you prefer [n] programming language?

Postby EvanED » Tue Feb 12, 2008 11:48 pm UTC

Rysto wrote:I'd like C and C++ a lot more if they had a clean, unambiguous syntax. Because they don't, extending the language is a bear(nobody has come into full compliance with C99 or C++98 yet!).

Supposedly Comeau's compiler + Dinkumware's library is compliant, but that's sort of a special case (the EDG folks). Your point stands.

As for C++, I have sort of a love-hate relationship. I really like it for the reasons above, but at the same time a lot of the syntax and semantics are really horrible. This is one reason D looks very promising... from the little I know about it, it looks like a better C++ than C++ is.

zenten
Posts: 3799
Joined: Fri Jun 22, 2007 7:42 am UTC
Location: Ottawa, Canada

Re: Why do you prefer [n] programming language?

Postby zenten » Fri Feb 15, 2008 3:30 am UTC

Python, it uses little in the way of punctuation.

User avatar
evilbeanfiend
Posts: 2650
Joined: Tue Mar 13, 2007 7:05 am UTC
Location: the old world

Re: Why do you prefer [n] programming language?

Postby evilbeanfiend » Fri Feb 15, 2008 3:34 pm UTC

tcl, it does so much with only 11 (or 12 depending on version) language rules.
it is amazingly introspective.
anything can be (re)defined.
in ur beanz makin u eveel

User avatar
bridge
Posts: 195
Joined: Sun Feb 03, 2008 2:24 pm UTC
Location: Zurich < x < Rome

Re: Why do you prefer [n] programming language?

Postby bridge » Fri Feb 15, 2008 5:13 pm UTC

My favourite(s)
C - for hacking and performance
Ruby - for scripts too messy for bash
Erlang - for network/highly-concurrent tasks
Smalltalk - for it's dinamicity, reflectivity and undisputed style

Can't choose among those, each one has its own advantages and fits for specific tasks.

It makes me sad to say so but if i had to write a cross-platform desktop application i would still choose Java, which is the most "portable" (in the sense that the VM is installed by default on Mac/Linux/Win)
Anyway just as a language Java sucks [/troll]
Excuse my Super Mario accent

User avatar
xyzzy
Meta-Titled
Posts: 263
Joined: Sun Mar 18, 2007 10:02 pm UTC
Location: Colossal Cave
Contact:

Re: Why do you prefer [n] programming language?

Postby xyzzy » Sun Feb 17, 2008 8:01 pm UTC

Well, I like two languages myself: Scheme and Arc.

Arc is very nice. It's fun to hack in, it's got syntactic sugar where it's needed but all the power of the language exposed where it doesn't. The whole thing is basically written in Arc, up from about 7 core functions (iirc). Also, it has a wonderfully good interface to web apps etc. Big drawback is that various things I expect aren't built in. Not perfect yet, but good for getting things written in.

Scheme, on the other hand, feels a little cleaner and more mathematical. I still think in Scheme, but it's not so nice for doing messy stuff with. Basically, Arc is for working in (hacking up something to do vigenere ciphers, for instance), while Scheme is for mathematics and thinking in. I still need to sit at an Arc interpreter to write Arc, but I can write Scheme miles away from a computer and know it's going to work. That's probably unfamiliarity with bits of Arc though.
"Wile E. Coyote was a theoretical mathematician." - Leliel
"Modern life can be so boring without elements of the bizarre or the fantastical. Hence, we have steampunk." - Me

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Why do you prefer [n] programming language?

Postby EvanED » Mon Feb 18, 2008 1:35 am UTC

xyzzy wrote:Big drawback is that various things I expect aren't built in. Not perfect yet, but good for getting things written in.

Like what?

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Why do you prefer [n] programming language?

Postby ash.gti » Mon Feb 18, 2008 4:42 am UTC

xyzzy wrote:Arc is very nice. It's fun to hack in, it's got syntactic sugar where it's needed but all the power of the language exposed where it doesn't. The whole thing is basically written in Arc, up from about 7 core functions (iirc). Also, it has a wonderfully good interface to web apps etc. Big drawback is that various things I expect aren't built in. Not perfect yet, but good for getting things written in.


I can't seem to find much on Arc. Its also not even listed in the 99-bottles site. Which is surprising, at least to me. They have so many other languages that are extremely obscure and silly in there, like Cow. Which is a 'programming language' built out of the word moo...

http://www.bigzaphod.org/cow/

I am not sure you can get more um... silly than that. The whole language was made more or less I think to see how little you can specify in a language that is still *technically* turing complete. Although I personally would shoot someone if this became as popular as C/C++...

Here is Cow's 99 bottles song, apparently it works although i haven't tried it myself.

Code: Select all

moOMoOMoOMoOMoOmoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMMMmoOMMMMoOMoOMoOMoOMoOMoO
MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMMMmoOMMMommMoOMoOMoOMoOMoO
MoOMoOMoOMoOMoOMoOMoOMMMmoOMMMMoOMoOMMMmoOMMMMoOMoOMoOMoOMoOMoOMoOMoOMoOMoO
MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoO
MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMMMmoOMMMMoOMMMmOomOomOomOo
mOomOoMMMMoOmoOmoOmoOmoOmoOmoOMMMmoOMMMMoOMoOMMMmoOMMMMoOMMMmoOMMMMoOMMMmoO
MMMMoOMoOMMMmoOMMMMoOMMMmoOMMMMoOMoOMMMmoOMMMMoOMMMmoOMMMMoOMoOMMMmoOMMMMoO
MMMmoOMMMMoOMMMmoOMMMMoOMoOMMMmoOMMMMoOMMMmoOMMMMoOMMMmoOMMMMoOMMMmoOMMMMoO
MoOmOomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOoMOOOOMmoO
moOmoOmoOmoOmoOMoomoOmoOmoOmoOmoOmoOmoOmoOmoOMoomoOmoOmoOmoOMooMoomOomOomOo
mOomOomOoMoomOomOomOomOomOoMoomOomOomOomOomOomOomOomOoMMMMOoMOOmoOmoOmoOmoO
moOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOomOomOomOomOo
mOomOomOomOomOomOomOomOoOOOmooMMMmoOmoOmoOmoOmoOmoOmoOmoOmOomOomOomOomOomOo
MoomoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOoMoomOomOomOo
mOomOomOomOoMoomoOmoOmoOmoOMoomoOmoOMooMoomoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOo
mOomOomOomOomOomOomOomOomOomOomOomOomOomOoMoomoOmoOmoOmoOmoOmoOmoOmoOmoOmoO
moOmoOmoOMoomOoMoomOomOomOomOomOomOomOomOomOomOomOomOoMoomoOmoOmoOmoOmoOmoO
moOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOomOomOomOoMoomOomOoMoo
mOomOomOomOomOomOoMoomoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoO
moOMoomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOoMoomoOmoOmoOmoOmoOmoO
moOmoOMooMoomOomOomOomOomOomOomOomOomOomOoMoomOomOoMoomOoOOMmoOmoOmoOmoOmoO
moOMoomoOmoOmoOmoOmoOmoOmoOmoOmoOMoomoOmoOmoOmoOMooMoomOomOomOomOomOomOoMoo
mOomOomOomOomOoMoomOomOomOomOomOomOomOomOoMMMMOoMOOmoOmoOmoOmoOmoOmoOmoOmoO
moOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOomOomOomOomOomOomOomOomOo
mOomOomOomOoOOOmooMMMmoOmoOmoOmoOmoOmoOmoOmoOmOomOomOomOomOomOoMoomoOmoOmoO
moOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOoMoomOomOomOomOomOomOomOo
MoomoOmoOmoOmoOMoomoOmoOMooMoomoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOomOomOomOo
mOomOomOomOomOomOomOomOomOoMoomOomOoMoomoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoO
moOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOomOomOomOomOomOomOomOomOoMoomoOmoOmoO
moOmoOmoOmoOMoomOomOomOomOoMoomOomOomOomOomOomOoMoomOomOoMMMmOoOOOMoOmoOMOo
MOOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOoMoomOomOomOomOomOomOo
MoomOomOomOomOomOomOomOomOomOoOOOmoOOOOmooMMMmOoMOOmoOmoOmoOmoOmoOmoOmoOmoO
moOmoOmoOmoOMoomoOmoOmoOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOomOomOomOomOomOo
mOomOomOomOomOomOomOomOomOoOOOmoomoOmoOmoOMoomoOmoOmoOmoOmoOMoomoOmoOmoOmoO
moOmoOmoOmoOMoomoOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOomOoMoomOomOomOomOomOo
mOomOomOomOomOomOoMoomOoMoomoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOo
mOomOomOomOomOomOomOomOomOomOoMoomoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoo
MoomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOoMoomoOmoOmoOmoOmoOmoOmoO
moOmoOMoomoOmoOmoOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOomOomOomOomOomOomOomOo
mOomOomOomOoMoomoOmoOmoOMoomoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOoMoo
moOmoOmoOmoOmoOMoomOomOomOomOomOomOoMoomOomOomOomOomOomOomOoMoomOomOomOomOo
MoomOomOoMoomOoMOoOOMmoOmoOmoOmoOmoOmoOMoomoOmoOmoOmoOmoOmoOmoOmoOmoOMoomoO
moOmoOmoOMooMoomOomOomOomOomOomOoMoomOomOomOomOomOoMoomOomOomOomOomOomOomOo
mOoMMMMOoMOOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOo
mOomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOoOOOmooMMMmoOmoOmoOmoOmoOmoO
moOmoOmOomOomOomOomOomOoMoomoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOo
mOomOomOomOoMoomOomOomOomOomOomOomOoMoomoOmoOmoOmoOMoomoOmoOMooMoomoOmoOmoO
moOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOoMoomoOmoO
moOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOoMoomOomOomOomOomOomOomOomOomOomOomOo
mOoMoomoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOomOomOomOo
mOomOomOomOoMoomOomOoMoomOomOomOomOomOomOoMoomoOmoOmoOmoOmoOmoOmoOmoOmoOmoO
moOmoOmoOmoOmoOmoOmoOmoOmoOMoomOomOomOomOomOomOomOomOomOomOomOomOomOomOomOo
mOoMoomoOmoOmoOmoOmoOmoOmoOmoOMooMoomOomOomOomOomOomOomOomOomOoMoomOomOomOo
MooMoomOomoo
# drinks WAY to much espresso

User avatar
Dingbats
Posts: 921
Joined: Tue Mar 20, 2007 12:46 pm UTC
Location: Sweden
Contact:

Re: Why do you prefer [n] programming language?

Postby Dingbats » Mon Feb 18, 2008 7:11 am UTC

Cow is mostly just a variation on brainfuck though.

coppro
Posts: 117
Joined: Mon Feb 04, 2008 6:04 am UTC

Re: Why do you prefer [n] programming language?

Postby coppro » Mon Feb 18, 2008 7:19 am UTC

ash.gti wrote:
xyzzy wrote:Arc is very nice. It's fun to hack in, it's got syntactic sugar where it's needed but all the power of the language exposed where it doesn't. The whole thing is basically written in Arc, up from about 7 core functions (iirc). Also, it has a wonderfully good interface to web apps etc. Big drawback is that various things I expect aren't built in. Not perfect yet, but good for getting things written in.


I can't seem to find much on Arc. Its also not even listed in the 99-bottles site. Which is surprising, at least to me. They have so many other languages that are extremely obscure and silly in there, like Cow. Which is a 'programming language' built out of the word moo...
I found this.

User avatar
xyzzy
Meta-Titled
Posts: 263
Joined: Sun Mar 18, 2007 10:02 pm UTC
Location: Colossal Cave
Contact:

Re: Why do you prefer [n] programming language?

Postby xyzzy » Mon Feb 18, 2008 12:10 pm UTC

http://arclanguage.org/ would be the official site. It's a dialect of lisp, and very new. Nice though.

@EvanED generally, little predicates or constructs here and there. It's mostly a result of trying to apply scheme habits to arc though. There's not really enough to bug me now, but it's different in various ways. One is that predicates don't have any special signal on them, like scheme or lisp ones. So odd, instead of oddp or odd? I can't remember specific examples at the moment though.
"Wile E. Coyote was a theoretical mathematician." - Leliel
"Modern life can be so boring without elements of the bizarre or the fantastical. Hence, we have steampunk." - Me

ashram
Posts: 0
Joined: Tue Feb 12, 2008 4:15 am UTC

Re: Why do you prefer [n] programming language?

Postby ashram » Thu Feb 21, 2008 4:07 am UTC

Yow, all these high-falutin languages floating around. (Lisp, for heavens sake!) I vote for Perl for tools, interfaces, CLI scripts and admin gunk and C for server applications. The problem with each is they give you plenty of rope to hang yourself by ...and throw in a free set of gallows to get you started. So you really need tight code style management for Perl and tools like a malloc checker for C.

I've written servers in java, and I have to say that despite the best efforts of some very smart people at Sun, we could never get them going as fast or as stably as native C code. I left before they rolled out their new massively threaded java servers, but I would love to benchmark C vs. java on that hardware.

One other 'problem' with java is not really java's fault. Complexity is a massive productivity killer. For a language to succeed the barrier to entry must be very low. Microsoft recognised this in the old days of visual basic but then forgot it in the hell that was Visual C++. Java made the same mistakes with EJBs and POJOs, which _still_ aren't simple enough.

Kirby54925
Posts: 36
Joined: Thu Dec 13, 2007 3:43 pm UTC

Re: Why do you prefer [n] programming language?

Postby Kirby54925 » Thu Feb 21, 2008 5:21 am UTC

ashram's comment makes me wonder why Lisp in general seems pretentious to a lot of people. :(

To get back on topic, I personally prefer Common Lisp simply because I don't like the complicated syntax of C-like languages; I always seem to have trouble with them :oops:

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Why do you prefer [n] programming language?

Postby ash.gti » Thu Feb 21, 2008 8:08 pm UTC

Kirby54925 wrote:ashram's comment makes me wonder why Lisp in general seems pretentious to a lot of people. :(

To get back on topic, I personally prefer Common Lisp simply because I don't like the complicated syntax of C-like languages; I always seem to have trouble with them :oops:


Lisp seems to be a lot more popular than I had the impression it was.

How would you go about building a solution to say a server CGI process in Lisp? Just curious. I don't know it well enough to even know where to begin for this.
# drinks WAY to much espresso

qbg
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: Why do you prefer [n] programming language?

Postby qbg » Thu Feb 21, 2008 10:17 pm UTC

ash.gti wrote:How would you go about building a solution to say a server CGI process in Lisp? Just curious. I don't know it well enough to even know where to begin for this.

You could have something like HUNCHENTOOT (possibly running behind Apache with mod_lisp). Just throw in any other libraries you want/need (like CL-WHO to make generating HTML easy) and you're good to go.

User avatar
Flying Betty
Posts: 1147
Joined: Tue Jul 10, 2007 9:25 am UTC
Location: Next Tuesday

Re: Why do you prefer [n] programming language?

Postby Flying Betty » Fri Feb 22, 2008 4:39 am UTC

Assembly. I like pain.

I'd have to give second place to Moo, and probably for the same reason with a side of awesome.
Belial wrote:The future is here, and it is cyberpunk as hell.

User avatar
enk
Posts: 754
Joined: Mon Sep 10, 2007 12:20 am UTC
Location: Aalborg, Denmark
Contact:

Re: Why do you prefer [n] programming language?

Postby enk » Fri Feb 22, 2008 9:55 am UTC

Flying Betty wrote:I'd have to give second place to Moo, and probably for the same reason with a side of awesome.


For a brainfuck variant, I'd go for Ook!. Hello World :)

Code: Select all

Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook.
Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook?
Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook.
Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook.


I don't have very much experience, but I like the high-level-ness of Java compared to C, even though I know this has its uses. And someday I want to learn some kind of Lisp.
phlip wrote:Ha HA! Recycled emacs jokes.

User avatar
xyzzy
Meta-Titled
Posts: 263
Joined: Sun Mar 18, 2007 10:02 pm UTC
Location: Colossal Cave
Contact:

Re: Why do you prefer [n] programming language?

Postby xyzzy » Fri Feb 22, 2008 12:55 pm UTC

ash.gti wrote:
Kirby54925 wrote:ashram's comment makes me wonder why Lisp in general seems pretentious to a lot of people. :(

To get back on topic, I personally prefer Common Lisp simply because I don't like the complicated syntax of C-like languages; I always seem to have trouble with them :oops:


Lisp seems to be a lot more popular than I had the impression it was.

How would you go about building a solution to say a server CGI process in Lisp? Just curious. I don't know it well enough to even know where to begin for this.


Well, in Arc you'd just say

Code: Select all

(defop hello req (pr "hello world"))
(asv)


And then when you go to http://localhost:8080/hello it will evaluate the function. Simple as that. Of course, there's builtins for doing text boxes and the like. It's quite a clever language for that, really.
"Wile E. Coyote was a theoretical mathematician." - Leliel
"Modern life can be so boring without elements of the bizarre or the fantastical. Hence, we have steampunk." - Me

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: Why do you prefer [n] programming language?

Postby Berengal » Sat Feb 23, 2008 4:19 am UTC

After reading a little bit in some book about scheme, I must say it's one of my favorite languages, even though I haven't coded a single parenthesis in it. I'll get to that the moment I get some free time however.

Before scheme (positions may change in the future) I put python. It's so lovely to write in, without all the ugly keys of java (the other one of the two languages I know) (Non-standard keyboard means lots of chording, and the keys for { and } aren't even next to eachother!). Python also lends itself very nicely to thinking in pseudocode, for example their for loops, which means algorithms can be developed much faster.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

User avatar
Xanthir
My HERO!!!
Posts: 5334
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Why do you prefer [n] programming language?

Postby Xanthir » Sat Feb 23, 2008 5:01 am UTC

Oh mang I didn't realize Arc had been released. I know what I'll be hacking on this weekend.

On a side note, Lisp probably seems pretentious because of all the academics who like it. It was the original AI language, after all.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
enk
Posts: 754
Joined: Mon Sep 10, 2007 12:20 am UTC
Location: Aalborg, Denmark
Contact:

Re: Why do you prefer [n] programming language?

Postby enk » Sat Feb 23, 2008 5:10 am UTC

Xanthir wrote:On a side note, Lisp probably seems pretentious because of all the academics who like it. It was the original AI language, after all.


Or because it's complete gibberish when you're used to C and Java :P
phlip wrote:Ha HA! Recycled emacs jokes.

User avatar
Xanthir
My HERO!!!
Posts: 5334
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Why do you prefer [n] programming language?

Postby Xanthir » Mon Feb 25, 2008 5:48 pm UTC

I can honestly say the same thing about Java, and I *am* used to it. ^^;
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
taylor_venable
Posts: 30
Joined: Mon Apr 09, 2007 7:22 pm UTC
Location: United States
Contact:

Re: Why do you prefer [n] programming language?

Postby taylor_venable » Wed Feb 27, 2008 11:07 am UTC

I have the most fun programming in Lisp. Partly because it's different, partly because it's powerful.
OCaml I use for algorithm work, thanks to both imperative and functional features, plus the great type system.
My website is written in Erlang for efficiency and resilience, additionally to throw common push-button script-kiddie hack techniques.
When I need to use infinite lists, I use Haskell.
Perl for text processing, Python for object-orientation.
C for low-level stuff.
Java when somebody tells me I have to use it.
My website: http://real.metasyntax.net:2357/
"I have never let my schooling interfere with my education." (Mark Twain)

User avatar
aleflamedyud
wants your cookies
Posts: 3307
Joined: Tue Oct 09, 2007 7:50 pm UTC
Location: The Central Bureaucracy

Re: Why do you prefer [n] programming language?

Postby aleflamedyud » Wed Feb 27, 2008 9:39 pm UTC

My "favorite" language hasn't been created yet. I want something with static typing and generics, preferably with dependent typing. I'd like it to have a syntax pretty much like Dylan so I can work conveniently while still creating powerful macros that can even delve into the parse tree if necessary. I want an object system like the one in Object Pascal, and I want sophisticated "reference" types like Object Pascal classes so I can do away with pointers in "safe" sections of the code. Oh, and let's throw lambdas and full closures in there too.

Oh, and I want all this in a low-level language I can run on the bare metal. If this means I have to manually supply statically-typed memory buffers to constructor functions to make anything of consequence and have to manage memory manually.
"With kindness comes naïveté. Courage becomes foolhardiness. And dedication has no reward. If you can't accept any of that, you are not fit to be a graduate student."

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Why do you prefer [n] programming language?

Postby ash.gti » Wed Feb 27, 2008 11:01 pm UTC

aleflamedyud wrote:My "favorite" language hasn't been created yet. I want something with static typing and generics, preferably with dependent typing. I'd like it to have a syntax pretty much like Dylan so I can work conveniently while still creating powerful macros that can even delve into the parse tree if necessary. I want an object system like the one in Object Pascal, and I want sophisticated "reference" types like Object Pascal classes so I can do away with pointers in "safe" sections of the code. Oh, and let's throw lambdas and full closures in there too.

Oh, and I want all this in a low-level language I can run on the bare metal. If this means I have to manually supply statically-typed memory buffers to constructor functions to make anything of consequence and have to manage memory manually.


Have you tried ruby? Just curious, with the exception of the low-level part and Dylan syntax its pretty close. :-p
# drinks WAY to much espresso

User avatar
aleflamedyud
wants your cookies
Posts: 3307
Joined: Tue Oct 09, 2007 7:50 pm UTC
Location: The Central Bureaucracy

Re: Why do you prefer [n] programming language?

Postby aleflamedyud » Thu Feb 28, 2008 12:07 am UTC

Haven't tried Ruby due to laziness. Still, it doesn't have the low-level part. Ruby is a web-apps language.
"With kindness comes naïveté. Courage becomes foolhardiness. And dedication has no reward. If you can't accept any of that, you are not fit to be a graduate student."

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Why do you prefer [n] programming language?

Postby ash.gti » Thu Feb 28, 2008 12:16 am UTC

You can use ruby anywhere you can use python and most places you can use perl.

You obviously haven't put your ruby shoes on yet http://code.whytheluckystiff.net/shoes/
# drinks WAY to much espresso

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Why do you prefer [n] programming language?

Postby EvanED » Thu Feb 28, 2008 12:23 am UTC

Does it have Lisp-like macros?

User avatar
Hangar
Posts: 171
Joined: Fri Nov 23, 2007 3:41 am UTC

Re: Why do you prefer [n] programming language?

Postby Hangar » Thu Feb 28, 2008 8:01 am UTC

I think the language you're looking for is boo. It has a Python-like syntax, though it's statically typed, and you don't have to specify the static type, as they're automatically deduced. You can also use it as a scripting language. The only difference is that it runs in the CLI, but that has benefits, such as being able to interact with the other CLI languages and getting all the speed improvements of the just-in-time compiler. Should be as fast as C#. Generics aren't in yet, but that's the next milestone. (I won't personally use it until they're introduced.)


I'd like to push Inform 7. It's a language to write text adventures ("interactive fiction") that uses a completely natural syntax. It reads like English, and understands things like articles to determine how to use them in-game. Of course it doesn't understand all sentence structures, but it's awesome to be able to write something that reads like English. (That Shakespeare one doesn't.)

Here's an example from Wikipedia:

Code: Select all

"Hello World" by "I.F. Author"

The story headline is "An Interactive Example".

The Living Room is a room. "A comfortably furnished living room." The Kitchen is north of the Living Room. The Front Door is south of the Living Room. The Front Door is a closed locked door.

The insurance salesman is a man in the Living Room. The description is "An insurance salesman in a tacky polyester suit. He seems eager to speak to you." Understand "man" as the insurance salesman.

A briefcase is carried by the insurance salesman. The description is "A slightly worn, black briefcase." Understand "case" as the briefcase.

The insurance paperwork is in the briefcase. The description is "Page after page of small legalese." Understand "papers" or "documents" or "forms" as the paperwork.

Instead of listening to the insurance salesman:

    say "The salesman bores you with a discussion of life insurance policies. From his briefcase he pulls some paperwork which he hands to you.";
    now the player carries the insurance paperwork.


A lot of functionality is provided by the automatically included standard library, such as a very basic definition of what a man is. Most of the text is declaring the initial state of the game. The last bit is an event response, handling the "listening" action (which is from the standard library). So if the player types "listen to the man," it will say the text and make it so that the player is in possession of the insurance paperwork.
Last edited by Hangar on Thu Feb 28, 2008 9:25 am UTC, edited 1 time in total.


Return to “Religious Wars”

Who is online

Users browsing this forum: No registered users and 5 guests