HNHacker News
TopNewBestAskShowJobs

luiz-pv9

51 karma · joined July 30, 2013

submissionscomments
luiz-pv9··on Show HN: Tile38 – A geolocation DB with spatial index and realtime geofencing
First of all, great project. I noticed under Features in the readme:

* Written 100% in Go.

Is Go so great that it becomes a feature of the final product?

luiz-pv9··on LOL Colors: Curated Color Palettes
Don't forget the LMAO ones.
luiz-pv9··on DRYing Elixir Tests with Macros
I'm always very careful when placing code supporting the test outside of the test itself. Setup and teardown functions are fine, but I prefer to be safe because, well, you can't test the test.

-- I'm not saying this is the case in the blog post. Just some thoughts.

luiz-pv9··on An 'in' operator for Ruby

  if x.in? my_set   # very ugly
I guess we disagree there. This is arguably more readable than most languages with `in?` being still just a method.
luiz-pv9··on Why Learn to Program in C?
C was the first official language I learned in school. It was very hard at first, mainly because I couldn't see how everything (memory management, pointers, references, data structures, etc.) would fit in a real world scenario. We didn't learn about Make and building automation until 3 months in the course. `gcc myfile.c -o myfile` was all we did, one concept at a time.

Maybe programming 101 should start with a higher level language and dive slowly on "how does that work?".

luiz-pv9··on Pyro: A Spatial-Temporal Big-Data Storage System
I don't have time right now to fully read the paper, but a quick glance at the abstract: "Our evaluations use NYC taxi trace data and an 80-server cluster. Results show that Pyro reduces the response time by 60X on 1km×1km rectangle geometries compared to the state-of-the-art solutions".

Congratulations to the authors.

luiz-pv9··on RethinkDB 2.2: atomic changefeeds, parallel scans, improved runtime
In case anyone is interested, they're going to do a live stream on youtube about this release in a couple of hours: https://www.youtube.com/watch?v=jt9EnhX24HU
luiz-pv9··on Randexp.js: Create random strings that match a given regular expression
That's true. What I meant was that this tool is good to support testing the same way factories work: generating random valid emails, phones, addresses, etc., for each record.
luiz-pv9··on Randexp.js: Create random strings that match a given regular expression
According to the readme:

"Regular expressions are used in every language, every programmer is familiar with them. Regex can be used to easily express complex strings. What better way to generate a random string than with a tool you can easily use to express the string any way you want?"

An example where this is useful (I guess) is generating data for tests. You can easily define an email regexp to generate random "valid" values for each model.

luiz-pv9··on Bootstrap 4 alpha
"Dropping support for IE8 means we can take advantage of the best parts of CSS without being held back with CSS hacks or fallbacks".

This sure contributed to reducing the size.

luiz-pv9··on Magnus Carlsen is World Chess Champion
Combinations with insufficient material to checkmate are:

king versus king; king and bishop versus king; king and knight versus king; king and bishop versus king and bishop with the bishops on the same colour. - wikipedia

luiz-pv9··on From STUPID to SOLID Code!
About the square/rectangle example, what would be the solution? The Square subclass should not verify equality with width and height or it should not even exist? Or something else?

-- edit Wikipedia: If Square and Rectangle had only getter methods (i.e., they were immutable objects), then no violation of LSP could occur.