Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dbaupp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
51 ms
·
481.
▲
by
dbaupp
9y ago
It seems like that won't get the "fast": that code does 4 trigonometric functions and a sqrt while the OPs approximation seems to do one cached trig call and then one sqrt for each point.
482.
▲
by
dbaupp
9y ago
As I understand it, a lot of pieces critical for real world use are really just minimum viable implementations to allow Servo to work end-to-end and feed data into the interesting parts. In particular, things like the network stack don'
483.
▲
by
dbaupp
9y ago
Inferring lifetimes from the implementation of a function won't happen for the same reason that inferring types won't happen: it is really nice for the signature of a function to not automatically be changed if the body is changed
484.
▲
by
dbaupp
9y ago
How does it work if an exception gets thrown through a C stack frame that has outstanding resources (for instance, pointers that are freed later in the frame)? Are you referring to manual SJLJ? In any case, it seems like C manual destructio
485.
▲
by
dbaupp
9y ago
There's a subtlety here: panics are exceptions, but they can be disabled without also disabling RAII.
486.
▲
by
dbaupp
9y ago
Isn't it generally undefined behaviour to have exceptions pass through code that isn't compiled with support for them? I.e. not running some destructors is the least of your worries if an exception hits C/-fno-exceptions/
487.
▲
by
dbaupp
9y ago
Wow! I think you're being extremely uncharitable to SPJ, who I believe expressed the sentiment about Haskell originally. There's ton of reasons to not wish for adoption. For instance, supporting commercial use of a programming l
488.
▲
by
dbaupp
9y ago
> The trend seems to be for languages to have forward inference of types within functions, while declaring them in function definitions. Assignments which initialize a variable also implicitly declare its type. C++ started this with &q
489.
▲
by
dbaupp
9y ago
Framing it as linear/just a spectrum leads to the "oppression Olympics" of people thinking that having white privilege means their, say, poor or abusive upbringing "doesn't count", like the originator of this s
490.
▲
by
dbaupp
9y ago
Having some "feature" that means the concurrency model is sound (aka without undefined behaviour) isn't irrelevant to concurrency models. (I quoted feature because there's a variety of different ways to get this guarante
491.
▲
by
dbaupp
9y ago
> Share memory by communicating, don't communicate by sharing memory. I suspect the parent was referring to the fact that Go just has this as a convention, there's no static guarantee that the programmer gets it right and it is
492.
▲
by
dbaupp
9y ago
If you've got something large that asserts consistently, you could consider throwing some CPU time at it via creduce. It is designed for C, but Rust is close enough that a lot of its heuristics still work just fine. Alternatively, sinc
493.
▲
by
dbaupp
9y ago
No, some NP-hard problems are outside NP (i.e. harder than NP), while some are inside. The wikipedia article has a good explanation and a good diagram: https://en.wikipedia.org/wiki/NP-hardness
494.
▲
by
dbaupp
9y ago
Your 2 is the easy part: "NP-hard" is exactly the set of problems to which any NP problems can be reduced in polynomial time, and there are many known existing examples, both within NP (aka NP-complete) and outside it.
495.
▲
by
dbaupp
9y ago
The parent is likely talking about the "Land" typo.
496.
▲
by
dbaupp
9y ago
> yet not allowing them the means to do so with their mode of travel of choice by not providing sufficient parking They also don't provide a runway and hangar space, nor a marina, and probably not a SpaceX landing pad either! People
497.
▲
by
dbaupp
9y ago
The amounts differ by an order of magnitude, or maybe even two. E.g. the EIA says 9.3k barrels/day is consumed as motor gasoline (more than half of all consumption of finished products, and the next largest categories are also burn-the
498.
▲
by
dbaupp
9y ago
They're only the same in that they're both a kernel in Rust: the parent blog is an educational/exploratory OS, whereas Redox seems to be aiming for real-world use and not pedagogy.
499.
▲
by
dbaupp
9y ago
I think you're also missing my point. Techniques like what you describe are exactly what I was referring when I said "C++ possess[es] ways" and "using friends rather than methods", although you don't even need
500.
▲
by
dbaupp
9y ago
It is safe, and was even modeled explicitly as part of https://www.ralfj.de/blog/2017/07/08/rustbelt.html . There's the external https://crates.io/crates/alias and even an appr
501.
▲
by
dbaupp
9y ago
I didn't denigrate C++, I'm specifically talking about the behaviour of the data types/mention of OOP which is orthogonal to the surface syntax like using symbolic operators instead of textual names. It is factual that the de
502.
▲
by
dbaupp
9y ago
Optimisers reason about this, yes, but they don't define the user-facing language model. They take valid code and transform it in to (hopefully) faster valid code[1] and don't generally emit diagnostics or fail compilation, this m
503.
▲
by
dbaupp
9y ago
Rust, C and C++ all possess ways (it's the even default/only way in C and Rust, and almost so in C++) to write types like this that don't involve the typical pointer-soup/dynamic-call overhead of typical OOP. People can
504.
▲
by
dbaupp
9y ago
That's true: it probably does make some (probably common) things easier because you get to disjoint slices with simpler indexing conditions, but the problems are equally hard in the general case: the type checker/borrow checker ha
505.
▲
by
dbaupp
9y ago
Bounds checking gets in the way for simple cases but anything even slightly more complicated needs to be written extremely carefully in any language, for autovectorisation to work. It is like, essentially, writing explicit SIMD without usin
506.
▲
by
dbaupp
9y ago
Being an ARC backed array isn't like std::string, and I don't see why having that copy-on-write behaviour implies it is fundamental. Could you expand?
507.
▲
by
dbaupp
9y ago
Yes, unsafe blocks one way in which the Rust doesn't privilege built-ins and the standard library (much) over external code: people can write high performance a abstractions without them needing to be baked into the language. This is e
508.
▲
by
dbaupp
9y ago
Multidimensional arrays are... completely orthogonal: if the compiler could determine row indices were different, it could determine that slicing indices were too.
509.
▲
by
dbaupp
9y ago
I use them instead of bookmarks: with Tree Style Tabs, I can pause a task, collapse it's subtree(s) and come back later with the complete state intact.
510.
▲
by
dbaupp
9y ago
For the specific example of the Cauchy distribution, the standard deviation isn't defined.
More ›