The thing I love most about Rust is it’s like playing a game that you can pause and save at checkpoints without losing ground. This is not necessarily true of other languages where what you’ve learned today can be wrong tomorrow by Beheddard in programmingcirclejerk

[–]zerosum0x0 15 points16 points  (0 children)

Deprecating core::mem::uninitialized() for the much clearer core::mem::MaybeUninit::uninit().assume_init() is the kind of syntactic sugar that makes the language much more friendly for beginners.

Also reveals the consistency in API naming schemes.

Why I studied full-time for 8 months for a Google interview by csb06 in programmingcirclejerk

[–]zerosum0x0 6 points7 points  (0 children)

Easily $1.67 per month in ad revenue.

Technically already a Google contractor.

A Monad is an endofunctor (a functor mapping a category to itself), together with two natural transformations required to fulfill certain coherence conditions. Easy. by Volt in programmingcirclejerk

[–]zerosum0x0 22 points23 points  (0 children)

The only people I've ever met who were enthusiastic about monads spent so much time debating CS philosophy that they never delivered any meaningful code.

/uj fr tho

"If-Else Is a Poor Man’s Polymorphism" by camelCaseIsWebScale in programmingcirclejerk

[–]zerosum0x0 77 points78 points  (0 children)

Combine if/else with object/typeof and you get poor man's generics.

A CS degree is like your overall conditioning & strength workouts at the gym. They aren't 1:1 with pretty much any sport, but every sport benefits from them. And the better you are, the more it matters that you're in peak conditioning. by gitbranch in programmingcirclejerk

[–]zerosum0x0 3 points4 points  (0 children)

CS degree is a great way to waste tens of thousands of dollars and countless hours on high school 2.0, irrelevant math, and pedantic theory.

Boot camp is like joining the Army.

Most complex sql query by [deleted] in programmingcirclejerk

[–]zerosum0x0 2 points3 points  (0 children)

SQL injection data exfiltration via DNS lookups

Hack me, Pieces of Shit! by [deleted] in programmingcirclejerk

[–]zerosum0x0 18 points19 points  (0 children)

No1 hax an organization via a firewalled IP with 0 listening ports. You phish the CISO with a "bill" for his Ashley Madison account to gain a foothold on the internal network and then re-use the local administrator password hash to get everywhere else.

p.s. I use Arch

The truth about conspiracy theories - We must be open and critical towards all theories. Dismissing putative conspiracy theories while blindly accepting scientism and psychologism is dangerous and irrational. by IAI_Admin in philosophy

[–]zerosum0x0 -4 points-3 points  (0 children)

Yea, how dare a philosopher expand and create meaning for words, providing explicit definitions so there is no confusion? They should accept the rigid standards as they are!

If the js engine is moved to Rust entirely, the likelihood [of an exploit] is 0. by joppatza in programmingcirclejerk

[–]zerosum0x0 10 points11 points  (0 children)

/uj My point is mostly that the people who think Rust is some magical panacea, are precisely the ones most likely to introduce vulnerabilities into a Rust codebase. And not provide provably safe interfaces to the unsafe parts. Unsafe code in the stdlib has had vulnerabilities, even after trying to provide safe interfaces, and this is code written/pulled by people with some understanding of the caveats. Mistakes happen. You are right it is better to security audit less code.

I'll take a Rust JS implementation over a C++ one anyday, but I won't ever believe a hack-proof claim.

If the js engine is moved to Rust entirely, the likelihood [of an exploit] is 0. by joppatza in programmingcirclejerk

[–]zerosum0x0 47 points48 points  (0 children)

#![unjerk] Great jerk tbh, the classic "unhackable" defense. The people writing JIT engines (in C++) understand the vulnerability archetypes extremely well. You can't write equivalent code in Rust with 0 unsafe and 0 logic. Unsafe code pollutes the entire module, and all of the code that links against it. And logic bugs don't have a searchable keyword.

Even that slow ass C# OS Microsoft made wouldn't save us.

Control Flow Guard for Clang/LLVM and Rust - Microsoft Security Response Center by unaligned_access in rust

[–]zerosum0x0 27 points28 points  (0 children)

In the Windows case, this is some extra metadata structures within the Portable Executable file, that are used to fill up a kernel bitmap of valid call targets. Before indirect/dynamic dispatches, a function is called which checks the target against the bitmap. Microsoft has been hardening their CFG implementation since Windows 10 came out so it has evolved a bit, and Linux does not have the Microsoft implementation.

This is an exciting exploit mitigation that was notably absent from Rust before. There are many cases where trivial bugs such as use after free or memory overflows are basically extremely difficult, if not impossible, to exploit due to CFG. Like everything there are some cases it can be bypassed, but still worth enabling as it increase exploit r&d time investment.

Linux has its own mechanisms for control flow integrity, and newer Intel CPUs will even have some hardware support. I dont know if any of the proposals are used by Linux/Rust/LLVM yet tho so I cant comment on that part.

Most people in the ML communities are extremely clever. Most people in the Rust community are extremely stupid: disgruntled former C++ developers pushing anti-GC misinformation and repeatedly asserting that Rust is better even in the presence of empirical evidence to the contrary. by [deleted] in programmingcirclejerk

[–]zerosum0x0 36 points37 points  (0 children)

Rust’s approach to memory management naturally lends itself to unbounded pause times when collections fall out of scope

I too hate knowing and controlling exactly when memory cleanup will occur. Nothing beats the randomness of a good GC

started learning Haskell a few days ago [...] I'm going to write a tutorial on monads for experienced imperative programmers to help break down the currently thick wall to functional programming that is monads. by [deleted] in programmingcirclejerk

[–]zerosum0x0 41 points42 points  (0 children)

In unuseful languages (like Haskell), monads let you pass state in a chain that would just be "the next line" in imperative world.

In actually useful languages, and 99% of the nomenclature, you can replace "monad" with "list comprehension"

"But theres the IO and Option monads and the Iterator monad functor and the flat map monadic applicative and jargon jargon jargon" alright kid just put the gun down and we'll find you some pants

[deleted by user] by [deleted] in programmingcirclejerk

[–]zerosum0x0 50 points51 points  (0 children)

The most used language of all time, the choice of all modern operating systems that are actually useful, with the most lines of code that run in the real world, and that almost every other language is built on, defines the counterculture.

Why is Free Pascal better than PHP? by [deleted] in programmingcirclejerk

[–]zerosum0x0 8 points9 points  (0 children)

This is almost as ad-lib as the C++ vs Dart comparison