Hacker News new | past | comments | ask | show | jobs | submit | justwrote's comments login

There are also faker libraries for various languages, e.g. the famous https://github.com/stympy/faker, https://github.com/fzaninotto/Faker and a little port in Scala (created by me) https://github.com/justwrote/scala-faker


You can also find the duodecimal system in languages like English and German:

  ten, eleven, twelve | thirteen, fourteen, fifteen, sixteen
  zehn, elf, zwölf | dreizehn, vierzehn, fünfzehn, sechzehn


"Germanic languages have special words for 11 and 12, such as eleven and twelve in English, which are often misinterpreted as vestiges of a duodecimal system. However, they are considered to come from Proto-Germanic ainlif and twalif (respectively one left and two left), both of which were decimal."

http://en.wikipedia.org/wiki/Duodecimal#Origin


Interestingly enough, in French you find the hexadecimal system:

  dix, onze, douze, treize, quatorze, quinze, seize | dix-sept, dix-huit, dix-neuf


In Spain on contrary, pentadecimal:

  diez, once, doce, trece, catorce, quince | dieciséis, diecisiete, dieciocho, diecinueve


In Latin seventeen is septendecim, and sixteen is sedecim (fifteen is quindecim). Language drift has shortened most French words from their Latin ancestors, and the same goes for the numbers for 10-20. I presume that the early French chose to use dix-sept when their words for septendecim and sedecim started to sound the same.

As for dix-huit and dix-neuf, the Romans counted down from twenty; duodeviginti (two-down-from-twenty) is eighteen and undeviginti (one-down-from-twenty).

So it probably made more sense to the early French to say dis-huit and dix-neuf instead.

But one interesting thing about French numbers that you have missed is that it possess a vestigial remnant of the vigesimal (base-20) number system of the Celtics, where 80 is quatre-vignts (four-twentys) to the French, and 90 is quatre-vignts-dix.


This actually goes for beyond that!

70 is sixty-ten (soixante-dix), then 71 is sixty-eleven... and so on, up to 99: four-twenty-nineteen. Indeed, 80 is 4 times 20, hence "four-twenty" (quatre-vingt, without the "s" at the end).

Interestingly enough, French-speaking Belgians use the regular forms: 70 is "septante", 80 is "octante", and 90 is "nonante".


Is that actually a vestige of a hexadec system, or just a strange quirk? Note that 2 sounds similar to 12, 3 to 13, and so on. That implies there's a relationship between those numbers, which only exists in decimal.


In Russian, decimal:

восемь (8), девять (9), десять (10) | одиннадцать, двенадцать, тринадцать, четырнадцать, пятнадцать, шестнадцать, семнадцать, восемнадцать, девятнадцать.


Dutch too: tien, elf, twaalf | dertien, veertien, vijftien, zestien


Just wondering, is it better to use relative or absolute URLs ?


Technically, there is no difference at all in how they function.

But I only use //example.com/ if an API is truly available on both http and https (very unlikely, nearly all APIs should be on https only if they use some form of access token in the querystring for auth), and I only use https://example.com/ if the end point exists on some other domain.

As there is no technical difference I opt to save some bytes in the bandwidth.


Shameless plug: I also created a similar library for Scala some time ago https://github.com/justwrote/scala-faker

Need to update to 2.10 soon :)


So, twitter has a nice tutorial called Scala School (http://twitter.github.com/scala_school) and of course the official site (http://docs.scala-lang.org/tutorials/) has also some tutorials for programmers coming from other languages.

So what's the best IDE? If you're an eclipse user, it's Scala IDE (http://scala-ide.org/). You can find a full download eclipse + Scala IDE plugins on the typesafe homepage (http://typesafe.com/stack/scala_ide_download). If you're an IntelliJ user like myself you just need to install the Scala plugin.

Both IDE's have there drawbacks, none is perfect. I guess the easiest way to start is using the Scala IDE.

To test your new Scala skills you may want to solve some puzzles (http://scalapuzzles.org).

Have fun!


I was also shocked when I read this article. Didn't know those boxes don't exist in the US. They are quite convenient!


Ah, I'm not the only one who thinks ORMs suck! That's why I love the latest development in the Scala community towards a non-ORM solution for persistence: Slick (http://slick.typesafe.com) and Play! Anorm (http://www.playframework.org/documentation/2.0/ScalaAnorm)


I don't hate ORMs, but I hate when they are too intrusive. What I like about Ebean is that it was designed to only handle the simple stuff "ORMish" and provide a very smooth and easy breakdown to raw SQL so you get the best of both worlds. I also love "autotune", it tracks your call stack for queries and after it has enough statistics it'll start only fetching the fields that you actually ended up using. So if you have an object with 25 fields and one page A you only use 5 of them, it'll only fetch those 5, but since its based on a the call stack and not hardwired into the model, it can can track that you used 5 different fields on page B and optimize that query too.


I didn't quite understand it. From your example, it looks like ORM layer knows about 'pages', which are in views. Isn't it against clean separation of concerns?


It doesn't know about pages, it knows about the stack trace that resulted in a query being generated, e.g. it know that a specific method in the ProductController called a specific method in the ProductService, etc, leading to a query being generated.

It also know which fields of the object it returned were accessed prior to going out of scope and more importantly, which fields were never accessed. With those two bits of information gathered over many calls it can figure which fields are actually worth fetching from the database and which should be left off and fetched lazily in the odd case that they are needed.


I see. Ebean looks interesting! I'm kinda stigmatized because of Hibernate and therefore avoid any persistence library that calls itself an ORM :)


I'm living in Germany and to support this 'Energiewende', I'm only buying green electricity. It is more expensive but I'm happy to pay more if I can boost the industry around it and also help our environment. Many young people think like this.


another nice example: http://beetle.com/


Ugh, I think this site really gives credence to the top poster's concerns: it's whiz-bang cool at the expense of actual usability.

Chrome/Win7/Quad-Core i7 3.4GHz + 8GB DDR3 RAM

and the whole thing chugs, to the point where the website is difficult to navigate and parse.


Huh, works pretty well for me. Chrome/Ubuntu 10.10/boring old Core Duo Mac Mini.


For me, the eclipse plugin is crashing (or the whole IDE is freezing for a few seconds) too often when I try to get code completion. On the other hand, in IntelliJ the Scala plugin is pretty good! (Use the nightly builds!)


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: