HNHacker News
TopNewBestAskShowJobs

catwell

1,287 karma · joined March 5, 2011

Software @ Finegrain.ai. Before: inch.fr (acquired by Septeo), eFounders (Hexa), Lima, Moodstocks (acquired by Google).

https://catwell.info

submissionscomments
catwell··on Charge, a phone company with features for nerds
Reading the HTML source made me smile:

    <!-- Viewer Discretion is Advised -->
    <div class="full-screen-graphic">
catwell··on Libui: GUI library in C
I wish it had good OS X support too.

The best hope so far is probably what's described in this email: http://lua-users.org/lists/lua-l/2016-03/msg00019.html

catwell··on Ask HN: What's the best tool you used to use that doesn't exist anymore?
Greplin (YC W10). It pivoted to Cue then shut down. I haven't found anything else to answer "I know I have read about that, but where?" as well.
catwell··on Distributed systems theory for the distributed systems engineer
You are right, I will.
catwell··on Investigating Erlang by reading its system calls
$ strace lua5.3 -e 'print("hello")' 2>&1 > /dev/null | wc -l

67

catwell··on Distributed systems theory for the distributed systems engineer
For people not already into distributed systems but want to get started, I blogged my (very) short list of things to read last year [1].

Today I would add a fifth item to that list: "Why Logical Clocks are Easy", which is one of the best explanations of causality I have seen so far [2].

[1] https://blog.separateconcerns.com/2015-07-07-four-easy-reads...

[2] http://queue.acm.org/detail.cfm?id=2917756

catwell··on Stack Overflow: How We Do Deployment
It will. AFAIK systemd-resolved does caching by default.
catwell··on How Not to Network a Nation: The Uneasy History of the Soviet Internet
The same thing happened in France, kind of.

For a while (in the 70s and 80s) there were two competing, state-sponsored networks in France: Minitel, based on x25 and made by French telcos, and Cyclades, based on datagrams and made by French CS research labs. The telcos lobbied the government to cut funding for Cyclades, which they saw as a competitor, and it eventually happened (under Valéry Giscard d'Estaing, probably neither Pompidou nor de Gaulle would have made that mistake).

There is a very good book (in French) about that story, called La France en réseaux, by Valérie Schafer. It is one of my favorite tech history books. I will certainly read yours and hope it is as good!

However, I saw it is only available as hardcover. Any chance you can make it available for Kindle?

catwell··on Dropbox Project Infinite
du uses `st_blocks`, not `st_size`, so it should be fine for most applications. It is similar to how sparse files behave:

    $ ls
    $ truncate -s 1M foo
    $ ls -lhp
    total 0
    -rw-r--r-- 1 catwell wheel 1.0M Apr 26 18:39 foo
    $ du
    0    .
catwell··on Our software must get better
It works because he is targeting a subset of all users. He is willing to give up on some potential customers who want some features that the product does not offer. He is also willing to lose actual customers who outgrow the product to competition.

I think it works because he hasn't yet reached the critical mass of users when it doesn't. It is probably a good strategy ("do things that don't scale").

GitHub did the same thing, by the way. Remember slide 56 of this slide deck from 2011: https://speakerdeck.com/holman/how-github-uses-github-to-bui...? Since then a lot happened, including https://github.com/dear-github/dear-github.

Regarding another of Joel's products, this was the top comment on the HN thread "Why Fogbugz lost to Jira": https://news.ycombinator.com/item?id=10314403

catwell··on Our software must get better
Yes, it's argument from the classic "80/20 myth" post by Joel Spolsky (http://www.joelonsoftware.com/articles/fog0000000020.html). The more people you want to reach with your software, the more bloated it has to become to be successful. The only choices are to accept and embrace that fact, or split the feature set and write variations on the software aimed at different niches.
catwell··on Study: Students who take notes by hand outperform students who type
When I joined a very demanding part of the French education system [1], my grades started to drown. I had basically never had to study to be top of my class in High School, and suddenly I was in the bottom quarter. I resolved to work much harder, and my grades went back up, but by the half of the first year I was still not where I wanted to be and I started feeling depressed and wondering what I was doing there.

At the time, there was one national exam you could take at the end of first year to join a mid-tier "École" (engineering school) directly. I knew I was good enough that I would almost certainly pass, and I decided to take it. There were two days of written tests. The first one went well, but as I was walking up to the 2nd day of tests I was mugged in the street. I ended up spending that day in a hospital, so I couldn't take the test. Now I had no other choice but to stay in CPGE for one more year.

After that episode I decided I couldn't continue like before, something had to change.

One of the main things I changed was that I stopped transcribing classes. That was considered heresy by teachers, who told me I would certainly fail. You have to understand that math teachers (not all of them, but mine did) wrote their lecture on a black board, and you were supposed to transcribe all of it. You would end up with binders full of math demonstrations that you were supposed to learn by heart.

The problem is, I am completely unable to focus on two things at once, and writing takes focus. So while I was copying what was written on that black board, I was not understanding it. Just the math classes took something like 16 or 18 hours per week, and I was wasting all that time. So instead, I bought books. I would read them in advance so when I went to class I knew what the teacher would talk about, and I would understand the details and the demonstrations.

The result? My grades went back up. At the competitive exams at the end of the year, I got the best rankings of my class, better than those of students who had taken the 2nd year twice.

So of course, this is anecdote, but I just wanted to say that what you wrote resonates with me 100 %.

[1] https://en.wikipedia.org/wiki/Classe_pr%C3%A9paratoire_aux_g...

catwell··on Source code for Lua 5.3
It has been done, several times.

A popular version is http://yueliang.luaforge.net/, although it only supports old Luas (5.0 and 5.1).

catwell··on Facebook is King, Other Networks Fight for Scraps
Remove Facebook, add WhatsApp.

https://www.google.com/trends/explore#q=%2Fm%2F0glpjll%2C%20...

Both Instagram and WhatsApp belong to Facebook.

catwell··on Apply HN: Pinboard – Make Y Combinator Great Again
I have been using Pinboard for five years, I have 3500 bookmarks in it. Along with GitHub, it is probably the SaaS that has improved my life the most.
catwell··on GitLab Pages
I am usually in the Open Source camp, but I don't think the choice is so easy here. Not only does GitLab copy GitHub, it does so by relying on a lot of Open Source sofware written by GitHub and/or GitHub employees.

You may like GitHub or not, but you cannot deny they contribute a lot to Open Source. I am not entirely sure how much that has changed since his resignation, but here is Tom Preston-Werner's position on Open Source: http://tom.preston-werner.com/2011/11/22/open-source-everyth...

catwell··on Stream PirateBay movies directly from CLI
This could be true, however I think that if all this torrent streaming sticks to same behavior such as that of XBMC torrent [1] (i.e. streaming for the whole duration of the movie) the swarm will end up stronger, not weaker.

[1] https://github.com/steeve/xbmctorrent/blob/e6bcb1037668959e1...

catwell··on Wow, Perl 6 [video]
Perl 5 was my first language after a failed attempt at C as well. I no longer use it, in fact my favorite dynamic language is now Lua which I consider a polar opposite of Perl in some ways.

I now consider Perl, and in particular Perl 6, as a language to learn ideas and concepts from. This slide deck shows me TIMTOWDI is not dead :) Perl does not shy in taking concepts made popular by other languages (Lazy lists from Haskell, "Hyper operators" from F#, channels from Go...) or inventing its own. It makes it a complicated mess, but also a fantastic source to learn about different paradigms and ideas.

I am eagerly waiting for a Perl 6 version of Programming Perl now, given how influential the third edition has been on me 15 years ago.

catwell··on Ask HN: How do you debug your code?
Print statements and assertions. I rarely use a debugger, except coupled with something like Valgrind ("drop me into GDB if I use uninitialised memory") or to examine a core dump generated by a failed assertion.
catwell··on Show HN: LevelDB outperforms others on a cheap phone (Microsoft ESE and SQLite)
To be honest I am not entirely sure of my interpretation of the issue yet. What I know is that on those devices you sometimes can't read your writes with LMDB if it's not using MDB_WRITEMAP.

While trying to debug I ended up on the only question ever asked by Howard Chu (LMDB author) on Stack Overflow: http://stackoverflow.com/questions/7061910/when-does-an-o-sy...

I am still trying to figure out what exactly is happening here but it's not very easy given that I do not even have access to a rooted phone that exhibits the issue.

catwell··on Show HN: LevelDB outperforms others on a cheap phone (Microsoft ESE and SQLite)
LMDB already runs on iOS and Android. In my experience you will have issues on some Android devices though. For instance, I recently found out that on some Android devices writes to a mmap-ed file through the usual POSIX interfaces are not immediatly reflected on reads through the mmap, which means that on those devices you MUST use MDB_WRITEMAP.

For those who don't know, I/O on Android is a nightmare. On your typical phone, the filesystem you have access to is a FUSE that mirrors to an EXT4 filesystem mounted with crazy device-specific options which include noauto_da_alloc.

I don't know any DB which works fast and consistently across all Android phones on the market. SQLite is probably the safest bet for now.

catwell··on C – Preliminary C2x Charter
He was talking about signed integer overflow. Unsigned integer overflow is useful and defined.
catwell··on MIT Mathematician confirms: Israeli 10th-grader discovers new geometric theorem
That theorem, assuming "lines" means "segments of equal length", is a trivial consequence of "three non-aligned points define a unique circle", a well-known theorem taught in grade school (at least in France).
catwell··on C preprocessor tips and tricks
A preprocessor "trick" not mentioned in the article is the use of GNU statement expressions.

The article describes the do {} while(0) trick to make macros look like statements. They can then basically be used like inline void function calls. But what if you want to write a macro to replace an inline function that returns a result?

Statement expressions [1] solve that problem. Now you can finally do this:

    int _foo(int x) { return 2 * x; }

    #ifdef __DEBUG__
    #   define foo(x) \({                     \
            int r = _foo(x);                  \
            printf(                           \
                "foo returned: %d (%s:%d)\n", \
                r, __FILE__, __LINE__         \
            );                                \
            r;                                \
        })
    #else
    #   define foo _foo
    #endif
They are supported by most popular compilers which are not made by Microsoft (including GCC and clang).

[1] https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html

catwell··on German government to use Trojan spyware to monitor citizens
It is also a usual trick to avoid detection by "heuristic" antivirus software (even in legit software).
catwell··on How to stop functional programming
Adding two numbers together without being pure? Isn't that how we always do it?

    MOV edx, 1
    MOV adx, 2
    ADD eax, edx
catwell··on We Need a Better PC
I have a Vaio Pro 13, one of the last Sony models. I bought it over two years ago now. It works very well under Linux. Initially there was a small issue with CPU frequency scaling because it was basically the first Haswell ultrabook, and I had to patch and compile my own kernel to work around it, but that was mainlined after one or two months. I got a version without a touchscreen and I consider it one of the best ultrabooks available, even today.

I also have two older Vaios, a P (yes, this one http://www.getitnow.gr/MEDIA/content_CustomProductCatalog/m1...) and an EB (17" laptop), which both work well under Linux.

Reagarding the newer models, I have no feedback yet but I hope they will be fully supported, if not at the time of release then a few months later at most.

catwell··on Show HN: Htop 2.0 released, now cross-platform
... and the main author of Lua was the PhD advisor of the author of htop. Small world :)
catwell··on Logging vs. instrumentation
I am also interested since I saw the lightning talk about it at FOSDEM (video: http://mirror.onet.pl/pub/mirrors/video.fosdem.org/2016/h221...).

For what it's worth, FOSDEM itself uses it for the real time monitoring of its infrastructure.

catwell··on Ask HN: How happy are you working as a programmer?
Happiness at work is not a figure, it's a curve over time. Programming has high highs and rather low lows :)

When everything goes well, when I am working on code bases I like, on interesting features or on Open Source software, I am pretty happy.

When I am tracking an obscure bug that annoys my users for days, in an obscure proprietary code base and with a tight deadline approaching, I am somewhat less happy.

Sometimes, it is a stressful job, especially when you are close to production systems. But the rest of the time, it is so rewarding I would not for a second consider doing something else.

← PreviousPage 8 of 12Next →