News for hackers. Stuff that matters.
Re:Llama.cpp 30B runs with only 6GB of RAM now by alanfranz on Saturday April 01, 2023 @02:04AM (#35397582)
Python is the 2nd best language for everything.

It doesn’t excel at anything, but anything a software can do, it can be done in Python somehow.

So, a great pick when you’ve got no idea where you’re going to, when you’re prototyping, when you don’t care about performance or perfection.

I agree that for large scale systems when you already know what you’re doing, Python shows its limits quite soon (and we should add the problems with missing/slow type checking that slows down large scale systems development).

Re:Llama.cpp 30B runs with only 6GB of RAM now by pharmakom on Saturday April 01, 2023 @02:49AM (#35397835)
> Python is the 2nd best language for everything.

Huh? Why?

You can barely deploy it to Web.

it doesn't scale perfoance wise

you can't built robust abstractions

The REPL is merely OK

You can barely ship working code without containers

the syntax is hard to manipulate programmatically

Python has inertia but it's holding us back

Re:Llama.cpp 30B runs with only 6GB of RAM now by l33tman on Saturday April 01, 2023 @04:36AM (#35398468)
Well for starters, web deployment isn't "everything". Python is the de-facto go-to language for research or general prototyping, where not everyone is a programming wiz keeping track of the latest trendy new compiled language. Not everyone can compile stuff even.. :)

Having said that, I've deployed two large Django projects on the web with tons of customers and it runs and scales just fine, and it's a DREAM to maintain and develop for than for example Java.. I would go so far as to say the opposite, if you haven't used Python for web deployment you've been missing out! (you lose some efficiency I'm sure but you gain other things)

Re:Llama.cpp 30B runs with only 6GB of RAM now by pharmakom on Saturday April 01, 2023 @07:01AM (#35399210)
I was talking about running in the Web browser. it's not everything, but it's an important part of everything in my book.
Re:Llama.cpp 30B runs with only 6GB of RAM now by sireat on Saturday April 01, 2023 @01:43PM (#35402261)
https://github.com/pyodide/pyodide is pretty amazing for running Python client side in the browser.

You could run notebooks entirely client side https://jupyterlite.readthedocs.io/en/latest/

The startup is slow but otherwise it is pretty functional.

Re:Llama.cpp 30B runs with only 6GB of RAM now by renox on Saturday April 01, 2023 @04:39AM (#35398487)
You have good points but "the syntax is hard to manipulate programmatically"??

Maybe you haven't noticed but Lisp is now a tiny niche and most new languages aren't homoiconic either..

Re:Llama.cpp 30B runs with only 6GB of RAM now by pharmakom on Saturday April 01, 2023 @07:03AM (#35399215)
I don't think that proves anything. If we had "JavaLisp" in the browser instead of JavaScript then Lisp would be very popular. Besides that, Python is harder to manipulate than many non-Lisps, such as JavaScript and Go.
Re:Llama.cpp 30B runs with only 6GB of RAM now by renox on Saturday April 01, 2023 @08:38AM (#35399805)
Python became popular without being the 'web language', the Lisps didn't.
Re:Llama.cpp 30B runs with only 6GB of RAM now by pharmakom on Saturday April 01, 2023 @08:42AM (#35399840)
Curly brace languages are more popular again.
Re:Llama.cpp 30B runs with only 6GB of RAM now by kazinator on Sunday April 02, 2023 @02:41AM (#35407814)
* * *
Re:Llama.cpp 30B runs with only 6GB of RAM now by alanfranz on Saturday April 01, 2023 @07:31AM (#35399387)
What is another language working that well in a larger number of areas?
Re:Llama.cpp 30B runs with only 6GB of RAM now by pharmakom on Saturday April 01, 2023 @08:13AM (#35399619)
Clojure

JavaScript

Typescript

OCaml

Haskell

F#

Re:Llama.cpp 30B runs with only 6GB of RAM now by alanfranz on Saturday April 01, 2023 @11:31AM (#35401049)
Any JVM language or .NET language will take more to interface with native libraries, it’s not the same.

Ocaml is very niche, I feel it’s an hard sell for a general purpose language. Haskell, 3x that.

JS and TS, could be. But are they so much better than Python, if better at all?

Re:Llama.cpp 30B runs with only 6GB of RAM now by revelio on Saturday April 01, 2023 @01:57PM (#35402387)
Native library interfacing isn't really Python's strong suit, interpreter plugins are quite painful to write.

.NET has P/Invoke which is much nicer.

JVM is getting Panama+jextract, which is the nicest yet. You can go straight from header files to pure Java bindings which don't need any extra native code at all. But it's not shipped yet :(

Re:Llama.cpp 30B runs with only 6GB of RAM now by baq on Saturday April 01, 2023 @03:18PM (#35403179)
Python has had cffi since figuratively forever, so I’m not sure why you compare native modules to P/Invoke?
Re:Llama.cpp 30B runs with only 6GB of RAM now by revelio on Sunday April 02, 2023 @06:05AM (#35408954)
Most important libraries with native components are using C extensions, not cffi.
Re:Llama.cpp 30B runs with only 6GB of RAM now by alanfranz on Saturday April 01, 2023 @08:36PM (#35405781)
What is an “interpreter plugin?” Writing a Python C extension is not that painful, it’s quite well supported. And you’ve got cffi and ctypes as well.
Re:Llama.cpp 30B runs with only 6GB of RAM now by nequo on Sunday April 02, 2023 @06:58PM (#35416211)
> Ocaml is very niche, I feel it’s an hard sell for a general purpose language. Haskell, 3x that.

The impression about Haskell’s nicheness compared with OCaml prevails. But Haskell has a larger userbase and a larger library ecosystem than OCaml.

Re:Llama.cpp 30B runs with only 6GB of RAM now by alanfranz on Friday April 07, 2023 @03:47AM (#35479230)
A few years have passed since I last tried out both languages. Ocaml was sort of approachable, while Haskell required quite a different mindset imho, hence the “nicheness” from the general usage standpoint.
Re:Llama.cpp 30B runs with only 6GB of RAM now by xxpor on Saturday April 01, 2023 @01:10PM (#35401969)
Outside of typescript, this feels like a response from a decade ago, when Python was still mired in the 2 vs 3 problem.

What's happened to the popularity of all of these languages since 2010? Outside of JS/TS, absolutely nothing. If anything, they've lost mindshare.

Re:Llama.cpp 30B runs with only 6GB of RAM now by chpatrick on Monday April 03, 2023 @09:08PM (#35433667)
I've been using Haskell professionally for 8 years and its ecosystem is laughable compared to Python.
Re:Llama.cpp 30B runs with only 6GB of RAM now by smallerfish on Saturday April 01, 2023 @08:03AM (#35399566)
To steal from another thread, Python is the McDonald's of languages - it's ubiquitous, it doesn't take much effort, and it's really not very good.

The trope about it being the 2nd best language for everything isn't correct. It's taught in universities because it has a very short time to gratification, and the basic syntax is quite intuitive. Academics latched onto it for ML because of some excellent libraries, and it became established as a vital part of the ecosystem from there.

But it's a nightmare to support a moderate to large codebase in production, packaging continues to be a mess, and it's full of weird quirks. Great for weekend projects, but for pete's sake take a minute and port them into something more reliable before going to production with them.

Re:Llama.cpp 30B runs with only 6GB of RAM now by alanfranz on Saturday April 01, 2023 @08:44AM (#35399858)
I think you’re focusing too much on the letter, rather than the idea.
Re:Llama.cpp 30B runs with only 6GB of RAM now by sigi64 on Saturday April 01, 2023 @08:07AM (#35399581)
Python, the language with global interpret lock, Is not the 2nd best language for everything, especially in the age od multicore processors.
Re:Llama.cpp 30B runs with only 6GB of RAM now by baq on Saturday April 01, 2023 @03:21PM (#35403218)
Python is the practical language for when you do your cpu intensive tasks outside of it as a feature, since the GIL isn’t a problem with io parallelism.

You’d do better complaining about still nascent, compared to alternatives, async support or lack of jit in the official implementation.