News for hackers. Stuff that matters.
Re:Why Lisp? by georgeecollins on Friday November 12, 2021 @02:56PM (#29203842)
I hope that Rust joins the pantheon of eternal languages. I feel like it has a lot of the advantages of a language like C, but is just more modern and well thought through.

Also, you did not mention Java. I have very old Java code that still works fine.

Re:Why Lisp? by oblio on Friday November 12, 2021 @02:58PM (#29203874)
Java is probably the biggest "eternal" language we have these days. Probably tied with C and C++.

There's <<so much>> Java code churned out that it's unbelievable. Business systems have a ton more code than infrastructure systems.

Re:Why Lisp? by badsectoracula on Friday November 12, 2021 @11:44PM (#29207454)
> Java is probably the biggest "eternal" language we have these days

Is it? I haven't followed it in years but i remember reading about people sticking with Java 8 because later versions broke backwards compatibility in some cases.

Re:Why Lisp? by overtomanu on Saturday November 13, 2021 @08:29AM (#29209550)
Its a bit complicated, technically java language never broke backward compatibility. you can run existing java programs fine in higher java jvm's by adding extra command line parameters to include all existing libraries in default module. But it becomes complicated by the use of intermediate tools which are not updated to handle this.
Re:Why Lisp? by pjmlp on Saturday November 13, 2021 @03:05AM (#29208248)
Yep, modules were a big break, however all the relevant libraries that actually matter on the Java ecosystem are available on latest versions.

Basically it is the same kind of effect like school/university teachers whose idea of C++ is C with extras, and if they teach something more close to C++98 proper even in 2021, one should consider themselves lucky.

Re:Why Lisp? by chii on Friday November 12, 2021 @09:33PM (#29206875)
> [java] Probably tied with C and C++.

i think java wins over c/c++, because there's very little low level, machine specific code you can do in java, where as you surely can do that in c/c++.

Re:Why Lisp? by pjmlp on Saturday November 13, 2021 @03:06AM (#29208251)
True, and instead of rewriting the whole stuff, if some C or C++ is actually required there is always JNI, JNA, or the upcoming Panama.
Re:Why Lisp? by wglb on Friday November 12, 2021 @06:47PM (#29205865)
I would check on cobol first.
Re:Why Lisp? by oblio on Saturday November 13, 2021 @05:28AM (#29208837)
There's a ton more Java out there. Java is much newer but it's from a time when we're talking about tens of millions of developers worldwide, instead of tens of thousands. A lot more people have been churning out Java since 1996 than Cobol since 1955 or so.
Re:Why Lisp? by wglb on Saturday November 13, 2021 @09:04AM (#29209775)
Do you have a feeling for how many Java LOC are out there?
Re:Why Lisp? by oblio on Saturday November 13, 2021 @11:16AM (#29210807)
I've worked for a 10 person company where 5 were working on a Java backend, the app was about 10 years old. 250k lines.

I used to work for a mediocre multinational with about 50 people working on a big Java front end to their many servers. Just the frontend was about 3 million lines.

You've never heard of either of them, the multinational had a market cap of about half a billion.

I've worked for a bunch of bigger companies but I don't have numbers, I just know they had bigger systems.

I wouldn't be shocked if there are tens of billions to hundreds of billions of lines of Java in production right now. I imagine that something like half a billion are added each year.

There are so many big Java middleware companies nobody has heard of. You wouldn't even know they use Java if you wouldn't look at the job listings.

Re:Why Lisp? by doetoe on Wednesday November 17, 2021 @02:05AM (#29249988)
If you multiply the 5000 LoC each developer at your 10-person company wrote yearly by the tens of millions of Java developers in your previous comment, you get much more than half an (American) billion
Re:Why Lisp? by Tanjreeve on Saturday November 13, 2021 @10:43AM (#29210535)
That's going to be quite a loaded metric considering how verbose Java is.
Re:Why Lisp? by kaba0 on Monday November 15, 2021 @03:18AM (#29225010)
Java is at most longer than “short program” by a small constant factor, and that is mostly around project initialization.

Also, I have never really understood it — c++ is not the shortest thing either with duplicating headers/implementations, go’s error handling deserves a whole discussion in terms of verbosity yet these languages are not considered repetitive.

Re:Why Lisp? by wglb on Saturday November 13, 2021 @10:56AM (#29210629)
Well as a former cobol programmer, I would argue that it is no less verbose than pretty much any language.
Re:Why Lisp? by yellowapple on Saturday November 13, 2021 @12:44AM (#29207732)
C# is also probably in a similar league, for the same reasons.
Re:Why Lisp? by bsder on Friday November 12, 2021 @06:41PM (#29205822)
> I hope that Rust joins the pantheon of eternal languages.

I'm torn about this. On one hand, Rust is so much better than C it is ridiculous and I really hope it does become a language with decade-long longevity.

On the other hand, Rust is the first new "systems programming" language in forever and is finally prying the door open to something other than C/C++. I'm really hoping that Rust opening the door and paving the way means that now we can get something better.

What worries me about Rust is the impedance mismatch down at the very primitive hardware level--bytes and registers. The embedded guys are doing an amazing job papering over it, but the abstractions leak through quite a lot and you have to twist things around to satisfy them.

The problem is: that's a lot of fiddly code with all kinds of corner cases. So, you either have a lot of work or you throw up your hands and invoke C (like Zig does).

Re:Why Lisp? by uoaei on Friday November 12, 2021 @03:52PM (#29204393)
I'd give it another 2-5 years before the syntax settles. Some serious improvements have recently been pushed out and I wouldn't be surprised if further improvements are on the horizon.
Re:Why Lisp? by chayleaf on Saturday November 13, 2021 @01:36AM (#29207917)
editions still allow backwards compatibility though, it's not like the syntax changes will break it
Re:Why Lisp? by drran on Saturday November 13, 2021 @07:12AM (#29209237)
Rare example of broken backward compatibility: `cargo install gltf-viewer` doesn't work today because of an error in gltf library. The error is fixed, but gltf-viewer is not updated to use the fix.

   Compiling gltf v0.11.3
  error[E0597]: `buf` does not live long enough
   --> /home/vlisivka/.cargo/registry/src/github.com-1ecc6299db9ec823/gltf-0.11.3/src/binary.rs:225:35
      |
  119 | impl<'a> Glb<'a> {
      |      -- lifetime `'a` defined here
  ...
  225 |                     Self::from_v2(&buf)
      |                     --------------^^^^-
      |                     |             |
      |                     |             borrowed value does not live long enough
      |                     argument requires that `buf` is borrowed for `'a`
  ...
  233 |             }
      |             - `buf` dropped here while still borrowed
Re:Why Lisp? by ahohokla on Friday November 12, 2021 @05:50PM (#29205438)
I'd like it to be so, but i dont have faith for it. rust doesnt have a standard like lisp/c/c++ and it stands to those languages for their eternality, and at least with lisp and C their relative simplicity makes all the difference for something like that. they feel like, despite how opposite they are, discoveries rather than inventions when compared to something so complex like rust and c++
Re:Why Lisp? by pharmakom on Saturday November 13, 2021 @04:41AM (#29208647)
I don’t think Rust will (at least not in current form). It’s breaking too much ground in the (real world) PL-design space. We just don’t know what really work yet!
Re:Why Lisp? by bobbylarrybobby on Saturday November 13, 2021 @02:25PM (#29212480)
Eh; sum types, everything-is-an-expression, and composition over inheritance get you very very far toward optimal language design. Sure there are some potential economic improvements that could made to Rust, but the foundation is so strong that I don’t see anything that makes those same design decisions supplanting Rust. More likely that a new Rust edition would incorporate those kinds of changes.
Re:Why Lisp? by xapata on Friday November 12, 2021 @04:28PM (#29204747)
Java is younger than Python.
Re:Why Lisp? by p_l on Friday November 12, 2021 @04:57PM (#29205015)
But Java 1.0 code is still (mostly) compile-able on recent Java versions, not so much with Python where I'd worry about going back 5 years.
Re:Why Lisp? by musicale on Friday November 12, 2021 @07:38PM (#29206238)
Many Python developers and users were burned when the Python project decided to set fire to billions of lines of code.

I have zero trust in Python as far as code longevity is concerned.

Re:Why Lisp? by throwawayapples on Friday November 12, 2021 @08:04PM (#29206363)
More like trillions of lines of code, from probably millions of developers, dating back to the 90's.

"The total code size of Zope 2 and its dependencies has decreased by over 200,000 lines of code as a result." - from the 2013 Zope documentation... how many lines of code was it before then?

Python really burned its bridges. It's shown that it's a toy language now, and demonstrably unfit for any real production-quality projects.

Re:Why Lisp? by EdwardDiego on Friday November 12, 2021 @11:30PM (#29207367)
> how many lines of code was [Zope] before then?

Soooo many. Zope was a very formidable code base to delve into. I was trying to learn it because my company was using Plone, and Zope quickly surfaced through the abstractions.

Zope's codebase might have been more accessible if type annotations were a thing back then. Their implementation of "interfaces" for Python were very interesting back in the Python 2.3 days.

I disagree that Python is a "toy" language now. It started out as one, and has been stumbling awkwardly away from that ever since the mid 2000s - virtualenvs, pip, pyenv, pipenv/poetry, type annotations, mypy etc.

In my entirely unscientific opinion, I think it was Django that started this journey, then of course scikit, numpy leading into pandas etc.

Re:Why Lisp? by xapata on Saturday November 13, 2021 @02:02AM (#29207998)
Both NumPy and Django were created in 2005, but Numeric, the ancestor of NumPy, is nearly as old as Python itself, and predates SciPy.
Re:Why Lisp? by darthrupert on Saturday November 13, 2021 @02:47AM (#29208191)
Bullshit. 2 => 3 transition was mostly mechanical and programmers who are unable to do it should get better.

I haven't seen py2 code in several years. Granted, I would look away in disgust if I did.

Re:Why Lisp? by xapata on Friday November 12, 2021 @10:05PM (#29207039)
Right right right. I'll let my CTO know.
Re:Why Lisp? by xapata on Tuesday November 16, 2021 @12:29AM (#29237211)
I wrote code that worked with both interpreters simultaneously for many years. I don't know why you'd worry so much.