Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
uryga
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
43 ms
·
421.
▲
by
uryga
7y ago
off the top of my head there's pytypes¹ and typeguard² – both look at type annotations and enforce them at runtime. ¹ https://github.com/Stewori/pytypes/ ² https://github.com/agronholm/ty
422.
▲
by
uryga
7y ago
nitpick, but I think "existence proof" is the opposite of what you meant (that Mercurial is a living proof that things can be better): > a constructive proof is a method of proof that demonstrates the existence of a mathemati
423.
▲
by
uryga
7y ago
could you explain "messages are first class" a bit more? what does that look like in Ruby?
424.
▲
by
uryga
7y ago
it's also nice with Haskell's Multiway If: x = if | a < b -> -1 | a > b -> 1 | otherwise -> 0 (and `cond` in lisps)
425.
▲
by
uryga
7y ago
could you explain this idea a bit more? it sounds interesting, but i don't quite see why "visual assembly" would be necessary. most "high level" languages are written in something lower level like C (possibly with A
426.
▲
by
uryga
7y ago
it's not just the tongue – when speaking French, your whole face has to do more work compared to English!
427.
▲
by
uryga
7y ago
from the "Personal thoughts" section of the document: > An analysis of the likely number of deaths over 10,000 years due to inadvertent intrusion should be conducted. This cost should be weighted against that of the marker sys
428.
▲
by
uryga
7y ago
i don't really know Rust apart from some curious onlooking, but afaik expressing monads (i.e. the Monad typeclass) in Rust is tricky – something to do with the lifetimes of closures and the objects they close over, i think. ([Idiomatic
429.
▲
by
uryga
7y ago
Windows 10 got an emoji picker some time ago, opened by `Win+period` or `Win+semicolon`. it's okay, except that the emoji search seems to use the current keyboard language and not the system language, which is kind of annoying. I don&
430.
▲
by
uryga
8y ago
gizmo686's comment [1] explains the subtle difference: > [...] The technicality of the memset example is that it does not set the bits of the pointer by referring to it as a pointer, so the requirement that 0 behave as if it was a
431.
▲
by
uryga
8y ago
you're right, but i'm pretty sure that those programs are not what GP was talking about. i mean, i don't think anyone would be applying a termination checker to a daemon-ish program that's meant to run forever... you
432.
▲
by
uryga
8y ago
off topic, but "latam" means "I am flying" in Polish, so it's a good name for an airline!
433.
▲
by
uryga
8y ago
you might be right, though i understood it as "every call to a recursive function must be prefixed with `rec`", which would mean that, say, ,`last xs` [assuming that `last` is implemented recursively and xs is a linked list] would
434.
▲
by
uryga
8y ago
this is interesting (emphasis mine): > Bosque is designed to encourage limited uses of recursion [and using map/filter etc instead]. This is done by introducing the rec keyword which is used at both declaration sites to indicate a f
435.
▲
by
uryga
8y ago
i haven't used it, but have you looked at the Crystal language? i think the idea is basically "statically typed Ruby".
436.
▲
by
uryga
8y ago
a very low-tech solution: set a kind-of slow attack. holding the key for a short period of time (< the attack) gets you a "low velocity" sound because it doesn't reach the maximum volume; longer periods (>= the attack)
437.
▲
by
uryga
8y ago
that'd be "encouraging her", unless you're not referring to Manning here?
438.
▲
by
uryga
8y ago
not sure if this is the best example – `Functor` would be enough here
439.
▲
by
uryga
8y ago
i was confused by the "local hypothesis" block as well until i realized it's just `lambda x: ...` :)
440.
▲
by
uryga
8y ago
looks like you can only specify the names of the constructors and not their contents, as in `(data Maybe (Nothing Just))`, so there's nothing stopping a user from doing `(Nothing 1 2 3)` or `(Just)`. interesting choice! also since peop
441.
▲
by
uryga
8y ago
> A human has to be in the recording booth to create the vocal library. do they? i mean, we're not great at synthesizing natural-sounding voices yet, but that's a technical challenge – not something inherent to the problem.
442.
▲
by
uryga
8y ago
it's not all bad but doing generic types is annoying because you have to do from typing import TypeVar T = TypeVar('T') in every module where you want to parametrize a type. (not sure how that works with 3.6+'s
443.
▲
by
uryga
8y ago
looks nice! unfortunately when I try to select a color from the wheel, the line switches to a horizontal position (dark blue o----o bright orange) and gets stuck there :( [Android 7.1.2, Chrome 73]
444.
▲
by
uryga
8y ago
if you squint a bit, `x or y` returns the one that's greater, i.e. `0 or 1 == 1`; and `x and y` returns the one that's smaller, i.e. `0 and 1 == 0`. so min/max kind of are a generalization of and/or
445.
▲
by
uryga
8y ago
> idiomatic within the smartphone UX (e.g. replacing keyboard motions with swipes and gestures) it would largely defeat the purpose of vim as a modal editor i'm not convinced that's true... you're right that presently most
446.
▲
by
uryga
8y ago
i'd say "beautiful" in this context is shorthand for "built with attention towards aesthetics", which is often not the case for programmer tools like this
447.
▲
by
uryga
8y ago
i think you mean "the competition" instead of "concurrency". but i see where you're coming from, it's "konkurencja" in Polish :)
448.
▲
by
uryga
8y ago
up to 11! (parses on 3.7.2) async def _(): async with await None if not True is False else lambda: _: pass it's a shame that Python has so few expression keywords... `yield` can be used as an expression, but it seems t
449.
▲
by
uryga
8y ago
yeah, thanks!
450.
▲
by
uryga
8y ago
> A view of your program is 1d. Conceptualizing a program is often n-dimensional. that sounds like a cool way of seeing things, could you explain what dimensions you're referring to?
More ›