[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor application acceptance emails are being sent out. Please remember to check your spam box!


[Advertise on 4chan]


File: 1747248489478.png (135 KB, 550x550)
135 KB
135 KB PNG
There are 1664 occurrences of .unwrap() in uutils, the Rust replacement of GNUs coreutils.
>>
>>107270830
>crabs are mentally retarded
more news at 11
<heres uutils' test results
>use it anyways, chud
ack, the language
>>
>>107270878
Ubuntu extended LTS to 15 years because that's how long they expect uutils to be absolutely unusable toy as a bare minimum.
>>
>>107270830
Never trust a crab.
>>
>>107270830
And?
>>
>>107271303
I expect a bullet going through the back of his head.
>>
>>107270830
>Ubuntu going full AAACCK with Rust
very fitting
>>
>>107270830
haha OP I love froggo XD
>>
File: 1736956685858.png (81 KB, 233x216)
81 KB
81 KB PNG
>>107271343
glad that you appreciate my frog thread
>>
>>107270830
What was the old code doing if the new code has so many unwraps?
>>
>>107273403
Performing better and without issue for decades.
>>
>error handlers handle errors
you don't say
>>
omg guys. i was writing a crate for the first time, and started with the test suite before doing the actual implementation. so as you would expect, almost all tests were failing. but after your tips here, i looked for all instances of unwrap and removed them, and now most of my tests pass, without doing any extra implementation work! unwrap is really problematic, isn't it?
anyways, this is the best fucking tip ever. i'm so glad i discovered /g/.
>>
not sure if it's hilarious or sad because they try to make rust like cobol by forcing ubuntu to include it in loooong lts version. or this is a sneaky way to outsource rust written utils to be maintained by canonical.
>>
>>107274288
and of course not a single /g/tard understood the joke.
which tard from the jeet-zog xitter scene (i'm guessing) came up with this grep stat btw?
>>
>>107270830
no idea what this unwrap() shit is about and don't care, but if they need to rework 1664 occurrences that's not a lot at all
>>
>>107270830
How many instances of 'unsafe'?
>>
>>107273403
>What was the old code doing if the new code has so many unwraps?
Silent memory corruption and arbitrary code execution.
>>
>>107275534
unwrap means that there's a tagged union, but the program should assume that the tagged union is the happy variant, otherwise panic.
There's been growing concern by Rust users about the presence of unwrap and unsafe in codebases that don't really need it, and that concern is probably about to escalate into dogmatism.
>>
>>107270830
This is a problem how exactly?
It wouldn't matter if abort() was in GNU coreutils. These are command line programs—not your high traffic web server that's supposed to run 24/7/365. Nobody running them should assume they won't terminate unexpectedly or print an error. Anyone running them as a script automatically should be checking the exit code unless they're insane or don't care.
>>
>>107275802
All code execution is arbitrary
>>
Error functions that make your program terminate unexpectedly can be fine if used the right way. In fact they can be a genuine benefit if you use them when you encounter conditions that defeat all assumptions and put your program in an unrecoverable state. Basically, abrupt termination is fine if you encounter a condition that indicates a bug in the program that is so bad that continuing will cause harm in some way or if it indicates the program has been hacked or tampered with.
>>
File: 2025-11-20_20-24.png (79 KB, 1096x239)
79 KB
79 KB PNG
>>107270830
Is this the new gets()?



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.