The one bestest ever of all time language to rule them all

Please compose all posts in Emacs.

Moderators: phlip, Moderators General, Prelates

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

The one bestest ever of all time language to rule them all

Postby Berengal » Mon Jan 12, 2009 10:55 am UTC

Language discussions are common enough here. After all, we're coders, and to code you need a language to code in, so all coders have a relationship to at least one language.

I feel the discussions thus far have been too lame though. They take things into account, provide real-life examples and sensible arguments and are all around pretty agreeable where everyone agrees to disagree pretty quickly because the alternative is simply rehashing yesterdays discussion, or, as has become more popular, everyone agrees on all languages, preferably at the same time.

This is meant to be a different kind of discussion where comments that would be off-topic in the other discussions aren't and where the weight of your opponents' mothers is a perfectly valid scale to judge your favorite language by. What is the best language ever for whatever reason?Stay courteous, as always, and try not to kill the messenger. It's his language you want dead, not him.

I'll get back with mine when I've got more time.
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: 5281
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: The one bestest ever of all time language to rule them all

Postby Xanthir » Mon Jan 12, 2009 3:03 pm UTC

Code: Select all

(defun language-quality-quantifier (sample-program)
  "The language God wrote the universe in scores a 1."
  (/ (loop for x across sample-program
           count (or (eql x #\() (eql x #\))))
     (length sample-program)))


Run on your favorite library. Get back to me with results.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

stephentyrone
Posts: 778
Joined: Mon Aug 11, 2008 10:58 pm UTC
Location: Palo Alto, CA

Re: The one bestest ever of all time language to rule them all

Postby stephentyrone » Mon Jan 12, 2009 6:24 pm UTC

Xanthir wrote:

Code: Select all

(defun language-quality-quantifier (sample-program)
  "The language God wrote the universe in scores a 1."
  (/ (loop for x across sample-program
           count (or (eql x #\() (eql x #\))))
     (length sample-program)))


Run on your favorite library. Get back to me with results.


This language in which the universe is written appears to be surprisingly brainf*ck-like.

Edit: If I had to pick, my vote goes for straight C. It's a surprisingly elegant language once you know it well, and when it really comes down to it, most other languages sit on interpreters or compilers that are either written in C or bootstrapped up from a core written in C.

That said, I will always have a soft spot in my heart for Common Lisp, Haskell, and Prolog.
Last edited by stephentyrone on Mon Jan 12, 2009 9:15 pm UTC, edited 2 times in total.
GENERATION -16 + 31i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: The one bestest ever of all time language to rule them all

Postby Area Man » Mon Jan 12, 2009 8:22 pm UTC

Perhaps you should ask for worstest language. Or both.

I'll throw my hat in with C++ for best: it's freeform, multi-paradigm; supports asm, c, up to classes and templates; has large collections of libraries available.
Style and ability notwithstanding.

I nominate BASIC (in all forms) as worst.

uh, and I guess... since this is RW: You're stupid if you disagree.
Bisquick boxes are a dead medium.

User avatar
DesertEagle
Posts: 15
Joined: Sun Dec 14, 2008 6:49 pm UTC
Location: Toronto, Canada

Re: The one bestest ever of all time language to rule them all

Postby DesertEagle » Mon Jan 12, 2009 8:52 pm UTC

C++ for sure. I haven't used it for a while since I like Python. But it's pretty flexible for most tasks and fast. I also agree with Area Man for the worst. BASIC is the antithesis for all things holy (I can even throw COBOL in there but it was a pretty okay guy back in the day).

User avatar
b.i.o
Green is the loneliest number
Posts: 2519
Joined: Fri Jul 27, 2007 4:38 pm UTC
Location: Hong Kong

Re: The one bestest ever of all time language to rule them all

Postby b.i.o » Mon Jan 12, 2009 9:17 pm UTC

Code: Select all

?- best(Language).

Language = prolog

User avatar
scarecrovv
It's pronounced 'double u'
Posts: 674
Joined: Wed Jul 30, 2008 4:09 pm UTC
Location: California

Re: The one bestest ever of all time language to rule them all

Postby scarecrovv » Mon Jan 12, 2009 9:25 pm UTC

For simplicity in the language specification, Brainfuck, because it is the only language I've ever written a compiler for (though I probably cheated, my compiler uses gcc in the last step).

If I want something that's fast to execute, I use C++.

If I want something that is easy to process text with, Perl.

If I want to write code as quickly as possible (which is most of the time), Python.

If I'm feeling stupid, I take a large chunk of memory, set it to all zeros, and execute it. If it does what I want, great. If not, I add one and repeat. This is a dangerous tactic though, for while everything I've tried to create so far satisfies the following inequality (if the program becomes the data in a bignum)...
desired_program < skynet
...It is not guaranteed that this will always be so.

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: The one bestest ever of all time language to rule them all

Postby Berengal » Mon Jan 12, 2009 10:05 pm UTC

scarecrovv wrote:For simplicity in the language specification, Brainfuck, because it is the only language I've ever written a compiler for (though I probably cheated, my compiler uses gcc in the last step).
I once wrote a brainfuck interpreter in Excel...

Prolog, despite being awful to write actual programs in, is a language I hold in high regard. I simply love its concepts, and it's symbolic to boot. Most languages gives you the ability to tell the computer how to perform tasks. Prolog lets you specify what results you want instead, leading to definitions, not procedures. Actually, it's possible to see how things are done as well, making the code both definition and procedure at the same time in short, succinct and easily-understood pieces.

Python is also one of my favorites. It used to be because of its concepts, but I've later discovered languages making python's concepts seem like crude hacks in comparison (but no less awesome in themselves). The sexiest thing about python today is its syntax. Reading python feels like reading a well-formated novel as opposed to the wall of text like feel of many other languages, and writing it doesn't feel like I'm coding for a computer, but writing pseudocode for a human audience.

My absolutely favorite language is however Haskell. It has some of the python thing going on with its syntax, but most important is the beauty of the concepts. No difference between functions and values neither in syntax nor semantics, automatic currying, lazy evaluation, no side-effects, awesome type system... I could go on for hours. One of the top things on my todo list is to do a reasonably sized project in Haskell, as I've had too little actual coding experience with it. My largest piece of code was a 200 line interpreter (lexer, parser, evaluator, REPL, everything) for a small toy language for uni, and much of that was the datastructures needed. In Java I needed 800 lines just to sort a list using a binary search tree.


C is a good language, if a portable assembly language is what you're looking for. Really though, it's like using lambda calculus to do integration. C++ feels gratious when it gives you peano arithmetic as well, and Java thinks it's doing you a favor by taking away the lambda calculus again. Actually, that's a bad analogy, as lambda calculus is pretty awesome and these three languages aren't. C/C++/Java is like driving a car consisting only of an engine, four wheels completely independent of one another and a fuel tank. You first have to build the chassis, the axels, the steering, the throttle and everything else, your only tool being a small rock, and when driving it you have to be blindfolded and drunk. Java sometimes gives you some pre-built parts, but they usually don't fit, and can't be made to fit because it took your lambdas away.
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.

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

Re: The one bestest ever of all time language to rule them all

Postby qbg » Tue Jan 13, 2009 2:24 am UTC

Lisp and C. Lisp (with CL currently being the nearest to divine perfection IMO) for its elegant and divine beauty and power. C for being a timeless and, dare I say it, elegant abstraction from von Neumann style assembly.

User avatar
Qoppa
Posts: 694
Joined: Sat Nov 24, 2007 9:32 pm UTC
Location: Yes.

Re: The one bestest ever of all time language to rule them all

Postby Qoppa » Tue Jan 13, 2009 3:12 am UTC

If utility is the question at hand, C++. Almost everything you could ever want to do can be done in C++, and I like it. It may be more efficient or easier in other languages, but chances are you can get what you need done with C++. But, if we're just going for favourite language, I'll have to go with Haskell. It's a beautiful language.

Code: Select all

_=0,w=-1,(*t)(int,int);a()??<char*p="[gd\
~/d~/\\b\x7F\177l*~/~djal{x}h!\005h";(++w
<033)?(putchar((*t)(w??(p:>,w?_:0XD)),a()
):0;%>O(x,l)??<_='['/7;{return!(x%(_-11))
?x??'l:x^(1+ ++l);}??>main(){t=&O;w=a();}

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

Re: The one bestest ever of all time language to rule them all

Postby qbg » Tue Jan 13, 2009 4:00 am UTC

Qoppa wrote:If utility is the question at hand, C++. Almost everything you could ever want to do can be done in C++, and I like it.

This is essentially the argument of Turing-completeness. C++ thus fails by a corollary of Godwin's law.

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: The one bestest ever of all time language to rule them all

Postby Berengal » Tue Jan 13, 2009 10:06 am UTC

Turing-completeness isn't everything. Every language except machine language runs on its own "virtual machine". Perhaps conceptual machine is a better term. Anyway, the point is every language is an assembly language for its own machine, and even though they might be turing-complete they aren't in themselves neccessarily isomorphic to x86 machine language. Many languages are only interpreted (python, perl etc.), or need a runtime system to run on (Java, Haskell etc.) because it's easier to describe the conceptual machine as a (semi-)proper virtual machine and run the code on that than it is to go the other way around the way C and C++ does. (Okay, Java does it for other reasons and I think does actually compile to native code the same way C and C++ does, but Haskell at least needs its runtime system even when properly compiled)
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
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: The one bestest ever of all time language to rule them all

Postby ash.gti » Tue Jan 13, 2009 7:10 pm UTC

For almost everything higher level, Ruby is the default choice for me. I love all of its principles, syntax, flexibility, etc. Everything is an object, even the global namespace is really an object (the Kernel object). You can write some of the most readable code I have seen in a language using ruby. Ruby 1.9 is faster too, compared to 1.8. I am also excited that Matz is looking heavily at erlang style concurrency for dealing with that issue. The purposed plan, after they finish their YARV integration, is to look into implementing a N to M system thread system with multiple VM support and each VM running in its own LWP.
For anything that is really processor intense in ruby I just write a C extension and in almost ever case never run into issues with that.

My favorite toy language would probably be Erlang, its still interesting to play with and seems like a really practical language. I just haven't found any projects that I can use for it yet to take it to the next level of actual functional code.

C is my low level language of choice. C++ is nice, but sometimes it gets a bit convoluted. Maybe its because I haven't flexed my templates and generic programming muscles enough to fully wrap my head around C++'s template system properly, but I find most things I need to get done don't really require all the things C++ adds to C. Plus, when I need OO in C I default to Objective-C so.... that kinda makes C++ a bit less um... ¿practical? for me.
# drinks WAY to much espresso

User avatar
Ptolom
Posts: 1559
Joined: Mon Mar 24, 2008 1:55 pm UTC
Location: The entropy pool
Contact:

Re: The one bestest ever of all time language to rule them all

Postby Ptolom » Wed Jan 14, 2009 8:10 pm UTC

BBC BASIC Mmmmm. Seriously though probably C, with perl coming in a close second. C's fast which is good but perl doesn't make me hate myself, which is also good in a language.

Uriel
Posts: 5
Joined: Wed Jan 14, 2009 4:12 pm UTC

Re: The one bestest ever of all time language to rule them all

Postby Uriel » Wed Jan 14, 2009 11:32 pm UTC

>> LISP <<

no comment needed.
Do you know what the chain of command is here? It's the chain I go get and beat you with to show you who's in command.

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: The one bestest ever of all time language to rule them all

Postby 0xBADFEED » Thu Jan 15, 2009 2:40 pm UTC

qbg wrote:
Qoppa wrote:If utility is the question at hand, C++. Almost everything you could ever want to do can be done in C++, and I like it.

This is essentially the argument of Turing-completeness. C++ thus fails by a corollary of Godwin's law.


I think that maybe Qoppa was referring to the types of programs that can be written in C++. I mean it has pretty much every other language beat on breadth. You can write anything from embedded software, OS's, enterprise applications, etc. You can write software at pretty much any scale or abstraction level with C++ which is somewhat unique among languages. At least I think that's what Qoppa might have meant.

If I were stranded on a desert island and could only take one programming language I'd take C++.

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: The one bestest ever of all time language to rule them all

Postby Berengal » Thu Jan 15, 2009 2:45 pm UTC

Yeah, C++ can do anything, but I do believe implementing a python interpreter would be the best C++ solution to many tasks.
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
Bluggo
Posts: 366
Joined: Wed Jul 11, 2007 6:12 pm UTC

Re: The one bestest ever of all time language to rule them all

Postby Bluggo » Thu Jan 15, 2009 4:56 pm UTC

I could not explain why, but I like very much the sonority of Nahuatl toponyms. However, much could also be said about the beauty of Slavic languages...

Ah, not that kind of language? ;-)

I use python when I need something done quickly, scheme when I want something done right, and assembly when I want to nourish my inner geekiness.

I should probably take the time to learn some Haskell, one time or another.
Mary Ellen Rudin wrote:Let X be a set. Call it Y.

Wiglaf
Posts: 79
Joined: Sun Feb 10, 2008 8:54 pm UTC

Re: The one bestest ever of all time language to rule them all

Postby Wiglaf » Fri Jan 16, 2009 1:16 am UTC

I, here, would like to defend PERL.

Who doesn't like "while (<>)" for looping over all lines in the standard input? If you don't think that's the most awesome and incredibly programmer friendly line EVER... you have NO place in a UNIX world. (is this the level of trolling expected for this thread?)

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

Re: The one bestest ever of all time language to rule them all

Postby ash.gti » Fri Jan 16, 2009 1:55 am UTC

whats wrong with

Code: Select all

# $stdin is a global in ruby that is linked to the current input
$stdin.each_line do |line|
  puts line
end


If thats not understandable... well... I don't know how thats not understandable... you can even read it out loud and it makes perfect sense, no mysterious symbols to interpret or anything.
# drinks WAY to much espresso

User avatar
Qoppa
Posts: 694
Joined: Sat Nov 24, 2007 9:32 pm UTC
Location: Yes.

Re: The one bestest ever of all time language to rule them all

Postby Qoppa » Fri Jan 16, 2009 5:24 am UTC

0xBADFEED wrote:I think that maybe Qoppa was referring to the types of programs that can be written in C++. I mean it has pretty much every other language beat on breadth. You can write anything from embedded software, OS's, enterprise applications, etc. You can write software at pretty much any scale or abstraction level with C++ which is somewhat unique among languages. At least I think that's what Qoppa might have meant.

If I were stranded on a desert island and could only take one programming language I'd take C++.
That is exactly what I meant.

Code: Select all

_=0,w=-1,(*t)(int,int);a()??<char*p="[gd\
~/d~/\\b\x7F\177l*~/~djal{x}h!\005h";(++w
<033)?(putchar((*t)(w??(p:>,w?_:0XD)),a()
):0;%>O(x,l)??<_='['/7;{return!(x%(_-11))
?x??'l:x^(1+ ++l);}??>main(){t=&O;w=a();}

Wiglaf
Posts: 79
Joined: Sun Feb 10, 2008 8:54 pm UTC

Re: The one bestest ever of all time language to rule them all

Postby Wiglaf » Fri Jan 16, 2009 4:50 pm UTC

ash.gti wrote:whats wrong with

Code: Select all

# $stdin is a global in ruby that is linked to the current input
$stdin.each_line do |line|
  puts line
end

Code: Select all

print while<>

My 13 characters on one line beats your 43 characters on 3 lines. (For any contesting golfers, we'll define this task as "run an arbitrary function on each line of the stdin.)

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

Re: The one bestest ever of all time language to rule them all

Postby Xanthir » Fri Jan 16, 2009 5:32 pm UTC

Wiglaf wrote:My 13 characters on one line beats your 43 characters on 3 lines. (For any contesting golfers, we'll define this task as "run an arbitrary function on each line of the stdin.)

Code: Select all

(loop (print (read-line)))


Doesn't rely on crazy implicit looping, but still. Bonus points due to the fact that I don't have to make any significant changes to perform arbitrary operations to this.

And because I'm a cheater:

Code: Select all

(defun rel (func)
  (loop (funcall func (read-line))))
(rel 'print)

12 characters for every subsequent use. And mine accepts more arbitrary functions than yours. (REL is short for read-eval-loop, a contraction of the REPL we normally hack at.)

(And the repl, without error handling, can be programmed with nothing more than (loop (print (eval (read-line)))). It's as simple as it sounds. ^_^)
(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: The one bestest ever of all time language to rule them all

Postby ash.gti » Fri Jan 16, 2009 7:03 pm UTC

The whole point I was trying to make is not that the perl way is shorter, its that the ruby way is more understandable.

Someone thats never seen ruby before could understand what I wrote. If you don't know the perl <> operator then you'd probably be confused by what was going on.

Ruby can by cryptic if it needs to be:

Code: Select all

p $<.gets while !$<.eof?


Not as short as your perl way of doing things, but I never said ruby was perl or that its 'better' than perl (whatever that means, how do you measure better?), I just said I think its the best language I know and use.

does the same thing as my other code, but its hardly what I would call readable.

My philosophy is code is written by humans for humans and the intupuetor should have the job of translating that machine code. If I wanted to write in a machine friendly way I wouldn't use a high level language. Part of the reason I like ruby is it is flexible enough to get what I need done and still be human readable.
# drinks WAY to much espresso

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

Re: The one bestest ever of all time language to rule them all

Postby Xanthir » Fri Jan 16, 2009 7:48 pm UTC

ash.gti wrote:Someone thats never seen ruby before could understand what I wrote. If you don't know the perl <> operator then you'd probably be confused by what was going on.

If someone's never seen my *language* before, I don't want them reading my code. Thus, your argument is fallacious.

Also, your mothers weight is large enough to put significant stress on continental faults when she is walking.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

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

Re: The one bestest ever of all time language to rule them all

Postby qbg » Fri Jan 16, 2009 7:52 pm UTC

ash.gti wrote:whats wrong with

Code: Select all

# $stdin is a global in ruby that is linked to the current input
$stdin.each_line do |line|
  puts line
end


If thats not understandable... well... I don't know how thats not understandable... you can even read it out loud and it makes perfect sense, no mysterious symbols to interpret or anything.

Well, you have this weird |line| thing in there...

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: The one bestest ever of all time language to rule them all

Postby Berengal » Sat Jan 17, 2009 1:14 am UTC

qbg wrote:
ash.gti wrote:whats wrong with

Code: Select all

# $stdin is a global in ruby that is linked to the current input
$stdin.each_line do |line|
  puts line
end


If thats not understandable... well... I don't know how thats not understandable... you can even read it out loud and it makes perfect sense, no mysterious symbols to interpret or anything.

Well, you have this weird |line| thing in there...

Anyone who has ever heard of arguments should be able to figure that one out. I still haven't met anyone who hasn't anyway.
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
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: The one bestest ever of all time language to rule them all

Postby ash.gti » Sat Jan 17, 2009 2:33 am UTC

I just realized I can shorten that a bit more.

You can just do:

Code: Select all

print while gets


Kinda forgot about print ><
# 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: The one bestest ever of all time language to rule them all

Postby aleflamedyud » Mon Jan 19, 2009 11:50 pm UTC

That language doesn't currently exist. I've designed the ultimate language, but I still have to implement a compiler -- which I'm not really all that good at doing at all. Though I have got the syntax and semantics figured out.
"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
quintopia
Posts: 2906
Joined: Fri Nov 17, 2006 2:53 am UTC
Location: atlanta, ga

Re: The one bestest ever of all time language to rule them all

Postby quintopia » Tue Feb 03, 2009 8:17 am UTC

Java for designing ADTs, because it is currently the OO language with the most useful, well-documented libraries.
Matlab for doing lots of math with a minimum of code.
Spiral for sheer joy of struggling with the code.

Speed, versatility, readability, and maintainability are all somewhat overrated.

Poposhka
Posts: 39
Joined: Tue Jan 02, 2007 10:20 pm UTC
Location: So. Cal.
Contact:

Re: The one bestest ever of all time language to rule them all

Postby Poposhka » Thu Feb 05, 2009 1:30 am UTC

the worst "language" ever made is the scripting engine for Operation Flashpoint/Armed Assault.

It makes me want to stab kittens.


C++ in its core is the embodiment of object oriented programming, abstraction and clear code .. if you motherfuckers would just stop putting the opening curly brace on the same line as the if/for/while statement/function decl.

I like LUA too as it has a lot of possibilites with it's weak types and how its functions work but fuck does that get me in trouble at times.

Java gets a star for having so many useful utility libraries with it.

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

Re: The one bestest ever of all time language to rule them all

Postby Xanthir » Thu Feb 05, 2009 2:46 am UTC

Poposhka wrote:C++ in its core is the embodiment of object oriented programming, abstraction and clear code .. if you motherfuckers would just stop putting the opening curly brace on the same line as the if/for/while statement/function decl.

That's where it goes. Plus, since whitespace contributes to your carbon footprint, putting your braces together helps the earth, too!

By the way, Al Gore hates Python.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

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: The one bestest ever of all time language to rule them all

Postby Berengal » Thu Feb 05, 2009 5:42 am UTC

If you go printing out your code, you simply don't have a large enough monitor.

What I like about prolog? You tell it facts, and it tells you what it can deduct from it.

Code: Select all

?- Number is 5 + 8.   % The Number variable is 5 + 8
Number = 13.          % So Number must be 13.

?- member(Item, [1,2,3]).    % The Item variable is a member of the list [1,2,3]
Item = 1 ;
Item = 2 ;
Item = 3 ;
false.                       % So Item must be either 1, 2, 3, or the statement is false.

?- member(4, [1,2,3]).    % 4 is a member of the list [1,2,3]
false.                    % That statement is false

% So what's the answer to everything?

?- Everything.
% ... 1,000,000 ............ 10,000,000 years later
%
%       >> 42 << (last release gives the question)
?-
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.

bigstrat2003
Posts: 420
Joined: Sat Oct 27, 2007 2:18 am UTC

Re: The one bestest ever of all time language to rule them all

Postby bigstrat2003 » Fri Feb 06, 2009 5:52 pm UTC

C#, which is basically the language of the gods as far as I'm concerned. It does everything I want with elegance.

C++, while popular, can blow me. There is no other serious (ie, not brainfuck or INTERCAL or something similar) language that is such a damned eyesore to read. I can understand C++, but it generally takes at least 3 or 4 readings, and a lot of headaches. Just say no to C++.

User avatar
hotaru
Posts: 1037
Joined: Fri Apr 13, 2007 6:54 pm UTC

Re: The one bestest ever of all time language to rule them all

Postby hotaru » Fri Feb 06, 2009 7:08 pm UTC

Berengal wrote:What I like about prolog? You tell it facts, and it tells you what it can deduct from it.

there's one thing i don't like about prolog:

Code: Select all

?- Number is 3 ** 2.

Number = 9.0

Yes
?- Number ** 2 is 9.

No
?- 3 ** Number is 9.

No

Code: Select all

factorial product enumFromTo 1
isPrime n 
factorial (1) `mod== 1

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: The one bestest ever of all time language to rule them all

Postby Berengal » Fri Feb 06, 2009 11:14 pm UTC

Well, yes, but you're not supposed to use arithmetic in logic. Peano works fine, but real arithmetic is just tacked on later and you have to use special syntax to force it.

Code: Select all

add(A, B, Out) :-
  A > 0,!,
  C is A - 1,
  D = B + 1,
  add(C, D, Out).
add(A, Out, Out) :-
  A == 0,!.

?- add(5, 6, Output), Number is Output.
Output = 6+1+1+1+1+1,
Number = 11.
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.

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

Re: The one bestest ever of all time language to rule them all

Postby qbg » Sat Feb 07, 2009 1:14 am UTC

bigstrat2003 wrote:C++, while popular, can blow me. There is no other serious (ie, not brainfuck or INTERCAL or something similar) language that is such a damned eyesore to read.

C++ is worse than Perl?
I can understand C++, but it generally takes at least 3 or 4 readings, and a lot of headaches. Just say no to C++.

What kind of C++ are you referring to? (e.g. "C plus classes", "crazy template madness", etc.)

User avatar
Brooklynxman
Because I'm Awesome
Posts: 609
Joined: Tue Jan 20, 2009 4:27 pm UTC
Location: Here
Contact:

Re: The one bestest ever of all time language to rule them all

Postby Brooklynxman » Sat Feb 07, 2009 1:20 am UTC

C++

Anyone who disagrees openly admits their mother is so stupid she thinks vista is good
We figure out what all this means, then do something large and violent

The thing about changing the world...once you do it the world's all different.

I'm Angel. I beat the bad guys.

Spoiler:
Image

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: The one bestest ever of all time language to rule them all

Postby Berengal » Sat Feb 07, 2009 2:01 am UTC

Is it not right that post-increment is considered bad in C++? Is it possible to admit failure more openly than that?
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.

Vempele
Posts: 69
Joined: Wed Nov 14, 2007 8:05 am UTC

Re: The one bestest ever of all time language to rule them all

Postby Vempele » Sat Feb 07, 2009 4:16 pm UTC

Berengal wrote:Is it not right that post-increment is considered bad in C++? Is it possible to admit failure more openly than that?
C, being the subset of C++ that is also C, must be a POD type so the temporary copy will be optimized away by any sufficiently clever compiler.

We can determine your mother's exact position and velocity with unlimited accuracy. Her mass will be totally unknown, however, which is probably a good thing.
const int ALMOST_FIFTY = 80;


Return to “Religious Wars”

Who is online

Users browsing this forum: No registered users and 9 guests