My personal blog hauleth.dev
blog
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix some Markdown styling issues

+46 -9
+3 -3
content/post/beam-process-memory-usage.md
··· 380 380 Elixir 1.14.5 (compiled with Erlang/OTP 25) 381 381 ``` 382 382 383 - > Note no JIT as Nix on macOS currently[^currently] disable it and I didn't bother to enable 384 - > it in the derivation (it was disabled because there were some issues, but IIRC 385 - > these are resolved now). 383 + > Note no JIT as Nix on macOS currently[^currently] disable it and I didn't 384 + > bother to enable it in the derivation (it was disabled because there were some 385 + > issues, but IIRC these are resolved now). 386 386 387 387 [^currently]: Nixpkgs rev `bc3ec5ea` 388 388
+6 -5
content/post/eli5-ownership.md
··· 36 36 doesn't matter, but there will be only one owner. You can do whatever you want 37 37 with such note but with that power comes, not so great, responsibility: after 38 38 you are done with this book you will need to get rid of it. Since you are a law 39 - abiding citizen you will recycle the note in the appropriate receptacle, but it is your 40 - responsibility to do it. Of course this is not the only way to deal with a note. You 41 - can also give it to someone and then it will be hers or his responsibility. 39 + abiding citizen you will recycle the note in the appropriate receptacle, but it 40 + is your responsibility to do it. Of course this is not the only way to deal with 41 + a note. You can also give it to someone and then it will be hers or his 42 + responsibility. 42 43 43 44 To rephrase it in the Rust way, it would look like this: 44 45 ··· 140 141 141 142 But some notes are even shorter than that. They are so short and easy to clone 142 143 that it is much easier to clone them every time, instead of explicitly 143 - calling the method. Like when you give your phone number to a hot girl at the 144 - bar, the `Copy` trait automatically clones your note so the other has their own copy. 144 + calling the method. Like when you give your phone number to a hot girl at the 145 + bar, the `Copy` trait automatically clones your note so the other has their own copy. 145 146 Again, this is for small types that can be mechanically copied each time when needed. 146 147 147 148 ```rust
+37
content/post/port-love.md
··· 1 + +++ 2 + title = "For F**k Interface" 3 + date = 2025-11-03 4 + 5 + [taxonomies] 6 + tags = [ 7 + "beam" 8 + ] 9 + +++ 10 + 11 + Erlang provides multiple forms of FFI: 12 + 13 + - C Nodes - external applications, that (despite the name) can be implemented in 14 + any language, not just C. It communicates with BEAM VM via Distributed Erlang, 15 + and for all needs and purposes looks like "regular" Erlang node in cluster 16 + (just can be implemented in any language). It provides greatest isolation, as 17 + technically these two nodes do not even need to be on the same machine. 18 + - Ports - an external program, that is ran by BEAM VM and then communicates 19 + via unnamed Unix pipes[^pipes]. It relies on OS for process isolation, which 20 + mean that in the isolation level ladder it is placed in the middle. 21 + [^pipes]: I do not know what this mechanism is called on Windows, sorry. 22 + - NIF (Native Implemented Function) - with that you write dynamic libraries, 23 + that are loaded into the same address space as BEAM VM and then you can call 24 + functions from this module like "normal" BEAM functions. That gives the best 25 + performance out of three, but at the same time it isolates least. Writing well 26 + behaving NIF is not easy, as you need to take into consideration the function 27 + run time or use dirty scheduler, unhandled runtime errors will cause problems 28 + for whole VM, and stuff like that. 29 + 30 + 31 + Technically there is another FFI option, but that one is legacy: 32 + 33 + - Port Drivers - mostly a legacy stuff, these are modules, that are loaded 34 + within the same address space as BEAM VM, but communication between different 35 + languages is done like with Ports (just within single memory space). That mean 36 + that you have disadvantages of both Ports (indirect communication) and NIFs 37 + (system destabilisation in case of error), but without any real benefit.
-1
content/post/vim-for-elixir.md
··· 319 319 Google to find it). Instead I highly suggest You to dig into your own 320 320 configuration and for each line ask yourself: 321 321 322 - 323 322 - Do I know what this line **does**? 324 323 - Do I really **need** this line? 325 324