HNHacker News
TopNewBestAskShowJobs

rbonvall

941 karma · joined February 14, 2009

Roberto Bonvallet — http://mez.cl/a
submissionscomments
rbonvall··on Show HN: Tt – a Python library/cli for Boolean expressions
Hi, where can I see a list of all the operators that are supported? I tried "A nor B" on the web interface to try to make it break and was surprised that it worked :)
rbonvall··on Mastering Bash and Terminal
:.!ls means "filter the current line through ls". Since ls ignores stdin, the effect is that the current line gets replaced by its output. :r!ls just inserts the output, without replacing anything.
rbonvall··on What science says about naming in programming
I didn't downvote, but what I really meant is "giving your baby the name 'Baby'".
rbonvall··on What science says about naming in programming
When I taught programming to freshmen, the example I used to use when they called variables "number" or "string" was: "that's like calling your baby 'baby'."
rbonvall··on An Introduction to the Lambda Calculus (2015)
The lambda calculus teaches you how to build computation from a very simple evaluation rule called "beta reduction" which is just a fancy name for "search and replace" with function parameters. If you can find a system that can rewrite terms in such a fashion, you can compute whatever you want using the tricks you learn in lambda calculus.

For example, C++ templates were not meant to be Turing-complete, but they work by rewriting terms [1], so you can encode lambda calculus in it, and run arbitrary programs at compile time.

Philip Wadler does a better job than me at getting excited by lambda calculus. He calls it "the omniversal programming language", and claims that aliens will probably have discovered it [2].

[1]: http://matt.might.net/articles/c++-template-meta-programming... [2]: https://www.youtube.com/watch?v=IOiZatlZtGU

rbonvall··on The advantages of static typing, simply stated
Yes, this is the point that's often missing in discussions about types. You can (and you have to work to) encode properties as types to get more value out of them. It's not about avoid mixing ints and strings.
rbonvall··on Advancing in the Bash Shell
A trick I used to use in the floppy disk era:

    $ mount /mnt/floppy
    $ mv !$/file_I_needed .
    $ u!mo
The last command would umount(8) the floppy.

I use !! all the time, specially when first using find to see which files I will operate on and then doing the actual operation:

    $ find . -name '*Foo*.scala'
    path/src/main/scala/foo/Foo.scala
    path/src/test/scala/foo/FooSpec.scala
    $ git add "$(!!)"
Shameless plug: I actually use nq, my find wrapper: https://github.com/rbonvall/nq
rbonvall··on Vim 8.0 released
:-o Thanks!
rbonvall··on Vim 8.0 released
If vim for you is "the thing you edit config files with when sshing to a server," yes, it is. As a full-fledged development environment, it's not.
rbonvall··on Vim 8.0 released
I agree, it's just Good Enough. I mostly miss some add-ons like surround.
rbonvall··on Easy Parsing with Parser Combinators
Thanks, that's exactly what I wanted to know.
rbonvall··on Easy Parsing with Parser Combinators
Hi lihaoyi, what advantages does your library have over `scala.util.parsing.combinator` and parboiled? I have only used the former, and while I loved it there were a couple of things that I felt could be improved.
rbonvall··on Dyalog APL v15.0 Free for Non-Commercial Use
He already did: https://en.wikipedia.org/wiki/J_(programming_language)

The J programming language, developed in the early 1990s by Kenneth E. Iverson and Roger Hui,[4][5] is a synthesis of APL (also by Iverson) and the FP and FL function-level languages created by John Backus.[6]

To avoid repeating the APL special-character problem, J uses only the basic ASCII character set, resorting to the use of the dot and colon as inflections[7] to form short words similar to digraphs.

rbonvall··on Dotty: a next generation compiler for Scala
Python may not be statically typed, but they still have an automated tool for migrating from 2 to 3.
rbonvall··on Why Most Unit Testing is Waste (2014) [pdf]

    > - keys can be any mutable in Python, not string;
You mean immutable.
rbonvall··on 45 years since its creation. The C language still very popular
I loved it, let me add:

    I will goto my_grave loving C, from that day[0] ...
rbonvall··on Vis: A Vim-Like Text Editor
The great thing about vim is that it'll always be there as a fallback.

I keep a file with my passwords, encrypted with Vim's builtin encryption. Neovim removed that feature. If I ever switch to neovim, I can still use vim when I need to open that file.

rbonvall··on A cheating scandal in the world of professional bridge
I agree. What the actual cheating technique was is the least interesting part of the story.
rbonvall··on Iceland sentences bankers to prison for their part in the 2008 collapse
In other countries bankers don't go to jail when they commit fraud or other crimes.
rbonvall··on Xto6 modernizes your JavaScript code
According to this recent talk, not many, and he would even take away features from The Good Parts:

The Better Parts by Douglas Crockford: https://youtu.be/Ji6NHEnNHcA

rbonvall··on Gene Amdahl has died
I completely agree with nhaehnle's law.
rbonvall··on First chapter of Kernighan and Donovan's new Go book [pdf]
The use of proportional fonts is the least weird thing about Acme :) I'm really intrigued by that editor. Some day I'll give it a honest try.
rbonvall··on A Good Vimrc
C-[ is trivial in an English keyboard, but in the Spanish layout it's an awkward three-key chord. I use the latter, and I've been happily inoremapping jj to <esc> for a decade.
rbonvall··on Fifty
That's what I told myself when becoming 32 earlier this year: "no longer an hexadecimal teenager, now I'm finally a 0x20-something"
rbonvall··on Why is Smalltalk Dead?
It seems that programmers take their favorite feature of a programming language for comparing it to others:

If you like first-class functions, then Javascript becomes "Scheme in the browser." If you miss having a REPL and then discover Python, it becomes "LISP with C-syntax." If you like objects responding to arbitrary messages, then Ruby is "Smalltalk without images" and so on.

rbonvall··on 142857
It's also my favorite number, but I don't think any of us likes it more than the guy in the video :) Thanks for sharing.

I learned about 142857 when reading The Man Who Counted as a kid. I remember getting obsessed with it and discovering more properties (much fewer than the ones shown on the video), e.g.:

    142 + 857 = 999
    14 + 28 + 57 = 99
rbonvall··on Placebo Button
Check under your mattress :)
rbonvall··on JSON Labs Release: Native JSON Data Type and Binary Format
During the last month, two (barely related) Scala programs that I needed to implement in my job were an SVG image generator and an XSD schema creator. I'm thankful that Scala has XML literals, even though when I learned that it did I found it laughable.
rbonvall··on Top Down Operator Precedence (1973)
I love the idea of remastering old papers for the web. While SVG and MathJax allow to easily include diagrams and math, this work shows that you can get away with using only Unicode.

To make the most of the capabilities of HTML, I would have made citations hoverable, so a tooltip can show the reference next to it without the need to go to the bottom.

rbonvall··on Google Code Jam 2015
This year I plan to use Scala for the GCJ, but for numerical problems I won't hesitate to go back to Python: Numpy is just too convenient for that. In previous editions I've used Numpy (and once even a Scipy solver) and it made my life easier (and efficient, consistent, fast, precise and predictable, while we're at it).
← PreviousPage 6 of 11Next →