HNHacker News
TopNewBestAskShowJobs

rbonvall

941 karma · joined February 14, 2009

Roberto Bonvallet — http://mez.cl/a
submissionscomments
rbonvall··on My approach to taking notes in meetings
It's the first time I see usernames referred to as "ldaps". Learning stuff like this is why Hacker News is my favorite HTTP :o)
rbonvall··on Dr. Software: An unfinished journey starting from dirty code [pdf]
Unfortunately there's this idea that functional programming is just about using lambdas for everything. For me, proper functional style is just about decoupling business logic from state and side effects, and this can still be done with idiomatic OOP code.
rbonvall··on Using Paper for Everyday Tasks
You may like to try wrist-friendly soft-ring notebooks:

https://www.jetpens.com/Kokuyo-Campus-Soft-Ring-Notebook-Sem...

rbonvall··on Using Paper for Everyday Tasks
I've been using mostly paper for my notes for more than 15 years. Of course I have a system that works for me, and it has evolved effortlessly over that time through practice. If I had to explain it to you it may sound convoluted, but it's not like I sat down one day and tried to design a complex system from scratch.
rbonvall··on PyCon US 2021 Recordings are Available
Is this what you wish?

    ['10', '10', '10'].map(parseInt) === [10, NaN, 2]
rbonvall··on From Competitive Programming to APL
There are many, all with awfully googleable names: j, k, q, etc.
rbonvall··on .org doesn't mean credible
I think none of http, www or .com actually work anymore for all audiencies. What I see more often is stuff like "<instagram logo> @burrito_catering" or "<facebook logo> burrito_catering".
rbonvall··on Mal – Make a Lisp
In Spanish it means "badly", which is an encouraging goal to give the project a try :)
rbonvall··on FFmpeg 4.4
I'd add Pandoc to all the ones mentioned in sibling comments.
rbonvall··on Zig, parser combinators, and why they're awesome
Python has pyparsing: https://pypi.org/project/pyparsing/

Maybe it's because non-FP languages typically don't support operator overloading, so you'd end up with verbose grammars like:

    new Literal("true").or(new Literal("false"))
and then you'll probably use a parser generator like ANTLR.
rbonvall··on “Design Patterns” Aren't (2002)
FP practitioners are guilty of this as well, when talking about "the Maybe monad" or "the IO monad".
rbonvall··on From First Principles: Why Scala?
Originally there was no way of abstracting over an arbitrary number of type parameters in the language, so a different trait was required for each arity. The choice of 22 was arbitrary, I think.

This is no longer true in Scala 3, so there will be no such limit: http://dotty.epfl.ch/docs/reference/dropped-features/limit22...

rbonvall··on Datatype99: C99 with Sum Types, v0.1.0
I predict all languages will adopt some form of sum types and pattern matching in the next 10 years. They will go from esoteric to mainstream in the same way lambdas did.
rbonvall··on Pidgin – A Universal Chat Client
But now we have stickers! And gifs! And audio messages!
rbonvall··on The Early Development of Programming Languages (1976) [pdf]
A recurring joke in functional programming books is some footnote mentioning that currying was discovered by Schönfinkel but named after Curry because "schönfinkeling" didn't catch on.
rbonvall··on Tex – Use Elixir like a scripting language, across your system
Worst name since "cat", my command-line tool for creating cat memes :o)
rbonvall··on Java Verbal Expressions
Raku (Perl 6) has grammars as first-class citizens: https://docs.raku.org/language/grammars#Creating_grammars
rbonvall··on The True Size Of Countries: Mercator projection
Since 2017 it's actually three timezones, because Punta Arenas got its own: https://en.wikipedia.org/wiki/Time_in_Chile
rbonvall··on Embedded PDF viewer in Firefox 81 supports filling forms
Since a PDF can begin with non-PDF content, then pi itself is a valid PDF file.
rbonvall··on Use long flags when scripting (2013)
There's a utility called dtrx ("do the right extraction") that does basically this, and also makes sure that files are always extracted into a directory.
rbonvall··on How to Write in Plain English
This is probably the video you saw: https://www.youtube.com/watch?v=jLPCdDp_LE0 (Judy Swan, Scientific Writing: Beyond Tips and Tricks)
rbonvall··on A philosophical difference between Haskell and Lisp (2015)
You can create it yourself:

    Prelude> s ->> f = f s
    Prelude> [1..100] ->> take 10 ->> filter (not . odd) ->> drop 3
    [8,10]
rbonvall··on Schemastore.org – schemas for all commonly known JSON file formats
As far as I know, they were originally introduced by Niklaus Wirth to describe Pascal's syntax. See the last pages in this manual from 1973: https://www.research-collection.ethz.ch/bitstream/handle/20....
rbonvall··on D 2.093.0
It is possible in Scala: https://scastie.scala-lang.org/k7bHR6EWS7qXvaC8gIj3VA

(Unless you mean something different).

rbonvall··on Functional Programming in Python
WellActually™, Some is a synonym of Just, Maybe is a synonym of Option, and Nothing is a synonym of None.
rbonvall··on Functional Programming in Python
I'm also a FP fanboy, and this concept doesn't quite convince me. I'm not sure a Maybe type really helps that much in a dynamically typed language. All the safety you get from using Maybes is worth Nothing (pun intended) when credit_amount could still return let's say Just a string, or raises an exception.

If this chain of calls supposedly handles Nones at any level, then .map is not the right method. It should be .flatMap (or .bind). Unless this is a magic .map that handles either X or Maybe[X] and even exceptions (just like JS promises). This flexibility may be convenient and I can appreciate its pythonicness, but it's not really in the spirit of typed FP.

rbonvall··on I trick my well-developed procrastination skills
Procrastination is not about "always having something to do", it's about "not doing exactly one wants to get done".

Sometimes it's work related, sometimes it's hobbies, sometimes is chores. It's hard to e.g. "just enjoy" not paying a bill that's already due. To want to get that done it's hardly an obsession, and not being able to succeed in finishing such a simple task is really frustrating.

rbonvall··on Fast Fibonacci numbers using Monoids
There is not much to learn, a monoid is a very simple abstraction.

Think for example about learning about the "iterator" abstraction. It's just something with "hasNext" and "next" operations, nothing more to understand. But when you know it you start seeing iterators everywhere, and you get frustrated when something that should be an iterator isn't so you cannot write a simple foreach loop. And you'll start implementing iterators in your own code, because you know that provides a lot of convenience for free to consumers.

Same thing for monoids. They're everywhere, they offer some convenience for free, and you'll be wondering why things that should have monoid instances don't.

rbonvall··on Ladder of Algebraic Structures
There's also a rig (a ring without "n"egatives): https://ncatlab.org/nlab/show/rig

I agree. Too cute for its own sake.

rbonvall··on Zig cc: A drop-in replacement for GCC/Clang
Thanks for putting it this way. I always wondered why cross compilation was a big deal. For me it sounds like saying "look, I can write a text in English without having to be in an English-speaking country!".
← PreviousPage 3 of 11Next →