HNHacker News
TopNewBestAskShowJobs

thibran

566 karma · joined July 2, 2017

submissionscomments
thibran··on India announces nationwide lockdown to stop spread of coronavirus
Slavery is a huge problem in India. Who did burn the bricks of your house → there is a high chance in India that they where fabricated by slaves. If you are an Indian you know that. You also know that those numbers are always estimates, but they are not totally off.

I know Indians are proud, very proud, but seen from an outside view the Indian society has a lot of problems. You can deny it, but you can't hide it, there is just too much wrong.

India has a lot of beautiful things to offer. I just hope that not too many people will suffer there.

thibran··on India announces nationwide lockdown to stop spread of coronavirus
India, a country where today 18 million people live in slavery – which is the highest number of slaves in the world – will probably not handle COVID-19 well.

As someone who has been in India for some time, everything else than a catastrophe would astonish me.

Source: https://blogs.wsj.com/indiarealtime/2016/06/02/india-has-the...

thibran··on F# Pipeline Operator in JavaScript with Babel
Your version is interesting too. For a while I also thought about the stop-when-false idea, but came to the conclusion that it should probably be another macro. Building an enough powerful, but easy macro, isn't that simple.
thibran··on F# Pipeline Operator in JavaScript with Babel
I wrote something similar for Scheme - https://cons.io/reference/sugar.html#chain. It's interesting to see that other people came up with a quite similar solution, providing two modes: pass-directly, pass-by-variable. Does the JS version supports destructuring?
thibran··on DuckDuckGo Lite
Well this page has not much content, but the first thing I notice is that the search box and the button are not aligned correctly...
thibran··on Thinking Fast and Slow, Deep Learning, and AI [video]
For me the podcast is one of the few things that I really like. The philosophical discussions allow to get a glimpse of the mind of the interviewed person. Sometimes I'm quite shocked that some people seem so superficial - from a philosophical point of view - even when they belong to the best in their field.
thibran··on Chrome OS has stalled out
Long battery life, cheap, can write some code in Linux -> perfect travel device
thibran··on Doing a database join with CSV files
You might want to save the query result to a file too:

    .once out.csv
    select * from person, weight where person.ID = weight.ID;
    .mode column
thibran··on Switching from Chrome to Firefox
Yes it is, and I'm thankful that it is possible.

There is – and always was – someone who gets paid to distract you from doing what you want to do. This is called advertising and we have seen on the web multiple very aggressive excesses here: pop-ups, auto playing sound/video and nowadays notification spam. What I'm trying to say here is, that you shouldn't need to be a nerd to get a pleasant browsing experience.

thibran··on Switching from Chrome to Firefox
To me Sync and Pocket are extra features (and some others), that should be enabled by user action.

Why doesn't Firefox come with a Mozilla Tools section in Settings which allows easily to enable those services + a button to that settings page on the (bottom/top right) new tab page. This way it would be reachable, but at same time, not so intrusive as it is right now. I would even go as fare and say that the dev-tools should be an addon too, and not ship by default (because probably 99% of the users never use it).

It should be possible to create a delightful browser experience, which respects user privacy and enables power-users/developers to do more.

thibran··on Switching from Chrome to Firefox
Firefox is nice. But over time there are more and more things I need to configure to get a "good" browser experience.

Things I do:

- about:preferences#general > Startup > restore previous session

- about:preferences#general > Tabs > uncheck Ctrl+Tab cycle ...

- about:preferences#general > Downloads > always ask where to save

- about:preferences#home > Firefox Home Content > disable all except Top Sites

- about:preferences#privacy > Permission > Notification Settings > Block new requests

- about:preferences#privacy > Firefox Data Collection and Use > disable

- Set in about:config extensions.pocket.enabled to false

- Install the addons: uBlock Origin, Gesturefy, Firefox Multi-Account Containers

- I remove the home button

- I remove the sidebar button

- I reject every Firefox pop-up that wants me to enable Sync or whatever

The result is a decent browser, which doesn't get in my way. But I can understand that those steps are too many for casual users and can understand why a lot of people don't like the Internet. I wouldn't like it too, if I had to use default browser settings without an ad-blocker.

thibran··on I love coding in C
This is what Lisp/Scheme based languages use macros for -> to reduce boilerplate code. A lot of programmers hate DSL's, but using Python to generate test code is the same as using a DSL. The difference is, Python is a much bigger and more complicated DSL, than a test-macro will probably ever be.

There is nothing wrong with generating code in a pragmatic way. It is just strange to see all the time people using workarounds for things that a tiny DSL could probably solve better.

thibran··on Windows 10 is getting an easier way to update and install drivers
It's the year 2019. We communicate with the speed of light across the ocean and manipulate DNA, but installing drivers is still not a solved problem on Windows...

... and a modern display server is still not used by default on Linux.

thibran··on Almost everything on computers is perceptually slower than it was in 1983 (2017)
Why not have the previous and next channel frame-data points loaded in the background? This would enable to switch quickly, even if it costs a bit more resources on the hardware side.
thibran··on The main sell point of Go is not simplicity, but overall balance and flexibility
Go is a great language with a great standard library. The big downside is, that you have to play compiler and write all the time boring algorithms yourself (because go has no generics).

    Want to filter a slice              -> do it yourself
    Want to map a function over a slice -> do it yourself
    Want to pop out a value of a slice  -> a[len(a)-1], a[:len(a)-1]
    ...
There are worse things in the world, still it's the reason why I don't use go any more.

More examples: https://github.com/golang/go/wiki/SliceTricks

thibran··on Macros That Work Together: Comp-Time Bindings, Partial Expansion (2012) [pdf]
Perfect timing. Scheme macros is one of the things I'm currently interested in :)
thibran··on Ubuntu 19.10: It’s fast
Unity2D was super fast. So sad that they didn't continue to develop it, and instead went for GNOME. If Ubuntu GNOME is now quick, good – it took a long while to get there. It's important for Linux and FOSS to have well known and widely used software. Without Ubuntu, we would probably have no Steam Linux client.
thibran··on Emacs: The Editor for the Next Forty Years [video]
The idea of Emacs will survive, that's quite sure. The editor, I wouldn't bet on this one.
thibran··on Greta Thunberg: 'How dare you? You have stolen my dreams and my childhood'
> ... not talking about world overpopulation?

Because its not an issue any more. The world wide population is stabilizing. Most countries of the earth will face a population collapse in the next 30 years.

thibran··on Why I Prefer Functional Programming
Haskell is very terse, but it doesn't mean that this is true for every FP language. Code below is in Gerbil Scheme and should be readable even for OOP programmers.

    (def (alignCenter strings)
      (def n (apply max (map string-length strings)))
      (def (align s)
        (let* ((count (round (/ (- n (string-length s)) 2)))
               (whitespace (make-string count #\space)))
          (string-append whitespace s)))
      (map align strings))
Here also the same code in JS, which is almost identical.

    function alignCenter (strings) {
      const n = Math.max(...strings.map(s => s.length))
      const align = s => {
        const count = (n - s.length) / 2
        const whitespace = ' '.repeat(count)
        return whitespace + s
      }
      return strings.map(align)
    }
thibran··on Tesla earns its first-ever safety award from IIHS for Model 3
> "Vehicles with alternative powertrains have come into their own," IIHS Chief Research Officer David Zuby says. "There's no need to trade away safety for a lower carbon footprint when choosing a vehicle."

I would guess this is not the real reason. EV's have a much bigger crumple zone and can therefor absorb more energy. Since "nobody" wants to hear that EV's are saver than combustion engine cars, lets put them into another category...

thibran··on Firefox has lots of room to improve if it wants to beat Chrome
Low cost, 10 h battery live, Linux support.
thibran··on Ask HN: Best Lisp for software development?
Gerbil https://cons.io

+ modern

- ecosystem

thibran··on HTML is the Web
The web has become a compilation target.

Vue -> HTML, CSS, JS

thibran··on PHP in 2019
And I welcome it. Also the shorter anonymous function syntax will improve the current situation by a good deal.
thibran··on PHP in 2019
This is my opinion.

Some hints why I think PHP is not great:

* property type declaration in doc-strings * bad documentation * verry verbose for a dynamic language * a lot of inconsistencies * automatically loading of classes is a hack (psr4) which doesn't support importing functions without specifying it in a global project file

thibran··on PHP in 2019
I would argue that Kotlin is the better modern PHP. Beside of a lot of magic Laravel makes PHP okayish, but it is still the worse mainstream programming language.
thibran··on Ask HN: How to Teach Coding?
Teach them using Scheme and some other language, but begin with Scheme.

* explain what a variable is and how to create and assign a value to it

* explain what a list is

* explain what a lambda is

* explain and show if else loops...

* explain what a closure is

* show them how to build a struct out of closures

* explain what a class is

* show them how to build a class out of a struct

* explain what an interface is

* explain what a module is and why it exists

* now show your trainee another programming language

* point out that the other language contains more or less the same building blocks as Scheme

* talk about how to format code

* explain a bit the command-line

* talk about basic patterns, like builder and singleton

* talk and show how some pieces of code could be written in different ways and why one solution might be "cleaner" than another

* read some code on the internet together

* do an excursion to databases (sqlite)

* point out what your trainee knows and where he could study topics by himself further

* show them some tools you like and some other popular tools

* talk about what kind of languages, frameworks different programming disciplines a.k.a. dev-stacks are being used today (this is important to get a rough overview, as beginner, you don't know what you don't know)

Don't:

* throw a million buzzwords at your trainee

* don't try to be neutral, be opinionated about the topics/technologies you teach and tell your students why you think/act in a certain way

* don't teach a topic by going through every point in existence (this approach takes long and is confusing as hell, because it mixes too much information targeted at different skill levels into one stream of unsorted information - doing this is a major failure)

* don't do math (math is a sub-field, it is not needed to understand how-to program)

* don't show off that you are smarter by throwing too complex problems or solutions at your students

* don't reach for the limit, a relaxed mind is capable of more

thibran··on Why Operators Are Useful
The tragedy is that the "large organization" then goes on and writes multiple bad DSL to solve problem X which includes several code transpilers and a varying amount of custom syntax. In the end, they do the same thing as the Lisp folks -> they write a DSL, but because language XYZ they chose is less capable than Lisp, the solution is hacky and difficult to understand (and can't be – in comparison to Lisp – easily extended).

This is true for a lot of "frameworks" and especially true for modern fontend web frameworks (which have a compile/build step).

thibran··on Build me a Lisp
In a Lisp 1 function and variables share the same namespace.

    (defvar foo 5)   ; variable with the name foo
    (defun foo () 5) ; function with the name foo
In a Lisp 1 the defun would overwrite the previous variable declaration. In a Lisp 2 though, both expressions coexist.
← PreviousPage 5 of 8Next →