News for hackers. Stuff that matters.
Re:Graal and Truffle could accelerate programming language d... by outworlder on Tuesday July 19, 2016 @01:43PM (#12123341)
> Since the dawn of computing our industry has been engaged on a never ending quest to build the perfect language.

Except it really hasn't. The industry is going to use whatever language has the bare minimum feature set they value at the moment and no more.

Call me cynical but my point of view is: if the industry were really striving for perfection, there would be no COBOL or BASIC, for instance. Lisp had already been invented. Garbage collection was a thing already. We had macros. A REPL. A little later, OOP and multiple dispatch. The list goes on.

They had to ditch the (almost) perfect wheel for a cheaper square one. Fast forward a few years, and the square wheel is now polished but just as square, the insanely great wheel now just is as cheap as it is, but we won't use it, as the axles expect the square wheel.

And then we invent Java and XML...

Re:Graal and Truffle could accelerate programming language d... by ktRolster on Tuesday July 19, 2016 @01:53PM (#12123454)
if the industry were really striving for perfection, there would be no COBOL or BASIC, for instance.

COBOL was a huge improvement at the time, an innovation in readability. BASIC is a good demonstration of why the platonic ideal language is wrong: it was designed for beginners (that's what the acronym stands for), and it did a reasonably good job at that. Beginners might be overwhelmed by OOP, multiple dispatch and a list of design patterns. Sometimes experts are too.

Garbage collection is a nice feature, but it doesn't fit everywhere. Sometimes you want to manage your own memory. That's why we have more than one language.

Re:Graal and Truffle could accelerate programming language d... by outworlder on Tuesday July 19, 2016 @02:21PM (#12123668)
> COBOL was a huge improvement at the time, an innovation in readability. BASIC is a good demonstration of why the platonic ideal language is wrong: it was designed for beginners (that's what the acronym stands for), and it did a reasonably good job at that.

Sure. But these systems were created from the ground up, every single time. Given a good foundation, which could be Lisp or something even better, you can whip up the "simpler" languages in no time. Even ditch the parentheses if you so desire. While getting all the benefits of the underlying system.

> Garbage collection is a nice feature, but it doesn't fit everywhere. Sometimes you want to manage your own memory. That's why we have more than one language.

Sure. But I disagree with that's the reason why we have multiple languages. There's no single reason, it is probably a mixture of preferences, previous knowledge, budget, time to market (JS!) among others.

We can manage our own memory from higher level languages. We can compile them. We can even make them spit out assembly custom-made for a given, niche application (see the Galileo magnetometer patch).

Sorry if I sound like a smug lisp weenie. But even that description is not accurate: had we focused our collective resources towards "perfection", as that sentence implies, we would have something way better than Lisp itself. Or anything else that we currently use.

It is as if we had invented jet engines before planes. But then placed steam engines on them because they were cheaper. Or that more people understood them.

Re:Graal and Truffle could accelerate programming language d... by euyyn on Tuesday July 19, 2016 @07:03PM (#12125614)
Lisp didn't miss the train because it was too good or because people were idiots. For a good foundation to be good it has to meet the pre-requisite to work for most use cases. Lisp didn't when C did, in a time when hardware was small and expensive.

Times have changed now? Sure, but history didn't wait.

Re:Graal and Truffle could accelerate programming language d... by nickpsecurity on Wednesday July 20, 2016 @12:34AM (#12126919)
That's a significant part of it. Check out PreScheme, though, for how that might have worked:

https://en.wikipedia.org/wiki/PreScheme

It's a Scheme created as a C alternative for low-level programming used in a verified Scheme48, VLISP. It was quite efficient. LISP's doing more of that kind of thing might have fueled more use of the language.

Re:Graal and Truffle could accelerate programming language d... by pjmlp on Wednesday July 20, 2016 @02:45AM (#12127280)
UNIX and C were free as beer, because AT&T was forbidden to sell it and initially gave it away.

Lisp usually required expensive mainframes and workstations.

Of course C got the adoption of the 80's hipsters with such price tag.

Re:Graal and Truffle could accelerate programming language d... by TeMPOraL on Wednesday July 20, 2016 @02:14AM (#12127193)
Lisp worked well before C was even conceived. It's that C could be fitted on less expensive hardware, which was in turn easier to market to companies. C and UNIX success is a literal "worse is better" example - crappy solutions (compared to other contemporary ones), but with smaller up-front costs, so easier to sell. Buyers didn't seem to care that it costed more down the line.
Re:Graal and Truffle could accelerate programming language d... by ktRolster on Tuesday July 19, 2016 @02:36PM (#12123755)
The reality is: programming languages are fun, but the programming language is not the biggest barrier to writing good code, or even getting it done quickly.

Good programmers can write good code in any language, lousy programmers will write lousy code in every language. Malbolge might be excluded from that, but with a decent macro pre-processor, even brainfuck can be workable.

Re:Graal and Truffle could accelerate programming language d... by elbear on Wednesday July 20, 2016 @09:39AM (#12128889)
Most programmers are average though, so it helps to have languages that make it harder for you to introduce bugs.
Re:Graal and Truffle could accelerate programming language d... by kaeluka on Wednesday July 20, 2016 @10:32AM (#12129268)
> Given a good foundation, which could be Lisp or something even better, you can whip up the "simpler" languages in no time.

In practise, that foundation (for many programs) is Java byte code.

Re:Graal and Truffle could accelerate programming language d... by kbenson on Tuesday July 19, 2016 @02:11PM (#12123595)
> BASIC is a good demonstration of why the platonic ideal language is wrong

That's often my point when people bring up arguments against a language that seems a bit more complex (Perl), or for language simplicity (Python). Some complexity falls into a sliding scale where there is more cognitive load while learning, but it pays of in the every day usage. The siple example of an extreme end of this is APL. If you can internalize and understand the extremely concise and powerful syntax and semantics of the language (I haven't), you can do amazing things very quickly[1].

Now, doing amazing things very quickly isn't the only metric by which we judge a language, but it is a useful metric, and it's probably worth having a language on that end of the spectrum in your tool set.

1: https://www.youtube.com/watch?v=a9xAKttWgP4

Re:Graal and Truffle could accelerate programming language d... by sevensor on Tuesday July 19, 2016 @04:24PM (#12124611)
> If you can internalize and understand the extremely concise and powerful syntax and semantics of the language (I haven't), you can do amazing things very quickly

Not to mention figuring out how to type APL -- that's where I got stuck.

Re:Graal and Truffle could accelerate programming language d... by eggy on Wednesday July 20, 2016 @03:27AM (#12127394)
Try J then. It uses the ASCII character set, and has added some concepts that APL seems to be adopting. [1] And it is amazing what you can do once you have put some time into it. Jd and Jdb, both database apps for J beat Spark/Shark and others at the big data game. I'd call that pretty powerful. Similar to the way qdb/k is used a lot in the finance sector for ticker data, but J is opensource. [1] jsoftware.com
Re:Graal and Truffle could accelerate programming language d... by ktRolster on Tuesday July 19, 2016 @06:39PM (#12125485)
Keyboards are available, but they're expensive:

http://www.dyalog.com/apl-font-keyboard.htm

Re:Graal and Truffle could accelerate programming language d... by kd0amg on Tuesday July 19, 2016 @06:45PM (#12125521)
Don't worry too much about typing it. The syntax of APL isn't all that powerful and actually limits how you can leverage the aggregate operation semantics.
Re:Graal and Truffle could accelerate programming language d... by TeMPOraL on Wednesday July 20, 2016 @02:18AM (#12127208)
> Some complexity falls into a sliding scale where there is more cognitive load while learning, but it pays of in the every day usage.

I think quite a lot of complexity falls into this scale, and the quest for simplicity - or rather, "user-friendliness" - in computing is utterly misguided. The difference between a toy and a tool is that a tool exchanges more upfront learning requirement for ability to get more done. Not just more efficiently, but more. We're doing ourselves, and the world, a huge disservice by expecting that everything - be it a website, an IDE or a programming language - should be able to be mastered in first 5 seconds of exposure. The only way to achieve that is to dumb the product down.

In other words, we need more learning culture (or even RTFM culture), less "user-friendliness".

Re:Graal and Truffle could accelerate programming language d... by JohnStrange on Tuesday July 19, 2016 @02:08PM (#12123564)
The majority never picks the best and markets do not optimize as much as some people think. Whether it's movies, arts, books, music, politicians, keyboards or programming languages, the most popular choices are practically never the best ones.

Which is probably why a technocracy in which every voter must pass a fact-based proficiency test before being allowed to vote might trump democracy. Not sure, just wanted to chime in with being cynical. :/

Re:Graal and Truffle could accelerate programming language d... by smallnamespace on Tuesday July 19, 2016 @02:41PM (#12123809)
Who gets to determine which facts?

Why would that group not use that to their advantage, instead of to the benefit of everyone?

> The majority never picks the best and markets do not optimize as much as some people think. Whether it's movies, arts, books, music, politicians, keyboards or programming languages, the most popular choices are practically never the best ones.

The question is not whether the market picks the optimal outcome, but whether a committee of experts would do better. The experience of central planning within the Warsaw Pact should hint at the answer...

Re:Graal and Truffle could accelerate programming language d... by TeMPOraL on Wednesday July 20, 2016 @02:21AM (#12127226)
> The question is not whether the market picks the optimal outcome, but whether a committee of experts would do better. The experience of central planning within the Warsaw Pact should hint at the answer...

The experience of the entire Internet seems to suggest a different answer, so it's not that central planning is always bad. Note that the best, most reliable, most stable parts of the Internet were invented and codified long ago, when there weren't many people on-line and there wasn't that much commercial interest in it. Today we can rarely if ever agree on any kind of protocol or standard, and if we do, it's usually a huge bloated mess.

Re:Graal and Truffle could accelerate programming language d... by smallnamespace on Wednesday July 20, 2016 @12:33PM (#12130339)
> Today we can rarely if ever agree on any kind of protocol or standard, and if we do, it's usually a huge bloated mess.

So the question becomes, how do you know whether you're going to get a huge bloated mess or the Internet, and how do you influence the outcome?

As the number of potential 'experts' increases and the number of people involved in choosing them increases, you get something that looks more and more like a market, but without price transparency...

Re:Graal and Truffle could accelerate programming language d... by JohnStrange on Thursday July 21, 2016 @01:21PM (#12138419)
Randomly chosen from a democratically determined set, e.g. by a double-blind peer review committee.

Also, the facts can be discussed openly and if there was a problem with some of them, there could be a system of revoking or modifying the set of questions similar to the recounting of ballots.

For the committee of experts, that was your idea, I never suggested that, because it obviously makes no sense.

Re:Graal and Truffle could accelerate programming language d... by eggy on Wednesday July 20, 2016 @03:42AM (#12127436)
You used 'trump' next to 'democracy' ;)

The majority and optimizing markets are at odds in your statement. Look at qdb/k, it is very expensive, programmers cost a bunch, but it is used by the big financial houses. I am sure they are glad it is not too popular and affordable.

I do agree that I don't like central planning, and design by committee, but those are different than your market statement or technocracy comment.

Movies, arts, books, music...horses for courses, best for what moment? I like action films, I like high-brow, arthouse stuff too. Same with books. I am glad I have a choice for the moment at hand.

When I was a young intellect, I succumbed to that elitist attitude of 'the best', and 'they don't know what's good for themselves' which is funny because I grew up in a poor, working-class neighborhood in Brooklyn in the late 60s/early 70s. Elitists were the guys from NY as well, but who wore black berets to film class at TSOA/NYU (three in my class alone!).

Re:Graal and Truffle could accelerate programming language d... by ZenoArrow on Wednesday July 20, 2016 @08:00AM (#12128312)
> "They had to ditch the (almost) perfect wheel for a cheaper square one."

Lisp was slower than C when speed mattered most. If you can't see why that would be an issue, I suggest trying to write a game for a home computer from the 1980s.

Re:Graal and Truffle could accelerate programming language d... by qwertyuiop924 on Tuesday July 19, 2016 @03:59PM (#12124390)
Some languages are better than others at certain things. By default, C is better than anything at low-level systems programming. Fortran can crunch numbers like nothing else. COBOL and BASIC are easy for novices, and BASIC is relatively simple to implement on low-end hardware, making it a natural choice for the early micros. Java is better than anything else at... well, no, Java sucks. And XML is even worse. Steve Yegge once noted that somehow, Ant and Jelly were less verbose than Java. And honestly, I'd believe it.