HN user

Casperin

150 karma
Posts4
Comments69
View on HN

Leo Africanus by Amin Maalouf -- I was approached in an airport by a lovely old gentleman who essentially told me to read this book and insisted I take a photo of it so I wouldn't forget. Half a year later, I'm out of things to read and looking for a change (I never read historical fiction before) and gave it a shot. It has opened a world of a completely new genre for me.

Helix 23.03 3 years ago

Not GP, but same story for me (except it's been more than a year now for me). I'm coding 90% in Rust. The remaining 10% is a good mix of OCaml, TS, Python, Shell. It doesn't really matter what I touch. Helix is my editor :)

Yes. It requires that `if else` can be used as expressions, which for some reason in most languages that can not.

In the beginning of doing Rust I was missing the ternary operator, but now I couldn't care less.

    foo = if y { x } else { y }
Works well :-)

Yes, Ada. Maybe. I will have to look at it.

The rest all are missing basic things. Like, I love TS, but it's absolutely bonkers because js is js. I once worked on a 250k loc project of js/ts, and we had nothing but trouble

It has no adts at all. Like I'm reading blog posts right now about how to do what should be the simplest thing

    enum Foo {
        A(String),
        B(i32),
    }
And it's.. not simple. And even if you manage to do it, it'll never be how Kotlin was meant to be written.

I've used Go for almost two years on a side project and its type system is exactly why I'm doing Rust now. In my book, it is not okay that I add a new field to a struct and then nothing happens. No compile warnings, nothing. It's just assumed that I then wanted the zeroth value whenever it's created. ... And no adts. You just can't make something as simple as

    enum Foo {
        Bar(String),
        Baz(i32),
    }
Why? It's such a fundamental thing to be able to say "this piece of data is either this or that.. and then have the compiler tell you if you missed a case.

Ada is on my list of languages to look at. I'm cautiously optimistic about that one. But would you pick that over Rust as the simpler alternative? "Look guys! We're not moving fast enough with Rust because nobody seems to be proficient in it. Let's go with Ada instead!" .. I jest, but I will check it out and I really hope it hits the sweet spot for me

I'm in a fourth category. I just want a simple imperative language with a solid type system that is reasonably fast.

While Rust isn't simple, I don't know any other languages that fill this space.

I can. I work on a ~20k loc Python service as well as a ~10k loc Rust service. The Rust service is only half the size, but the problem space is many times more complex.

Whenever I work on the Python service I feel like I'm working in clay. Like, everything kind of sort of works. It won't at first, but then you just poke at it with a stick until it does. In Rust, it works or you're told exactly why it doesn't and then you fix it.

I change a struct and the compiler provides me with a list of places that need updating.

I have many reasons (mypy, type system, testing, venv, python 2), but really the big one is rust's superior type system as well as general tooling (lsp is way better, cargo and clippy are phenomenal).

I got you. Put this in your ~/.config/helix/config.toml.

    theme = "bogster"
Or type `:theme` and use tab to cycle through the themes (it'll apply the theme to the current file while you cycle, no need to hit enter).

I've used Helix since February, and vim for 20 years prior.

For basic edits it's roughly on par now for me (maybe a bit slower?); but then Helix has really neat tree-sitter integration, so as I'm getting more and more used to that, I find myself jumping around code faster and with more precision.

I also never have these moments of fat-fingering a key and then have vim go nuts on me. Like I suddenly deleted half the function and ended up in some mode I've never heard of while doing a recursive recording. ... just mentioning that because I believe (but not sure) that it's because of this selection > verb scheme that I don't ever see that happening in Helix :)

Good question, and I don't think my answer will satisfy your needs, but it does mine.

The only long form text that I ever write is in markdown. I do miss the `gq` command from vim, but in general I just do a single line break after every dot. Markdown ignores a single line break in the middle of a paragraph, so it works out okay. I even found it almost convenient to edit text like that because it's easy to move lines around.

In code documentation (which I do a lot of), I have to manually wrap the lines of course (just like anyone else). That's where I miss `gq` the most. :)

Don't even try to reconfigure them. Try to learn the editor first as it is.

If you think that's crazy-talk, then imagine someone saying they'd like to learn vim, but they find it hard to configure the shortcuts to be like Eclipse. They aren't wrong, but it also doesn't seem like the right approach to learn vim either.

After 20 years of vim I decided to try out Helix back in Feb and never looked back, so I guess I can chime in here.

Sure, it took a few days (maybe weeks?) of feeling uncomfortable, but unlike vim, Helix is very approachable. I think you have to be okay with a certain level of feeling uncomfortable if you want to do or learn anything new though. If learning a new editor isn't your thing, then don't. :)

I get this same question a lot when people realize that I use Dvorak layout. Sure, yes, it took time to learn. But I was curious if there was something better for me on the other side. It seemed plausible that there would be, so I gave it a shot. In both cases I have been happy with my investment.

I opened helix to check it for you. Pressed `g` and had a little popup tell me that following with `h` = line start, `l` = line end, `s` first non-blank in line (plus ~15 other options).

My hx doesn't wrap lines, so didn't check `gj` and `gk`.

I live (and bike) here too. I think what you mean to say is that it can feel kind of hectic and dangerous to step out of a bus onto the bike lane.

I can promise you that every biker care. If nothing else, then at least for their own safety. And in the 35 years I've been biking around here, I've never seen a collision between someone stepping out of a bus and a bike coming from behind.

Apps Getting Worse 5 years ago

In every company I have worked in on the frontend, this is the answer.

"We need to increase x" comes down from somewhere, and then everyone attempts to find a good way to measure increase/decrease of x and then come up with a design that increases x.

I have never been in a company where a UX or UI designer had leverage to redesign anything just for the hell of it.

I run i3/tmux/xterm wherever I can (also back when I was doing frontend). I definitely prefer this over anything Apple has been able to offer me in terms of user experience.

My comment above was just a reflection of a connection I hadn't made before. :)

This made me think of how many developers (who spend 10 hrs/day in front of their screen) choose Apples products. A linux machine might be better on performance, maintainance, and all that, but Linux does not care about UX the way Apple does.

Really? We're both Android users ourselves, and use a mix of Chrome and FF.

Did you perhaps not really add the feed? Like, it shows you a preview where you only see the titles first, and then you have to click "Add feed" at the top. It's just a step for you to be sure that you got what you want; but I guess it isn't 100% clear.

You are right, it has the same behavior. It's the same exact page (displaying the content of a post), and it has no logic in it around where you came from.

Personally the back button is the first resort, unless I opened it in a new tab, in which case ctrl-w brings me back. I always assumed others felt the same, but good to learn that not everyone feels that way.