It’s more efficient for memory until you start working with different data. Threads also rely on the same syscall on Linux, clone(2), but they don’t share the entire context by default, so they’re more lightweight. It is recommended to use pthreads(3) API instead of fork(2).
raubarno
A devastated Software Systems student, libre software promoter. Sometimes I draw pixel art. Very fond of classical Computer Science and Touhou project.
- 1 Post
- 19 Comments
If you fork a process, then it’s the two separate processes but sharing the same memory with copy-on-write mapping.
Literally me 7 hours ago
I wanna watch Mr Bean now
Saved your comment. I remember, there were also some for displaying/jumping between the frames of call stack. Okay, thanks.
Uhh, I’m too lazy to learn all the GDB commands.
raubarno@lemmy.mlto Programmer Humor@lemmy.ml•If Programming Languages Were Games (Comic)181·2 years agoHaskell isn’t really that hard to learn. It’s just changing the paradigm, that takes a mind shift for the first two weeks, maybe a month.
I don’t play games that much to make such comparisons, though.
EDIT: Well, it depends. If you statically compile everything with C build systems, in that sense, the speed should not differ from generic
cargo
workload. Although, in most cases, projects written in C are dynamically linked due to several reasons, one of which is code speed. In practice, even huge projects written in C (30k to 10k LOC) build quicker than C++ or Rust.I’m not pooping on generics, either. Generics is a saviour for correctness and performance. Yet, I want to point out the type creep is still a thing, even though there’s little we can do about it.
Anyways, this thread should be better interpreted with humor, instead of technical accuracy.
Rust v3: “It’s three hours and I’m still compiling dependencies”
EDIT: Also, “What does
Option[Arc[Mutex[BTreeMap[String, Box[RefCell[Box[amp mut F>>>>>>> where F : Fn(T) -> U
in your essay mean?” (srry, I didn’t come up with a better obscure data type, it’s probably gibberish)EDIT2: Lemmy deletes ‘less than’ sign for some damn reason (time to build Lemmy at home?)
C*
, the language of null-dereferences
~ $ adware (...ncurses ad featuring blockchain shows for 10 seconds...) Sorry, internet connection is required to run adware. Aborted ~ $ (plugs in ethernet cable) ~ $ adware (...ncurses ad featuring Threads displays for 10 seconds...) (...ncurses ad featuring next-gen Android displays for 10 seconds...) Press CTRL+C to skip the ad [^C[^C Got tired from ads? Buy Adware Pro for $5.99/mo [Y/n] n ADWARE SHELL (C) 2023 Buy-n-Large Corp. All wrongs reserved ---ad--- How much do YOU think this advanced operating environment is worth? Just press F1 to get the answer! ---ad--- Activate Adware Go to Settings to Activate Adware % exit Please watch all the ads to be able to exit. (...ncurses ad featuring alt medicine displays for 30 seconds...) (...ncurses ad featuring ad-blocker for 30 seconds...) [^C Interrupt rejected. Please watch all the ads. [^C[^C[^D[^X[^Z[^Z[^Z (unplugs ethernet cable) Interrupt rejected. Please watch all the ads. Buy Adware Pro for $5.99 to allow interrupts.
The last step I leave to you.
(X-Files music starts playing)
- Part 1: What Lies Behind the Undefined Behaviour in C
- Part 2: Mystical Appearances of CPU Cache Invalidation
- Part 3: Secret Council of the Church of Emacs
- Part 4: Strange Encounters with Supernatural Software Bugs
100Mbps download of fiber optic network for 11.50 €/mo. I’m from Lithuania, which has always had a good internet coverage. The supplier is Cgates. They offer cheaper alternatives if you agree for a 1-year or 2-year plan.
So… now the
rustc
borrow checker is the new video game boss that is nearly impossible to beat for newcomers, right?
OMG I wonder how old some of these SPARC machines are…
“And in the next episode, we are going to build a self-driving car from scratch.”
Haha, I want to see a race condition going on with real matter.