Live data from Hacker News

If I were to invent a programming language for the 21st century

wordsandbuttons.online

111–120 of 184 posts

Re: If I were to invent a programming language for the 21st century

#111

Earlier quoted context omitted.

Source? I’d love to read more about this

Not car and cdr but close enough https://en.wikipedia.org/wiki/Church_encoding

Also, cons, car, and cdr need not be primitives. They can be built out of lambdas. In Scheme:

  (define (cons x y)
    (lambda (m) (m x y)))

  (define (car z)
    (z (lambda (p q) p)))

  (define (cdr z)
    (z (lambda (p q) q)))
(From https://mitpress.mit.edu/sites/default/files/sicp/full-text/..., exercise 2.4)

Re: If I were to invent a programming language for the 21st century

#114
post #42

Earlier quoted context omitted.

In fact, that's what they say after clicking the buttons at the bottom - which are actually part of the article.

Actually not if one reads carefully.

Well all right, they don't really want COBOL - they're saying that that's what they were describing as something they wanted.

But my point was primarily that people probably missed that they had to click the buttons to read that.

Re: If I were to invent a programming language for the 21st century

#115
post #44

> The INCITS 226–1994 standard consists of 1153 pages. This was only beaten by C++ ISO/IEC 14882:2011 standard with 1338 pages some 17 years after. C++ has to drag a bag of heritage though, it was not always that big. Common Lisp was created huge from the scratch. This is a surprisingly incorrect remark, given that the author is apparently fairly well aware of programming language history. Common Lisp is a relatively…

Over less than a decade, I, one person, made a smallish Lisp dialect and documented it with a terse reference manual that doesn't repeat itself or pontificate all that much. It's formatted as one giant man page. If we render it to PDF, it's around 650 pages, with no table of contents or index. I am not a committee; I have no historic baggage from multiple base dialects. Shit that just popped into my head over a small span of time adds up to 650 pages already.

Re: If I were to invent a programming language for the 21st century

#116
post #44

> The INCITS 226–1994 standard consists of 1153 pages. This was only beaten by C++ ISO/IEC 14882:2011 standard with 1338 pages some 17 years after. C++ has to drag a bag of heritage though, it was not always that big. Common Lisp was created huge from the scratch. This is a surprisingly incorrect remark, given that the author is apparently fairly well aware of programming language history. Common Lisp is a relatively…

Indeed. The original description of Lisp included something like 10 primitives. That's it. Numerous examples of full-blown Lisps have been built from just those few primitives. One article I read even showed how arithmetic can be built from car and cdr.

But those full-blown Lisps have to have that full-blowness documented. It can't just be "here is the documentation for the ten primitives we used; to understand everything else, read the source".

It would be a bad doc if for every feature, it rambled on the details about how that feature is constructed out of the ten primitives, rather that specifying the relevant requirements for that feature.

Re: If I were to invent a programming language for the 21st century

#117
post #81
post #70

Earlier quoted context omitted.

Very much agree. Programming notation, like math, is supposed to be easy to convey exact meaning, unlike human language. Every attempt there has been to make code look like English hasn't worked out well. SQL, for example, is incredibly verbose, with complex syntax. This obscures what is otherwise very good semantics. I think this is why a lot of people hate writing queries.

And yet after 30+ years no one had adequately managed to replace it. God help us if it's one of those json based abominations. My main complaint with sql is that it can be somewhat difficult top make DRY.

CTEs can go a long way toward that, as can stored procs

Re: If I were to invent a programming language for the 21st century

#118
post #100

People, don't comment before you read the whole article (and click on the survey on the bottom)...

Don't forget your sense of sarcasm either. The top comments in this thread apparently didn't get the point of the article or stopped reading early.

And it's pinned to the top because anyone who didn't read the article is basically expecting that sort of "hah, nice try dummy" criticism in the comments. It's like candy.

Re: If I were to invent a programming language for the 21st century

#119

Earlier quoted context omitted.

Not car and cdr but close enough https://en.wikipedia.org/wiki/Church_encoding

Also, cons , car , and cdr need not be primitives. They can be built out of lambdas. In Scheme: (define (cons x y) (lambda (m) (m x y))) (define (car z) (z (lambda (p q) p))) (define (cdr z) (z (lambda (p q) q))) (From https://mitpress.mit.edu/sites/default/files/sicp/full-text/... , exercise 2.4)

Sure. Now to implement consp, all you need is a global list which tracks all lambdas that came from the cons function; if the argument object is eq to anything on that list, then it is a cons! We also now need another primitive: weak pointers. We don't want our global list to prevent otherwise unreferenced cells from being reclaimed.

typecase is going to be fun to develop and optimize, with everything being a lambda.

Re: If I were to invent a programming language for the 21st century

#120
Another language that is very English like syntax is Livecode. It is an extremely battery included IDE; very much Hypercard. I like it because I can download one binary and click together software that runs on most OSs. But the language I cannot get used to ; far too much typing and I find it really difficult to remember things. For me the j code he mentions is easier to learn. Not to read maybe (although it is not that hard, but it is dense so it is normal it would take a little more time to see what it exactly does even if I program it every day), but to write I find the English and Verbosity annoying.

offtopic:

What other environments could learn is the battery included part: I spent another 3 hours today updating a .NET project. In return I get functionality I do not use and will not use. So why do I update. Because the IDE is nagging about it.

Does something exist that will ask me if or what to update based on what I used and the available updates? Like;

New features:

[ ] QR code

Bug fixed:

[ ] ListView - crashes when Clear is called and a row was selected

Performance:

[ ] Latency on tcp sockets improved — Linux only

etc.

Because I probably care about none of these or maybe only one.

And yet I have to spend hours on dependencies which I did not want in the first place. Or maybe I wanted only the latency fix but not the rest.

Sorry, ranting.

Post reply on HN