HNHacker News
TopNewBestAskShowJobs

rbonvall

941 karma · joined February 14, 2009

Roberto Bonvallet — http://mez.cl/a
submissionscomments
rbonvall··on B.C. woman buried in Amazon packages she did not ask for and does not want
Not only a name, there's also an xkcd! https://xkcd.com/2793/
rbonvall··on Classic fountain pens
No, the TWSBI Eco can only be filled from a bottle.

The TWSBI Swipe supports both cartridges and converters.

rbonvall··on Classic fountain pens
Objective advantages are: more ink capacity, more variety of ink colors, reduced plastic waste (if you use bottled ink).
rbonvall··on Classic fountain pens
You can improve just by learning the right technique (how to hold the pen, how to write by moving the arm rather than the wrist) and learning the proper letter shapes. That won't take more than a couple of hours, and from then on you just get practice by applying what you learnt whenever you have to write something down.
rbonvall··on Why SAT Is Hard
That would be expanding the abbreviation, not explaining it. If context calls for it, one could write "extract this tar ball (a file format for packaging many files into a single one)"
rbonvall··on Shells are two things
If I remember correctly, git was originally distributed as several small programs like git-checkout, git-reset, etc., some written in C and others in shell.
rbonvall··on Idris: A language for type-driven development
I think you will enjoy this talk: https://www.youtube.com/watch?v=IOiZatlZtGU
rbonvall··on If PHP Were British (2011)
The "formal proposal" part was my December Fools joke.
rbonvall··on If PHP Were British (2011)
There was a formal proposal to adopt a German syntax for Scala:

https://www.scala-lang.org/blog/2017/04/01/announcing-skala....

rbonvall··on 10 KB Club: Curated list of websites whose home pages do not exceed 10 KB size
Not as bad as the website listing websites that do not list themselves.
rbonvall··on APL deserves its renaissance too (2018)
But regular expressions, one of the culprits of Perl unreadability, have not faded, and are very much alive in all languages, and usually in ways that make them even less readable than in Perl (e.g. requiring backslashes to be escaped, or without support for verbose formatting).

Sometimes we all just put up with the unreadable mess when it solves the problem at hand quickly.

rbonvall··on The first rule of Microsoft Excel: Don’t tell anyone you’re good at it
LET is a great syntactic improvement, but the UI is still the same. I'd love if the formula box supported the basic things one expects from a code editor, like syntax highlighting, formatting, indentation, comments, etc.
rbonvall··on Learn how to unleash the full potential of the type system of TypeScript
> Almost all bugs are logic bugs or inconsistent state bugs (thanks OOP!), almost none are type bugs.

The whole point of using types is making inconsistent states type bugs. Types are logic.

This article presents a great example: https://fsharpforfunandprofit.com/posts/designing-for-correc...

rbonvall··on Tell HN: Sudden Chile daylight savings time rules change causes chaos
This time there was a good reason for postponing the switch. Originally it would have been the same day of the constitutional referendum. It was a good call to remove one potential factor of chaos from that day.

Having to deal with online calendars being off by one hour for a week is not that bad in comparison, we are already used to that :)

rbonvall··on Functional programming jargon in plain English
Let me present this intuition I've developed.

• You have a producer of Cs, then you can turn it into a producer of Ds by post-processing its output with a function g: C → D.

• You have a consumer of Bs, then you can turn it into a consumer of As by pre-processing its input with a function f: A → B.

• You have something that consumes Bs and produces Cs, then you can turn it into something that consumes As and produces Ds using two functions f: A → B and g: C → D.

With pictures: http://mez.cl/prodcons.png

If you understand that, you understand functors:

• producer = (covariant) functor;

• consumer = contravariant functor;

• producer-consumer = invariant functor;

• post-processing = map;

• pre-process = contramap;

• pre- and post-processing = xmap (in Scala), invmap (in Haskell);

• defining how the pre- and post-processing works for a given producer or consumer = declaring a typeclass instance.

It doesn't mean that "a functor is a producer", but the mechanics are the same.

rbonvall··on Racket Is an Acceptable Python (2019)
Here you go: https://fsharpforfunandprofit.com/posts/designing-for-correc...
rbonvall··on Spreadsheets Are Hot–and Cranking Out Complex Code
In my experience, just offering the ability to export to and import from Excel workbooks goes a long way in winning the spreadsheet-loving crowd.
rbonvall··on When or If
There is a precedent for this: British PHP.

https://aloneonahill.com/blog/if-php-were-british/

rbonvall··on Vim – Minimal Setup Explained
I've been using this mapping for so long and it's so ingrained in my brain that I completely forgot about it. It used to happened that I'd start typing jjjjj into a textarea or a word processor, and it took me a while to realize what was wrong.
rbonvall··on Who Uses To-Do Lists?
One single fractal to-do.
rbonvall··on Grep one-liners as CI tasks
Maybe because of the use of the "double bang" pattern to convert a value to boolean:

    !!41 === true
    !!0  === false
rbonvall··on 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
I think automatic string concatenation and singleton tuples were not introduced according to some high-level goal. They are just historical baggage. Automatic string concatenation comes from C, and the singleton tuple syntax probably just seemed like a good idea at first.

In hindsight, singleton tuples are not common or useful enough to deserve their own syntax. If the way to create them was something like this:

    t = tuple.single("hello")
we'd thing it's ugly or inconsistent, but definitely not confusing or bug-prone.
rbonvall··on Ask HN: Could VSCode be the new Emacs?
Don't worry. eat and drink are just old commands, but rewritten in Rust.
rbonvall··on Nomad vs. Kubernetes
Crockford himself says JSON was not invented but rather discovered.
rbonvall··on How does apt render its fancy progress bar?
Standardness notwithstanding, using tput is more readable and memorable. I can type this from memory:

    echo "I'm $(tput setaf 4)blue$(tput sgr0)."
but I couldn't get this one right without looking it up:

    echo -e "I'm \033[0;34mblue\033[0m."
rbonvall··on A case against syntax highlighting (2007)
I'd suspect it's the opposite, they may be too sensitive to color.
rbonvall··on IEEE 754 round-off errors
They are approximate in the sense that the float literal 1.1 is not equal to the real number 1.1.
rbonvall··on IEEE 754 round-off errors
When I create my own programming language, the syntax for float literals will be:

    ≈3.14159
rbonvall··on Crossing an entire country in a straight line
Since this is done for fun and not for any kind of official recognition, it counts if you think it does.
rbonvall··on Ask HN: Could downvoting be required to include a comment?
People don't tend to react well to feedback from a random internet person, no matter how respectful or well-intended it is. Especially the ones that also don't react well to a minus-one fake internet point from an unidentified user.
← PreviousPage 2 of 11Next →