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

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

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


[Advertise on 4chan]


File: 1756184271080690.png (629 KB, 768x576)
629 KB
629 KB PNG
what are you working on /g/?

prev: >>106375242
>>
File: 1753389729701511.png (116 KB, 368x543)
116 KB
116 KB PNG
trying to learn cpp, what to build?
>>
>>106438646
an llvm frontend
>>
File: GipfruSWEAATkkV.jpg (283 KB, 2048x1976)
283 KB
283 KB JPG
>>106438646
same, im making a pong clone using SFML
not really breaking new ground but i guess it is making me more comfortable with structs
>>
>>106438646
Begin with C# first
>>
File: 1736452105313155.gif (226 KB, 96x98)
226 KB
226 KB GIF
>>106438694
>>
>>106438694
I already know java
>>
File: 1756599703941746.jpg (296 KB, 1536x1024)
296 KB
296 KB JPG
>>106438619
>maid /dpt/ gets deleted
>new /dpt/ still has a maid
Why do jannies bother to delete maidposts? Everyone using this board is a cute maid. That is who wants to even discuss these topics. Anybody both willing and able to talk about language/compiler design anonymously online is wearing a maid outfit. It isn't even secret anymore.
>>
>>106438734
i dont i just wear striped thigh highs
the dress and apron is a pain to take off and put on
>>
>>106438734
dejiko isn't a maid you sperg
>>
Stop talking about maids and ask the real important question:
Have you ever jerked off to your or someone else code?
>>
Going through https://clang.llvm.org/docs/ClangFormatStyleOptions.html trying to build a style that isn't terrible because all of the presets are garbage
Hard requirement is that indentation is NEVER dependent on the length of an identifier. Shit like
auto myLongVariableNameLooooooool = someFunction()
.hahahaFuckYou();

drives me insane.
>>
any good NEET lang?
fun to write, don't care if useful
thinking J
>>
File: Dejiko is a maid.png (1.52 MB, 850x850)
1.52 MB
1.52 MB PNG
>>106438755
>she isn't a maid
>she just likes wearing a maid outfit and engaging in maid activities like cleaning and heart hands and advanced Mathematics and Computer Science research and programming on her Maid Computer
>>
>>106438881
she's an alien catgirl princess that works in video game store
larping as a drawing is one thing but don't start pretending you're a math/CS wizard
>>
>>106438881
Reducing classic anime girls as just "maid" is as bad as people who reduce Astolfo as just "femboy"
>>
How the fuck do I compute the minimum value of a signed integer type at compile time in C without invoking UB?
>>
File: asdasdsa.png (103 KB, 507x771)
103 KB
103 KB PNG
I'm learning how to use SIMD instructions so I am working on detecting the enabledness of those instructions so that I can use them for some data stuff i'm doing with 3d models, AVX could speed up parts of my program by a 8x, with more gains to be had by adding parallelization later if I need to
>>
>>106439083
stdint.h
INT_MIN
>>
>>106438958
>>106438990
I am being attacked by a weapon that plays a sound that causes depression. It vibrates my bones and causes depression. They play it from a machine, possibly located in space to cause depression. I would try to watch this show, but until the sound stops I can take no actions.
>>
>>106439102
okay now do __int128_t
>>
>>106439083
use std::numeric_limits or the INT_MAX macros, or limits.h/<climits>, or just roll it over from max like a real gamer
>>
File: LOOKATTHEPICTURE.jpg (106 KB, 632x167)
106 KB
106 KB JPG
>>106439103
We'll destroy those gangsters someday brother
>>
>>106439106
from stackoverflow...
<code>
static const __uint128_t UINT128_MAX =__uint128_t(__int128_t(-1L));
static const __int128_t INT128_MAX = UINT128_MAX >> 1;
static const __int128_t INT128_MIN = -INT128_MAX - 1;

//or...

std::numeric_limits<__int128>::max()
</code>
>>
>>106439103
you may have
paranoid schizophrenia
hello
>>
>>106439159
assumes two's complement
>>
>>106439106
no
ill do it when unsigned long long long becomes standard
>>
>>106439178
NTA but one of the two:

Or you are doing something malicious her "OH HOW C BAD NOBODY SHOULD USE IT" like a rust evangelist
Or you really have some mental issue like the other poster, to not only need it for __int128_t, but also care about two's complement as if any computer you are gonna ever touch will use one's complement or other in it's C implementation
>>
>>106439201
malicious here*
>>
>>106439178
if you know that it's a 128-bit signed integer then it's max should be 2^127 right, assuming we aren't counting the sign bit? can't you just precalculate and define the value?

-2^127=-170,141,183,460,469,231,731,687,303,715,884,105,728
>>
>>106439266
is there a standard way to have a 128 bit constant in C?
>>
How do you guys pick a project to focus on? For every project I’ve started and stalled, I started two more as a result.
>>
File: Lesson.webm (2.64 MB, 960x720)
2.64 MB
2.64 MB WEBM
finally used a cross-product today
>>
>>106439735
Have a clear goal and outline
>>
>>106438619
Removed a lot of unused CSS from https://ayasequart.org. Check it out. https://ayasequart.org/g/thread/106438619
>>
>>106439751
what's this girls' name?
need to see if there's nudes of her
>>
Do you move the code that's used once to separate functions? A concrete example, connecting Qt signals in constructor:
connect(A, &A::foo, [this]{
// a dozen LoC
})
connect(B, &B::bar, [this]{
// a dozen LoC
})
>>
>>106438619
C++ gives me the ick, but it fits the criteria for my next big project.
How do I get over the fear of shitty build tools? Which one should I use?
>>
>>106438821
OCaml is also a NEET language
>>
>>106441286
>Which one should I use?
Meson. It just werks.
>>
>>106438619

lol, lmao even

https://lngnmn2.github.io/articles/philosophy-of-programming/
>>
Tried my best to like Rust. Wrote a compiler and a basic terminal emulator in it. Took me about a year of weekends and evenings. Still don't like it.
>>
>>106439751
what is this
>>
>>106439103
The morning sun has vanquished the horrible night.
>>
I am building a CLI app that will have a hybrid of a flag mode and an interactive mode. However I am currently second-guessing as I don't know which flags should also be prompted during the interactive mode and which should be skipped. Does any anon have any advice ?

The flags that I am second-guessing are for verbose (showcasing detailed information), progress (for progress bar), count, and output to name a few.
>>
File: Tohru8.jpg (898 KB, 1311x1380)
898 KB
898 KB JPG
>>106441670
Your REPL should be able to do everything your CLI can. It is also good practice to design the REPL first.
>>
>>106441670
group your flags into two separate groups, one for control (output, verbosity, etc.) and another for batch processing (ie. whatever you will map to an option during interactive mode)
whatever input you an use in interactive mode, add as a batch flag; whatever additional mode you need to set in the app, add as a control flag
>>
An SQL query walks into a bar and walks upto 2 tables and says "Can I Join You?"
>>
the query then accidentally drops the tables
then it got fired and raped
>>
Two bytes walk into a bar. The first byte turns to the second and says "I think I may have a parity error." The second byte turns to the first and says "yeah, you look a bit off."
>>
File: 1731504616312798.jpg (47 KB, 445x488)
47 KB
47 KB JPG
is your computer running?
then you better go catch it!!
>>
>>106441286
VS studio project for starting out.
cmake if you plan on using emscripten.
cmake is the worst build system but if you used any other build system, such as meson, I would be worried about resources (you will find lots of posts on the internet on cmake).
I suggest using vcpkg for libraries, but this blog post has really shown that it's not all rosy (but this is still 10x better than building from source, prebuilt, or mingw packages or whatever).
https://decovar.dev/blog/2022/10/30/cpp-dependencies-with-vcpkg
don't touch mingw, address sanitizer is the only way to debug C++.
>>
>>106439090
I think this post basically says just use the __builtin / (whatever msvc uses) check because it's fast enough for 99% of cases.
https://github.com/robertdfrench/ifuncd-up
>>
>>106442693
The two tables reply:
>Where do you think you are?
>You are not like us.
>>
File: eMAIDS.png (406 KB, 1919x1079)
406 KB
406 KB PNG
I completed mutations and squashed more bugs. Now I am adding the other resolution types. Then I have to add compiler flags and built-in functions and write the manual. Possibly other tasks I am forgetting, but everything except resolution types and maybe writing the manual should be short. I am also considering reworking eMAIDS to work with MAIDS and Kurumi MaidCard III. That way it is an entire IDE for MAIDS and they can seriously program in it more easily with having to fiddle with vim and command-line arguments or similar. Attached is a screenshot of eMAIDS. It would need significant rework, so the effort might not be worth it. eMAIDS is written entirely in core Java 23, using swing.
>>
File: bocchi.png (260 KB, 1919x1079)
260 KB
260 KB PNG
>>106443093
The maid is customizable. When compilation is successful you get a happy maid. When unsuccessful, the compiler fail maid. The theming and maids are also configurable and the themes can be serialized/deserialized so maids can create and share themes mlre easily. Here is one with Bocchi
>>
>>106440943
I usually just use lambdas for this:
const auto callback = [this] = {
/// dozen loc
};

connect(widget1, &Widget::signal, this, callback);
connect(widget2, &Widget::signal, this, callback);
>>
What makes a maid a maid? Is it the desire to wear the dress? The desire to program the computer and produce advanced Mathematics and Computer Science research? The huge boobs packed into the dress? What makes a maid?
>>
>>106443555
its the dress you retard what kind of question is this
>>
File: 1748548771195.png (2.06 MB, 1024x1024)
2.06 MB
2.06 MB PNG
>>106443591
The most important question in all of Computer Science.
>>
>>106443093
>>106443145
>white on magenta or whatever nightmare purple color
why the fuck
>>
File: Tohru10.jpg (232 KB, 1194x834)
232 KB
232 KB JPG
>>106443779
It is configurable. I just used that because it matches Maid Card colors.
>>
>>106439090
Reminder that SSE4.1 was implemented in 2007, SSE4.2 in 2008, AVX in 2011. Do not give a shit about non-AVX CPUs.
>b-but what about my fellow chinkpads
My T530 with a THIRD GEN intel CPU has AVX support. We are currently at intel CPU generation... Sorry, the naming scheme CHANGED after the 14th gen.
Do not and I repeat DO NOT optimize for AVXlets. Do not add fallbacks for AVXlets. Do not compile for AVXlets.
>>
>>106444081
but then how will I run new software on my Pentium 3 or Athlon XP computers?
>>
>>106444139
>1999
>2001
>32 bit
It's time to let go. Send it to a museum to be put in a glass case.
>>
any of you guys ever use AI to just make stuff for you? ive been learning C++ and Python for a while now and while the local model (Qwen 2.5) and Gemini both produce subpar c++ code, but it excel at Python code. Of course, the quality drops and errors increase with projects that exceeds about 750 loc but when it works, feels like taking a hit of crack.
>>
>>106444701
LLMs are nice for webtech and python, but sometimes I find myself doing thing manually instead of taking the time to provide context and correct the errors in the responses.
The breaking point seems to be across-files for me, so I just use it when I already have a design in mind and want it to shit out a baseline impl for me to modify to my needs.
>>
>>106444081
If someone on apple tried to run the game with AVX + crossover, it would give an error unless they set ROSETTA_ADVERTISE_AVX.
Also they need to have crossover updated in 2025, since people pay / pirate crossover once, they don't get updates.
That's pretty much the only reason to not assume AVX is supported (manually check for support).
Also I think for a simple SIMD implementation for a 3d math library, you don't need AVX, I think AVX is mostly for doubles in a 4x4 matrix? Am I wrong? That's what I see with jolt physics.
Of course, you could get into the weeds of SIMD and maybe you could batch operations with a bigger register, but I would wonder if compute is even the bottleneck (physics and audio seem to be the main places where SIMD is used).
>>
>>106444741
>The breaking point seems to be across-files for me, so I just use it when I already have a design in mind and want it to shit out a baseline impl for me to modify to my needs

yup, ive noticed that if keep everything in a monolithic file, it seems to do alright.

this gives me a ton of hope as a newbie though. there's no way these tools will be replacing anyone
>>
File: h-1b.png (21 KB, 960x540)
21 KB
21 KB PNG
>>106444824
LLMs, as they currently are, only fuel burning startups with a 1-man/grifter team. They can't replace junior devs (cheaper than seniors, future proofing, will climb the ladder), especially in bigger companies.
LLMs are not the reason the job market is bad. It's because of greedy corpos wanting to switch to cheaper H1b. These people can stay for up to 6 years.
>>
File: 1756662298196.jpg (236 KB, 1079x1399)
236 KB
236 KB JPG
>>106443922
why are your tohru images always night shifted?
>>
Peti Charato
>>
>>106444081
> My T530 with a THIRD GEN intel CPU has AVX support
Not AVX2 which is the actual useful one.
>>
>>106442806
heh
>>
>>106444139
compile with -march=i486 and they can run on even older cpus
you dont "need" anything other than scaler integer and floating point for most software
>>
File: Tohru6.jpg (246 KB, 850x1237)
246 KB
246 KB JPG
Mutations are complete. Resolution types are 2/3 complete and the last 1/3 won't take long. I am trying to decide what built-in functions to include, so how long that takes depends on how many I decide the first release needs. How much math. Etc.

>>106444955
I don't know what this means.
>>
>>106445537
>compile with -march=i486
but it's almost september
>>
>>106442895
Use Conan bro.
>>
>>106442895
I don't use window
>>
File: 298-290856101.jpg (20 KB, 500x367)
20 KB
20 KB JPG
>>106445765
>>
>compiling for "CPUs" without most of AVX512
>>
Can I get away with never writing constructors/destructors in C++ and just use RAII wrappers for everything
>>
>>106446478
Just use Java at that point.
>>
>>106446478
>Can I get away with never writing constructors/destructors in C++ and just use RAII wrappers for everything
How do you create RAII wrappers without constructors/destructors? Do you mean unique_ptr<T, D> for everything?
>>
template <typename T>
concept MyConcept = requires(T t) {
{ t.resource } -> std::same_as<std::vector<int>>;
};

void foo(MyConcept auto bar)
{
bar.resource. // No vector intellisense/autocomplete here

auto v = bar.resource;
v. // Or here
}


Feels like everything past and including C++20 is just being treated as an afterthought. Did people just abandon this language or what?
>>
File: Tohru9.jpg (870 KB, 2938x4096)
870 KB
870 KB JPG
>>106445668
Resolution types are done. Built ins are done. Compiler flags are probably next. Then the manual. Then some very heavy testing. Then release.
>>
File: output.webm (225 KB, 1696x1080)
225 KB
225 KB WEBM
so this is my first ever program in C and im also very new to programming. The program is just a to do list thing. So far all it does is it takes input from the user, assigns it an ID based on it's position and writes it to a file. my question is this: the code is 117 lines. Is this normal for C? to me it seems a bit excessive taking into account the simpplicity of the program. What do you think?
Code in next post.
>>
>>106447376
https://pastebin.com/V6RuBRqD
>>
>>106447428
also, forgot to mention, i tried doing everything from as scratch as possible, meaning using the standard library as little as possible (almost none)
i'm sure that has something to do with the inflated line count but still 127 lines of code for a program lkike this seems excessive to me.
>>
>>106447463
>i tried doing everything from as scratch as possible, meaning using the standard library as little as possible (almost none)
use open, read/write, close instead of fopen, fread/fwrite, fclose then
also printf and sprintf
>>
>>106447623
and fputs, fgets, fflush, scanf
>>
>>106447428
Your functions do too much stuff. Almost everything prints stuff event though the name suggests it should just be writing or reading something from a file. You're effectively smearing a big main function across a bunch of functions to give the impression of organization. Try to factor your programs into a logical layer and a presentation layer.
>>
>>106447463
If you do everything from scratch, you can get quite a lot of code even for very "simple" things. That's why we have standard libraries. (If you were doing it without a standard OS, you'd have a lot more lines of code to do to write data into a file.)
>>
In my testing tkinter/python actually executes faster than gtk4/c and qt6/c++.

These toolkits have become so bloated an interpreted brahmin language is outpacing them.
>>
File: file2.jpg (212 KB, 1033x1461)
212 KB
212 KB JPG
Where are the other maids? I need to hear about 4096 in Forth and elliptic curve in C.
>>
>>106447930
What do you mean by "executes faster"? What kind of tests are you doing exactly?
>>
>>106448020
No new updates currently, I'm still deciding the changes to the public-key API
I'll commit once I finish the signature and pkcs8 refactors
After a few more things I plan to make this version beta
>>
>>106438619
I heard templeOS can now boot UEFI using TinkerOS
>>
>>106448449
The time it takes to open the UI program. In GTK at least it's been getting slower and slower with each version. GTK3 and GTK4 take longer to open than tkinter.
>>
>>106440686
>>106441634
idk it's some character this guy animates
https://x.com/Wunkolo/status/1960414547199565894
https://x.com/Wunkolo/status/1905543245909950548
>>
>>106447769
well i thought about doing it that way to be honest but that would just mean more functions and more lines of code.
>>
>>106441601
I read (kinda) the rust documentation. Felt like most of rust can be accomplished with C macros.
Rust has an indelible aura of abomination.
>>
>>106439751
>wunk
that's the name i've been using in porn games for years, wtf
>>
For MVVM/Clean Architecture. If I need to encrypt some data before sending it to an API, is that implementation detail or business logic? Should I encrypt it in the usecase or the repository?
>>
working on a multiplayer terraria clone right now, all actions are synced over the server and two clients can see each other move and see modifications to the tilemap.
>>
>>106451185
that's sick
>>
>>106451130
>Should I encrypt it in the usecase or the repository?
Well? Should a repository ever silently encrypt data? The name is telling you what it should do.
>>
>>106448661
I am excited to see it. It seems like larger maid projects run out of gas sometimes and I was worried it was abandoned.
>>
File: file.png (30 KB, 479x690)
30 KB
30 KB PNG
been interesting in integrated information theory (IIT) so making some tools to visualise and change it in real-time :3
>>
>>106452008
Needs more maids
>>
File: file.png (657 KB, 761x815)
657 KB
657 KB PNG
>>106452029
I don't see how this helps my simulation
>>
>>106452087
This was extremely helpful. I like the maid border. Maybe the circles can also get replaced my maids somehow and it becomes EMD for maids?
>>
>>106452087
wdym? that image is just screams helpfulness
>>
File: Tohru4.jpg (605 KB, 850x1135)
605 KB
605 KB JPG
>>106447371
Good Morning Dra/g/on Maids!

Compiler flags are done. Manual is in progress. I am debating adding more pattern matching abilities to the built-ins so that the language approaches the same power level as SNOBOL4 but with nicer syntax.

>>106448661
It is nice to see you in /dpt/ again Sharky. I am hoping to see how elliptic curve is formed in C.

>>106452087
This version is better than this one >>106452008

Thank you Dra/g/ons for reading my post.
>>
i want to grind 2 languages that will be useful in the future career wise. python and rust? i dont think i want to learn too much and be a software dev but maybe could where i feel like python and rust would be good.
>>
>>106444081
outdated xeon users on suicide watch
>>
Is there some script to update all my Qt connections from the old syntax with macros to the new one with function pointers?
>>
>>106452642
No languages will be useful in the future for careers. AI is going to replace all wagies.
>but muh super special low level programming knowledge
Great. You'll get an extra year before AI replaces you which people doing web development won't get. You still are not immune and programming is still not a long term career prospect anymore.
>>
>>106452642
python is a given but why rust? Why any systems language for that matter? 80% of people who learn rust then try to do webdev which is retarded.
From your post, the only possible need would be c++ for game dev, but even then I'd tell you to learn C# or the godot lang

It all depends on what
> will be useful in the future career wise
really means
>>
>>106452642
Verilog and become an ASIC designer. There simply isn't enough open source HDL code out there to train an LLM on.
>>
>>106452829
>>106452839
>>106452954
yeah i shouldve been more specific. i think cloud stuff has a future. at the end of the day even ai is going to be using cloud to host what it writes lol. so scripting languages like python, some bash and ive heard that rust is becoming popular in cloud as well.
>>
Codex is amazing. I can feel it stealing my job away
>>
cleaning up a mess today
https://github.com/sky-cake/ayase-quart/commit/de8744466a8e16db8fb2cd5c66a96e910d52e03c
>>
>>106454218
>boards = form_data.get("boards")
Avoid raising "KeyError"
>>
>>106453009
>i think cloud stuff has a future.
I agree, but not for reason you stated. Simply because humans will be necessary "in the loop" for incident response. Whenever reliability and responsibility has a capital R and tolerance is higher with real time judgment being needed, AI will move way slower in replacing engineers. We'll still need to have some form of compliance and going all cowboy on deployment is going to be a recipe for disaster, so there's that. In short, any critical infrastructure, regulated fields (medicine, finance, legal etc), maintenance (telecoms, grids), people will remain essential.
>>
>>106439090
Your compiler should have a cpuid builtin.
>AVX could speed up parts of my program by a 8x
Unlikely. When you actually benchmark, the gains will probably be more like 15-20% over SSE2 for real work but compilers can be really bad about optimizing for anything higher than SSE2 since the costs/optimizations aren't tested as much. march=AVX2 may be slower than your baseline flags.
SSE family feature support after SSE2 is not consistent and can't be relied on because a lot of AMD CPUs did not implement extensions. There are only a handful of instructions worth using as a lot of them are very slow, best to focus on what speeds up the implementation like the BMI extensions, popcnt, clmul, and so on.

Focus on SSE2 as a baseline since that's what most languages target, x86-64-v1
https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels

Every x64 cpu has SSE/SSE2. Then work on an AVX2 implementation if necessary, and AVX512 if you have CPUs that can run it but it's probably not worth investing in until we all have AVX10 chips. You can look into Google's Highway for ideas about dynamic dispatch.

>>106444081
This is plain wrong.
AVX is practically useless without AVX2 and support for AVX2 is not widespread even with modern CPUs. I'm not aware of any dynamic dispatch that targets just AVX and wouldn't trust the assembly generated for a compiler that does that since it's so limited in what it can do.
>>
File: 1755245862902700.png (668 KB, 1364x1777)
668 KB
668 KB PNG
>>106454379
ohh, code review, thank you!

In this case, boards is a mandatory key, so something should break if it's not in the form data. Why? Cus with asagi schema, each board is a table.

Checks are done via wtform validation prior to this
>>
>>106454467
>AVX512 if you have CPUs that can run it but it's probably not worth investing in until we all have AVX10 chips
this is wrong afaik

AVX10 is the same as an AVX512VL instruction stream
>>
>>106454513
What's wrong about what was said? You don't have a CPU with AVX10, the first of them will be Nova Lake with 10.2. Widespread adoption of those CPUs will be another 10+ years.
>>
>>106454479
That's great, but in that case you are raising 2 different exceptions. ValueError if there is a value thats not a string/list_string, and KeyError is the value is not there. This will be confusing in the long term. Use .get which will return None. It will still raise the exception, but it will be a consistent exception in all cases.
>>
>>106454547
What's wrong about what you said is that we have to wait for AVX10 to care about AVX512 programming but that is just not true.
All current AVX512 chips are AVX10 because they all implement AVX512VL.
AVX10 is orthogonal with AVX512, and it's the same EVEX-encoded instructions. Nothing really changes when an "AVX10" chip comes out except maybe a chip that only supports a subset of the AVX512 features we're all already using. Rather than assuming all chips are 512-bit, a 256-bit chip may come out that produces an exception if you try to do 512-bit arithmetic on it. That's the only _real_ difference.

You can write AVX512 code now and it will work on current AVX512 chips and AVX10 chip.
AVX10 does not even introduce any new instructions, it just introduces better CPUID flag detection and consolidates the culture of what's already out there.

Currently, 18% of steam users have AVX512.
https://store.steampowered.com/hwsurvey
>>
>>106454685
>a 256-bit chip may come out that produces an exception if you try to do 512-bit arithmetic on it
intel was btfo on that, 256 has been dropped
>>
>>106454685
>What's wrong about what you said is that we have to wait for AVX10 to care about AVX512 programming but that is just not true.
I was suggesting focusing on widespread adoption before more niche targets. You're pedantically misinterpreting what I said as a general suggestion in a hobbyist thread.

A beginner should start with SSE2 to learn to think in SIMD, and then work their way up to AVX2 and eventually AVX512. There's still such low adoption and high performance variability (throttling on older CPUs) of AVX512 CPUs that unless they have a server/HPC type application then there's little value in learning it.

In the Zen5 benchmarks I saw, AVX2 is faster than AVX512 but uses more power. So AVX512 is more suited to power efficiency in data centers. There's little value in regular people writing AVX512 code today and the skills you learn now will easily be transferred to writing code for future extensions.
>>
>>106455026
>AVX2 is faster than AVX512
NTA but that isn't really the case, but you have to be very compute bound to benefit from the extra vector width (the new instructions and masking are cool though)
>>
>>106454467
>compilers can be really bad about optimizing for anything higher than SSE2 since the costs/optimizations aren't tested as much
For what reason? bad instruction selection? bad register allocation? bad auto-vectorization?
>>
File: 71SfpfHpbvL.jpg (136 KB, 1500x1500)
136 KB
136 KB JPG
I've become so incredibly un-sharp over the years since I don't program like I used to.

I come to you, hat in hand. What should I start doing to feel like I'm doing my best? Am I just getting old?
>>
>>106455725
we are all getting old.
we will all be left behind.
>>
>>106455768
hagramming...
>>
>>106455725
You should stop inventing excuses like age and also stop wanting to feel like you are doing your best
Find some fulfilling and concrete project to do
>>
>>106453009
>i think cloud stuff has a future
lots of things do
the balance between putting compute in central locations and distributing it to everyone has always shifted back and forth, but neither is going to completely dominate the other; both are useful
>>
>>106455725
>I've become so incredibly un-sharp over the years since I don't program like I used to.
The other day I wrote some code that I'd been putting off for over a decade. It was tricky, but nothing like as tricky as I'd feared; I really shouldn't have delayed this for so long.
The best time to do something has often passed, so might as well get on with it and do it now.
>>
File: s.png (21 KB, 726x119)
21 KB
21 KB PNG
>>106455725
you were never sharp
>>
>>106455658
A multitude of reasons but generally due to little demand and there's plenty of other work for compiler devs to do.
Compilers target a generic CPU and virtually schedule instructions that you opt into accordingly. Micro-architecture differences account for some of it and the theoretical calculations clash with the reality of hardware and memory. Number of available ports can change over the years and in some cases the microcode for an instruction may be a very inefficiently implemented sequence (I forget which instructions these were on AMD Zen but it was recent and they weren't even particularly exotic). The story on ARM is even worse with how different the micro arches can perform.
AVX introduced complications with power and frequency scaling on Intel that I think have mostly been resolved, but there's also been issues with speculative execution that have resulted in mitigations.
Very few people inspect and report performance bugs. They tend to use march/mtune, and those cost tables can be still sub-optimal.

There hasn't been a coherent feature set to target beyond the baseline requirements of x64 processors (maybe x86-64-v2). Intel still produced Pentiums and Celerons without AVX as late as 10th gen (maybe still does?). Very little general programming benefits from extensions beyond SSE2, and the people who need to use those instructions are already compiling with them or doing dynamic dispatching based on what's detected (video, image, audio, 3D, computing, etc.). If you could guarantee every CPU sold after Haswell had AVX2, it'd be a different story. Instead, Intel splintered everything.
>>
>>106456199
Thank you for the effort post anon.

If performance matters, the user shouldn't have a problem to download the build for his specific architecture, and the software team shouldn't have a problem to make several builds.
Concerning compilers, I don't see a scalable alternative to them having a little microbenchmark tool to run on each architecture to measure the real latency and throughput of each instruction and produce a profile file. Then, have the compilers implements the code generation algorithms from the literature than can get the most out of the microarchitecture profiles.
>>
>>106456199
>Very little general programming benefits from extensions beyond SSE2, and the people who need to use those instructions are already compiling with them or doing dynamic dispatching based on what's detected (video, image, audio, 3D, computing, etc.).
TL;DR programs that need performance (most programs like web browsers, media viewers and editor, web servers for live streaming and parsing AKA "very little") already account for the available featureset and programs that don't focus on performance don't need the performance.
Good take huehuehue.
>>
File: out.mp4 (3.95 MB, 928x612)
3.95 MB
3.95 MB MP4
>>106438619
>what are you working on /g/?
Phase change and criticality
>>
File: 0001-010.jpg (325 KB, 1124x1600)
325 KB
325 KB JPG
novice programmer question, I have a big file with a bunch of functions that I want to break into separate files for readability's sake, i.e. a.c/a.h: aa(), ab(), ac(), b.c/b.h: ba(), bb(), bc()...
The problem is that some of these functions depend on one another. It's fine when everything is in one .c and one .h, but once I separate these out I end up with circular dependencies. I can put the offending function declarations in their own header file and include it in all header files, which works, but is counter to the organization I was trying to achieve. I can also put a bunch of externs at the top of each .c file, which seems to work. What's the elegant solution?
>>
>>106457728
cat the .c files into a single one when building the program
>>
>>106457728
a function in a .c file can call any function of any other .c file, as long as the called function is declared, ie it's declaration is in one of the header files #included in the .c file where the caller function resides
>>
>>106438619
I'm studying the Motorola 68000 family of microprocessors, with the goal of developing software for my old TI89 Titanium graphing calculator.
It's a slightly less capable microprocessor, but it's actually possible to find hardware specs, instruction set info, etc, for it, unlike the mystery meat SHA4A-ish thing in my Casio.
>>
>>106457728
tl;dr Forward declarations.
>>
>>106457807
>>106457865
I'm aware
>I can put the offending function declarations in their own header file and include it in all header files
>I can also put a bunch of externs at the top of each .c file

I'm asking if there's an elegant or common practice
>>
>>106457886
That's how it's done in C and that alone is not terribly inelegant. What's inelegant is the consequences of the inexistance of namespaces. Either the header of the library include every/most internal types and functions and pollutes the namespace of the user, either you have a splitted private/internal and public/external headers to try to only export interface functions and types, but in this case you can't have the exported type, likely structs, can't have a field of a private type. Either the private type must be included in the external/public header causing namespace pollution, or you rely on casting.
Or you give up on namespace pollution and function and type names with very long prefixes.
>>
File: file.png (91 KB, 831x613)
91 KB
91 KB PNG
use case?
>>
>>106458026
I stopped giving a shit about the rationale of Perl's semantics and decided it was garbage. You should do the same.
>>
>>106457886
Either you use the public header file and spread the implementation across as many source files as you need or you declare an _internal header file which you never include in other header files.
>>
>>106457886
Sorry bro, it's C. You're going to have to live with some low level jank .
That doesn't have to be a bad thing, though, it just has it's own unique quirks like that.
>>
>>106447376
what font is that?
>>
>>106458026
if you want to store typeid in a sorted collection like map or set, unsorted collections were added in C++11 and that's when they also added the hash_code function
>>
>>106457728
Just accept circular dependencies, the linker will resolve those for you
>>
Playing around with compression
>>
>>106459163
just don't compress too much, or you might never wanna take your programmer socks off!
>>
File: 1756760266456191.webm (3.82 MB, 1138x640)
3.82 MB
3.82 MB WEBM
Fixed wall backfaces not drawing and the starting position issue where you sometimes spawn in a wall.
>>
https://www.youtube.com/watch?v=mop6g-c5HEY

How is this humanly possible? This is an 18 hour video with a human non jeet speaking and it's completely digestible.
>>
>>106459571
Practice? The guy is legendary for his 5 and 7 hour gamedev tutorials.
Also, multiple sessions, then put everything together at the end.
>>
Anyone here that transitioned out of SWE into an cybersecurity or devOps/architecture role or even netoworking role?

I've been coasting for the past 5 years in a dead-end IAM Operations position, the only programming I've been able to do on the job is some python scripting and spreadsheet management with Pandas. I like programming but I think I've romanticized working as a developer, and perhaps would find it better to just do it as a hobby and to support any other role that I may have. I am now trying to transition to a different role, I'm thinking about going deeper into Cybersec, aiming to something like a Security Engineer or a DevSecOps role, but I still have this nagging feeling that I had when I was a kid of working as a developer.

Anyone have some perspective on SWE? Do you like it? Do you think it's fulfilling and worth perusing? Are most SWE jobs trying to decipher spaghetti code and/or building the same enterprise applications?

Like, I like programming, I'm reading a book right now on implementing a tree-walking-interpreter and then a VM, I think it's fucking cool to build stuff like that and understand how shit really works under the hood, but I'm assuming most generic SWE jobs don't have you working on cool shit unless you have years of experience and are able to specialize in a niche filed like computer vision or whatever the fuck.
>>
>>106451347
Should it?
>>
How big should something be to make pass by reference preferable to pass by value?
>>
>>106460297
If you have to pull the entire object in to cache anyways then a reference saves you nothing, if you are pulling in an entire object just so you can read one of it's data members, a copy evict a lot of stuff out of cache which is bad.
>>
>>106460297
You're a big value.
>>
File: screenshot.png (928 KB, 1280x720)
928 KB
928 KB PNG
Today I will remind them.
#![no_std]
#![no_main]

use core::panic::PanicInfo;
use core::arch::asm;

#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}

fn main(msg: &str) {
unsafe {
asm!(
"syscall",
in("rax") 1,
in("rdi") 1,
in("rsi") msg.as_ptr(),
in("rdx") msg.len(),
options(nostack, readonly)
);
}
}

#[unsafe(no_mangle)]
pub extern "C" fn _start() -> ! {
let msg = "I'M GOING TO CHOP MA BALLZ OFF!\n";
main(msg);
unsafe {
asm!(
"syscall",
in("rax") 60,
in("rdi") 0,
options(nostack, noreturn, nomem)
);
}
}
>>
>>106461031
perl has inline assembly now?
>>
>>106461109
>perl
Had inline assembly as long as it had inline C.
>>
>>106438619
Started working on a CLI to streamline some stuff I've been doing manually at work and I've got to say: I HATE DECORATORS IN PYTHON

The flow in every function involved having a try and except block, to catch invalid inputs, etc, so I decided to try using a decorator to reduce that boilerplate and this shit is like 2 nested functions/wrappers deep... I don't understand how this works at all.

I even asked ChatGPT for help but it just came up with unmaintainable garbage
>>
>>106461187
>filtered by input validation
Holy mother of all nocodeshitting.
>>
>>106461204
well I wouldn't say that
I handled all the exceptions and had nice logging and there was a whole logic side of the project I made which functioned like library code and had unit tests too!

I've just never heard of or used decorators before
>>
How bad is market now? Is that possible for 30+ junior find any job?
>>
File: 1756775648181448.png (1.1 MB, 1440x1250)
1.1 MB
1.1 MB PNG
>>106461961
This is a maidposting site and nobody here has a job or wants one. We are maids, not wagies.
>>
>>106457554
Had to be done
>>
File: my avatar.jpg (799 KB, 1440x1250)
799 KB
799 KB JPG
I am the blackest and most retarded nigger this board has ever seen by the way.
>>
File: Horned maid.jpg (299 KB, 850x1202)
299 KB
299 KB JPG
>>106462284
Please be polite when posting to the Dra/g/on Maid Board. Remember that everyone posting here is a cute maid who likes computers, just like you!
>>
File: my avatar.jpg (799 KB, 1440x1250)
799 KB
799 KB JPG
>>106462738
kill yourself
>>
File: Maid1.jpg (312 KB, 850x1283)
312 KB
312 KB JPG
>>106462763
We both know that when you sit in silence, you can faintly hear Blue Sky Rhapsody on the wind. The age of the maid is here. Maids are inevitable. Even former chudjaks woke up and realized that childish, directionless rage and hatred of everyone not like you is not a real personality or identity. It gives you no purpose. Those former chudjaks are now all wearing maid outfits and conducting advanced Mathematics and Computer Science research. That childish directionless rage has been replaced by a peaceful desire to wear a maid outfit, do heart hands, be nice, and make advanced Mathematics and Computer Science research. Aimlessness replaced with unified drive.

>Instead of doom I'll make flowers bloom for everyone around to see
>>
File: 1756511922453219.jpg (160 KB, 1284x1380)
160 KB
160 KB JPG
Trying to quit my well-paying normie job in Ad Tech to do something I actually give a fuck about for less money
>>
>>106462850
elaborate on "trying"
>>
>>106462850
its worth it, but i hope you already own a house.
>>
>>106459800
bruh it sounds like you're already doing devops
>>
Is it redundant to have a YAML configuration file if I am gonna have only 3 nodes ? I currently just use a constants file.
>>
Working on making an ASCII globe CLI program compatible with Conky for my rice. I'll be sure to share the source code once I am finished.

I've already added a command line argument that makes it send a single frame to stdout and then exit, meaning other programs can pass arguments to generate and consume specific animation frames.

You'd think feeding terminal text output to another program would be easy, but they are doing a lot of weird shit to dynamically space/resize the globe based on terminal size. And the weird shit garbles the output when you view it as plain text.
>>
>>106463799
Although, even after making the globe compatible with Conky, there are still more refinements that can be made.

The globe doesn't actually use geographical coordinates, but instead plain 0.0 to 1.0 geometrical coordinates to map the globe. Could add a lookup table or conversion algo that lets you pass in actual geographical coordinates to the globe.

And then with that you could do things like mark special geographic locations with special colors.
>>
File: clouds.webm (3.77 MB, 711x400)
3.77 MB
3.77 MB WEBM
I FUCKEN DID IT FUCKIN CLOUDS MOTHERFUCKERS
>>
>>106463799
Are you using curses for the globe?
>>
>>106464599
Honestly I haven't yet delved into the libraries they are using to format the final terminal output. It might be curses, but I'll have to check later tonight. I'll check the use flags for dependencies and step through the print_canvas function that creates the final output.

Thank you for the tip. I am not super familiar with terminal output optimization.
>>
File: 1753910651496920.jpg (25 KB, 415x436)
25 KB
25 KB JPG
>class templates allow skipping defaulted parameters, function templates do not
>class templates do not have deduction, function templates do
Look, I can understand the standard library being a mess. I can understand the C-with-classes shit being a mess.
How the FUCK is the grammar of templates this much of a mess too? I thought I hit the bottom of the iceberg with ref-qualifier dropping. And yet here we are, more dogshit design literally baked into the language.

It's not enough that templates are impossible to debug and next to impossible to read. They had to stuff a bunch of weird idiosyncrasies into their grammar and behavior just to make this piece of shit take up as much space in your brain as possible. There's no way it's not malignant. Why the fuck are people shilling modern C++? This is so fucking bad.
>>
>>106457554
>>106462282
idk what it is but looks cool,
use vp9 for videos that have noise like that btw
>>
>>106464979
overload resolution i am guessing, which isnt a problem for class templates
>>
>>106464289
what decompilation bugs did you have to fix lately?
>>
>>106465094
Not quite, because class methods don't have deduction either. I don't know if static "methods" have deduction.
>>
>>106465167
IDA barfed on the function initclouds, it made it look like the allowable randomized spherical coordinate angle ranges were much narrower than they should be which resulted on the function just hot looping forever as it tried to prevent cloud spawn positions from colliding.

It also barfed on displayclouds but in the way I was already familiar with that it had barfed on all the other world pos -> screen pos calculations. For whatever reason "xp * scr_size" always gets skipped, this is easy to see when looking at the assembly though.

Anyway, with that most of the major graphical issues are now solved, ROLLER just looks like Whiplash now.
>>
>>106464979
every single thing you said is false



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