Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
uryga
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
181.
▲
by
uryga
6y ago
> At the end of the day your computer is no different from an expensive space heater. Might as well mine some crypto with it. i mean... it wouldn't be a space heater if it wasn't crunching pointless numbers...
182.
▲
by
uryga
6y ago
> if it was actually legal to just produce your own copies surely we would see tons of printing shop specializing in very small printing runs that minimize costs what would they print? they don't have the original "master"
183.
▲
by
uryga
6y ago
> Libraries exist because they can lend a book to only one person at a time. this phrasing confused me for a minute, so to clarify: do you mean that if libraries could magically create infinite copies of a book, they wouldn't be a
184.
▲
by
uryga
6y ago
thanks for the explanation! though i have to say i only have a vague idea of "fine-grained reactivity", any pointers for reading about this or systems that work this way? in particular, i don't quite get this bit: > By co
185.
▲
by
uryga
6y ago
why do you consider Hooks a "workaround around [React's] initial concepts"?
186.
▲
by
uryga
6y ago
> So, a Python fanboy. the post literally starts with: > Python [...] is okay but has lots of frustrations. doesn't sound fanboyish...
187.
▲
by
uryga
6y ago
i considered adding "mutate a global" in there but didn't feel like that was relevant to @iooi's comment. maybe i should've quantified "the only thing" a bit more :)
188.
▲
by
uryga
6y ago
> framed in a way they didn't intend it to be what part of @saagarjha's comment are you referring to here? TFA is clearly meant to be a riff on Aphyr's posts (they're linked on the first line) so i'm guessing y
189.
▲
by
uryga
6y ago
the counter's value isn't leaking out, you're explicitly returning it . that's the point – the only thing you can "get out of" a closure is what it returns when you call it (see also: the JS pattern of using c
190.
▲
by
uryga
6y ago
> In practice though we should probably all write annotations that do work with an existing type checker. oh, sure! "freeform annotations" that break mypy in a published library should be a punishable offense ;)
191.
▲
by
uryga
6y ago
technically, you can use any valid python expression in annotations. [int] {str: int} {'x': float, 'x': float} are all valid python syntax, so e.g. these are all valid: def f(xs: [int]) -> {str: int}:
192.
▲
by
uryga
6y ago
i guess there's really two implicit arguments - the value's type, `a` (quantified via forall - the System F "Λ") and its vtable `Show a`... though i guess the vtable is uniquely determined by the type bc in Haskell insta
193.
▲
by
uryga
6y ago
id imagine that you get a lot of rules when you have a whole bunch of different "margin-top-<x>". the idea is probably to rely on some CSS tree-shaking/"dead CSS elimination" tool to only keep the ones you nee
194.
▲
by
uryga
6y ago
i don't think that's correct, afaik typeclasses roughly desugar to passing a record of functions (vtable/"dictionary") at the call site
195.
▲
by
uryga
6y ago
> I hope people don't mind [that his parents helped him start a business] parents != parents maybe i'm stating the obvious, but "if you want to get rich, come up with a good idea and work hard" is way easier when your
196.
▲
by
uryga
6y ago
honestly, if this is going to be about static vs dynamic typing in general, i'm going to peace out because this argument has been rehashed about a million times. and we seem to be talking past each other anyway i just wanted to make a
197.
▲
by
uryga
6y ago
> (1,2) + (2,4) - can't be done. are you talking about points or open intervals? the notation is ambiguous ;) but addition of points is fine if you look at them as vectors > a^2 + a^2 - fine. a^2 + a^3 - nope. a^2 + b^2 - nope. w
198.
▲
by
uryga
6y ago
> Type/Kind hierarchy is unified when you write a dependently typed system i'm being pedantic, but i don't think that's always the case. afaik Type : Type leads to "inconsistency" (sounds like Russell
199.
▲
by
uryga
6y ago
thanks for the link! i really liked the series, but forgot to bookmark it and couldn't find it after. the Windows series starts here: https://www.filfre.net/2018/06/doing-windows-part-1-ms-dos-a... honestly,
200.
▲
by
uryga
6y ago
`dbg!(x)`, being a macro, expands to something at compile time; at runtime, that expanded code will do something like `write(x.fmt(), stderr)`. it's not relevant here, only `size_of` is. what's happening here is that rust does &
201.
▲
by
uryga
6y ago
alright, just to clarify, from the comment that introduced expressive power into the discussion: > Specs/contracts are cool but ultimately don't afford the same kind of descriptive and expressive power that a static type sy
202.
▲
by
uryga
6y ago
though i'd say that with Go's approach to generics (wrapping everything in `interface{}`), people used to dynamically-typed languages should feel right at home ;)
203.
▲
by
uryga
6y ago
"it's so simple, you just describe that you want `x` to become equal to `y+1`, and the compiler figures out the implementation" ;)
204.
▲
by
uryga
6y ago
> Could you explain what descriptive and expressive power is missing here? tldr: i haven't seen a runtime typechecker that handles generics and function types in a satisfactory manner. i've used various Python libraries for run
205.
▲
by
uryga
6y ago
it doesn't :) though it works fine if your terminal allows multiline input: python -c " for x in stuff: this(x) that(x) " at some point i even wrote a hacky little wrapper that let you use braces and replac
206.
▲
by
uryga
6y ago
> Tree editors that only create grammatically correct code [...] should have been the norm decades ago. idk... i like the idea in principle. but consider a task like turning a big list-of-pairs literal into a dict literal¹ – the code spe
207.
▲
by
uryga
6y ago
from a quick look, Blunt is mostly a (big) bunch of helpers for commonly used stuff like "lay the children out horizontally". i'm not sure if it'll be helpful if you're not very familiar with CSS – it seems to be ai
208.
▲
by
uryga
6y ago
just had a friend with a Mac test it. when requesting foo.jpg (from an <img> tag), it sends: Accept: image/png, image/svg+xml, image/*;q=0, video/*;q=0.8, */*;q=0.5 the server responds with foo.jpg .
209.
▲
by
uryga
6y ago
isn't minification good enough at obfuscating the code? what does CommonJS add here? (that's a legit question – i've sifted through webpacked JS a few times, and it mostly just added a bunch of (function(module, require,
210.
▲
by
uryga
6y ago
> safari both refuses to render webp and pretends to accept them weird, i haven't had that issue! i run a site that's set up¹ to redirect image requests to a WebP version if the Accept header allows it; half our team uses Mac
More ›