Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
martinhath
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
martinhath
7y ago
Ah, I knew my analogy would bite me :) I didn't mean IO as in "can change at any moment", but as in "read from a file but you have no idea what it is". You definitely _can_ look at each function in isolation (in th
62.
▲
by
martinhath
7y ago
I think I'm mostly asking why this isn't a good solution for Rust, as I think C and C++'s design decisions should be absolutely irrelevant for it's development. However, since rustc uses LLVM, this seems to be difficult
63.
▲
by
martinhath
7y ago
Of course it's faster - any program can be compiled into something "faster" by making the entire thing do nothing. What I mean is, why isn't uninitialized memory properly defined to be an arbitrary fixed string of bytes?
64.
▲
by
martinhath
7y ago
Why aren't undefined bytes like these treated in the same way as I/O data? That is, arbitrary but fixed data? This seems to align fairly well with how I think about uninitialized data.
65.
▲
Desktop Institute: Values, Features, and Preferences
(desktop.institute)
1 points
by
martinhath
7y ago
|
0 comments
66.
▲
by
martinhath
7y ago
Using the doubling trick you can compute `2^i` in `log i` time, so you can compute `2^(2^i)` in `log 2^i = i` time. Let `i` be big enough, and you've got a "difficult" problem.'
67.
▲
by
martinhath
7y ago
The reason this isn't the same is that addition is associative, so you can parallelize it like this: `((1+1)+1)+1 = (1+1)+(1+1)`. A fast way to calculate something like `g^x` for some large `x` is to iteratively square: g^1 g^2
68.
▲
Code Generation and Merge Sort
(mht.technology)
2 points
by
martinhath
7y ago
|
0 comments
69.
▲
by
martinhath
8y ago
It is curious that while HN as a whole seems to be on the same side regarding the Google vs. Oracle case, they also are quick to jump on this bandwagon, but in the other direction. Is it lame to blatantly copy someones API docs? Sure. But e
70.
▲
Everyone Watching This Is Fired
(gdcvault.com)
3 points
by
martinhath
8y ago
|
0 comments
71.
▲
Other Quotes from “Structured Programming with Go to Statements”
(mht.technology)
2 points
by
martinhath
8y ago
|
0 comments
72.
▲
by
martinhath
8y ago
Or what about LWN or YCombinator? Both of those are pretty simple to memorize.
73.
▲
by
martinhath
8y ago
Probably in the original announcement[0], or maybe in the HN thread [0]: https://drewdevault.com/2018/11/15/sr.ht-general-availabilit...
74.
▲
by
martinhath
8y ago
I think this is from the back of Physically Based Rendering[0] by Pharr, Humphreys, and Jakob (3rd ed). The book is also available online[1]. [0]: https://www.pbrt.org/ [1]: http://www.pbr-book.org/
75.
▲
GPS freaking out? Maybe you’re too close to Putin
(nrkbeta.no)
8 points
by
martinhath
9y ago
|
0 comments
76.
▲
How Much Abstraction Is Too Much?
(mht.technology)
8 points
by
martinhath
9y ago
|
0 comments
77.
▲
Implementing content aware image resizing
(mht.technology)
16 points
by
martinhath
10y ago
|
0 comments
78.
▲
by
martinhath
10y ago
If you are not sure whether the index is in bounds or not, you could use `slice::get`, which returns an `Option<&T>`. Sure, it's a little more typing compared to `[i]`, but how would one solve this in any language? https:&#x
79.
▲
by
martinhath
10y ago
Oh well - not getting karma on HN isn't the worst thing that could've happend :)
80.
▲
by
martinhath
10y ago
Ooops :( One of many minor bugs, I suppose.
81.
▲
by
martinhath
10y ago
It's worth mentioning, those numbers are for my test program which only read a single file, using my and his implementations. In addition, the file read was 20MB. lena.jpeg is 90K.
82.
▲
by
martinhath
10y ago
Author here. I am having some trouble reproducing the 2 seconds number, but with optimizations I'm getting around 1.5 seconds (without, I'm up to 5!), and as balducien mentions, /u/DroidLogician pointed out a _huge_ perf
83.
▲
Writing a JPEG Decoder in Rust – Part 2: Implementation I
(mht.technology)
15 points
by
martinhath
10y ago
|
1 comments
84.
▲
by
martinhath
12y ago
Some of the paragraphs, ie. the first and second, are really good. Some others, aren't. >Physicist Richard Feynman voiced the feelings of many a self-absorbed scientist when he wrote a book titled, What Do You Care What Other People
85.
▲
by
martinhath
12y ago
I'm halfway though this book, and I'm pretty pleased. http://www.amazon.com/Applied-Cryptography-Protocols-Algorit...