← Home ← Back to /g/

Thread 105760299

138 posts 28 images /g/
Anonymous No.105760299 [Report] >>105760775 >>105760830 >>105761025 >>105761428 >>105762051 >>105764163 >>105764216 >>105767375
Why does C + Garbage collection and statically linked binaries make creating and running software so effortless
Anonymous No.105760775 [Report] >>105760992
>>105760299 (OP)
All I really care is the effortless library/dependency/package/whateverthefuck management. Dead simple and readable language is a plus.
Anonymous No.105760787 [Report]
>early instagram vignette filter
sovl.
Anonymous No.105760830 [Report] >>105760859 >>105761428
>>105760299 (OP)
>java, sun: >:(
>java, ms: >:(
>java, google: :O
it's funny how true this is
Anonymous No.105760859 [Report] >>105760930
>>105760830
>no classes :>
Anonymous No.105760930 [Report] >>105761036
>>105760859
>data structure supporting attribute access and methods, named "class": >:(
>data structure supportint attribute access and methods, named "struct": :O
Anonymous No.105760992 [Report] >>105761564
>>105760775
No such language.
Anonymous No.105761025 [Report]
>>105760299 (OP)
because C + arenas make things even better
Anonymous No.105761036 [Report]
>>105760930
>extra keyword for a function parameter :O
Anonymous No.105761428 [Report] >>105761511 >>105763903
>>105760299 (OP)
go is the most indian language to exist

>>105760830
dont compare java and go
at least java is pleasant to use
Anonymous No.105761484 [Report]
goto cleanup
it's so simple really
Anonymous No.105761511 [Report]
>>105761428
>go is the most indian language to exist
Java is way more popular than Go in India
Anonymous No.105761548 [Report]
It feels like C but it just werks because it does its own thing instead of shackling itself to the C ABI. This is also why its FFI is pure dogshit.
Anonymous No.105761564 [Report]
>>105760992
JS.
Anonymous No.105762051 [Report] >>105762137 >>105763964
>>105760299 (OP)
Only C, JVM (Java, Scala, Kotlin) and Haskell exist. C if you want fast (relatively) low lever code, JVM languages if you want le enterprise (tm) ecosystem (Kafka, Zio, Apache Spark, not disgusting midwit libraries like spring), Haskell if you want something beautiful and with a higher level of abstraction, like writing a small compiler, format conversion tool, etc.. Go pretends to be Java but ultimately fails because it doesn't have the ecosystem, while at the same time pretending to be C and miserably failing because it lacks the control over memory
>Muh C+=1
Cpp is a retarded version of C. If you want Indian Oriented Programming use Java, if you want performance stop abstracting stuff in classes and use C
>Muh Rust
Rust seems like a viable middle ground between all three of these languages, the memory safety is appropriate for something like a high performance web application like netflix, but doesn't seem useful in any other place where C is being currently used.
Anonymous No.105762137 [Report] >>105763491
>>105762051
i think ocaml has more industry use than haskell but otherwise on point
the main gripe about rust is that it's standard library is so bare that it's unwritable without importing a bunch of "blessed" crates like anyhow and thiserror
Anonymous No.105763491 [Report] >>105763525
>>105762137
Rust's standard library is worthless and no self respecting programmer would use it either way.
Anonymous No.105763525 [Report] >>105763536
>>105763491
Mind telling what makes it worthless/bad?
Anonymous No.105763536 [Report] >>105763553
>>105763525
Suboptimal implementation.
Anonymous No.105763553 [Report] >>105763557
>>105763536
Purely as a consequence of the language (or the people writing it)?
Anonymous No.105763557 [Report] >>105763595 >>105763685
>>105763553
No, it's actually because standard library can never be useful. You only benefit from standard libraries if your program is generic standard slop that has been done a billion times.
Anonymous No.105763595 [Report] >>105763607
>>105763557
>You only benefit from standard libraries if your program is generic standard slop that has been done a billion times.
So using well-defined abstractions qualifies your code as 'slop'? What are you making anon?
Anonymous No.105763607 [Report] >>105763631 >>105764672
>>105763595
>well defined abstractions
lmao
Anonymous No.105763631 [Report] >>105763638
>>105763607
Go to bed, Pajeet
Anonymous No.105763638 [Report] >>105763685
>>105763631
I'm not the pajeet who depends on suboptimal code.
Anonymous No.105763685 [Report] >>105763699
>>105763638
>>105763557
You still haven’t explain what makes the implementations suboptimal, pajeet.
Anonymous No.105763699 [Report] >>105763747
>>105763685
Wait, why do I have to explain, wouldn't a man just as white me just know what I'm talking about?
Anonymous No.105763747 [Report] >>105763782
>>105763699
No, that's not how it works pajeet. Go to bed
Anonymous No.105763782 [Report] >>105763797
>>105763747
Just don't worry about it, it's above your competence level.
Anonymous No.105763797 [Report] >>105763807
>>105763782
you're gonna tell us how Rust's Swiss Table implementation is bad. you're gonna tell us how you resolve attackers using keys to DOS your hash map's hash algorithm.
you're gonna tell us how you have implemented your balanced trees.
you talk a whole lot of shit but do not substantiate your claims. I want to pistol whip the fuck out of you with a Glock 20
Anonymous No.105763807 [Report] >>105763846 >>105763851
>>105763797
Swiss table is an optimization that isn't always the best choice,
Also ironic that they already gave up on the robin hood meme and actually use google's code now.
Anonymous No.105763846 [Report] >>105763857
>>105763807
>isn't always the best choice
you can say this about literally any implementation of any algorithm class you fucking retarded fag boy.
this is why the concept of libraries exists, which you'll be using with C.
I don't see a roaring bitmap implementation in any language by default, and that is quite fucking useful.
Anonymous No.105763851 [Report] >>105763869
>>105763807
>Swiss table is an optimization that isn't always the best choice
the way indians talk is fucking funny
Anonymous No.105763857 [Report] >>105763893 >>105763984
>>105763846
No, I cannot say it about my personal code since I know what problem I have and how to solve optimally.
But anyway, I'm just a Jeet who writes custom code for the exact problem instead of creating yet another hashtable no matter whether there's 4 keys or 4 million regardless of their size or the overall problem, so what do I know...
Anonymous No.105763869 [Report]
>>105763851
Not as funny as the way nocoders think about code.
>I heard it's faster or something on reddit.
Anonymous No.105763893 [Report] >>105763904
>>105763857
saar trust me saar i write best code (head bobs) for problem saar very optimal saar (hand gesture) is very good
Anonymous No.105763903 [Report]
>>105761428
Excuse me? You sir a a swine and no weapon of Durga.
Anonymous No.105763904 [Report] >>105763923
>>105763893
Okay, just for amusement of everyone who will read this thread... Lets assume I am Indian.
I still have my balls, penis, foreskin, and I am a better programmer than you and will do your job faster for less pay.
Meanwhile you need to dilate everyday because you're too mentally ill to not cut your cock off.
Anonymous No.105763916 [Report] >>105763962
y'all need to have your arteries pulled from your necks. retarded ass shit-flinging bitch boys. I want to break my fucking feet on your craniums.
Anonymous No.105763923 [Report] >>105763933
>>105763904
But can you use a toilet?
Anonymous No.105763933 [Report] >>105763954 >>105763960
>>105763923
I'm literally phoneposting here while taking a shit, and you're running out of copes because you're a fizzbuzztranny nocoder who cannot do more than import solution.
Anonymous No.105763954 [Report]
>>105763933
you're either indian, or 14, or retarded, or all 3
Anonymous No.105763960 [Report] >>105763970
>>105763933
Shut up you street shitting faggot. You being on your phone makes no difference, we both know you're fully capable of squatting in the street and squeezing one out while phone posting. Indians are great at that. Now answer my question. Can you use a toilet? Does your village even have one?
Anonymous No.105763962 [Report] >>105763978 >>105763982
>>105763916
i'll stand in the center of your back and deadlift your fucking head and legs off, bitch boy
Anonymous No.105763964 [Report]
>>105762051
Why do people just talk about Rust out of their ass without even having used it?
>viable middle ground
Idiomatic Rust is faster than idiomatic C. If we drop the idiomatic requirement both languages are as fast since both allow you to write in assembly.
>don't seem useful in any other place where C is being currently used
Its extremely useful in kernel development and embedded development (Embassy btfos RTOS in performance and code size). It's also used for graphics programming as a first-class WebGPU citizen.
Anonymous No.105763970 [Report] >>105763991
>>105763960
>amerinigger assumes that india has unlimited cellular networks
It's funny to think that it's possible to be brownier and smellier than an India desu.
Anonymous No.105763978 [Report]
>>105763962
Ill bend you over and force my feminine penis straight into your boy pussy. You'll be calling me neo-mommy after I'm done with you.
Anonymous No.105763982 [Report]
>>105763962
>bitch boy
don't steal my terminology, bitch boy
you won't do shit, attempting to do anything would get 7.62 NATO sent through your windshield on your 200yd approach to the property
Anonymous No.105763984 [Report] >>105763990
>>105763857
So the std implementation is bad... because you can use simpler solutions for simpler problems...
Peak dunning kruger moment
Anonymous No.105763990 [Report] >>105764022
>>105763984
>SSAAAAR, ONLY USE APPROVED SOLUTION!!!!
Peak npc post.
Anonymous No.105763991 [Report]
>>105763970
Durga, stop avoiding the question
Anonymous No.105764022 [Report] >>105764044
>>105763990
That's not even what that post says. Indian reading comprehension at its finest
Anonymous No.105764044 [Report] >>105764056
>>105764022
Your shitty post says nothing, so I made it up to make you feel better.
Anonymous No.105764056 [Report] >>105764060
>>105764044
You can deploy custom solutions in any language. This point means literally nothing when talking about std implementations specifically nigger
Anonymous No.105764060 [Report] >>105764076
>>105764056
C and C++ are the only languages where that's even remotely true.
Anonymous No.105764076 [Report] >>105764104
>>105764060
Peak midwit moment
Anonymous No.105764104 [Report] >>105764122 >>105764959
>>105764076
Indeed, you're such a midwit that you entirely forgot that you either go full bare metal, or depend on nothing but the kernel, and every other language doesn't work without its generic slop runtime.
Anonymous No.105764122 [Report] >>105764145
>>105764104
Tell me more about the Rust runtime
Anonymous No.105764145 [Report] >>105764192
>>105764122
Post hello world in Rust that doesn't depend on std or core.
Anonymous No.105764163 [Report]
>>105760299 (OP)
for me, it was the thread schedueler. You can just shit out as many "go func" as you like and it will scheduele them on system threads without additional OS overhead
Anonymous No.105764192 [Report] >>105764201
>>105764145
>hello world
>in a bare metal environment
>without any dependencies
Do you expect me to write a bootloader for you in a 4chan post you disingenuous faggot? You didn't even specify what it's supposed to run on
>no core
You don't even know what core is
Anonymous No.105764201 [Report] >>105764205
>>105764192
I accept your concession.
Anonymous No.105764205 [Report] >>105764218
>>105764201
What concession? Post the C equivalent
Anonymous No.105764216 [Report]
>>105760299 (OP)
till u need to maintain/update?
Anonymous No.105764218 [Report] >>105764224
>>105764205
I accept your concession.
Anonymous No.105764224 [Report] >>105764231
>>105764218
You can't post the C equivalent because you'd have to write a fucking bootloader you faggot
Anonymous No.105764231 [Report] >>105764253
>>105764224
I don't remember specifying that you must write a bootloader, I only asked no std and no core.
Anonymous No.105764253 [Report] >>105764278
>>105764231
You have to run the program on something. If you don't have std then your runtime becomes your hardware. The startup code is hardware dependent. Have you ever actually programmed anything embedded?
Anonymous No.105764278 [Report] >>105764309
>>105764253
This is who calls me a jeet btw.
Anonymous No.105764309 [Report] >>105764329 >>105764339
>>105764278
>write nostd
>noo don't concern yourself with the hardware and available IO
Literally what is the code supposed to be running on? Magic of friendship?
Anonymous No.105764329 [Report]
>>105764309
That's the best part, you choose.
And yet, despite being given this flexibility, you still posted 0 code.
Anonymous No.105764339 [Report] >>105764379 >>105764516
>>105764309
You know what? Fuck you. Here's your nostd STM32 hello world

#![no_std]
#![no_main]
use panic_halt as _;
use cortex_m_rt::entry;

#[entry]
fn main() -> ! {
loop { }
}


>but muh cortex_m_rt::entry!!
Not writing a bootloader for you nigger
Anonymous No.105764379 [Report] >>105764384
>>105764339
>depends on a 3rd party dependency just to write an empty panic handler that does fuckall
lmao
Anonymous No.105764384 [Report] >>105764392
>>105764379
I accept your concession.
Anonymous No.105764392 [Report] >>105764399
>>105764384
What concession? You imported 2 dependencies and STILL couldn't even make it write hello world.
Anonymous No.105764399 [Report] >>105764409
>>105764392
Write to what? A display? A serial port? I posted my code, now post the C hello world
Anonymous No.105764409 [Report] >>105764436 >>105764452
>>105764399
>Tranny nocoder forgot that kernels have those things called syscalls.
Anonymous No.105764436 [Report] >>105764450
>>105764409
>bare metal
>nostd
>...in a runtime managed by the kernel
So this... is the power... of cniles!!!
Anonymous No.105764450 [Report]
>>105764436
OS isn't part of standard library, at least in my non-tranny language.
Anonymous No.105764452 [Report] >>105764468
>>105764409
This cnile jeet even forgot that you can't make a syscall in C without inline assembly. Not replying to this bait any more. Those are the people who argue about the C supremacy and trannies all day on 4chan
Anonymous No.105764468 [Report] >>105764507 >>105764746 >>105765040 >>105766055
>>105764452
I can write inline assembly without importing core. In fact, here, let me demonstrate by being better at your dogshit language than you will ever be.

Now modify it to include #[no_core], it should be easy for such an rust expert like yourself, especially when you have to show a stupid cnile your trannylang's superiority.
Anonymous No.105764507 [Report] >>105764530
>>105764468
Core is part of the compiler you dumb fuck. If you stripped it out you wouldn't even have integer types. You can't do that in C. Why must all cniles be such disingenuous faggots?
Anonymous No.105764516 [Report] >>105764548
>>105764339
why is func main() {} not enough this is a go thread btw
Anonymous No.105764530 [Report] >>105764548
>>105764507
I can't do that in C, because C doesn't have "core" library that gets pulled in every time I compile anything, my C programs are pure when I choose them to be, lmao.
Anonymous No.105764548 [Report] >>105764556
>>105764516
You need to provide some kind of hardware initialization code. You can do that yourself but usually this is done by using HAL libraries (both in C and Rust)
>>105764530
What part of compile-time do you not understand? Show me the core library assembly code in a compiled, optimized and stripped binary.
Anonymous No.105764556 [Report] >>105764563 >>105764746
>>105764548
There you go:
% objdump -S -M intel target/x86_64-unknown-linux-gnu/release/nostd-project

target/x86_64-unknown-linux-gnu/release/nostd-project: file format elf64-x86-64


Disassembly of section .text:

0000000000201000 <.text>:
201000: be e8 00 20 00 mov esi,0x2000e8
201005: ba 0e 00 00 00 mov edx,0xe
20100a: b8 01 00 00 00 mov eax,0x1
20100f: bf 01 00 00 00 mov edi,0x1
201014: 0f 05 syscall
201016: b8 3c 00 00 00 mov eax,0x3c
20101b: 31 ff xor edi,edi
20101d: 0f 05 syscall
20101f: 0f 0b ud2

All of this is generated with core because without core it would be empty ELF with no code at all.
Anonymous No.105764563 [Report] >>105764573
>>105764556
This literally proves my point?
Anonymous No.105764573 [Report] >>105764605 >>105764619
>>105764563
Yes, it proves the point that rust is a nocoder language.
Also the useless ud2 instruction at the end is just cherry on top of this tranny diarrhea cake.
Anonymous No.105764605 [Report] >>105764616
>>105764573
A compiler library... compiled the code... Rust bros, it's so over!!
Anonymous No.105764616 [Report] >>105764649 >>105764746
>>105764605
I'm not even going to go here, pointing out that rustrannies can't even compile their own code and instead delegate it to a C++ compiler is like punching an old man in his liver.
Anonymous No.105764619 [Report]
>>105764573
ud2eze nuts on your face
Anonymous No.105764649 [Report] >>105764664
>>105764616
>C++ compiler
>https://llvm.org/
>The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
>The LLVM Core libraries provide a modern source- and target-independent optimizer, along with code generation support for many popular CPUs (as well as some less common ones!) These libraries are built around a well specified code representation known as the LLVM intermediate representation ("LLVM IR"). The LLVM Core libraries are well documented, and it is particularly easy to invent your own language (or port an existing compiler) to use LLVM as an optimizer and code generator.
Anonymous No.105764664 [Report] >>105764677
>>105764649
Okay, okay, calm down, honestly my bad. C++ doesn't deserve all the credit, because, uhhh...
>Even Python is more relevant in compiling than Rust
Anonymous No.105764672 [Report] >>105764679 >>105764730
>>105763607
These stuck up people never answer the "what projects are you working on" question. I wonder why
Anonymous No.105764677 [Report]
>>105764664
dumb retard
Anonymous No.105764679 [Report]
>>105764672
Because admitting to simply be copying existing code and paraphrasing it in Rust isn't good optics.
Anonymous No.105764730 [Report]
>>105764672
same reason java, c# and js are so popular
Anonymous No.105764746 [Report]
>>105764468
>cnile screeches about compiler int support and imagined library code bloat
>cnile asks for a noreturn ud2 guardrail in his code
>>105764556
>cnile gets an ud2 guardrail, screeches
>no signs of a big core library because, screeches about trannies instead
>>105764616
>cnile doesn't even know what LLVM is
You can't make this shit up
Anonymous No.105764778 [Report] >>105764799 >>105764800
>>cnile asks for a noreturn ud2 guardrail in his code
I told compiler that it never returns, not that it should bloat my code with worthless instructions that assume that my code might be broken enough to not return.
This is why nobody takes rustrannies seriously.
Anonymous No.105764799 [Report] >>105764823
>>105764778
>dumb retard cnile doesn't understand that it's the "C++ compiler" that generates those worthless instructions
Anonymous No.105764800 [Report] >>105764815
>>105764778
If you want to save those two bytes that could prevent a medical equipment crash caused by an overconfident cnile use unreachable_unchecked instead.
Anonymous No.105764815 [Report]
>>105764800
>Your honor, the patient might be dead, but my code crashed in memory safe way!
Anonymous No.105764823 [Report] >>105764840 >>105764895
>>105764799
I am C++ programmer, not sure what you're trying to imply, tranny.
In fact, I have several commits in LLVM, you're talking to the guy who so far have failed to replace, because your bleeding axewound makes you weak and mentally unstable.
Anonymous No.105764840 [Report] >>105764852
>>105764823
Cope. LLVM will be remade in Rust and it will have a little trans flag on the github repo. Our time is now old man.
Anonymous No.105764852 [Report]
>>105764840
2 more weeks
Anonymous No.105764895 [Report] >>105764907
>>105764823
Yes, all cniles on 4chan are compiler engineers, kernel developers, aerospace engineers etc. Keep coping because from the looks of it you know neither C++ nor Rust.
Anonymous No.105764907 [Report] >>105764927
>>105764895
That's why I'm the only one who posted no_std Rust code that actually prints something, right?
Anonymous No.105764927 [Report] >>105764932
>>105764907
Yes, because people kept talking about bare metal, not the kernel. You still didn't post your bare metal C hello world.
Anonymous No.105764932 [Report] >>105764959
>>105764927
I never said bare metal, I said no_std, but apparently you dumb nigger nocoders don't even know what that means.
Anonymous No.105764959 [Report] >>105764967
>>105764932
You were talking about bare metal from the beginning you disingenuous faggot >>105764104
Also don't derail the discussion. You got a bare metal hello world, a managed environment hello world and you posted literal proof that the resulting binary doesn't contain any traces of a runtime library. What more do you even want? Who pays you to mindlessly shill C all day?
Anonymous No.105764967 [Report] >>105765021
>>105764959
>either bare metal or kernel
Good morning sir!
Anonymous No.105765004 [Report]
>yet another thread in which cniles can't help but beclown themselves
Anonymous No.105765021 [Report] >>105765040
>>105764967
If you're talking about no_std you mean bare metal, otherwise you have a kernel and a standard library that you can use. Arguing with a fizzbuzz-tier syscall hello world is being pedantic for the sake of it. For someone who talks shit about runtimes you really love writing code that executes inside a massive runtime
Anonymous No.105765040 [Report] >>105765049 >>105765125
>>105765021
Can you explain how many times your parents dropped you on your head and from what height that you don't understand that this code >>105764468 runs on Linux?
Anonymous No.105765049 [Report] >>105765066
>>105765040
Anonymous No.105765066 [Report] >>105765081
>>105765049
Cool selfie, nigger. Now can you explain? Because I wrote a full webserver this way and it just works, while using less than 1MB of RAM.
Anonymous No.105765081 [Report] >>105765096
>>105765066
>I wrote a full webserver
pic related. I'm a different anon btw
Anonymous No.105765090 [Report] >>105765096
>muh inefficient hashtables
>only the C weapon can allow you to use a custom data structure from Durga data structure course saar
>what?! No other language can do the needful anywhere! To prove you can implement any data structure in it write a needful no_std program
>No you see you don't write to console in your bare metal, you didn't do the proper needful
>You could actually make a syscall using a different language all along, I am so smart!
>This kills the crabs, praise Vishnu
Anonymous No.105765096 [Report] >>105765111
>>105765081
>>105765090
Rustrannies having a melty because cnile can use their dogshit language better than they ever could, tale as old as time.
Anonymous No.105765111 [Report]
>>105765096
Anonymous No.105765125 [Report] >>105765139
>>105765040
It runs, so what? It's an x86 Assembly hello world, not a Rust one.
Anonymous No.105765139 [Report] >>105765144
>>105765125
>Rust is not Rust
Sorry, I forgot, the correct Rust uses the approved assembly used in rust's standard library (approved).
Anonymous No.105765144 [Report]
>>105765139
Anonymous No.105765256 [Report] >>105765371
Rust is really fucking gay
Anonymous No.105765371 [Report]
>>105765256
Language itself is just average, I don't feel strongly about it. At least in comparison to the absolute faggots ITT showing everyone why Rust will never be popular.
Anonymous No.105765432 [Report]
>cniles spout shit
>get called out for it
>cniles proceed to screech about the "toxic rust community" instead
Every single time
Anonymous No.105765459 [Report]
Rust troonmoonity isn't toxic, it's venomous.
Anonymous No.105765607 [Report] >>105765613 >>105765622 >>105765624
Stop the useless war just be enlightened use go
Anonymous No.105765613 [Report] >>105765806
>>105765607
Is Go trans?
Anonymous No.105765622 [Report] >>105765806
>>105765607
Go is a shitlang though.
Anonymous No.105765624 [Report] >>105765669 >>105765806
>>105765607
go is just slightly better than java 1.4
Anonymous No.105765669 [Report]
>>105765624
Go isn't object oriented so it is infinitely better than Java.
Anonymous No.105765806 [Report] >>105765812
>>105765613
>>105765622
Go cares about u getting shit done nothing else
>>105765624
Is the same base but one decided to adopt a nocoder larper book as dogma which will make u suffer writing it while the other actually looked at how to code
Anonymous No.105765812 [Report] >>105765813 >>105765909
>>105765806
if err != nil {
return err;
}
Anonymous No.105765813 [Report]
>>105765812
Fellow Go bros, can we recover from this?
Anonymous No.105765909 [Report]
>>105765812
If checking errors is to much for u how do u even recover of something goes wrong
Anonymous No.105766055 [Report]
>>105764468
lol pajeet you're so fucking stupid it's impressive
Anonymous No.105767375 [Report]
>>105760299 (OP)
Because the entire world runs on Unix but only few devs acknowledge that fact.