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

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]


Janitor applications are now open. Apply here!


[Advertise on 4chan]


File: 1779827080802167.jpg (2.09 MB, 4500x3000)
2.09 MB JPG
What are you working on, /g/?

Previous: >>108891616
>>
does pcbway/jlcpcb charge extra for silk screen art?
>>
>>108912873

Exactly
>>
Is reading programming guides and documents useless if you're not actively programming but just trying to familiarize yourself with the code and then you start programming after you read everything? I feel like I'm going to miss out on important information if I only read what I need for my program.
>>
>>108912929
You're suppose to do both at once. Coding while you're reading. Especially for things you want to get an understanding for. Very important for stuff like butwise operators
>>
>>108912932
*bitwise
>>
>>108912936
i'm very buttwise.
>>
>>108912867
There's usually something there, and the process used can print most any monochrome image that fits. It doesn't make much weight difference either.
I wouldn't pick that, but I've no affiliation with UCD.
>>
>>108912892
>I'm keeping to C++11/17
>>
>>108913140
Technically, I dont think Ive used anything from 17. I dont even touch constexpr much from 14
>>
me as a teenager:
>install vim
>install 40 plugins
>500 line vimrc file
me as an adult:
>install jetbrains ide
>install ideavim plugin
does the same shit and more. you can't easily refactor in vim.
>>
>>108912867
no, I used to make circuit christmas cards with leds, enig traces, solder mask and silk screen art
>>
>>108913177
I'll never understand people using an ide that you cant use your mouse in
>>
>>108913174
its basically this
std::variant<A,B,C>

struct variant_abc {
enum {ta,tb,tc} tag;
union {
A a;
B b;
C c;
};
};
>>
>>108913177
Can you stop pretending that vim is relevant? Any code editing that is repetitive and very mechanical is fust delegated to LLMs. You do not think about that, you do not put effort into actually using 10 key combos to do a bunch of fancy tricks. It's useless. Software dev today can be done with nano as text editor, you literally don't need more.
>>
>>108913174
i like std::optional :)
>>
>>108913220
Oh so it's a union-adjacent feature. variant did sound like it
>>
>>108913177
>>install 40 plugins
There's your problem.
I have 0 plugins and about 8 lines in my config file.
>>
clang -std=c2y -fdefer-ts

pretty good desu not gonna lie guys
>>
>>108912856
>anime girl pcb
based!
>>
File: zombie.gif (3 MB, 538x302)
3 MB GIF
>>108913389
>>>install 40 plugins
>I have 0 plugins and about 8 lines in my config file.
based.
>>108913177
>me as a teenager:
>>install vim
>>install 40 plugins
>>500 line vimrc file
>me as an adult:
>>install jetbrains ide
>>install ideavim plugin
>does the same shit and more. you can't easily refactor in vim.
webdev brainrot. if you can't bang out a rest api or a web component without autocomplete you're a brainlet just asking for early onset asstimers.
>>
File: xmas.jpg (310 KB, 1600x1200)
310 KB JPG
>>108913191
>no, I used to make circuit christmas cards with leds, enig traces, solder mask and silk screen art
man thats a cool idea. do you have any pics still? one day (if I make a friend) I'll have to do that. wait do they let you buy singles?
>>
File: cube.webm (1.63 MB, 1200x720)
1.63 MB
1.63 MB WEBM
Have you ever pondered into a cube?
>>
>>108913177
My as an elder gray beard.
>Installs nano
>edits the config
>never looks back.
>>
File: locks_locks_locks.png (8 KB, 530x1007)
8 KB PNG
>I just realized that people call me Factorio schizo because its file I/O is bad
>which is true, but doesn't even scratch the surface
>like the fact that they copy everything rather than directly using the page cache, literally millions of small-fry allocations and releases, constant thread affinity adjustments (requiring constant thread handle acquisitions and releases)
>and the locks
>so many locks
>for things that are never ever accessed by other threads
>wasting a good 1K cycles for every acquisition and release
>because locks have to be atomic

>reminder that Factorio is considered "well optimized"
>>
>>108913198
you can use your mouse, it's just like emacs.
it just fucking sucks ass and there's no reason to use it (or modal editors)
>>
>>108913633
>>I just realized that people call me Factorio schizo because its file I/O is bad
No, people call you Factorio schizo because you complain incessantly about Factorio I/O.
>>
>>108913686
And you wanna stick with it?
>>
>>108913699
I have never and will never touch Factorio.
I don't care what it is doing.
>>
>>108913722
And? It's a wonderful case study in general software inefficiencies.
>>
>>108913728
I bet there are better ones that people actually care about.
Or you could demonstrate better practices in some way.
>>
>>108913756
But I already have with NtCreateFile. Or with HeapAlloc, which allows you to group relevant allocations together. Problem is that those are not C standard interfaces, which are used by C++ standard interfaces, which the Factorio devs used because nothing about the game is actually well optimized. Because those interfaces were designed for portability and nothing else.
>>
Am I in a dementia-filled care home? Yes grandpa, this is the twentieth time you pointed out how Factorio is inefficient.
>>
>it thinks file I/O is the game's only inefficiency
>>108913728
>>
>>108913610
>anaheim systems dynamics
sussy
>>
>>108913830
See, this is why people think you're a schizo.
Aside from responding to your posts no one here is spending any time thinking about Factorio.
>>
>>108913921
>>108913728
>>
>>108913954
No one cares!
>>
>>108913972
Tough.
>>
File: anaheim_logo.png (1.16 MB, 1024x1024)
1.16 MB PNG
>>108913840
watch out ho!
>>
>>108913633
>>reminder that Factorio is considered "well optimized"
Compare it to other popular games on steam and you'll see that it's optimized comparatively well
>>
>>108914250
You need me to take a look at Counter-Strike 2, Dota 2, or PUBG?
>>
File: s_2026-05-27 02-27-57.mp4 (294 KB, 760x238)
294 KB
294 KB MP4
What the fuck. I can't type inside the string.
>>
>>108914340
Where's that anon yesterday that was screeching about using a terminal based editor over an IDE.
>>
Holy shit what the fuck is this. It doesn't even go away after restarting the ide.
Just let me finish this feature so I can go play vidya.
>>
>>108914340
so this is the power of ai
>>
File: file.png (233 KB, 790x1218)
233 KB PNG
>practicing my C++
>forgot visual studio had copilot/ autocomplete on
>go to enter everything into my main after making all the classes
>it just automatically puts everything out for me in a suggestion

AI is fucking scary
>>
>>108914475
That's a shitty fucking bank interface.
>>
File: 1770715571152908.png (186 KB, 1011x1029)
186 KB PNG
>Apple is constantly providing new replacements to old clunky frameworks
>If it's 5+ years old and a pain in the ass to use, there's a good chance it's already been replaced
I love Swift !!!
>>
>>108914475
>enter initial balance (asks you)
>just creates the money out of thin air
>doesn't even give you the account number
just like real life
>>
>>108914508
oh vey
>>
File: cpp_is_garbage.png (44 KB, 1532x932)
44 KB PNG
Let's not try to think too much about how many temporary conversions, memory allocations, locks, and copies the game initiated *multiple times in a row* just to check if this file exists.
>and it didn't even get a fucking handle out of it
>for which even more conversions and copies and allocations would have been required to feed to NtCreateFile

Praise be to std::filesystem::exists!
>>
>>108914504
>but linooks is so much worse bro
Remind me why anyone takes Applel seriously as a development platform?
>>108914607
Get new material, you've worn craptorio out. I liked your schizoposting about the windows registry better.
>>
File: 1779844801882216.png (78 KB, 740x877)
78 KB PNG
Printing an integer in asm.
I am forsaken.
>>
File: ntuserpeekmessage.png (39 KB, 1102x970)
39 KB PNG
You want OC, you'll have to provide it yourself.
>>
>>108914621
You didn't print it, you cheated. "Piping a number from input to output", more like.
>>108914635
Go btfo something actually bad like teams, or god, rightclicking anything in windows 11.
>>
>>108914645
That's what I mean.
>>
File: dec_print.png (36 KB, 880x964)
36 KB PNG
>>108914621
I recommend a conversion to PBCD into two GPRs via the MUL 0xcccccccd + SHR trick (has to be two because you reduce your alphabet from 16 to 10 characters), then merge them into a full 32-byte vector.
>>
>>108914662
>at&t syntax
ngmi
>>
>>108914616
>Remind me why anyone takes Applel seriously as a development platform?
why wouldn't you? mac is easy to use, compatible with everything, and it just works.
>b-but i cant play games on it!!!
ok ig?
>>
>>108914662
Oh, and the reason there's a DIV is because GCC is a buggy mess and starts fucking around when you provide branch hints via __builtin_expect_with_probability. You couldn't make this shit up if you tried.

>>108914645
>>108914635
>>
I can either extern printf or do a /= 10 and += c + '0' or what ever it is.
>>
File: dec_print_in_intel.png (35 KB, 898x964)
35 KB PNG
>>108914669
You had better learn it for inline assembly.
>>
>>108914670
>compatible with everything
>except for any app more than 5 years old
Meanwhile Windows 11 can still run unmodified .exe files from 20+ years ago.
Macfags have no response to this.
>>
>>108914687
-masm=intel

I'd rather write in a separate file anyway.
>>
>>108914689
>Meanwhile Windows 11 can still run unmodified .exe files from 20+ years ago.
Not even Windows 10 could do that, thanks to their compositor fuckery.
>>
>>108914689
im developing apps for the future, not for the past
if your app / framework hasnt been updated in 5 years, I don't need it.
>>
File: 8-bit-16-bit.jpg (17 KB, 750x386)
17 KB JPG
>>108914689
Blocks your path.
>>
File: file.png (228 KB, 694x1256)
228 KB PNG
>>108914708
lol
Your customers will love your app not working after it falls off the API treadmill.
>>
File: file.png (192 KB, 924x433)
192 KB PNG
>>108914708
and of course, the newer and "better" APIs never have the features of the "legacy" ones.
>>
Trying to learn C AVR programming, rough start. Managed to set up my toolchain but with a bunch of errors that took quite a while to figure out. Now I'm trying to get the blinking LED to work. LED is on but connected to the 5V pin so the code doesn't do anything. apparently it has to be in a GPIO (never heard this word before Gemini said it, it's not even in the datasheet?) pin. Put it in a GPIO pin. LED turns off. Try to understand the code, see if maybe that's why. Realise I don't understand the code. Follow someone else's breadboard setup to see if that fixes it. Nothing. Try to get the LED to turn back on, realise I have no idea how a breadboard works and now I can't even get it to work with the 5v pin because I never learned Electronics. I have no idea what SCK is. Jesus this shit is a lot of info all at once.
>>
give me one good reason why you need more than 7bit ascii
>>
>>108914848
u wouldn't get it bro
>>
>>108914848
Frames and shading.
https://en.wikipedia.org/wiki/Code_page_437#Character_set
>>
>>108914746
>want this one specific feature now instead of waiting a year for apple to support it
>spend 10 minutes making a wrapper struct that lets you use the old UIKit framework for this one specific view
>move on with my life
>>
108914848
bl0473d 5hi7 w3 d0n7 n33d m0r3 7h4n 5 bi75 4ll w3 n33d 4r3 l0w3r c453 l3773r5 4 5p4c3 4nd c4n cr4m 7h3 numb3r5 in 7h3r3 wi7h l3375p34k
>>
01100010 01101100 01101111 01100001 01110100 00101100 00100000 01100001 01101100 01101100 00100000 01110111 01100101 00100000 01101110 01100101 01100101 01100100 00100000 01101001 01110011 00100000 01100001 00100000 01110011 01101001 01101110 01100111 01101100 01100101 00100000 01100010 01101001 01110100
>>
File: 177986037507023.png (66 KB, 944x599)
66 KB PNG
I'm really struggling but every hour I get a little bit closer.
>>
>>108915672
... what the eff.. nano has gdb integration?
>>
>>108915742
no this is gdb.
gdb does have text editor integration though. You just tape edit and it will open the current source file with your editor in the terminal window.
>>
>>108915672
Why, do you think, do compilers avoid DIV?
https://uops.info/table.html?search=DIV%20r&cb_lat=on&cb_tp=on&cb_MTLP=on&cb_ARLP=on&cb_ARLE=on&cb_ZEN2=on&cb_ZEN5=on&cb_measurements=on&cb_base=on
>>
>>108915894
Also
>add[rsi]
... dude. Memory accesses are slow. It's better to add to RDX first and THEN write it out to [RSI]. What's more, with this whole conversion to PBCD you spare yourself the looped additions and write-outs.
>>
>>108912632
In assembly just to torture myself. And I was a little stupid.
I was thinking writing an OS in assembly with a tiny editor and then rewrite that assembler there to bootstrap the whole system might be a good path.
Writing the compiler first would've been better, but now here I am.

I don't have an MMU. It's just rv32imac or something like that. But yeah, I was just on my morning ride and thinking about it. I will just allocate 64k at a fixed address space for basic applications and only have one at a time for now. If I can then load and start applications, I can go from there. Maybe even do it like the c64. If I am not mistake, that just had some "slots" too.
Because if I have an assembler working on the system itself, then I could just make it "JIT" by emitting machine code with the correct addresses inside the correct slot
>>
>>108913235
can you stop pretending you actually program?
>>
>>108915914
But also I watched a video about C++ yesterday evening and I somehow want to torture myself with brand new MODERN C++ now.
So maybe ill diverge for a moment and write a compiler
>>
>>108915924
You sound easily influenced. C++ is much nonsense.
>>
>>108915894
>>108915910
Bro this is too advance for my virgin asm bucci.
one step at a time.
>>
>>108915945
I am easily influenced. There are so many cool languages.
C++ is much nonsense, but it's also kinda cool. No homo
>>
>>108915963
That's why I've helped you help yourself in the future with that table.
>>
>>108914826
led only work one way, make sure its pluged in the right way, it might have a short leg to indicate negative side for example.
>>
>>108915979
>it's also kinda cool
Nah. Once you look behind the curtain you realize that its interfaces are absolute garbage, and that its code generation is nonsense: >>108914607
>>
File: atmega8.webm (182 KB, 640x853)
182 KB
182 KB WEBM
>>108914826
Brother, don't use gemini for that.
There are TONS of good tutorials on AVR blinky stuff. Like really a lot from all them boomers.

Usually in 8 bit AVR's you have to set the Pin of the specific port as output first before you can write data to the register.
Like this for an atmega8:
DDRC |= (1 << PC0); // sets Data Direction Register Pin PC0 as output
// Then
PORTC |= (1 << PC0); // PC0 goes high
PORTC &= ~(1 << PC0); // PC0 goes low


webm related
>>
>>108916015
PS: 32 bit AVRs work the same, iirc. They just have a lot more configuration options on the registers
>>
>>108916005
i told you yesterday already that I don't read your spam. What incentive would I have to read that?
>>
>>108916015
anon your last blinker isn't blinking
>>108916054
stop replying to him/yourself, dumb nigger
>>
>>108916055
>anon your last blinker isn't blinking
yes. If you look closely there are only 7 wires going to the resistor and led array. I don't know why one is missing. Haven't touched this in years by now. Just got it out the drawer a few minutes ago
>>
>>108916054
That you can point your finger at autistic retards like yourself and laugh at them for thinking that C++ is cool, when it's not.
But then again, since you're an autistic retard you wouldn't read it anyway.
>>
Also
>stop replying
See, this is why people call you autistic. Adherence to pointless rules that haven't worked in decades.
>>
>Hey guys check out this cool OS I made!
>... for graphics, we use a software rend-
*close tab*
>... for graphics, we use accelerated framebu-
*close tab*
>... for graphics, we use Linux DRM's cod-
*close tab*
>>
>>108916198
> we will make it like unix and just copy paste all existing code
*close tab*
>>
File: good-classics-jokes.jpg (54 KB, 1280x744)
54 KB JPG
>the autist pretends he is not autistic, accusing others of autism and gets mad when he doesn't get (You)'s
classic
>>
>pretends
Nah.
>>
Today I wrote a userscript that puts checkboxes on a wiki page and the headers (cosmetic), but the main page one lets mark the page read until an update, then it switches from a green check to an orange exclamation mark.
If I read something and didn't understand it I can right click for a blue question mark.
for those interested in the implementation the main functions are
LastEditedTime
PageState
RenderPage
RenderSection

which should be self explanatory.
>>
File: 1772501709623589.gif (3.37 MB, 506x530)
3.37 MB GIF
>>108914607
That's not the bottleneck so who cares about a few wasted computations?
Also it's recommended to use boost::filesystem instead.
>>
>>108916675
that sounds very autistic.
Are you a wiki addict? I don't read wiki pages so often and either I read the paragraphs that are relevant to my research or I just remember which I have already read, which is no problem since I rarely read multiple at a time.
Or what do you need that for? Sounds cute tho. no homo
>>
>>108916853
It's a documentation wiki for a programming language with a very convoluted layout. It's more so I can quickly find the heading I haven't read yet
>>
>>108916794
>he actually thinks there's just one bottleneck
>one big bottleneck
>not thousands of tiny ones that are all working towards slowing everything down
Oh my goodness you autists are beyond hope. Just ... completely. It's like with zoomers, culling them is doing everyone a favor including themselves.

>boost::filesystem
Yeah, because conversion from UTF-8 to UTF-16 isn't bad enough.
>>
>>108916015
Thanks for the headsup, dude. Already found some nice sites, and I made some good progress from yesterday already. Managed to get the LED setup properly with the breadboard, and I'm starting to understand the code a bit more - turns out the code of the book I'm using (Make: AVR Programming) was setting pin 8 to be the output pin, not 13.

Funnily enough, looking at the boomers' code usage vs this book's code, the book guy's code seems to be worse, but I think it's because it's literally the first chapter and I'm pretty sure he makes it more complicated later.

idk how to do a code block but:
BOOK Code
DDRB |= 0b00000001
while (1)
{
PORTB = 0b00000001;
delay_ms(1000);
PORTB = 0b00000000;
}
so he's setting the entirety of PORTB to be output pins (i.e. outputting voltage, 5V), and then setting the first pin of PORTB (in this case, pin 8) to high, delay(), and then to low.

other people's code seems to use bitwise operators much more, to also specify the exact pin.
>>
I just discovered that mcman in the ps2sdk just loops a memory card command up to 100 times after erasing a block to wait for the erase to complete.
Apparently command 0x12 will return 0x66 if erase is ongoing and 0x5A once complete.
>>
File: 1779881136241119.png (258 KB, 1399x1040)
258 KB PNG
It took me 12 fucking hours but I finally printed an integer in asm.
>>
>>108917037
Good job. Looks bad.
>>
>>108916984
>other people's code seems to use bitwise operators much more, to also specify the exact pin.
Yes. Once you get used to it the bitwise operations just become natural. But for learning purposes it's not bad to assign the whole reg at once
>>
>>108917037
You mean you made a syscall and the os ran a function written in c+asm to make your hardware do all the tasks associated with printing on linux?
>>
>>108916984
>>108917272
PS: You probably don't see it blinking. You probably want this:
PORTB = 0b00000001;
delay_ms(1000);
PORTB = 0b00000000;
delay_ms(1000);

Otherwise PORTB gets set to 0, then it jumps back up and immediately sets PORTB to 1 again. That's just nanoseconds between those two calls. So by your vision the led will always stay on. You gotta add that extra delay to make it stay 0 for some time
>>
File: ps2erase.png (33 KB, 673x558)
33 KB PNG
>>108916992
Actually, that is a possible bug in the module.
The value 0x5A is the default response terminator, but you can change that value and the function does not get the terminator value and use it for a compare, it is hard coded to compare with 0x5A.
So if you change the terminator and then try to erase a block, it will probably error even though the erase was successful.
>>
File: 26-05-27 08-16-23 6308.jpg (489 KB, 2016x1512)
489 KB JPG
Once upon a time I made a business card which could blink out the UV index.The UV sensor was kind of expensive though. Attiny45 was plenty for this, and it does a great job of sleeping at about the battery self-discharge rate - meaning it can sit there for years and still work.
>>
>>108917277
No I converted an integer to ascii.
>>
>>108914607
Then there was that time when I discovered that directory iterators are fucking broken because they don't require the user to provide a buffer - because the standard autists couldn't bother looking up how both Windows and Linux do it, which is to tell the kernel to write the file entries into a buffer for the process to iterate through. Not that this would've changed a lot because the Windows implementation uses FindFirstFileEx, which only expects memory for *one* object, not multiple ones.
>which means that they have to allocate their own buffer
>which has to be specifically linked to the handle returned by FindFirstFileEx so that it's marked as no longer used once FindClose is called
>and because that's a bitch to set up properly FindFirstFileEx always assumes NtQueryDirectoryFileEx will fail until it doesn't (which is the opposite of how that's supposed to work)
>because that way they can just use some stack memory for the first entry instead
>and yes, that means the first call to NtQueryDirectoryFileEx is always called with SL_RETURN_SINGLE_ENTRY
>and let's not even talk about the data conversion

It's kind of amazing that people STILL believe that C++ is better than C.
>>
>>108917338
It should actually be ok because the module doesn't provide any functions to setting a custom terminator, and as part of probing (and initializing) the memory card it will set the terminator to 0x5A.
So you would have to be writing something on top of the mcman module to end up tampering with the terminator value.
Still a bit weird to hardcode that check there, especially seeing the "busy" value is 0x66 and you could check for not that (and not 0xFF, which you get when no card present).
>>
>>108917751
>(and not 0xFF, which you get when no card present).
Though, if you are getting 0xFF back, then you'd also be getting 1D100 back from recv1, which is also being checked for (stat6c check).
>>
File: 1750030220005390.png (743 KB, 838x930)
743 KB PNG
I want to make a soap/shower gel recommender website where you input ingredients, properties, region etc. and it gives you a list of products. Last time I made something was a personal website using html and css in .php files in 2000s.

I want fast page loads, simple and secure code, easy migration when needed. AI says the best solution for me is GO + Fiber. Is that correct?
>pic unrelated
>>
>>108918017
>fast page loads, simple and secure code
Lol.
>>
>>108918017
It's hard for me to do OOP in assembly. My brain is not big enough for it
>>
>>108918017
any sql or nosql db u want, any be u want and any FE you want incl7ding full vanilla will do the trick
just check if that fiber thing is really going to help, because you technically don't need it. so ut is a matter of "does this help?"
>>
am I dumb if I just continue programming the old fashioned way without touching any AI tools?
>>
>>108918289
no, just theoretically slower
AI needs to be constantly tardwrangled, you just do less typing and less looking up things yourself
>>
>>108918289
if you find that you're able to understand what you want to learn without it, no, it doesn't supercharge your learning or anything.

The usecases where I find it helpful are when the resources online don't help me understand so well, because then it can help fill in the gaps. For example, I'm trying to understand negative numbers in binary right now. Virtually every resource says "sign-bit magnitude is bad because arithmetic breaks, One's Complement is one off sometimes, so Two's Complement fixes this". Claude helped me understand that sign-bit magnitude just makes arithmetic harder rather than impossible, and helped me understand (with natural-language and mathematical examples and showing me binary operations) why 1111 is what happens in One's Complement with bit-flipping, why this causes the off-by-one issue sometimes when overflowing, and some other things too.
>>
>>108918289
Nope, you are not.
I would say it's good to touch it and know what it can do, but for me it just felt too exhausting and I deleted all my accounts.
Sometimes I still use duck.ai for quick searches, but I am wondering if I should quit even that.
For me the AI just shits out too much unecessary crap and it just distracts me. It's annoying
>>
>>108916015
p/n of that LED strip?
>>
>>108918399
>For me the AI just shits out too much unecessary crap and it just distracts me.
you can ask to drop any explanations or descriptions and just provide code snippets, though
>>
>>108918498
No idea. I soldered/received that shit literally 10 years ago.
I do have the schematics but it doesn't have any p/n
>>
>>108918692
>you can ask to drop any explanations or descriptions and just provide code snippets, though
Yes, but you have to do that over and over and over and over and over again. It's retarded.
You can't even fathom how many times I had to tell those motherfuckers that VHDL is not software, but hardware and it should therefore care about register transfer logic rules.
It's just trash when you dont use python or javascript
>>
>>108913177
Well yeah, one is a text editor the other is an IDE. They have completely different use cases.

>>108913235
If editing a config file is your idea of work then sure Nano is fine.

>>108913198
Nothing stops you from using your mouse. The problem is that it's actually really slow and awkward, and anyone who uses software seriously will take the time to learn the keybindings. This applies for everything from Photoshop to IDEs. It's kinda like how GUIs seem easier than console commands until you want to do something specific and its nested in 10 layers of menus and requires several options to be selected in just the right way.
>>
>>108918869
>Nothing stops you from using your mouse. The problem is that it's actually really slow and awkward

Are you fucking kidding me? I play video games that demand far more speed and accuracy. Just say you have old man hands.
>>
>>108914475
Woah, it copy pasted the same 4 lines of code but changed the variable and string? AGI?
>>
>>108918289
No, but you will waste some time looking for answers that could be provided by an AI in few seconds.
AI in principle can write you anything very fast, but you won't learn much. You gotta spent some time and effort using your own brain to learn and improve. Optimally, you would want to use AI as elaborate search engine or to generate some boilerplate you've already written dozens of time, but still learn new technologies properly by reading official guides and writing stuff yourself.
>>
>>108918889
That's nice for you. I'll still open new tabs and files in a fraction of the time it takes it to even get there with the cursor.
>>
>>108918889
You also use WASD + extra keys while playing games. So compare the speed of moving your crosshair to a precise point vs hitting R to reload. Even if you have god tier mouse reflexes and your left hand is crippled, if you're working for hours every day then you want the option that's less fatiguing and is more reliable.
>>
>>108918889
cont. from >>108918944
Also, when you play a game you tend to keep your hand in the same position: left on WASD and right on the mouse. When programming or even writing notes, you go from both hands on the keyboard to eight on the mouse (or trackpad for laptop chuddies). Laptop use especially made me want to switch to a "keyboard centric workflow", but desu the same applies for Desktop usage as well. High initial investment with good payoff + the more you do it the more shortcuts and tricks you learn.
>>
>>108918896
kek
>>
>>108918896
I honestly believe AI is best suited as an auto completion tool and nothing more.
>>
>>108918928
I use the new tab hotkey in unison with mouth, faggot. You're handicapping yourself cause you're not dexterous. Just admit you have old man hands.

>>108918944
Holy cope. Just say you suck at using the mouse.
>>
File: 1751308826610289.png (202 KB, 640x640)
202 KB PNG
>>108919005
Lol
Lmao
You'd make good food. You'd also ONLY make good food.
>>
>>108918869
>The problem is that it's actually really slow and awkward, and anyone who uses software seriously will take the time to learn the keybindings.
while key shortcuts are generally faster than navigating menus or using toolbar buttons, some actions are much faster and more precise with a mouse pointer, for example selecting text that's not right under your cursor, or clicking/selecting something in an unfocused panel
>>
>>108920001
>he doesn't know how to use CRTL
>>
>>108920146
still generally slower/less precise even if you cycle through whole words or even pages
>>
>>108920446
>he doesn't know how to use PGUP/PGDN
Just stop, you've already proven your single-digit IQ.
>>
File: house.jpg (5 KB, 284x177)
5 KB JPG
>>108912856
I converted an a.i. code to assembly code so it didn't have to operate behind a O.S.
>>
working on version 2.0 of my emulator frontend.

Originally designed as a tool for Theseus to import your entire emulation library + steam to the Theseus app (which is a launcher designed around the original xbox dashboard),

I went ahead and added an emulator frontend to it. You can barely tell it's BYOND powering this baby in this window..
>>
>>108920536
pages have already been mentioned in the very post you quoted
it is you who can't use a mouse efficiently, hence you are the dumbass low IQ retard and should stop posting
>>
>>108920751
>doubles down on not being able to use PGUP/PGDN
OK, food.
>>
Learn erlang
>>
File: 1778530087401725.jpg (388 KB, 2048x1895)
388 KB JPG
>>108920563
>[Unseal LS Chamber]
>>
Anyone have any recommendations on studying for a mid-level SQL developer interview?
I'm really great at writing SQL queries, but I have less knowledge in DBA/optimization
>>
File: 1779197747660383.jpg (223 KB, 1920x1080)
223 KB JPG
>>108918042
>>108918058
>>108918067
Okay, so after few more hours with AI I got
>VPS
>SQLite
>Go
>HTMX + Alpine.js
>Beszel
>CloudFlare
Does this make sense?
>>
>>108921527
>wanted simple
>got ingredient list longer and more complex than great value instant ramen
>>
>>108921527
you don't need beszel or cloud flare. actually I can pretty much gaurantee you won't need alpine.js either. straight htmx + go + sqlite is fine. the only actual server security you need is fail2ban and ufw. just make sure to use a ssh key instead of a password login.
>>
>>108918017
The best solution is html and css in php files.
>>
File: 1770925757811047.jpg (97 KB, 520x600)
97 KB JPG
>ask a good fait question
>get 3 lowkey troll answers
...why did I expect anything more?
>>
Seeing a trend of more repos adopting AI for triaging and managing issues and it's funny/tragic to see mishandling so frequently. Just hallucinating that issues are no longer important to consider or mixing 2 of them up, etc.
kinda funny
>>
>>108921867
why do you need anything more than html and js? are you really building an API thats searching the internet or crunching numbers? basic ass js and html is fine. just upload it to neocities or github pages for free.
>>
>>108918058
Why do you need objects? Everything should be a text stream.
>>
>>108917669
getdents64 is a hidden and the man page will tell you that this is not the API you should be using and NtQueryDirectoryFileEx is only for windows 10.
The time it takes to open a directory entry is CPU bound, because there is no IO bound activity around it.
After you have an entry, you must make a full path search to open the file, neither win32 or dirent give you a pre-opened file which is expected since that would be a very slow IO operation.
There are better places to optimize, such as using a profiler and actually fixing hotspots.
If you told me that SDL3's filesystem was faster than C++'s filesystem, I might start using it. But I'm almost certain that's not the case, and whatever gain you get from getdents64/NtQueryDirectoryFileEx would be measured in the scale of microseconds (since a kernel call is a few microseconds), which compared to opening a megabyte large file and doing something interesting with it, like opening a png, is nothing.
>>
>>108912856
time to split source files into smaller files and check for memory leaks. my favorite activities :(
>>
optimizing and fixing up the firefox esr source code before i build it, then as I look at this the 4k video is lagging on parole , so i will have to look at that again.
>>
File: special tree.png (527 KB, 1248x877)
527 KB PNG
i'm new to program, just been learning how to do graphics and plotting kind of stuff, i made a random tree generator lol my girlfriend said it was cute
>>
finished up mpc-qt today and managed to get all the features and polish done I wanted and even managed to resolve that issue whereby the window leaps up the page if you close and restart and/or change views.
>>
So Dennis and Ken created C because they had to rewrite the unix operating system and were annoyed by the fact assembly was processor specific and everyone was making their own unique take on chips.

How ever since then x86_64 has become the industry standard.

So come home white man?
>>
>>108922346
does your gf dilate?
>>
>>108922346
Does your gf have a penis.
>>
File: coolinator.png (2.59 MB, 1662x985)
2.59 MB PNG
>>108920682
>>108920682
the program works!

all of your emulated games and Steam games, now in one place.

i know this isn't the only program that does this out there, i mean there's Launch Box, but i'm still proud of my work.

my spaghetti code works!!
>>
>>108921867
I gave you a real honest answer.
You wasted hours talking to AI that gave you garbage that, if implemented, would be bloated and overbuilt.
>>
>>108922295
>the man page will tell you that this is not the API you should be using
char d_name[256]; /* filename */

... yeah, the manpage writer can suck my seven-inch schlong.

>NtQueryDirectoryFileEx is only for windows 10
And beyond, before that it was NtQueryDirectoryFile, and the only thing that changed is that, instead of two booleans for restart and single entry return, there's now a single bitmask parameter for both and more - i.e. completely irrelevant for this discussion.

>The time it takes to open a directory entry is CPU bound
If it's cached, because obviously the kernel has to check if the directory exists in the first place. Otherwise it's I/O.

>you must make a full path search to open the file
Bro. Learn what a root directory handle is, and how to use it with NtCreateFile. You should have the directory handle; after all you just called NtQueryDirectoryFile/Ex on it.

>neither win32 or dirent give you a pre-opened file
You have no clue what I'm talking about. Learn what the NT namespace is, how filesystem entries have to be prefixed in order to access them from the namespace, and then think about what CreateFile is to do without directory handle and fully qualified paths.
>>
>>108922346
I liked it enough to save it. Cool stuff.
I've done systems programming for a long time now but have managed to avoid doing any graphics programming.
Both because I don't personally need to utilize it much and because I'm bad at math.
>>
>>108922513
>If it's cached
... actually that would make it memory-bound as well. Because mode switching and THEN cache check.

>without directory handle and fully qualified paths
Meant to say
>without directory handle, but with fully qualified paths
>>
>>108922346
>post a tree in goot fate
>get 3 lowkey troll answers
...why did I expect anything more?
>>
File: 1779932635458491.png (227 KB, 1902x1037)
227 KB PNG
This is the way.
>>
File: 3093.png (79 KB, 597x544)
79 KB PNG
why must we always suffix the consequences?
>>
>>108922683
I dont even do leetcode shit anymore. When youre in the business world, your problems are far different from doing complicated shit.
>>
>>108922702
Is it more about gluing libraries together in the business world?
>>
>>108922513
You do bring up a good point about using the directory object to open a file without needing a path, that completely glossed over my mind because that's not a feature of the C fopen API.
Maybe skipping parsing the directory might save a some time, I am just optimistic that the time saved would be... a microsecond? since my usecase is to just look up a directory that is inside the CWD, and I load only 1 file (a translation file), if I was opening every single file, I would need threads or some async API since 99% of the time is waiting on IO not scanning directories (and those threads might not even speed things up, depending on how large the files are, since I'm assuming the files are small).
>>
>>108922748
It's more about solving business issues or making workarounds due to some business limitation. I'll never have to use palindrome or hard algorithms.
>>
File: business.png (746 KB, 818x644)
746 KB PNG
>>108922683
>>108922702
>魔法は探し求めている時が一番楽しいんだよ。
>"Magic is most fun when you’re searching for it."
>>
>>108922759
>Maybe skipping parsing the directory might save a some time
Some parsing is already being done in userspace; the kernel doesn't like it when you hand it paths with "..\" or ".\", so RtlDosPathNameToRelativeNtPathName_U_WithStatus takes care of that in addition to memory allocation, prefixing, and copying. If you use kernel interfaces directly you can save yourself all that jazz - in some instances I have seen RtlBlaBlaBla take up anywhere from 10% to 3000% the time it took for NtCreateFile to complete (assuming completely cached) - Win32 can be a heavy chonker.

And that's *before* you actually enter the kernel. Even if all directory entries are in the cache and no I/O happens, even then using directory handles compared to the fully qualified NT path saves you 3% runtime because the kernel has to allocate and copy less data from userspace.
>and that's the stuff that you *can* measure, unlike the consequences of cache evictions

>I would need threads or some async API
I mean, they all suck. Since NtQueryDirectoryFile/Ex is batching, unless you're querying from multiple directory handles you're not going to get much from completion ports, so unless you have something else to do while the first batch is processing you'll just end up blocking until you have a second batch, which is possible, but unlikely.
>>
defensive programming tip: always copy you char strings instead of storing references unless you want a headache later. someone will take offense to this because it's not memory efficient.
>>
>>108923028
Everything should be a stream of data. You should never copy anything.
>>
>>108923028
Well, that, but also because it comes from someone who cannot spell possessive pronouns.
>>
>>108923028
Learn 2 lifetimes
>>
>>108922671
Looks like shit.
>>
>>108923042
>>108923058
i'm sure you are a perfect programmer and you never free anything prematurely, leak memory or couple separate modules of your program together with references

>>108923062
what the heck is a lifetime?
>>
File: 1766056692879215.jpg (42 KB, 959x821)
42 KB JPG
>never bothered writing tests for any of the projects I do
>just figured shit out on the spot and made sure it works by rebuilding the application over and over and testing it there
>it's worked fine because 90% of "tests" is debugging UI issues or basic network requests

>start playing around with advanced objects and concurrency
>write my own tests
this is the most boring and painful shit imaginable
>>
>>108923081
>you never free anything prematurely
Pretty much, since I never work with single objects, but with lifetimes. Makes it hard *not* to notice something getting overwritten that's not supposed to get overwritten.
>>
>>108923081
If everything is a text stream you don't have to worry about memory management. It's the unix way.
>>
File: 1779938118337729.png (5 KB, 195x129)
5 KB PNG
>>108923077
go fuck yourself.

I have discovered the loop instruction.
>>
File: loopin_loopin_loopin.png (35 KB, 1898x354)
35 KB PNG
>>108923111
Don't, unless you're ready to fuck with Intel CPUs to exert some well-deserved pressure.
>>
>>108923081
Lifetime is how long something lives.
>>
>>108923121
I can't have anything nice.
>>
>>108923173
You were already told to look into SIMD instructions. You think I made that up?
>>
>>108923126
I don't believe in that.
>>
>>108923179
I did and no thanks.
>>
File: 1779944681757932.png (102 KB, 930x833)
102 KB PNG
I removed a branch.
>>
>claude why isn't this import working
>I can see the issue. *removes the import*
>>
>>108923485
>removes a branch
>result is within margin of error
Good job.
>>
>>108923485
Have you considered how this is going to affect things other than letters?
>>
>>108923720
It's an entire branch removal.

>>108923737
Like what? The instructions will only modify characters between a-z.
>>
>>108923779
>It's an entire branch removal.
It's a within cache line branch removal. Basically nothing.
>>108923779
>The instructions will only modify characters between a-z.
{|} will get down converted.
>>
File: Hal_9000_Panel.svg.png (75 KB, 250x738)
75 KB PNG
>>108914340
>>
File: 1779952189487342.png (13 KB, 807x88)
13 KB PNG
>>108923824
How?
>>
>>108923360
>he doesn't even do SWAR
ngmi

>>108923485
Love those partial register writes. Totally doesn't mess with the renaming engine.
Also, generally spoken, accessing R8-15, or R8D-R15D, requires an additional REX prefix. The traditional EXX registers don't have that "problem" (but RXXs do):

   83 C0 01 add eax,0x1
48 83 C0 01 add rax,0x1
83 C4 01 add esp,0x1
48 83 C4 01 add rsp,0x1
41 83 C0 01 add r8d,0x1
49 83 C0 01 add r8,0x1
41 80 C0 01 add r8b,0x1
>>
>>108923111
>loop instruction.
CISC trash
>>
>>108924152
Seethe more, Intel.
>>
>>108924154
inb4
>yes but my CPU has 20 pronouns, too
fucking diverse trash faggots thinking they are special snowflakes. Bro it's all just turing machines. They are all the same, no matter the gender
>>
>>108924164
>total autism crashout
Holy
>>
>>108924013
>upper to lower instead of lower to upper
Faggot.
>>
File: 177995598075861.png (20 KB, 778x128)
20 KB PNG
>>108924237
huh fuck boi wing ching dong?
>>
>>108924259
I make mistakes.
>>
File: 177995712285086.png (106 KB, 745x972)
106 KB PNG
I have removed the string reversal.
>>
I have an assert/__builtin_trap() call that is causing my program to hang and not respond to signals instead of just immediately crashing like its supposed to. I've never had this happen before. Any ideas?
>>
>>108924473
nevermind, figured it out. I had a bad munmap call that was really confusing the kernel
>>
Just trying to watch some videos on ASM.
https://www.youtube.com/watch?v=GU8MnZI0snA
trannies get rammed down my throat.
>>
>>108924546
The best assemblers are the best assemblers.
>>
>>108912856
That's some ugly fucking thermal paste
>>
>>108924354
Can't you like mov rsi, number+31 or something similar?
>>
>>108912856
Stop shoving tranime into everything
Grow the fuck up please
>>
>>108923220
And that's why you struggle with passing references around.
>>
>>108924913
I don't think so cause that's 2 operations.
I tried lea rsi, [number + 31] and it game me an invalid operation error.
>>
>>108924923
Someone who spergs out about anime on a website trying to tell others to "grow up".
Classic.
>>
>>108924937
>I don't think so cause that's 2 operations.
Most assemblers would do the math during assembly.
It knows where "number" is, it's just some memory address you have defined, and so the assembler would just take that number, add 31 to it and put the result into the instruction.
But I don't know your whole code.
>>
File: Ed3-6DiXkAImQ5u.jpg (77 KB, 1200x675)
77 KB JPG
>>108924923
>>
>>108924937
lea rsi,[rip + number + 31]

?
>>
File: 1779966672312194.png (47 KB, 829x409)
47 KB PNG
>>108924988
>>108925002
This works.
The brackets were the issue?
>>
File: 1779966817896718.png (10 KB, 280x148)
10 KB PNG
oh yeah the brackets are for dereferencing, I got confused cause rsp is an array of references that need to be derefenced so you can defeference the dereferences.
>>
File: lea.png (8 KB, 2772x60)
8 KB PNG
>>108925017
That's ... not how that's supposed to work, but whatever.
>>
File: lea_atnt.png (2 KB, 544x44)
2 KB PNG
>>108925033
>the brackets are for dereferencing
You got a weird assembler there.
>>
File: 1779967373374276.png (69 KB, 787x646)
69 KB PNG
>>108925037
>>108925052
I am using NASM you must be using AT&T
rdx and rsi end up with the same value here.
>>
File: nasm_is_weird.png (28 KB, 1112x304)
28 KB PNG
>>108925065
>I am using NASM you must be using AT&T
I have posted BOTH Intel and AT&T. BOTH use parenthesis/brackets to denote a memory reference. It's apparently just a quirk with NASM.
>>
>>108925095
Which, now that I say that out loud, makes sense. With GNU's Assembler you always have to specify a register, doesn't matter if it's Intel or AT.
lea  0x12(%rsi), %rdi
lea 0x20(%rsp), %rbp
leaq .LC0(%rip), %rcx


The fact that you didn't suggests that NASM was already doing [RIP + X] behind the scenes. It's just such a clustereff.
>>
>>108925095
based NASM.
>>
improved short fag greeting card(no space at the start of string)
/* ... don't just stare at it, run it! */
#include <stdio.h>
#include <time.h>

#define U 0b1000
#define R (0xA*U)
#define A "GCJKTZ(("
#define FAG(G) ((struct timespec){0,(1e5*(G))})
int main(){short f,a,g;for(f=a=g=0;R;f=++f%U,g=nanosleep(&FAG(666),0))for
(g=0;g<=R;++g)putchar(R==g?'\n':A[(g+(R/2>(a=++a%R)?f:U-f))%U]-((R/2>a)?g
+f:g-f)%U-1);}
>>
>>108922759
It actually makes a very large difference in filesystem traversal, when you're opening tens of thousands of directories recursively.
>>
>>108925235
Did you like push a PR to factorio and they rejected it so now you just spend your entire life screeching about how much better optimized it could be.
>>
>>108912856
Alright bros, I've been unemployed as an IT guy for a while because everyone now wants a dude that can tech support AND be a full stack programmer (I'm more of a hardware/network guy), what should I learn to get over this hurdle?
>>
>>108926172
Haskell



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