Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
elitheeli
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
elitheeli
11y ago
If you take version 4, stop the first while loop once the size is at most 32, and then do linear search from there, it's faster (on my machine). For example, version 4 is 102ms and this tweak puts it at 83ms. (On clang x64.)
2.
▲
by
elitheeli
14y ago
Almost a year ago I tried to see how short of a cyclic tag system I could make in Ruby. The result: https://github.com/elitheeli/stupid-machines/blob/master/sho...
3.
▲
Request: Data on quoted email replies
2 points
by
elitheeli
15y ago
|
0 comments
4.
▲
by
elitheeli
15y ago
I really should have refreshed the comments page before shortening... seems like we think similarly: https://gist.github.com/1803557
5.
▲
by
elitheeli
15y ago
Hadn't seen that. Doesn't show up when searching for "timer" or "countdown". If I'd seen these, probably wouldn't have wasted an hour.
6.
▲
by
elitheeli
15y ago
I didn't bother to test in anything besides Chrome on Mac. I was going to put in an audio alarm, but then I'd have to put in a button to disable audio, then I'd have to make it look pretty, and find a good alarm sound. That feature is on my
7.
▲
One-hour Project: really fast timer
12 points
by
elitheeli
15y ago
|
7 comments
8.
▲
by
elitheeli
16y ago
I should have phrased as "what is the minimum number of characters that need to be seen by a Ruby parser in order to have something Turing equivalent to Ruby without a limited character set?"
9.
▲
by
elitheeli
16y ago
But what's in that string? That still counts. What I should have done was put an additional restriction on what IO is available. Otherwise, something like "eval `cat f`" or something could be all powerful. My first attempt shows Ruby simula
10.
▲
by
elitheeli
16y ago
Sorry, you're totally right. My bad.
11.
▲
by
elitheeli
16y ago
When I say "Turing complete", I mean Turing equivalent to a Turing machine. Since there are infinitely many Turing machines but I'm pretty sure humanity has access to a finite amount of state. I mean it strictly in the theoretical sense.
12.
▲
by
elitheeli
16y ago
TeX is very Turing complete. As is Java sans semicolons, C macros, and many other things that probably shouldn't be. Right now, I'm trying to figure out what the minimum number of characters you need in Ruby is to make it Turing complete. I
13.
▲
by
elitheeli
16y ago
I tried to do a little bit better of a job explaining it above. I was caught off guard... I intended to post this in a few days with a proper explanation.
14.
▲
by
elitheeli
16y ago
Is my MacBook Pro any more Turing complete? All of the memory came with it. There's no way to expand the memory as it's running.
15.
▲
by
elitheeli
16y ago
Way to steal my karma.... :) As the original author of this, I was going to put it into a much more presentable state before showing it off here. For those confused, here's a proper explanation. No real-world thing can actually be Turing co
16.
▲
by
elitheeli
16y ago
ActiveRecord (Rails) provides counter caches for this instance. There are also gems that will analyze the queries your ORM performs to tell you which ones you should optimize. I tend to stick with "premature optimization is the root of all
17.
▲
by
elitheeli
16y ago
Thanks, we'll try to get these fixed ASAP.
18.
▲
by
elitheeli
16y ago
I'd also like to thank everyone in advance for feedback. In exchange, here's a clickable link: http://statusdot.com
19.
▲
Ask HN: support time / cost per user
6 points
by
elitheeli
16y ago
|
2 comments