Better HN
topnewbestaskshowjobs
Log inSign up

elitheeli

236 karma · joined Sep 3, 2010 (16y ago) · 19 submissions

Submissions

comment 11y ago · link · parent

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.)

comment 14y ago · link · parent

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 · 14y ago · discuss

comment 14y ago · link · parent

I really should have refreshed the comments page before shortening... seems like we think similarly: https://gist.github.com/1803557

comment 15y ago · link · parent

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.

comment 15y ago · link · parent

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 todo list, as well as email notification, persistent countdowns (you go to /23h and it'll redirect you to a permalink for that timer), email/SMS notification. Next time I have an hour to dedicate to this, I'll them done.

I always have a browser open, so being able to see the countdown status in the titlebar was sufficient for my needs. If I really wanted something to alert me, I'd use my phone in case I step away from my computer.

EDIT: Yeah, looks like Firefox performs awfully with this.

EDIT2: seems to be fixed on FF now.

7.

One-hour Project: really fast timer

12 points · by elitheeli · 15y ago · 7 comments

comment 15y ago · link · parent

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?"

comment 15y ago · link · parent

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 simulating a cyclic tag system with only 15 unique characters including newlines and spaces: https://github.com/elitheeli/oddities/raw/master/only_a_few_...

EDIT: down to 14 characters.

comment 15y ago · link · parent

Sorry, you're totally right. My bad.

comment 15y ago · link · parent

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.

comment 15y ago · link · parent

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'm pretty sure that if you restrict yourself to under 12 characters, it's still possible.

comment 15y ago · link · parent

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.

comment 15y ago · link · parent

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.

comment 15y ago · link · parent

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 complete (able to express basically any computation that we might want to perform of any size). That's because there are finitely many atoms in the universe, so we can only construct machines of finite size.

It's well known that Rule 110 (Google it) is Turing Compete.

What I've done is made an implementation of Rule 110 in HTML and CSS. Since CSS can't actually really manipulate state, some user interaction is required to "drive" it. In the one that bgruber linked to, it's clicking.

Here's a bigger version that doesn't require the user to know where to put his mouse. The tab-space combo is just as legitimate as requiring that you plug a computer into a wall to power it in order to run a Java program. http://elilies.com/rule110-full.html

Also, I haven't tested it on anything besides the latest Chrome on Mac.

comment 15y ago · link · parent

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 evil".

comment 15y ago · link · parent

Thanks, we'll try to get these fixed ASAP.

comment 15y ago · link · parent

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