Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ahgamut
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
ahgamut
1y ago
My early contributions to https://github.com/jart/cosmopolitan were focused towards getting a single-file Python executable. I wanted my Python scripts to run on both Windows and Linux, and now they do. To try out Pyth
2.
▲
by
ahgamut
2y ago
most likely before v2 as well. The original post is from July 2021, which is a bit after Cosmopolitan Libc's v1 IIRC.
3.
▲
by
ahgamut
2y ago
My 4-core computer's probably building Cosmopolitan Libc in the background + the Python binary is 2.7 unoptimized. This blog post is originally from 2021.
4.
▲
by
ahgamut
2y ago
I've tried nuitka before, and a recent question that occurred to me was: does nuitka have an option to output just C files? Something like: python -m nuitka example.py --no-compile Might be interesting to see if the above is pos
5.
▲
by
ahgamut
2y ago
Hey, this is my post from 2021, when I was testing Python2.7 and Python3.6 with Cosmopolitan Libc on an old 4-thread Haswell. It's now a lot easier to build Python (and gcc, gnu coreutils, curl etc.), and the binaries are faster, multi
6.
▲
by
ahgamut
3y ago
> new methods of communication with the compiler have been established. From what I understand, this appears to a be separate binary from GCC/Clang that does static analysis and outputs C99. Can this be a GCC plugin? I know we can w
7.
▲
by
ahgamut
3y ago
> Instead, many have deeply underestimated LLMs, saying that after all they were nothing more than somewhat advanced Markov chains, capable, at most, of regurgitating extremely limited variations of what they had seen in the training set
8.
▲
by
ahgamut
3y ago
What packages do you use in your app? If you're not using too many C extensions, it may be possible to build your app with Cosmopolitan.
9.
▲
by
ahgamut
3y ago
Try it out! We got Lua/LuaJIT, Python, PHP, and Rust building (the latter two are not fully automatic yet), so Ruby might be possible even now.
10.
▲
by
ahgamut
3y ago
https://github.com/ahgamut/rust-ape-example My above repo contains example with the Rust standard library that build as fat executables with Cosmopolitan Libc. I also got ripgrep to build https://github.com&
11.
▲
by
ahgamut
3y ago
Yes, so pip works because the Python APE has OpenSSL built-in. pip install requires modifying the APE, so I end up installing pure-Python libraries as follows: mkdir Lib ./python -m pip download httpx unzip ./*.whl -
12.
▲
by
ahgamut
3y ago
The "/zip/" folder refers to the ZIP store inside the actually portable executable -- you can run `unzip -vl ./python` to see what's inside. Also, to add new pure-python packages, you just need to unzip them in
13.
▲
by
ahgamut
3y ago
Thank you Gregory for writing this post. There have been a bunch of announcements about "setup.py has been deprecated", but few have clearly outlined how to move away from setup.py, and more importantly, fewer have outlined what a
14.
▲
by
ahgamut
3y ago
One of the comments in the OP: I believe the problem is that bridge in the US (not true in some other countries) lacks a "critical mass" of 20 and 30 somethings. I like to play bridge, but all the people I have asked in my
15.
▲
by
ahgamut
3y ago
"Python 4, but not really", because we want to squeeze out more multithreading performance and be cool again. Some questions from reading the OP: - How much does performance improve due to this No-GIL thing? Is it greater than 2x?
16.
▲
by
ahgamut
3y ago
I had tried to build a bunch of different codebases (git, bash, gcc, curl etc.) before trying busybox, and I'd never seen code like that before. Plus that error came alongside a compiler error in my patch that took a long time to debug
17.
▲
by
ahgamut
3y ago
New constants do make compilation a lot easier, but my personal opinion is that the overhead to convert to/from the old constants during runtime is too much. Look at the list of constants here: https://github.com/jart&#
18.
▲
by
ahgamut
3y ago
> I highly doubt many would be willing to rewrite the world to make some "clever hack" work. I specifically wanted to avoid rewriting the world in order to port established codebases like git/curl to Cosmopolitan Libc. My
19.
▲
by
ahgamut
3y ago
Yeah I found out I got banned when attempting to comment about this blog post. I rarely comment on online forums anyway, because I find I don't know enough to comment about most topics. IIRC over the last year, I've only commented
20.
▲
by
ahgamut
3y ago
Right now I use the gcc, git, vim, and ninja APE binaries on my local system for daily work, and so far I have seen no visible regressions. I agree with you though -- an extensive testing setup will reveal more things for improvement, be it
21.
▲
by
ahgamut
3y ago
Reading the GCC source code was fun and educational, and I'd love to find out if this could patch make it into GCC. Haven't discussed it with any of the GCC developers yet. In the meantime, the Cosmopolitan Libc monorepo contains
22.
▲
by
ahgamut
3y ago
I haven't used Nim much, but I remember a repo on Github had setup a build script for compiling Nim with Cosmopolitan Libc. https://github.com/Yardanico/cosmonim This gcc patch makes such build scripts simpler, be
23.
▲
by
ahgamut
3y ago
I did that last year :) https://github.com/ahgamut/rust-ape-example Also got ripgrep to work: https://github.com/ahgamut/ripgrep/tree/cosmopolitan Might need to update the build scripts
24.
▲
by
ahgamut
3y ago
I added a comment mentioning this, but it hasn't changed yet. I expect it will change soon. Perhaps I can ping @dang from here?
25.
▲
by
ahgamut
3y ago
SIGILL is for "illegal instruction", according to https://man7.org/linux/man-pages/man7/signal.7.html I too thought it was a typo when I caused it to occur while building BLIS, but then I found out
26.
▲
by
ahgamut
3y ago
Yes, I have gotten busybox to build successfully, but at present it's not as nice as bash or vim. I expect someone will write a better build script soon enough. Maybe it will be you! The default build parameters in busybox make a lot o
27.
▲
by
ahgamut
3y ago
Dereferencing the runtime symbol with a function sounds interesting! If you can show me an example of where it works, I'd be happy to try it out. I like the if-else-goto arrangement because it fit in perfectly with the other parts of g
28.
▲
by
ahgamut
3y ago
You can build software like vim, emacs, ninja, bash, git, gcc etc -- here's a list of software I got to build with this technique: https://github.com/ahgamut/superconfigure The superconfigure script is just a wrap
29.
▲
by
ahgamut
3y ago
I wrote this post: the title should be "Patching GCC to build Actually Portable Executables", because it refers to Cosmopolitan Libc and jart's Actually Portable Executable format. With my gcc patch, you can now build softwar
30.
▲
Patching GCC to Build Actually Portable Executables
(ahgamut.github.io)
9 points
by
ahgamut
3y ago
|
1 comments
More ›