Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ahgamut
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
ahgamut
4y ago
A while back I was wondering if I could have J-style notation for handling arrays on GPU. This lets me do that, and the Python/Numpy interface is a wonderful bonus. Awesome implementation! A few exploratory questions: 1. I've writ
32.
▲
by
ahgamut
4y ago
https://github.com/ahgamut/cpython/tree/cosmo-djngo Python 3.11.0rc1, Django 4.1.7. I think ingenieroariel also has a binary available on the website. It's a proof-of-concept (because I wrote it just a f
33.
▲
by
ahgamut
4y ago
FWIW I imagine we could have added Django to `python.com` sometime last September, which is when I ported Python 3.11.0rc1 (with threads!) to Cosmopolitan Libc: https://github.com/ahgamut/cpython/tree/cosmo_py
34.
▲
by
ahgamut
4y ago
ah, here we are: https://github.com/ahgamut/php-src/tree/cosmo_php81 (note it's an experimental port, I just put it together).
35.
▲
by
ahgamut
4y ago
Adding on to jart's answer -- I ported PHP 7.3 back in July 2021 (building on alganet's work), and got up to a simple "hello-world". Have never used PHP, so I didn't know what else could be done with it at the time.
36.
▲
by
ahgamut
4y ago
I liked reading the different implementations of the low-level tensor ops (simple C/AVX/AVX2/WASM128bit/ARM-NEON) -- it will help me learn about how to use x86 ASM. Thank you for writing this! Do you have any other recom
37.
▲
by
ahgamut
4y ago
There are many wonderful tools that help understand what our code is doing (compiler explorer, gdb, valgrind, ftrace, perf record, strace, ASAN/UBSAN). I wrote this blog post because using the debugging tools with Cosmopolitan Libc hel
38.
▲
by
ahgamut
4y ago
You run the executable as usual, and if it crashes, Cosmopolitan Libc's crash handler starts gdb for you with a nice TUI and all the information you need to work with. Probably you could set up a bunch of macros in your editor that do
39.
▲
Debugging C with Cosmopolitan Libc
(ahgamut.github.io)
191 points
by
ahgamut
4y ago
|
50 comments
40.
▲
by
ahgamut
4y ago
From TFA, the goal is to "explore whether there's a way we can evolve C++ itself to become 10x simpler, safer, and more toolable". First let's look at "toolable": My big issue with Modern C++ these days is not
41.
▲
by
ahgamut
4y ago
Good catch! I updated the post to mention the six operating systems (Linux, Windows, MacOS, FreeBSD, NetBSD, OpenBSD).
42.
▲
Rust is actually portable
(ahgamut.github.io)
355 points
by
ahgamut
4y ago
|
103 comments
43.
▲
by
ahgamut
4y ago
Nice idea! IIRC redbean has the `LaunchBrowser` function ( https://redbean.dev/2.0.html#LaunchBrowser ) to open the user's default browser, and the `cosmo` module in Python is exactly for providing Cosmopolitan Libc good
44.
▲
by
ahgamut
4y ago
Follow the Cosmopolitan Libc project (also consider supporting and/or contributing to it), these things are on track to happen soon :) TLS will probably happen first -- Cosmopolitan already has mbedTLS for redbean, so a modified `_ssl.
45.
▲
by
ahgamut
4y ago
I got interested in APEs because I got lost in DLL hell a few times with PyInstaller lol. IMO PyInstaller is pretty cool, but a bit overkill sometimes. At present I find APE Python a perfect match for one big use case (a bunch of my thrown-
46.
▲
by
ahgamut
4y ago
I wanted Python to work across at least Windows/Linux because I have a bunch of these tiny scripts that I keep running everywhere. (For example, I always use `python.com -m http.server` when I want to share files in the local network w
47.
▲
by
ahgamut
4y ago
Yup, this is one big reason why I wanted Python to be Actually Portable -- I have a bunch of tiny scripts that are slightly complex for sh (some of them were Windows CMD .BAT files lol) which I like to use everywhere. By building Python wit
48.
▲
by
ahgamut
4y ago
Cosmopolitan Libc allows you to build programs that run on six operating systems (Linux, Mac, Windows, FreeBSD, NetBSD, OpenBSD). I ported Python 2.7.18 and 3.6.14 to build on Cosmopolitan Libc because I wanted to have the same Python execu
49.
▲
by
ahgamut
4y ago
Request to change the title to "Python is Actually Portable", as the blog post describes what I did to port Python 2.7/3.6 to Cosmopolitan Libc. Edit: thank you @dang! That was super fast!
50.
▲
by
ahgamut
5y ago
> I would actually be more impressed if it understood enough about programs to be able to mimic higher-level structure without just memorizing text. Agreed. > Why do you think Python isn't good for comparing program structure? Fr
51.
▲
by
ahgamut
5y ago
> It does not seem to be copying from the training data in any meaningful way. My point is, I would like to verify this claim with different metrics, because we probably have different interpretations of the word "meaningful".
52.
▲
by
ahgamut
5y ago
> To evaluate CoPilot, we should ask questions that are unusual enough they can't be answered through regurgitation of the training corpus. Exactly! It's great that Copilot can generate correct code for a given question, but w
53.
▲
by
ahgamut
5y ago
Thank you so much!
54.
▲
by
ahgamut
5y ago
Could you provide some papers/link related to Inductive Logic Programming? I'd like to look at other techniques in this space.
55.
▲
by
ahgamut
5y ago
The Turing Test ( https://en.wikipedia.org/wiki/Turing_test ) for artificial intelligence required the machine to convince a human questioner that it was a human. Since then, most AI methods rely on a human reference of
56.
▲
by
ahgamut
5y ago
> How many human beings do you personally know who were able to solve a dynamic programming problem at first sight without ever having seen anything but greedy algorithms? Zero, which is why if a trained network could do it, that would b
57.
▲
by
ahgamut
5y ago
> They tested it on problems from recent contests. The implication being: the statements and solutions to these problems were not available when the Github training set was collected. Yes, and I would like to know how similar the dataset
58.
▲
by
ahgamut
5y ago
I find almost every new advance in deep learning is accompanied by contrasting comments: it's either "AI will soon automate programming/<insert task here>", or "let me know when AI can actually do <some-dif
59.
▲
by
ahgamut
6y ago
You can compile it yourself if you like. I created a fork of the Lua Github mirror and made the necessary changes to compile with Cosmopolitan: https://github.com/ahgamut/lua/tree/cosmopolitan
60.
▲
by
ahgamut
6y ago
I'm the author of the blog post! As someone who has never messed around with Libc-level programming, it was surprisingly straightforward (and exciting!) to compile Lua all the way. Cosmopolitan is incredible, thank you so much.
More ›