HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Casperin

no profile record

comments

Casperin
·10 माह पहले·discuss
Dane checking in. You know when you read a newspaper article on something you happen to know about and it's just hilariously wrong? Like, to the point of making you wonder if they're confusing your thing with something else entirely. That's your comment.
Casperin
·3 वर्ष पहले·discuss
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.
Casperin
·3 वर्ष पहले·discuss
Oh cool! I need help curing my addiction and I'm optimistic that this would do it for me.

I'm only half joking.
Casperin
·3 वर्ष पहले·discuss
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 :)
Casperin
·4 वर्ष पहले·discuss
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 :-)
Casperin
·4 वर्ष पहले·discuss
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
Casperin
·4 वर्ष पहले·discuss
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.
Casperin
·4 वर्ष पहले·discuss
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
Casperin
·4 वर्ष पहले·discuss
You can? Imperative, strong type system (no null, adts), reasonably fast, compiles to a single binary. I'm genuinely interested.
Casperin
·4 वर्ष पहले·discuss
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.
Casperin
·4 वर्ष पहले·discuss
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).
Casperin
·4 वर्ष पहले·discuss
I don't necessarily agree that Python overall is difficult to read, but one thing that seems to get my every time is the

    foo = x if y else z
Casperin
·4 वर्ष पहले·discuss
Mine does. Still picked Rust, and so happy I did. The type system alone does it for me.
Casperin
·4 वर्ष पहले·discuss
Instead of qwerty?? Never even considered that a possibility.

I also don't remap anything. It's fiiine. You'll get used to it :-)
Casperin
·4 वर्ष पहले·discuss
Helix is awesome. Thank you for doing this!
Casperin
·4 वर्ष पहले·discuss
No. And I hope there never will be. It's a different editor with its own ideas about how modal editing should be done.

It does not sound like that has your interest. That's fine. Stick with vim.
Casperin
·4 वर्ष पहले·discuss
I did this in February after 20 years in Vim. Haven't opened vim since. Happy coding my friend :)
Casperin
·4 वर्ष पहले·discuss
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).
Casperin
·4 वर्ष पहले·discuss
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 :)
Casperin
·4 वर्ष पहले·discuss
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. :)