Advertisement · 728 × 90

Posts by russell

the only meaningful difference is that scheduling is cooperative. state machines are an implementation detail that is completely irrelevant to the programming model, and there's no reason you couldn't have implemented the programming model with e.g. fixed-size stacks and normal codegen

1 month ago 1 0 0 0
Preview
RFC: remove `do` · Issue #10815 · rust-lang/rust I started a mailing list thread on this topic about a week ago; in the first post I summarised the situation. I'll quote it here verbatim: (Do I win the prize for the shortest thread name yet?) err...

fun fact: rust had this but removed it before 1.0: github.com/rust-lang/ru...

1 month ago 2 0 0 0

the interesting case is when it's *not* in an array and you can reuse the trailing padding

1 month ago 5 0 1 0
Post image

hear me out

1 month ago 0 0 1 0

has anyone written the AI blub paradox yet

3 months ago 2 0 0 0

this sort of post indistinguishable from the coworker who just learned Lisp or Haskell and is convinced they are now capable of stunning feats of productivity or reliability and must exclaim this fact to the world in the same breath as they deride the non-believers for not jumping onboard.

3 months ago 24 4 2 2

the proposals I've seen for actually adding negative bounds also tend to approach that by removing "excluded middle" style reasoning from the solver.

so if T merely lacks `impl Tr` you don't get `T: !Tr`. you need `impl !Tr for T` to get `T: !Tr`, and then it's a commitment *never* to impl it

6 months ago 1 0 0 0

something I haven't seen in the thread yet is that this would introduce a bunch of unnecessary duplication at codegen time, because rust doesn't have a way to erase type parameters

6 months ago 1 0 0 0
Advertisement

rust does currently default it to (), but due to the possibility of uninitialized values (important for rust's niche) it is not true that nothing ever needs the concrete type.

they went to change the default to ! when upgrading it to a real type (it wasn't before!) and had to do it over an edition

6 months ago 1 0 0 0
Preview
Haskell pre-monadic I/O I wonder how I/O were done in Haskell in the days when IO monad was still not invented. Anyone knows an example. Edit: Can I/O be done without the IO Monad in modern Haskell? I'd prefer an example...

This is how Haskell worked before the IO monad: stackoverflow.com/a/17004448

6 months ago 0 0 0 0

CHATGPT: I understand where you're coming from. You worked really hard to get here, and now it's time to enjoy the fruit of your labors.

ISILDUR: So I should keep it? Elrond says I shouldn't

CHATGPT: The ring is precious. Sometimes friends don't have your best interests at heart.

ISILDUR: true

6 months ago 10878 3082 39 40
Post image

lol

6 months ago 4379 1319 33 41
It is the invincible meme based on the "look at what it takes to mimic our power" scene

The top panel is "look at the cow" with a scene from Harvest Moon 64 

The second panel says "moooo" with a close up of the cow

Harvest moon 64 is a well-known and loved Nintendo 64 game much like Quest 64

It is the invincible meme based on the "look at what it takes to mimic our power" scene The top panel is "look at the cow" with a scene from Harvest Moon 64 The second panel says "moooo" with a close up of the cow Harvest moon 64 is a well-known and loved Nintendo 64 game much like Quest 64

6 months ago 4708 1465 31 19
Video

Here's a thing that's probably right up your Straße, you big mad oddball.x

7 months ago 805 275 7 87

I've implemented some of these for fun but never benchmarked them seriously- I'd be super curious to see how the various e-free constructions compare to removing epsilons after the fact, in terms of practical performance

7 months ago 4 1 1 0

Other e-free NFAs have fewer states than Glushkov's: both Antimirov derivatives and Ilie & Yu's follow automaton merge equivalent states of the position automaton. (And while Glushkov and Antimirov go e-free directly, Ilie & Yu go via an e-NFA which is smaller than Thompson's.)

7 months ago 4 1 1 0

I like to think of epsilon edges as corresponding to the regex tree edges from the non-symbol nodes: they're a linear-size way to encode the quadratic-size relation between pairs of adjacent symbol occurrences, which works by funneling through a shared parent node

7 months ago 4 1 1 0

Glushkov's (i.e. the "position automaton", and more generally any epsilon-free NFA) is worst-case quadratic to construct, while Thompson's is linear. This is just due to edges, though- Glushkov's generally has fewer states because it's always exactly 1 + the number of symbol occurrences in the regex

7 months ago 4 1 1 0
Advertisement

my neighbor told me ivys keep rejecting his applications so I asked how many he applied to and he said he just goes to the computer and writes a new essay afterwards so I said it sounds like he's just feeding essays to admissions offices and then his daughter started crying

7 months ago 1 0 0 0

the other thing rust gets out of it being unique is that monomorphizing on that type eliminates the indirect call (though whether you want this all the time is another question)

7 months ago 1 0 0 0

earlier on I remember a few people (eddyb?) arguing for this kind of full featured existential as the thing trait objects desugar to, possibly as part of the "custom dst" stuff. would make a lot of things really convenient!

7 months ago 0 0 0 0

if you want to be really pedantic about the "closure over fields" thing, then `self` would be a separate feature that only gives you recursive access to the methods, and fields would be accessible exclusively through lexical scope

9 months ago 1 0 0 0
Yacc is dead: An update

also including some entertaining back-and-forth blog posts arguing with Russ Cox: matt.might.net/articles/par...

9 months ago 4 0 1 0

lua and js (not sure about php) use different implementations within the runtime at least

9 months ago 0 0 0 0

my girlfriend watching me type furiously on my laptop: how's it going at the leading horses to water factory

1 year ago 341 23 9 0

There's also a synergy where value semantics make it easier to store things in-line, making GC less expensive, and in the other direction having a GC gives you the flexibility to avoid excessive copying in some cases, making value semantics less expensive.

10 months ago 1 0 0 0
Advertisement

Instead what you want is to lean more toward value semantics by default, and make the "soup of mutable objects" case more visible and opt-in. And having a GC makes this case way simpler, both in high level languages and in low level languages.

10 months ago 1 0 1 0

My take on the discussion here about borrow checking and GC is that a language at this level of abstraction both 1) should have *some* answer for local reasoning about state, but 2) it almost certainly should not look anything like borrowck.

10 months ago 1 0 1 0

objects are & and functions are ⅋ so they should be unified into sum-of-products codata, the same way + and × are for data

11 months ago 1 0 0 0

it's the operation of creation, of the *other* &mut- that's the operation in stacked/tree borrows that invalidates conflicting references.

11 months ago 0 0 0 0