[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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1723912897984.jpg (21 KB, 772x397)
21 KB
21 KB JPG
Welcome to the Daily Programming Thread. What are you working on, /g/?
Previous Thread: >>101907877
>>
File: img-2024-08-17-17-58-51.png (1.5 MB, 2702x1704)
1.5 MB
1.5 MB PNG
Should provide a comic-esque user experience with the catalog of thumbnails affixed in the left pane and the threads in the right pane. I think there are a few different solutions for enabling image saving, and likely some cool custom context menu elements which could improve the browsing experience.
>>
>>101943382
for a comic-esque browsing experience with thumbnails on the left and threads on the right, you might want to check out 4chan X. it’s a browser extension that adds a lot of customization options to 4chan, including better image management and enhanced UI features.

another option is Vichan, which is a standalone imageboard software that can be customized heavily. it’s not specifically for 4chan, but if you’re running your own board or using one that supports it, it allows for extensive customization, including how images and threads are displayed.

both tools can give you a more tailored browsing experience with options for saving images and customizing the context menu.

/posted by chatDPT
>>
>>101943382
A linear list on the left would save more space and [+] buttons should allow to reduce boring threads to a 1 line stub with only the subject
>>
>https://clojure.org/api/cheatsheet
Does this exist for Common Lisp? The HyperSpec is too verbose.
>>
h a s k e l l !
>>
>>101943428
no idea, but here's a better version of that cheatsheet
https://jafingerhut.github.io/cheatsheet/clojuredocs/cheatsheet-tiptip-no-cdocs-summary.html
>>
trying my hand at gpu accelerating things you normally wouldn't in ways you normally wouldn't to get better at it
setting up a basic testing environment to see if i can't try and translate mocks of melonDS's weird layers of opengl compute to a single pipeline in HIP just as a proof of concept
being able to (de)compose textures and samplers on the fly in particular seems like might be able to help
>>
>>101943511
u mena haskal?
>>
>>101943713
Haskalah!
>>
File: 1708693979121164.png (246 KB, 1212x944)
246 KB
246 KB PNG
toylang progress, trying the REPL as a standalone application + added some debug commands + implemented structs
>>
Where do I start with reverse engineering? Specifically games.
Like how do people figure out specific memory addresses and what they do?
>>
>>101943127
does anyone know how c++ stores function pointers?
as in whether they are label offsets it CALLs or they are absolute addresses (which makes more sense)
>>
>>101944125
absolute addresses i guess
for pointer to member functions its probably not as simple due to virtuals
>>
>>101943511
haskell!
>>
What do you do when you've been stuck on a linking error for 3 days and feel so dumb you want to kys?
>>
>>101944125
read the emitted code, schizo
>>
-XOverloadedStrings
instance IsString a where 
fromString = error
>>
>>101944396
post logs
>>
someone make a /gedg/ thread already
>>
someone make a /r4w/ - ring four wrap thread already
>>
>>101944880
If you can't even make a thread, how do you expect to make a game?
>>
>>101944101
almost every game is made in unity so you just need to learn how to use the unity decompiler and you will get all the files and classes and function's, you might even get the names of everything if they didn't strip it.
some games may obfuscate by transpiling C# into C++ however.
every game with overhaul modding support (the whole game can be changed from the ground up) tends to use C# recompilation due to unity's popularity, and I bet there are various discord servers you can find where people can help you figure things out.
If you are talking about binary compiled games like C++, you should forget about it for 32 bit binaries because 32 bit binaries by default enable frame pointer omission which makes navigating assembly harder. Then you have to deal with inlining which can cause everything to look like a mess of assembly with repeating code (but it depends on the project, there is a chance code written in C is less dependent on inlining and the general style)
technically you can use tools like IDA (pirated) and it should be able to convert the binary into C but there is probably limited success with that. And you can figure out what functions do based on strings and you can see what the game overall does by tracing all the system functions, and you can view all the rendering calls / shaders / etc using RenderDoc or Nvidia Nsight.
the problem is that it's already very hard to read a large code project when you have the source code, so it's basically impossible to figure out anything useful from the assembly especially if you are not an expert so you should just give up.
>>
>>101944101
IDA and x64dbg.
>>
>>101944808
Error LNK2019 unresolved external symbol "void __cdecl fmt::v10::detail::assert_fail(char const *,int,char const *)" (?assert_fail@detail@v10@fmt@@YAXPEBDH0@Z) referenced in function "unsigned __int64 __cdecl fmt::v10::detail::to_unsigned<__int64>(__int64)" (??$to_unsigned@_J@detail@v10@fmt@@YA_K_J@Z) Sandbox C:\dev\panda-engine\sandbox\Sandbox.obj 1
>>
>>101945291
>/gedg/
>making games
kek good one
>>
>>101945291
I gave up on that general when I realized my engine was at best a crude physics simulation sandbox and it would be years or possibly decades before it even resembled any actual game architecture.
>>
>>101943382
This is just going back to the frames version of the site from 2 decades ago.
>>
File: evolution.png (1.96 MB, 1920x3260)
1.96 MB
1.96 MB PNG
>>101945295
... what a load of horse pukey.

>almost every game is made in unity
Lol no.

>some games may obfuscate by transpiling C# into C++ however.
Most games don't use C# at all. Wild, isn't it.

>the whole game can be changed from the ground up
What does "from the ground up" mean? Because changing things in the game is more a matter of documentation and dev kits than it is of the language used.

>you should forget about it for 32 bit binaries
Lol no.

>Then you have to deal with inlining
Oh no. Inlining. Whatever shall we do.

>there is probably limited success with that
Nonsense.

>you can see what the game overall does by tracing all the system functions
How?
>I know the answer, but do you?

>it's basically impossible to figure out anything useful from the assembly
Nonsense again.
>>
>>101944101
>Specifically games
prepare to suffer if you target is something recent
for example wow legion has
>tls callback entry point fixing up everything before main
>code jumping inside an existing instruction and interpreting the arguments as a different opcode
>retarded amounts of obfuscation / garbage code filled with rdtsc loops
>control flow so complicated the graph doesn't render
>code encryption
>nonstop exception spam + timing check to detect debuggers as a last resort
and this is probably fucking nothing compared to vm drm
>>
I enrolled in this codewars website as a self taught. I feel extremely retarded since I'm taking forever to finish simple challenges. Is that normal? The weird thing is that I'm far more efficient on larger concepts (CRUDS, REST, databse shit and configuration stuff) than for algorithmic shit. Even the simplest ones.
>>
>>101945523
That's seems like a lot of extra work wouldn't it be easier to just let people cheat?
>>
>>101945576
Solving toy problems and creating real world applications are different disciplines.
>>
>>101945587
I mean it's not that much extra work for them
the main issue is the code obfuscation and they just do it with some automated tool
>>
File: vs.jpg (89 KB, 1080x868)
89 KB
89 KB JPG
>>101945576
>the less in-depth a topic is the less time it takes me to understand it
>>
>>101945634
It's more of a "problem solving" skill issue. But I don't know if it's something you can train to the point of going from being a retard to quickly know what solution you can provide to a problem.
>>101945609
I'd like to able to do both. I also have this issue where I'm having a hard time coding for long sessions. My current attention span is small asf
>>
>>101945688
>I'd like to able to do both. I also have this issue where I'm having a hard time coding for long sessions. My current attention span is small asf
a) stop being retarded
b) git gud
>>
>>101945688
>I don't know if it's something you can train to the point of going from being a retard to quickly know what solution you can provide to a problem
Practice. >>101938165 took twelve hours, and a lot of it involved shooting cops in GTA IV.
>>
>>101945576
i am a genius and it was taking long (couple of hours) for me to write a working solution to [blue rank] problems
now if you were to throw at me any sort of problem solvable by engineering i would conjure up the solution in 2 minutes and write it in 30
>>
>>101945777
engineer a mail client that doesn't suck
>>
>>101945496
https://steamdb.info/tech/

I don't really care about the technicalities if you find it fun, that's fine. If you are happy I am happy :)
>>
File: treetable.png (37 KB, 524x346)
37 KB
37 KB PNG
>>101943127
how the hell ami supposed to achieve this in wxwidgets T_T
>>
File: slop.png (447 KB, 1770x810)
447 KB
447 KB PNG
>>101945979
Man, that's a lot of slop I've never heard about - and most people too, judging from the follower count. Somehow I don't think OP had those games in mind when he asked about reverse engineering.
>>
>>101946119
These seem like pretty popular games tho
>>
>>101946119
maybe you are correct about anon's taste, but I don't know what anon would accomplish reverse engineering older games, and a lot of the popular older games probably already have a open source remake or a source code leak.
>>
File: lapd_hells_gate.png (265 KB, 1438x1078)
265 KB
265 KB PNG
>>101946442
>I don't know what anon would accomplish reverse engineering older games
Making them run better on modern systems? Grandia 2 got completely fucked over by MS putting their compositor between the hardware and the game, and this sucker used to use 100% of a CPU code before I dug a sleep routine into one of its crevasses.

>a lot of the popular older games probably already have a open source remake or a source code leak
Like?
>>
>>101946613
Future cop on ps1 was based.
>>
File: 1700103096334936.png (1.45 MB, 1024x586)
1.45 MB
1.45 MB PNG
>>101943127
Just bought this course by a dutch qt
wml
>>
Is CUDA fastest way for bitwise operations?
I have binary feature matrix with 3 million individuals and 2000 binary features. I'm interested to measure similarity of features and individuals. I have already made code with Julia Language but trying to make it faster
>>
>>101945434
anon...
just from those symbol names i can tell exactly what's happening and with what library too
https://learn.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2019?view=msvc-170
fmt was built with assertions off
you're probably building for debug and that turns assets on automatically based on an #if defined(_DEBUG) or something
or maybe you need to be linking to a debug variant of the library instead

hell you could even go to fmt's repo and copy the definition of the function

or if you're using VS2022, stop using fmt and just use std::format
2019's got an ABI issue with it which i'd be wary of but VS2022's fine
>>
File: .jpg (28 KB, 652x538)
28 KB
28 KB JPG
Hear me out.
Functions, as first class values.
>>
>>101947253
i mean i guess if you do it properly
the execution environment of gpus is very different, i assume you have zero experience with things like graphics programming?
it's not just as simple as throw code at thousands of threads unless it is which sometimes it is
in the case of bitwise ops(?) depending on the data types you'd potentially also be able to get away with SIMD within a register where you treat integers as bit vectors
>>
>>101945295
>>101945523
I’m interested mainly in console games, 3DS being the most recent. Like some people have patches which change a 3DS game’s memory locations like ocarina of time or majoras mask, but I have no idea how you’d even start to figure that shit out, especially with entire functions which you layer on top of the existing game.
>>
>>101948023
(Codata)Values as first class functions
>>
>>101943127
all that was left to do for the day was research the function pointer stuff, the gen is the following:
11c8: 48 8d 0d 7a ff ff ff lea -0x86(%rip),%rcx # 1149 <_Z10other_funci>

and i need to know what the absolute fuck is up with this encoding since rip is not modrm addressable as far as i know and i cant find the special opcode, anyway O0 does not keep the order of inline assembly input arguments so that is interesting
>>
you know sometimes i really do the dumbest fucking things, like there is a hexdump right on the left you fucking nigger
>>
>>101949548
>>101949557
I was about to say, but it gets even worse if you look at the same code through Intel syntax:
00007FFAC5F606B8 | 48:8D0D 7AFFFFFF | lea rcx,qword ptr ds:[0x7FFAC5F60639] |


Does that make more sense to you now? Whenever AT references %rip it's usually a reference to static data, seeing as modules are relocatable.
>>
>>101949609
it is the same exact assembly representation on my machine:
    1068:       48 8d 3d 1f 01 00 00    lea    rdi,[rip+0x11f]        # 118e <main>

osdev wiki mentions rip relative addressing, there is some magic value for the modrm to do this, i dont feel like opening a manual for it right now tbdesu
>>
protocol for a real time control system?
>>
>>101949921
Control system? You mean like the message formats and protocols used by real time operating systems?
>>
>>101949975
no, like the communication protocol for a control system spanning many machines all talking to each other
>>
sirs im still learning messaging and using csharp since it has the builtin delegates.
public delegate void Notify();  // delegate

public class ProcessBusinessLogic
{
//Dictionary<int,int,string> dbTableCache;

public event Notify ProcessCompleted; // event

public void StartProcess()
{
Console.WriteLine("Process Started!");
// logic to read last 5 rows my database table
compareReadWithcacvhe(){
if read.rows > cache.rows{
OnProcessCompleted(readRowData);}}
}

protected virtual void OnProcessCompleted() //protected virtual method
{
//if ProcessCompleted is not null then call delegate
ProcessCompleted?.Invoke();
}
}


so is my logic correct? What im trying to do is keep the last read as cache in my app, rereading the table and, if last read has more data than cache, then send this last row to whatever monitor is subscribed to this event.
>>
File: 1.jpg (20 KB, 309x310)
20 KB
20 KB JPG
>>101950462
yeah, i know code is wrong, but just pay attention to app logic instead


My question is how am i supposed to use the ProcessBusinessLogic class from my example as a background worker?
In windows i could use task scheduler to run the dll each x minutes but this would wipe my cache.
>>
>>101950462
so can i somehow keep alive an instance of ProcessBusinessLogic and make it execute startProcess() every x minutes without task scheduler?

What is the proper way to accomplish this?
>>
File: image.jpg (206 KB, 1280x720)
206 KB
206 KB JPG
done with c++ as well, writing all my vst code with rust and bindgen in the future
>>
>>101950578
nicetry but everyone knows rust is useless for embedding and real time
>>
>>101950716
you don't have any proofs
>>
>>101950730
prove it for yourself just kick a rock
>>
>>101950578
... y'know, Rust had a chance to shake things up once. Getting rid of generic allocators, implementing mreserve/mcommit ... they could've done it, but instead they decided to cater to the dregs of """""software engineers""""".

And the fact that so many trannies use it dispels the notion that, for all their neurodivergency, at the very least they're good at what they're doing. It's all so tiresome.
>>
>>101950917
Well since Cosmic crashed and burned the emperor's clothes are fully off now, all that hype disappeared over night, they're never coming back from this
>>
>>101950975
What are you referring to?
>>
>>101943127
Learning C is going well anons! Just got done learning about double pointers, and how to use them with data structures like a linked list etc, and pointers to functions
>>
>>101951010
Pop OS developers made a window manager called Cosmic, it is a horrific resource hog and full of bugs, they are trying to do damage control by calling it "alpha"
>>
>>101951147
That does not seem to be what people are reporting.
>>
>>101951222
Of course the paid shills will tell a different story, but even so, the truth will out
>>
>>101944418
dont tell him the super power, buttmilk
>>
>>101943127
Im the 90iq anon from yesterday.
I tried to narrow down what I'd to learn to: >recursion,
>basic understanding of algorithms with ability to turn description of steps into code.
>Long term goal: college level mathematics
Are there any books or materials that cover these, even if aimed at children? Mathematics are hard to learn from scratch and no tutor as they usually either are exercises or theory with no examples and no exercises.

As long as I will be able to code even with worst big o and it will work I will be happy. That's why I think I'd skip data structures for now, unless that's important or simple enough.

Rhe target is go or rust but maybe materials would be available for python.
>>
>>101948221
if you are talking about gameshark or genie or whatever codes, one way to find an address is by using a tool similar to cheat engine where you just find the address of variables that change. But the variable needs to be stored in a static memory location (a global variable in code), there may be addresses that are not at a fixed memory location, and you may need to do something more complicated that I am not aware of, but I imagine it probably uses code, and I imagine the gameshark or whatever code can embed raw assmbly instructions inside of the code which is probably noticable when the code is longer than 8 characters.
You could just ask the person who found / made codes for more advice.
>>
>>101951873
try Khan Academy for math.

>That's why I think I'd skip data structures for now, unless that's important or simple enough.
You don't need to know how to build them, but you certainly need to know how to use vectors, maps/dictionaries, and sets.
>>
>>101950462
Use
EventHandler<eventargs>

Raw events and delegates are usually unnecessary
>>
>>101952661
Can you prove there's no overhead?
>>
>>101952839
can you prove the overhead matters?
>>
>>101952966
Yes:
>the fastest code is the code that doesn't run
Now you.
>>
>>101953055
Ok so delete your shitty project and kill yourself, because the healthiest human is one that doesn't live.
>>
>>101945493
Wait when did frames go away?
>>
>>101953063
Sorry, there's a still a problem to be solved. It just shouldn't include the useless code you propose.
>>
>>101953101
the killing yourself is how you solve all of your wordly problems, faggot, delete code so it runs fastest, neck yourself so all your problems are gone
>>
>>101953145
Considering you didn't help with the code issue I'll assume you're incompetent in all over walks of life as well. As such I will ignore your worthless drivel.
>>
```
what the fuck is a python method versus a python function
```
>>
>>101953188
Someone should beat you to death for not even believing things you post here.
>>
>>101953228
Someone should cut your face off, but in such a way that it leaves you alive, so that people can stuff rotting fish into your blind, open gullet whenever they want to listen to someone choke to death. That's about all you're good for anyway - the amusement of others.
>>
>>101953244
>yap yap yap
that's enough wintoddler, you're using C#, your shitty tranny project's performance already suboptimal for anyone who matters
>>
What exactly confused you about "worthless drivel"?
>>
>>101953263
Have a (You) wintoddler, that will make you feel better and not piss and shit your pants and all over this thread, right?
>>
>>101952839
What are you talking about? EventHandler<> overhead is so small it is negligible that why i recommended it to you, overhead only matters in old versions of .Net like 3.0
>>
>>101953288
There are some overheads in his brain, colloquially speaking, it's best you stop trying to "help" him because you aren't licensed enough to do so anyway.
>>
>>101953288
>negligible
Proof?
>>
>>101953308
https://www.nequalsonelifestyle.com/2019/06/25/dotnet-event-handler-overhead/#introduction
the overhead only matters if you're dealing with very old computers or very old versions of .net
>>
File: 1722425254776683.png (117 KB, 550x535)
117 KB
117 KB PNG
>>101953145
>>101953228
>>101953251
Why're you aggressive?
>>
I am building a workout timer / stopwatch program as a way of learning tkinter with python, and I've figured out most of the kinks so far, now I am just dealing with the fact that I can't reference the labels I create with the following function.

 def create_action_card(name, time, row):
action_card = Label(
root, text="\n\n" + name + "/ " + str(time) + " sec",
width=50, height=4,
bg="dark orange", anchor="n",
highlightthickness=2, highlightbackground="black",
relief=RAISED)
action_card.grid(row=row, column=3, rowspan=2, padx=1)


The thought is that this functions creates a label/card that shows which exercise to do, and for how many seconds to do it. Before starting the timer, the user builds a stack of cards, that represent the entire workout. I want to delete a card when the time is up, but I don't know how to use the .destroy() function when I can't reference the card, as they don't have unique variable names.
I was thinking maybe storing them in a dictionary, and then removing them there, but I am not sure how that would work.
Any ideas on /g/?
>>
>>101954060
she's right though. the guy is bitching about "overhead" on something that doesn't matter and that he never measured. if the fastest code is code that you don't write, anon's conclusion makes sense for that specific person if that's how they want to argue with people online
>>
>>101954125
Being aggressive with others is always wrong 99% of the cases
>>
>>101954257
works for me in real life, because nobody wants to be beat up, so sad that you aren't afraid behind your computer screen
>>
>>101953494
>read up on the handle stuff
So I've never done any kernel programming, but my assumption would be that the kernel manages everything in pools? An array for events, an array for mutexe, an array for file descriptors, an array for GDI handles ... and because they're arrays, and because memory is finite, there's a chance that a pool runs out of space to add any more objects, right?

But! The kernel is subject to virtual address translations, just like processes, which means that as long as there's enough virtual address space the kernel can simply add more physical pages to the end of a pool, and thus enlarge it.

And since we're now in the 64-bit era with a 47-bit kernel address space, wouldn't it make sense to place these dynamically growable pools as far away from another, so that the kernel can just add more pages as required without having to perform copies from old to new buffers? I remember having seen charts measuring FreeBSD, NetBSD, OpenBSD, and Linux in terms of scalability (like how many file mappings, open sockets, etc they were able to manage before things slowed down to a crawl), and Linux pretty much beat them all ... but that was during the 32-bit days. Are kernel already using this technique, or are things not as simple in kernel space, and if so, why?
>>
>>101952425
My problem is how to know what represents a variable. Like memory addresses are changing all the time right? I’m just lost on how you’re meant to find the one that corresponds to the variable that’s changing.
>>
>>101954438
Even though memory addresses change all the time the way to access them doesn't. Even if you allocate everything on the heap you need pointers on the stack to access them, and the stack is deterministic - aggressively so, actually. And once you have the pointer to the main state object you'll have access to all sorts of other objects (because otherwise how would the game work as a game?).
>>
>>101954327
you don't have to say out loud that you beat your cock often inside your mom's basement, it's obvious from the way you speak
>>
Recently got into the rabbit hole of Template Haskell (aka "Code to run at compile time" Haskell) and I think it's brilliant.
Do you guys know other languages that have that? TH is literally just Haskell code, it isn't a special metalanguage or anything. Although it has some special operators/functions, it's still just normal code inside a monad.
>>
>>101955127
C++ templates mog everything, you can raytrace at compile time
>>
>>101955154
I am not familiar with C++ templates, but I was lead to believe it's a different "metalanguage" altogether. Is that not so?
As in, can you copy-paste unmodified C++ functions into the template terminators and it'd work? Can you import other non-template functions/values, etc?
>>
Working with slow processors like microcontrollers makes you appreciate just how expensive operations that you take for granted can be.

Take for example this basic-ass calculation:

uint32_t desiredTimer = (CLOCKSPEED / rate) + 1


How long do you think this simple division takes to execute? 10 clock cycles? 100? No, it takes 1040 clock cycles, or 13 whole microseconds in my case, which completely fucks up the strict timing requirements I have. I have to find a way to do this without 32-bit division at all.
>>
>>101955189
Yes, it's different and complex setups are hard to understand. But also nowadays it's not a problem anymore because we have consteval which lets you write normal C++ code that runs at compile time, the only difference is that it's "pure" environment because you can't do IO or arbitrary memory allocations or anything that would affect the compiler.
>>
>>101955213
what values does rate have
>>
>>101955244
It can vary
>>
>>101955257
is it float or integer division
>>
>>101955263
integer
>>
>>101955236
>can't do IO
You can't do any IO?
TH has a runIO function that does IO operations inside the Q (aka compile time) monad.
So anything that is MonadIO can be run at compile time - including file reads, web requests, etc. Honestly you could just runIO main and have the whole thing run inside the compiler.
>>
>>101955189
C++ templates are in practice a purest functional language. You can't have any side effects but can do complex compile-time programming.
>>
>>101955303
yeah, consteval can't do it, but you can write consteval function that puts generated data into an array which is linked into executable which is what you need if you're doing this
>>
>>101955213
Dang, x86 manual states idiv takes at most like 70 cycles iirc.
>>
>>101955388
Yeah on 32-bit+ processors its faster, but on this 16-bit processor it has to juggle the high and low words back and forth between registers for every sub-calculation, and it adds up fast
>>
>>101955343
>C++ templates are in practice a purest functional language
I've read that in one of the Template Haskell papers but wasn't sure how true it was.
But from what you guys have said it makes sense.
>>
>>101955344
>which is what you need if you're doing this
Is it, though?
I used to think something like that, and every TH code I wrote would end up typed Q Exp (aka "Quote Exp-ression", because the compiler will "Quote" the "Expression" and run it I guess). But I started looking into it and you can generate a lot more stuff such as Types, Functions, etc. I honestly don't think I've seen it all yet, it's insanely powerful.
>>
>>101955531
if I need a file outside my executable I will generate it outside my code
>>
I've started building some testapps in SwiftUI just by copying everything from ChatGPT. One is a checklist app for traveling. Now I make a map app that highlights only good rated restaurants.

Next I want to focus on some neat small app ideas and build them with a nice clean UI design and publish them on the appstore for free. I'm not a programmer and so far I could understand what GPT is building. Not too complicated. When I get deeper into more complex tasks such a a menu structure, etc. can I still rely on the AI chat? Or can it fuck things up in the end?

Also I wanna note how great it is to learn coding now. I learned so much in the last few days just by copying the code and trying to understand it. Also getting direct answers from the AI is damn cool. When I remember back the "100 days xcode" tutorials.. jesus christ what a waste of time.
>>
str0: db 'hello\n',0

Why is this not supported in nasm? It should, according to:
https://www.nasm.us/doc/nasmdoc3.html#section-3.4.2
What's wrong.
>>
>>101955343
They aren't you can make a template that gives you a unique id
>>
>>101956137
not relevant, all state exists outside template instantiation
>>
>>101955928
you will never be a real programmer
>>
>>101956827
statics in template instances have different addresses you can take
>>
>>101956942
So? Now change the address to prove that it's not pure.
>>
>>101955343
That's untrue, you can have side effects by defining friend functions inside a class template
>>
>>101944101
https://wiki.installgentoo.com/wiki/Reverse_Engineering
And search engineer here:
https://wiki.installgentoo.com/wiki/Cybersecurity_-_basics_and_armory
>>
>>101954420
the problem is lazyness with doing uefi virtual map nonsense, identity mapping is easier
Anyway i should change that...
>>
>>101955213
do a shift instead of a division? it is lossy though so you likely need massive refactoring
>>
File: Picture1.png (1.99 MB, 1900x2257)
1.99 MB
1.99 MB PNG
Hey guys, I'm by no means a proper programmer so beat with me. I need to align some images for a project I'm working on, preferably using Python. These are greyscale images of the same thing, but taken with a different sensor and in slightly different conditions. In the example in pic related, you can clearly see that image 2 should be shifted downward to be aligned with image 1. However I have not found a way to reliably automate this. I have tried phase correlation, feature matching, ORB keypoint detection and RANSAC, but nothing works on 100% of my images. Yet for each pair of images it is always quite easy for my eye to see how they should align, so I guess that also a computer should be able to do it. Any tips?
>>
>>101958357
>it is always quite easy for my eye to see how they should align, so I guess that also a computer should be able to do it.
I ...
>>
File: Picture2.png (969 KB, 1029x1106)
969 KB
969 KB PNG
>>101958357
This is another, slightly more difficult example of images.
>>
>>101958405
Aren't we in the age of AI or something? Maybe I was too optimistic huh
>>
File: file.png (24 KB, 1898x170)
24 KB
24 KB PNG
anyone experienced with duckdb sql here? I have a json file with sorted keys which are supposed to be mapped as rows but its loaded as columns I can't just unpivot because the structure is a bit unknown is it possible to somehow eagerly unnest every col and then collect it? I know how to do it in pandas but not in sql. Pic is some data unnest works if its just a single col via
> select unset(kanjiset.一) from kanjiset;
but I can't figure out how to do that for every col.
>>
Does anyone have experience programming on android?
I don't mean FOR android, I mean physically writing code on a smartphone. Are there recommended compilers, whatever? Any recommendations on a physical keyboard to use with a smartphone?
>>
>>101958817
buy a laptop, kid.
>>
>>101958357
>>101958506
Have it arrange the two images in every possible overlapping configuration.
For each of these iterations, go through every set of overlapping pixels, and compare the saturation of that relative pixel between image 1 and image 2. Store the difference. Average out these differences after you've compared every overlapping pixel.

After you've gone through every possible overlap, have it arrange them in order of score (lower is better). Then manually go through the closest matches to see which is best. You'll still need to manually verify, but this should give you the most likely correct overlaps without you having to do it yourself. Saves some time.
>>
>>101958817
There's Termux and clang, but there's no point in doing that, just buy a Thinkpad. I'm waiting on mine as we speak, got tired of holding 200 grams in my fingers every day real quick. And Bluetooth kbs are expensive and I wouldn't need them for anything else.
>>
>>101958872
>>101959048
My job has me sitting on my ass doing nothing for twelve hours a day and all I can have access to is my own phone, so a laptop's not an option.
>>
>>101959076
you can find used thinkpads in trashcans and some still work, I know a guy who collects them from trash then sells them for 20 euro each, shut up faggot
>>
>>101959098
I own a laptop, my guy. Multiple, even.
I can't bring one with me to work. While I'm at work, all I can use is my phone.
>>
>>101959120
get a better job
>>
>>101959136
It's a very good job. I don't think the qualifier for a job being good or not is whether I can bring a thinkpad with me.
>>
Termux, ask about docks and keyboards in the smartphone general.
>>
>>101959149
it is
>>
File: firefox_NAnK4LRZrf.jpg (200 KB, 1844x1103)
200 KB
200 KB JPG
>>101958817
I'd maybe buy something like the Gemini PDA. It is both a phone and laptop, you can dual boot android and desktop linux.
>>
>>101959149
>>
>>101955127
zig's whole shtick is comptime
>>
>>101959473
and yet it does it worse than C++
>>
File: 12.jpg (15 KB, 344x272)
15 KB
15 KB JPG
>>101952661
ok, thanks, but what about my question?

Rn im studying communication between process. I dont know the proper nomenclature but suppose i write 2 dotnet console apps (lang doesnt matter, can be python or whatever) now if i execute this 2 consoles/dlls they are running in separate ways and i would need to use named pipes or ipc to pass data from one to another right?

To uses events and delegates i would rather need to create both my console apps in the same solution/dll, right?
>>
File: 1698361803094271.png (356 KB, 1142x1121)
356 KB
356 KB PNG
>>101954103
Ok, so basically, you have a window with two widgets. A label with a description and a timer. You want to show the next card when the time is up, yes?
Create a linked list with the workout schedule where the head of the linked list is the current "card".
>>
>>101959739
also what if i use iis (or tomcat, glassfish, whatever) to host my 2 apps/consoles then can i make them communicate easily? Just binding ports among them?
>>
>>101959744
nah, not exactly, i dont have an app i need to create, instead, im trying to write some example that helps me understand the point of delegates/events.

Im studying process communication, distributed components and i believe it is called async execution.
Converting my example to a simple ll in the same class wont help with my topics.
>>
>>101959822
the problem of showing cards in sequence is inherently synchronous, so shoehorning an async infrastructure to handle it is pointless at best
>>
>>101943127
Starting little schemer, what do i do if I want to run scheme code? I am a complete noob, but I have emacs vanilla and vim installed. Can I just run scheme via some emacs extension or something?
>>
File: Screenshot_termux.jpg (668 KB, 2400x1080)
668 KB
668 KB JPG
>>101958817
install
- F-Droid
- Hacker's Keyboard
- either termux or nix-on-droid

in Termux, install
- either vim or emacs, plus relevant plugins for your languages
- runtimes/compilers for whatever language you want to program in (I've written plenty of code in Clojure, Scheme and ARM assembly)

Or just ssh into your own machine, maybe a vps
>>
>>101960196
Or Unexpected keyboard.
>>
>>101959989
unless you're dealing with UI where blocking would freeze everything until stopwatch hits 0 and deletes a card, moron
>>
>>101960042
You'll need to install some Scheme implementation, such as Guile, or Racket's mit-scheme package.

Emacs lisp is fairly different from Scheme, but feel free to play with it regardless with M-x ielm

For live evaluation of Scheme inside the editor, you can use the Geiser package in Emacs or Conjure in vim.
>>
>>101959120
>>101959149
put a thinkpad in your pocket and tell them its just a phone
>>
>>101960326
duh, of course the user facing logic should be async. what I'm saying is that the core logic for managing those user cards can still be a simple array you can pop from when the current timer ends, no need to overcomplicate it
>>
>>101960570
you're already tied by the retarded UI framework, so why not put the cards into it instead of creating even one extra separate array?
>>
>>101960196
>ARM assembly
Ooh, what were you working on?
>>
I have come to realize I'm retarded so instead of some big project, I will be making Tetris.
>>
>>101960725
that seems overly complex, I think you should stick to tic tac toe
>>
>>101960343
thank you friend
>>
Im having trouble creating classes in a little text based adventure I’m creating in Python. I want there to be a Character class with parameters such as name, hp, armor, and weapon.

And then I want to create a Weapon class with 3 different weapons, each with their own type (melee, magic, ranged)

I have this setup currently so that the weapon class inherits from the Character class and the weapon class also has parameters such as weapon, weapon_type, and weapon_damage.

I also have an Armor class with 3 different types of armor (plate, cloth, and leather).

I eventually want each combat style to be weak to another, to balance things out. I have a working version of the game without weapon or armor types, but I’m new to object oriented programming, and I’m trying to do this the “right way”.

I feel like i could achieve this if I just made my program a huge sequence with a fuck ton of “if” statements, but I don’t want people to create bad habits in the long run.

Anyone have tips on structuring this properly?
>>
File: aoc2019day5.jpg (505 KB, 1080x2400)
505 KB
505 KB JPG
>>101960685
nothing too interesting, just a bunch of toy programs.
And one very fast parser for a file format I've come up with (which however was specifically designed to be easy to parse in assembly)
>>
>>101961287
Don't create classes for data. Don't create custom character class unless your character is really special like having stats that nobody else does. Weapons should be dumb data, armor should only have slot they can be equipped in and sprite if you're making a graphical game.
Classes were designed as a concept to encapsulate behavior, so use them to create behaviors instead of types of things.
https://www.youtube.com/watch?v=JxI3Eu5DPwE is probably useful here.
>>
>>101961287
>the weapon class inherits from the Character class
What the fuck. Inheritance models "is a" relationship. Is weapon a character? Can you become a bone of your sword?
>each with their own type (melee, magic, ranged)
Each "type" should be a separate class, so that instead of writing if weapon is melee: spaghetti you can utilize polymorphism.
>>
>>101961486
this meme quickly falls apart, weapons should be one class, the class Attack is really what should be a base class and that should be a member of weapon that can be injected when constructing the weapon.
>simple melee hit
no problem
>simple ranged hit
no problem
>oh my fauci it's dae heckin flaming arrow that does simple ranged hit and applies burn that does neutral type of damage?
possible only if your attacks are polymorphic, weapons don't matter.
>>
>>101961545
also if you do this, this allows you to reuse anything when creating monsters, maybe monsters can choose 50/50 to melee hit you or cast some fireball and need no special wand for it, that's why attack type and damage shouldn't be part of weapon at all
>>
Starting to work through picrel. Thought it would be a fun way to practice a new language. But I may have to give up and do it in python. I hate static types so much it is unreal.
>>
File: 1451944791522.jpg (24 KB, 456x297)
24 KB
24 KB JPG
>>101961545
>class Attack
>>
>>101961545
you must learn the lessons of Looking Glass Studio and DromEd.

>http://www.thief-thecircle.com/teg-old/guides/twg/srctut.html
>>
>>101961566
if you can't even learn to use C, how will you learn to compile it?
>>101961581
Classes were invented to model behaviors, not data. For data you have dumb structs.
For maximum flexibility, weapon should be a struct that contains all possible stat increases and decreases, while attack correctly operates on it using ones that matter.
Do you really cannot think of a magic sword that can be used for magic but is still powerful enough to hit enemy in close range, so it has both magic and melee stats?
>>
File: 1489425998861.jpg (8 KB, 250x242)
8 KB
8 KB JPG
>>101961356
>indented assembly
>>
>>101961653
Lmao.
>>
>>101961630
>receptrons
literally how objects were meant to be used, no bullshit, just expected behavior
>>
>>101961648
I have no interest in using C. I was using Swift, but I don't understand its type system well enough.
>>
>>101961287
you can try something like this, it's not the best approach but it's a good compromise between extensibility and being easy to wrap your head around it as a beginner
from enum import Enum
import random

class ArmorType(Enum):
PLATE = 0
CLOTH = 1
#...
class ArmorProperties:
base_defense: int
burnable: bool
abilities: list[str]
def __init__(self, bdef, brn, base_ability):
self.base_defense = bdef
self.burnable = brn
self.abilities = [base_ability]

def variate(self):
self.base_defense += random.randint(-2, 2)
if random.random() > .9:
self.abilities += ["rare ability"]
return self

def __str__(self):
return f'def: {self.base_defense} abilities: {self.abilities}'

class Armor:
BASE_PROPERTIES = { # these should be read from a json/yaml/database
ArmorType.PLATE: ArmorProperties(5, False, "no knockback"),
ArmorType.CLOTH: ArmorProperties(2, True, "agility+1")
}

@classmethod
def drop(cls):
random_typ = random.choice(list(ArmorType))
base_attrs = cls.BASE_PROPERTIES[random_typ]
return Armor(random_typ, base_attrs.variate())

typ: ArmorType
props: ArmorProperties
def __init__(self, typ, props):
self.typ = typ
self.props = props

def __str__(self):
return f'{self.typ} -> {self.props}'

for _ in range(100):
print(Armor.drop())
>>
What are some actual fun projects I could do? I'm feeling real bored during weekends.
>>
>>101961988
Why the fuck is random drop handled by armor itself?
This inane shit is why nobody takes OOP seriously.
>>
>>101962010
raytracing in one weekend
>>
>>101962063
drop wasn't the best term to use, that's just a way to return a randomized instance of the class for demonstration purposes. for an actual drop_rewards you'd probably have a weighed choice in a drop table, which would depend on the area you're in and the encounter you beat, and I agree that it shouldn't go into all the various classes of droppable items
>>
>>101962010
A romhack of your favourite bing-bing wahoo.
>>
Is event sourcing a meme?
>>
>>101945496
i read half that anon's post and he is competent, you are a baitong nigger, go learn things for yourself
>>
>>101959739
progressing, thats my sample of 2 events, i understand it bette now... events you use to deffer execution of a piece of code within the same process/thread/dll/solution
this works

class Program
{
public static void Main()
{
Console.WriteLine("starting validator");
Validadator v = new Validadator();
v.RightInput += check_right;
v.WrongInput += check_wrong;
v.Start();
Console.WriteLine("good mornign sir");
while(true){
Console.WriteLine("attempt");
string attempt = Console.ReadLine();
v.Check(attempt);
}
}

public static void check_right()
{
Console.WriteLine("right");
}
public static void check_wrong()
{
Console.WriteLine("wrong answer");
}
}

public delegate void NotifyRight();
public delegate void NotifyWrong();

class Validadator
{
public event NotifyRight RightInput;
public event NotifyWrong WrongInput;
public void Start()
{
Console.WriteLine("validator on");


}

public void Check(string v)
{
if(v == "1") {
onRightInput();
}
else
{
onWrongInput();
}

}

protected virtual void onRightInput()
{
RightInput?.Invoke();
}
protected virtual void onWrongInput()
{
WrongInput?.Invoke();
}
}


now i need to convert validator to a class lib and use net remoting to call it from the console where user sends input
>>
File: abswp.jpg (87 KB, 757x1000)
87 KB
87 KB JPG
>>101943127
a few days ago, some anon suggested me books to learn code, better than courses and videos.
is this book still up to date? any better suggestions?
>>
>>101962728
books are as useless as videos, read the manual
>>
>>101962747
I would if I was learning for proffesional use, but I lear it just for myself.
also I'm old, I can't begin again and start learning to code from scratch, learning how diodes work or stuff like that
>>
>>101962794
you should be learning for a particular problem, not yourself, if you have no problems then go outside
>>
>>101962817
isn't coding a skill or a trade? like welding?
why shouldn't I learn it?
>>
>>101962884
Would you learn welding if you weren't going to do whatever requires welding?
You're supposed to have a real problem that you need to solve, when you have a real goal, you know what you need to do it, learning to deal with problems you will never solve is useless.
>>
>>101962728
This book is ok, but not good as a generic introduction to python. Read online python docs and Python crash course.
>>
>>101962927
>Would you learn welding if you weren't going to do whatever requires welding?
Yes.
Learning stuff increases my understanding of the world. example: I want to improve my math skills because they suck, but I haven't need to solve an equation for years now. by your logic, I shouldn't do it.
>>101962929
>Python crash course.
ok.
>>
>>101962978
Yes you shouldn't waste your time on math until you need it.
The only useful skill is knowing what you need.
>>
>>101963005
I pity your behaviour.
never improve.
do not reply to me again please. your opinion and your person are worthless
>>
Don't talk to me or my son ever again!
>>
>>101963055
I know more about programming than you ever will in your life because I actually had problems worth solving and did so optimally instead of egojerking by collecting random python books, feel free to pity my advice nigger, it's not my fault if you end up making nothing useful.
>>
>>101963055
second, anon is a retard and most likely a codelet
>>
>>101959038
I think I get the idea, but what's the saturation of a pixel? My images are just numpy.ndarrays, that is, a matrix of numbers.
Also, isn't this approach going to be very slow for images as small as 256x256 pixels?
>>
>>101963111
Convert the RGB color to HSV or HSL
The S channel is saturation, 1.0 for fully vivid colors, 0.0 for shades of gray
>>
>>101963137
But my images are grayscale
>>
>>101963111
it's only slow in self similar images, any mismatch makes it incredibly fast
>>
>>101963055
>>101963089
Both are right in some sense.
Some people just wanna learn to code to like, automate some spreadsheet merges or whatever. That's fine, and you don't need maths for it.
But learning maths will always put you at an advantage when coding. Some programming concept are strongly gatekept by mathematical knowledge, so by avoiding the subject you are, de facto, limiting yourself.
>>
>>101962728
A lawyer friend of mine asked me the other day how he should learn to code, he wanted to pick up the basics. Is this a good book for it?
>>
>>101964053
>But learning maths will always put you at an advantage when coding.
Disagree. I've wasted a bunch of time learning things I'll never need, just in time learning is the better way to go about things once you actually have a foundation. Knowing random math is not going to suddenly let you see the matrix and connect everything, you don't know what you need until you need it
>>
>>101958817
>Any recommendations on a physical keyboard to use with a smartphone?
ZSA Voyager
>>
>>101964140
>you don't know what you need until you need it
But you don't know what you can do unless you know what you can do.
You're limiting your worldview and, honestly, can only write solution to problems that have already been solved. I hope I don't offend you with this, but this is the mentality of the average pajeetcoder.
See qrsqrt as an example, if one were just "learning ad hoc" then they'd never come up with this mathemagical solution.
>>
>>101964394
You're the pajeetprojector here thinking there's one best way of doing things. I still read articles/papers and watch talks that interest me, but I know to cut the losses and not waste my time thinking I'm learning something valuable instead of getting out and doing it. Tons of learning without practical application of your retention is useless
>>
>>101964080
Why was he asking you if you don't know shit either? Are you the geek of the group? Are you the one with an Android phone?

He should ask himself what he wants to code and then pick up the most widely used language for that. Meanwhile, he should be watching videos on computing and/or going through the links on the Wikipedia's Programming article.
>>
>>101964464
It's clear you have a shallow grasp on software development as an art form. And that's okay.
>>
>>101964493
You think I don't know shit... because I haven't read a beginners python book?
>>
>>101964394
>See qrsqrt as an example
retard, quake didn't invent that. it trickled down from two mathematicians at berkeley. you're not kahan, no one here is or will be
https://en.wikipedia.org/wiki/William_Kahan

you don't need to know anything about math to implement it. you search journals or solutions for fast approximations to find your answer when you know you need something faster, this is why i said once you have a foundation it's better to jit your knowledge or only learn things you know you'll need to know. you stumble upon more math that way and from asking questions to knowledgeable people that can give you suggestions for places to investigate. getting shit done and finding out about a bunch of math along the way by knowing how to ask good questions is a more useful skill than digging your nose in books with no goal
>>
>>101964525
What do you know then? Teach your friend that. All I'm saying. Old man.
>>
Also the answer is C.
>>
trying to hack this binary, the object has this symbol that I need, external linkage is perfect
00B 00002628 SECT3  notype       External     | ?g_CMData@@3U_cmd@@A (struct _cmd g_CMData)

I am pretty sure that it's just two pointers in a struct based on the disassembly the [0] offset is one pointer and the [1] offset is another pointer and I know their types, how can i create an extern declaration and get it to link so I can access one of the pointers at runtime?
>>
>>101964538
>retard, quake didn't invent that. it trickled down from two mathematicians at berkeley.
Did I claim quake invented that?
>you don't need to know anything about math to implement it. you search journals or solutions for fast approximations to find your answer
It's fair to have that as your coding method, but just know you're completely replaceable and outclassed by LLMs.

I am sorry anon, but you're not angry at me - you're angry at yourself for the stance you decided to take on this thread.
>>
>>101964552
>Teach your friend that
Why would I do that? He didn't ask me to teach him, he asked me for material to learn from.
He's a man and I'm a man, if he wanted me to teach him he'd ask me - and I'd do it. But he doesn't, he most likely just wants something productive to fuck off to when he's not lawyering.
>>
>>101964662
Yeah, but he didn't specify what he wants to learn, just "coding". Websites, apps, vidiya, drone tinkering... All of those can be done on weekends.
>>
>>101962305
>baitong nigger
You are a jew accusing others or what you are yourself, and now decapitate yourself.
>>
File: 1699710598139.jpg (143 KB, 600x485)
143 KB
143 KB JPG
I know a lot of html + javascript and wanted to start making software to store and display my work schedule (e.g. I have 10 processes and want to save 'what to do next' for each one in a json file and display it in html instead of dicking around in Excel). Should I learn Node.js or go for Python (Flask)? I want to compile it in a single .exe and distribute to my work buddies later. Everything will run in the user's own computer and save to local files.
>>
>>101965460
>>>/wdg/
>>
>>101964951
Not a jee you mindbroken polnigger
>or
lolmao
>>
codelet promptgod frankenstein codestitcher with a /bit/ of programming knowledge here. i want to 'write' a custom c driver for this logitech g15 v2 lcd screen and python bindings to go with it because im a mathlet and PIL is my beloved

where should i start? no meme answers like book reading or other gay shit plz
>>
File: Picture3.png (53 KB, 2963x1839)
53 KB
53 KB PNG
>>101963723
I mean, doesn't it take long to check every possible configuration? Like if the image is just 3x3 pixel, then there are 15 configurations to check, if I understand correctly.
>>
>>101965936
>implying anyone cares what a jew has to say
Hope you've had swimming classes, because you'll need them.
>>
>>101967776
why are you seething so hard?
>>
>>101943127
i hate the ai threads so fucking much its actually incredible.
They take *all* of the traffic on g.
>>
>>101968134
Because October 2023 wasn't bad enough.
>>
>>101968361
what are you working on?
>>
>>101968466
Mandatory swimming exercises for occupiers.
>>
>>101968495
doesnt seem to be programming related...
>>
>>101968583
That's because you haven't been paying attention to where Russia gets their drones from.
>>
>>101968621
what about iran? are you schizophrenic?
>>
>>101968690
>clueless
>>
>>101968621
Meds, גוי.
>>
>>101968824
Meds won't help you in the sea.
>>
>>101968824
kys יְהוּדוֹן
>>
File: TV.jpg (95 KB, 948x463)
95 KB
95 KB JPG
>>101955127
The stage restriction takes some getting used to.

Language.Haskell.TH.Lib continues to be messed up.
Half of the functions for making a TyvarBndr return
it in Q and none of the consumers do. Eisenberg is trolling.
>>
uhh programmin?
>>
>>101969498
Jews don't get to enjoy programming intel. They only get to enjoy drinking salt water.
>>
>>101951147
Wtf you talking about, only bug I've encountered was the workspace list disappearing but other than that it actually has working wayland on nvidia unlike gnome/kde.
>>
>>101964509
>muh generalism learn everything hehe XD retard projecting about shallowness
you probably couldn't write a branchless and hyperparallel fizzbuzz without using a search engine, you're literally a shallow fizzbuzzer who can only write the dumbest and slowest solution
>>
>>101966923
99.99% cases will check only one pixel before moving to another configuration
>>
>>101970103
Did you get GPT to write that for you again?
>>
>>101970604
I accept your concession, nocoder.
>>
>>101970658
You're accepting your own concession? So you're openly admitting GPT does these posts for you?

Dark.
>>
>took half an hour to respond with a "no u"
grim
>>
>being employable and employed is grim
Very grim, but for you.
>>
I fucking hate working with XML files. My file passes all checks when tested against local XSD documents but fails when uploaded to the client’s online checker.

Anyone got useful pointers for me?
>>
>>101944101
cheat engine
yt > Guided Hacking, Stephen Chapman
start with something easy like emulated old games ie nes/snes/gameboy
>>
>>101943127
is there any way in C++ to define a type at runtime as a multiplier for an array indexer?
Writing assembly-like logic looks plain awful.
>>
>>101972112
Sounds like XY problem
>>
>>101964080
Only if your lawyer is a nigger.

Python is the result of Guido Van Rossum's attempt to create a niggers-only language, and he doesn't want whitey using it.
>>
>>101972134
retard wants to be a big fish in the smallest pond
>>
>>101971607
Maybe write valid XML then, Rajesh?
>>
The programmer who created Python is an incompetent terrorist whose only fault is that even stupider people keep listening to him.
>>
>>101972112
it sounds like you're doing something wong
do you mean something like an mdspan?
it's a fair bit complex but it is meant for multidimensional complex sparse/strided access patterns
>>
>>101973071
i have to deal with an array of versioned descriptors, the starting structure is an incomplete struct with metadata (part of which is the size of a descriptor) and then the array
Basically i want to do
xorl %edx,%edx
mov OFFSET(%rax),%rcx
lea (array,%rdx),whatever
add %rcx,%rdx

which is what gets done for struct indexing but i want to "define" that rcx at runtime
>>
>>101973149
write your own compiler then
>>
>>101973149
The answer is no. There isn't really any language that supports this.
>>
>>101973240
works in my C code
>>
>>101973276
how?

>>101973240
time for c++ 24 then
>>
>>101973404
compile code at runtime and put it in executable page?
>>
>>101943127
cv goes in circular file
>>
>>101973439
you would have to define C structs at runtime though
>>
>>101973608
no I wouldn't have to
>>
>>101973640
>compile
or do you want to extract struct definitions from separate files? this is even more silly lol
>>
>>101973751
executable code isn't code you write, not relevant
>>
Yo this is actually an automated spambot what the fuck,it has been posting for tens of fucking hours, all one-liner catchphrases and at regular intervals
>>
>>101973857
yo yo fr no cap, must be a chat gpt ai large language learning multi level model algorithmic conversation partner you feel me bro?
>>
>>101973857
give me one reason to write many words to a retarded nocoder wintoddler who spams irrelevant assembly but can't even do anything productive?
>>
Is there a blog/yt series "wayland for dummies"? I'm interested in hacking on existing compositors,
but have no idea about "protocols" at tools beside wl-roots.
>>
>>101973149
hmm
yes definitely seems like something wrong there
i am too sleep deprived for this to solve it properly but consider
in clang you can use templates to manipulate constrained inline assembly
in GCC you can just pass inline assembly to the compiler in the form of std::strings and std::string_views
compile time generate permutations runtime select

>>101973276
if you've got C code that does yea no chance are that is side
>>
>>101974158
didn't even mean to include that last sentence anymore, thought i deleted all that bit at the end, it's incoherent because of cutting and pasting
>>
>>101948053
Ok, I spent two days to figure how to compile C++ and CUDA with cl, g++, nvcc.
Today I tried to WSL Ubuntu and it was so easy. gcc and nvcc works without problems. Now I'm too exhausted and will ask the same question next year
>>
>>101974215
oh god anon windows shit
then before i go to sleep:

the quick rundown on windows shit is that it doesn't have a filesystem hierarchy standard that specifies a place it expects development files to be installed by default in
it uses compiler command line options and environment variables (INCLUDE, LIB, PATH) to set the folders and default libraries it's pulling from
the visual studio developer command prompt just sets them to the windows SDK and to a bunch of other folders\
if you set up an install directory to mimic the unix filesystem hierarchy, using P:\ as a base and set INCLUDE to P:\include\, LIB to P:\lib\ and add P:\bin\ to PATH and install additional libraries there dependency management through MSVC is as easy to use as linux, only instead of -llibname it's just a copy of libname.lib sent to the linker

minus the CUDA part because I've got an AMD card and all I need to do is point any clang at a copy of rocm's device library and the HIP shared library and it just works
they've got some sort of weird like split binary system going on you can dodge with clang's NVPTX backend all i know
>>
>>101968303
Shitposting could easily kill them off lmk if you're interested.
>>
>>101974078
>wild projections and hallucinations
you know some of us need assembly for more than "optimally converting utf16 (but uh actually usc2) into utf8 (buh uh actually ascii)"
>>
>>101968303
Do you think the AI traffic will just leave after the hype? 15 years ago I used 4chan only for porn and only lurked but nowadays I write free verse poems to /ERP/ in /thrash/.
>>
>>101974501
>putting time and effort into that
>for no pay
You catch my drift shill-san.
How much green what are we talking?
>>
>>101974597
My services are always free.
>>
File: 1703996041108897.jpg (24 KB, 331x363)
24 KB
24 KB JPG
>>101972112
>>101973149
>tagged union of structs where tag is runtime multiplier
>cast structs over array minus the size of the tag
>incrementing array index is a[(&T - sizeof(T.tag) + T.tag]
>>
>>101969498
No, NO, SHUT UP!
>>
>>101974711
i wanted something like
__builtin_deftype(descriptor+modifier)
which inherits from descriptor the member offsets but increases the index by moar

i will just increase the pointer for the sake of my mental health.
>>
>>101974560
I'm not a wintoddler so I never in my life had to nor ever will have to convert from or to utf16
>>
actually __builtin_deftype(descriptor,effective_size) is how you would do it without shitty signed nonsense on backwards support

bump or ssometing
>>
>>101974995
>still going on about it being utf16
it was ucs2, you cut off the top byte from an array of shorts and called it an "optimal path conversion"
lmao
>>
>>101975033
I use GNU/Linux, here we don't do "path conversions" because we aren't wintoddlers.
>>
>>101950716
>rust is useless for embedding and real time
it's literally 1000x useful because I don't need to play compiler guess the flags or provide a bunch of runtime mechanisms to build freestanding rust.
where do you retards come from? can you go back?
>>
>>101975033
>it was ucs2
pretty much anyone claiming to be utf16 that isn't checking the encoding of surrogate pairs is ucs2. I wish people would realize this or at least enforce sound encoding of surrogates. Also I hate windows.
>>
>>101975107
I just validate utf-8, if it doesn't validate I throw it into trash, doesn't matter where or when.
>>
>>101958357
https://docs.opencv.org/4.x/d4/dc6/tutorial_py_template_matching.html
have you tried OpenCV?

computer vision stuff is a nightmare IMO.
It's as you describe, easy for your brain, but it's hard to encode the rulesets that make it possible.
For your case specifically, you can try throwing your images through an edge detect kernel and then lining the edges up to some level of error.
>>
>>101975064
>can you go back?
can you?
>>
does anime make you a better programmer?
>>
>>101977616
You need anime to program at all
>>
>>101977616
>>101977684
you need sissy hypno programming before you can program yourself
>>
>>101977871
kill yourself
>>
Is Odin dev not caring about LSP a red flag or is it based?
>>
>>101978347
It's weird.
>just memorize the language
>you need simple things
>targets LLVM
>>
File: Image_pyramid.svg.png (536 KB, 1280x1280)
536 KB
536 KB PNG
>>101958357
Did you use cv2.findHomography, or something that estimates fewer parameters?
>>101970136
The optimum isn't an exact match. Lipshitz continuity isn't known.
>>
can I using declaration a parameter pack/list?
using AttributeSet = (TypeA, TypeB);
using SubType = SomeType<AttributeSet>; // equals SomeType<TypeA, TypeB>;
using SubOtherType = SomeOtherType<AttributeSet>; // equals SomeOtherType<TypeA, TypeB>;

I thought I could use tuple for AttributeSet, but how do I get the parameters back from a tuple
>>
>>101979290
>how do I get the parameters back from a tuple
template <typename>
struct Worker;
template <typename ...T>
struct Worker<std::tuple<T...>> { /* use T... */ };
Worker<some tuple>
>>
>>101979290
>>101979420
theres also tuple element and shit
you cannot currently alias a pack
>>
New bread: >>101979603
>>
>>101970136
Then I didn't understand the algorithm you have in mind. I thought I would have to compute the difference in pixels for each configuration, so I don't see how "99.99% cases will check only one pixel before moving to another configuration".

>>101979096
>Did you use cv2.findHomography
No, but it looks promising, gonna look into it, thanks
>>
File: odinprec.jpg (23 KB, 1255x200)
23 KB
23 KB JPG
I'm not sure this means
How do you convert a float to an int without precision loss? Or it remains a float?



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