Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wwright
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
45 ms
·
421.
▲
by
wwright
8y ago
I’m in awe that your experience is that that sort of behavior is rare. Sanitary environments seem to be in the extreme minority to me!
422.
▲
by
wwright
8y ago
Rust (the language the Xi core is developed in) has static typing for JSON, as well as other serialization formats: https://github.com/serde-rs/json
423.
▲
by
wwright
8y ago
My understanding is that the semantics are exactly the same, but it’s just possible for the checker to match your intent more tightly. For example, in lexical lifetimes, this fails: let x = &mut foo; if x.bar() {
424.
▲
by
wwright
8y ago
One thing people (like me ) often say is that it forces you to “learn to write better.” One way you can think of it is this: - Rust rejects some programs that are truly wrong (`“2” + 3` style) - Rust rejects some programs that really are ju
425.
▲
by
wwright
8y ago
How often are yacc/lex grammars actually portable? Truly portable too — usable in different threading contexts, for example. You say they are declarative. My experience is admittedly very limited, but I would call them anything but d
426.
▲
by
wwright
8y ago
A big part of why tools move away from Bison and ANTLR isn’t performance, but UX (especially error reporting)
427.
▲
by
wwright
8y ago
A lot of it, I think, isn’t trying to design for the lowest common denominator, but trying to find abstractions that fit problems more accurately. When that works well, you end up with much higher accessibility and fewer errors. As with all
428.
▲
365 RFCs
(write.as)
2 points
by
wwright
8y ago
|
0 comments
429.
▲
by
wwright
8y ago
I had an issue with the coloration on top of that, so I elected to turn the regular system title bar back on. That perfected it for me.
430.
▲
by
wwright
8y ago
I imagine that this would be related to separating your GUI code from your “business logic”/“effects”. You can make a rule that code should only ever invoke widget code if it “owns” that widget. Then, have the code “owning” your widget
431.
▲
by
wwright
8y ago
If context managers have changed your API, then the context of the resources is no longer an implementation detail; the lifetime of your object and the lifetime of your resources are linked.
432.
▲
by
wwright
8y ago
I dislike the argument about context managers being unusable if you have a class that needs to re-use some context across many methods. There are a lot of ways to do so comfortably. A trick I really like is to use `contextlib.contextmanager
433.
▲
by
wwright
8y ago
There's a really simple and easy solution in the standard library, but like many things in Python, it's not the first solution you're usually shown: `contextlib.contextmanager` [1]. This API cleanly separates the "contex
434.
▲
by
wwright
8y ago
I truly love the Rust project. There is so much genuine compassion, diligence, and attention in the community, and it shows everywhere.
435.
▲
by
wwright
8y ago
Shunning of heretics was designed to centralize power in the church and affiliated groups. Modern social progressives do perform analogous shunnings, yes, but these acts are for the explicit purpose of decentralizing power _away_ from group
436.
▲
by
wwright
8y ago
To add: safe Rust prevents all data races, not just thread based ones (this is mostly relevant around iterators and other concurrency-without-parallelism structures, but is relevant more generally as well)
437.
▲
by
wwright
8y ago
Apple as a company doesn’t care about the truth and never has pretended to (which does suck).
438.
▲
by
wwright
8y ago
Because mobile carriers and other large businesses have always been their customers, not consumers. Google’s only incentive for helping consumers is that it might give them more data for their large business partners.
439.
▲
by
wwright
8y ago
Rust expressions are very contextual due to things like the borrow checker, though, and a REPL basically means that every bound top level name has an infinite lifetime. That would make some things very awkward.
440.
▲
by
wwright
8y ago
Reading reviews of the OS updates?
441.
▲
by
wwright
8y ago
Sounds like a wildly successful competitor against Twitter to me
442.
▲
by
wwright
8y ago
> BTW, I never store anything which makes me uncomfortable, anywhere incl. my brain. That's a much better way of living. Not that privacy conscious people is hiding something, but that's my policy. That is a better way of livin
443.
▲
by
wwright
8y ago
On the other hand, the design of Rust is directly and deeply influenced by those very lessons. Less “down the drain,” possibly more close to “baked directly into the tools we use.”
444.
▲
by
wwright
8y ago
In my experience, it’s not much more OO than Haskell. Even in many functional languages, you typically want some OO — you’ll want some core type that you export opaquely, and then you have functions doing logical operations on that. I thi
445.
▲
by
wwright
8y ago
Thanks for digging that up :-)
446.
▲
by
wwright
8y ago
Do you have any posts explaining how this avoids GC? At first, it seemed to be that the underlying calculus only uses variables once, but in your examples variables are sometimes repeated. How do the two relate?
447.
▲
by
wwright
8y ago
The two biggest differences iirc: - it can never be named - it inherits `this` lexically from its parent scope (which imo is the sane default)
448.
▲
by
wwright
8y ago
Expressions can be nested arbitrarily and infinitely — like in math. You can take “x * x” and “3 * x” and add them into “x x + 3 x”. You can pass that to a function like “log(x x + 3 x)”. You could then divide that, square root it, on and o