[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 / qa] [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: sus.png (431 KB, 600x367)
431 KB
431 KB PNG
sus edition
what are you working on, /g/?

previous: >>103244490
>>
>>103273421
>what are you working on
benus
>>
包含 <標準輸入輸出>

整數 主函數() {
整數 打印結果 = 0;

// 輸出 "你好,世界"
標準輸出 << L"你好,世界!" << 換行;

// 返回結果
返回 打印結果;
}
>>
>>103273505
That makes me wonder, are there like Chinese nationalists that run their own native chinese programming language, or at least a total conversion of C++ or something? Or do they value the ability to steal western programs too much to invest into something like that?
>>
>>103273421
making code simpler, faster, stronger.
>>
>>103273580
pick two
>>
>>103273603
because my workings are backed by parallel universes i can afford all three
>>
File: 1706348482865233.jpg (43 KB, 600x600)
43 KB
43 KB JPG
>>103273603
Elegant. Expressive.
>>
File: japanese dicparser.png (989 KB, 1920x1080)
989 KB
989 KB PNG
>>103273505
>>
>>103273421
Does anyone know how to get the birth time of a file with fstat()? struct stat doesnt have a field for that
    __time_t st_atime;                  /* Time of last access.  */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
>>
File: 2024-11-22_21-17.png (165 KB, 701x1101)
165 KB
165 KB PNG
>>103274074
You have to use statx(2).
>>
>>103274149
Thank you
>>
File: dpt.png (156 KB, 977x593)
156 KB
156 KB PNG
migrate
>>103274214
>>103274214
>>103274214

this thread has prolapsed
>>
File: ebussACK.jpg (41 KB, 540x576)
41 KB
41 KB JPG
>>103274309
attention whore. This thread is already going but you just had to make your own.
>>
>>103274359
.t chinese lisper
>>
He got trips OP you have got to follow that up.
>>
>>103274372
How is it possible for a karma whore to exist without karma? You violate the laws of nature.
>>
learning elixir bros
looks cool so far
>>
anonymous forums were a mistake
>>
>>103274560
Go back
>>
>>103274560
Good thing you're the one paying the price.
>>
I love spreading FUD.
>>
File: 1707905159833536.png (20 KB, 1011x218)
20 KB
20 KB PNG
guys I think this module thing is really starting to catch on
>>
>>103275633
I'm starting to think C++ 20 and up isn't real C++.
>>
>>103275633
Modules are pretty cool but it's non-trivial to port existing projects over and nobody is going to put in the effort just for a minor convenience. And since existing projects don't use them, new projects aren't going to use them either because mixing modules and headers is way more annoying than just using headers.

>>103275646
At the rate they're going they're just going to have to draw a line and create C++ v2.0 within the next 10 years with breaking changes.
>>
>>103275633
I'm waiting for Arch to update clang so I can finally use them
>>
File: 1730651208895553.png (882 KB, 1655x1101)
882 KB
882 KB PNG
>sepples: the language is too big and convoluted, you have twenty ways to do one thing, it all needs to be cut down
>also sepples: modules are going to be sooooo sweet
>>
>(on terminal) go run test.go
>it works
>(in vscode) "Run without debugging"
>doesn't work
>"go.mod file not found in current directory or any parent directory; see 'go help modules' "
No, I don't. Uninstalled.
>>
>>103274412
SLOW
L
O
W
>>
https://lwn.net/Articles/997238/
Is Cosmopolitan /our/ project?
>>
No.
>>
File: 1732363577837.jpg (567 KB, 1999x1124)
567 KB
567 KB JPG
Undefined Behavior is GOOD and it's what makes the world go FAST.
>>
>>103278275
>All way stop
Do burgers really?
>>
>>103278275
nice friendship windmill
>>
File: E2q8BCrDwVM.jpg (6 KB, 220x229)
6 KB
6 KB JPG
>>
File: 1726696633624781.png (88 KB, 412x290)
88 KB
88 KB PNG
>compiler complains when indexing a std::vector with a signed integer
It's over.
I was having fun learning C++ until this exact moment.
>>
>>103278407
Just disable that warning and keep on.
>>
>>103278422
>deletes -Wsign-conversion
We are so back.
I'm sure this will never cause any problems in the long run.
>>
>>103278407
Just get the iterator with begin() then index that
Then it will complain if you give it an unsigned integer and not a ptrdiff_t
>>
File: (Me).jpg (41 KB, 703x675)
41 KB
41 KB JPG
>>103273421
>testing website starter daemon
>fails and fiascos...
>bind() fails with EADDRINUSE
omg fucking god linux fuck you fuck you fuck you
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA THIS FUCKING KERNEL LEAKS RESOURCES
>>
>4shit recompressing the file to be 1.3x the size
>>
>>103278407
just convert it to unsigned beforehand (and throw an error if it's negative)
>>
>>103278534
this is the dumbest shit ever

>>103278407
I do signed arithmetic with unsigned integers, never failed.
>>
>>103278534
I know there are plenty of ways to deal with it, I'm just annoyed that Bjarne had the genius idea to make vector lengths unsigned.
Every solution requires writing more code or turning off certain compiler warnings.
I just want to write int i not fucking
unsigned int i
or
std::size_t i
or index vectors by typing
v[static_cast<std::size_t>(i)]
>>
>>103278609
 #define uint unsigned int 
>>
I'm trying to make a Snakes and Ladders game using a 2d multi array, but my mind isn't comprehending how I can traverse the grid from bottom left to right and then up one level and back on myself.
I'm getting the feeling that a 2d multi isn't the way to go.
>>
>>103278609
Some warnings are so much noise to so little signal that they shouldn't be used. -Wsign-conversion is one of them; it's not enabled by -Wall or -Wextra, so you probably turned it on manually and brought this upon yourself.
Just turn it back off and stop complaining.
>>
>>103278668
Nah I think I'll just cope with making all my index variables std::size_t because I want to write safe code :^)
>>
>>103278690
Well they should be size_t if you want more than 2 billion elements, but size_t comes from C so there's no need for std::
>>
>>103278698
>size_t comes from C so there's no need for std::
Thank god.
I'll take any victory I can get.
>>
>>103278614
>>103278609
why doesn't c++ steal Rust's type designations? u64, f32 and so on are so much shorter yet much more intuitive than unsigned long long or whatever.
>>
>>103278732
Steal it yourself
typedef uint32_t u32;
typedef float f32;
typedef int32_t i32;
// etc...
>>
>>103273818
Holy FUCK, what font is that???
>>
>>103278492
nvm i fixed it
>>
>>103278698
>now realize that I can do a bunch of shit from the C standard library without including them
>can use size_t because <vector> includes <cstddef>
>can use printf() because <iostream> includes <cstdio>
lmao
So much for the std namespace.
>>
File: 1730016040802906.jpg (44 KB, 656x526)
44 KB
44 KB JPG
Are (YOU) ready for Advent of Code 2024?
What programming language are you going to use?
I'm personally gonna use Go or maybe...Gleam.
>>
>>103278899
Be careful. Those headers aren't included on all compilers and they sometimes stop being included in newer compilers.
>t. wasted a few days once adding #includes to old files
>>
>>103278940
Useless post
>>
>>103278635
Just think of it as a grid and use a one dimensional array and calculate the position of the tile/element using f(x,y) = y*width+x
>>
>>103278762
Iosevka
>>
>>103279023
I was referring to the CJK characters.
>>
>>103279007
Yeah that's the conclusion I came too. Ta.
>>
>>103278635
moving up one level is offset - width and moving down one level is...
>>
>>103279035
nagayama_kai

https://www.freejapanesefont.com/nagayama-kai-calligraphy-font-download/
>>
>>103278732
these are not rust's, they were stolen from Holy C
>>
I don't fucking understand this shit
https://electowiki.org/wiki/Allocated_Score#Python_implementation
Who the fuck decided to use pandas to write that shit?
>>
>>103279436
"High level language"
>>
>>103273421
Does anyone have a clue what the fuck might be going wrong?
// Getting EADDRINUSE on bind()

int srvlistener = socket(AF_UNIX,SOCK_STREAM,0);
int addrlen = strlen(ROOTSRV_SOCKET_PATH+offsetof(sockaddr_un_t,sun_path));
sockaddr_un_t* srvaddr = calloc(addrlen);
srvaddr->sun_family = AF_UNIX;
memcpy(&srvaddr->sun_path,ROOTSRV_SOCKET_PATH,strlen(ROOTSRV_SOCKET_PATH));
int true = 1;
setsockopt(srvlistener,SOL_SOCKET,SO_REUSEADDR,&true,sizeof(int));
bind(srvlistener,srvaddr,addrlen);
listen(srvlistener,SOMAXCONN);

ROOTSRV_SOCKET_PATH is not a live file so the "another process" possibility is out of the window
Yes, it stopped working, for some reason
>>
oh my fucking god the parentheses around strlen i will cut my veins
>>
>>103279517
que?
>>
>>103279517
Lisp doesn't have this problem.
>>
Java > C++ > Rust
>>
>>103279507
>SO_REUSEADDR
It might take a couple seconds or more for the kernel to free the address. Just try again.
>>
>>103279507
Do you possibly have a version of this program running in the background still bound to the socket?
>>
>>103273421
Using python and subprocess, I want to replicate expect scripts.
However my script "hangs" whenever the output of the opened program isn't immediate.

I found about asyncio, but apparently not all commands and libraries are compatible. I asked chat and it suggested to use select.
What solution is the right one?

Which one should I prioritize learning, if I also want to write simple curses tuis?
>>
File: 1705697112833548.jpg (76 KB, 639x595)
76 KB
76 KB JPG
My IR language has more than 256 ops so it can never be a proper byte code
>>
>>103280467
read up on utf-8
>>
>>103280522
>first 128 characters use one byte
>after that it's at least two bytes
That's even worse.
>>
>>103280538
even worse than what?
>>
>>103280538
but then second character gives you another 2^5-1+2^6-1-(2^4*(2^2-1)) characters
>>
I am retarded its just initial_128 +(2*5-1)*(2^6-1)
>>
File: 1712153814379697.jpg (140 KB, 675x675)
140 KB
140 KB JPG
Can't wait for C++ reflection so I can have a dynamic vertex array. You give it a struct and it creates the attributes automatically based on the fields.
>>
>>103280725
You could already do what you want with templates (or without but at runtime). Reflection is shit and the only use will be fixing the million fucking missing features that the committee have no interest in tackling.
>>
>>103280603
Than using all 256 combinations in a byte.
>>
>>103280761
>You could already do what you want with templates
Really? How?
>>
>>103280799
First you understand that you don't need a literal struct with named fields.
>>
File: Sim-Racing.jpg (758 KB, 2983x1767)
758 KB
758 KB JPG
I'm not a programmer but I just build a VR sim racing rig, but with my GPU (Radeon RX 570 ARMOR 8G OC) I only get 20FPS on the low.
What can I do to reach a higher FPS?

Maybe with a linux OS that is optimized for it? I mean the pc is only going to run assetto corsa nothing else.
Any tips would be helpful, thanks.
>>
>>103278931
I'm not really ready but I installed gforth and am reading the tutorial.
>>
>>103273421
Trying to understand CLIPSPy for my expert systems class, but I'm having issues grokking simple stuff like "how do I reference a templated fact if I don't know what order it was asserted in". I need to compare two objects to determine compatibility functions for each attribute, but am unclear how I can do so...
Also, 900 second captcha time, wtf /g/
>>
>>103273421
>>
File: 235235.jpg (138 KB, 683x817)
138 KB
138 KB JPG
>>103280818
>>
>>103280818
unique_ptr or not unique_ptr? How significant is the overhead?
>>
>>103281478
Shit. Didn't mean to reply.
>>
>>103281445
If this is the hill you die on you will never have what you want. This is why 99% of reflection uses will be completely retarded.
>>
>>103273505
https://www.youtube.com/watch?v=VN-DG5MgDy0
>>
>>103278407
in rust this is just "as usize"
>>
>>103278407
if you think thats bad
try working with unsigned in c#
>>
>>103278407
source of countless bugs i've found when porting c and c++ to rust. suddenly understood why some programs never terminated

make sure to use the fixed size types in cstdint too
>>
multithreading is a meme, modern cpus are fast enough that it's unnecessary
>>
>>103273421
Is doing userspace development on top of a kernel debugger insane? I mean i seriously cant keep shotting for fish in the fucking ocean, I am getting errors some times and some others not with no difference in code and system, aside from whatever the fuck might be going on in the linux kernelspace, which i am supposedly preventing from messing my code by passing the appropriate options, this is madness.
>>
>>103282550
true, for the things where that is the case, false for the things where it isn't.
>>
>>103282577
what does "on top of a kernel debugger" mean?
>>
>>103282597
I stand on top of the kernel debugger and perform like a clown.
>>
>>103282550
Registry dumper, singlethreaded: 30 seconds.
Registry dumper, multithreaded: 7 seconds.

But sure, enjoy mediocrity.
>>
>>103282676
>my implementation is shit
>this is the CPU's fault
do not redeem, sir
>>
>>103282710
Stop projecting your mediocrity onto your betters.
>>
>>103282731
but you literally just quantified your incompetence
>>
File: 1620080668772.png (521 KB, 550x650)
521 KB
521 KB PNG
>>103282753
>stop doing x
>>does x
>>
>>103282597
i run a vm with a kernel debugger and whenever i am making a system call i click next at the kernel level
>>
>>103282550
>Here's Why Using Your CPU More Efficiency Might NOT Be Good...
>>
>Multi-core concurrency/parallelism
>SIMD parallelism
>Instruction level parallelism
>Distributed parallelism
What's next parallel sisters?
>>
>>103283202
Distributed heterogeneous parallelism is endgame
>>
>>103283235
Isn't that just a guild
>>
File: apb_abuse.png (126 KB, 711x1179)
126 KB
126 KB PNG
>>103283202
bit level parallelism
I'm learning Verilog and pic rel may be the greatest abuse of APB ever invented.
>>
How many transform buffers are you supposed to have in a game? 1? 2/3? Number of concurrent frames? Do you have to update all of them when you move something? How do you apply a partial list of updates?
>>
>>103280869
turn down the eye candy or upgrade the gpu, the kernel cant change how the game uses the gpu, also if you are using CSP (you probably are) make sure extraFX is off as it takes a LOT of gpu
>>
>>103283327
that's just boomer SIMD
>>
>>103283327
that's just swar
>>
>>103283590
>SWAR
What a stupid fucking name normal SIMD is within a register too
>>
>>103280338
>What solution is the right one?
The pexpect package.
The problem is most likely that the other program is buffering its output because it's writing to a pipe (common!) so you need to use a virtual terminal so that the program thinks there's a user waiting immediately for the output. That's what expect and pexpect do for you behind the scenes. (Technically you could do it all yourself, but why bother with all the annoying low level details?)
>>
>>103273421
Today I accomplished nothing
>>
>>103284366
its saturday so thats ok
>>
why does he wear a little hat
>>
>>103285096
Mental illness.
>>
>>103285096
Why aren't you wearing a little hat?
>>
>>103285096
>The fez was a symbol of Arab nationalist resistance against the Zionism
oy vey
>>
>>103283327
# load_fpga.sh
real 0m 0.48s
user 0m 0.00s
sys 0m 0.14s
# /bench
1000000 reads in 133582230ns, 133ns for each

Damn, reading an FPGA register is s l o w.
>>
Trying to play around with SDL, but trying to get anything done with C or C++ is sapping my will to live.
>>
>7 seconds to... read some text
yea sounds fast anon
>>
>+400 MiB alphanumerically sorted keys and values as strings, integers, and hexdumps is "some text"
I just wish your ego defense mechanism wasn't so painfully obvious.
>>
7 fucking seconds
do you not understand how long that is
>>
No.
>>
>>103278732
#pragma once

#include <cstdint>

using u8 = uint8_t;
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;

using s8 = int8_t;
using s16 = int16_t;
using s32 = int32_t;
using s64 = int64_t;

using f32 = float;
using f64 = double;
>>
>>103273421
Me make AI do thing
>>
>>103286608
>me
>AI comments
>>
File: 1701211858378680.png (507 KB, 1070x601)
507 KB
507 KB PNG
wtf I memorized all the c++ core guidelines but I still feel like an imposter
>>
>>103273567
China is trying to push their OS and language to get off western dick. But it is pretty unpopular far as I know.
>>
>>103286648
> Can't distinguish AI writing from human

F in chat for this anon's brain
>>
File: Capture.png (12 KB, 435x197)
12 KB
12 KB PNG
Why do I keep getting this error?
>>
File: 1705090618471851.png (335 KB, 633x758)
335 KB
335 KB PNG
>black text, white background
how do people live like this
>>
>>103287297
Bossman says that dark mode lowers productivity
>>
>>103287297
https://github.com/systemd/systemd/issues/14495
you don't need to see that
>>
I really like the simplicity of CGI (Common Gateway Interface), considering how easy it is to use any language and get it up and running. Spawning a new process for every request is braindead but I don't think it really matters unless your website gets a lot of traffic, and when you get to that point it's worth spending some time to migrate to something like fastcgi.

Anyone here still use plain old CGI?
>>
File: part_of_the_problem.png (397 KB, 828x683)
397 KB
397 KB PNG
>>103287545
>I don't think it really matters
>>
>>103286857
if you aren't making your own frontend lang to C++, are you even a real C++ dev?
>>
>>103287614
Spawning a new process for every request might still be faster than using some python/js/... http server
>>
File: 1718812666390334.webm (391 KB, 532x302)
391 KB
391 KB WEBM
How long would it take to learn to program something like this?
>>
>>103287656
Sure, bullshit may be more disgusting than cat shit, but at the end of the day it's still crap.
>>
>>103287804
>embedded systems dev
idk maybe 15 years or so?
>>
>>103287804
Depends on the platform. On embedded with a low level language? ~1 month. Unity? ~2 weeks. Pygame? ~1 week
>>
>>103286517
might use this but postfix them with _t for consistency with the standard library
>>
>>103287614
Objection noted but you're far more optimistic than me that my shitty web project will get more than a few requests in a day, if even that. You're also very optimistic to assume that this project is going to outlive the end of the next month kek.
>>103287656
I feel like by the time a website would get enough traffic that CGI causes a serious problem you would have already migrated to something else. I did try it with my language of choice and page generation time is around 1ms with a simple page template and there's plenty I can do to even reduce that further if needed.
>>
>>103287892
>you're far more optimistic than me that my shitty web project will get more than a few requests in a day
You best care about scalability when you don't have to yet. Once it's too late you'll focus much more on maintaining backwards compatibility with existing systems.
>>
>>103287841
>consistency with the standard library
standard library uses _t to avoid clashes with user defined types
>>
>>103287804
pygame in an afternoon
>>
File: 1715351743234495.png (419 KB, 900x776)
419 KB
419 KB PNG
>>103287804
programming that is easy but you won't still make it
>>
File: 1704342001736434.png (195 KB, 640x513)
195 KB
195 KB PNG
I have never written a program that bothers handling command line arguments
>>
>>103287927
can't have scalability issues if people don't visit your website.
>>
>>103287999
Alright, don't say I didn't warn you.
>>
>>103287804
>learn
If you can already program in C or C++ and have a bit of knowledge about graphics in general it's like a few days tops assuming you already have all the assets you need.

When I last made a game I spent 80% of the time creating the assets, 10% time programming and the other 10% fighting with the tools to get it to compile for another platform.
Trust me when I say this: never write a game in Haskell if you need it to run on anything other than desktop Linux.
>>
you know, it's weird, I've checked out a shit ton of paid and free resources for learning c++ and I think the best introduction is the microsoft documentation and I don't even know why they bothered to write it
>>
>>103288421
>I think the best introduction is the microsoft documentation
>meanwhile NtClearEvent remains undocumented
>>
>>103288444
In Windowsland syscalls are considered volatile and you're not supposed to directly call them, bruh. There's no guarantee they won't change next week when your computer reboots itself to install a Windows update.
>>
>>103288459
Nah, they'll just ship a shim. MS has always been ballless.
>>
>>103288459
Also I haven't updated my system in three years.
>>
>>103288499
I'm still on XP
>>
I'm building my future in this company.
In VBA what is the best way to check if same row exists in a 3D array? In the end I need everything once with reference how to find the rows values later from another array.
I dont know much about real coding, but I was thinking getting hash of the row and then adding the values to collection with the hash as key and adding same hash to some column of other array. Collection can only have one object with same key, so that would also be the fastest way to remove dublicates. What is the easiest/fastest way to get hash of the row with 2 dimensions?
>>
File: 1675714760423382.jpg (23 KB, 255x222)
23 KB
23 KB JPG
>>103288844
>future
>VBA
>>
Anything that describes itself with an adjective is shit.
>>
>>103288883
Yes. I dont know if it's a bright future, but could result in a bit of job safety. I should probably remove comments from the code before I add easy to use GUI (GUI 100% in Excel sheets)
>>
I fucking love C++ bros
>>
>>103283463
Thank you so much

>CSP (you probably are)
Yes apparently I am, did not know that existed.

>extraFX is off
It was also on.

Right now I'm waiting on a SSD instead of a HDD to do the install on.
But I'm wondering, can I buy another GPU that's the same to get more power or is it not possible to run 2 GPU's with AC and Quest VR I really can't much on google.
>>
>>103278275
>normies: politely agree on who goes firsts
>russians: get out and fight
>4chan autists: avoid eye contact and starve to death
>>
I heard opinions from people who work for a long time (talking 5-10+ years in programming) and they said that in 5 years there will be no coding with AI.

Thoughts?
>>
>>103289434
currently, AI is just fancy auto-complete. unless some new revolutionary ideas appear, nothing will change for coders.
>>
>>103289434
In 5 years, AI will probably replace all the lazy code monkeys. If someone is an actual programmer, that is learns what happens in the industry, adapts, learns new tools and improves himself, he has literally nothing to be afraid of.

You might as well be bitching that you code in JS but then some web dev framework like React came along and made your pure JS job/skills more useless.
>>
>>103289434
AI is quite neat as the "rubber duck" to explain your problems to, and to ask it to check if a function you wrote does what you want it to do and find any obvious bugs

>5-10+ years
you could have optimized that to just 5+ years
>>
I used to want to be on the leading edge, trying all meme frameworks.
Now I barely use anything written later than 2015 or so. It's surprisingly comfy
>>
>>103289344
gay
>>
Editing the commit dates on my project to make it look like I wrote a compiler in Rust in 2015 before it was popular and before ChatGPT
>>
>>103289760
for what purpose?
>>
>>103289928
To make their lies more believable, getting the paycheck isn't so easy anymore.
Still it's basic tranny tactics.
>>
>>103289928
Getting a better job
>>
File: rust_jobs.png (27 KB, 531x351)
27 KB
27 KB PNG
>>103289987
but why choose rust when you want a job?
>>
>>103290013
he is already employed as shill, he doesn't need another job.
>>
>>103278275
This is even more retarded than roundabouts.
>>
>>103290013
Try searching for "cleaner" or "waiter" and you'll get even more results. Retard.

Retard also because you don't understand supply and demand.
>>
>>103290366
there's no demand now, retard
>>
>>103290013
I've unironically interviewed for some of those Rust jobs, It's always "Rust+Go+Python+C" because their stack is fragmented as fuck because they either bandwagoned everything for the last decade or they're covering up the deficiencies of said languages.
>>
>>103290453
More like right tool for the job ;)
>>
>4 languages
>fragmented
Jesus Christ nobody here has ever worked at a real company
>>
>>103290508
it's all neets and underage larping, hence how much they jerk off about c
>>
>>103290508
American? a vast majority of European companies are built in Java/C# with a smattering of Python if they're Fintech/AI.
>>
>>103290571
Euro companies be like
>TSO, JCL, REXX, RPG, RACF, SAS, JSP
>DB2, AS/400, z/OSMF
>€50k/yr
>>
What are you working on?
>>
>>103290861
making some utility functions into a library that I have seen is lacking from c11 + POSIX.
>>
>>103290370
>too stupid to understand the point
You won't get a job, even as a cleaner at this stage.
>>
>>103290654
>>DB2, AS/400, z/OSMF
kek
>>
If you're looking for programming help beyond the basics, stay the fuck away from reddit. I swear it's bots just regugitating the first non-answer they came across on Google or ChatGPT.
Worst off all I can't downvote them, despite not doing anything political, except lurking at certain subreddits... that degraded to focusing more on trans people.
Fuck Preddit.
>>
>>103291335
Go back
>>
c++bros, what are some good projects to learn low level stuff?
>>
>>103291548
>think of a simple card game or board game
>code that
>>
I'm doing cannibal and the missionary game for a college homework in CLIPS( zero knowledge in clips).
>>
>>103291548
Build an emulator (chip8 for a simple one) or a file format interpreter. Learned the most I ever did by reverse engineering a DBMS format and generating files for it.
>>
I'd love it if (you) could recommend me some good programming books that cover how to actually build a program from the ground up.
Basically I can code, and if given a language and a problem I can build the logic to solve the problem. But that's just coding, it's not really programming, it's like a subset of that skill and I'm somewhat stumped at how to scale up from there.
I have written a few "programs" that do specific stuff and shared a few on github etc., but all of them are basically software that does one specific thing and all of them are either CLI programs or modules to be used by other programs. If I want to make an actual program, I have no idea how to even consider that. I guess I'll have to learn some frontend first, but also stuff like how to design a more complex software from the ground up so you don't notice you have fucked yourself much later is something I have to learn.
I obviously don't expect to be spoonfed, but if any anon has read something that covers either (or both) of these topics and is good, please recommend it to me. I'd much rather read something that's recommended than just google "software engineering" as such...
>>
File: me.jpg (67 KB, 562x1000)
67 KB
67 KB JPG
>>103290654
>DB2, AS/400, z/OSMF
>>
>>103288844
I tried to find if anyone had done anything like this but didn't find anything.
So is the idea retarded? Joining one string from max 100 x 3 array and hashing it for easy dublicate deletion and filtering.
The original problem is that I have those 100 x 3 arrays of data that pretent to be same, but in rare cases are different and cause errors later.
>>
>>103292383
I don't know what a row in a 3D array is. The array is arr[i][j][k] where you do arr[0] and get some value of type a[][]?
If you have that (low) amount of items you can do a naive solution iterating through everything and have it work just fine.
>>
after months of learning python, I started Java this week

does java always feel so clunky?
>>
>>103292695
Yes, sar. But it's better than Python.
>>
>>103292714
different use cases, I guess.
but what's something in Java that's easier/less work than other languages?
>>
>>103292760
Gigantic ENTERPRISE library repository.
You have ENTERPRISE libraries that you download, pin the versions, and never update for 20 years, and they still work.
There's an Apache Something for your use case.
You have Swing (or JavaFX if you feel daring and want to keep up and updooooooot your dependencies and builds) to make shitty UI for your desktop apps, portable over Linux, Mac and Windows, rather than fighting Qt or GTK dependencies for the millionth time.
It just works and has static types.
You can bundle a stripped out of extra shit JVM to the target operating system of choice without making the user install anything (for example, Python). They just unzip and run the file that feeds your jars to the minimal JVM.
tl;dr It just works.
>>
>>103292653
I dont know all the coding terms as I dont work as programmer or have studied coding or speak English natively.
Yes the end result would be 3 dimensional array[i][j][k] and each [i] needs to be unique.
My idea is to get hash of the 100 x 3 [j][k] array before adding it to end of the main array so I can filter out dublicates.
Amount of checks/smaller arrays is like 100k - 250k and the end result would be 3 dimensional array about size 2000 x 100 x 3.
Also the results array becomes close to final lenght pretty soon and unique new rows get rare.
So I would need to do 2000 x 100 x 3 x 250 000 comparisons?
Versus making 250k hashes and and making 2000 comparisons for each?
>>
>>103292695
Java, even with abstraction, has never once lived up to the reputation it has during my use of it. The easiest language by far that I've ever tried to learn. Python started off well but even that becomes unreadable to me at times.
>>
>>103292153
This is similar to asking how much maintenance a used sports car require.
I.e.: if you're asking, you probably can't afford [to learn how to do] it...
>>
>>103292153
cd programdir
mkdir headers
//MKDIR CODE DIRECTORIES
put functions and global variables in code files under the code directories
put headers declaring only public functions and types and globals from those code files under headers/
write a makefile

your typical_header.h will look like:
#pragma ONCE

#include "types.h"

typedef struct{
}something_t;

extern something_t lalala;

extern void blabla_func(int,void*,whatever_t);
extern void ...
...


while your typical_code.c will look like
#include "typical.h"

blablabla



You will come to the realization that everything created after C was a mistake, namespaces are useless in the real world, we prevent symbol clashes at link-time.
>>
>>103292953
in the cyber you dont need money or social status m8
>>
>>103292890
You can use hashes if you want. You have to be careful to remember that two arrays can give the same hash but they aren't necessarily equal.
>>
>>103292953
I don't get the analogy. If I am asking how much maintenance a used sports car requires you'd tell me that it requires a shitton of know-how and time or alternatively the money to pay for that maintenance.
What I am asking is basically just resources on how to go from "I know how to code" to "I can actually make a program" in a somewhat systematic manner rather than just tinkering on my code in the hopes of learning it by myself.
>>103293060
I get that you are at least semi memeing, but I do appreciate it anon, kek.
But I really don't want to be spoonfed or given an example, I want to learn how to do it myself, preferably in a systematic way. If the response to that is (as I suspect) "you're not good enough for that yet" then I just wanted a few books that might get me closer to being good enough.
>>
Redpill me on subject-oriented programming.
So, the thing is, OOP usually focuses on the "Object" of a "subject-verb-object" statement/sentence. I'm interested in what programming paradigms that focus instead on the "subject" or "verb" would look like, but am not sure (though I'm sure verb-oriented would just be procedural programming)
>>
>>103293165
>In computing, subject-oriented programming is an object-oriented software paradigm in which the state (fields) and behavior (methods) of objects are not seen as intrinsic to the objects themselves, but are provided by various subjective perceptions ("subjects") of the objects.
This is literally dependency injection.
>>
>>103293165
This is a dumb question so I will give you FP as a dumb answer
>>
>>103293165
>>103293267
okay and what is adjective-oriented programming?
>>
>>103293287
C++
>>
>>103293081
>in the cyber you dont need money or social status m8

I guess what I'm trying to say, is that it comes down to a niche you've been 'coincidentely' working towards. I detest programming, since it's like woodworking without actually seeing what you're doing. Although AI may change this in the future. The fact there is a lack of some of sort of flowchart AI software out there to help with for/while loop debugging further proves this.
Despite my hatred for programming, the ability to process text and analyze information in a timely manner is truly fascinating and makes me come back for more.

>>103293140
Assuming you got hired for a job based on your neat 'GUI' software, at the end of the day, the project manager is hoping you get the task done as quickly and reasonably as possible. If it takes a highly qualified software engineer 30 minutes to come up with a program, and it takes you 3 hours to do the same, therein lies the problem.
An aspiring hacker, doesn't go around asking 'how do i hack computers (even ethical hacking)', and then surprised they get non answers. You're kinda just born with the 'right mind' to sniff it out on your own.
It's like asking how do I make music. You can try to refine said skill by going to a 'college', but at the end of the day you're on your own.
Another anon said, 13 years old is the ideal someone with a true passion learns programming. As opposed to going to a bootcamp as an adult. I'm not insinuating you did the latter.
>>
>>103293140
>I get that you are at least semi memeing
I am 100% serious... ? lol, I have posted the systematic way, nobody is ever going to tell it to you again (nobody told me), if you dont like it look at how core Linux does things (exactly as i said)
>>
>>103293165
>I'm interested in what programming paradigms that focus instead on the "subject" or "verb" would look like
c C
>>
>>103273505
Chink++?
>>
>>103293132
>>103292890
I went to shower and realized that if comparison fails on first value I can skip the rest, so 90% of the time it would be just 2000 x 250 000 and if match is found I can also skip the rest of 2000 rows.
>>
>>103293343
That may be the most retarded thing I have heard today anon. If you ask me how to learn a language I'll recommend you a language book, not tell you that it's pointless because there are natives and you should have been born in that country.
Also why do you assume it's for a job? There's more to life than raw economic output.
In your frame of reference you can never truly get the feeling of accomplishment from having gained a skill, because you either are born with it or it's pointless in your eyes.
Wanna train so you have more stamina when running? There's kenians that can do it better, so don't bother. Wanna learn how to cook? Pro chefs exist, time to heat up your frozen dino nuggies in the air fryer I guess. I hope you're just shitposting because living like that just seems really sad.
If someone asks me how to learn to make music, I'd tell them to learn an instrument, by learning the notes and how to play simple songs, then start learning music theory and then practice a lot, not tell them that there's a chinese kid who can play the violin since he's 4 so why bother.
>>
>>103293165
>verb oriented programming
That's functional programming. Functions get you from "a to b", but they need an "a" (subject) in order to give you a "b". Your program is basically doing a long sequence of verbs, and verbs defined in terms of themselves and other verbs. (function composition).

In FP you can easily define new verbs for a given noun (datatype). The reverse is difficult. Whereas in OOP you start out with a given set of verbs (that form the interface), and define new nouns having said interface (the implementation). It's all backwards.

http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html

https://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf
>>
On the topic of "verbs" and "subjects" and "objects" in programming, here's a markdown explaining my stupid ideas
https://rentry.org/tg2b2t36
>>
What should I know before college calc to avoid getting filtered
>>
>>103273421
howta get the log2 of a single bit integer fast in x86?
>>
>>103293060
>namespaces are useless in the real world
No, but the blabla in blabla_func works enough as a namespace to avoid most problems; a common prefix stops names from running into each other.
In my first job I had to integrate code from two other people, each of which had their own global Eval() function. That sort of dumb thing is what namespaces are about avoiding. (I had to do some ugly stuff with #define instead to work around it. Horrible. Would have been easier with shared libraries.)
>>
what do if i have an object that owns a unique_ptr and want to return it to the user? reference?
>>
>>103293675
Are the verbs or the nouns more important in a sentence?
>>
>>103294685
You can take a non-owning ordinary pointer from the unique_ptr.
>>
>>103294699
The core of a sentence are verbs because they can illicit emotion or thought on their own, nouns provide additional context
>>
>>103294556
polynomial approximation
>>
>>103294556
do you mean the index of the set bit?
>>
>>103294556
>>103295222
https://en.wikipedia.org/wiki/Find_first_set
>>
>>103295229
>Find_first_set
that's some retarded academic babble right there. the rest of the world calls it bitscan or count[leading]zeros
>>
>>103295229
kino thank you
>>
>>103295246
it also confuses you with isolating the first bit set, eg.
11111110
00000010
>>
>>103295246
Do you have to involve us in your ego defense processes? Can't you do it just privately?
>>
File: 823794.jpg (104 KB, 513x658)
104 KB
104 KB JPG
>>103295286
brutal
>>
>>103294874
You [pronoun] are [verb] retarded [adjective] and [conjunction] ignorant [adjective]. In the preceding sentence, the verb is not carrying significant emotion or thought; the pronoun, as a stand-in for a noun, carries more (though not very much); it's the adjectives that carry most weight.
There is no universal rule, as anyone who's studied language (or literature) properly would know. Your lack of education is showing you up. That's fixable, if you're willing to put the effort in.
>>
Any sepples willing to defend this? I want to make sure I'm doing this gunshot wound of a programming language justice.
>>
>>103295442
nobody defends iostreams
>>
>>103295412
John [noun] was killed [verb] brutally [adverb]. Here the verb is going to illicit a primal internal response while the rest of the sentence adds to that.
Human language is too high level to be examined in this manner, for example adjectives are born of verbs
>ignorant [in regards to...]
aka "ignoring something".

>muh education
A lifespan of study is not going to make up for your subpar intellect.
>>
>>103295459
Make your case then. What *should* I do?
>>
>>103295524
Make what case you autistic retard?
>>
>>103295442
>the games on that std::string
modern compilers are stupidly impressive and you are retarded

>everything else
sepples is cancer
>>
void main() {
System.out.println("Hello, World!");
}
>>
>>103295524
You are the protagonist of a programming manga bro

She doesnt want you
>>
>>103295536
>no answer
Alright, into the primer it goes.

>>103295562
>modern compilers are stupidly impressive
They can't even generate stack frames properly, you nincompoop.
>>
>>103295585
And don't get me started on vectorization.
Fun fact: this version doesn't include a rant about GCC performing a MOVZX for no reason whatsoever. Partial register stalls happen on bigger alias reads, which don't happen here (it's all confined to R8B).
>>
Bitch bitch bitch and this guy will never write his own optimizing compiler. Instead, he will bore everyone else to death with his autism spam
>>
>>103295585
>>no answer
There wasn't a question you dipshit
>>
>>103295655
>moving goalposts (now write your own compiler)
I accept your concession: >>103275160
>>
>>103295670
>>Do people really defend these goal posts?
>No
>>Defend them then.
>No
>>Moving the goalposts I see.
>>
>>103295701
>Do people really defend these goal posts?
Are you being paid to make shit up? I very clearly stated: >>103295524
>What *should* I do?
I gave you the opportunity to say something, and all you did was farting into the microphone. The code and what it's supposed to do is there. Provide an alternative that doesn't suck cock.
>>
File: mpeg2 sequence header.png (86 KB, 831x620)
86 KB
86 KB PNG
>mpeg2 spec
They could have made the optional matrixes byte-aligned but decided not to.
What were they thinking?
>>
>>103295736
what the hell is the mnemonic column for
>>
>>103295746
Magic tricks
>>
>>103295746
I know what you mean
4.6 Mnemonics

The following mnemonics are defined to describe the different data types used in the coded bitstream.

bslbf
Bit string, left bit first, where “left” is the order in which bit strings are written in this
specification. Bit strings are generally written as a string of 1s and 0s within single quote
marks, e.g. ‘1000 0001’. Blanks within a bit string are for ease of reading and have no
significance. For convenience large strings are occasionally written in hexadecimal, in this
case conversion to a binary in the conventional manner will yield the value of the bit string.
Thus the left most hexadecimal digit is first and in each hexadecimal digit the most
significant of the four bits is first.

uimsbf
Unsigned integer, most significant bit first.

simsbf
Signed integer, in twos complement format, most significant (sign) bit first.

vlclbf
Variable length code, left bit first, where “left” refers to the order in which the VLC codes
are written. The byte order of multibyte words is most significant byte first.
>>
>>103295734
You should use inline asm or calls to C library functions, especially libraries standard to the operating system.
>>
>>103295761
what a dumpster fire
>>
File: mpeg2 mnemonics.png (116 KB, 1015x448)
116 KB
116 KB PNG
>>103295746
>>
>>103295766
My focus is on C++. I'm fairly certain the language and its constructs are a fuckfest, but I want to *prove* it too.
>>
>>103295804
>My focus is on C++.
Yes. And C++ has inline assembly and function call compatibility with C.
Who is moving the goalposts now?
>>
>>103295858
>And C++ has inline assembly
Yeah, so about that ... >>103295670

>function call compatibility with C
Is that the official position of C++ then? Don't use iostreams, use printf, because it's a fuckfest galore? Because I can write that and let the reader come to their own conclusion ...
>>
>>103295632
Where/How can I learn this stuff better? Just write some assembly?
>>
in ur code base under what path do u put header files like stream.h stuff that the standard doesn't provide without running into name collisions

source engine puts stuff into tier0 and tier1
>>
>>103295761
>Mnemonics
>bslbf, vlclbf
Whoever wrote that was definitely mentally ill. "I just mash the keyboard with my manly organ and call that an easily remembered word!" Total madness.
>>
>>103296266
develop mental issues like that, probably from being abused as a child
>>
>>103296266
Reading https://www.agner.org/optimize/optimizing_assembly.pdf would be a good start.
You can also launch a process in x64dbg, write in your own instructions, and then see the status of register and memory change step by step.

Also see https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#techs=AVX_ALL

>>103296364
How does being third-rate feel?
>>
>>103296297
There is not a single reason to be dealing with 1970s problems in 2024. Examine your head if you're using a language that requires header files and has naming collisions
>>
>>103296371
c++ has a C++23 version
>>
>>103296371
Yes, except *all* the reasons: >>103287614
>>
>>103273421
        WHEN GETTIMEOFDAY CALLS HPET_UPDATE_SUBSECONDS AND COMPARATORS ARE ENABLED IT WANTS TO LOCK AND BACK UP
KSHAREDOBJECT.SUBSECOND_TIME (SO HPET_UPDATE_SUBSECONDS WILL NOT OUT OF SYNC), GET THE NEW VALUE
TO RETURN AND THEN SET IT BACK TO WHAT IT PREVIOUSLY WAS BUT THIS RUNS INTO A DEADLOCK WHEN HPET_UPDATE_SUBSECONDS
WANTS TO ACQUIRE THE MUTEX OWNED BY GETTIMEOFDAY, PASSING AN ARGUMENT TO HPET_GET_SUBSECONDS SOLVES THIS PROBLEM
BUT IT REMOVES THE FREEDOM TO ABSTRACT COPROCESSING-FRAGILE ACCESSES TO THE SHARED OBJECT TO A MACRO AND
MAKES HPET_UPDATE_SUBSECONDS UGLIER

this makes me feel pain.
>>
>>103295512
If your argument depends on cherrypicked examples yet claims universality, it's not a very good argument. You're demeaning yourself.
My argument is that language is more complicated than you present, an argument supported by one example, and it did not depend on anything like claiming that either verbs or nouns are superior.
Similarly, when it comes to programming languages, I claim that there are cases where it makes sense to lead with objects and cases where it makes sense to lead with functions. To claim that either is necessarily the best one to go first is just weird (except in specific cases, of course, just as we can find human language sentences where either verbs or nouns are most important).
That you hate "it depends" points to a mental deficiency. Sorry, but that's the truth.
>>
>>103296297
that doesnt really happen but when it does project/commons.h is enough
>>
>>103296403
ALL CAPS SUCKS, AMIRITE?
>>
>>103296423
You are making a lot of assumptions about me.
>programming languages and paradigms
Here you can define everything from scratch, it doesn't have the goals (communication) and resulting limitations (intricacies) of spoken language. The best way to program is procedurally, the over-abstraction of OOP creates problems that the other style not, full stop.
>>
*intricacies that you cant get rid of
>>
>>103296379
Modules were in C++20 and they're still not implemented, nor do they work
>>
>>103296497
>The best way to program is procedurally
only if you are unable to comprehend abstract thought, and only write programs that are linear and not meant to be updated and maintained
like that registry dumper
>the over-abstraction of OOP creates problems
that's your fault for poorly designing abstractions
>>
>>103296808
I comprehend abstract thought lol, all low level thinking originates from abstract thought such as visualizing a bitshift.
>blabla spewing nonsense about things i never did or plan to do
fuck off.
>>
File: 1681241610852792.gif (1.53 MB, 612x344)
1.53 MB
1.53 MB GIF
>>103296808
>only write programs that are linear and not meant to be updated and maintained
>>
>>103296822
my brother in christ, what do you think the level in "low level" refers to? (hint: it's the level of abstraction)
>ad hominem
i accept your concession
>>
>>103296867
go back to whatever you crawled out of.
>>
>#pragma ONCE suddenly failing for inexplicable reasons
sigh here we go
>>
>>103280725
what you're talking about is automating vertex layouts, not dynamic vertex arrays. i ofc already have this, at comptime, since I use beef
>>
>>103296808
structs and functions is typically all you need, tangible mutable state with a clear separation of logic and data. the concept of "object" isn't inherently terrible and is suitably applied to collection types but that's where the line should be drawn.
>>
Still waiting for
sometype_t myvar = {
.integer = 0,
.string = __builting_character_array("nigger")
};
>>
forgot
typedef struct{
int integer;
char string[];
} sometype_t;
>>
TIL that C++ does not have a standard way to restrict pointers to prevent aliasing, which leads to picrel.
Meanwhile C99 has had restrict for twenty years.
>inb4 __restrict
>inb4 __restrict__
>inb4 __declspec(restrict)
Humiliation rituals.
>>
>>103297729
>structs and functions is typically all you need, tangible mutable state with a clear separation of logic and data
it's invaluable to have the state visible only internally by the pieces of logic that requires it, and to expose only intended behavior via public interface without exposing the internals
>>
>>103297969
it is not
>>
>>103297969
retards thinks this but here's a kicker, you can't actually see into the future so stop trying to design your API's as if you have that ability. the result is that you write features quicker and the consumers of your API's are happy since they can now do things you did not anticipate.
>>
>>103298019
IT IS HAHAHHAHAHAHAH WHAT THE FUCK
Have you ever defined a macro?
look here
#define TOPIC_SUBTOPIC_CAPABILITIES_AND_ID (0xFUCKYOU/sizeof(uint16_t))

void func(uint8_t lalala){
volatile uint16_t* glob = get_glob_lmao();
glob[TOPIC_SUBTOPIC_CAPABILITIES_AND_ID] = (glob[TOPIC_SUBTOPIC_CAPABILITIES_AND_ID]|0x00FF)&((uint16_t)lalala<<8)
glob[TOPIC_SUBTOPIC_CAPABILITIES_AND_ID]++;
fuck_you(glob[TOPIC_SUBTOPIC_CAPABILITIES_AND_ID]);
}


imagine this but for 2000 lines, is it ergonomic? Ergonomic = maintainable, but scaling like an attribute not simply an adjective.

meanwhile you could have just done SUBTOPIC_CAPS_ID
or even CAPS_AND_ID
>>
>>103298019
it is
I rather have a x.size() method and pass around a collection as a single reference/symbol than to juggle as separate parameters a collection and its size

>>103298058
strawman, also you made a minor spelling mistake
>>
some real schizo shit



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