HNHacker News
TopNewBestAskShowJobs

pansa2

4,122 karma · joined January 24, 2020

submissionscomments
pansa2··on Python's experimental JIT to be removed
Ruby has the reputation of being a very slow language, but Python has been slower still since Ruby jumped ahead with version 1.9, almost 20 years ago. Ruby also has had far more success with JIT compilers than Python has.
pansa2··on Python's experimental JIT to be removed
> Unladen Swallow died for lack of upstream interest

IIRC Unladen Swallow was, despite the extreme hype, nothing more than the internship project of a couple of students. It died because their internship was over.

Otherwise you're right, though. Lots of CPython alternatives suffer from lack of upstream interest - the Python language designers don't seem very interested in anything other than CPython. In particular, they appear to only consider CPython when adding features to the language. Two examples:

- Requiring `dict`s to be ordered because that's how they work in CPython, without considering how they work in other implementations

- Adding pattern matching syntax that's suitable for CPython's PEG parser, even though it's not LL(1) so can't be parsed by, say, MicroPython

pansa2··on Python's experimental JIT to be removed
> we don't feel we have the personal bandwidth to carry the current version forward

Are the JIT developers the same people who were working on Faster CPython at Microsoft? No surprise that they don't have the same amount of energy to dedicate to the JIT now that it's gone from a full-time job to a hobby project.

pansa2··on Python's experimental JIT to be removed
Surprising, even though (IIRC) the performance of the JIT was always fairly underwhelming.

What about the other major change to Python's implementation: free threading? Has it lived up to expectations? I assume it's not also in doubt, despite Guido recently saying "Personally I wish we’d stuck with the GIL"? [0]

[0] https://discuss.python.org/t/pep-805-safe-parallel-python/10...

pansa2··on Does Ruby on Rails still make sense?
One of the guiding principles of Python's design was "code is read much more often than it is written". Today, that's more true than ever.
pansa2··on Teal – A statically-typed dialect of Lua
What difference does AI make? Teal simply gives you the option to add static types to your Lua code, to enable additional compile-time correctness checks.

Surely that’s useful, no matter whether you’re writing the code yourself or having an agent do it.

pansa2··on When did Google get so weird?
I was trying to find the song “Lobachevsky” by Tom Lehrer, but had forgotten both the title and the artist. So I searched for something like “plagiarism song”.

Google told me it was unwilling to help me violate copyright law

pansa2··on A Design Space Exploration of Async/Await
This looks like a really thorough examination of async-await i.e. stackless coroutines, but it doesn’t seem to cover Lua-like stackful coroutines.

Apologies if it does and I’ve glanced over it - but if it doesn’t, is there another resource that compares stackful coroutines to stackless in a similar way?

pansa2··on The Navier–Stokes Millennium Prize Problem
> one should not use LLM services for confidential or proprietary information

That’s obvious, isn’t it? Just like you wouldn’t upload your confidential documents to an online spellchecker, or your proprietary code to an online compiler?

pansa2··on Making a Python interpreter in 1024 bytes
> did you feel that whitespace for lexical scoping made the job of writing the lexer significantly more complex?

Significant indentation requires a more complex lexer because it means the lexical grammar is no longer regular. The lexer can't just be a finite state machine, instead it has to maintain a stack of previous indentation levels.

But I don't think many modern languages have a regular lexical grammar anyway. Without significant indentation, some other features still require the lexer to maintain a stack - e.g. string interpolation (Python's f-strings).

pansa2··on Guido van Rossum on Parallel Python: "Personally I wish we'd stuck with the GIL"
HN wouldn’t allow a direct link for some reason. Here it is:

https://discuss.python.org/t/pep-805-safe-parallel-python/10...

pansa2··on Go 1.27
> almost seems like Go is trying to become some sort of C# or Java Frankenstein

The original Go team was trying to avoid this:

"Java, JavaScript (ECMAScript), Typescript, C#, C++, Hack (PHP), and more [...] actively borrow features from one another. They are converging into a single huge language." [0]

That team has since moved on, and now Go has begun to join that convergence.

The problem is that most programmers seem to want to write Java, more-or-less. New, simpler languages come along, but once they get popular, the pressure is on to turn them into Java-likes. It happened to Python and now it’s happening to Go. It takes a strong will for language maintainers to say “no”, and their language will suffer in popularity as a result - see, for example, Ruby.

[0] https://go.dev/talks/2015/simplicity-is-complicated.slide#5

pansa2··on Mojo 1.0
> I feel like that "full superset of Python" part was part of the appeal of Mojo.

It absolutely was, but IMO was never going to happen. Python has a reputation as a simple language, but it really isn’t. It’s a very complex language hiding behind friendly syntax.

I think once the Mojo team realised that, they had to adjust their expectations.

pansa2··on Mojo 1.0
That’s insane, for a language that seems to be Temu-Python.

OTOH Python itself is the world’s most popular programming language, yet has only recently had the money to support more than a single full-time developer.

pansa2··on Mojo 1.0
I like significant invitation, but I still wouldn’t choose it if I was designing a language today.

Functional-style programming has become much more popular since Python was designed in the 1990s, and there doesn’t seem to be a good way to have Python-like significant indentation and also support true anonymous functions.

pansa2··on Mojo 1.0
> their overall goal is to be a fully native superset of Python

Not any more. That was the initial announcement, but I think then somebody actually looked at Python and realised what a complex language it is - so they refocused on being a Python-like language. Python has a reputation for being a simple language, but in reality it isn’t at all.

pansa2··on Terrence Tao's ChatGPT Conversation about the Jacobian Conjecture Counterexample
Has the conversation that originally led to the counterexample been released? Surely it was similar to this one, also driven by a highly knowledgeable mathematician.

No AI would have been able to find it if asked to "Find a counterexample to the Jacobian conjecture. Make no mistakes".

pansa2··on Pi squared is nearly 10
I always liked the fact that 10! (10 factorial) is exactly the number of seconds in six weeks.

  6 weeks * 7 days * 24 hours * 60 minutes * 60 seconds:

    6 * 7 * 24 * 60 * 60
  = 6 * 7 * (3 * 8) * (4 * 5 * 3) * (3 * 2 * 10)
  = 6 * 7 * 3 * 8 * 4 * 5 * (3 * 3) * 2 * 10
  = 6 * 7 * 3 * 8 * 4 * 5 * 9 * 2 * 10
  = 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10
pansa2··on Linux on Older Hardware: The Complete Revival Guide
What’s a good small laptop that’ll run a recent Linux distro? I’d like to get one to have an ultra-portable machine for doing lightweight development work - I don’t need much more than a text editor and a C compiler.

Would a second-hand 11” MacBook Air or 12” MacBook be a good choice?

pansa2··on LuaJIT 3.0 proposed syntax extensions
So is LuaJIT resuming active development after a decade or so of only maintenance? Great!

A lot of these changes make sense (although some of them are a bit too TIMTOWTDI for my taste) - but perhaps LuaJIT 3 would benefit from a change of name as well? Certainly with all these changes, it would be more like a separate language than merely a JIT-compiled version of Lua.

pansa2··on Changing how we develop Ladybird
Lua is the same IIRC: open source but not open development.

It’s MIT licensed, and the maintainers are always grateful for bug reports, but all the code in the project was written by just 3 people.

pansa2··on The Green Side of the Lua
> The C interface to ruby is just superb.

How does it handle garbage collection? AFAIK GC is the main reason behind Lua's stack-based API: it's designed so that C code never needs to hold a pointer to a Lua object, which means an object will never be garbage-collected while C code is still trying to use it.

OTOH Python does allow C code to hold such pointers - so it requires that code to perform error-prone manual reference-counting.

How does Ruby solve this problem?

pansa2··on The Green Side of the Lua
I guess it alludes to “The Dark Side of the Moon”
pansa2··on Python 3.15: features that didn't make the headlines
Mojo?
pansa2··on Python 3.15: features that didn't make the headlines
`npm isntall`
pansa2··on Mojo 1.0 Beta
> they intended to make it compatible with existing Python code

That was the original claim, but it was quietly removed from the website. (Did they fall for the common “Python is a simple language” misconception?).

Now they promise I can “write like Python”, but don’t even support fundamentals like classes (which are part of stage 3 of the roadmap, but they’re still working on stage 1).

Maybe Mojo will achieve all its goals, but so far has been over-promising and under-delivering - it’s starting to remind me of the V language.

pansa2··on NZ Government to Disestablish the BSA
> New Zealanders are forced to pay a sky high TV licence

There’s no TV license in New Zealand

pansa2··on Executable installer will stop being released with Python 3.16
The PEP for this change is here [0] and discussion of it is here [1]. Both are very long and seem to represent a huge amount of complexity, apparently to make installing Python easier for novices?

But what about those of us who listened to Rich Hickey and prefer "simple" over "easy"? With the executable installer no longer available, how do I get a copy of python.exe, python316.dll etc onto my machine so that `C:\Python316\python.exe <script>` works, without having to think about `py`, `pymanager`, Windows Store etc?

[0] https://peps.python.org/pep-0773/

[1] https://discuss.python.org/t/pep-773-a-python-installation-m...

pansa2··on How to make a fast dynamic language interpreter
In a similar vein, see this page about the performance of the interpreter for the dynamic language Wren: https://wren.io/performance.html

Unlike the Zef article, which describes implementation techniques, the Wren page also shows ways in which language design can contribute to performance.

In particular, Wren gives up dynamic object shapes, which enables copy-down inheritance and substantially simplifies (and hence accelerates) method lookup. Personally I think that’s a good trade-off - how often have you really needed to add a method to a class after construction?

pansa2··on Rubysyn: Clarifying Ruby's Syntax and Semantics
Yes, Smalltalk's syntax fits on a postcard - and it's possible to go even more minimal than that, e.g. Lisp or Forth.

OTOH Ruby doesn't need a postcard, it needs a full poster.

Page 1 of 34Next →