Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
uryga
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
241.
▲
by
uryga
6y ago
thanks for pointing that out, completely forgot about lisps!
242.
▲
by
uryga
6y ago
> otherwise it may not be clear how it was desugared (runtime vs. compile) but does that really matter, as long it has well-defined semantics? even for the compile-time case, it's up to the compiler/optimizer to decide whether
243.
▲
by
uryga
6y ago
i get that, i just think it'd be nice if they could be used for run-time stuff too – why create a gap between the compile- and run-time parts of the language? it seems like desugaring it into a loop should be pretty straightforward¹; i
244.
▲
by
uryga
6y ago
i've never seen a programming language implement math-y notation in the vein of xs[0] + ... + xs[n] so that's kind of cool... though C++ seems like an odd place to find it. i wonder how expressive it is, i.e. what the limit
245.
▲
by
uryga
6y ago
it's a rough rule of thumb at best though – higher-order-functions or other things that take a callback blur the line a lot (IoC, what a sibling comment said). or say a library has an event-loop, or maybe does networking and you only p
246.
▲
by
uryga
6y ago
i haven't tested it, but MDN says: "The end tag may be omitted if the <p> element is immediately followed by an <address>, <article>, <aside>, <blockquote>, <div>, <dl>, <fieldset>,
247.
▲
by
uryga
6y ago
Windows 10's builtin clipboard history (Win+V) is one of the best things they've added tbh (it's opt-in, in case anyone's wondering...)
248.
▲
by
uryga
6y ago
i always read frontend/backend as an analogy to how e.g. a store has a front (for customers) and back (not for customers), or like how a stage has a back-stage. so the metaphor, and "semantic connection" would be that "b
249.
▲
by
uryga
6y ago
> a metaphor is something you use instead of the common term for something i don't think the "instead" part is strictly necessary, and the chair example is a good showcase for that. animals stand on four legs, and by analo
250.
▲
by
uryga
6y ago
that might well be, but just recently i got a crash report and it turned out the user had some "unsupported" version of Safari... and i'd rather transpile/polyfill than be that site that asks you to upgrade your browse
251.
▲
by
uryga
6y ago
> “manager” means absolutely nothing do you know a better name for "window manager"? i don't mean to hold that up as a paragon of great naming, just genuinely curious what you'd call it. like, i'm no fan of Abstr
252.
▲
by
uryga
6y ago
wow, i sure feel dumb about this now! thank you, sibling commenters who actually know stuff :)
253.
▲
by
uryga
6y ago
iirc Sublime Text overwrites if you set "atomic_save": false
254.
▲
by
uryga
6y ago
good point, i got a little bit caught up in the argument there :)
255.
▲
by
uryga
6y ago
i was going to mention this, but the comment was already long :) of course, this doesn't stop you from implementing it as stackPop _ = Nothing or just doing the wrong thing. but it does prevent you from returning `([1,2,3], No
256.
▲
by
uryga
6y ago
just realized my usage example is misleading. as sibling comments correctly explain, \35 means chr(0x35) == '\x35' == '5' so the actual usage would be <div class="5">
257.
▲
by
uryga
6y ago
looks like that clip of her is looped, so it might just be a random hand movement that looks meaningful bc you see it twice
258.
▲
by
uryga
6y ago
i guess it's "making illegal states unrepresentable" – with `(Stack a, Maybe a)` you allow an implementation that does stackPop [1,2,3,4] == ([1,2,3], Nothing) which doesn't make sense - `Nothing` is only supposed
259.
▲
by
uryga
6y ago
that's `init` in Haskell, and in this case i'd agree with the OP - i'm used to `pop` letting you actually access the last element, so i'd prefer a different name. also, doing it that way will require traversing the struc
260.
▲
by
uryga
6y ago
so we agree about single-return-pop – it just wouldn't be very useful. what i tried to say is that it's a bit of a strawman – single-return-pop is pretty obviously useless, so no one would design a pure API like that. so there
261.
▲
by
uryga
6y ago
ah, didn't know about that single JAR thing, thanks!
262.
▲
by
uryga
6y ago
> Clojure (which unlike many languages is famously "just a library") how do you mean? "language features" implemented via macros? or something about its JVM implementation?
263.
▲
by
uryga
6y ago
> So as long as 'pop' is returning the element from the list/map/set/whatever, and nothing else, it is the wrong verb for immutable structures. right, but would anyone really write a functional `pop` like that?
264.
▲
by
uryga
6y ago
TIL! as with most languages, css indentifiers can't start with numbers, but you can get around that using backslash-escapes. you'd use these classes like this: <div class="35"> this stackoverflow answer has
265.
▲
by
uryga
6y ago
> That is not the right name to use for returning an element without side effects how do you feel about `str.replace`? i'd say that that name implies side-effects too, but everybody's used to the fact that [in python] strings
266.
▲
by
uryga
6y ago
could be because emoji are in the 'Miscellaneous Symbols and Pictographs' Unicode block, but the hourglass symbol is in 'Miscellaneous Technical', so it doesn't count as an emoji according to HN's filter
267.
▲
by
uryga
6y ago
what approaches do you think would be better? do you mean something along the lines of "ask for forgiveness, not permission"?
268.
▲
by
uryga
6y ago
> Few people have the attention span anymore to read all of the copy in BMW's old ads or could it be that everything is so oversaturated with ads that spending two minutes voluntarily reading fluffy ad copy just doesn't seem
269.
▲
by
uryga
6y ago
(i hope i'm not spreading misinfo, i'm not super experienced with React) it may be that way with regular Components, but afaik Pure components are smarter - the idea of Pure components is that react only rerenders the components w
270.
▲
by
uryga
6y ago
i guess i was being a bit pedantic... as you say, if you look at Clojure's whole programming environment (tooling, stdlib) and not just the language itself, putting it like GP did makes sense.
More ›