Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
uryga
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
50 ms
·
451.
▲
by
uryga
8y ago
> open source can't be that cutting edge. what?
452.
▲
by
uryga
8y ago
to be fair though, __del__ did cause problems. when the app was exiting, PyOpenGL would release the GL context before my buffers were __del__'ed, so the __del__s tried to free a buffer that stopped existing and crashed. it'd be
453.
▲
by
uryga
8y ago
> If cleanup needs to happen, the Pythonic way is to make the lifetime of a resource explicit with a context manager. in some cases resources are long-lived and not possible to enclose in a context manager. as an example, a while ago i w
454.
▲
by
uryga
8y ago
i see. thanks for the explanation!
455.
▲
by
uryga
8y ago
> He didn’t support socialized medicine i'm a bit confused... wasn't Obamacare, like, that? (nb not a US citizen)
456.
▲
by
uryga
8y ago
as an example, session types are useful if you want to give precise types to coroutines that yield nontrivially (i.e. aren't basically iterators). consider this (slightly contrived) Python example of a coroutine yields two intermediate
457.
▲
by
uryga
8y ago
i felt like the article describes a whole bunch of the details – e.g. covering the plastic with vaporized aluminum (i believe this is what "aluminum-metalized polyethylene terephthalate" means); making plastic iridescent by etchin
458.
▲
by
uryga
8y ago
it is. [w kim?/w czym? w potrzebie] is locutive. [komu?/czemu? tej potrzebie] would be dative.
459.
▲
by
uryga
8y ago
> Matching on the different type constructors Terminology nitpick: Pattern matching is done on value constructors (or just "constructors", but at the intersection of FP and OOP that could be confusing). "type constructor
460.
▲
by
uryga
8y ago
i think they're considered two sides of the same coin - exhaustive vs extensible, each with its benefits and tradeoffs. this is known as "The Expression Problem"; what follows is a quick and messy intro. sum types: you can ea
461.
▲
by
uryga
8y ago
Unfortunately, Python being hopelessly dynamic, `A.b` could involve executing arbitrary code and side effects depending on what `A` is. So hoisting `A_b = A.b` out of the loop may produce different results and thus can't be done automa
462.
▲
by
uryga
8y ago
this also happens when renaming files in Explorer. i wonder if they're related EDIT (i read the article): > [Notepad] was, by design, little more than a very thin wrapper around a Windows multiline text-editing control. maybe that&#
463.
▲
by
uryga
8y ago
`with_milk` and `with_sugar` are booleans that people have (lots of) experience with. this seems to help us think about this stuff – we've seen how milk/sugar "work" many times, and we've already internalized so
464.
▲
by
uryga
8y ago
`Mu` is perl6's `Object` ("mu" ≈ "nothing" in chinese/japanese). cute, but alien
465.
▲
by
uryga
8y ago
there's an ASCII code that means "backspace" https://en.m.wikipedia.org/wiki/Backspace#Computers
466.
▲
by
uryga
8y ago
> Did MS ever fix the fact that they have 2 completely different control panels with partially-overlapping functionality? if you're referring to the split that came with Windows 8 , there's been (slow) progress in Windows 10. T
467.
▲
by
uryga
8y ago
Ah, so using Result types you can return `(Optional<A>, Optional<B>, Optional<C>)` – each can fail or succeed independently. But you can't do that if you're using exceptions to signal errors – it's li
468.
▲
by
uryga
8y ago
> Exceptions imply a temporal coupling from error occurrence to error handling. Could you expand on this? I understood your statement as "Exceptions sort-of force you to handle an error the moment it occurs", but I'm havin
469.
▲
by
uryga
8y ago
could you please share the script? i wanted to do that too but never got around to it. (it's especially bad when something creates a lot of small files, because Service Executable starts scanning them, and whitelisting processes doesn&
470.
▲
by
uryga
8y ago
Could you elaborate? Why is it wrong/misinformation?
471.
▲
by
uryga
8y ago
> CSS defines properties on individual elements, while layout fundamentally needs to define relationships between elements I couldn't agree more! Does anyone know a language/toolkit/something that gets layout right? I re
472.
▲
by
uryga
8y ago
> "Bell's theorem rules out local hidden variables as a viable explanation of quantum mechanics (though it still leaves the door open for non-local hidden variables , such as De Broglie–Bohm theory, etc)"
473.
▲
by
uryga
8y ago
> When someone asks you "What type of door you have?" we don't say "I have an open door", rather "I've a timber door" or "glass door". I like analogies, but I don't think bringing th
474.
▲
by
uryga
8y ago
ah, my bad, i see how that makes more sense. FWIW i agree – often, mentally converting a theorem to a type and thinking about the problem in that framework makes things easier for me to grasp. (also explains why we "apply" theorem
475.
▲
by
uryga
8y ago
> the underlying type theory is intuitive isn't that "intuitionistic"?
476.
▲
by
uryga
8y ago
The creator (@SrPeixinho) answered some questions on the Haskell subreddit [1]. Looks like you can "box" (his term) variables to allow duplication/copying and it's all tracked statically somehow. (or will be - not sure i
477.
▲
by
uryga
8y ago
Implementing a stdlib isn't a thing you do every day. Presumably GP was referring to more common situations, where using the stdlib is (usually) preferable to rolling your own solution.
478.
▲
by
uryga
8y ago
> My understanding is that you can't really compare processing powers between brains and computers. I agree – I guess I papered over this and basically interpreted GP as saying "computers are getting fast enough to be able to e
479.
▲
by
uryga
8y ago
> hardware is getting to brain level capabilities in processing power is it? not picking a fight, but i was under the impression that we're nowhere near. could you expand on this?
480.
▲
by
uryga
8y ago
make your syntax highlighter show braces and semicolons in a faint color – similar effect, better editability!
More ›