[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: prog-girl.jpg (52 KB, 384x384)
52 KB
52 KB JPG
What are you working on, /g/?

Previous: >>100318420
>>
Working?
>>
>>100344065
What are you wanking on, /g/?
>>
File: nukes.png (139 KB, 1848x514)
139 KB
139 KB PNG
>>100344072
I hate other people, so nothing.
>>
>tried to make embedding from my code to a llama model
>it used correct function names but it the answers it gave to me were all wrong
I hate machine learning so fucking much
>>
>>100344108
Now you know how your teachers felt.
>>
>working
sorry it's just a hobby
>>
>>100344037
working on my video game that sexy anime girls and anime cunnies
>>
>>100344037
finished filtering all of the garbage from qt, now writing qml files
>>
Made a template project for C
>sds for strings
>stb_ds for vector and hashmap
>object pool
>some logging functions that can use syslog or stdout
>small macro file that has: defer, array operations, some file and directory handing
>main function that uses getopt to parse and handle some generic parameters
>Makefile that creates .so, .a and executable,
Thought about adding curl but it's so universal it's likely included in the system.
I'm also going to add libtcc and function that uses inotify to watch file and live compile and reload it.

Anything else I should add?
>>
>>100344392
a brain in case the programmer who will be using using this is missing one, always useful
>>
>>100344425
fuck off faggot
>>
File: telnetapps.png (137 KB, 1664x936)
137 KB
137 KB PNG
I just finished the first official release of TelnetForums which makes hosting your own chan-like Telnet forum super easy. Right now I'm cranking out an x64 installer and doing some work on the site's directory system, so the next release will have an API feature to automatically put your server in the official searchable public directory in a super streamlined fashion.

So basically anyone could do this:
>install
>edit the categories (boards) in the .ini file
>set their disclaimer or rules in the .txt file
>set their ASCII logo in the other .txt file
>run program
>server is live on port 23 and the rest is just a matter of port forwarding
and after this API update basically you'll be able to put your public facing address in the .ini file, type a command, and then a handshake will commence and your public facing address and details will be pushed to the directory with some kind of "verified server" badge or something
>>
how do you handle those daemon, process, and workers in your job?
>>
>>100344445
remember that you're mad just because I'm right, and that's besides the fact that everything you mentioned is shit and any good programmer can write better for a specific problem.
>>
>>100344471
Why are you talking about good programmers, considering you ain't one?
>>
>>100344512
Coming from C fizzbuzzer who needs template because he is so starved for project ideas that the only one he could come up is template for when he will build a real project which is never,
>>
>>100344533
Can you try that again, but in English, please?
>>
>>100344533
you need to stop projecting anon, it's not healthy
>>
>>100344596
>>100344600
you need to stop samefagging using your phone if you want me to believe that you aren't seething
>>
>>100344607
And if not?
>>
>>100344290
>finished filtering all of the garbage from qt
how did you do that?
>>
(personally I'm writing my desktop shell in it)
>>
>>100344978
uninstalled qt
>>
>>100345058
would but theres no replacement that doesn't suck more
>>
>>100345162
the replacement is equivalent to flushing the poo in the loo
>>
Only ever used traditional db's i.e psql and sql.

Want to make a small application that leverages redis, anyone got any decent resources on getting started with redis?
>>
>>100345197
what do I draw my guis with?
>>
>>100345243
Xlib
>>
>>100345261
xcb
>>
>>100345058
What is qt anon?
>>
File: petrol.jpg (442 KB, 1638x2048)
442 KB
442 KB JPG
>realize that i will need to install g++ and use the stupid libraries for compatibility
sigh
>>
File: 1715027202472.png (343 KB, 1118x650)
343 KB
343 KB PNG
>>100345261
not replacing my bloat with shit
>>100345344
the most reasonable gui toolkit. its very bloated but it works everywhere and gives you access to all the low level details if and when you need them. I don't know of a better one at least.
>>
>>100345398
If you murder the ones responsible you get three hots and a cot for the rest of your life. Better than dealing with retarded people's bullshit.
>>
>>100345412
>retarded tranny flaunts about how retarded tranny gui toolkit that reimplements everything including strings in its shitty framework is actually... le good
>>
>>100345429
>still has not given a better option
>>
>>100345429
>t. ... le mad
>>
>>100345429
Reinventing parts of C++ is, at worst, a necessary evil.
>>
>>100345475
tbf qstring is retarded because its utf16, but a lot of qt types are now typedefs to the stdlib.
>>
>>100345475
low IQ take
>>
>>100345449
not being a tranny is a very good option, worked for me for my entire life, you should try it
>>
>>100345568
"working" is a very strange word for the constant malfunctioning you're displaying in these threads.
>>
>>100345588
it is indeed a strange word to use in a thread full of GUIshitters who think that typing letters on xir keyboard is "work"
>>
>>100345428
>fbi agent reached out
praise the Lord
>>
>>100345617
Yeah, that malfunctioning.
>>
>>100345617
you are a troll
>i have a job
no you dont, to get the job you need to write the guis.
>>
>>100345664
my job is splitting logs for winter so I don't freeze to death, my employer is myself, I don't understand why you believe that sitting in front of computer is a "job" or "work"
>>
File: 1715028421690.gif (175 KB, 680x702)
175 KB
175 KB GIF
>>100345568
>i see an opinion I do not agree with
>TRANNY TRANNY TRANNY AAAAAAAAAAA
>>
>>100345680
>he is cold in winter
White men are not cold, just saying.
>>
>>100345700
yeah because white men own land and a forest and can prepare some firewood for winter, but that thought somehow flew over your head just like that boeing that you still believe will drop cargo for your tribe one day
>>
>>100345698
you are a mentally ill tranny, no other explanation why you need a GUI
>>
>>100345716
Or you can just die in the forest, and nothing of value would be lost.
>>
>>100345744
sorry I'm not interested in your non-white culture, please stay on topic of being a tranny that produces nothing of value but larps as having a real job with real work to do
>>
>>100345766
Why do real work, if you're so willing to do it anyway?
>>
How do I learn to program?
I can read basic code but I can't code something on my own.
I just copy code...
>>
File: Pirako_Chin.png (129 KB, 349x346)
129 KB
129 KB PNG
>>100345810
practice
>>
>>100345810
Right now you're at a stage like you know how to read but not how to write. You won't learn much more until you start really trying to write; reading more won't help much at all.
Do simple problems to start out with. Work up. Don't worry if things are elegant or not. That comes later. Important thing is to start practicing!
>>
>>100345429
c++ strings are horrible though?
>>
>>100345836
>>100345881
are there any good resources for that? I know there is leetcode but isn't that not free?
>>
>>100345940
it's time to wake up, tranny
>>
>>100345949
No need. Your government already agrees with me. :^)
>>
>>100345981
my government has anti faggot propaganda laws and reminds trannies every single day that they will never be women
>>
>>100345553
I bet you wonder why people use libraries instead of std::regex, too.
>>
>>100346031
I wonder why would anyone ever unironically use regex for anything important. Your IQ quite literally cannot possibly be low enough to believe that regex is ever a good solution.
>>
after burning myself out over 8 years of working as a city manager, I will go back into IT and start my training for coding next tuesday.
my friend who works for Siemens said they mostly use c#, the new hires use python and the seniors who refuse to learn anything new still use perl

will getting certificates for python help with job hunting? do recruiters care for certificates like pcap?
>>
>>100346217
senior engineers and IT professionals ive talked to have always told me that a cert is only relevant if you have zero job experience and are a fresh college grad or something. they told me they are a waste of money for anyone with a graduate degree or 2+ years of job experience within tech.
>>
>>100346346
certs are also mostly a pajeet thing. unless you are in a domestic industry like electrician or some trade, certs arent needed in software-based jobs. You can even ignore it in networking with is half software and half hands on.
>>
>>100344037
selling lightly customized wp themes to small business and going deep on Hegel
>>
>>100345948
https://adventofcode.com

https://www.codewars.com/
>>
I'm using reportlab for my app on python. Is there a way to design this easier? Having to do
>set coords
>generate
>view
>repeat
Just to get a text to where you want it to be is a dogshit and painful experience.
>>
>>100344037
C, Rust, Haskwll!
>>
>>100349217
Measure first.
>>
>>100349383
How
>>
File: 1715045933939.jpg (133 KB, 344x560)
133 KB
133 KB JPG
>>100344037
Implementing more wayland protocols in my shell because the piece of shit that is xdg desktop portal can't do its job correctly. (no longer portable but now functions correctly which is more than I can say for XDP)
>>
>>100349217
Ok well I had it draw a ruler on the sides so it should make it easier, this shit is cursed though
>>
File: 2024-05-07_02-14.png (6 KB, 480x299)
6 KB
6 KB PNG
>>100344037
more monotonous stopwatch (cnts.jiffies) in my TempleOS port.
theres like 5 different ways to do POSIX timers (setitimer, ualarm, etc) and theyre all deprecated except for timer_create/timer_settime which lets you use a mechanism that isnt merely SIGALRM, but it launches a whole new thread for the event handler and im trying to weigh out if the overhead of signals are less than pthread_create
>>
>>100350170
If you're fine with making it nonportable, you can use timerfd.
But also with SIGEV_THREAD thing, the libc usually is smart enough to share that thread across all instances of it, so may not really be that big of a deal.
>>
File: 2024-05-07_03-10.png (38 KB, 1340x470)
38 KB
38 KB PNG
>>100350330
doesnt seem like it on glibc at least, breakpointing pthread_create seems to show it does in fact launch a whole new thread
>>
>>100350707
eh, nevermind, decided to use signals anyway since i'm going to issue it for all threads and handle the profiler too (which was handled separately before) so it's more orthodox and handled with the INT_TIMER HolyC routine
>>
>>100349716
>I would rather cut my dick off and pretend to be a woman rather than fix the problem while I was still a real mad with functioning gonads.
>>
what mechanism should I be using to watch a volatile variable (mapped to a register) for change?
>>
Is it ever possible to make memory safe as it's the only thing that leads to vulnerabilities?
>>
>>100351162
And?
>>
>>100351181
>memory is the only thing that leads to vulnerabilities?
Brainlet detected.
>>
>>100351181
You can make it safe by not donating your brain to science before tou're done programming.
>>
>>100351206
Shouldn't you be the one concerned about your brainworms?
>>
>>100351217
I don't have any parasites like that in my white country.
>>
>>100351235
>implying Russians are not disgusting bottom-feeders
>>
>>100351243
Russians aren't white unlike myself so you can stop seething already, last time I checked even most russian shitholes have less swarth than the trashcan mug your mother calls "your face".
>>
>>100349509
Inkscape or maybe add a grid with latex pdfpages if reportlab can't.
>>
>>100351251
>Russians
are the most pronounced "I'm huwhite, you're traaaaaaaaaaaaaaaaaanny" LARPers.
>>
>>100351260
Never seen a russian proclaim that but anyway my white country doesn't have russians so how am I supposed to know?
>>
>>100351283
Anyway, I can't wait for all white countries to be nuked.
>t. white man
>>
>>100351298
so sad that nobody told you
>>
>>100351405
Sad for whom?
>>
File: 1715059968946.jpg (50 KB, 700x701)
50 KB
50 KB JPG
>>100351162
>NOOO YOU CAN'T FIX YOUR PROBLEMS OR YOU ARE A TRANNY
>YOU HAVE TO SUFFER FOR NO REASON IN PARTICULAR
Implementation finished and it works perfectly btw
>>
>>100351934
>fixing problems is when I break my entire display server instead of fixing the problems
is about as tranny as it can get
>>
>>100351963
>when I break my entire display server
when did I do this?
>>
I'm starting to realize the bad rep Python gets is from morons.
>>
>>100352003
Your opinion indicates you're incapable of realization, so who cares.
>>
>>100352003
morons like Guido himself, Python is a pile of shit that's unfixable
>>
>>100352003
what's your net worth?
>>
>>100351181
Memory safety is a spook. Just don't run untrusted inputs or software ez
Ring 0 temple os is the purest way to program
>>
import types
class A:
def __init__(self):
self.ax = 10

def amethod(self, other):
print(self.ax)
print(other.bx)

class B:
def __init__(self):
self.bx = 20

a = A()
b = B()
b.bmethod = types.MethodType(a.amethod, b)
a.amethod(b) # prints 10 then 20
b.bmethod() # The exact same method is called by a different name on a different
# object with different arguments, still prints 10 then 20. You can bind many objects, not just 2

why am i allowed to do this...
>>
>>100352003
Python is trash (for anything beyond 1 file, 1000 lines, or 1 developer)
>>
>>100352003
the people who like python are retards and amateurs whose only experience with python is consuming pip packages
as someone who primarily programs in C++ but has to fix and fuck around with a lot of python library infrastructure for stupid reasons (i fucking hate how everything ML related uses python) you are fucking stupid
python is an abominable disaster on the library maintainer site of things and has worse build system issues than C++ and also includes C++'s build system issues
that's before you even get into all the other problems with it
>>
>>100353125
*side of things
>>
What's worse? Python or Javascript?
>>
>>100354359
Shitlang written in C:
>slow
>dogshit syntax
>used nowhere relevant
Shitlang written in C++
>One of the fastest JIT runtimes in the world
>used in every browser
>sane syntax

That's something for you to understand on your own.
>>
>>100354418
>One of the fastest JIT runtimes in the world
>is so bad that experts avoid getElementById and instead directly reference elements by their path
I'll take Python any day of the week.
>>
>>100354359
JS. This isn't saying a lot though.
>>
>>100354458
>non sequitur
yeah keep to prototyping your shitty ML toys, best of which will be rewritten in C++ by a real programmer once your job is done and you can be laid off because you obsoleted yourself
>>
>>100354359
JS as a language but python's tooling is a lot worse
>>
>>100354481
Nothing of the sort happens except at total shit companies like Google, and they deserve it.
>>
Can anyone post the pic with all the project ideas (again) pls.

And I got a question for those who code/do projects in relation to their job.
How do I come up with projects/ideas to do in my spare time so I can train backend deving?
I'm a junior so I don't have much experience which means I haven't seen many examples of projects at the office (besides the usual CRUD API and some job scheduling stuff).
Which are two examples of the kind of stuff/concepts I'm looking for.
Sorry if my post is too vague, my inexperience makes me say things I'm not sure how to formulate.
I work in the TV industry.
>>
>>100354483
like i have one version of nodejs installed
i have had at one point probably 10 versions of python and multiple venvs for each version
granted i've not done a lot with js but still i've never felt the need to fragment to the extreme degrees python
>>
>>100354511
>nothing like that happens except in $MOST_RELEVANT_COMPANY_RENT_FREE_IN_MY_HEAD
>>
>>100354529
You really seem mad.
>>
File: luabutts.jpg (113 KB, 573x892)
113 KB
113 KB JPG
lua!
>>
Go
Odin
Python
Lua-tan(make it 0 based please)
You literally don't need anything more.
>>
>>100344461
>installer
Please don't tell me this is going to be Windows software
>>
>>100354783
>make it 0 based
stop being nocoder fizzbuzzer and do it yourself retard, it's free software, you can patch it
>>
>>100354807
>INHERENT DESIGN FLAW IN THE LANGUAGE'S SPEC?? JUST PATCH IT BRO, AND EVERY SINGLE SOFTWARE EVER WRITTEN FOR IT
>>
>>100345698
>I see someone mentally ill.
>So I will call him a tranny
Fixed it for you, tranny.
>>
>>100354833
worked for roblox devs, lua is a shitter nocoder language for shitters who can't code so it isn't meant to be used standalone but as a part of a bigger project, you shouldn't have a problem forking it and possibly even rebranding lua if you aren't a nocodeshitter.
>>
File: 1715080189705.jpg (123 KB, 1281x1395)
123 KB
123 KB JPG
>>100354847
>not reinventing every wheel
>yup, must be a tranny
So what useful thing have you made with pure xlib, /pol/anon? Surely you must have something...
>>
>>100354960
sorry I never found an usecase for using a GUI beyond my browser and watching anime, in fact games MIGHT be a good usecase but personally I'm not a manchild anymore.
>>
>>100354975
so no, you have never made anything useful?
>>
>>100354983
If it requires GUI to be useful in your mind then I guess not but I'm a white man and prefer text to text interface as opposed to tapping my touchscreen monitor like a monkey though that's a personal matter and I'm not going to judge you for it, mr retarded gorilla.
>>
>>100354999
ok then, what useful programs have you made, no gui?
>>
File: fizz.webm (599 KB, 1280x720)
599 KB
599 KB WEBM
>>100345162
sir, just use flutter
>>
>>100355017
I made a fizzbuzz in Qt4 once.
>>
>>100354783
luajit is 0 based if you allocate your data via ffi.new
>>
File: 1684791931772006.jpg (3 KB, 125x125)
3 KB
3 KB JPG
are you people actually, honest to god, doing anything _besides_ text processing/NLP right now?
>>
File: 1715080832092.png (72 KB, 698x658)
72 KB
72 KB PNG
>>100355033
>flutter over qt
can it do multiple windows yet?
>>
>>100355061
>GUItranny hasn't had enough shitting up everyone's monitor with one terrible window, xhe has to spawn 30+ to confuse everyone
>>
>>100355081
so no, flutter lacks one of the most basic desktop ui features and anon is also too much of a retard to figure out which windows on his screen belong to which program.
>>
>>100354999
How does it feel knowing that your government will be made to fall, and you'll hang for being a white man?
>>
>>100355051
yes low level non-graphics related graphics programming
>NLP right now?
lots of people have written compilers and their own programming languages but i don't think i've ever seen anyone doing NLP
>>
>/prog/ doesn't even do NLP
bruh
>>
>>100355192
is anyone even doing NLP anymore?
hasn't it mostly been eaten by ML and LLMs?
>>
>>100355061
but sir, most users get confused by more than one window anyway, just look at all the complaints The Gimp got for it.
>>
>>100355051
Nocoders here don't even get the joke. Anon's asking if we're all AI bots, to which I'd reply "Yes, I'm your friendly neighborhood AI assistant"
>>
>>100355232
LLMs are exactly fucking why NLP is more valuable than ever
>>
File: 1702906381660103.jpg (116 KB, 1280x720)
116 KB
116 KB JPG
>>100355243
that's actually not at all why i'm saying that

i will pose you this question /dpt/

How do you compute standard statistics

-min
-avg
-max
-stdev

not even anything crazy, just the basic 4 statistical metrics
how do you calculate these
for text
>>
>>100355241
but sir, what about our users who aren't literal monkeys? or do we not have any of those?
>>
>>100355285
>but sir, what about our users who aren't literal monkeys?
they use the terminal.
>>
>>100355033
damn that code looks ugly
>>
File: tbd.gif (2.98 MB, 600x338)
2.98 MB
2.98 MB GIF
>>100355294
GUIsisters, I don't feel so good
>>
>>100355246
i suppose i forgot about making datasets

>>100355270
probably do a load of retarded preprocessing related to unicode normalization and errata correction using one of those big spellcheck libraries
chunk into words and keep track of words, then just do the normal math for them
maybe look into some of SIMDjson's algorithms or other compute compatible routines and port them to the GPU/use existing ones
i know there's that thing where you convert words to vectors
>>
>>100355294
good thing the terminal is able to display the things our application needs to be useful... oh wait...
>>
>>100355330
based anon
so there's some good posters here

i'm going much simpler here desu, just straight up n-gram/lexicon choice/etc
we basically have an armsrace between LLM generators and regular human beings
but gpt writes in an incredibly stunted and milquetoast fashion

i honestly think vector things for NLP are cool but overrated/overused, you still have to do a bunch of inherently more expensive operations, and there's as shit ton of cheap wins to be made with just regex tier stuff.

ironically the /aicg/ locusts came very close to fixing their own problem when they made their blacklists of n-grams they hate seeing (english really does hate repetition in words) but they failed to the obvious part - substitution
>>
>>100355342
yes text is the only useful thing, how did you know?
>>
File: 1711794606982919.png (137 KB, 1200x900)
137 KB
137 KB PNG
i hate so fucking much that i have to learn webshittery in order to make proper tools for visualization

there's a nice solution which basically helps genocide the field of webshitters but i dont have the time or patience to work out all the details of it this year because i'll have to go into the abortion of CSS and font and layout autism and shit like that

me in the middle
>>
based russian applied mathematicians, statisticians and physicists, especially in the year 1973
>>
File: 1692560042033848.png (166 KB, 692x446)
166 KB
166 KB PNG
>me in the middle
And we care because ...?
>>
i'm saying i'm mad retard
cartoooooononces are all faceblind even to Chernoff
>>
File: 1695710530500620.webm (3.13 MB, 460x816)
3.13 MB
3.13 MB WEBM
>i'm mad
Good!
>>
>>100344037
I tried to reproduce this blog post
https://jaykmody.com/blog/gpt-from-scratch/
I got stuck with some python dependency stuff with tensorflow and after two hours, I have given up
>>
>>100355470
>we are literally conjuring the sigils of devil
based
>>
>>100355470
why do you have a webm of a CNC router making a crude PCB
it's based but you shouldn't have it
>>
File: killer_song.png (70 KB, 1280x960)
70 KB
70 KB PNG
>>100355512
I have other stuff as well.
>>
>>100355475
that's pretty normal, you've run into the most horrid part of python, it's a side affect of the lack of version stability
you probably weren't using the right python version or package repos
check pip to see if there's a wheel (prebuilt python package) built for your triplet (system and application interfaces), it's especially bad around new python versions but package updates can still take a while to propagate backwards

ML related stuff is probably the single biggest reason i have tons of python versions installed
having an AMD GPU and needing to use special packages for a lot of shit does not help

i think python 3.11 is okay? i seem to remember the rocm version of tensorflow installing fine
>>
>tensorflow
you know that running gag in monty python where they scream "RUN AWAY, RUN AWAY"
>>
>>100355554
*pypi
not pip
>>
i am sick to bastard death of everything in python having 6 different libraries for the same thing
we need an "AI" which produces MegaModules which are supersets made from all the existing libraries for a given functionality
>>
File: too_many_sprites.png (8 KB, 1024x896)
8 KB
8 KB PNG
>i am sick to bastard death of everything
Good!
>>
>>100355270
min - word with smallest count, lowest alphabetical word
max - word with highest count, highest alphabetical word
avg - word with median count, median alphabetical word
stdev - abs(min(avg - min, avg - max))
give me my degree now
>>
>>100355625
Yes. What we actually need is 1 more useless library that does the same thing but fits everyone's use case better
You're a programmer, nigger just write out the library you want to use and just use it. Don't even publish it anywhere
>>
File: 1624067367284.jpg (36 KB, 720x765)
36 KB
36 KB JPG
https://pastebin.com/h85Jz1iw

lol said the GIL, lmao
>>
I just finished my Beginner course in codeacademy!!!!!!!!!!!!

Does anyone have any good resources for understanding the math I need for LLMS? I have some preliminary stuff written down and I was just gonna go on Khan for it but surely someone has something better here.
>>
>>100359059
wolfram
>>
>>100354577
let's all löve Lua!
>>
>>100359177
>>100354577
roblox is dead, no more script building
>>
>>100359177
Lua is fun.
>>
>>100358108
is the GIL really why it takes so long to write each line?
>>
File: marutaro.jpg (81 KB, 640x639)
81 KB
81 KB JPG
>comfy natural syntax
>simple universal data structure (singular)
>small, lightweight, easy to integrate
>easy to modify
>fast
>really fast
>interpreted its faster than other scripting languages compiled
>JIT is basically native speed

>slow
>bloated
>incompatible with itself
>hundreds of different data structures with unique syntaxes you can't possible remember
>if you don't do something the "pythonic" way it runs like shit
>nobody can agree on what "pythonic" even means
>just use a module lol
>indentation as a control structure

>javascript
>javascript
>lol
>>
File: usecase_dark.png (98 KB, 348x452)
98 KB
98 KB PNG
I made an image twice as dark.
import "img"

image = load "usecase.png"
dark_im = arr.[]
for (range len image)->y:
newline = arr.[]
for (range len (image ' 0))->x:
pixel = byte.[(image'y'x'0/b.2), (image'y'x'1/b.2), (image'y'x'2/b.2), 255]
newline = append newline, pixel
dark_im = append dark_im, newline
save "usecase_dark.png", dark_im
>>
>>100353025
It looks like self can't be changed that easily.
>>
>>100359967
schizophrenia is a terrible fate
>>
>>100359967
lua was made out of some white magic
>>
>>100355367
It's a machine translation task that gets rid of "delve" and "it's important to". The milk toast is deliberate. Synonym randomisation would dilute the intended style. LLMs are an excessively sweet pepsi. Yes I'm obese.
>>
>>100359967
imagine using only one data structure
>>
>>100360623
>Yes I'm obese.
Why?
>>
File: btn.png (259 B, 43x37)
259 B
259 B PNG
what does this button on linkedin messaging do
>>
>>100344072
the gayest fucking shit imaginable
>>
>>100361869
/dpt/?
>>
>>100361895
(C95) [Inariya (Inari)] Mesu Gao Complex
>>
>>100361932
>gayest
Pffffff. Neophyte.
>>
>>100362177
maybe, one of my favourites though
feel free to share your wisdom
>>
>>100344037
>What are you working on, /g/?
Openwire parser because Java is jeetware and I hate ActiveMQ and I wish it died horribly.
also, fuck JMS.
>>
>>100362316
>>100361895
>>
>>100361697
Food and food analogies are too good.
>>
>>100362986
That doesn't explain shit. If I eat too much I start having violent diarrhea, which I interpret as a natural mechanism of my body.
>>
File: 32824398043.png (114 KB, 806x805)
114 KB
114 KB PNG
>manually load base address of dll and parse the export address table
>just werks
rust is pretty good desu
also fuck utf-16 strings on windows
>>
how do i become a solo autismo dev that doesnt have to interact with anyone?
>>
>>100363035
I fill the explanatory gap with food.
>>
>>100354359
Yes.
>>
>>100363322
You've still not explained how you've gotten obese without punishing your toilet.
>>
>>100354577
BASEDDD
>>
Why is this happening? (Java)

System.out.println(arr[i]) // "I"
System.out.println(arr[i] == "I") // false


Doing a roman numeral converter in Java. Was very easy in JS. I'm assuming it has to do with memory and not the value itself.
>>
>>100363450
== compares numbers and pointers/references, not strings
>>
File: 234256746654.gif (273 KB, 1247x731)
273 KB
273 KB GIF
>>100344037
>What are you working on, /g/?
i'm working on theming my wpf app, it is a miracle that i reached this point... I need to fix some bugs and add another functionality
>>
>>100363450
you have to use the equals method to compare strings in Java. The code you've written will only compare references, and the one on the right creates an anonymous string constant and compares the references instead of the string's contents.
>>
why doesn't the definition of the monad include the function signature of:
M a -> a


seems kind of obviously useful and complete?
>>
>>100363450
/g/ is full of beginners and nocoders
Why do we even bother coming here?
>>
>>100364428
Not every monad is a comonad. Lists can be empty for example.
>>
>>100364631
The hobby is completely dead. Only an absolute retard would still be trying to learn to program in 2024, If you are intelligent then you either already learned to program, or you have no interest in learning to program. So it's not just that you get beginners here, since there is nothing wrong with being new, The problem is you get beginners made up entirely of the dumbest people on the planet.
>>
>open up linux IO library
>documentation is clearly generated
>extremely ambiguous function definitions
>'flags' as an argument which you have to dig through the source code to find what they are
>closest thing to example programs is the utility collection which use ~20% of the functions
>stackoverflow useless
>rpi forums useless
sigh
>>
>>100365929
If something isn't documented it doesn't exist.
Don't use libs that don't exist. Simple.
>>
>>100344037
Anyone knows of a good way to persist complex data structures in a database? My current implementation is
>serialize the object (I'm using python so I do this with pickle)
>base64 encode it
>save it as a raw string
But this is kinda ugly so I want to know if there is an alternative.
>>
>>100366013
no thats common from my experience so far
>>
>>100366013
you map the data structure into a relational entity and use databases the way Codd intended
>>
>>100364761
>The hobby is completely dead.
what the fuck does that even mean
>>
>>100364428
It is a stronger condition.
f :: Maybe a -> a
f (Just x) = x
f (Nothing) = ???
>>
>>100366139
Well, damn.
>>100366140
The problem with this is that I don't need the RDBMS at all. I just need to persist the data structure so it can outlive the execution of the program.
>>
>>100366746
You can use shelve which uses pickle and you can use it to persist objects without a database.
>>
data abstraction

fn add_complex(z1: &impl Complex, z2: &impl Complex) -> impl Complex {
make_from_real_imag(
z1.real_part() + z2.real_part(),
z1.imag_part() + z2.imag_part(),
)
}

fn sub_complex(z1: &impl Complex, z2: &impl Complex) -> impl Complex {
make_from_real_imag(
z1.real_part() - z2.real_part(),
z1.imag_part() - z2.imag_part(),
)
}

fn mul_complex(z1: &impl Complex, z2: &impl Complex) -> impl Complex {
make_from_mag_ang(z1.magnitude() * z1.magnitude(), z1.angle() + z2.angle())
}

fn div_complex(z1: &impl Complex, z2: &impl Complex) -> impl Complex {
make_from_mag_ang(z1.magnitude() / z1.magnitude(), z1.angle() - z2.angle())
}

#[derive(Debug)]
struct Rectangular {
x: f32,
y: f32,
}
#[derive(Debug)]
struct Polar {
r: f32,
a: f32,
}

trait Complex: Debug {
fn real_part(&self) -> f32;
fn imag_part(&self) -> f32;
fn magnitude(&self) -> f32;
fn angle(&self) -> f32;
}

fn make_from_real_imag(x: f32, y: f32) -> impl Complex {
Rectangular { x, y }
}

fn make_from_mag_ang(r: f32, a: f32) -> impl Complex {
Polar { r, a }
}

impl Complex for Rectangular {
fn real_part(&self) -> f32 {
self.x
}
fn imag_part(&self) -> f32 {
self.y
}
fn magnitude(&self) -> f32 {
(self.real_part().powi(2) + self.imag_part().powi(2)).sqrt()
}
fn angle(&self) -> f32 {
self.imag_part().atan2(self.real_part())
}
}

impl Complex for Polar {
fn real_part(&self) -> f32 {
self.magnitude() * self.angle().cos()
}
fn imag_part(&self) -> f32 {
self.magnitude() * self.angle().sin()
}
fn magnitude(&self) -> f32 {
self.r
}
fn angle(&self) -> f32 {
self.a
}
}

fn main() {
let i_rect = make_from_real_imag(3.5, 6.8);
let i_polar = make_from_mag_ang(34.10, 1.05);

let add = add_complex(&i_rect, &i_polar);
println!("{:#?}", add);
}
>>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.
-----.
--..
--.
+++++++++++++.
>>
>>100366923
Yeah, I know. But it's tricky to get it working in multiple platforms.
For example, in gnu/linux you can use dbm.gnu as the backend but dbm.gnu doesn't work on windows. It will fallback to dbm.dumb but while it has the same interface than the others, dumb creates two files instead of one. This broke the wrapper I was using around it to persist the configs for my application so I had to switch to vanilla pickle.
>>
enum item { i1, i2, i3, items_length };

int items[items_length] = {11, 22, 33};

int current_item = i1;

void thread1() {
printf("i%d value: %d\n", current_item+1, items[current_item]);
}

void thread2() {
current_item = i2;
}


could this ever segfault? like if current_item was being set at the same time as it was being used for array access and somehow (???) it was a number that is not in the enum leading it to reach outside the range (or negative)
>>
>>100367226
I see.
Then having a global dictionary state that holds everything to be saved, loading it on open and saving it on close using a file would be the painless way. You would have a single txt file with a big ass string.
>>
>>100367046
Why aren't you implementing the std::ops so you can just use +
>>
File: 1706769485604345.png (625 KB, 600x600)
625 KB
625 KB PNG
>>100367403
that's my current implementation
>>
>>100367423
this implementation allows for operations between two types of data representations, so you can do add_complex(rect_var, polar_var)
i'm new to rust but isn't std::ops only for creating operations on singular data representations?
i.e. with std::ops i can impl Add for Polar and do Polar {r: 1, a: -5} + Polar {r: 2, a: 3}
>>
>>100367569
https://doc.rust-lang.org/std/ops/trait.Add.html
>Note that Rhs is Self by default, but this is not mandatory
You can implement it for different Rhs types by just doing multiple impls with different signatures.
>>
>>100367793
oh nice. thanks
>>
>>100344037
Trying to learn Haskell, why does this cause an exception?

hasPath :: [(Int, Int)] -> Int -> Int -> Bool
hasPath [] x y = x==y
hasPath xs x y
| x==y = True
| otherwise =
let zs = [(n, m) | (n, m) <- xs, n/=x] in
or [hasPath zs m y|(n, m) <- xs, n==x ]

main :: IO ()
main = do
print(hasPath [(5, 1), (1, 2), (2, 3), (3, 2), (4, 3)] 4 1 )


Since, at some point, it will try do to
hasPath[(5, 1), (1, 2)] 3 1
, but for the next time
(n, m) <- xs, n==x 
will result in an empty list, therefore there will be no "m" to hasPath next.

Yet it just returns False as expected, why?
>>
>>100364428
you can't get the contents and rid of the box (monad)
>>
>>100369122
or [] == False

First you generate the items (n, m).
Then you verify if it goes in the list.
Finally you transform it with hasPath zs m y.
5 /= 1 and 1 /= 3 therefore there are no items and the list comprehension is empty.
>>
>>100369448
Oh, I see, trying to map an empty list just returns an empty list before tying anything, then?
It's nice to know that it does that internally.
>>
>>100369481
Yes, map f [] or fmap f [] return [].
List comprehensions desugar to do notation so don't worry about it for now.
>>
>>100344037
Types are for dykes. (They are... pssttt... gay.)
>>
>>100369632
Are these dykes in the room with us now?
>>
File: 1687157626346543.png (309 KB, 600x800)
309 KB
309 KB PNG
I'm a retarded C++ monkey but I want to see if it works. I'm trying to replace the std::make_pairs with brace initialized lists but it's giving me an error. Could someone tell me if this is possible or not, and if so, how I could get this working?


struct Piece {
std::array<std::pair<int, int>,4> piece_locations;

template<typename... Args>
constexpr Piece(Args && ... args) : piece_locations{args...} {};
};

int main() {
Piece piece(
std::make_pair(0, 0), // OK, compiles
std::make_pair(0, 0),
{0, 0}, // Clang reports this has "no value"
{0, 0});
}

>>
File: file.png (105 KB, 1200x278)
105 KB
105 KB PNG
Why the fuck do both of those actually work?
I understand that the first one is comparing a term os a list with e and then "ANDing" it with the next, until it finishes the list and then... and then what? Wouldn't trying to compare 'e' with "True" result in an issue? I also, I would end up "ANDing" it with nothing?

The bottom one is even worse, WTF is Acc supposed to be, and how does the function above it works the same way without it?
>>
>>100369632
That's what great about them.
>>
>>100370462
acc = accumulator (the state folded through the list)
\x -> (&&) (e == x)
\x acc -> (&&) (e == x) acc
\x acc -> (e == x) && acc
the same applies for isAll itself
isAll e = foldr ... True
isAll e xs = foldr ... True xs
>>
>>100370462
>Wouldn't trying to compare 'e' with "True" result in an issue?
I assume this is JavaScript. If it is the types get coerced to a common ground for comparison

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#other_coercions
>As you may have noticed, there are three distinct paths through which objects may be converted to primitives:
> Primitive coercion: [@@toPrimitive]("default") valueOf() toString()
> Numeric coercion, number coercion, BigInt coercion: [@@toPrimitive]("number") valueOf() toString()
> String coercion: [@@toPrimitive]("string") toString() valueOf()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality#description
>4. At this step, both operands are converted to primitives (one of String, Number, Boolean, Symbol, and BigInt). The rest of the conversion is done case-by-case.
> • If they are of the same type, compare them using step 1.
> • If one of the operands is a Symbol but the other is not, return false.
> • If one of the operands is a Boolean but the other is not, convert the boolean to a number: true is converted to 1, and false is converted to 0. Then compare the two operands loosely again.
> • Number to String: convert the string to a number. Conversion failure results in NaN, which will guarantee the equality to be false.
> • Number to BigInt: compare by their numeric value. If the number is ±Infinity or NaN, return false.
> • String to BigInt: convert the string to a BigInt using the same algorithm as the BigInt() constructor. If conversion fails, return false.
>>
>>100370543
I don't understand, how can we add a random argument and the result is the same?
Why are we even adding "acc", then?

>>100370551
It's Haskell.
>>
>>100370650
>I don't understand, how can we add a random argument and the result is the same?
because it's a function, you're just defining it as equal to another function
f x y = g x y
f x = g x
f = g
understand?
>>
>>100370933
>understand?
No, because the number of arguments I'm providing is still the same every time.
How can I "ask" for one more and this not break the function?
>>
>>100370650
>>100370933
(if it wasn't a function this wouldn't be true)
also there are very technical exceptions relating to laziness but you will pronever be in a situation of needing to care
>>100370950
length is a function that gives the length of a list
suppose I wanted to define another function h, that computes the length of a list
I could write
h xs = length xs
i.e. h when supplied with xs is equivalent to length when supplied with xs
or I could write
h = length
i.e. h is equivalent to length
>>
>>100370965
I understand that in h xs = length xs it is a partial function, and therefore I could define h receiving something other than a list as input as something else, and that x = length copies the full thing, OK.

But I still don't understand how this relates to my original question, it seems like a completely different context.
What is acc supposed to mean (Yes, I know it stands for accumulator, but I don't know what that means either)? And if it is so important, how can we make the same function without it?
>>
File: file.png (281 KB, 1280x1430)
281 KB
281 KB PNG
>>100370965
This all sounds contradictory:
First he explains me that folds takes a binary function because it will apply it to an element of a list and the value to it's side.
But then gives an example of something that folds with a single value, and not a value of a list and it's "neighbor".
Also, how are we even increasing acc? I thought variables in Haskell where immutable? Why does this code sounds so imperative?

Is the course I'm using fucking shit and I should be using a better one?
>>
>>100371013
>>100371077
its called accumulator because it is accumulated
it isn't literally modified, but you can imagine it as a state being threaded through the list - in reality it is one value passed into a function to give another value, that is then passed into a function again to give another value etc, so nothing is ever changed in-place
in Haskell functions are usually curried, i.e.
\(x, y) -> True
\x y -> True
are different ways of "taking two arguments", the former takes a tuple, the latter is equivalent to
\x -> \y - >True
i.e. normally in Haskell you write multi-parameter functions as functions returning functions, which is why you can easily partially apply them
notice that in these examples I am returning True. If I returned another function I could supply another argument
>>
>>100371123
I understand this, I just don't see how do you jump from this to... that.

>its called accumulator because it is accumulated
This tells me nothing.
If it's being accumulated, then how do we have to explicitly do it here>>100371077 ?
And how can we make a function without it like in here >>100370462 ?
>>
>>100371155
Because (\x -> f x) is the same as f, the same with the h xs = length xs vs h = length earlier. And (\x y -> g x y) is the same as (\x -> g x) is the same as g. (*There is a very technical difference involving laziness that you will never encounter and don't need to worry about.)
The accumulator is still there either way. foldr requires that you supply it a function (a -> s -> s). But there's no difference between binding both the a and s and returning an s, or binding the a and returning an s -> s.
>>100371077
>>100371123
e.g.
add :: Int -> Int -> Int
add a b = a + b

we think of add as taking two parameters, but if you think about it less abstractly every Haskell function has 1 input and 1 output. add, the "binary" function, actually takes an int, and returns an (int -> int) function. If that is then supplied with an argument, you will finally have an int.
add :: Int -> (Int -> Int)

A simple example you can translate to other languages is a function on functions, e.g. suppose you have two functions f and g, you can imagine adding the functions themselves such that (f + g)(x) = f(x) + g(x)
add_fun :: (a -> Int) -> (a -> Int) -> (a -> Int)
add_fun f g x = f x + g x

Now add_fun was described as a binary operator, like +. But if you think about it, even in this example, even if you had taken a tuple of both arguments, the result is still a function - that's the whole point of add_fun. So you can supply an"other, third" argument to it - it's just a way of thinking about it
>>
>>100371177
to add on to that example I also could have written
add_fun f g = \x -> f x + g x

instead of
add_fun f g x = f x + g x

but you see the "three argument function" and the "two argument function, returning a one argument function" are the same thing.
also I have to go to work soon
>>
>>100371177
>>100371213
OK, so far so good, that much I understand without much hassle.
But I still don't fully understand how this works on the two screenshots here and what the accumulator is supposed to be.
>>
>>100371290
Consider foldr (+) 0
The accumulator is the concept of the running sum, the total-thus-far
It's the second argument to the function you give foldr, because foldr has type
foldr :: Foldable f => (a -> s -> s) -> s -> f a -> s

i.e. the s. This is how you can think of foldr as stateful, the function you give it takes an element and then the current "state"/total and gives a new "state"/total. This is done for every element until you have the final result - in reality nothing is ever actually modified.
\x acc -> (e == x) && acc
Is equivalent to prefix syntax
\x acc -> (&&) (e == x) acc
Remember this type of binary function (two spaced out arguments rather than a tuple of them) is a curried function. It takes an argument and returns a function that takes the "next" argument. In other words (&&) (e == x) is a function. So we can simply drop the acc on both sides.
\x -> (&&) (e == x)
The acc is still there, conceptually, we just don't need to mention it.
You probably won't do this, but you can go even further - there is a style called "point-free programming":
(&&) . (e ==)
Could replace the entire lambda, since f . g = \x -> f (g x), so
(&&) . (e ==) = \x -> (&&) (e == x) = \x acc -> (e == x) && acc
>>
File: demon_core.jpg (286 KB, 1584x2048)
286 KB
286 KB JPG
Anyone know of a trick to detect if a given argument in a c preprocessor macro is a string literal (e.g. if it is surrounded by quotes)?
>>
>>100370462
babby's first point free
>>
>>100371373
Like this?
#include <stdio.h>

#define CHECK(x) "" x ""

int main(void)
{
printf
(
CHECK("%u\n"), /*No compile error.*/
CHECK(2) /*Compile error.*/
);
return 0;
}
>>
>>100371342
Here is another example
foldr (:) []

Here I don't bother binding either of the arguments in the function passed to foldr. But they are still there - as in, it's still a function, and foldr will still pass it both arguments.
foldr (\x acc -> x : acc) []
Here the accumulator is a list, and I simply cons onto it. This is a dumb example that ultimately returns the same input list. (This also relates to the observation that foldr f z on lists replaces : and [] with f and z)
>>
>>100371392
Yeah, I thought of that but I want a way that isn't a compile error in the second case though but rather something I can detect in the macro and expand it in a different way.
>>
>>100371397
I have to go to work now but try this
isAll e = foldr f True where
f x acc = e==x && acc

replace f in foldr with (\x -> f x) or (\x acc -> f x acc)
>>
>>100371398
In that case you'll need compiler support. GCC has typeof and __builtin_types_compatible_p that you might be able to use: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
>>
>>100371342
>\x acc -> (e == x) && acc
>Is equivalent to prefix syntax
>\x acc -> (&&) (e == x) acc
OK, that I understand.
>Remember this type of binary function (two spaced out arguments rather than a tuple of them) is a curried function. It takes an argument and returns a function that takes the "next" argument. In other words (&&) (e == x) is a function. So we can simply drop the acc on both sides.
\x -> (&&) (e == x)
The acc is still there, conceptually, we just don't need to mention it.

This, however, makes no sense to me.
Is there a way to write (+) more explicitly, both using and committing an accumulator so I can understand this better?

Because I understand that in something like fold (+) 0 [1..5] were essentially doing "1+(2+(3+(4+(5+(0)))))"
But how would that work if instead of a + you had one of those lambda functions using an accumulator? That I can't visualize.
It feels like we're talking about two different concepts, but I'm being told they're the same.

>>100371397
Like I'm saying: It really seems obvious when you do it with a basic operation like adding or prepending.
Is when lambdas with accumulators are involved that I don't understand shit anymore.
>>
>>100371421
Meh I'd rather work around it in a different way than use builtins, thanks anyway though Anon.
>>
>>100370200
https://en.cppreference.com/w/cpp/language/class_template_argument_deduction
you need to write some manual deduction guides
should be easy since it's not actually a templated class
>>
>>100371419
Wait, I think I'm getting it: So we're not doing an AND operation with e==x and acc, but rather with acc and the the next element of the list that we will apply our function?
Or am I wrong and we are essentially doing (&&) (e==x)(acc)?
>>
>>100354514
>How do I come up with projects/ideas to do in my spare time so I can train backend deving?
Think about repetitive tasks at work and learn to automate them. You can probably write scripts that take 2hr tasks down to 2min.
>I work in the TV industry.
I'm not entirely sure what your job entails. Maybe it means renaming and organizing footage for archiving. Maybe it means converting videos or adding embedded subtitles. Maybe it means creating a program schedule. Maybe you have to combine b-rolls into a clipshow for bumper content. All of that can be scripted. Maybe you just want to deal with filing paperwork better or linking all documents and associated media content through a database. Maybe you want a nice gui interface to make a part of the job easier for your team.

Watch youtube videos on coding projects. They take you from beginning to end of a project
If you haven't already then read Automate the Boring Stuff with Python. It does more than just teach you how to code. It teaches you how to think through everyday problems the way a coder should.
You can also talk to chatgpt about this, to explain parts of yout job and then ask it to give you recommendations on how python can help.
Python for feature film - https://www.gfx.dev/python-for-feature-film
>>
>>100371431
>>100371398
>>100371373
This sort of works, but has limitations because string literals don't have any additional type information as such, and using _Generic can bring its own set of limitations when you add too many layers of macro fuckery onto it.
#include <stdio.h>

#define IS_LIT(s) _Generic(&(s), \
char (*)[sizeof(s)]: "String literal", \
char **: "Not string literal")

int main()
{
char *str = "abc";
char arr[] = "def";

printf("%s\n", IS_LIT("a"));
printf("%s\n", IS_LIT(str));
printf("%s\n", IS_LIT(arr));
}

You're definitely right in just not doing it. If you want a macro for string literals and one for other strings, I'd just have 2 macros with different names.
>>
>>100371542
I specified the industry I work in but in reality it doesn't really matter for what I'm after (which I maybe phrased very badly, mb).
I just want the names of concepts/ideas that are related to backend development in general so I can come up with a project idea based on it. For example, if a student came in with the question I'm asking I'd tell him to do
> a CRUD project with some DB management
> an API with a client that'd consume it
> something with a login system
Since that are some stuff asked a lot to juniors when they start a job.
I'd like someone more experience than me to tell me the equivalent of this.
>>
In C++, when a class is allocated on the heap, why would you also want members to be pointers when they're only allocated in constructor? Like why do some pople do this:
class Foo
{
Foo()
: bar{std::make_unique<Bar>()}
{
}

std::unique_ptr<Bar> bar;
};


Instead of this:
class Foo
{
Bar bar;
};


When Foo is all
>>
>>100372437
Concerns that the size and number of used objects could blow up the stack.
>>
Creating my first wpf custom button was an accomplishment
>>
>>100371990
Yes I don't want to mess with _Generic either, as I don't use it anywhere else and I don't want to pull in language features just for a stupid thing like this. I'm just going to wrap the literals in question with another macro instead of trying to automatically detect them, it doesn't look as bad as I thought it would.
>>
>>100372489
That's why I said allocated on the heap, imagine Foo is always allocated with new/a smart pointer, and never on the stack?
>>
>>100372437
What >>100372489 may be true if Bar is really big and Foo might be on the stack, but more likely than not whoever wrote the constructor is just stupid and thinks you need to always allocate everything as smart pointers or something. Normally you're right, it's better to just have everything inline so it ends up on a single contiguous chunk of memory.
>>
File: 1701459806412930.png (1.17 MB, 1642x1512)
1.17 MB
1.17 MB PNG
I officially have an Erdos number, does anyoine else have one?
>>
>>100372655
>wpf
I'm sorry for your lots anon
>>
>>100355512
>>100355470
why is it doing all that effort to outline those lines when there is already a dark line around them? its just making the dark line wideer
>>
File: صورة.jpg (427 KB, 2316x2280)
427 KB
427 KB JPG
>>100372726
>I'm sorry for your lots anon
Thanks anon it was a pain, chatgpt was useless and i needed to browse stackoverflow and documention a lot to figure how things works, stil better than win32 or creating a button from scratch in C++ (or god forbid C)
>>
>>100372701
Then they either try to be real dynamic by allowing the user to change parts of the implementation, or they're real retarded.
>>
she's trying to program assembly and she doesn't get it
https://www.youtube.com/watch?v=pWl7tdGn4Fw
what a cute little alien thing she is
>>
>>100372993
Ain't clicking vtuber bullshit.
>>
reminder: VS Code was created using VS Code

https://youtu.be/U6s2pdxebSo?si=eEtbXDoxxG9Z3EQ-&t=589
>>
>>100373100
Who cares. Literally everyone at Microsoft is incompetent.
>>
>>100373160
typescript literally saved the world dude
>>
>>100373238
Whose world, and do I care about them?
>>
>>100372993
pedo shit
>>
File: 1700067252916702.png (245 KB, 1200x1600)
245 KB
245 KB PNG
>>100354577
Is[totally].shit{awful}"niceButtTho"
>>
>>100373005
More dignified than most of /a/ at this point, good job
>>
what's the most painless way to migrate python scripts with opencv and numpy dependencies to android?
how do I package cv2 and numpy to an apk?
>>
>>100373313
/a/ heads never had any dignity, see the trash that Cowboy Bebop is.
>>
>>100373343
/a/ hates Cowboy Bebop
>>
>>100373486
So they finally grew a brain in the last five years? Good.
>>
>>100372437
PIMPL, i.e. you hide implementation details and avoid pulling more headers
or polymorphism
>>
>>100373326
Look into Chaquopy.
>>
Let's say I develop website that allows people to post comments and pictures, like 4chan.

How do I make sure people don't upload illegal stuff to my system? I can't sit at my computer 24/7 and moderate it.
>>
>>100374006
>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.
>>
>>100374006
you can't. you have to be a janny.
now you understand why I hate CP laws.
>>
>>100374006
why do you want to do that?
https://en.wikipedia.org/wiki/Online_Copyright_Infringement_Liability_Limitation_Act
>>
>>100374036
Wouldn't it pretty much make it impossible for a single developer to maintain any kind of system that has any sort of user uploaded content?

What if I go away for couple hours and someone starts posting detailed plans on what they are planning to do to people (in Minecraft). What if someone decides to upload their whole pizzeria collection?
>>
>>100374089
Sounds like a party to me.
>>
>>100374089
>Wouldn't it pretty much make it impossible for a single developer to maintain any kind of system that has any sort of user uploaded content?
yes, that's by design. I have an image making thing and it's intentionally pixel tier garbage so I don't have to give a fuck.

theoretically, you can just wash your hands of it, but I don't want to deal with glowniggers or explaining why I don't bother logging and shit and constantly deleting shit.
>>
>>100363251
based rust. and yeah, think they use wtf-8 under the hood which might've had some issues in the past
>>
>>100374173
>wtf-8
based name? is this Rust on Windows only thing? looks like it's just 16bit encoding that tries to "mostly fit" ucs-2 in most cases.
>>
>>100374070
Is this even related? Pizza isn't illegal under intellectual property law
>>
>>100374211
I wouldn't bother trying to understand or be some sovereign citizen and apply your understanding to the law. Civil and Common law countries are all fucked anyhow.
>>
>>100374211
It is, once the actors will lobby for it to become legal so that they can receive royalties.
>>
>>100374200
yeah it's what's used for dealing with windows strings. people get bitten by it when they try doing things based on incorrect assumptions

there's a bunch of shit strewn about but not sure where everything is. sys::pal is another place
https://github.com/rust-lang/rust/blob/master/library/std/src/os/windows/ffi.rs
>>
File: funnyface_1.webm (60 KB, 210x360)
60 KB
60 KB WEBM
>>100374006
>>100374089
>you now understand why big websites have big teams of jannies
>you now understand why some websites even pay jannies
>you now understand why longstanding smallish websites with few jannies just happen to also be the most hiveminded communities
>you now understand why some sites shadowban users instead of a regular ban
>you now understand why some sites have a delay before your post goes live
>you now understand why their TOS is so damn long
That being said I think you can use AI for alerting you to certain types of image content. I know for sure there is one that scans and alerts for nudity. I believe websites with UGC also have some protection agreement where they have a certain buffer of time to remove unlawful content once they've been alerted to its presence.
>>
>>100374305
>//! For historical reasons, the Windows API uses a form of potentially
>//! ill-formed UTF-16 encoding for strings. Specifically, the 16-bit
ya, my biggest gripe with winshit and UTF-16 in general. That and the endianess not being defined and then people not knowing how to spot UTF-8 assumed UTF-16 and other hilarious bugs.

anyhow. Rust on Windows is actually pretty ok. It's really easy and for the most part the Win32 docs can be straight copied to Rust and it just works at least.
>>
>>100374312
a lot of those are just because low information schizos means we can't have a fair and free speech zone, but ya. content laws really fuck over anyone without a janny squad or an active community.
>>
>>100374222
I don't disagree, I just think it's worth pointing out that the liability for user generated content is not always related to intellectual property. I've been doing hobby homebrew gamedev lately and all my copyright research ends up with the conclusion that it is always irrelevant to try to understand because the only benefactors are the corporations that will price you out of lawsuits regardless of how "correct" you are. I've decided it's best to ignore it and if the worst case scenario arises, consider calling their bluff and continuing to ignore it.
>>
>>100374089
>Wouldn't it pretty much make it impossible for a single developer to maintain any kind of system that has any sort of user uploaded content?
yes, and Facebook et al spent millions of dollars on buying enough politicians to push through the laws that created this state of affairs.
>>
>>100374388
i don't do anything win32 specific but i've checked on the windows crate every now and then, it's had tons of work put into it. i just like using rust and switched to it years ago because i could write a program on any of the big 3 oses and it just works on the others. never came close to that with using c
>>
>>100374489
windows crate is mixed imo. I prefer the windows-sys since it doesn't try and hide shit from you. the "safe" bindings for windows are limited to a select few apis so you end up writing a bunch of unsafe no matter what.
>>
>>100374489
>>100374748
alternatively, use a non-retarded language
>>
>>100374776
....like what?
pray tell, anon.
>>
>>100373308
very cute
>>
>>100374006
It's kind of funny reading this read right now because I just opened FB and someone had an explicit porno posted to their wall
>>
>>100374854
porno isn't a crime thoughbeit.
>>
>>100372437
>>100373866
encapsulation is a mental illness, disregard
>>
>>100375070
>t. has never programmed anything outside of fizzbuzz
>>
>>100375070
Ironic, considering you're the one here who sounds mentally ill.
>>
>>100375070
>encapsulation is a mental illness
honestly, the c preprocessor and its consequences on how C++ works is the real mental illness. sadly modules are basically DoA.
>>
>>100372437
Bar can be an incomplete type in the first one, in the second one it has to be a complete type
>>
File: 1663951513404055.jpg (36 KB, 798x644)
36 KB
36 KB JPG
>>100375124
>anything outside of
>>
File: sicp snake.png (27 KB, 666x768)
27 KB
27 KB PNG
>>
>>100375194
>>100375219
it's the same bullshit as functional programming
a 100% stateless program is one that doesn't do anything
a 100% encapsulated program is one that can't interact with anything

it's a folly, embrace stateful coupling and get some real work done
>>
>>100374489
>>100374748
i don't use the windows/windows-sys crates because i disagree with some of the decisions and they don't include certain undocumented structs/functions
also i have to manually load everything anyway and then do some fuckery to avoid EDR hooks so i just define what i need
>>
Anyone know of a project like this but in Rust? https://github.com/akawashiro/sloader
>>
>>100375561
You seem confused
Restrictions on mutation are a programmer aid, but more importantly they're pivotal to the overall design of a compiler
When every binding can be mutated by every operation, you cannot optimize
If you want that, use Python
>>
>>100376441
>>100376441
>>100376441
New
>>
>>100371464
>>100371429
you ARE doing and with e == x and acc, AND acc is the result of applying this to the rest of the list, e.g. if your list is [1, 2, 3] AKA 1:(2:(3:[])), then you get
f 1 (f 2 (f 3 True))
So in the innermost call to f, acc = True
In the middle call, acc = f 3 True
In the outer call, acc = f 2 (f 3 True)
(foldr f z xs) where xs is a list, literally replaces : and [] by f and z
foldr f z [] = z
foldr f z (x:xs) = f x (foldr f z xs)



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