HNHacker News
TopNewBestAskShowJobs

shiryel

234 karma · joined April 6, 2021

[ my public key: https://keybase.io/shiryel; my proof: https://keybase.io/shiryel/sigs/klBpn9H3t-AfG9jEw9Zvzhf8MwPfkfuncPiIcelTXow ]
submissionscomments
shiryel··on A new PNG spec
That is also how Krita stores brushes. Unfortunately, that can cause some unexpected issues when there's too much data [1][2].

[1] - https://github.com/Draneria/Metallics-by-Draneria_Krita-Brus...

[2] - https://krita-artists.org/t/memileo-impasto-brushes/92952/11...

shiryel··on Windows: Insecure by Design
Fortunately tools to fix this issue on Linux exist, like Bubblewrap and Dbus-Proxy, but they require custom configuration per software, so almost no distro uses them directly, but we do have Flatpak that basically uses both of these tools under the hood, unfortunately, it also has its own "limitations", like the amount of packages and some weird behavior in some packages.

I'm trying to solve this issue by using both of these tools with NixOS [1], where I can choose how much security I want for each package, like limiting the files that they can access and/or the entire dbus (practically simulating Flatpak). I mostly use it on proprietary software, like Games, as they have a history with RCEs...

In the end, security is a tradeoff with convenience.

[1] - https://github.com/shiryel/nixjail

shiryel··on Elixir and Rust is a good mix
As it usually goes in programming, "it depends on your objectives", there are things that are easier accomplished with the ErlangVM than Rust. Also, if you want a language that uses the ErlangVM and has static types, maybe you should take a look at Glean[1].

In my case I prefer to work with Elixir because of the community, as I find easier to work professionally with Elixir than some other mainstream languages, as mostly projects follows the same good practices, use the same tools and have good documentation.

[1] - https://gleam.run/

shiryel··on Joy of Elixir (2020)
I can also confirm this, the elixir community is by far one of the most welcoming communities that I have ever seen!
shiryel··on Joy of Elixir (2020)
Elixir has tradeoffs that many languages refuse to do, like green-threads (from Erlang), that enables you to do many cool things with the concurrency / parallelism / distributed computing bits (and there is a whole ecosystem around these tradeoffs).

But the selling point of Elixir for me is the quality of life for the dev, the docs and tooling are amazing, the community is very focused, the language itself is easy to read and extend (with the powerful macro system) and the pattern match system, is one of those things I wish every language had.

shiryel··on We want to make Nix better
I love nix, I've been using it for the last 2 years, I have a very stable setup from these 2 years of effort [0], and I just can't recommend Nix for Linux beginners, why?

It's not because of the nix language, It's not because of the CLI, it's because everything is scattered, you have to consult many places to find out how to do things with Nix, here is an example:

Usually, when I need a new complex program, like Steam, I first check the system-wide configuration [1], the wiki [2] and the package list [3], if I just want it on my user, I need to check if Home Manager has an option [4], if it doesn't, I can try using the "home.packages" option. Now, if I need to override something on the package, I need to remember how to do it with [5] [6] (while checking the source code for the package in parallel to find the options).

And then sometimes, on very rare occasions, I need to fine tune something with the nix language, so I need to check the builtins/lib docs [7], but some builtins are not there, so I need to either use nix-doc [8] or find the docs inside the code-bases [9] [10] (they are split between both repos)

For me, this is one of the main pain points of using Nix / NixOS that needs to be solved.

[0] - https://github.com/shiryel/nixos-dotfiles

[1] - https://search.nixos.org/options

[2] - https://nixos.wiki/wiki/Steam

[3] - https://search.nixos.org/packages

[4] - https://mipmip.github.io/home-manager-option-search/

[5] - https://nixos.org/manual/nixos/stable/#sec-customising-packa...

[6] - https://nixos.org/guides/nix-pills/nixpkgs-overriding-packag...

[7] - https://teu5us.github.io/nix-lib.html

[8] - https://github.com/lf-/nix-doc

[9] - https://github.com/NixOS/nix

[10] - https://github.com/NixOS/nixpkgs

shiryel··on JIT/GPU accelerated deep learning for Elixir with Axon v0.1
Yea, only time will tell, but one thing that I love about Elixir is it community, that try to support and improve the "big projects" instead of remaking, eg:

- Phoenix for web dev

- Nerves for IoT / Embedded systems

- Membrane for multimedia / streaming

Hopefully Nx and Axon will be in this list soon :)

shiryel··on I love the Linux desktop, but that doesn't mean I don't see its problems
> Also (surprise) shell Linux knowledge almost doesn't scale to the debugging GPU drivers, DE and X server issues.

You will be surprised on how much Wayland solved those issues. At least, in my experience, understanding why Sway crashed is a debug flag away. Unfortunately, Wayland is a double edge sword, even more if you want to run games with multiple monitors (but that is a pain even on Windows in my experience).

shiryel··on Bleh
https://swaywm.org/
shiryel··on The original “Bambi”
I don't know how much scientific is the references on this article [1], but it's a good read about the topic

[1] - http://web.archive.org/web/20190423155359/https://medium.com...

shiryel··on Times are great for programmers now. How does it end?
That makes me think, doctors and lawyers have intensive training to minimize risk for other persons, each day our field has more impact on other's life, I wonder if we are heading to something similar...
shiryel··on Ask HN: Who wants to collaborate?
I'm building a open source Raylib's binding for Elixir, to be the base of 2D/3D games in elixir (yes, I know that elixir is not the best language for that, but its something that would be cool to do with Erlang's VM regardless)

Link: https://github.com/shiryel/rayex

The project's architecture is already ready to use, it just needs more functions implemented from Raylib and I need to figure out how to make it work on MacOS (see issue #7)

Any help would be greatly appreciated :)

shiryel··on Vim Galore: everything you need to know about Vim
For those that are whiling to learn vim, I recommend to not install a lot of plugins when you are still learning, you will probably just forget them and it will probably have side effects on your configuration!

But as basic plugins that will provide a great quality of life, I shall recommend those:

Global Search: fzf

Syntax Highlight: nvim-treesitter

LSP: nvim-lspconfig or coc

Dir Nav: nerdtree

Git: vim-fugitive

shiryel··on Graphviz: Open-source graph visualization software
I love using Graphviz to document projects, because its just a text file that I can keep with the project on git.

I also used it to make a small tool to generate the relationships of Elixir's modules: https://github.com/shiryel/graphme

shiryel··on Big Time Public License
10k USD a year is a reasonable salary in some third-world countries, on Brazil the minimum wage is about 2600 USD a year
shiryel··on Microsoft_craziness.h (2018)
The ideal solution is to use modules/classes and parameters names to contextualize, eg:

Windows.find_kit_root(key)

And is even better if your language supports pattern match on the parameters like elixir, so you can "overload" the function with many types of arguments, eg:

Windows.find_kit_root(%User{key: key})

Windows.find_kit_root(%Admin{key: key})

Providing different behaviors to the same function name

shiryel··on Deldo is a sex toy control and teledildonics mode for Emacs
Emacs really has any function that you can imagine, XKCD 378 has never so true. Also, very impressive.
shiryel··on Revolt: Open-source alternative to Discord
I would consider it was a interesting flag if I was an investor. Many startups choose languages because of the benefices that they have, I cant see discord as it is nowadays without Elixir for example.

But obviously, some startups choose because its cool, this ones you shall avoid.

shiryel··on Neovim v0.5
Well, mostly of the language specific plugins are language server protocols (LSP), you only need a client to make they work on any editor, I used to use CoC on vim to have that power, but now with the new version of NeoVim the client is build-in, so...