News for hackers. Stuff that matters.

bytex64

Re:Blërg, a microblogging platform on Monday January 11, 2021 @02:37PM (#25735048)
Hey guys! Glad (and a little panicked) to see this get some more attention. I've shut down signups/logins because I don't have time to moderate, and right now you really have to moderate. :|

So long and thanks for all the barfs. :)

Re:Blërg, a microblogging platform on Monday January 11, 2021 @02:28PM (#25734885)
Despite my ex-roommate's well-intentioned defense, I was probably sober for most of it. It was also a decade ago and I'm somewhat wiser now. As mentioned elsewhere, I learned a lot about making such bold claims to the Choir of Ultimate Pedants. But it was something I had fun with, and I think the world needs more of that. :)
Re:Blërg, a microblogging platform on Monday January 11, 2021 @02:11PM (#25734532)
Sorry about that! Should be working now.

Here's something I never thought I'd say: Perl made breaking changes. My guess is additional strict things broke the gitweb CGI script (which was hopelessly out of date anyway).

Re:Responsibly Bringing a new Cryptography Product to Market on Thursday February 20, 2014 @12:32PM (#7272196)
> I can't be the only one who refuses to use their service because of it

Certainly not, but the vast majority of people seem to be willing to trust them and pay for service, so I can understand why it's not a priority. I'm not trying to say you're wrong -- I'd like to see source for SpiderOak, too -- I'm just saying that I understand why it hasn't happened.

Re:Crypto Analysis and Recommendations for Mega on Wednesday January 23, 2013 @04:00PM (#5105237)
I tend to trust in incompetence over conspiracy. With Kim Dotcom, though, who knows?
Re:Crypto Analysis and Recommendations for Mega on Wednesday January 23, 2013 @03:39PM (#5105137)
Without real privacy, it doesn't protect him or his users.
Re:Crypto Analysis and Recommendations for Mega on Wednesday January 23, 2013 @03:11PM (#5105020)
Release early, release often works pretty well when the whole world is waiting for you to make a mistake. They are certainly getting a lot of valuable advice for free.

It would have been better for their users, however, if they'd tried to get this right before releasing. Mega smells very much like marketing over technology.

Re:Snake game in a data: URI on Friday December 09, 2011 @05:55PM (#3336043)
Yep, that was an accident. I've removed the parameter entirely. Nice catch!
Re:Snake game in a data: URI on Friday December 09, 2011 @05:53PM (#3336040)
I've merged in your changes and made a few improvements, too. I streamlined the timeout handling so that it uses setTimeout instead of clearing and resetting setInterval. I also used color literals instead of CSS rgb(). I removed the reset to black in I() since recreating the canvas context does that automatically.

Thanks, biot, you are officially awesome!

Re:Snake game in a data: URI on Friday December 09, 2011 @04:53PM (#3335801)
Sure thing. What was ww=0; trying to do? It seems to be the only place ww is referenced.
Re:Snake game in a data: URI on Friday December 09, 2011 @04:20AM (#3333155)
I thought the same thing until I watched a talk a few weeks ago about HTML5, and the guy demonstrated the world's smallest text editor:

  data:text/html,<pre contenteditable>
Re:Snake game in a data: URI on Friday December 09, 2011 @03:38AM (#3333071)
Ah, I used 11.60. It just came out a few days ago, and it may have added bind(). I seem to recall they added some ES5 features in this release. Go upgrade! :]
Re:Snake game in a data: URI on Friday December 09, 2011 @03:37AM (#3333067)
Very nice. I also see you got a few other tricks that I missed, like factoring out the random number generator. I am impressed.
Re:Snake game in a data: URI on Friday December 09, 2011 @03:35AM (#3333064)
I read somewhere that most browsers have a practical limit to what you can paste in. What I should have written was that it would fit in an address bar. shrug
Re:Snake game in a data: URI on Friday December 09, 2011 @03:13AM (#3333032)
I thought about it. It's been so long since I've played Nokia snake that I didn't remember whether it queued inputs or not. I decided not to bother since it would make input handling more complicated.
Re:Snake game in a data: URI on Friday December 09, 2011 @03:10AM (#3333029)
If you're curious, the "readable" version is here: http://bytex64.net/code/datasnake/snake.html

I started out writing it as straightforward as possible, then applied functional tricks to slim it down. That was a lot of fun. I'm not sure how to post a code snippet here, but I'll try to illustrate one of my favorite portions.

In the original, I did key input with a switch statement. That got replaced by:

    { 37: P(-1,0), 38: P(0,-1), 39: P(1,0), 40: P(0,1) }[e.keyCode]
"But wait!" you're thinking, "What happens when e.keyCode is less than 37 or more than 40?" What happens is it evaluates to undefined, and it errors out in the M() function, effectively short-circuiting it. If you look in your browser's error log, it'll spew an error every time you hit another key. It's lazy, but it works. :]
Re:Snake game in a data: URI on Friday December 09, 2011 @02:58AM (#3333011)
That's weird. I developed it in Opera.