Better HN
topnewbestaskshowjobs
Log inSign up

coolreader18

460 karma · joined Jan 22, 2019 (7y ago) · 144 submissions

I'm into Rust and programming languages/compilers.

I'm a core developer of RustPython (https://github.com/RustPython/RustPython).

https://github.com/coolreader18

email: coolreader18 AT gmail DOT com

[ my public key: https://keybase.io/coolreader18; my proof: https://keybase.io/coolreader18/sigs/Su2GDvjtDUUEwvoh46jH6urxEk39D7-LCSgTRN5v56s ]

Submissions

comment 6y ago · link · parent

Hub[1], the previous Github CLI, was written in Go too, so I don't think this is much of a surprise.

[1]: https://github.com/github/hub

comment 6y ago · link · parent

Others have mentioned "arbitrary binary data", but a concrete example of that (that I know of, not that would be particularly useful to pass around) is the WASM bytecode format: it starts with '\0ASM', using the NUL byte to signify to tools reading it that it isn't text and they shouldn't attempt to display it (or anything like that). However, it is a _byte_code format, and as such, it would be represented with a `char*` pointer in C. Yet, any APIs that use NUL terminated [byte]strings would stop at the very first byte, and not keep any more data beyond than that.

comment 6y ago · link · parent

I'm not sure why people are saying it would make executables harder to write; it could most easily be done with environment variables as opposed to modifying the signature of `int main()`. Something along the lines of: `GLOBLESS_ARGC=5` means that `GLOBLESS_ARG{0..4}` have the original arguments as supplied by the shell user.

comment 6y ago · link · parent

Name"cheap"

comment 6y ago · link · parent

Wow, that's really neat! I sometimes hesitate to save something because I think "when would I really come back to this?" But this would probably get me to save more things that I find interesting.

comment 6y ago · link · parent

Relevant: Ndless[1], a jailbreak for TI-Nspire calculators (Nspire {CX ,}{CAS,}). I've played around with the source code[2] as well as compiling Rust[3], Nim[4], and Zig[5] to target it. It's all pretty neat, there's a gba emulator for the TI-Nspire floating around somewhere as well.

[1]: https://ndless.me

[2]: https://github.com/ndless-nspire/Ndless

[3]: https://github.com/coolreader18/rsspire

[4]: https://github.com/coolreader18/Nim/tree/tinspire

[5]: https://github.com/coolreader18/zigspire

comment 6y ago · link · parent

You could also do `__import__("/abs/path/to/python.py")` (I think, I'm not completely sure on the rules for passing paths to `__import__`)

comment 6y ago · link · parent

It looks like there is/was one, but it was abandoned by its developers:

https://github.com/jet/JsonSchemaProvider

https://medium.com/jettech/json-schema-type-provider-why-we-...

comment 6y ago · link · parent

Not necessarily, but I just found it interesting that it wasn't really anything all that crazy - it could in theory be possible to encounter this in a big enough code base that makes heavy use of coroutines and custom exception types.

100.

Make CPython segfault in 5 lines of code(gist.github.com ↗)

130 points · by coolreader18 · 6y ago · 75 comments

comment 6y ago · link · parent

There already is a compiler from wasm to asm.js, so I assume it wouldn't be too difficult to go from wasm to more typical js.

comment 6y ago · link · parent

How is that any more readable than deobfuscated js?

    func1500(func3444(var7, var9), var7)
or more likely:

    gw(kl(s,i),s)

comment 7y ago · link · parent

Wow, what a great distraction for students to have during finals season! ;)

comment 7y ago · link · parent

v5 is supposedly coming soon; it was supposed to be ready by the end of October[0].

[0] https://github.com/k0shk0sh/FastHub/pull/2599

comment 7y ago · link · parent

I can't connect to this page, as Firefox is automatically redirecting me to the HTTPS version of the page even though it's not supported. I guess I don't run into this that often given how common HTTPS is, but maybe someone else has this problem with this site? If you are, have you fixed it before? I've tried all of the methods mentioned on this[0] page, and I'm on Firefox 70 on Linux Mint.

[0]: https://stackoverflow.com/questions/30532471/firefox-redirec...

comment 7y ago · link · parent

Wow, so what does this imply? Is this a coup d'état or just a _request_ for Stallman to cede part of his leadership to more people?

comment 7y ago · link · parent

Reminds me of XKCD's Significant comic: https://xkcd.com/882/

comment 7y ago · link · parent

> in which case it was evidence that administering male hormones may not produce the effect of natural ones.

The goal of trans hormone therapy is to reverse the effects of the hormones of the person's biological sex, so HRT dosage of e.g. testosterone is usually more than the average cis man would produce. It's possible that that much testosterone was too much for the person you mentioned to handle, especially for his body not being used to it, or that he just got prescribed for more than he should have taken. (He could've also gotten it from the black market, in which case it would almost definitely be an incorrect dosage.)

109.

The Linguistic Genius of Prairie Dogs (2015)(animalcognition.org ↗)

8 points · by coolreader18 · 7y ago · 1 comment

comment 7y ago · link · parent

The image is still up at imgs.xckd.com: https://imgs.xkcd.com/comics/disappearing_sunday_update.png

comment 7y ago · link · parent

https://thenib.com/mister-gotcha

comment 7y ago · link · parent

I mean, society is likely going to collapse within the next 50 years due to destroying the environment. This isn't just a feel-good, virtue-signaling issue, there are actual reasons to want to not harm the environment. Like you say, though, whatever the next bad thing is will also be bad, so it's very hard to actually make a difference.

comment 7y ago · link · parent

I think they were making a joke.

comment 7y ago · link · parent

I can't tell if you're joking or not, but that's not a bug, that's just what happens in some versions of Tetris.

comment 7y ago · link · parent

Because it's a pure port of Vim, which is written in C.

comment 7y ago · link · parent

Could you elaborate?

comment 7y ago · link · parent

Correct, I'll make that more clear.

comment 7y ago · link · parent

An Android (Moto Z3), which I chose because I preferred it to an iPhone, and, more recently, because Android is slightly more open-source than iOS.

comment 7y ago · link · parent

> But the jailbroken phone comes with iOS and the custom Android home screen doesn't.

Right, I'm saying that it's not as much about the actual features or capabilities of the phones, but just that iPhones are cooler.

12345