HNHacker News
TopNewBestAskShowJobs

coolreader18

460 karma · joined January 22, 2019

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 ]

submissionscomments
coolreader18··on Hello, HPy
Nice! I've been following HPy for a while, and I'd like to eventually implement it in RustPython[0] (the blockers to doing so are mostly on our part, not theirs). I'm hopeful that this will vastly improve compatibility for native modules for interpreters other than CPython - numpy seems almost impossible to get working in RustPython without something like HPy.

[0]: https://github.com/RustPython/RustPython

coolreader18··on The beauty of the ampersand and other keyboard symbols
I've never seen it used in a programming language, given that non-ascii characters are uncommon and so is ‽ specifically. Maybe they got it confused with a hashbang/shebang (#!)?
coolreader18··on Ohm – A library and language for building parsers, interpreters, compilers, etc.
I mean it's JavaScript, I don't think it's intended for you to write C compilers in it - but for compile-to-JS languages, it's a real asset to be able to run it in the browser, although more and more that can be done with WebAssembly as well. However, look at the project listed as using it - it may not even be for web languages, but just projects that need to parse something.
coolreader18··on Rust 1.51
Creating unaligned references is UB, so it's illegal to take a reference to a packed struct field. However, even if you just wanted to create a raw pointer to that field, you would've had to do `&packed.f2 as *const u16`, which is technically UB since you do create a temporary reference before casting it to a pointer. I'm sure one way to solve that is to just allow that as a special case; say that `&<expr> as *const _` semantically doesn't actually create a reference. But, the way the lang team went is to have a separate macro that transforms `ptr::addr_of!(<expr>)` to something like C's `&<expr>` operator, so that it creates a raw pointer directly instead of a reference.
coolreader18··on rms-open-letter.github.io
Have you looked at the appendix[0]? They seem a bit more than just "problematic".

2013: "There is little evidence to justify the widespread assumption that willing participation in pedophilia hurts children."

2015: "I wish an attractive woman had "abused" me that way when I was 14. I would have learned many important things and had a much happier life."

2016, on Down's syndrome: "If you'd like to love and care for a pet that doesn't have normal human mental capacity, don't create a handicapped human being to be your pet."

2017: "[..] together with the dishonest law that labels sex with adolescents as "rape" even if they are willing, [..]"

To be honest, the parts on transphobia seem a bit overblown; he does seem to be accepting of different gender identities (and even plurality), but still doesn't like the use of they as a singular specific pronoun. However, I just really don't think it's necessary to re-admit someone with those ^ views to the board of an organization.

[0]: https://rms-open-letter.github.io/appendix

coolreader18··on The Magic Kernel
How did Facebook feel about you publishing the algorithm publicly? Specifically the Sharp+ version, as it seems that some part of that originally derived from existing Instagram code. (if I understood it correctly - or was it just an additional sharpening matrix? regardless, it sounds like something they might have wanted to keep proprietary)
coolreader18··on SF poop-testing startup, once compared to Theranos, charged in $60M fraud scheme
"It's like Theranos but if Theranos was legit"

"Wait, no, it's just like Theranos"

coolreader18··on I Want a New Duck (2020)
Well, that's duck typing - looks like a duck, quacks like a duck, it's a Duck[y]. And while it's obviously hard to extrapolate simple examples like `duck_war` to real-world use-cases, I think signatures being different between methods of the same name on different protocols is generally enough to differentiate between them.
coolreader18··on Clio: A functional, distributed programming language that compiles to JavaScript
Hmm, I'm not sure about this at the moment, at least based on the available documentation - the first thing I tried to do was extend the "parallel fib" example to be fully parallel inside `fib` itself[0] but I wasn't able to figure out how to create a `sum :: [int] -> int` function at first (it wasn't clear that arrays are just JS Arrays, and I can just call methods on them) and I'm still not sure why my code doesn't output anything.

[0]: https://clio-playground-pouyae.vercel.app/ with code:

    fn fib n:
      if n < 2: n
      else: [n-1 n-2]
        -> * await |fib|
        -> *
          console.log
          sum

    fn sum arr:
      arr.reduce add 0
    fn add a b:
      a + b

    export fn main args:
      [5 6]
        -> * await |fib|
        -> * item: console.log item
coolreader18··on GitHub, fuck your name change
Not necessarily - Bernie Sanders runs as an independent and just caucuses with the Democrats (same for Angus King, the other independent in the Senate, although he's not of the DSA). However, it doesn't look like anyone in the House is an independent, so maybe Bernie's the only one that does that.
coolreader18··on Rust's type system is Turing-complete (2017)
The comefrom wiki article led me to an april fool's for adding goto/comefrom to Python[0], and. Wow. It's really gross

[0] http://entrian.com/goto/

coolreader18··on Security.txt
A couple of websites/companies that have implemented this (just from checking ones I could think of):

https://www.google.com/.well-known/security.txt

https://www.cloudflare.com/.well-known/security.txt

https://www.reddit.com/.well-known/security.txt

https://github.com/.well-known/security.txt

coolreader18··on Security.txt
I think the text file generation is great - it is a standardized "syntax", so being able to just fill out your info in a webpage and getting the .txt to upload to a server (instead of having to "learn" the couple of keys to use for your values) really does make it painless.
coolreader18··on An Object-Oriented Language for the '20s
Drawable is just a trait, a definition of methods that can be abstracted over. If you wanted to store data, you'd do it in the type that Drawable is actually being implemented for, i.e. MyEntity.

    struct MyEntity {
        cache: RenderingCache,
    }
    impl Drawable for MyEntity {
        fn draw(&self, canvas: &mut Canvas) {
            self.cache.draw_cached(canvas, |cache_canvas| {
                cache_canvas.render(ASSET);
            });
        }
    }
    const ASSET: Asset = load_asset("foo.png");
coolreader18··on mrustc: In-progress alternative Rust compiler (to C)
Oh, nice! I didn't realize that development was still happening for that, I thought it had stopped around Rust 1.20. Glad to see that it's still being developed, stuff like this will definitely be important for bootstrapping/"trusting trust".
coolreader18··on Amazon Sends ‘Vote No’ Instructions to Unionizing Employees
Read TFA - it's not just that Amazon is encouraging workers to vote no, they've set up mailboxes on-site that they're encouraging people to send their ballots with, making union organizers wary that Amazon is trying to keep tabs on who votes, even though it's supposed to be anonymous.
coolreader18··on America's 1% Has Taken $50T From the Bottom 90%
Inequality is bad, actually, and we should try to maintain low levels of it if we're given the chance to.
coolreader18··on Neo-mc – a Midnight Commander fork with scripting and other features
Just something I noticed, the way that "neo" is "spelled" in the README (הϵѻ) would be pronounced /heo/, i.e. "heyo" :)
coolreader18··on Groundhog: Addressing the Threat That R Poses to Reproducible Research
> So is the author committing to never making any backwards incompatible updates to their new package?

Well, yes, probably. It's not all that hard, and groundhog seems to have a fairly simple API anyways.

And groundhog still uses CRAN packages, it just brings a method of pinning them to a specific version.

coolreader18··on Wasmer 1.0
Because the "MVP" stage is itself production ready, which is why it was stabilized in browsers 3 years ago. Also, some non-MVP features are almost stable, e.g. atomics are now enabled on chrome by default IIRC.

WASI, the posix-like system interface ABI, is still technically a "snapshot", which has made me slightly concerned wrt stability given that Rust can compile to WASI even on the stable channel, but hopefully even the full stable version is backwards-compatible with snapshot-1.

coolreader18··on Tokio 1.0 – async runtime for Rust
Those are async tasks

Or rather -- async tasks are as close as you can get to green threads in rust without a runtime that would impose overhead on every program

coolreader18··on A newly discovered body part changes our understanding of the brain (2016)
My first thought was SCP-2828[0]

[0]: http://www.scpwiki.com/scp-2828

coolreader18··on GitHub Dark Mode is too Dark
Yeah, IMO the new dark mode is also way too blue; even with Redshift on it seems weirdly blue.
coolreader18··on Gitter now speaks Matrix
That'll be a nice Hanukkah/early Christmas gift, depending on when it lands :)

Will there ever be a way to show on gitter that a gitter account and a matrix account are the same person? I'm pretty active on gitter right now, and I'd like to choose a homeserver to have an account on so that my messages from the gitter client (logged in with gh) and the messages from a matrix client are from the same user. Would github login allow that?

Edit: also, what's the plan for private/invite-only gitter rooms?

coolreader18··on Self-host your fonts for better performance
Yep, I assumed this was about another Google cancellation. Mods, would it be possible to change the post title to something mentioning font-loading or performance or self hosting? I can't really think of a title myself at the moment.
coolreader18··on How io_uring and eBPF Will Revolutionize Programming in Linux
There's the ringbahn[0] project, which is a couple of layers wrapping the liburing library; it seems like it's presenting itself as an orthogonal runtime to tokio. Meanwhile, looks like tokio is looking into the feasibility of using io_uring[1], though I'm not sure if it would be using ringbahn or not.

[0]: https://github.com/ringbahn

[1]: https://github.com/tokio-rs/tokio/issues/2411

coolreader18··on Starting January 4 Google will block sign-ins from embedded browser frameworks
> A new standalone browser should be a separate case.

Right, but what are the chances google will allow people to sign up with their own user agent with their new browser engine? Or even if that was a feasible thing for them to do, why should _they_ be able to gatekeep that? The security argument is valid, but there should be some web standard or something to address that, not google deciding who gets to read their email depending on the browser they use.

coolreader18··on Introducing the next generation of Mac
I think what they're saying is that they'd expect a $500 price increase to update specs as well.
coolreader18··on Gitter is joining Matrix
I'm hyped for this; RustPython uses gitter as its main communication platform for developers and contributors, and while it's certainly worked quite well for us so far, I was slightly worried the slow pace of development and the deprecation of mobile apps. It seemed (to me, at least, and I don't follow the gitter changelogs or anything - edit: just looked at them now, so yeah, what follows is pretty unfounded. Anyway,) like gitter was sorta becoming a ghost ship, still running along smoothly but not much was happening at the helm -- this also might be because I mainly use the Android app, which is deprecated, so I see very few updates to gitter if any. Anyway, yeah, I think this is a great direction to go for gitter, if only so I'll have an updated mobile app :)
coolreader18··on Wikipedia is getting a new look
You've got the mobile version twice there, I think you probably wanted to remove the "m." from one of them.
← PreviousPage 2 of 5Next →