HNHacker News
TopNewBestAskShowJobs

dmytrish

949 karma · joined April 28, 2013

About me: https://github.com/EarlGray

[ my public key: https://keybase.io/dmytrish; my proof: https://keybase.io/dmytrish/sigs/oCCIZQXIgvSoV7t8uYgibLpsvszNB2GHc_60zpe882Y ]

submissionscomments
dmytrish··on Rust fact vs. fiction: 5 Insights from Google's Rust journey in 2022
I have already spent more time than I wanted on reading through verbose but elusive articles about Vale, without any insight into how this actually happens.

I have already spent too much time trying to compile Vale compiler which is a weird mix of Scala and C++ with a small Vale driver. Once it is actually written in Vale without segfaults, I'll revisit the language again.

Thanks for the Verona recommendation.

dmytrish··on Rust fact vs. fiction: 5 Insights from Google's Rust journey in 2022
Please demonstrate a practical and memory safe systems programming language without borrowing.

I'd be delighted to see it, because right now I am not aware of any practical way to have memory safe regions without static tracking of borrowing from these regions. It's either that or runtime checking.

dmytrish··on Text rendering hates you (2019)
My perspective, from a non-native speaker: Latin alphabet has happened to overlap with majority of world capital and economy. That is all to it. It's a never-ending baroque timesink to learn English spelling properly, but it did not matter.

Computing based on Chinese or Arabic would be a hindrance. Computing based on Hebrew, Cyrillic, Greek or Hindi would not be in any way (although for Slavic languages I do find flexibility of word order and plethora of word forms a hindrance, but it's a linguistic one).

dmytrish··on I have received a $100k sponsorship for Ladybird browser
The jakt compiler has been rewritten in jakt.

Rewriting it in jakt is now a thing!

dmytrish··on I have received a $100k sponsorship for Ladybird browser
It's the SunOS of webbrowsers. Chrome is technically opensource too.
dmytrish··on A student’s desire to get out of a exam led to a compression algorithm
Well, it still involves some kind of public key infrastructure, but encryption could be optional even in https. Linux distros have been hosting their packages on plain http for two decades, PGP signatures (again, not a great example of "trivial", I admit) were sufficient to ensure integrity.
dmytrish··on A student’s desire to get out of a exam led to a compression algorithm
Integrity without confidentiality is trivial.
dmytrish··on DreamBerd is a perfect programming language
How many billion lines of code does it compile per second?
dmytrish··on Brave Browser introduces vertical tabs
Sway (and i3?) actually has the notion of containers, which can contain multiple windows and can be selected and manipulated as a unit.

It works nicely. The only thing that I haven't automated yet is that I have a rather specific workspace layout on my 4k screen and converting it from/to a laptop-screen workspace when unplugged takes a few steps.

dmytrish··on Functional Programming in Lean
Regarding tactics: I started with Coq and I felt for a long time that I had no idea what tactics actually do. Proofs with tactics look nice on the surface, but I really did not like hidden state and hidden actions.

Redoing some proofs in Lean by construction of proof terms was eye-opening, it's just functional programming with dependent types! I still think that teaching with tactics first without exposing proof terms is a mistake.

I've learned to see the value of tactics later, again thanks to Lean: there are proofs that are more natural in the tactics style. Sometimes a mixed approach is ideal: growing intermediate proof terms from the premises and then wrangling the hypothesis with tactics to meet the lemmas.

dmytrish··on Functional Programming in Lean
There's Mathlib: https://leanprover-community.github.io/mathlib_docs/index.ht...

I was stunned when I discovered it, because it does exactly what its name suggests: it's a huge library of math proofs available as a library in Lean.

dmytrish··on Why I Use Elm in 2023
It's not exactly cursed knowledge, you just have to have enough judgement to understand where it's appropriate.

Trying to do magic and patch something on a panic and retry is cursed indeed. If it's about cleaning up resources of a thread and logging this somewhere, then there's nothing cursed about this.

dmytrish··on Lately I've been using timers daily
The screenshot looks like swaybar, a programmable status bar for Sway.
dmytrish··on 'We're all worse off': Britain is now paying the price to leave the EU
Comparison to European economies (which suffered through the same coronavirus pandemic and the same, if not worse, energy crisis) might bring some clarity.
dmytrish··on The AT protocol is the most obtuse crock of shit
It's a nice bit of marketing for Bluesky: in the process of reading the discussion I went from "it's some vague cryptosocial thing" to "well, it does solve things and actually might be worth a look".
dmytrish··on Syncthing: A continuous file synchronization program
Isn't this litailscale?
dmytrish··on BlueHat IL 2023: Microsoft rewriting core Windows libraries in Rust
Rust supports dynamic libraries with C ABI very well.

Technically, it also supports Rust ABI dynamic libraries, but their portability is quite fragile due to changes in the compiler. That's why Rust parts of the code are usually statically linked.

dmytrish··on Ron: Rusty Object Notation
It's a shame you're being downvoted, it's a perfectly valid question.

It is possible to do explicitly with `#[repr(C)]` in Rust. This is still fragile:

- `usize` and `isize` are not guaranteed to be portable between machines.

- pointers (including vtables in trait objects) are not portable between processes

- structs and enums may change in source code

- file descriptors, mutexes/futexes and any kind of external resources in general are not portable between processes. Thread-local variables are not even portable between threads.

In short: memory layout in general depends on a large amount of ephemeral compiler metadata. It is possible to constrain memory layout to something portable (protobufs, flatbuffers, capnproto, thrift, etc), but this seems more like a serialization format, not an efficient memory layout for a compiled language.

I'd say this is a good thing to avoid ossification of memory layouts: if you need to unmarshal something, it is better to mark this explicitly. Although the C ABI can be convenient, it constrains optimizations that compilers are allowed to do.

dmytrish··on Ron: Rusty Object Notation
"Scheme object notation" is called s-expressions :)

I'd argue that toml can be called "a Python(ic) object notation" in some sense.

dmytrish··on Type system of Fortnite's Verse language
I'm just guessing, but snake_case might be inspired by dependently typed programming languages, where there's no strict boundary between terms and types.

PascalCase for variables reminds me of unification-based programming languages like Prolog.

dmytrish··on WezTerm is a GPU-accelerated cross-platform terminal emulator written in Rust
Tabs, splits, programmability, best-in-class graphics support, an ssh multiplexor, session management, Lua scripting.

Alacritty and Wezterm have very different--if not opposite--philosophies. Choose Alacritty if you want something simple, fast, focused, done right. Choose WezTerm for flexibility and being a cross-platform environment by itself.

dmytrish··on WezTerm is a GPU-accelerated cross-platform terminal emulator written in Rust
I feel like WezTerm has a vision of being something bigger than a traditional VT emulator. It feels more like an environment to live in, an Emacs of terminal emulators, with its own tiling, status bar, dynamic scripting, builin Lua console, programmable events, very rich graphics. It's not a faithful old-school TTY emulator like xterm, it's not featureful, but boring Konsole, it's not ascetic but fast Alacritty. It's an experiment.

I don't personally like all of its design decisions, but an Emacs-like vibe really intrigues and attracts me.

dmytrish··on WezTerm is a GPU-accelerated cross-platform terminal emulator written in Rust
Text rendering is a quite CPU-intensive thing to do nowadays. It can burn your CPU with unnecessary work to move bitmaps around, while the GPU, which is specifically created and tuned for this kind of tasks, stays idle.

This is basic mechanical sympathy.

dmytrish··on Lisp-powered laptop with a battery life measured in years
Your project is really admirable (I'd like to make a tiny computing machine and a full computing stack myself at some point), and having fun is a sound reason to use Lisp :)

It was just me and my pet peeve that Lisps stopped being a superpower decades ago.

dmytrish··on Lisp-powered laptop with a battery life measured in years
I have tried it: I wrote multiple Lisp interpreters, including a Scheme in C with garbage collection and basic call/cc. I wrote a simple regex engine in Scheme. I wrote a basic just-in-time transpiler from elisp to Javascript. I dabbled with Common Lisp.

I still don't like it:

- a quality implementation of any Lisp is _not_ easy, e.g. just look at SBCL or Chez Scheme

- minimalistic implementations are a selling point, but I take Lua over any minimalistic Lisp anytime. Chances are that a Lua interpreter library will be smaller. Micropython runs on anything slightly more powerful than Arduino nowadays and gives you objects and async on an effing microcontroller.

- developer experience is miserable/ascetic, even compared to Lua (maybe except Clojure). Things we take for granted (dictionaries/hashmaps/object properties) are still missing from Lisps.

- structural editing is now available for any language that supports a proper language server (which almost any modern language does). s-exprs failed to become a common data language for anything. It's possible to have a simple and humane syntax at the same time (Zig, Go, Lua)

- I've learned to avoid macros and dynamic code generation unless I have a very good reason to use them in any language, otherwise they are a code smell.

It was painful for me to watch the video in the article where the author counts parenthesis and gets the job done in spite of the language, not because of it.

dmytrish··on Valent Is a KDE Connect Client for GTK-Based Desktops
My comment was overly dramatic, I'd say. I was implicitly comparing KDE to Apple-level quality in UI.

I am using KDE on Wayland on Fedora, and so far it's the most polished Linux desktop experience I've ever had.

Maybe it's my experience with KDE4 that turned me off after KDE3, then tidal changes of stability in KDE5 that undermined my trust.

dmytrish··on Valent Is a KDE Connect Client for GTK-Based Desktops
I use KDE because I like its relatively polished design and philosophy of flexibility and empowering power users. I can and I do wrestle things that I don't like into a shape I like.

I still have to put up with many, many downsides around its stability, bugs, resource consumption, being written in C++ and builds being a nontrivial exercise.

I can sympathize with those for whom KDE does not suit well.

dmytrish··on Selfie: An educational platform for teaching systems engineering
For the record: C* is a subset of C. Selfie is trivially bootstrapple by any C compiler. Moreover, it's very easy to implement the subset of RISC-V used by Selfie if you don't trust its emulator.

Bootstrapping vs self-hosting is a false dichotomy here.

dmytrish··on Ask HN: How do ADHD people cope on here?
Easier said than done, but repurposing an old phone or getting a cheap one for work might help.
dmytrish··on Ask HN: How do ADHD people cope on here?
What works for me:

- reminding myself that my fear of missing out is misleading. Grounding myself in work and specific interests. Nothing bad will happen if I miss a hot new JS framework.

- that clears space for more introspection. Observing myself, what I spend time on exactly here, how and why.

- then, deprioritizing new shiny unimportant things from HN in my mind; I still look at new things outside my niche, but I try to prioritize looking at HN posts closer to my interests. It's also good because some of HN comments look deep and insightful, but are not actually accurate or objective. It takes some pre-existing knowledge to be able to tell that.

- sorting through the tabs, moving important ones to the left, to be able to close a ton of tabs on the right in one go without hesitation when needed. Tree Style Tabs for Firefox helps me make rabbit holes visually obvious and undig myself from them.

- getting into a habit of more self-awareness of why I spend time here, "do I get anything meaningful from this time?". If not, time spent in comments would be better spent reading the actual article or docs for this new thing.

- getting "no HN" time, when I consider even visiting it a bad thing (not in a shameful way, just "here we go again"). Practicing switching attention to something else, even if it's something silly (and hopefully not too engineered for grabbing my attention).

← PreviousPage 2 of 13Next →