HNHacker News
TopNewBestAskShowJobs

einaregilsson

703 karma · joined December 6, 2010

submissionscomments
einaregilsson··on Show HN: Make Your Photo 16x9
Does the Canvas api have support for webp?
einaregilsson··on Show HN: Make Your Photo 16x9
Fair point, although I like the blur effect. But you can also fill in with a solid color or transparency.
einaregilsson··on Show HN: Make Your Photo 16x9
Thanks It was fun to build.
einaregilsson··on Show HN: Make Your Photo 16x9
Good idea. I've just changed it so now you can keep pushing the blur button and it will increase the blur by 1px for each push.
einaregilsson··on Show HN: Make Your Photo 16x9
The site itself is at https://photo16x9.com
einaregilsson··on Show HN: A simple chess game with multiplayer
The single player mode is just for beginners, but I do think we have a pretty nice multiplayer feature, where you can easily challenge others and start a new game without creating an account (we don't have accounts).
einaregilsson··on Serverless: slower and more expensive
The alternative to serverless isn't "single instance". With Elastic Beanstalk you can have multiple instances, autoscaling etc.
einaregilsson··on Serverless: slower and more expensive
> This feels very "Serverless is cool, everyone is saving money on it, lets do the same

More like "seems like there's an easy way for me to try this new thing out, lets give it a shot". It took a couple of hours to switch over to this, and I learnt something in the process. Also, our API is very simple, pretty much all the actions are a single database call, so I don't think in this case we would have gained anything by splitting things up into more pieces. But I can see how it would make sense for a larger, more complicated app.

einaregilsson··on Serverless: slower and more expensive
Yes, ALB would have been a much better fit for us. We used API Gateway because that's what the serverless framework sets up (at least by default) and I didn't know you could use ALB in front of Lambda.
einaregilsson··on Serverless: slower and more expensive
> requires a complete re-architect of your stack.

Not necessarily. The reason I decided to try this was exactly because I found a tutorial showing you could easily host a bog-standard ASP.NET web app on Lambda with the serverless framework. I had to add a small startup class, and one config file to our existing app and I was up and running.

einaregilsson··on Serverless: slower and more expensive
Yeah, that would have been a much better fit. I just didn't know you could put ALB in front. (Also, a "load balancer" in front of serverless... , and yes I know load balancer do more than load balance.)

I mainly went with API Gateway since that's the default setup the serverless framework uses.

einaregilsson··on Serverless: slower and more expensive
There are definitely still things you need to think about with Lambda, like how much memory you want to allocate etc.
einaregilsson··on An easter egg for one user: Luke Skywalker
Thanks :)
einaregilsson··on An easter egg for one user: Luke Skywalker
There are no user accounts on the site, and there is no tracking of any users. I simply saw the avatar image that he posted and targeted that, so probably a few random users got Darth Vader as well.

Also, even if there were user accounts, this is a one man shop, so it would be hard for me to build a firewall between myself and myself :)

einaregilsson··on An easter egg for one user: Luke Skywalker
I agree :) This was definitely luck, most people never get celebrities tweeting about their games. And I guess now I am getting some marketing value out of it, but honestly I just wanted to share this with an audience that I knew would appreciate it. When you program cool stuff you want to share it!

In any case, I guess I'll get some extra traffic today, but at the end of the day it's a Yahtzee game, nothing exactly groundbreaking, so I don't think all the people that saw this post are going to start playing Yahtzee all the time ;)

einaregilsson··on An easter egg for one user: Luke Skywalker
Well, given that he retweeted a tweet that had the explanation of how it worked, and he added the #BestFansInTheGalaxy hashtag I think he's OK. But really, I probably wouldn't have done anything like this for another celebrity, if Bruce Willis had tweeted I wouldn't try to make a Hans Gruber avatar or anything :D
einaregilsson··on An easter egg for one user: Luke Skywalker
Yeah, this was not so much marketing as luck and wanting to make a cool easter egg.
einaregilsson··on An easter egg for one user: Luke Skywalker
Exactly. Each avatar is made up of 6 features, hair, hair color, skin color, eyes and mouth. No nose, because who needs them! So each part has a code, and I can store a face as a simple 6 character string. Then I just compared against the ids of the eyes, hair and smile. I actually allowed any glasses and any smile because I wasn't absolutely sure which one he'd used :)
einaregilsson··on SVG changes color when rotated in Safari 10
A user on my site ran into this while playing Go Fish. He was pretty surprised to see this: https://dl.dropboxusercontent.com/u/6430877/screenshot.png
einaregilsson··on SVG changes color when rotated in Safari 10
Haha, we have the same thing in Iceland. It basically turns it into "Two tomatoes were walking across the road when one was hit by a car. The other one said, 'come here you tomato sauce'", which is a terrible terrible joke :)

My daughter messed it up even more and started with "Two tomato sauces were walking across the road..." at which point it's no longer a joke, just a story about a traffic accident...

einaregilsson··on SVG changes color when rotated in Safari 10
Probably. I'm using 10.0 (11602.1.50.0.10), which is what I got when I upgraded through the App Store this morning.
einaregilsson··on SVG changes color when rotated in Safari 10
No, it doesn't work on all builds of 10. I have Safari 11602.1.50.0.10, which is WebKit 602.1.50, it happens there at least.
einaregilsson··on SVG changes color when rotated in Safari 10
OP here. "How it happens" is not "why it happens". The svg renderer is switching the values of R and B, that's why it turns blue instead of some other color. Why the renderer does that, I have no idea :)
einaregilsson··on Writing a browser extension for three browsers
But you need a Apple developer license to develop for Safari, and that costs 99$ per year :/
einaregilsson··on Writing a browser extension for three browsers
The old Firefox extension model, XUL/XPCOM is definitely a lot more powerful. You can basically access anything and do anything. On the other hand much of it is not documented and you're on your own in figuring out how it works. But they're trying to move people off that model, and onto the Add-on SDK or the chrome model, which is a lot easier to work with, and better documented.
einaregilsson··on Writing a browser extension for three browsers
Sorry, that was unnecessarily snarky. But it does seem like Chrome is leading and Firefox is following on a lot of things. The look, multiprocess, extension model, all things that started in Chrome.

I was pleasantly surprised by Jetpack though, the jpm tool is very nice.

einaregilsson··on Writing a browser extension for three browsers
Yes, I'm hoping to remove the polyfill for Firefox at some point, and add support for Edge when they have extension support. We'll see how closely they stick to the chrome.* apis. Firefox is implementing them but there are always some slight differences, e.g. in Chrome you can redirect in the onBeforeRequest event but you must do it in onBeforeSendHeaders in Firefox. It probably won't be possible to have the exact same code for all browsers without any special cases, but hopefully we can get pretty close :)
einaregilsson··on Writing a browser extension for three browsers
Should maybe have been 2 and a half browsers. There are some slight differences, e.g. the way options pages are opened from the extension page, but basically Opera is just Chrome. What is the point of Opera, I don't really know why anyone would use it, but it was basically free to make the extension work for it, so I decided to include it.
einaregilsson··on Writing a browser extension for three browsers
Firefox is also starting its third extension model now. At first it was XUL/XPCOM where extensions could basically hook into ANYTHING in the browser, then there was the Add-on SDK (formerly Jetpack), which is kind of nice, but a lot more limited, and now they're going with WebExtensions, because, well, Firefox basically does nothing but copy Chrome anymore ;)

But yes, that does make it complicated to figure out what's the best way to make stuff for Firefox.

einaregilsson··on Ask HN: Why are Twitter bots tweeting my stuff?
Yeah, it must be some kind of starting up thing, behaving normally for a few days or weeks. But even so, these are then really bad at it. ClintonGoodhue for example has one tweet, which is a link to my game, no profile picture and only follows one person. Maybe it's just someone's first attempt at creating bots :)
Page 1 of 2Next →