HNHacker News
TopNewBestAskShowJobs

jabirali

159 karma · joined April 14, 2020

submissionscomments
jabirali··on "Rust does not have a stable ABI"
> And you have to replace that whole binary everywhere it is installed.

Not if your package manager supports binary diffs [1]. Which for many platforms is already the case, and other package managers would likely implement the feature if downloading large binaries becomes a problem. Right now, I’d however call it a premature optimization as the bandwidth of most people is dominated not by downloading updates but by streaming. But it is a solved problem since e.g. Fedora has supported package diffs for a decade.

Regarding the heartbleed, that is a valid and often repeated argument, but I think it is also overblown. One could e.g. have a static binary with embedded or bundled info about what library versions it was statically compiled with, and a way to automatically flag which binaries are thus vulnerable. Such a system would make it possible to push out new builds of high-priority targets like Firefox and Chromium without testing every other libssl-based app for compatibility first, thus cutting down on the response time for patching the most vulnerable apps. But the flagging would make it clear that the other apps need updating too. (Or in the case of automated builds, that the other apps need testing.)

I’m not saying that the whole OS should be statically linked, but for end-user apps I think it makes a lot of sense, and it’d remove a lot of friction where a library update can break a previously working app (that happens).

[1]: https://en.m.wikipedia.org/wiki/Delta_update

jabirali··on "Rust does not have a stable ABI"
> Either go full *BSD or Mac OS and separate the concepts or full Arch Linux (w/ AUR) and don't.

Regarding the first alternative, I think it will be interesting to see how Fedora Silverblue [1] turns out. It’s basically going for an immutable base system coupled with Flatpak for apps the user installs.

Haven’t tried it myself, but for average desktop users, I think that sounds like a very good solution in the long run: a stable base system with up-to-date user-facing apps.

[1]: https://docs.fedoraproject.org/en-US/fedora-silverblue/

jabirali··on "Rust does not have a stable ABI"
> No one is trying to sell you a system. [...] If you don't need that, no one suggests you run it on your desktop.

I disagree. People have been recommending Linux to people with non-complex needs for a long time, especially since Ubuntu went mainstream. “No one suggests you run it on your desktop” is thus wrong.

> If you feel well inside Apples walled garden, have fun there, but don't come complaining when some Unix tool or programming language does not work there.

Is this really an issue? As far as I’ve heard, macOS is a POSIX-compatible system with a BSD userland, and most Unix tools work fine. Checking out the Homebrew repos, it seems like all the Unix tools I’m used to are there. And even some Linux-specific systems like FUSE have been ported to macOS. As far as I can tell, macOS thus supports Unix tools and programming languages as well as most Linux distros.

jabirali··on Mozilla signs fresh Google search deal
> When I made the switch, I also tried to ditch Google

> for DDG, but I haven't been able to make it work.

My experience has unfortunately been the same; I often need to click through pages of DDG results to find the results I want, while Google tends to show it within the first 3-5 results. I tried using it for several months as my main search engine (last time I tried was 2019), and I basically just ended up typing `!g` in muscle memory when working.

For now, I'm using StartPage [1] which works quite well:

> You can’t beat Google when it comes to online search.

> So we’re paying them to use their brilliant search

> results in order to remove all trackers and logs. The

> result: The world’s best and most private search engine.

[1]: https://startpage.com/

jabirali··on Apple just kicked Fortnite off the App Store
> As an example, HN could start requiring users to link their LinkedIn accounts.

What about those of us without a LinkedIn account?

jabirali··on How Did Vim Become So Popular?
> The problem with Emacs and all its modifications is that it cannot match Vim's flexible system for custom keybindings.

Interesting, my impression was that custom keybindings was more flexible in Emacs + Evil than in Vim. It seemed easier to e.g. define new modes with separate keybindings, and if you use the GUI version, more distinct keybindings are available.

> And the other thing that I could never get used to is that Emacs' terminals can't handle ncurses applications.

It can now. The problem is that there are a lot of shells and terminals available in Emacs, so it's not always obvious which one supports what. But emacs-libvterm [1] is a "real" terminal inside Emacs, and supports ncurses apps well. (The website warns about being alpha level, but I used Emacs + Evil for about half a year, and it worked fine for me.)

[1]: https://github.com/akermu/emacs-libvterm

> I'm fine with Vim, but I'm glad I tried Emacs for a while because it does have some nice ideas.

I ended up with the same conclusion :).

jabirali··on Can you 3D print Damascus steel? Pretty much, yeah
According to Wikipedia, Damascus steel really means something more specific:

“Damascus steel was the forged steel of the blades of swords smithed in the Near East from ingots of Wootz steel imported from Southern India and Sri Lanka.“

“Although many types of modern steel outperform ancient Damascus alloys, chemical reactions in the production process made the blades extraordinary for their time, as Damascus steel was superplastic and very hard at the same time. During the smelting process to obtain Wootz steel ingots, woody biomass and leaves are known to have been used as carburizing additives along with certain specific types of iron rich in microalloying elements. These ingots would then be further forged and worked into Damascus steel blades. Research now shows that carbon nanotubes can be derived from plant fibers, suggesting how the nanotubes were formed in the steel.”

jabirali··on Hands-On Linear Programming: Optimization with Python
Pyomo is nice, but I think it’s perhaps more like AMPL [1] and friends than a typical “Pythonic” library?

[1]: https://en.m.wikipedia.org/wiki/AMPL

jabirali··on Stop Colour Theory
Precisely. That’s also why our screens use RGB emittors: that’s the frequencies our eyes have sensors for.

Pictures shown on a human screen must look really weird for a species with different color vision than us...

jabirali··on Mozilla VPN
To throw in a less conventional option, I've been very happy with MasterPassword [1] myself. I mostly just use use the browser plugin (Firefox/Chrome) and mobile app (iOS/Android).

Unlike the other options, it's a deterministic password manager. This means that you don't need to sync anything, and there's no risk of losing your password database. As long as you know what website you're signing in to, and remember your one master password, you can regenerate all other passwords.

[1]: https://masterpassword.app/

jabirali··on Polyphasic sleep takes napping to the extreme
Maybe check the references in this article?

https://theconversation.com/did-we-used-to-have-two-sleeps-r...

jabirali··on FreeBSD 11.4
Do you mean NomadBSD? Hearing MonadBSD and thinking about Haskell, I suddenly got really curious, but couldn’t find anything on Google...
jabirali··on NetBSD Code Study
> It's way less painful these days if you're using UEFI.

Interesting. My experience has been the opposite; I've had much more issues with UEFI than I ever had using BIOS, even when after disabling Secure Boot in the settings.

jabirali··on Guix Further Reduces Bootstrap Seed to 25%
> 3D graphics situation is not great thanks to NVIDIA and AMD.

AMD is now one of the good guys when it comes to open source:

https://en.wikipedia.org/wiki/AMDGPU

Basically, since 2015, AMD has offered an official driver under an MIT license for Linux and *BSD. Personally, I'm definitely choosing AMD for my next laptop :).

jabirali··on Flow browser passes the Acid tests
A perhaps more useful tradeoff would be if one could disable a subset of CSS/JS with a simple switch in the settings, so e.g. transition animations are skipped but the webpage is otherwise readable.

I think I have yet to see a webpage that uses animations in a way I enjoy, even when they’re smooth. (The same goes for most PowerPoint transitions and window manager animations...)

jabirali··on Is Sudo Almost Useless?
I searched it up, and apparently "$@" and expands to "foo" "bar" while "$*" expands to "foo bar", and the latter is what we want. From a quick test on my machine, that replacement in in your function definition seems to fix it :).
jabirali··on Is Sudo Almost Useless?
I haven’t tried it myself, but it sounds like you may find Silverblue Linux [1] of interest. It’s supposed to treat the base system as immutable images that are updated “atomically”, while user apps are handled via Flatpak, completely separated from this immutable base.

In other words, an OS model that sounds more like iOS and Android, but built on Fedora and targeted at computers.

[1]: https://fedoramagazine.org/what-is-silverblue/

jabirali··on Is Sudo Almost Useless?
Or make it a shell function that operates on $@ in the same way, so you can put it in your bashrc with your aliases.
jabirali··on Why the developers who use Rust love it so much
I am a daily user of fd (find), rg (grep), exa (ls), bat (cat), and am planning to try out sd (sed).

These tools are in my opinion significantly better than the classical UNIX tools: they can be orders of magnitude faster, understand .gitignore, have more intuitive command-line options, and make better use of colors.

jabirali··on The Brave web browser is hijacking links, and inserting affiliate codes
I think the main benefit is precisely that it comes with blocking of ads and trackers by default. I use Firefox myself (mostly because I love Container Tabs), but usually recommend Brave to less techy people as it requires zero post-install configuration.
jabirali··on Snaps are an anti-pattern on Ubuntu
FYI, the Gnome Tweaks interface is basically identical to the KDE settings here.

Screenshot: http://pvv.org/~jabirali/tweaks.png

jabirali··on Signal app downloads spike as US protesters seek message encryption
Interesting, it does indeed start in seconds instead of minutes now. That’s great!

I also see that the other issues I noticed previously (high latency when typing, “compose key” not working) have now been fixed as well.

jabirali··on Signal app downloads spike as US protesters seek message encryption
With the exception of desktop app, I agree :).

The desktop app takes several minutes to open (at least on Linux), so I find that the only way to use it is to start it at boot and always leave it open. I'm still hoping that someone may create other clients, e.g. a Pidgin backend.

The mobile apps, on the other hand, work really well. Been using them for years now, both on Android and iOS.

jabirali··on Australian researchers set record for carbon dioxide capture
Here are relevant links to Wikipedia on CO2 storage:

https://en.wikipedia.org/wiki/Carbon_capture_and_storage#Seq...

https://en.wikipedia.org/wiki/Carbon_sequestration

To curb global warming, the best option is likely to store it underground, e.g. in reservoirs previously used for oil or gas production.

jabirali··on Ask HN: How do you organise your files and folders?
I also put virtualenvs in a single centralized location (~/.virtualenvs), and manage their contents via Poetry.

The main reason is that I sync my Git projects via Tresorit (“encrypted Dropbox”). This lets me switch computers without committing and pushing code that is not “ready”; makes it easier to sync all projects I work on to my backup server; and lets me copy around project files that I don’t want to commit (e.g. messy WIP and TODO notes).

This doesn’t work well with virtualenvs inside a repo, because (i) the virtualenvs are not portable, and (ii) syncing a virtualenv is slow. Instead, I sync a Poetry lock file, which makes it trivial to recreate the “same” virtualenv on other machines.

jabirali··on But no, 80-column terminals in 2020 isn't “reasonable” any more
Personally, I prefer handling long lines via horizontal scrolling (with keyboard shortcuts) rather than wrapping.
jabirali··on The use of `class` for things that should be simple free functions
In many languages, it is an explicit parameter though.

For instance, in Python, one would define a function with `def fun(state)` or a class method with `def fun(self)`. In the function body, one would use respectively `state.var` or `self.var` to refer to a variable `var` in the state object. Running it is then done using `fun(state)` or `state.fun()`.

There are some minor syntactic differences between the two, but I find both these examples to be just as explicit...

jabirali··on ZSH Aliases
I think Fish shell "abbreviations" [1] are more suitable for interactive demos than standard Bash/Zsh aliases. Basically, instead of e.g. `gc` meaning `git commit` (alias), `gc` can be expanded to `git commit` (abbr), so you can save typing but still show the actual command.

Modern versions of Fish has both abbreviations and aliases. Personally, I prefer aliases for providing default arguments to commands (e.g. turning on colorized output), but prefer abbreviations for timesavers like the `gc` above.

[1]: https://fishshell.com/docs/current/cmds/abbr.html

jabirali··on Exiting VIM is hard; sometimes we need to take drastic measures
They should have advertised on startup that you can press F1 to bring up help (in both vim and nvim), that's probably easier to remember for people coming from GUI editors.
jabirali··on Exiting VIM is hard; sometimes we need to take drastic measures
The "obvious" reason would be if a person is used to terminals but not vim, as ctrl-c usually kills processes.

I think a lot of confusion could be avoided if distributions like Ubuntu, that are commonly used by new Linux users, were to set e.g. EDITOR=nano in their default ~/.bashrc. That way, writing "git commit" from a terminal, typing "v" inside less, etc. would all bring up nano instead of vim by default.

← PreviousPage 3 of 4Next →