[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / 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]


File: IMG_20260527_214449_637.jpg (108 KB, 1280x726)
108 KB JPG
Why does he love that green theme so much?
>>
>>108991050
reminds him of the matrix
>>
>>108991050
>spends a decade creating a new language
>shows it off with a fucking Sokoban clone
>>
>>108991050
its easy on the eyes.
>>
>>108991050
Why does he and Mutatori swear by Emacs so much anyway? It runs like shit on Windows.
>>
>>108991050
color green was considered blessed by Prophet Muhammad (PBUH) and brother Jonathan is a secret revert alhamdulillah
>>
>>108991050
You are no longer black
or brown
or yellow
or red
You are now GREEN
You are like GREEN
or DARK GREEN
DO YOU UNDERSTAND??????

Anonthan…
You're the maggot whose father served in Vietchan????
>>
ask him
>>
>>108991182
Peanut Butter und Hjelly
>>
I like it, other than the comment color.
This code is also not BSD KNF so I will hide the thread.
>>
>>108991050
ip count was removed for threads like this
>>
he's an autistic boomer who hates change.
He'll whine and bitch about emacs and windows but refuse other options because switching is too much work for him
>>
>>108991050
>else if
IMHO else if is symptom of bad code
>>
>>108993136
why?
>>
>>108993198
Multiple branching. It's faster to use a switch function which under the hood uses a lookup hash map and it's O(1).
>>
>>108993251
but you can't use switch for everything, so I think, use where it fits the best, else if is no symptom of bad code.
>>
>>108993288
Nope, if-else is syntactyc sugar for goto which is bad. Use switch functions or switch to a functional language without if else. It's pure and clean and cache friendly
>>
>>108993251
Yes. A switch can be compiled to a jump table in some cases, but I find "else if" aesthetically unpleasant, also he's checking sign.rank_satisfied 3 times.
>>
>>108993295
try this in a switch case
if (status === "gay") {
let message = "YWNBAW";
console.log(message);
} else if (status === "chef") {
let message = "cook pizza pineapple";
console.log(message);
}
>>
>>108993198
"else if" encourages programmers to chain unrelated conditions because it's easy to keep adding lines.
"else { if }" encourages programmers to think about nesting and independence because the nesting is visually present.
>>
>>108993136
>>108993251
Idiot, the compiler will look at the code, and choose what it deems is most optimized. Switch statement is the same as a if/ else if statement, and a switch statement might even end up as a interface, of a flag like structure, or it will en up doing and/or/not arithmetics. I really should not correct you though..
>>
>>108991050
he spent his entire life using Solarized, it's a miracle he actually moved off of it
>>
>>108993462
You have no idea what you are talking about, not all else-if statements chains can be converted to a switch statement (jump table). Compiler would not give a fuck about your code (most of the time) and because else-if chains should be in order your code may be slower for some paths than using a tree a nested else { if } statements.
>>
>>108993557
Okay, so else if is a more complicated procedure, because it expects to do the checks in order, so a different functionality than switch statements, but what is actually going to happen is that the compiler will set up a flag based on the previous if statement, guess that the if statement will be the same, and if something changed, then it will backtrack and execute the different path. It is like the rolley problem, but the train can go in reverse. So no, it wont matter, and it is slow to load instructions into the cash. Jump statements dont function like you think, at compile time, the compiler will just scramble your code and copy paste lines based on the jump instructions
(*Face palm). Are you a women by chance? :3
>>
>>108993251
dunning-kruger award.
>>
>>108991050
Green is the easiest on the eye.
>>
>>108991141
This. Seems easy if you're doing a shit ton of terminal than most other themes.

Not sure I agree with the if/else blue(?) light gray(?) mix and green on green (the comments) isn't the best, but the background and general feel looks fine to me.
>>
>>108991050
based emac chad
>>
>>108993251
Have you ever actually looked at the assembly that a compiler produces?
>>
>>108993251
besides that you're talking about premature optimization. there's bigger problems with OP like using a magic number or xboxhueg names. realistically considering how many checks there are, and the number of nesting if-statements, there's no reason to not just have the called routines handle the business logic, passing references to the object handles, and relegating everything to encapsulation anyways because really who even gives a shit about performance
>>
>>108997362
>Using a magic number
Once, 255, with a comment next to it. (He should actually use magic numbers all over the place because they are faster to implement, and does not hide necessary information)
>No reason not having the called routines handle the buisness logic
WTF are you talking about?
>Passing references to the object handlers
Dude this is not OOP, there are no object handlers
>And relegating everything to encapsulation anyways
Okay, now you are trolling. I hope microsoft hires you
>>
>>108997362
Dude, sign is a struct with some information in it, and it seems to check the sign and edit the sign based on some player state. We will also face a sign at the end of a stram demo??
>>108997414
Giving myself a (you) :D
>>
File: Untitled.png (250 KB, 3840x1950)
250 KB PNG
>>108993557
unfortunately you were not born white, I recommend rust with claude AI subscription for you
https://godbolt.org/z/1G3nPa5Po
>>
>>108991076
It was going to be a small game that he intended to create quickly and then spend more time on a larger game, but he ended up spending more and more time on the sokoban game
>>
>>108993251
>>108993136
Are you retarded? he is writing in his own programming language in his own compiler which has multiple codegen backends, including c, llvm and his own x86 machine code generation. Do you think he doesn't know how his own compiler compiles his own code?
>>
>>108998703
>embrace the slop
Nah
>>
>>108998703
basedbasedbased
>>
>>108993370
My coworker consistently does string comparisons like this by stuffing 4-byte slices into ints and nesting switch/cases
>>
>>108998703
What part of "not all else-if statements chains can be converted to a switch statement" you don't understand?
>>
>>108998773
Nobody is talking about his slop language here. We are talking about the else-if concept vs else { if }. It's a very different thing.
>>
File: emacs-darkblue-themes.png (378 KB, 2549x1346)
378 KB PNG
>>108991076
>Sokoban clone
That's malicious dishonesty. OOTSS is a Sokoban clone like Brahm's Symphony #1 is a Alphorn Volkweise clone. It's a very stupid and ignorant comparison to make.
>>108991141
>>108994597
Agreed.
I use emacs and don't bother with any fancy themes. Just have a handful of custom functions that either set a dark background and light foreground, or light background and dark foreground. Foreground is either white, black, or a very slight tint (eg #eeeeff for picrel). I have a couple of green ones also I can switch to if I feel like it. I use different backgrounds for different projects (and a bright red one if I open a file as root).
>>
>>108993370
you can switch over strings in go
>>
>>108992932
other options suck in their own ways.
There isn't any basic editor that is "emacs, but better." They're either too different (vim) or full of aids and poo (vscode).



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