Live data from Hacker News

Miranda released as free software

cs.kent.ac.uk

91–100 of 126 posts

Re: Miranda released as free software

#91
post #54
post #49

Earlier quoted context omitted.

Good question! BCPL's O-Code is far different from LLVM bytecode. O-Code was little more than a virtual stack machine. Very similar to Forth, though slightly more complicated. I could be wrong, but isn't Open64 more or less dead? The only thing I can think of that actually uses it (CUDA) isn't best-in-class.

So u say, LLVM or whatever is insane because it's large. so what do u think about QBE[0] ? 0 : https://c9x.me/compile/

I don't know enough about QBE to give a well-informed assessment of it, so I'll refrain.

Re: Miranda released as free software

#92

Here's an idea I have: never close-source any programming language, make 'em free and open from day zero. Languages are not products, but infrastructure, like roads. They benefit and grow from the number of users, not from paywalls. Closed languages tend to fade into obscurity. That's why everyone knows Haskell and nobody knows Miranda, everyone knows Java and nobody Eiffel. I laughed when I read that the author of S…

How is JVM miles ahead of the CLR? All I ever hear (at my current and previous jobs) is about how Java's runtime and tools are miles behind .Net and the CLR.

Sorry, I meant the JVM ecosystem, of course.

Re: Miranda released as free software

#93
post #47
post #2

You've at least heard of (if not used) a programming language heavily inspired by Miranda: Haskell. A lot of things about Miranda were really interesting; it reflects modern languages in some ways, but looks completely foreign in other ways. Like Haskell, whitespace was significant; unlike Haskell, it was fast. Really fast. It was one of the pioneering purely-functional languages, but seems to have been mostly forgot…

You've made several comments here suggesting that GHC - pretty widely considered an extremely powerful compiler - is inferior to what Miranda offers. Can you substantiate your claim that Miranda is faster than Haskell/GHC? FWIW, I just tried doing a very quick dumb benchmark - the classic functional pseudo-quicksort. GHC spit out a binary that can sort 10,000,000 numbers in a few seconds on my laptop. Miranda (after…

Oh wow, Miranda is still using an SK combinator reduction evaluator dating from 1986, in K&R C. It isn't even using supercombinators, which I read about in https://www.microsoft.com/en-us/research/publication/the-imp...

Combinators are fun, but not very fast :-) https://dl.acm.org/doi/10.1145/800087.802798 http://ioccc.org/years.html#1998_fanf

Re: Miranda released as free software

#94

I've been playing with Miranda a little bit since seeing this yesterday, and man, I gotta say, the quality of the REPL environment and documentation is amazing. Everything is laid out plainly, and you can learn how to work with the language in a matter of minutes. Even the readme was one of the best I've ever encountered. It makes no undue assumptions and leaves no work up to the reader. It even notes that one may ne…

> instead of having to invoke the REPL from your editor, your REPL invokes your editor--honestly it seems like the right relationship and now I'm fairly confused why other REPL focused languages don't commonly support this.

That is originally how REPLs worked in Lisp and APL systems in the 1960s. In BBN Lisp/Interlisp (see http://www.softwarepreservation.org/projects/LISP/bbnlisp/W-...) and APL\360 you called the built-in editor from the REPL. There were not really any stand-alone interactive editor programs around back then, and the operating systems BBN Lisp and APL ran on mostly did not properly support running multiple processes to run editors anyway. Maclisp on ITS had job control, and you could call external editors: http://www.maclisp.info/pitmanual/edit.html

Doing it the other way around is better for projects written in multiple languages, dealing with multiple implementations, running processes on remote systems, and IDE features.

Re: Miranda released as free software

#95
post #47
post #2

You've at least heard of (if not used) a programming language heavily inspired by Miranda: Haskell. A lot of things about Miranda were really interesting; it reflects modern languages in some ways, but looks completely foreign in other ways. Like Haskell, whitespace was significant; unlike Haskell, it was fast. Really fast. It was one of the pioneering purely-functional languages, but seems to have been mostly forgot…

You've made several comments here suggesting that GHC - pretty widely considered an extremely powerful compiler - is inferior to what Miranda offers. Can you substantiate your claim that Miranda is faster than Haskell/GHC? FWIW, I just tried doing a very quick dumb benchmark - the classic functional pseudo-quicksort. GHC spit out a binary that can sort 10,000,000 numbers in a few seconds on my laptop. Miranda (after…

Just for comparison, C++ running the shortest, simplest possible quicksort does 100,000,000 32-bit ints in 8s. Three more lines, and it's 3.4s. That's 1.3ns each time it looks at an element.

So when you are already giving up an order of magnitude or two, another doesn't matter so much. It pays then to steer the conversation toward other merits.

Re: Miranda released as free software

#96
post #41
post #15

Earlier quoted context omitted.

"the art of writing compilers and interpreters has effectively been lost" I'm curious, how does that happen? Were the techniques used in compilers and interpreters of yore never recorded for posterity in academic papers or technical documentation?

Spent a good while thinking on your question: The best stuff was all proprietary for decades. Even now, we only got Miranda's source code weeks ago. Miranda was written in the 1980s! It's the same for a lot of languages. Nial's the example I usually bring up for one that was freed far too late. People with the domain knowledge that would have helped deal with the complexity of modern systems are all either retired, h…

> I appreciate that free software "won" to some extent, but if it hadn't have won as fast, we might have had some knowledge transfer happen that was actually useful.

I was recently listening to the 2007 "Copyleft Capitalism: GPLv3 & the Future of Software Innovation" talk¹ by Eben Moglen (who incidentally happened to have worked on IBM's APL interpreter), and he makes the opposite argument: it was the source code hoarding of the Microsoft-driven personal computer industry that was the biggest impediment to knowledge transfer and innovation.

¹ https://www.youtube.com/watch?v=68aimESyyeU

Re: Miranda released as free software

#97
post #95
post #47

Earlier quoted context omitted.

You've made several comments here suggesting that GHC - pretty widely considered an extremely powerful compiler - is inferior to what Miranda offers. Can you substantiate your claim that Miranda is faster than Haskell/GHC? FWIW, I just tried doing a very quick dumb benchmark - the classic functional pseudo-quicksort. GHC spit out a binary that can sort 10,000,000 numbers in a few seconds on my laptop. Miranda (after…

Just for comparison, C++ running the shortest, simplest possible quicksort does 100,000,000 32-bit ints in 8s. Three more lines, and it's 3.4s. That's 1.3ns each time it looks at an element. So when you are already giving up an order of magnitude or two, another doesn't matter so much. It pays then to steer the conversation toward other merits.

> C++ and the shortest, simplest possible quicksort

wk_end was talking about "functional pseudo-quicksort" on immutable linked lists. You're presumably talking about a proper quicksort on mutable arrays. That's comparing apples to oranges.

And even if you weren't, how is that an argument? Person A says "X is faster than Y", then person B says "Actually I just ran X and it took 10x longer than Y" and then you say "Well Z, which isn't even part of this discussion, is 1000x faster than both X and Y, so your argument is invalid". How does that follow?

Re: Miranda released as free software

#98
post #97
post #95

Earlier quoted context omitted.

Just for comparison, C++ running the shortest, simplest possible quicksort does 100,000,000 32-bit ints in 8s. Three more lines, and it's 3.4s. That's 1.3ns each time it looks at an element. So when you are already giving up an order of magnitude or two, another doesn't matter so much. It pays then to steer the conversation toward other merits.

> C++ and the shortest, simplest possible quicksort wk_end was talking about "functional pseudo-quicksort" on immutable linked lists. You're presumably talking about a proper quicksort on mutable arrays. That's comparing apples to oranges. And even if you weren't, how is that an argument? Person A says "X is faster than Y", then person B says "Actually I just ran X and it took 10x longer than Y" and then you say "Wel…

It means that speed is not a very interesting basis for comparing them. If you cared much about speed, you would look elsewhere.

Re: Miranda released as free software

#99
post #41

Earlier quoted context omitted.

Spent a good while thinking on your question: The best stuff was all proprietary for decades. Even now, we only got Miranda's source code weeks ago. Miranda was written in the 1980s! It's the same for a lot of languages. Nial's the example I usually bring up for one that was freed far too late. People with the domain knowledge that would have helped deal with the complexity of modern systems are all either retired, h…

I think you’re conflating language design with language implementation. If I’m being paid to write a Ruby compiler then ‘keep the language simple’ isn’t an option available to me, is it. And the techniques from the 80s would be absolutely hopeless at compiling and optimising Ruby. A lot of the implementation approaches you’re talking about work brilliantly for a single-pass compiler for a trivial language like Pascal…

I'm not conflating anything, as far as I'm aware. The question was:

"the art of writing compilers and interpreters has effectively been lost"

I'm curious, how does that happen? Were the techniques used in compilers and interpreters of yore never recorded for posterity in academic papers or technical documentation?

I think I did a pretty good job in answering it, although it was a bit rambling.

The people on the standards committees for these languages are generally also the ones implementing compilers, at least at first. The ones that don't have significant overlap between the two fail. ALGOL-68 comes to mind in the past, FORTRAN-03/08 comes to mind now.

Also, there were fast Lisp compilers back then (as fast as Lisp can get, at least, and keyword "compilers" as I'm not misinterpreting the two), along with decent (eh) Smalltalk compilers: Ruby isn't that unique. An optimizing compiler for Ruby could have used many of the techniques, given that most of the bottlenecks in Ruby are the same as many Lisps. Of course, it won't map perfectly, but much of it would. (I will admit that this paragraph is written with primarily old versions of Ruby in mind, because beyond 2007 or so, when it was basically a Lisp with Smalltalk tendencies under the hood, I haven't really kept up.)

Many techniques absolutely have been lost over time, even in obvious spots, where you'd expect them to be maintained quite well; I have a folder of poorly-OCR'd, poorly-scanned ACM papers of novel, technically-interesting & fast pre-1990 compilers with significantly less downloads than citations. Academic papers aren't really where you'd expect to see "lost" techniques, but publishing is a wasteland, and most non-famous on this subject (and computers in general, partially; ever tried to find more than a handful of papers on Sun's Spring?) written between 1970 and 1990 are practically lost. The industry has the memory of a dormouse, though it might get better now that more and more things are becoming source-available.

Re: Miranda released as free software

#100
post #96
post #41

Earlier quoted context omitted.

Spent a good while thinking on your question: The best stuff was all proprietary for decades. Even now, we only got Miranda's source code weeks ago. Miranda was written in the 1980s! It's the same for a lot of languages. Nial's the example I usually bring up for one that was freed far too late. People with the domain knowledge that would have helped deal with the complexity of modern systems are all either retired, h…

> I appreciate that free software "won" to some extent, but if it hadn't have won as fast, we might have had some knowledge transfer happen that was actually useful. I was recently listening to the 2007 "Copyleft Capitalism: GPLv3 & the Future of Software Innovation" talk¹ by Eben Moglen (who incidentally happened to have worked on IBM's APL interpreter), and he makes the opposite argument: it was the source code hoa…

Oh, certainly! My claim isn't that libre software harms knowledge transfer at all. It's great!

But free compilers won so quickly even when they weren't obviously better that many proprietary compilers died quick, unceremonious deaths, with no obvious successors, and leading their authors to go into different areas. This was a bad thing, in my opinion, because a lot of early compilers were written in incredibly clever ways, and those clever ways died with them.

I think my comment was also worded poorly:

> I appreciate

> that free software "won" to some extent

is how I was hoping it would be interpreted, but I think it was interpreted as:

> I appreciate

> to some extent

> that free software "won"

Free software winning was absolutely the right thing, I just wish it would have been a bit less sudden.

Post reply on HN