Live data from Hacker News

Miranda released as free software

cs.kent.ac.uk

101–110 of 126 posts

Re: Miranda released as free software

#101
post #59
post #38

Earlier quoted context omitted.

k, J & APL, in roughly that order.

As far as I know, all three of those languages are interpreted. They might be good at slinging together predefined operations with fast implementations written in another language (C)… as long as you’re operating in parallel on large arrays, so that you spend more time inside the C functions than actually interpreting. But if you need to write your own operations or just do anything that’s isn’t massively parallel, n…

k is faster than hand-written C in many cases, and significantly faster than compiled Haskell.

Re: Miranda released as free software

#102
post #44

Earlier quoted context omitted.

APL isn't cheating because of that, it's cheating because it's small enough to fit in your CPU cache! I'm sure something else can beat Miranda, I'm just unsure of what. I don't really care for the FP paradigm outside of arrays and Lisp, though, so I'll be the first to admit that I haven't spent days looking; just a few hours here and there. Oh, actually: Stalin probably does. It's an R4RS compiler. Good luck getting…

No, it's the SIMD loop thing. The claim that k runs quickly because its functions fit in the CPU cache is, as far as I can tell, an off-hand comment that Arthur Whitney made once which has been repeated far more than it deserves. It's false—instruction cache behavior doesn't contribute significantly to k's advantage over other languages—for a few reasons: inner loops in array languages are 3–5 orders of magnitude sma…

My comment was that taking advantage of SIMD wasn't cheating, but "cheating" was a joke in both cases.

Though I disagree with your comment on the cache: it's very blatantly better for interpreters; Whitney isn't the only one who's a believer in that, Moore does too, and Moore is more competent than just about anybody. If you look at the performance of k and Moore-written Forths compared to Dyalog APL, it does seem like they have a point.

Re: Miranda released as free software

#103

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…

I shared this comment with a friend because it made me happy that something I posted was getting more than a surface-level review, and they responded like this to your last paragraph:

This is an interesting note to end on, because I'm not sure licensing and funding is one of the main factors that leads to this sort of thing. I think rationally designing environments in a holistic way is just sort of a lost art among programmers in general, in favor of the sort of anarchy and patchwork that characterizes software development in the present day

I agree with their view fairly strongly. Modern proprietary languages aren't this good at all in the same areas, either.

Thanks for checking this out, it makes me happy that someone's gained something from doing so.

Re: Miranda released as free software

#104
post #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 bu…

I disagree with your last sentence, but thank you for bringing the history here up!

Re: Miranda released as free software

#105
post #98
post #97

Earlier quoted context omitted.

> 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.

Their criticism is fair: I have been making a performance argument. I do think they've misinterpreted my performance argument, though, which I'll get to. (There's a lot of backlog I need to catch up with; this thread is very large and my typing speed is significantly faster than the speed at which I can think.)

Re: Miranda released as free software

#106
post #98
post #97

Earlier quoted context omitted.

> 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.

Again I want to emphasize that you were comparing different algorithms on different data structures. It's like someone made a benchmark using the naive recursive Fibonacci definition and then you implemented the iterative version in another language and concluded from that that the other language must be much faster. The different algorithm is what gave you (most of) the speed up, not the language.

I mean, I don't doubt that C++ is in fact faster than Haskell, just not by that much.

Re: Miranda released as free software

#107
post #102

Earlier quoted context omitted.

No, it's the SIMD loop thing. The claim that k runs quickly because its functions fit in the CPU cache is, as far as I can tell, an off-hand comment that Arthur Whitney made once which has been repeated far more than it deserves. It's false—instruction cache behavior doesn't contribute significantly to k's advantage over other languages—for a few reasons: inner loops in array languages are 3–5 orders of magnitude sma…

My comment was that taking advantage of SIMD wasn't cheating, but "cheating" was a joke in both cases. Though I disagree with your comment on the cache: it's very blatantly better for interpreters; Whitney isn't the only one who's a believer in that, Moore does too, and Moore is more competent than just about anybody. If you look at the performance of k and Moore-written Forths compared to Dyalog APL, it does seem li…

If you're talking about parsing speed, Dyalog is slow because it has a much more complicated grammar, and because it stores the execution stack in the workspace in order to make stack overflows impossible. If you're claiming k or Forth is faster for large array processing, I'd like to see some benchmarks. Do you have a citation for Moore on the instruction cache?

Re: Miranda released as free software

#108
post #99

Earlier quoted context omitted.

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 stand…

Can you give any concrete examples of techniques that have been lost?

Re: Miranda released as free software

#109
post #100
post #96

Earlier quoted context omitted.

> 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…

I'm still really interested in concrete specifics of what has been lost. Right now it just sounds like magic, which leaves me skeptical. I'm a huge fan of programming languages as a field and hope to someday do research in it, and this is a bit of history I'm not well versed in.

Re: Miranda released as free software

#110
I think I've responded to everything in this thread. If I've missed something, please point it out. I'll look through again later: I spent like five hours straight replying to this thread today, so I'm kind of tired of talking.
Post reply on HN