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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: Asuna.png (1.02 MB, 1273x1800)
1.02 MB
1.02 MB PNG
What are you maids working on?

Last one: >>106865000
>>
For me it's GNU Make, C with GNU extensions and tcl/tk.
>>
>>106908794
First for dependency injection is crap and a bloated abstraction of what most languages are already capable of doing if you know how to organize things correctly.

Only use case is massive code bases and even then it becomes convoluted.
>>
>>106908949
damn I missed it, ok second
>>
>>106908949
>>106908963
Skill issue.
>>
>>106908949
Dependency injection doesn't mean that you have to use an ioc container, which ARE retarded.
"Dependency Injection" is just oop cargo cult speak for taking things as arguments instead of hard coding access / initilization, which is generally a very good thing to do.

You don't want modules to concern themselves with the initilization of their dependencies, just let the caller give you the thing you dependend on and then use it. It's conceptually no different from regular function arguments.
With constructor arguments it's just shitty verbose currying.
>>
#define let const auto
>>
Bangmaids should clean and not speak unless spoken to.
>>
>>106909136
>"Dependency Injection" is just oop cargo cult speak for taking things as arguments
I've found that getting programmers to understand that functions take arguments is somehow a point of contention for a lot of them.
>>
>>106909302
college IT help desk taught me 99% of people want everything to come from nothing.
>>106908794
nothing right now, but I really want to make something.
>>
>>106908949
>dependency injection
isn't it essentially higher order functions?
>>
>>106909328
It's literally just an argument to a function. That's LITERALLY all it is.
>>
>>106909233
gay
>>
Functions don't exist at the hardware level. It's all CALL PUSH POP RET.
>>
>>106909485
it's called an abstraction
>>
>>106909328
You have (usually) an interface, and some implementations of that interface. You pass your particular implementation into whatever method and use it, instead of adding the implementation to the code directly as a dependency and using it that way. It's a level of abstraction intended to make swapping out implementations easy. The reason it gets a bad reputation is because it is in the WAGIE SLOP category of programming, so 90% of examples you see of it are someone who didn't know what they were doing blindly applying a pattern in a case where it doesn't apply, such as instances where there is only one implementation of the interface and there will never be more.
>>
Virtual memory is CIA, the OS can perfectly give you a couple 2M pages for your program and stack and instead of malloc you just ask for more pages.
>>
File: applebees.png (346 KB, 599x593)
346 KB
346 KB PNG
Explain the maid thing to a boomer. Is it some tranny business or is it just enjoying huge anime tiddies?
>>
>>106909930
avatarfag schizo mental illness
https://desuarchive.org/g/post/106756520
>>
>>106909930
IDK but it's probably both
Like, maybe some are trannies but others are gooners who hate trannies
>>
>>106910361
the fuck
>>
I think there must be another approach to AI different from chat bots/LLM.
>>
>>106910361
>average /g/anon
>>
>>106909302
>>106909391
it's not just passing any argument to a function

first, it's (usually) an interface so you can easily pass different implementations
second, the argument is not just some record with values; it's an object to which some piece of logic is delegated to
third, it's (usually) an argument of the constructor or builder, which is then assigned to a field of the instance, that is then used by methods of that instance
>>
File: IMG_9277.jpg (49 KB, 1280x720)
49 KB
49 KB JPG
>be me, clueless
>zero experience coding
>decide to try and teach myself C++
>read a bit and watch some tutorials
>decide to use vcpkg to get libraries
>successfully get a few libraries to load
>want to design a program with openCV and CUDA to process images
>learn that openCV has CUDA support
>great.jpg
>openCV with cuda support won't compile with vcpkg
>notgreat.jpg
>youtube vids later attempt to install opencv[cuda] manually using CMake GUI
>compile on VS 2022
>no opencv_world*.dll
>"error C3861: 'nppGetStreamContext': identifier not found"
>grok tells me I'm lacking a few CUDA-related header files
>spend a few days trying to get the opencv_world.dll file to compile by trying different combinations of older versions of openCV and CUDA
>nothing gets the .dll to compile
>I'm now causing LLMs to talk in circles
>i don't know what to google because I don't have any experience
Anyone have advice?
>>
>>106910727
https://search.brave.com/search?q=nppGetStreamContext
>>
>>106910727
Welcome to C++
>>
>>106908794
why does she always have that big shit-eating grin
>>
>>106911298
You would too if you were a maid.
>>
What language should I learn?
>>
>>106911298
it's a big-cock--eating grin
>>
>>106911374
Depends on the languages you already know.

In general, I would not recommend learning languages just for the sake of it. Instead, focus on actual technology/area you want to learn (e.g., distributed compute, backend code, robotics/hardware, ML, etc.) and simply learn the most supported language (if you don't already know it) for use with that tech as you go along.

There are exceptions to this rule, with some of the languages being somewhat worth learning just for the sake of it out of pure intellectual curiosity and to learn some paradigms and stuff that you might find useful even in your regularly used languages. Just don't have any delusions that those are some practical languages you will actually be likely to get hired to write code in. Off the top of my head: C, any flavor of assembly, OCaml, a flavor of Scheme, and Lisp.
>>
File: screenshot.png (42 KB, 555x380)
42 KB
42 KB PNG
tried writing an fps limiter, got some weird results
picrel is basically the same code but rewritten to have less time calls, the "lastframeend" is just the time since the start of the frame to right before that code, so all the logic and rendering
somehow, the top code is massively out of sync, doing 220FPS when I specify 240, while the code below has less than 1% error
>>
>>106911374
Japanese
>>
Fuck you Ebussi
I will not be told how to decorate my windows,
I will not wait 26ms for my window to open
I will not call 4 separate functions to change a margin around a widget
I will not write css
I will not write 10 lines of code to change a widgets font
I will not eat the bugs, I will not get in the pod and I will not be happy.
>>
>>106911573
>global state
DANGEROUSLY BASED
>>
>>106911374
Rust, .NET, Maybe Go if you're in spaces that Go is popular.
>>
>>106911623
use case?
>>
>>106911716
Gooning to obscure eroge.
>>
>>106909930
>>106910361
>>106910464
Threadly reminder that Eli was demoing a novel way to find neural networks in this very thread, but anti-maids and bad jannies bullied him off the site.

https://desuarchive.org/g/thread/106672454/#106681260
>>
>>106911779
threadly reminder that you are faggot eli
>>
File: ainsophSefirot600x600.jpg (52 KB, 600x600)
52 KB
52 KB JPG
>>106911374
Hebrew and Aramaic. Then convert to Judaism.
>>
fucking hell i'm tired of go
>>
>>106911966
>everyone i dont like is eli
>>
>>106912349
I don't get why they chose such unintuitive and awkward syntax. That and having to duplicate types for no reason.
>>
Should I just use a monorepo instead of bouncing between different Gits?
>>
>>106910727
Use linux and do sudo apt install.
>>106912349
What's the best compiled web backend language these days? Go? Rust?
>>
File: file.png (13 KB, 462x334)
13 KB
13 KB PNG
ok hear me out
>>
>>106913278
Delete this.
>>
>>106910536
This is just OO cope to make adding an extra parameter to your functions sound more amazing than it is.
Also holy shit what did they do to the captchas
>>
>>106911573
you only call glfwGetTime() once per loop
frameStart is set at the start of the frame
you’re doing glfwGetTime() - frameStart >= target_time
but glfwWaitEventsTimeout adds a bit of extra time that you don’t account for
small errors add up each loop
>>
>>106913278
I can't believe you evaporated an ocean for this.
>>
File: clown-spice.jpg (70 KB, 738x415)
70 KB
70 KB JPG
>>106913278
>>
>>106913278
You should at least do something like
openai.api_key = os.environ.get("OPENAI_KEY")
or whatever so you won't leak nor have to remember censoring your key.
>>
File: screenshot.png (54 KB, 525x350)
54 KB
54 KB PNG
>>106913370
thanks to you, I solved it
it wasn't the wait itself, it was the framebuffer swap time that wasn't getting accounted for, it took only 0.1ms but it fucked my FPS over a lot
new code is picrel and it's super accurate, doesn't move more than 0.05FPS from the target

my new problem is that mouse movement is fucked, it's supposed to be fps independent but it's slow at high fps and fast at slow fps, I assume it's because of the tons of mouse events it processes while waiting for the slow fps but I dunno
>>
stupid question but i heard to get better at a programming is to make projects, but what if you don't know how to start?
like lets say i want to make a program to rip youtube videos and download them as an mp3? or i want to auto download all images on a 4chan thread?

how would i learnt to do that?
i can make regular isolated programs, and use apis but that's about it
>>
>>106910727
>zero experience coding
>decide to try and teach myself C++
>read a bit and watch some tutorials
I really admire your spirit here anon. You have 2 options if you're fixated on C++. Move to Linux do you can sudo apt get your libraries, or embrace the insanity of C++ libraries. My advice is to start with a different language that has better syntax and library support. There's no shame in it.
>>
>>106913766
that's a pretty hard project, because it's all about parsing websites
first of all, you need to understand what you need to do, downloading 4chan images is a lot easier
step-by-step, what is required?
1) connect to the internet, download 4chan html
2) parse the html, find the image links (knowing the site's structure, you can look for specific strings instead of really parsing the html)
3) connect to the links and save the data onto files
now do each of those steps separately, if you can't do it then subdivide the steps, like so:
1a) open a socket, connect to the url
1b) send the request
1c) read the response
>>
Guy called me, and I told him about my ongoing projects and he saw my Github (github.com/Chubek), I was hired on the spot.

He's told me to come meet him in the shithole that is called Tehran (congested capital, hell on earth, I'm just gonna dash in and out) and give him a presentation for the ly* project. That includes everything, from lyIR (the intermediate representation), lyCC (C compiler I'll build with the IR), to all the other ly* stuff, from POSIX utils like lyGrep and lyAwk, to the POSIX OS, lyOIX, all made with lyCC.

I'll add some QoL features to C. Like fat pointers, templates, partial evaluation, etc.

Of course, I won't be making much, but I'd be doing what I love.

Knock on wood. Don't give me the 'evil eye' pls. I lost my onyx pendent. And what do you know, two weeks after losing my pendent, I've gotten the 'sleeping disease'. I cannot sleep. Like that dude in Nick Crowley video.

I managed to sleep using some sleeping draft. I don't feel tired, but if the draft loses its power, I will never be able to sleep, and die :(

Anyways, I'm currently working on TPrez, a TUI-based presentation system, to impress them ever more so. It uses an S-Expression based DSL. Has macros and stuff.
>>
File: ezgif-750b68bee4e3b5.gif (2.91 MB, 348x516)
2.91 MB
2.91 MB GIF
>>
>>106914148
Imma die a virgin :( This sleeping disease is serious. I'm going to calla neurologist on the doctor app, but they can't help :(
>>
File: 1426911492184.png (26 KB, 396x400)
26 KB
26 KB PNG
I'm trying to program a videogame using DeFold (Lua engine). The game is going to be a cross-platform false-3D (think oldschool pokemon) sprite-based game. I don't know how to use Lua, which is one important reason I want to make a game in it: I want to learn Lua in the process. Anyway, I have some questions about implementing character customization with sprites.

>what's my question
Let's say my game has a playable character -- Hermione Granger for instance. Normally if I was going the simple route in a game like this, all I'd have to do is create a set of sprites (atlas) representing Hermione's movements. I'd have sprite animations for her walking in every direction, casting spells, running, climbing, standing/idling, falling down, dying, etc. And maybe, I could make an alternate set of sprites for an alternate skin-- let's say in the event where she gets some of her clothes shredded by dark wizards. Again, I'd have to make the same set of animations (walking, running, casting, etc) for the alternate skin. My question is, what if I wanted to actually implement a real customization system? In other words, I want the character's appearance to undergo a wide variety of changes throughout the game, but I don't want to create 10 trillion variations of sprite animations. Like, let's say the user wants Hermione to have a different colored cloak, or maybe a different hairstyle, or a different hat. Or maybe wield a different weapon besides her normal wand or something. Do you guys have any advice for how to deal with this? is DeFold going to limit me from enacting this type of character appearance customization?

>my ideal scenario
I'd ideally want to have Hermione's body be its own sprite, and then maybe have her clothes and equipment somehow rendered independently on top of her main body sprite. Since I'm a novice, does anyone have any advice for how to do this in DeFold?
>>
File: ss2025-10-17at04-02-23.mp4 (2.04 MB, 1030x1100)
2.04 MB
2.04 MB MP4
>I have now realized I can embed js into documentation
Has Science Gone Too Far?
>>
File: NzqvMRo.jpg (596 KB, 1203x1077)
596 KB
596 KB JPG
>>106914512
I'm gamedev anon from above-- thanks for giving me some homework. Pico-8 is written in Lua. This will come in... handy with my hackerman projects. I'm gonna read this wiki. Embedding JS is a great way to do web pwn shit. Real hackerman energy right here mang

>pico-8 wiki link from your video for anons' convenience
https://pico-8.fandom.com/wiki/P8SCII
>>
>>106914496
https://forum.defold.com/t/superimpose-one-sprite-on-another/74933
>>
File: arte.jpg (1.49 MB, 1856x2464)
1.49 MB
1.49 MB JPG
slowly working through 42 piscine, I think I'll do csapp later then ostep if I have time but I'd like to go deep into DSA before that, I need to learn some employable stack thoughbeit
>>
>>106914632
Thanks anon.
>>
are singletons fine when I'm using them to express physical hardware? can't exactly duplicate that, and saves me from passing around some sort of 'context' object to everything
>>
>>106914673
That entirely depends on the semantics of these singletons and what do you want to use them for.
For example embedded Rust uses singletons extensively. Mostly to leverage borrow checker to make sure that only one part of the code uses one peripheral at the same time and to write code generic over multiple units of same kind of peripheral.
However your description sounds more like a global than singleton.
>>
Identity mapping + malloc: every program gets static pages for code, static data and stack, and one initial page for heap. When you call malloc a virtual page is appended to the end of the heap and that's how it grows.
Thoughts?
>>
>>106913339
extra parameter with part of the logic*

if you want to maximally trivialize what it is, don't leave out the important bit
again, it's not just any extra parameter - it's not DI if you add parameters that are just data
>>
>>106914496
>8-bit pokemon-like game in style but it's Harry Potter and the huge map is the castle and its surroundings
kino
>>
File: ssasd.jpg (109 KB, 1280x774)
109 KB
109 KB JPG
>>106908794
time to learn C to counter having learned Haskell...
>>
>>106916406
>C: 3%
absolute king
>Go: 3%
>the mainstream medias are going to backdown.jpg
yeah I don't think so, nice try Gewgle
>>
File: GZoD7LkagAAqkrP.jpg (1.62 MB, 4096x3946)
1.62 MB
1.62 MB JPG
what books/tutorials do you recommend for learning C? I am already a programmer and I just want to learn C to have fun, but I pretty much forgot everything I learned in uni
I heard K&R is outdated but I still see people recommending it, so what's the deal?
>>
>>106916772
read the souce code of softwares you like
start programming something in it. when you want something you're used to in other programming language, say a dictionary, implement it and continue
>>
>>106916772
>I heard K&R is outdated but I still see people recommending it, so what's the deal?
learn K&R, and just read online afterwards about the errors in the book
>>
> cpu supports avx2
> does _mm256* just fine
> cpuid leaf 7 ebx 5th bit (avx2 bit) isnt set
wat do
>>
>>106908949
When I first started learning C# I heard so much about DI and I had a hard time understanding how it was different to what I was already doing. I guess I still don't really get why it even has a name
>>
>>106917036
>I guess I still don't really get why it even has a name
it's human nature to name things
why wouldn't it have a name?
>>
>>106917061
I don't think it's a technique that needs to be referred to by name or something that needs to be discussed even, it's just passing arguments
>>
>>106917090
>it's just passing arguments
see >>106910536 >>106916162
>>
programming AI escalation ladder
>you must pay us to use our AI
>ok, we'll make it free, but you must open an account with us to use our AI
>fine, just use it, but you must install our product to use our AI
>ok, you don't need to do anything, just please use our AI
>c'mon, anon, it's right there, right in the editor, just use it please
>that's it, you can't disable our AI tab anymore, you VILL use it!
>YOU BENCHOD MOTHERFUCKER SON OF A PROSTITUTE JUST REDEEM THE AI!!!
>>
>>106917061
>why wouldn't it have a name?
Except it already has a name. "parameter" doesn't cover it but things like interface, abstract classes, virtual tables do and have a clear meaning. On the other hand, "dependency injection" doesn't have a technical meaning, it's corporate techno-babble.
>>
>>106917305
>>ok, we'll make it free, but you must open an account with us to use our AI
>>fine, just use it, but you must install our product to use our AI
>>ok, you don't need to do anything, just please use our AI
Ponzi scheme
>>
>>106916406
Haskell xisters... static typing was supposed to prevent this...
>>
>>106917666
cursed get
>>
>>106916406
lispsissies, they forgot about us again...
>>
>>106917311
obtuseness doesn't make things not have meaning
>>
>>106916406
>>106916742
It is funny how desperate cniles are to maintain face that they have to resort to making up fake graphs that show their language and usebase as good.
https://desuarchive.org/g/search/image/lpefOq3EscbItb7-JhCzyw/
https://desuarchive.org/g/thread/106780681/

And the best part is that given how low IQ many of cniles are, many are bound to fall for this. Just like with the pseudo political manifest that someone wrote few months ago. On start when people read into it seriously and started picking it apart, the guy who brought it was all like "it's just satire, don't think too hard about it" and then inevitably many cniles just took it at face value and assumed it's a real deal lmao.
>>
>>106917803
>cniles are one person
>>
>>106917863
This is not just one person who falls for these things.
>>
>>106917702
technically, "dependency injection" just means that indirection occurs. It could be a function pointer, a lambda, a virtual table without data field, a virtual table with data fields, a thunk, an anonymous coroutine, even an simple address to jump to or an array of jump addesses. You don't know.
With "interface", "abstract class" or "virtual table", you know the shape of it. You know that there can be several function pointers, not just the one, and that they likely do complementary function on the data structure/state.
>>
>>106917879
this is still an idiotic generality, for propping up "good" languages
>>
>>106917939
The fact that these midwits fall for these things does not mean other languages are better, unless you fall into that tribal mindset as well and judge technologies based on perceived differences in their userbases instead of technical merit.
>>
is spring boot still used
>>
File: uhhuh-uh.gif (1.6 MB, 498x404)
1.6 MB
1.6 MB GIF
>>106917964
>The fact that these midwits fall for these things does not mean other languages are better,

>unless you fall into that tribal mindset
that is exactly what you're doing
>>
>>106918159
Nope. I never said that C is a bad language nor I ever brought up any other language to compare it against.
All I do is point out how often does cniles fall for this shit, which is a matter of fact as shown by links I have posted and situations I brought up.
This has nothing to do with technical merit or programming, this is just group X being being absolutely retarded.
>>
>>106918208
"cniles" are many people, stop making generalities
and who cares about who cares about some irrelevant clickbait graph, let alone how a category of people presumable react to it?
>>
>>106918284
>and who cares about who cares about some irrelevant clickbait graph, let alone how a category of people presumable react to it?
I do. It's always fun to poke fun at overconfident underachieving people.
>>
>>106911779
release it
you won't
>>
Anons
I am trying to make a small self hosted music player for myself. I want to use mysql for database. I have a basic ui but don't have a backend. Will ffmpeg work for the playing? and this also my first programming project. Any resources or repositories I can follow would be appreciated
>>
>>106917305
>send a copy of your passport to Tel Aviv
>>
>>106918319
what's you problem with "cniles"? I mean facts, no self serving assertions.
>>
>>106917913
wrong - dependency injection is not a synonym for indirection
>>
>>106918381
I don't have any problem with them, I find them amusing.
>>
>>106918344
I am not Eli and I don't know how to contact Eli. I was just pointing out that the only people here who tend to go beyond programming 101 or shitposting about tiny language differences are maids and the head maid was bullied off the site by a mixture of malevolent retards and obsessive anti-maid jannies. That's why this thread is stuck in a constant slop cycle instead of producing anything interesting.
>>
>>106918430
Eli never produced anything of value. He also derailed countless of threads and broke multiple 4chan rules, with avatarfagging being the prime example. He was nothing but an extremely obnoxious shitposter.
This thread has multiple of people working on more advanced projects than he could ever do.
If you do not like this, feel free to move to different place where you can avatarfag and circlejerk to your heart content. I recommend making a discord server for likeminded people and stop coming back here.
No one wants any of you here.
>>
>>106918413
>>unless you fall into that tribal mindset
>>106918408
based on wikipedia, https://en.wikipedia.org/wiki/Dependency_injection
indirection is half of what it stands for. the other half is ridicuously irrelevent and hardly deserves a name
>>
>>106918430
maidniggers can't follow the most basic of conventions and rules, and insist on shitting out their culture subversion with every post
i will not read even a word of their posts and the only valid action to be taken is to immediately report any and all maidnigger posts
>>
File: 1758275096876669.jpg (99 KB, 500x450)
99 KB
99 KB JPG
I HATE CSS I HATE CSS I HATE CSS I HATE CSS I HATE CSS I HATE CSS I HATE CSS I HATE CSS I HATE CSS I HATE CSS I HATE CSS
>>
>>106918482
>>>unless you fall into that tribal mindset
unless you fall into that tribal mindset as well and judge technologies based on perceived differences in their userbases instead of technical merit
>>
>>106918486
Git gud
>>
File: 1730115183463660.jpg (103 KB, 531x497)
103 KB
103 KB JPG
>>106918518
I will gas your bloodline, webnigger
>>
>>106918482
have you even read the article you linked?
>>
>>106918408
nevermind you're right and I was right the first time when mentioning interfaces and abstract classes which can both be resolved statically
>>
injection sounds like "put in afterwards", as opposed to "baked in from the start"
it would apply better to aspect oriented programming
>>
>>106908794
asuna's hairy pussy
>>
File: Shrug.jpg (41 KB, 427x441)
41 KB
41 KB JPG
>>106918461
>>106918485
>>
>>106909241
>Bangmaids
is that a real word?
I want moer
>>
>>106910727
AI is good at code but not good at dealing with C++ libs.
im betting that you are not deleting the cmake cache every time you make a change, so your changes to variables are not actually being done.
also OpenCV does support cuda on vcpkg, it's a feature.
https://vcpkg.io/en/package/opencv4.html
If you are using classic mode vcpkg, I think you just add opencv[cuda], and if you are using the manifest json just add cuda to the features list.
I wouldn't be surprised if it's a weird library such as QT but it also might just work.
>>
Is there any point in fine tuning llm models with code bases?
Like if I want to write quake mod should I fine tune some model with quake source and maybe source from some mods or will it just mess up the model?
>>
I'm writing Rust and having fun
>>
>>106919719
fuck off tranny
>>
>>106918486
why? it's easier than ever since most of the meme problems like "center a div" are just use css-grid. if you're too lazy to define grids and screen size breakpoints, you can use flexbox like a nigger faggot too. it's really painless. the only thing shit about it can be said about any design problem, it isn't wysiwyg tier.
>>
>>106919719
I, too, am writing rust and having fun.



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