Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Peaker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
181.
▲
by
Peaker
11y ago
An Optional type is more clumsy than null checks and null returns sprinkled everywhere??
182.
▲
by
Peaker
11y ago
Is heat turned on around the clock?
183.
▲
by
Peaker
11y ago
> > When changing the AST, how would you go about changing all the code that needs to be changed? Is there an answer to this question?
184.
▲
by
Peaker
11y ago
I think the greatest features of the ML family for compiler development are great AST representations (as algebraic data types) with pattern-matching. When you change the AST, it is very easy to go and fix all the AST transformations to han
185.
▲
by
Peaker
11y ago
The problem with `make` (and all build systems that generate `Makefiles` for `make`) is both flexibility and correctness. Correctness problems: * Make cannot correctly specify file system state dependencies (like inexistence of files, su
186.
▲
by
Peaker
11y ago
I find Mint (Ubuntu minus Unity) to be much more usable than OS X. OS X has some really bad behaviors by default. One example is the Alt-Tab key which is split into two different keys which make no sense in my workflow. The concept of "
187.
▲
by
Peaker
11y ago
You can do dynamic linking at runtime so the indirections use direct immediate jump instructions.
188.
▲
by
Peaker
11y ago
As an extern'd variable it's an array of unknown length
189.
▲
by
Peaker
11y ago
I think I have a handful of negative numbers in hundreds of thousands of lines of C code. It's quite rare, IME. By the way, an underflowed/large unsigned number used when a signed number is expected in most contexts (e.g: when add
190.
▲
by
Peaker
11y ago
If you underflow an unsigned you get a huge value that's going to be invalid by any range check unless you assume entire unsigned range is available. But if you use signed, you have to check for values under zero AND the top of the ran
191.
▲
by
Peaker
11y ago
Sizes can be >2gb on a 32 bit system. Not sure how ssize_t works, is it 64 bits then? It makes sense to use unsigned for sizes to save a bit (or 32 bits per size). Also less invalid possible inputs to handle.
192.
▲
by
Peaker
11y ago
Overflow checking all arithmetic is still going to be quite expensive, even with hardware support, because you have to choose between: A) exception/panic on overflow: this is preferable to overflow but also undesirable behavior. B) arb
193.
▲
by
Peaker
11y ago
If your domain is 0..99 for example, using unsigned and <100 is nicer than using signed and two conditionals. Detecting overflows is easier, not harder. In c, unsigned behavior is also less UB. And while the enforcement isn't there,
194.
▲
by
Peaker
11y ago
Sounds like a completely reasonable belief!
195.
▲
by
Peaker
11y ago
It sounds kinda analog to a one-time-pad vs. ordinary key encryption. Waiting for more "actual" entropy bits rather than stretching the existing entropy is like a one time pad, and it can (with a bit of effort, and assuming the i
196.
▲
by
Peaker
11y ago
I recall a Rails bug used to hack github and inject a bugfix commit. The Rails community rejected the fix originally because the crazy behavior was documented.
197.
▲
by
Peaker
11y ago
If I write a bunch of code in a macro, or a function that happens to get inlined -- much of its code may be irrelevant in the specific context into which it was inlined. I don't want to duplicate the code for every single context it is
198.
▲
by
Peaker
11y ago
Also, if tests take a while to run, it's nice to get the feedback from the compile step, rather than the run step. Also, perhaps some non determinism is allowed for the tests. Then runtime safety isn't equivalent to compile time
199.
▲
by
Peaker
11y ago
To add a couple of fun points about Haskell: * QuickCheck! Imagine you implement some function. As a trivial example, let's say you wrote a plus operator (spelled as (+) when not being applied). One of the properties it should have is
200.
▲
by
Peaker
11y ago
Just make an alias pushf = push --force-with-lease, and it becomes even less to type! :-)
201.
▲
by
Peaker
11y ago
Can you sprinkle parallelism annotations and have guarantees about semantics not changing while gaining parallel execution? Also, note concurrency and parallelism are two of many interesting benefits of purity. I'll also add unit tests
202.
▲
by
Peaker
11y ago
Purity is not just about laziness. It helps with things like concurrency, parallelism, equational reasoning, refactoring, understanding APIs, and more.
203.
▲
by
Peaker
11y ago
Doesn't seem that way to me at all.
204.
▲
by
Peaker
11y ago
He didn't ask which one is nicer to hack on.
205.
▲
by
Peaker
11y ago
> I'm sure you've heard stories about people coming home from Vietnam and being spit on. That is, by the way, a myth.
206.
▲
by
Peaker
11y ago
That's a great list, but the question was about stuff that's not in Haskell (among others) so a few nitpicks: * Haskell can run regular code at compile-time (But it is slow, using ghci/TH) * Haskell can add optimizations (rew
207.
▲
by
Peaker
12y ago
By the way, I relate to the sine as y projection of a unit circle too, far more than the triangle ratio. But I relate to it by thinking of the y coordinates of the points between x=-1..1 in a unit-circle, without any drawing utensils/p
208.
▲
by
Peaker
12y ago
Sure, I don't think it is very important where the abstraction occurs for this argument though.
209.
▲
by
Peaker
12y ago
> your intuition and unconscious perception of what an ellipse is will be tied to the process of producing it and a visual representation of this process What? I don't think this way at all, and I'm surprised anyone does! >
210.
▲
by
Peaker
12y ago
That's not "monads composing" there...
More ›