Posts
4417
Following
315
Followers
471
Linux kernel hacker and maintainer etc.

OpenPGP: 3AB05486C7752FE1

@pinkforest @calbaker @laund

I get that for sure but…

This is the thinking that apply 100% also to any piece of user space code that I might do. I figure out the best possible solution that I can think of with my limited skills and then pick the tool that I try to nail it sometimes succeeding and sometimes failing. So yeah, my world is as plain and simple as that :-) Engineering problem at hand is the first priority, and obviously to pick the right tool I need to exactly compare pros and cons of them for that particular problem.

A recent example is an authentication module prototype that I’m developing for Ethereum ecosystem (and presenting possibly at ethprague). For that I’m most likely using Rust, and ended up to that outcome by comparing pros and cons of possible alternatives.

2
0
1
@pinkforest @laund @calbaker The core skill in engineering is to solve a problem and call it day in my books :-)

C and Rust are just tools that you might want to apply, and picking the right one based on a careful analysis of the problem at hand is the core skill, at least of an engineer.

There's as much confrontation between C and Rust as there is between a screwdriver and a chainsaw. I don't know what having a core skill in language even is other than understanding its syntax and semantics.

I'm not part of any weird "cult of C" so cannot really say that I would be part of this "C. vs Rust" confrontation. I just do stuff plain and simple. Whatever works, works. I.e. I don't have "a tool based identity".

Calling Rust as a feature is like calling cooking recipe as a spice or ingredient in a dish, which has no logic.
1
0
1

Jarkko Sakkinen

I don’t know how advisable this is but it did the job 🤷

git filter-branch --msg-filter 'cat - && echo "Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>" "$@";' HEAD~22..HEAD

#git #note

0
0
1
@laund @calbaker so you could then use the best phrase ever in English language: agree to disagree ;-)
1
0
0

Jarkko Sakkinen

Edited 1 year ago

vm-memory is really cool and should be IMHO part of stdlib :-) best way to map files and other memory so far in #Rust.

Some project types where you absolutely need memory mapped I/O are:

  • Operating Systems
  • Database Management Systems
  • Virtual Machine Managers
  • Game Engines
  • Digital Audio Workstations

I.e. anything with high scalability, high availability and in real-time processing low latency.

#rustlang

0
0
1
@ljs Thanks mate! Yeah, and I thought that if this makes anyone feeling bad of not doing the exercise, it is actually good :-)
0
0
2

Jarkko Sakkinen

Week #2 lifting weigths done after two year break. Since I have to post this, it is not a routine yet 🙂Feeling better than in ages and peace in mind. #detox
1
0
2
@laund @calbaker ok cool, i'm fine with being stupid beyond the scope of "none yet" ;-) no reason to get upset tbh.
2
0
0
@calbaker @laund E.g. it is proved that the problem of "zero bugs" cannot be proved except when you have some well defined constraints which is basis of formal verification. In generic case, i.e. Rust app ecosystem we are talking numerically infinite set of programs with no constraints except those that computational model of Turing machine sets.
1
0
0
@calbaker @laund It is pretty weird to see comments that fight against lemmas that have been proved by computer science decades ago. As if Rust was yet another computational model, e.g. in same level as turing machines and quantum computation.
2
0
0
@calbaker @laund Yeah, Rust is great and for any non-legacy fresh new project that I had previously written in C or C++ I would pick it any day.

It just that I consider it harmful thinking that problems are solved by tools. Rust can bring the edge but it needs to be supported understanding its shortcomings, limits, CPU architecture, binary formats (ELF, COFF/PE) and various other domain assets. Rust alone is not a problem solver. So it is important to raise attention on this issue.
1
1
3

Jarkko Sakkinen

Huge issue in #riscv specifiations is the lack of pseudocode. E.g. this is from the description of SWI opcode:

"The Wait for Interrupt instruction (WFI) provides a hint to the implementation that the current hart can be stalled until an interrupt might need servicing. Execution of the WFI instruction can also be used to inform the hardware platform that suitable interrupts should preferentially be routed to this hart."

Any ideas what actuallly happens when WFI is executed? I don't know. For x86 I just find the opcode from Intel SDM, and then I just read the pseudocode. I usually do not even read the prose unless really need to get bottom of it.
0
0
2

Hey folks,

Danke für all the support. You can save 15% on everything on today, when you use the discount code "DANKE" at checkout, from today until Monday!

👉 https://polarity.bandcamp.com/

0
1
1
@matzipan @calbaker We could not know that because now you are talking about the famous halting problem in computer science or at least something that can be mapped into it as bijection between the sets.
1
0
0

Jarkko Sakkinen

Edited 1 year ago
@argv_minus_one Also, you are essentially now disagreeing on that Rust is not feature. I.e. you are agreeing on that Rust is a feature 🤷
0
0
0

Jarkko Sakkinen

Edited 1 year ago
@calbaker That said obviously those checks that exist given the validation make the injection harder but I would not hold my breath seeing a Rust program used in volumes with zero CVE's in its life-cycle. That has never happened in history of security vulnerabilities so far.
2
0
0
@argv_minus_one Such language that would be memory safe does not exist.
1
0
0

@calbaker No.

It has static and run-time checks for memory safety, which is not the same as being memory safe. Just like Go, Java, Python and what not have measures for memory safety but instead of borrow checker they use a garbage collector.

Rust is less safe than any of those languages because the result is an ELF binary, which is roughly a twist of what C++ source generates with fancy checks. Same attack techniques, like ROP (return-oriented programming) gadgets still apply as for any possible ELF binary ever compiled.

3
0
1

Jarkko Sakkinen

Edited 1 year ago
When promoting apps, it is good to remember that #Rust is not a #feature :-) I zero care what language is used. Programming language is only a recipe. A CPU has only one single language that it runs baked from that recipe.

Or actually I do care in the sense that it is a huge turn back. It is misguided advertisement by definition because a competing app might not have this artificial feature. Some casual users might even think that an app is somehow better because it has the imaginary performance improvement thanks to Rust.

#rustlang
7
4
13
Show older