That is pretty awesome, and I love the fact he had to come back and say, no seriously guys, I was just kidding, no need to flood Erlang. Man I swear Erlang is highly underrated. I've not had the pleasure of building much with it, only read through parts of the book by Joe and kept up with some of his blogs and posts from time to time. Anybody who loves servers should really pay attention to his work.
Thanks, but we have our own importer. BTW, I'd suggest writing a metadata fallback in your library. You'd be surprised how many sites will work just on parsing json linked data or schema.org's Recipe format.
Keep the link as a reference but it also provides some good quizzes to learn and practice basic concepts. 8 years ago that's where I started learning HTML/CSS/PHP.
Well done on posting this! it's a great way to learn and share your experience of learning new languages and get feedback. (just take the comments by face value without any sentiments, you should learn from them, not make them discourage you, ignore "my eyes are bleeding" type of comments or "Scala is sooo complexxx" unless they have some really constructive criticism in them...)
One tiny cosmetic suggestion that popped to my eyes since you asked for comments :)
def parseInputRange (s: String): Array[Int] = {
val ab = s.split(":").map(_.toInt)
(ab(0) to ab(1)).toArray
}
the `to` method is inclusive on the end of the range, so it is the same as until x + 1
I did think about doing this as a phone app, since there are libraries for converting pictures of barcodes into the corresponding numbers.
The rub is you need a fairly accurate camera, and while it would probably be ok in iOS, the experience in android would vary depending on your hardware.
The dedicated laser scanner is cheap, accurate and reasonably compact (only the head is important, the rest of the handle is cabling and empty space), which is why I'd like to try combining it into a small handheld device, ultimately.
I agree this would better packaged as a phone app. There are several apps out there that scan barcodes to detect a product. Amazon's app is an example. There is a price comparison website in Brazil (buscapé) that also has an app which does that. I don't believe the camera needs to be that accurate, as I have used them on several Android devices, from lower- to higher-end phones.
For using the barcode, a dedicated scanner is clearly better (especially faster). Reading the barcode with the camera is reliable as a fallback, but many products have packaging that should be possible to recognize directly with a camera, especially for items you commonly buy.
I don't know, maybe that's overkill and just pointing the barcode at a dedicated reader is actually the better experience.
Actually, the post office may have noticed, but they probably don't care, since I'm not really cheating them out of revenue; they just charge Fidelity as if the envelope were legitimate.
Only Fidelity might complain, but they created these postage-free envelopes so customers like me would send them deposits, so they probably don't care, either.
It was a just a fun thing to try, and great to see that it worked!
https://news.ycombinator.com/item?id=512145
Unfortunately, I cannot find a screenshot or archived view now (web.archive.org took a capture on March 10th, and not again until the 14th).