[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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


Why did people create an entire language with different paradigms instead of just doing this?
>>
User input is gay. If we were interested in what the user has to say, we wouldn't have learned to code.
>>
>>106471332
>passed a random uninitialized pointer as const char* input,
>strlen segfaults
>>
File: mental-negritude.png (64 KB, 760x262)
64 KB
64 KB PNG
>>106471332
mental negritude
on a more serious note
grifts, licence replacements, political shit

also rust is supposed to do static analysis of your code
but the guarantees are iffy
>>
c++ should allow variable legnth arrays on stack. we should kill everyone who opposes this.
>>
>>106471377
wrong, dumb retard. VLA are almost always worse than fixed size arrays.
https://nullprogram.com/blog/2019/10/27/
>>
>.cpp for no reason
>not taking '\0' into account
>mentioning rust to get (You)s
jeet bait
>>
>>106471387
Starting with this guy preferably.
>>
>>106471414
>>not taking '\0' into account
wrong, dumb retard

>>106471419
not an argument
>>
>>106471387
you contradicted yourself on the span of two phrases
>>
>>106471427
>dumb retard can't read
>>
>>106471422
(nta)
>not an argument
none needed

you said yourself that fsa are *ALMOST* always better
which means sometimes they arent

so why would you just bar vlas from c++?
>unreliable to sizeof which makes it gonfusing to austists
*facepalm* (i wish that wasnt the reason)
>>
>>106471446
>wall of dumb retardation
damn, cniles are absolutely retarded
>>
>>106471431
>>106471446
oh i can read
its just that youre mantally handicapped and dont even realize what youre saying
>>
>>106471454
> no argument whatsoever
ok, then youre trolling *shrug*
>>
File: 1629135658676.png (3 KB, 119x128)
3 KB
3 KB PNG
>>106471454
Not an argument
>>
>>106471455
good thing I linked you a post from a (non retarded) cnile that demonstrates why VLAs are retarded.
Here is Linus Torvalds saying the same thing: https://lkml.org/lkml/2018/3/7/621
>USING VLA'S IS ACTIVELY STUPID!

>>106471464
dumb retard, try formulating an argument

>>106471465
correct
>>
>>106471470
yeah but i dont care now
you lost my attention
learn to talk to people
>>
>>106471470
Realistically you could just compare the stack pointer and handle accordingly but still i agree it's implemented like garbage in the language itself.
>>
File: antioxidant manifesto.png (140 KB, 825x3574)
140 KB
140 KB PNG
>>106471414
C++ is jeet repellent. The only reason rust was invented was to prevent the jeetpocalypse of jeets trying to take over C++ codebases.
>>
>rust thread
man I thought that rust was finally dead or something, didn't hear from rust shills in months
>>
>int main()
that's IB
>>
>>106471332
the problem is the refusal of the C committee to fix arrays. They should have been ptr+length instead it all turns into pointer when you pass it around and you loose the information you want. c++ has the same problem. The D creator suggest a long time ago how to fix the issue but no one cared.
Problems like these are why it was necessary to make a new language that could learn from past mistakes and move forward Rust with its explicit nature half succeeds. Zig, Odin, Jai, Beef etc. all learned from the same mistakes and tried to improve it so far but they don't want to push too much responsibility on the compiler.
>>
>>106471470
he doesn't give actual reasons he just says its le bad for his use case in the most seething way possible.
>>
>>106471520
see >>106471387
>>
>>106471490
you should add the fact the kernel developers really love C++ to this very real manifesto
>>
>>106471527
aaaaaand looks like it's just more basedrage about le big bad buffer overflows
>>
>>106471332
>Why check things once at compile time when you can check them a billion times at execution time
>>
>>106471586
>implying your program's data is always literals known at compile time
the rust community has serious problems with tech literacy levels
>>
>>106471332
>Why did people create an entire language with different paradigms instead of just doing this?
Because of many other features and guarantees.
>>
File: piechart.png (40 KB, 600x355)
40 KB
40 KB PNG
>>106471553
cniles just can't stop fucking up
>>
>>106471627
and rust isnt a silver bullet
>>
>>106471653
those CVEs are not memory safety related.
dumb retard.
>>
>>106471598
The actual data is irrelevant if the compiler is able to prove that the program behaves well for any input.
>>
>>106471653
it's funny how rust is never used for any new project, it's all just rewrite x in rust, infact this is why rust is doomed, if you look closely all popular programming languages became popular because they were used to make completely novel software that changed industry forever, for C it was Unix, for JS it was the web, for Java is was enterprise applications, rust simply lacks it's niche.
>>
>>106471660
exactly, you imbecile
rust isnt a silver bullet

>>106471723
that is impossible
it is the halting problem, reformulated

>>106471724
~ more or less
amazon is using rust for its codebase i heard
servershit could be a niche for rust if it were a more mature, streamlined language
>>
>>106471332
the compiler also handle memory leaks but yeh
there are safe functions in C, there is no need to use rust from program security perspective, and desu since its also shit in benchmarks there is no need to use it at all
>>
>>106471752
safe = runtime checks = slow
one just cannot have speed and correctness without a competent workforce
rust or c or with any language
>>
>>106471758
thing is that the rust parser is extremely slow and in C you have way better solutions.
you can write safe program in C that will outstand rust in performance and readability
>>
>>106471377
what is alloca()?
>>
>>106471724
Yes Rust is doomed, just 2 more weeks.
Keep us posted tomorrow in your next rust seethe thread.
>>
>>106471812
>you can write safe program in C that will outstand rust in performance and readability
im not sure about that
but also my working definition of "safe" makes rust an unsafe language

to me a mem-safe framework is a framework that has all memory related ops abstracted away, and taken care of behind the scenes
to turn c into something like that would mean runtime checks everywhere
so conditionals bonanza

to make c actually safe one would have to turn it into python, basically
or java. yeah, java sounds better, using python as comparison was exagerated

im not saying that we should, mind you. that would defeat the purpose of c in my opinion
>>
>>106471724
>it's funny how rust is never used for any new project, it's all just rewrite x in rust, infact this is why rust is doomed, if you look closely all popular programming languages became popular because they were used to make completely novel software that changed industry forever, for C it was Unix, for JS it was the web, for Java is was enterprise applications, rust simply lacks it's niche.
Can you name any totally new C project that isn't a rewrite that was made in last 5 years?
>>
>>106471836
keep pushing shit to people throat and people will just start to hate it.
imagine that
>>
>>106471653
None of these CVEs are related to the things in the plot you are replying nor the post before that.
Rust does prevent buffer overflows, use after free and such.
>>
>>106471839
>runtime checks
you don't need that.
all you need are functions like OP that handle memory overflow/corruption
just simple if statements
>>
>>106471847
theres actually quite a few
>>
File: annoyed-pepe.jpg (73 KB, 750x1000)
73 KB
73 KB JPG
>>106471868
>just simple if statements
that is
EXTREMELY litertally
a runtime check

youre literally checking a condition
during runtime
>>
>>106471847
these are more name-droppey
>>
>>106471723
Can it?
>>
>>106471490
I actually believe this. C++ is probably the most aryan language desu.
>>
>>106471885
but runtime refer to a running binary, you don't need to preform these kind of tests, just set the correct functions and that's it, its a fucking bloat
>>
>>106471741
>exactly, you imbecile
Then why did you post those two CVEs?
dumb retard
>>
>>106471847
C was invented in 1970s, it already developed everything that it was created for, you completely missed my point retard.
>>
Because of the useless O(n) computer cycles every time you want to copy a string?
>>
>>106471923
yeah, well
the clean and ethnically homogenous way of doing things is that you check your input once, at the entry point
if its a literal, the check is done by hand, by the programmer

problem is that if its a library that youre writing, you never know where the entry point is, in other words- where does data input enter your program
so you have to check everything, at all times
because that could even be a malformed literal

and thats a whole lot of redundant if statements
>>
>>106471936
>doesnt understand
>calls others retards
yeah youre flaming
go away
>>
>>106471836
>2 more weeks
?
it has been months since rust was kicked out of online hype train, they are already writing preemptive obituaries.
https://medium.com/solo-devs/why-no-one-is-talking-about-rust-in-2025-21d7e059fa49
>>
>>106471963
>so you have to check everything, at all times
wrong
https://wiki.haskell.org/index.php?title=Newtype
https://doc.rust-lang.org/rust-by-example/generics/new_types.html

>>106471971
dumb retard
>>
>>106471977
>more flaming
you expect me to read your brain vomit?
its simple
if you dont make a runtime check
you dont know if your data is malformed

so you check your entrypoints
fptrany retard nigger mongoloid made me repeat myself again
wow. such iq

now fuck off
>>
>>106471975
yeah bro just 2 more weeks and rust will be really dead for real this time. This Medium blog proves it.
>>
>>106472031
dumb retard, you make a newtype whose constructor checks if the input is valid. then you pass that newtype around and have a guarantee that the input is valid.
try using your brain next time.
>>
>>106472050
>you make a newtype whose constructor checks if the input is valid.
which is a runtime check

functional programming scars the brain
turns you into a mongoloid
>>
>>106472055
try doing a runtime check for your brain
dumb retard
>>
>>106472062
fine argument
but you were wrong in every one of your posts ITT, fptrany retard
>>
File: GyrJX51XUAAja6r.jpg (94 KB, 1200x895)
94 KB
94 KB JPG
>passes_overflow_test
>>
>>106472069
the newtype pattern isn't functional programming, dumb retard.
also, are you the lamao faggot? you are just as retarded as he is.
>>
>>106472075
>digression
nothing is gonna distract from the fact youre a napoleonioan retard who cant even into basic logic
>>
>>106471873
>>106471907
>asking AI
Cnile humiliation ritual lmao

Also all of these are just rewrites

>>106471951
No you missed the point. As you have noticed your criteria is biased and has nothing to do with a language and everything to do with what time frame you are considering.
>>
>>106472080
>dumb retard can't into basic type theory
lamao
>>
>>106472081
>t. seething
>malding, even
show your hastable implementation, trany ret
>>
>>106472084
>digression
nothing is gonna distract from the fact you dont even know what runtime means
>>
>>106472086
let table = HashMap::new()

Let's see Paul Allen's hash table
>>
>>106471873
>TTS rewrite
>Webshit rewrite
>JD rewrite
>music player rewrite
>perlin noise rewrite
Anything new?
>>
>>106471963
Ultimately the problem is libraries. Hacks who can't code want to glue together libraries without having to think or understand anything. Any language after C is explicitly made for this purpose, that's why performance has been on a steady decline for the past 2 decades
>>
>>106472096
prove these are rewrites *shrug*
>>
>>106472100
NTA, there already exist software for all of that, yet some cnile had to rewrite it for no reason.

Also GNU/Linux is a rewrite too.
>>
>>106472099
the problem is big corpo
they want their workforce to be interchangeable drones to reduce dev costs
and this is why libs were created, and that portability was shoehorned into C

C didnt even have a standard for the first 10 years of its existence
>>
>>106472115
>redditspacing
also
>retarded non argument

then everything is a rewrite and the term has no meaning
>>
>>106472125
cope
>>
>>106472129
ur the one seething though
how bout you go back?
you'll end up with an ulcer
>>
>>106472134
seethe
>>
>>106472137
>n-no, u
pathetic
>>
>>106472125
>then everything is a rewrite and the term has no meaning
So you have finally realized how retarded your first point was. Good.
>>
>>106472162
thats your definition though
you just called yourself retarded, reddit
>>
>>106472081
>No you
This is your argument in nutshell btw
>>106472081
>your criteria is biased
my criteria is simple, languages like C, Java, JS etc all had their own niche, completely novel software which is backbone of modern IT infrastructure was developed using them.
What is Rust's niche? What new class of software has it brought to the world?
>>
>>106471490
> politics and shit
That guy just got mad he couldn't write shitty code in rust and wrote a manifesto huh
>>
>>106472190
no, rust is just dogshit.
>>
>>106472190
>>106472192
i mean, yeah
writing a manifesto just to say that seems kinda excessive, not gonna lie
>>
>>106472187
>What new class of software has it brought to the world?
fast and memory safe software
>>
File: rs-cve.gif (297 KB, 1200x600)
297 KB
297 KB GIF
>>106472216
>memory safe
yea yea ofc reddit
+1
>>
>>106472235
already fixed
>>
>>106472240
heres the repo
https://github.com/Speykious/cve-rs
someone run it

bc i dont believe you for shit
>>
>>106472254
PS C:\Users\nigger> cargo install cve-rs
Updating crates.io index
Installing cve-rs v0.6.0
Updating crates.io index
Compiling cve-rs v0.6.0
error: lifetime may not live long enough
--> C:\Users\nigger\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\cve-rs-0.6.0\src\lifetime_expansion.rs:44:9
|
43 | pub fn expand<'a, 'b, T>(x: &'a T) -> &'b T {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
44 | let f: fn(_, &'a T) -> &'b T = lifetime_translator;
| ^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'b`
|
= help: consider adding the following bound: `'a: 'b`

error: lifetime may not live long enough
--> C:\Users\nigger\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\cve-rs-0.6.0\src\lifetime_expansion.rs:54:9
|
53 | pub fn expand_mut<'a, 'b, T>(x: &'a mut T) -> &'b mut T {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
54 | let f: fn(_, &'a mut T) -> &'b mut T = lifetime_translator_mut;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'b`
|
= help: consider adding the following bound: `'a: 'b`
= note: requirement occurs because of a mutable reference to `T`
= note: mutable references are invariant over their type parameter
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance

error: could not compile `cve-rs` (lib) due to 2 previous errors
error: failed to compile `cve-rs v0.6.0`, intermediate artifacts can be found at `C:\Users\nigger\AppData\Local\Temp\cargo-installfaIRF7`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
>>
>>106472187
>my criteria is simple, languages like C, Java, JS etc all had their own niche, completely novel software which is backbone of modern IT infrastructure was developed using them.
Which is completely different from your original point and basically boils down to the realization that Rust is a new language and C is an old language.
That's something we can both agree on. Good.
>>
File: carlos-veggies.png (272 KB, 600x600)
272 KB
272 KB PNG
>>106472257
ok
nice track record you got there, faggot
>>
>>106471332
D already does this in debug builds and in @safe code.
Rust is the Concord of programming languages, trying to fix problems that don't exist.
It is therefore safe to assume Rust's raison d'être is political, in despite of the fact cppcon couldn't be more inclusive if they tried to.
>>
>>106472282
>D already does this in debug builds and in @safe code.
>Rust is the Concord of programming languages, trying to fix problems that don't exist.
I would say that more D than Rust.
Rust is pretty focused on what it does. It is meant to be a systems programming language that is as fast and safe as possible. And memory safety is an important problem to fix. It's why Java and Ada got popular in the first place and it's root of like 70% of CVEs.
D on the other hand tried to do everything all at once. No one needed a language that is both GC and non-GC, both safe and unsafe. Yet D comes to offer a solution to a problem no one had. And by doing so it became extremely mediocre at everything that people do care about. That's why it didn't got any traction.

>It is therefore safe to assume Rust's raison d'être is political, in despite of the fact cppcon couldn't be more inclusive if they tried to.
What? Cppcon is full of trannies
>>
File: Stroustrup.png (1.48 MB, 800x1300)
1.48 MB
1.48 MB PNG
>>106472326
>>
>>106472351
Is this a story of a tranny attending cppcon is supposed to prove that cppcon has no trannies or what point are you even trying to make now?
>>
>>106471332
Holy shit this code is bad lmao
use strnlen_s
don't pointlessly copy the string into a buffer that instantly gets deleted
What's the point of "results" variable
>>
>>106472374
Give the cnile a break, he is trying his best to look smart.
>>
>>106472377
he did a better job at thatth an the crabs itt
i mean cmon
they dont even fucking know what runtime means
>>
>>106471332
>using strlen to prevent buffer overflow
i shiggidy diggidy
>>
>>106472432
Learn English
>>
File: 1756820212402078.jpg (799 KB, 1440x1250)
799 KB
799 KB JPG
>>106472374
A lot of people see programming as a means to an end, which is why we end up with code like this.

The idea of doing things well isn't important to them, and won't cross their mind.
>>
>>106472537
no, you'll learn my creole instead
>>
>>106472554
yeah no
theres something called amdahls law
and given your picrel i think- autism

and autists go the opposite way-
spending unordinate amounts of time optimizing completely irrelevant shit
>>
>>106472577
incomprehensible post
>>
>>106472577
I have no idea what this has to do with anything.
>>
File: 1601367194593.png (70 KB, 886x886)
70 KB
70 KB PNG
>>106471332
>why did people make a language that stopped the problem by default at compile time instead of letting the user manually have the responsibility to do it themselves
Gee I wonder why anon. Maybe we should ask them why they let so many vulnerabilities happen in the first place? Why weren't they smart enough to just do the check themselves? It's almost like you can't trust them, fucking retard.
>>
>>106472597
>A lot of people see programming as a means to an end, which is why we end up with code like this.
>The idea of doing things well isn't important to them, and won't cross their mind.

the code is from a complete beginner
and "doing things right" needs to be justified
otherwise one should work effectively
>>
>>106472608
Why do you think this is a complete beginner?
>>
>>106472613
because he thinks THE usecase for rust is boundary checking
also because he didnt know that his if condition is a runtime check
>>
>>106472625
>also because he didnt know that his if condition is a runtime check
source?
>>
>>106472634
>>106471885

also, he strlens a literal
also he passes a pointer without a len
unused variables

really
my turn to ask you a question:
how could you NOT see hes a complete beginner?
>>
>>106472647
dumb retard
>>
>>106471847
raylib
>>
>>106472659
rewrite of sdl
>>
>>106472663
no, reddit
youre being retarded
>>
>>106472671
https://gist.github.com/raysan5/17392498d40e2cb281f5d09c0a4bf798
>>
>>106472681
its not a rewrite bc it doesnt have the same capabilities
youre being retarded, reddit
stop. you make the baby jesus cry. and hitler is sad
and even stalin is disappointed in you
>>
>>106472688
correct, raylib does less than sdl
>>
>>106472681
>>106472688
>not the same capabilities
and a different interfacing

to be a rewrite
you need same caps, same interfaces
>>
>>106472699
dumb retard, don't @ me again
>>
>>106472696
thank you reddit
youre a real pro at repeating what i just said
+1
>>
>>106472707
>t. seething
>>
>>106472725
>t. coping
>>
>>106472726
>t. seething
>malding even
>>
>>106472726
>t. broke his keyboard?
lamaw
>>
>>106472699
>>not the same capabilities
>and a different interfacing
>to be a rewrite
>you need same caps, same interfaces
So something like Cosmic would be a new project written in Rust that isn't a rewrite. Therefore:
>rust is never used for any new project, it's all just rewrite x in rust, infact this is why rust is doomed
Is false.
>>
>>106472886
idek wtf cosmic is
idec to be honest
but yeah
diff interfacing, diff caps -> not a rewrite
>rust is never used for any new project
didnt say that
go tell op
>>
>>106471332
wtf is this shit code?
>strlen
>param named input
>>
>>106471377
VLAs should have never been allowed. heap allocate and fuck off, retard.
>>
>int main()
at least learn C before you make shit threads like this
>>
>>106472948
>heap allocate and fuck off, retard.
ewww
>>
>>106472966
>heap allocate? nooooooooooooooo that's le bad!
>allocate on my stack? whoa, based.
that's how retarded you sound.
>>
>>106472962
BASED!!!!!11
fuck the tranny jannies
>>
>>106472962
ah
so you ARE the seething rustrany

explains alot
>>
>>106472976
yeah but your opinion is irrelevant so its ok
>>
>rust mentioned in OP
>guaranteed 100+ replies by seething cniles
>>
>>106471518
Array decay is kind of retarded but the size information is necessarily part of the type and C doesn't have generics so what else can they really do? I do agree C would benefit from a vector but these things are trivially easy to implement yourself.
>>
>>106473046
They could do what Rust did and have fat pointers because that's what you were gonna do anyway, but manually, cnilecuck.
>>
>>106473038
>100+ replies
of which half are crabs if not m ore
are you the monkey brownoid?
you sound brown
>>
>>106472922
It doesn't even matter what you know or care about. It doesn't matter if you said that or not. What matters is that it's wrong statement. That's all.
>>
>>106473062
yeah but i dont care
and thats why i redirect you to some one who would

for me rust is just dogshit
rewrites or otherwise
>>
>>106473054
>of which half are crabs if not m ore
>are you the monkey brownoid?
>you sound brown
Oh the irony...
>>
>>106473078
It doesn't matter what you care about.
What matters is that statement was wrong as shown above.
>>
Is OP the retard who devs XLibre? The xlibre tranny seems to have some delusions on what "safe" interfaces look like and makes use of shit like strlen inappropriately.
OP needs to learn to fucking code or use Rust or C++. C is an absolute fucking joke.
>>
>>106473081
idk what ironical about that
browns have issues with maths as seen in american education system
and it takes two to create a discussion
so with 100 replies its expected that 50 will be crabs and 50 will be cultists

and now you seem to have issues internalizing that

i think you dont know what irony means
>>
>>106473086
yeah but i still dont give shit
you can repeat it 10 more time i still wont
are you autistic?
bc you sound retarded...
>>
>>106471377
there's no reason the standards committee hasn't standardized something like alloca except for laziness and incompetence.
>>
>>106473141
or maybe it's retarded? thought of that retard?
in what universe is it sensible to implement?
>>
>>106473141
So why don't you write your own compiler extension for this? The only excuse is lazyness and incompetence.
>>
>>106473141
>alloca
how comes i never heard about this?
this looks useful as fuck
>>
>>106473156
every major C and C++ compiler has it as a built-in, but it's still a fucking retarded function that should never be used.
>inb4 but muh alloca instruction in llvm
totally different use-case
>>
>>106473180
because you aren't supposed to use it.
wtf is this amateur hour on /g/ or something?
>>
>>106473181
>that should never be used.
that you cant be trusted with scissors is a you problem
are youthe monkeyposter?
you sound brown...
>>
>>106473193
Brownoids need alloca, I'm white.
>>
>>106473193
w-what? why don't you actually READ
man 3 alloca
and tell me why you'd ever need this shit. you absolute dumb nigger faggot. you literally cannot justify its use anywhere.
>>
>>106473187
>you arent supposed to use it
nono
YOU arent supposed to use it
in fact
you shouldnt be using C at all from the looks of it
>>
#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
unsafe fn write(fd: u32, buf: &[u8]) -> isize {
let mut ret;

unsafe {
asm!(
"syscall",
in("rax") 1u32,
in("rdi") fd,
in("rsi") buf.as_ptr(),
in("rdx") buf.len(),
lateout("rax") ret,
out("rcx") _,
out("r11") _,
options(nostack, readonly)
);
}

ret
}

Cniles somehow think this is bad.
>>
>>106473180
because it's non-standard

>>106473155
in a universe where heap allocation is expensive, the language already has stack allocation built into it, and more and more of your competitors are implementing it and you're whinging about the axe hanging over your head

>>106473156
hello bjarne!
>>
>>106473204
>contrive an example why you would need it
ok
i open a file
which can be 1kb or 1MB
i dont want to pollute my cache with unused memory
simple

youre a retard nocodeshitter if you cant come up with such a simple usecase
also brown, probably
>>
>>106473227
>Heap allocation is expensive
So allocate a bigger array then let your allocator "allocate" from already allocated array in no time? Even a monkey would've figured out that this is the solution.
>>
I'm just popping by to tell you that I don't like Rust and that the borrow checker makes you gayyyyy.
>>
>>106473228
>i open a file
>which can be 1kb or 1MB
then put a char array sized 1MiB. if you're going to overflow the stack like a fucking retard, at least you'll do it in a sensible way instead of ACKing yourself with a footgun like alloca(), or maybe use the heap you stupid faggot.

again, you have zero valid use-case for alloca
>>
>>106473235
>yeah just do this so iot satisfies my autism
how about i call you a nigger and a retard instead?
thats way more efficient
>>
>>106473245
You not writing any code at all is indeed more efficient, please continue.
>>
File: 41+Oc+2rszL._RI_.jpg (31 KB, 500x375)
31 KB
31 KB JPG
>>106472959
it was inside main at first but i made it a function because as someone put earlier functional rots your brain. What is it I should know? Why is int main() bad? Do i need the arguments like in templates? That is what I am getting but please tell me.
>>106472934
Isn't it beautiful? Did you see results? Look at me, I am Jeet now. Unsafe functions like strcpy should make one think.

It is a trick you do for inspections, leave something out very easy to fix for the inspector so they have something to report/checkbox.
>>106472962
>Fed fedjacking OP for some reason
lol lmao. You know the public will see this and realize how sadistic people who work in LE are. If some cop, fed or IRS building gets shot up the blood will be on your hands stupid agent.

Why would you try to derail the thread? Cause your nothing but con artist and Biden signed a deal with Rust? or are you trying to gaslight and make OP look crazy?

What is it that makes you come here acting like a psychopathic jihadist? And you call 4chan users radicalized. Go back to /pol/ and seethe about Israel there. This isn't political, has nothing to do with Israel or Jews but in your brain it somehow does.

You need to go back to deradicalization class agent holy fucking hell. Isn't the FBI supposed to have mental evaluations?
>>
>>106473242
>then put a char array sized 1MiB
no.
>footgun
only for you
use python if youcant be trusted with c
>>
>>106473235
sir please sir electron application use twenty gigabytes for hello world sir please understand is unavoidable
>>
>>106473109
It doesn't matter what you give a shit about.
>>
>>106473248
>im bad at programming therefore you should use safeshittery red tape
no.
>>
File: this retard again.jpg (27 KB, 210x240)
27 KB
27 KB JPG
>nocoder needs official support for what is one inline assembly block to modify %rsp away
>and I am the brown one
uhhhh, okay?
>>
>>106473251
I.... I don't even know what the code does. it's not beautiful, it's insane.
strnlen likely does exactly what he fucking wants.
>>
>thread get even worse than it was before
NA woke up
>>
>>106473267
why bother with asm if i have c?
autism is a hard mental handicap
>>
>>106473260
>nocoder doesn't know what virtual memory is
>>
>>106473278
the thread is bad, moron.
>hurr durr why do people create new things
>>
>>106473279
Same reason why Europeans (the white ones anyway) use manual transmission. Automatic one just isn't good enough.
So again, what stops you except lazyness and incompetence?
You really should go back to r/programming or whatever...
>>
>>106473295
c is good enough for me
i get 95% of available performance for 5% of the effort
but please, go ahead, by all means
write your shit in asm at the rate of one function per month
>>
>>106473255
>>footgun
>only for you
read the fucking docs for alloca you stupid nigger faggot.
you don't know what you're talking about and the more this goes on the more apparent it is.
>>
>>106473314
i did
its sexy
and apparently something not for you
stay filtered for all i care
>>
File: samSneeder.jpg (74 KB, 698x468)
74 KB
74 KB JPG
>>106473278
de
rad
ick
al
ize
ation

CLASS

now agent
>>
>>106473335
BUGS
Due to the nature of the stack, it is impossible to check if the alloca‐
tion would overflow the space available, and, hence, neither is indicat‐
ing an error. (However, the program is likely to receive a SIGSEGV sig‐
nal if it attempts to access unavailable space.)

On many systems alloca() cannot be used inside the list of arguments of
a function call, because the stack space reserved by alloca() would ap‐
pear on the stack in the middle of the space for the function arguments.


stupid nigger. kys. you objectively cannot use this safely while being compliant with the C standards.
>>
>>106473335
dumb retard
>Due to the nature of the stack, it is impossible to check if the
>allocation would overflow the space available, and, hence, neither
>is indicating an error.
>>
>>106473314
Don't bother, he's not a real programmer, he just wouldn't get it.
>>
>>106473346
>muh safety
cry more
>muh portability
the worst thing that hapenned to c

i alr use extensions
this is not a concern for me
but yeah, stay timid
tf do i care
>>
>>106473359
Inline assembly is not standard but an extension, so use it.
>>
>>106473376
i will if its rational for me to.
not the case in my current project
>>
>>106473267
>modify %rsp
>stomp your stack because the standard doesn't accomidate using the stack like that
way to miss the fucking point retard
>>
>>106473390
Ok nocoder...
>>
>>106473267
why do you self identify as soijak
>>
>>106473820
I am bald and my beard looks like that.
>>
>>106471332
Because it's not enforced by the compiler might as well do dynamic typing.
>>
>>106474835
wym?
c types are not enforced by the compiler?
its not a bad thing
and you still get warnings if you do something fucky wucky
>>
>>106472326
exactly what i said, it's "full of trannies" therefore it cannot be more inclusive unless you become racist and start kicking people out with the goal of enforcing equal distribution of each race
>>
>>106472326
also, D's "problem" is the insufficient tooling(autocompletion and syntax lighting sucks), it trying to be everything at once is its strength actually, since it makes D polyvalent and able to work with both usermode and embedded/kernel mode projects.
>>
>>106471332
So does Rust itself know what is supposed to be "safe" or "unsafe"? Are there occurrences of false-positives?
>>
File: 1756592012415030.jpg (52 KB, 640x622)
52 KB
52 KB JPG
>>106471332
Difference is that Rust automates it for you without the need of a Garbage Collector. With C, it's opt-in and a lot of developers forget it due to human error.
Not a hard concept.
>>
>>106476415
unironically sanest crab take since a good while
>>
i see threads like this and i think "ah yes, tech is now for the lowest common denominator. it is no longer a place for me."
>>
>>106476458
>t. concern troll
>>
>>106471332
It doesn't scale. Imagine doing this for a complex data structure.
>>
>>106471975
>people hype rust
>meme language talks only instead of writing code
>people don't talk about rust
>haha dead language
Rust makes you seethe no matter what and it's a good thing.
>>
>>106475998
>it trying to be everything at once is its strength actually, since it makes D polyvalent and able to work with both usermode and embedded/kernel mode projects
C++ and Rust can also do this without being a 3 different languages awkwardly sewed together.
>>
>>106476603
>meme language talks only instead of writing code
Your post has been processed by Rust code in order to end up here.
>>
>>106471332
anon...
I think if your input was taken in main(), your code would still be vulnerable lmao.
stop being retarded.
>>
File: 1750936225086348.png (535 KB, 680x1069)
535 KB
535 KB PNG
>>106471332
>O(N) strlen
Are cniles even trying?
>>
>>106471490
>filtered by having to think about memory management beyond "oh valgrind says all good on happy path"
>>
>>106471518
>make struct with size and pointer
your problem is solved!
>>
>>106471741
amazon uses rust for things that need to be close to baremetal, but everything is mostly in java and scala. newer frontend stuff is typescript and an internal amazon language.

very old stuff is in ruby and perl
>>
>>106472351
Based Stroustrup
>>
>http://en.cppreference.com/w/cpp/utility/expected/expected.html
>https://cplusplus.github.io/LWG/issue3886
>22 constructors and a defect report while implementing it
This is why people split off to work on other languages. ISO clearly doesn't work
>>
File: 1751837703682p.png (787 KB, 952x878)
787 KB
787 KB PNG
>>106471490
>computational marxism



[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.