[-] FizzyOrange@programming.dev 10 points 2 months ago

Zig and Go are serious. I think Python would be a language that isn't serious (despite it's widespread use in serious applications) but has a reputation for being easy. I don't know if that reputation is really deserved.

Anyway I would start with one of Python, Go or Typescript (via Deno). I would avoid Rust, Haskell, OCaml, C++ as your very first language, but they could be your second.

Whatever you do don't learn Python and stop there. That's the way to be a crap programmer. And if you do use Python learn to use type hints early on.

[-] FizzyOrange@programming.dev 10 points 8 months ago

Even if there are tight time constraints, you won’t sacrifice quality, because that would make you slower.

Too right. People find this so hard to understand. I think they dramatically underestimate the payback time on technical debt.

I am currently working in a startup that has the classic "we're a startup, quality doesn't matter" attitude. They think that they might not be around in a year so it's best to go fast and not give a shit about tech debt.

In my experience that attitude bites in under 6 months. I'm already wasting entire days sorting out messes that they neglected to deal with.

[-] FizzyOrange@programming.dev 10 points 1 year ago

I think this actually happens when you do a speed test. Bittorrent being throttled? Hmm let me just run a speed te.. oh it's working now is it?

[-] FizzyOrange@programming.dev 10 points 1 year ago

The linked patch actually explains it really well.

If you want two processes to communicate (IPC) normally, you would set up some shared memory, so that in each process's virtual memory some pages are shared between them both, so when process A writes to that memory it is visible to process B and vice versa. There are other ways to do IPC but this is the fastest since it doesn't involve any syscalls (context switch to the kernel which is slow).

However it still requires each process to copy its private data into and out of the shared memory. Also it still requires a context switch from process A to process B.

A common use of IPC is for RPC (Remote Procedure Calls). Basically you want to run a function in the other process. This solution does that but differently and faster.

  1. First, both processes share the same virtual memory. This is normally a recipe for disaster since it completely destroys the normal process memory sandboxing (a memory error in one process can now crash the other one!). However they use a new Intel MPK hardware feature that allows splitting the pages into one of 16 groups ("keys"), and you can control read/write access to each group independently.

  2. Next when process A wants to call a function in process B, the RPAL code does a lightweight context switch in user space. I guess this just means changing the MPK key, and normal saving of registers for the function call. I'm not sure what else you'd need to change. It's a little unclear about how you pass heap data from process A to process B. I guess both processes just have read access to the entire address space? That doesn't really change the security model on Unix since any process can already debug any other process with no extra permissions.

It sounds very similar to running two processes as if they were threads in the same process. Why not just use threads? Probably a better option if you can, but I guess if you are e.g. running processes written in different languages that might be tricky?

[-] FizzyOrange@programming.dev 10 points 1 year ago

Terrible use of > 😄

[-] FizzyOrange@programming.dev 10 points 1 year ago

Definitely SQLite. Easily accessible from Python, very fast, universally supported, no complicated setup, and everything is stored in a single file.

It even has a number of good GUI frontends. There's really no reason to look any further for a project like this.

[-] FizzyOrange@programming.dev 10 points 1 year ago

What on earth are you talking about? There's no enshittification here.

[-] FizzyOrange@programming.dev 10 points 2 years ago

So glad they made the sane move and fixed std::env::home_dir(). The previous situation of having it deprecated due to fairly insignificant reasons, while recommending an abandoned crate instead was just silly.

[-] FizzyOrange@programming.dev 10 points 2 years ago

Oh cool how do I run VSCode in Termux?

[-] FizzyOrange@programming.dev 10 points 2 years ago

I've heard they also removed good reviews if you don't pay them, so... yeah I don't think you can really learn anything from TrustPilot.

[-] FizzyOrange@programming.dev 10 points 2 years ago

I never did a CS degree but recently I've been doing some things that make me wish I had. But it isn't any of this stuff which seems mostly programming things that you can easily learn outside academia.

The stuff I would like to understand which I haven't yet been able to learn on my own is the hard computer sciency stuff: lambda calculus, type inference (how do you read that weird judgement syntax?), how SAT/SMT solvers work, dependent typing systems... Does anyone have any good resources for those sorts of things?

[-] FizzyOrange@programming.dev 10 points 2 years ago

Real moral of the story: STATIC TYPING!

Seriously so many people think it's a waste of time, and then stuff like this happens.

view more: ‹ prev next ›

FizzyOrange

0 post score
0 comment score
joined 2 years ago