← Home ← Back to /g/

Thread 105762446

186 posts 112 images /g/
Anonymous No.105762446 [Report] >>105763597 >>105764018 >>105765440 >>105765594 >>105767325 >>105767343 >>105768043 >>105770017 >>105770612 >>105774016 >>105774022 >>105774184 >>105774222 >>105775830
Post screenshots of your comfy, hand-written code, correct picrel edition.
Anonymous No.105762474 [Report] >>105762486
that's not handwritten
i guess you should try again
Anonymous No.105762486 [Report] >>105765614
>>105762474
Don't be autistic. You know what I meant.
Anonymous No.105762648 [Report] >>105763966 >>105765217
Anonymous No.105762799 [Report] >>105763226
Only an ai bot would write such a switch statement
Anonymous No.105763226 [Report]
>>105762799
Nah, AI chat bots usually use the most boring formatting and alignment possible. I usually format code by hand so it's easily readable and I can look at it and quickly see patterns.
Anonymous No.105763597 [Report] >>105771587
>>105762446 (OP)
>ITT we post our rust hello world examples
Anonymous No.105763642 [Report] >>105763647 >>105765851
Anonymous No.105763647 [Report] >>105763687 >>105763694 >>105764036 >>105765887
>>105763642
What's thr best way to learn asm?
Anonymous No.105763687 [Report] >>105763733 >>105763986 >>105764036 >>105764105 >>105765241 >>105765640
>>105763647
why would you want to learn assembly?
once you have a good understanding of C, assembly is just useless mental gymnastics made obsolete by any compiler or godbolt if you prefer a web interface
Anonymous No.105763694 [Report]
>>105763647
reading lots of assembly code, unfortunately
Anonymous No.105763733 [Report] >>105763752 >>105779490
>>105763687
> why would you
I'm just very irrational with my choices of what to learn, don't care about utility and I mostly go with what feels maxxcomfy but also weird at the same time.
Anonymous No.105763752 [Report] >>105763757
>>105763733
your head's cooked my man
Anonymous No.105763757 [Report]
>>105763752
Tell me something I don't know.
Anonymous No.105763966 [Report]
>>105762648
cool comments timmy
Anonymous No.105763986 [Report]
>>105763687
Learn assembly for RISC-V and don't bother with the legacy real/protected/long bullshit of x86.
https://www.youtube.com/playlist?list=PLbtzT1TYeoMiKup6aoQc3V_d7OvOKc3P5
Anonymous No.105764018 [Report]
>>105762446 (OP)
I'm too retarded to code
Anonymous No.105764036 [Report] >>105764067 >>105765166 >>105775189
>>105763647
https://chortle.ccsu.edu/AssemblyTutorial/index.html

>>105763687
its interesting and not everyone wants to be a codemonkey
Anonymous No.105764067 [Report] >>105764114 >>105765104
>>105764036
it's not fucking interesting
if you actually gave a fuck about such "interesting" shit, you would implement your own virtual machine with your own register layout and whatever other weird shit you want to include, and you would consult existing architectures in the process. this would teach you a whole fucking lot more than any bullshit fucking around in x86 ASM as if you're doing anything of fucking value.
build actual fucking software that does interesting shit. that is the point of programming. not fucking around like some monk "speaking the language of the chip." it's fucking stupid as absolute shit.
Anonymous No.105764105 [Report] >>105765121
>>105763687
>why would you want to learn
If you don't find joy in learning and understanding how things work you're some variety of nigger, pure and simple.
Anonymous No.105764114 [Report]
>>105764067
Did you actually just type all that with a straight face and think you're NOT going to be an underperforming wagie loser your whole life? Interesting.
Anonymous No.105765104 [Report] >>105766955
>>105764067
post code of your virtual machine
Anonymous No.105765121 [Report]
>>105764105
learning assembly is like learning multipication by memorizing every possible combination. sure its good to memorize any X*Y=Z for X and Z < 20. but to memorize more than that is not "learning and understanding" its just stupid.
same with assembler. you need to know the basics, whats a jump, branch, comp, etc. but memorizing 500+ mnemonics is, well just stupid. you'll learn anyway, if you have to work with them.
Anonymous No.105765166 [Report]
>>105764036
>its interesting
not really, it's tedious and the lowest form of composition. literally a monkey playing with a shape sorting box.
Anonymous No.105765217 [Report]
>>105762648
cozy
Anonymous No.105765241 [Report]
>>105763687
>why would you want to learn assembly?
to implement forth interpreters
Anonymous No.105765384 [Report] >>105773903 >>105776415
I love macro DSLs
Anonymous No.105765440 [Report] >>105765504 >>105765524
>>105762446 (OP)
you and me format code similarly,
based & beautipilled.
Anonymous No.105765504 [Report] >>105765524
>>105765440
actually nevermind i just noticed that horrid if-else with switches inside
do not speak to me or my son again
Anonymous No.105765524 [Report]
>>105765440
>>105765504
Yeah, actually I never formatted ifs with switches that way until recently, but I think it's nice. Maybe takes time to appreciate. Share your code anin, I'm curious to see how you write it.
Anonymous No.105765594 [Report]
>>105762446 (OP)
i recently wrote this beauty right here https://pastebin.com/LqCmYPrR
Anonymous No.105765614 [Report] >>105765619 >>105775669
>>105762486
You're a retard. You're no better than zoomers corrupting language through sheer unapologetic stupidity. Do better.
Anonymous No.105765619 [Report]
>>105765614
shut up fagget
Anonymous No.105765640 [Report]
>>105763687
>why would you want to learn assembly?
Exploit development and reverse engingeering
Anonymous No.105765851 [Report] >>105770204
>>105763642
>AT&T syntax
Anonymous No.105765887 [Report]
>>105763647
Hands down the best book to learn assembly.
There are also lecture videos somewhere on the authors' university's website if you don't like reading.
Anonymous No.105766955 [Report]
>>105765104
ok
Anonymous No.105767325 [Report] >>105767340 >>105771974
>>105762446 (OP)
Why would you write switch statements like that? Are you scared of new lines?
Anonymous No.105767340 [Report]
>>105767325
well he puts the bracket on the same line as the statement so, clearly.
Anonymous No.105767343 [Report] >>105768273
>>105762446 (OP)
>enum
why
Anonymous No.105768043 [Report]
>>105762446 (OP)
why are you using braces around the switch if you're already disgustingly hiding it back there
Anonymous No.105768273 [Report]
>>105767343
why not? what would you do? use a number to indicate mode / direction? thats the same thing but you've just lost the name which is nice to have for clarity
Anonymous No.105769558 [Report] >>105769574 >>105773517 >>105779548
My fav pattern for fsm state functions.
Anonymous No.105769574 [Report] >>105769648 >>105770030
>>105769558
i always make my switch case statements 1 liners. If the body cannot be squished into 1 line then i'll make it a function. I just love seeing
switch(X)
{
case A: ... ; break;
case B: ... ; break;
case C: ... ; break;
case D: ... ; break;
}


so clean
Anonymous No.105769648 [Report]
>>105769574
There's a satisfying aesthetic to it for sure.
Anonymous No.105770017 [Report] >>105772035
>>105762446 (OP)
stop being such a special princess and format your code properly.
Anonymous No.105770030 [Report] >>105770170
>>105769574
at that point you might as well make have a static const jumptable and just call it like myfunctions[case]();
Anonymous No.105770131 [Report] >>105771592
Anonymous No.105770170 [Report] >>105783104
>>105770030
i sometimes think about doing that but im not sure because the compiler can probably more easily interpret what im doing with a switch statement and so it can figure out whether to turn it into a literal jump table like that or not

then again im not sure the compiler will ever make a jump table if the case values are not consecutive
Anonymous No.105770204 [Report]
>>105765851
> at&t syntax
It was disassembled and lightly hacked. I hope.
Probably should have learned MASM.
Just like 99.99% of rust code was the output of c2rust, and then fucked with.
Anonymous No.105770612 [Report] >>105771374 >>105771998
>>105762446 (OP)
Mixing code with unittests, You are a fucking monkey my friend.
Anonymous No.105771374 [Report] >>105771981
>>105770612
> mix code and tests
Nobody in the real world does that.
We were also told to write the docs and tests first! How’d that work out?
… wait I think my ‘tangle’ batch run is done..
Anonymous No.105771587 [Report] >>105771617
>>105763597
OP said comfy, not 200 line function
Anonymous No.105771592 [Report]
>>105770131
nice filename
Anonymous No.105771617 [Report]
>>105771587
>OP said comfy, not 200 line function
Anonymous No.105771974 [Report]
>>105767325
I try to keep code under 80 chars, not because of some kind of autistic compulsion (well, maybe a little bit of it), but mostly because it's obviously easy for humans to comprehend information when it isn't stretched all over the screen and looks more like a newspaper column. So yeah, it does save space on the left inside the switch statement. But also it just makes sense to do it that way because it indicates immediately that the "if" only applies to "switch" and there's nothing else inside besides it.
Anonymous No.105771981 [Report] >>105772005
>>105771374
I can't take seriously people who writes test code or TDD promoters.
Anonymous No.105771998 [Report]
>>105770612
I've never done this before until recently, then decided to try. It's super comfy and actually useful, because you can immediately see what's tested and don't need to jump between files abd serch for unit tests. Also when you do it this way, there's no need to name your tests, because it's immediately obvious which function they're testing - the one they immediately follow.
Anonymous No.105772005 [Report] >>105772032
>>105771981
I don't promote TDD but not writing unit tests and not understanding why it is helpful both immediately and in the long term is very much a skill issue.
Anonymous No.105772032 [Report] >>105772051
>>105772005
So, you need something to take your hand and guide you because you are not able to understand your own code and how it can potentially fail.
Anonymous No.105772035 [Report]
>>105770017
Whoa buddy, it's my code, it doesn't owe you any formatting. If you use go fmt or whatever equivalent - good for you, but I bet you're one of them people who cannot picture an apple in their heads or something. Many such cases.
Anonymous No.105772051 [Report]
>>105772032
You got it wrong. Say I'm writing a gui app, but this particular part is far removed from actual gui. Unit tests just make it possible to write without a) having gui part ready first b) having to constantly check said gui after every change to my code. If you claim you can just write any kind of code and make it immediately work, you're talking out of your ass.
Anonymous No.105773517 [Report]
>>105769558
absolutely useless comments
Anonymous No.105773609 [Report] >>105773645 >>105774735 >>105775216 >>105776950
Anonymous No.105773645 [Report]
>>105773609
nice idiomatic Rust
Anonymous No.105773903 [Report] >>105775099 >>105775143
>>105765384
>rust troon
>no code
>just literals and constants
>~50 lines
>there's a test after
>probably 1/3rd of the file
>another window
>less than a few hundred lines of code

it would be funny if not for the commonality
Anonymous No.105774016 [Report]
>>105762446 (OP)
Duplicate of >>105711980
Anonymous No.105774022 [Report] >>105774085
>>105762446 (OP)
what theme is this?
Anonymous No.105774085 [Report] >>105774118
>>105774022
I think it's something custom I edited out of an existing theme. I sometimes change background color when I'm bored, but most other colors work just fine woth any dark background.
Anonymous No.105774118 [Report] >>105774244
>>105774085
it looks very nice
baritone !DIN0bsbxx2 No.105774184 [Report] >>105774730
>>105762446 (OP)
java winned
Anonymous No.105774222 [Report] >>105774272
>>105762446 (OP)
>Asserting twice unnecessarily.
>Branching on a condition you’ve asserted can’t happen.
>mode function is both a getter and setter depending on the arguments.
>Pausing twice removes history of originally paused mode.

The formatting is nice.
Anonymous No.105774244 [Report]
>>105774118
I think it's actually the font that makes it nice, haven't found a better one in years, desu.
Anonymous No.105774253 [Report] >>105774331
I write more fucking comments than code, and I can't stop.
Anonymous No.105774262 [Report]
Not mine but look at this beauty.
Anonymous No.105774272 [Report] >>105774319
>>105774222
> asserting twice
I think it's clear that way
> branching on a condition that can't happen
Where? It says step >= 1, not step > 0
> both getter and setter
Don't think so, this is D. If you mean that function is reloaded with different (0 and 1) number of args, then yeah. This actually allows me to say obj.mode and obj.mode = and is intended.
> pausing twice
Good catch
Anonymous No.105774319 [Report]
>>105774272
Reasonable answers. Although the mode thing would freak me out if I was working on this code.
Anonymous No.105774331 [Report] >>105774413
>>105774253
the amount of comments isnt the issue, its your phrasing. its not your fucking diary lmao.
Anonymous No.105774413 [Report] >>105774427
>>105774331
>the amount of comments isnt the issue
I guess?
Anonymous No.105774427 [Report]
>>105774413
yeah...
Anonymous No.105774730 [Report]
>>105774184
Disgusting
Anonymous No.105774735 [Report] >>105774869
>>105773609
You're retarded
Anonymous No.105774789 [Report]
Anonymous No.105774869 [Report] >>105775150 >>105775208 >>105775216 >>105775260
>>105774735
wrong
Anonymous No.105775099 [Report]
>>105773903
Wtf are you even complaining about. Did you expected me to zoom out to show thousands of LoC or what is even your problem m8
Anonymous No.105775143 [Report] >>105775208 >>105776426
>>105773903
Anonymous No.105775150 [Report] >>105775156
>>105774869
Looking at this makes me want to kill myself.
Anonymous No.105775156 [Report] >>105775208
>>105775150
cnile spotted
Anonymous No.105775189 [Report] >>105775543
>>105764036
thanks bro
Anonymous No.105775196 [Report] >>105776863
Not a particularly elegant function as a whole, but it calculates the screen-space extents of a cube using just 4 AVX intrinsics at lines 30-33. What normally takes 8 mat4-vec4 multiplications compressed to one.
Part of a software octree splatter.
Anonymous No.105775208 [Report] >>105775222 >>105775233
>>105775143
>>105775156
>>105774869
Damn people, I didn't have any particular opinion bout Rust before, but this, this is madness. Meds.
Anonymous No.105775216 [Report] >>105775233
>>105773609
Why do you add these random code blocks for one liners?

>>105774869
If you used for instead of these ugly nested multi-line iterators, this code would be 100x more readable.
Anonymous No.105775222 [Report] >>105775233
>>105775208
These are probably just write-only solutions for code challenges.
Akin to tacit APL code.
Anonymous No.105775233 [Report] >>105775238
>>105775208
git gud

>>105775216
for loops are slower

>>105775222
correct
Anonymous No.105775238 [Report] >>105775245
>>105775233
>for loops are slower
They are not, they are the same.
Post any code that uses Iterator::for_each (in code blocks), and I will run a benchmark to prove you wrong.
Anonymous No.105775245 [Report] >>105775246
>>105775238
https://godbolt.org/z/h9j1exchv
Anonymous No.105775246 [Report] >>105775248
>>105775245
Where is Iterator::for_each?
Anonymous No.105775248 [Report] >>105775346
>>105775246
https://godbolt.org/z/Eca4KKE1M
Anonymous No.105775260 [Report] >>105775267
>>105774869
Nah man, your code is slop and isn't proof of your genius. People like you make Rust look bad
Anonymous No.105775267 [Report] >>105775271
>>105775260
Anonymous No.105775271 [Report] >>105775279
>>105775267
holy fuck what a mess
Anonymous No.105775279 [Report] >>105775289 >>105775353 >>105779052
>>105775271
Anonymous No.105775289 [Report] >>105775294
>>105775279
post rustfmt config
Anonymous No.105775294 [Report]
>>105775289
comment_width = 100
force_multiline_blocks = true
group_imports = "StdExternalCrate"
hard_tabs = true
imports_granularity = "Crate"
max_width = 100
newline_style = "Unix"
style_edition = "2024"
trailing_comma = "Never"
unstable_features = true
use_field_init_shorthand = true
use_small_heuristics = "Max"
wrap_comments = true
Anonymous No.105775346 [Report] >>105775362 >>105775422
>>105775248
If you split it into two fors it's pretty much the same.
avr min max
Foo: 9.18ms 8.94ms 13.56ms
Bar: 9.32ms 9.15ms 9.48ms

for 100000 elements arrays.
This only happens in certain adapters like you have read in the documentation. In your code where you just do slice::iter().enumerate() it literally won't make any difference and you are just making your code super ugly for no good reason.
Anonymous No.105775353 [Report]
>>105775279
Anonymous No.105775362 [Report] >>105775378
>>105775346
>super ugly
why do you consider that style ugly? with a normal ass for you have to look at surrounding variables to determine intent. a fold guarantees that you are combining a collection into some other variable.
it's literally just a matter of you learning how to read the functional style.
Anonymous No.105775378 [Report] >>105775386
>>105775362
>why do you consider that style ugly?
For the same reason why LISP is ugly. It's just symbol soup that is hard to follow. For loops with proper flow control keywords are much more clean to look at than nested, multi-line closures.
Anonymous No.105775386 [Report] >>105775490 >>105775501
>>105775378
Lisp is plenty readable when you learn that you should be looking at whitespace.
Anonymous No.105775402 [Report]
From my game project.
Anonymous No.105775422 [Report] >>105775446 >>105775475
>>105775346
>If you split it into two fors
no thanks, for_each will do that for me
>super ugly
ok, cnile
Anonymous No.105775446 [Report] >>105776348
>>105775422
>.for_each(|()| ());
Anonymous No.105775475 [Report] >>105775492
>>105775422
>ok, cnile
I am a Rust programmer.
Anonymous No.105775490 [Report] >>105775548
>>105775386
How is this readable? Literally a soup of words.
Anonymous No.105775492 [Report]
>>105775475
>rust programmer
>afraid of using the full potential of iterators
>thinks using continue/break results in clearer code
that's just sad. you have been bricked by c
Anonymous No.105775501 [Report]
>>105775386
Now count the amount of identifiers/atoms in this code and compare it to yours.
Anonymous No.105775515 [Report]
From my MOD player.
Anonymous No.105775543 [Report]
>>105775189
turn off nigger mode
Anonymous No.105775548 [Report] >>105775617
>>105775490
ok
Anonymous No.105775617 [Report] >>105775643
>>105775548
Hey man, srsly, we all have mental issues, but you know, if you find this kind of code beautiful, then maybe you need to like go outside more often. Get a dog or something. Stop watching anime.
Anonymous No.105775643 [Report] >>105775671
>>105775617
imagine being so retarded that you cannot grasp the basics of nested parentheses
Anonymous No.105775669 [Report]
>>105765614
wtf I let it drop
why are you making me look bad
Anonymous No.105775671 [Report] >>105775706
>>105775643
Anyone can grasp the semantics, it's just that it's literally hard to read, because it all looks like spaghetti. You're giving me strong tranny gay vibes btw, because you keep on posting screenshots as if posting more of the same would somehow normalize it and convince everyone it's beautiful while it isn't.
Anonymous No.105775706 [Report] >>105775718 >>105776361
>>105775671
it's hard to read because you are not used to it.
it's genuinely that simple.
do you think people that enjoy Lisp are just bullshitting when they say that the syntax is nice? no, they've put in their week of time with the syntax, internalized it, and began to cringe whenever they had to do superfluous bullshit when using another language.
here is a Lisp that I made, it does not allow for variadic arguments, so you do not need parentheses even.
Anonymous No.105775718 [Report] >>105775885
>>105775706
Sorry man, you're just confirming my point.
> it's ugly
> here's more, because if you're overwhelmed with ugly it becomes beautiful
Anonymous No.105775830 [Report] >>105775916
>>105762446 (OP)
Breh, what IDE is this, and what theme?
Anonymous No.105775885 [Report] >>105775927
>>105775718
no, I've just coded more than you and in more languages than you. I've built more languages than you.
you just think you are correct because it is typical and predictable of humans to do that.
Anonymous No.105775916 [Report]
>>105775830
Vim snd some theme I customized.
Anonymous No.105775927 [Report]
>>105775885
That might be true, but that's no guarantee of taste.
Anonymous No.105776348 [Report]
>>105775446
kek
Anonymous No.105776361 [Report]
>>105775706
kissless, childless, on the brink
Anonymous No.105776403 [Report]
Anonymous No.105776415 [Report] >>105776451
>>105765384
neat. what ISA are you emulating here?
Anonymous No.105776426 [Report] >>105776857
>>105775143
how do you even find out what a concurrent data access transactor is
Anonymous No.105776451 [Report]
>>105776415
A minecraft computer some youtuber made https://youtu.be/3gBZHXqnleU
Anonymous No.105776857 [Report]
>>105776426
by being a retard and trying to build wheels from scratch. I was not using a database, and wanted to support concurrent activity.
long story short: use Postgres and look into transactions and isolation levels.
Postgres will save you so much fucking time.
Anonymous No.105776863 [Report] >>105776903
>>105775196
>if (1)
is there any reason why you added these?
Anonymous No.105776903 [Report] >>105783104
>>105776863
They're to quickly disable or comment out blocks for testing or benchmarking.
Anonymous No.105776950 [Report] >>105776984
>>105773609
joke language
Anonymous No.105776984 [Report] >>105777026
>>105776950
post your aoc solutions
Anonymous No.105777026 [Report] >>105777051
>>105776984
nta
but
>.;/:+=%ù£µ*$°)
Anonymous No.105777051 [Report] >>105777103
>>105777026
>filtered by a hashmap
Anonymous No.105777103 [Report] >>105777157 >>105777341 >>105777475
>>105777051
hashmaps are so retarded of a concept i didnt even have a word for that type of structure until i was years into programming in c
mfw i learned that an a 256-wide preliminary array which you use to cut on ordering your string based data is a fucking hashmap
Anonymous No.105777157 [Report] >>105777205
>>105777103
Anonymous No.105777205 [Report]
>>105777157
geg
i really dont look like a programmer irl, though
im a dropout, self taught
i was a physical worker during my whole wagie career
i done my programming heresies during the night
Anonymous No.105777233 [Report] >>105777268
If I may interject for a moment what you're refering to as a hashmap is actually a lookup table or as I've taken to calling it a 2 + dimensional array available for lookup.
Anonymous No.105777268 [Report] >>105777440
>>105777233
ah my bad, sory
again, im self taught. im bound to have holes in my knowledge esp in my vocabulary
Anonymous No.105777341 [Report] >>105777375
>>105777103
>hashmaps are so retarded of a concept
this is a joke post, right?
Anonymous No.105777375 [Report] >>105777426 >>105777440 >>105777443 >>105777452
>>105777341
i meant its basic
for me its just memory management
you figure out storage structures and interfaces to streamline the access to your data
i could take a function that atois a string into an int and then shove that into linked lists and make it live in arenas and you would say "thats a hashmap"
well, not in my mind
its an interface, and memory management in the larger sense
its not specific to your hasmap, it extends throughout the whole program
Anonymous No.105777426 [Report] >>105777477
>>105777375
post your code
Anonymous No.105777440 [Report]
>>105777268
>>105777375
(cont)
i mean
lets say you work with a big array
lets say you create a LUT to elements in your big array
lets say its for a game and you have an additional layer of abstraction, your scripting language
and you use that look up table to access the data of your game, idk, positional for ex
and that you have a function that turns a game id into a number which is then used for indexation

where does the hashmap starts and where does it end?
it there even one at all? because for me its just the interaction bw different subsystems
interfaces and memory management
Anonymous No.105777443 [Report]
>>105777375
>i could take a function that atois a string into an int and then shove that into linked lists and make it live in arenas and you would say "thats a hashmap"
I wouldn't, actually, because it has no bucketing, collision behavior, and atoi is not a good hash function
Anonymous No.105777452 [Report] >>105777489 >>105777491
>>105777375
you're a retarded tranny. I swear to god the level of copes cniles go through because they can't accept the concept of template/generic code. absolutely retarded. kys.
Anonymous No.105777475 [Report]
>>105777103
>hashmaps are so retarded
Filtered by a hashmap kek
Anonymous No.105777477 [Report]
>>105777426
i dont have much on this pc
#include <stdio.h>
#include <stddef.h>

struct s_str;
typedef struct s_str t_str;

struct s_str
{
size_t size;
char text[];
};
#define STINGIFY(text) (t_str *)(&(const struct { size_t size; char str[sizeof(text) + 7]; }){ sizeof(text) - 1, text "\0\0\0\0\0\0\0"})

int main( void)
{
fprintf(stderr , "main ok\n") ;
t_str *string = STINGIFY("this");
fprintf(stderr, "string->text : |%s|\n", string->text);
fprintf(stderr, "string->size : %lu\n", string->size);
}

and iv e been lazying about recently
Anonymous No.105777489 [Report] >>105777556
>>105777452
>template/generic code.
#include <stdio.h>

#define fn_print(type, value) fn_print##_##type(value)

void fn_print_int(int i)
{
printf("fn_print_int : %d\n", i);
}

void fn_print_float(float f)
{
printf("fn_print_float : %f\n", f);
}

int main(void)
{
fn_print(int, 5);
fn_print(float, 1.41);
}


crabs reliably incompetent, i see
Anonymous No.105777491 [Report] >>105777498
>>105777452
troons dont use c
they use rust and lua.
Anonymous No.105777498 [Report] >>105777516
>>105777491
>troons dont use c
lmao, yes they do you stupid faggot. do you homosexuals live in an alternative universe?
Anonymous No.105777516 [Report]
>>105777498
>t. rany. seething.
Anonymous No.105777556 [Report] >>105777596
>>105777489
>cniles can't overload functions
man I fogot how dogshit that language is.

in C++, this is just:
int x(int i) {
return 0;
}
int x(float i) {
return 1;
}
Anonymous No.105777596 [Report] >>105777614
>>105777556
Anonymous No.105777614 [Report] >>105777640 >>105777850
>>105777596
imagine using a tranny infested language worse than C++ and Rust and being proud of it. sad!
Anonymous No.105777639 [Report] >>105777850 >>105780166
Anonymous No.105777640 [Report]
>>105777614
>
..
Anonymous No.105777691 [Report]
Anonymous No.105777850 [Report]
>>105777614
Holy cope
>>105777639
The oracle of soi
Anonymous No.105777907 [Report] >>105777921 >>105778186 >>105778268 >>105778903
>hashmap
i use linked list for everything including key value storage
Anonymous No.105777921 [Report]
>>105777907
Should have repeated Data Structures and Algorithms.
Anonymous No.105778186 [Report]
>>105777907
The Lisp way.
Anonymous No.105778268 [Report] >>105778705
>>105777907
this is obscenely retarded
why are you proud of this retarded shit?
Anonymous No.105778705 [Report]
>>105778268
one data structure for everything
vector, queue, stack, and even map all implemented in linked list in my programs
works for me, performance hadn't been a problem in practice
Anonymous No.105778903 [Report]
>>105777907
Based, probably still faster than Python as well
Anonymous No.105779052 [Report]
>>105775279
this looks like obfuscated js
Anonymous No.105779490 [Report]
>>105763733
based, same.
I suggest that after doing your first few hello worlds, look into SIMD instructions so learning assembly will have some immediate utility too.
Anonymous No.105779548 [Report] >>105780068
>>105769558
Are there any good DSLs that allow me to specify FSMs while still allowing general purpose code? Something like lex but instead of for characters, it should conveniently work for arbitrary symbols.
I know there's state-chart xml, but afaik there is only one compiler to c++
Anonymous No.105780068 [Report] >>105780370
>>105779548
a programming language
Anonymous No.105780151 [Report]
last time I did this, I was so sleep-deprived that I did not realise that my full name was being shown in the code because of Git.
Anonymous No.105780166 [Report]
>>105777639
You can make your code way faster if you don't use the random bullshit and always say 7.
Anonymous No.105780170 [Report]
Webdev ape life.
Anonymous No.105780370 [Report]
>>105780068
I want a DSL mainly so it can automatically draw me a diagram of the FSM. It's much easier to read than code
Anonymous No.105781486 [Report]
Sure love working on nice modern systems
Anonymous No.105781550 [Report]
Good morning sirs.
Anonymous No.105782510 [Report] >>105783796
Based.
Pro tip; if this is for a game then all movement should be done by manipulating a 2d velocity struct (floats). Then each tick multiply it by a fraction that feels comfy. At 0.1 clamp the velocity to 0.
Anonymous No.105783104 [Report]
>>105770170
you can force it using
--param case-values-threshold=1
https://godbolt.org/z/5jeqaEsMh
>>105776903
why not use #ifdef then?
Anonymous No.105783796 [Report]
>>105782510
That's not a game, it's a text editor.
Anonymous No.105783824 [Report]