News for hackers. Stuff that matters.
Re:Show HN: ZFS Implementation in Python by cure on Saturday May 04, 2019 @01:55PM (#19828036)
PyPy is faster than Python, yes. But Go, C and many other (compiled) languages are way faster than PyPy. Plus, if you use a language like Go or Rust then you avoid Python's GIL and you'll have much more reasonable memory usage. Best of all, deploying is a matter of copying a binary, rather than having to deal with the absolute disaster that is Python packaging.
Re:Show HN: ZFS Implementation in Python by deaddodo on Sunday May 05, 2019 @05:16AM (#19831897)
> Plus, if you use a language like Go or Rust then you avoid Python's GIL

No, but then you run into Go's GC and green threads. File systems fit squarely in the realms of "systems programming" (old definition [1], not new). Languages like Ada, Pascal, C/C++, Rust and D (without GC).

[1] - https://en.wikipedia.org/wiki/System_programming_language

Re:Show HN: ZFS Implementation in Python by klyrs on Saturday May 04, 2019 @06:01PM (#19829663)
Filesystem with a GIL, what could possibly go wrong? /s
Re:Show HN: ZFS Implementation in Python by emmelaich on Saturday May 04, 2019 @11:37PM (#19830981)
A lot less will go wrong than a filesystem without a GIL.

GIL is for safety and correctness, not speed.

Re:Show HN: ZFS Implementation in Python by y4mi on Sunday May 05, 2019 @03:48AM (#19831691)
Uh, no?

Python's global interpreter lock was added for single threaded speed and c library integrations, which often can't be used multithreaded

There was some talk about removing it recentlish to improve pythons multithreaded performance and Guido said something along the lines of

> "I'll remove it as long as single threaded performance doesn't suffer"

Which nobody succeeded in

Re:Show HN: ZFS Implementation in Python by nine_k on Saturday May 04, 2019 @06:52PM (#19829895)
Go? A GC'd language in kernel? (Well, yes, this has been done, from Lua to Haskell, but only experimentally.)
Re:Show HN: ZFS Implementation in Python by hu3 on Saturday May 04, 2019 @07:34PM (#19830072)
I wouldn't advise writing low level stuff in Go but people do enjoy a challenge from time to time: https://news.ycombinator.com/item?id=18399389
Re:Show HN: ZFS Implementation in Python by pjmlp on Sunday May 05, 2019 @05:08AM (#19831872)
I wouldn't consider the workstations sold by Xerox, TI, Connecting Machines, the OS research department at ETHZ or the Microsoft’s natural language search service for the West Coast and Asia, just experiments.
Re:Show HN: ZFS Implementation in Python by weberc2 on Saturday May 04, 2019 @09:03PM (#19830436)
Python is also a GC’d language...
Re:Show HN: ZFS Implementation in Python by twa927 on Sunday May 05, 2019 @05:23AM (#19831917)
CPython is mostly reference-counted.
Re:Show HN: ZFS Implementation in Python by int_19h on Sunday May 05, 2019 @09:00PM (#19836093)
With a synchronous garbage collector for cycles. Which is like the worst of both worlds, since you get the constant overhead of refcounting, plus unpredictable interruptions of unspecified duration that can happen every time a new object that might contain references to other objects is created.

To be fair, the GC can be disabled. But it's only safe to do so when you know there are no cycles, and even when such guarantee can be had for your own code, I've never seen a library guarantee that to API clients.

Re:Show HN: ZFS Implementation in Python by BlackFingolfin on Sunday May 05, 2019 @07:43AM (#19832321)
And reference counting is a form of GC
Re:Show HN: ZFS Implementation in Python by fnord123 on Sunday May 05, 2019 @06:29AM (#19832100)
>PyPy is faster than Python, yes.

Python is only slow if you use it wrong:

https://apenwarr.ca/diary/2011-10-pycodeconf-apenwarr.pdf