|
CPColin posted:What we really need is just-in-time code deletion that deletes your code right before you try to run it so we can all finally be free from touching computer you are thinking of vigil
|
# ? Jan 11, 2024 02:35 |
|
|
# ? May 17, 2024 06:38 |
CPColin posted:What we really need is just-in-time code deletion that deletes your code right before you try to run it so we can all finally be free from touching computer It needs to delete the code right before you try to save it
|
|
# ? Jan 11, 2024 02:36 |
|
Dijkstracula posted:also the notion of "copy-and-patch JIT"s sound a heck of a lot like the so-called copy-and-annotate binary translation techniques that were popular back in the day, perhaps you would like to learn more starting at about the 15 minute mark of https://www.infoq.com/presentations/dynamic-analysis-tools/ fwiw the paper https://dl.acm.org/doi/pdf/10.1145/3485513 has this as the contributions quote:Our contributions are: and they do cite "Optimizing direct threaded code by selective inlining" in 1998 https://dl.acm.org/doi/10.1145/277650.277743 it's kinda not the same but yeah it ain't that different either
|
# ? Jan 11, 2024 02:42 |
|
if time is a flat circle then i'd like to see a resurrection of tracing JITs because that was some absolutely poo poo and i loved it. at least if i understood the concept correctly (i read about it a bit in rpython's implementation notes around uhh 10 years ago? but the implementation seems to have changed or at least the docs have)
|
# ? Jan 11, 2024 03:14 |
|
what if using an llm to predict what code paths would be optimised by a tracing jit
|
# ? Jan 11, 2024 03:45 |
|
gently caress I might have to pitch this idea to my phd advisor
|
# ? Jan 11, 2024 03:45 |
|
Dijkstracula posted:gently caress I might have to pitch this idea to my phd advisor [sprays u with water bottle]
|
# ? Jan 11, 2024 04:22 |
|
Dijkstracula posted:what if using an llm to predict what code paths would be optimised by a tracing jit a non-deterministic jit that requires tens of gigabytes of RAM, a beefy GPU, and can emit instructions at a few hundred bytes per second sounds like a perfect fit for python
|
# ? Jan 11, 2024 04:52 |
|
Dijkstracula posted:what if using an llm to predict what code paths would be optimised by a tracing jit my 4090 is ready for your poc
|
# ? Jan 11, 2024 05:04 |
|
akadajet posted:my 4090 is ready for your poc please, no roleplay in the thread
|
# ? Jan 11, 2024 05:36 |
|
just feed your python program into chatgpt and ask it to rewrite it in assembly
|
# ? Jan 11, 2024 06:18 |
|
Dijkstracula posted:also the notion of "copy-and-patch JIT"s sound a heck of a lot like the so-called copy-and-annotate binary translation techniques that were popular back in the day, perhaps you would like to learn more starting at about the 15 minute mark of https://www.infoq.com/presentations/dynamic-analysis-tools/ also seems similar to what i remember about apple's 68k emulators for powerpc mac the first gen 68k emulator was a simple interpreter - figure out the current instruction's opcode, jump to the appropriate handler function, repeat. was enough to get first generation powerpc macs out the door with reasonable performance they went on to do a second gen 68k emulator which built upon this foundation by supporting copying-and-modifying instruction handlers into a JIT cache so that frequently executed loops and functions which fit in the cache didn't have to suffer the overhead of software 68k decode this was all in the early 1990s
|
# ? Jan 11, 2024 08:08 |
|
Sapozhnik posted:if time is a flat circle then i'd like to see a resurrection of tracing JITs because that was some absolutely poo poo and i loved it. at least if i understood the concept correctly tracing works great if you have very few deviations from the hot path, very fast transitions between generated code and the interpreter and ideally a language that isn’t insanely dynamic. I learned the hard way that it wasn’t a good fit for JS (as-benchmarked-at-the-time at least) with the resources we had available to us, but the luajit2 alien science worked out pretty well for Mike Pall I’d love to give it another try with a V8/Chakra-sized team and a saner timeline
|
# ? Jan 11, 2024 17:08 |
|
how does luajit compare to the python jit described in the article? I don't know anything about jit compilers but I've done a bit of lua 5.1 and it was pretty nice to use
|
# ? Jan 11, 2024 17:19 |
|
luajit did some type specialisation iirc, this one's more "hey, what if instead of calling a c function per bytecode, we jammed the c code together and made a c-function per python function" there's gonna be some speedup, without a lot of overhead or startup costs, it's alright
|
# ? Jan 11, 2024 17:29 |
|
luajit did type and value specialization, including inlining custom versions of calls to things like `sin`. and of course it did all the inlining that is the real prize of tracing. it was a very aggressive JIT in that sense, and I was continuously jealous of it while working on ours (I don’t think Williams was involved but it’s where the Citeseer link went. it’s impossible to google for the paper because it’s the test document for pdf.js and probably the most widely viewed CS paper in history for that reason!)
|
# ? Jan 11, 2024 17:49 |
|
Subjunctive posted:luajit did type and value specialization, including inlining custom versions of calls to things like `sin`. and of course it did all the inlining that is the real prize of tracing. it was a very aggressive JIT in that sense, and I was continuously jealous of it while working on ours wont this just loop through the primes array once, hitting continue each time, and do nothing?
|
# ? Jan 11, 2024 17:55 |
|
Carthag Tuek posted:wont this just loop through the primes array once, hitting continue each time, and do nothing? yeah, I think the caption is wrong and it should be “true” for the initialization I think that was fixed for the PLDI version, but that’s behind a paywall and I could only find the preprint
|
# ? Jan 11, 2024 18:01 |
|
thanks folks!
|
# ? Jan 11, 2024 18:02 |
|
Subjunctive posted:yeah, I think the caption is wrong and it should be “true” for the initialization would be funny if its still there lol
|
# ? Jan 11, 2024 18:03 |
|
Carthag Tuek posted:would be funny if its still there lol I’m trying to grab a copy to check! wouldn’t be the first such thing in a paper I’ve read, but the first in one I wrote I’ve only written that paper
|
# ? Jan 11, 2024 18:08 |
|
oh yeah, now i remember. the cool thing about the pypy tracing jit was that the action of the interpreter loop itself was part of the trace i skimmed a paper a while back about cracking denuvo using similar techniques, like write an interpreter for the obfuscated vm, trace the interpreter, then run the traces through e.g. LLVM's optimizer to figure out just what the hell it is doing. sounds like an interesting approach.
|
# ? Jan 11, 2024 20:16 |
|
Python didn't have a JIT this whole time?
|
# ? Jan 11, 2024 23:05 |
|
I want to jit python... ...par la fenêtre!!!
|
# ? Jan 11, 2024 23:27 |
|
mainline Python didn’t, no Instagram had an AOT compiler called Cinder for their app pypy is a tracing JIT but afaik it’s neither completely compatible nor suitable for production deployment Guido for a long time pushed back on JITs because it would complicate the runtime too much, if my hazy memory is correct (his belief is correct of course, but its complexity worth taking IMO) people dealt with Python’s performance (and threading!) limitations by just punting everything to modules written in C
|
# ? Jan 11, 2024 23:27 |
|
there are like half a dozen different python jits in various levels of bitrot, but the primary python implementation, cpython, has always been amateurish and bad
|
# ? Jan 11, 2024 23:28 |
|
wasn’t there something in the mailing lists recently about better multiprocessing/threading support coming to cpython finally? maybe im hallucinating
|
# ? Jan 11, 2024 23:32 |
|
Arcteryx Anarchist posted:wasn’t there something in the mailing lists recently about better multiprocessing/threading support coming to cpython finally? maybe im hallucinating
|
# ? Jan 11, 2024 23:35 |
|
here's the pep for gil removal https://peps.python.org/pep-0703/
|
# ? Jan 11, 2024 23:37 |
|
the GIL removal is a heroic project, just amazing persistence and thoroughness
|
# ? Jan 11, 2024 23:47 |
|
Maybe they should just write a new language instead. They could call it (shaggar voice) c#
|
# ? Jan 12, 2024 00:12 |
|
there was a Python implementation on top of the CLR, but it didn’t have compatibility with the world of C extensions so nobody took it seriously. I think it was IronPython?
|
# ? Jan 12, 2024 00:14 |
|
mystes posted:Maybe they should just write a new language instead. They could call it (shaggar voice) c# shaggar’s not wrong about it
|
# ? Jan 12, 2024 00:17 |
|
Subjunctive posted:there was a Python implementation on top of the CLR, but it didn’t have compatibility with the world of C extensions so nobody took it seriously. I think it was IronPython? but yeah without extension compatibility there isn't much point
|
# ? Jan 12, 2024 00:23 |
|
wasn't there an ActiveScripting version of Python, for your IE4 web page needs?
|
# ? Jan 12, 2024 00:42 |
|
pseudorandom name posted:wasn't there an ActiveScripting version of Python, for your IE4 web page needs? we had the ability to use Python to write components for Mozilla, but we never exposed it to the web because Jesus Christ would that be bad I assumed the ActivePython stuff didn’t work in IE either but maybe if the page had enough privileges. if they can load ActiveX the game is over anyway
|
# ? Jan 12, 2024 01:49 |
|
mystes posted:Maybe they should just write a new language instead. They could call it (shaggar voice) c# p#
|
# ? Jan 12, 2024 02:45 |
|
see a doctor, buddy
|
# ? Jan 12, 2024 02:45 |
|
Subjunctive posted:see a doctor, buddy
|
# ? Jan 12, 2024 03:05 |
|
|
# ? May 17, 2024 06:38 |
|
Subjunctive posted:see a doctor, buddy lol
|
# ? Jan 12, 2024 03:30 |