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 5y ago · link · parent

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

comment 5y ago · link · parent

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 (#!)?

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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

comment 5y ago · link · parent

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)

comment 5y ago · link · parent

"It's like Theranos but if Theranos was legit"

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

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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/

comment 5y ago · link · parent

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

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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");

comment 5y ago · link · parent

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".

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

Inequality is bad, actually, and we should try to maintain low levels of it if we're given the chance to.

48.

American Cheese Vaults (2020)(weaselle.tumblr.com ↗)

2 points · by coolreader18 · 5y ago · discuss

comment 5y ago · link · parent

Just something I noticed, the way that "neo" is "spelled" in the README (הϵѻ) would be pronounced /heo/, i.e. "heyo" :)

50.

Why a $15 minimum wage is pretty safe(noahpinion.substack.com ↗)

1 points · by coolreader18 · 5y ago · discuss

comment 5y ago · link · parent

> 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.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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

comment 5y ago · link · parent

My first thought was SCP-2828[0]

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

comment 5y ago · link · parent

Yeah, IMO the new dark mode is also way too blue; even with Redshift on it seems weirdly blue.

comment 5y ago · link · parent

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?

comment 5y ago · link · parent

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.

comment 6y ago · link · parent

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

comment 6y ago · link · parent

> 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.

comment 6y ago · link · parent

I think what they're saying is that they'd expect a $500 price increase to update specs as well.
12345