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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor applications are now being accepted. Click here to apply.


[Advertise on 4chan]


File: 1757958852.jpg (36 KB, 474x592)
36 KB
36 KB JPG
What are you working on, /g/?

Previous: >>106558636
>>
>>106596041
Working on with alcohol withdrawal.
>>
Is Go the best language to use for high performance backend webdev?
>>
>>106596041
Thanks for using a picture of a maid!
>>
File: xd.png (75 KB, 496x474)
75 KB
75 KB PNG
>>106596041
>What are you working on, /g/?
Studying the actor model. Any takes about it are welcome.
That aside, I'd like to welcome a new member to the schizo club:
>C++ print schizo
Featuring:
Luddite takes
>you don't need build tools other than make
>visible aggression towards string formatting
>you don't need libraries
>I only need x86_64 and linux
and entire legacies!
>variadic template vomit for a type safe print
The list might expand slowly until she fucks off, trip/namefags, or die.
>>
>>106596162
Why didn't you post this in the relevant thread where I was waiting for your response while everyone was laughing? Looking for friends to defend you?
>>
I fucking TRANSHEART formatting! https://www.cve.org/CVERecord/SearchResults?query=printf
>>
Guys, how do I scrape past cloudflare? any working solutions?
>>
>>106596178
You really are a schizo KEK
>>
>>106596225
And you are really a newfaggot.
Or are you? It seems like you've been studying actor model for a decade if not two by this point, too retarded to finish studying it and get something done?
>>
>>106596041
I am working on hosting my own git so I can test out some local AI Agents
My plan was to use podman + gitea + postgre
>>
>>106596102
Just drink bro. You are a real man, aren't you?
>>
>>106596213
Try searching for CF clearance cookie scraper
>>
>>106596239
what would you use local AI agents for out of curiosity?
>>
>>106596234
>It seems like you've been studying actor model for a decade if not two by this point,
Meds. NOW.
>>
>The actor model in computer science is a mathematical model of concurrent computation that treats an actor as the basic building block of concurrent computation.
So it's a nocoder's idea of how computers should work...
>>
>>106596279
I will first have to try out if they will work at all.
I will try out speech to text models and Experiment with MCP.
I have some projects that just provide tooling for my main projects, maybe the AI can help me with that, or at least help me to better navigate my codebase.
>>
>>106596041
Is the girl in the op a coder or something?
>>
>>106596829
It's a man with a manly voice
>>
>>106596847
Stop trolling me dude. What does she program?
>>
>>106596041
How do function pointers work? Why can't a function be too large to be held in a pointer? In fact, how the fuck do void pointers work?
>>
>>106596866
She has a big Coq repo and likes everything about formal proofs and high integrity software
>>
>>106596983
Pointers do not hold the pointee, only its address.
>>
>>106596983
>Why can't a function be too large to be held in a pointer?
Pointers don't hold anything, they just point.

>In fact, how the fuck do void pointers work?
It points, but there's no information about what it's pointing to until it's cast to a different pointer type.
>>
>>106596143
yes
>>
Lambda calculus.
>>
Mu-mu-tilde calculus.
>>
>>106596983
In the same way a house is not too large to be held in an address, it's just pointing where the data is
>>
>>106596143
Backend dev is IO bound so even a Java (micro)framework can come out on top.
>>
File: 1733414249904745.jpg (46 KB, 303x335)
46 KB
46 KB JPG
>>106596866
"she" programs his own dick.
>>
>>106597066
Do you know a good source to learn about this?
>>
>>106597143
https://studenttheses.uu.nl/bitstream/handle/20.500.12932/35717/thesis.pdf?sequence=1&isAllowed=y
>>
>>106597217
Thanks! This looks great
>>
>>106596260
Real men die of alcohol poisoning!
One of my friends has developed alcohol-related dementia, he's so close...
One other friend managed to quit drinking but got addicted to red bull instead. Still a lot better than the vodka.
I wish my super sick friend had had more help with fixing the mental problems that led him to drinking instead of making drinking his main lethal problem...
>>106596102
Good luck man, I believe in you
>>
>>106596041
I wrote a C# library that pushes application-layer authorization down into the EFCore DbContext.
>>
why doesn't this work?? I'm moving the vector to deal with the unique_ptrs inside the struct that make it move only, but I keep getting complaints about
>error: static assertion failed: result type must be constructible from input type
and I don't understand what it needs me to do

#include <iostream>
#include <memory>
#include <vector>

class MyClass {
public:
struct Info {
int a;
std::unique_ptr<int> b;
};

void replace_infos(std::vector<Info> new_infos) {
infos = std::move(new_infos);
}

std::vector<Info> infos;
};

int main()
{
MyClass myClass;

myClass.replace_infos({
{ 5, nullptr },
{ 6, nullptr },
});

return 0;
}
>>
>>106597094
Java NIO was breddy gud but C# solved multithreaded I/O with async/await.
>>
>>106597817
you need to initialize myClass
>>
>>106597919
but it's initialized right there, first line in main. I wouldn't be able to call the function if it wasn't initialized
>>
>>106597817
    MyClass myClass;

std::vector<MyClass::Info> infos;
MyClass::Info info;
info = {
.a = 5,
.b = nullptr
};
infos.push_back(std::move(info));
info = {
.a = 6,
.b = nullptr
};
infos.push_back(std::move(info));
myClass.replace_infos(std::move(infos));


okay I made it work, I guess initializer lists cannot be moved for whatever reason (but it lets me move my 'info' object constructed from an initializer list ???). anyways is there a way to streamline this so that it's not so overlay verbose?
>>
File: file.png (94 KB, 786x563)
94 KB
94 KB PNG
is this really necessary
>>
>>106598342
Is this a zero copy view?
>>
>>106598342
>1(one) declaration
>hit character limit
>>
>>106598342
No, you can just use bit cast and/or memcpy for trivial types and nontrivial types aren't sent over network.
>>
>>106598387
Goodluck with that when sar sends you data in Big Indian because sars always did it this way and your Little Indian cannot cope without reversing bytes first.
This just proves that standard's comittee is retarded nocoder club.
>>
I always serialize data with as little Indians as possible.
>>
Recommend me a project to put on my resume for an internship.
>>
File: file.png (302 KB, 979x1965)
302 KB
302 KB PNG
resolving all the minutiae of this towards getting a decently robust prototype was more finnicky than i expected

i started with making lock-free alloc-free multithreaded logging, which worked well on a single producer single consumer model
then i thought i might try to expand to multi producer multi consumer tinkering, then i decided to create my own lock free, alloc free multithreaded general purpose event queue that supports work stealing and fiber scheduling, and i think itll be nice when it's done
>>
>>106596213
>>106596269
What is scraping?
>>
>>106598839
>What is scraping?
Scraping is extracting data out of HTML.
https://lispcookbook.github.io/cl-cookbook/web-scraping.html
>>
>>106598866
How is that any different from a web crawler?
>>
>>106599079
>"Web scraping is when you collect specific data from websites. However, web crawling is about going through the internet to see what’s there, like walking around a forest to know its paths."
https://medium.com/@datajournal/web-crawling-vs-web-scraping-8fedba9531fb

seems intuitive to me
>>
>>106599094
What if you hit an account wall where you have to sign up. Then you can't scrap any data. Correct?
>>
>>106599177
I was just explaining the definition, that is a different issue that I can't help you with
>>
Why does my brain get sore when I spend many hours trying to figure something out and then try it out and the fucking problem isn't solved? Sort of how you workout a muscle and it gets sore.
>>
This thread sucks. I miss maid /dpt/.
>>
File: IMG_1077.jpg (128 KB, 600x711)
128 KB
128 KB JPG
I wish I could hack discord, and mute people.
>>
>>106599528
that's how brains work
can't solve something within an hour? go for a walk, at least a 15 minute one. you'd be surprised how much taking a break can help
>>
>>106599528
>spend an hour at the gym
>WTF why are my muscles sore and weak?? shouldn't i be getting stronger???
>>
I'm working on a project that involves multiple source files, and it's built using CMake. Is there a way I can edit the CMakeLists text file to include debugging information? Also, how can I debug from a specific source file? My main source file just calls a function that drives the program.
>>
>>106599528
Known VAXX side effect
normies call it brain fog
>>
>>106599624
You can cure any vax related problems by listening to Rhapsody of Blue Sky. It turns off the nanobots, though it will make you want to wear a maid outfit as a side effect.
>>
in c++17, should I do

#ifndef NDEBUG

#define DEBUG(...) fprintf(stderr, "...", ...); etc
#else
#define DEBUG(...)
#endif

// OR ??

#ifndef NDEBUG
constexpr bool DEBUG = true;
#else
constexpr bool DEBUG = false;
#endif

template<shit>
debug_print(...) {
#ifndef NDEBUG
etc
etc
}

if (debug) {
debug_print(...)
}

>>
>>106599857
Depends on the style of your maid outfit.
>>
Why did you pick that pic for the thread i hate looking at the catalog now. :/
I really am incompetent arent i.
>>
>>106600025
Anti-semaidism
>>
File: 1752170513164556.jpg (71 KB, 823x615)
71 KB
71 KB JPG
STOP following clean code blindly
QUIT creating millions of shallow classes for one line functions
>>
>>106599857
Excuse me Mr. Anon- how do I put my code in the format you just did there?
>>
>>106599857
I'm doing something like this in my current project:
#ifdef EXAMPLE_DEBUG
#define debug_log(fmt, ...) _debug_log(fmt, ##__VA_ARGS__)
#else
#define debug_log(fmt, ...) _disabled_debug_log(fmt, ##__VA_ARGS__)
#endif


Basically I call
debug_log()
exactly like
printf()
.
In the release build,
_disabled_debug_log()
is just a constexpr function that returns 0 immediately (because printf usually returns its length).
In the debug build, by default
_debug_log()
just prints to stderr, but it does so through a callback function that can be set to something else in case I want to handle the debug log differently (project is a shared library, so I might want to handle it differently in different programs that use the library).
>>
File: 1747323177819610.png (9 KB, 361x70)
9 KB
9 KB PNG
>>106600551
wtf since when did inline code become so thick and ugly?
>>
God they grow up so quickly.

Are we going to get to see Handmade Hero before he starts collecting his retirement pension.
>>
>use GNU statement expressions in macros
>-Wpedantic flips its shit because of the ({ braced group
there's no way to silence these warnings other than disabling pedantic, is there
>>
>%6 less instructions
>%2 worse performance
wtf is dTLB and why does my program miss %70 of it
>>
>>106597817
template<class T, std::size_t N>
constexpr std::vector<T> make_vector( std::array<T,N>&& a )
{
return { std::make_move_iterator(std::begin(a)), std::make_move_iterator(std::end(a)) };
}

template<class... T>
constexpr auto make_vector( T&& ... t )
{
return make_vector( std::to_array({ std::forward<T>(t)... }) );
}

myClass.replace_infos(make_vector(
MyClass::Info{ 5, nullptr },
MyClass::Info{ 6, nullptr }
));
>>
>>106600466
Read the sticky
>>
>>106596162
>luddites
>x86_64
>>
>>106598691
You can log in every single thread separately, you know that, right?
>>
>>106599617
export CXXFLAGS='-g' should be enough for a non-dogshit build system, not sure if CMake is or isn't, because Make is all I ever used.
>>
File: .jpg (109 KB, 500x499)
109 KB
109 KB JPG
>>106601080
Yes, people who get shit done are luddites, that's why my print is so effective at making trannies seethe.
>>106599857
So, yesterday I had this...
void
print_unchecked(char const* const ptr, usize const len) noexcept;

template <usize N>
void
print_unchecked(char const (&ptr)[N]) noexcept
{
print_unchecked(ptr, N - 1);
}

void
print_unchecked(u64 const number) noexcept;

void
flush() noexcept;

template <typename... Args>
void
print(Args&&... args) noexcept
{
(print_unchecked(static_cast<Args&&>(args)), ...);
flush();
}

Hmmm, lets see...
template <typename... Args>
void
debug(Args&&... args) noexcept
{
#ifndef NDEBUG
print("[DEBUG] ", static_cast<Args&&>(args)...);
#endif
}

That was very hard and took me HOURS of thinking how to solve in my overcomplicated setup of cepples with Make as is done by true luddites, enough programming for today, I'm exhausted from writing this trivial function that just works, bye!
>>
>>106601666
In Cshart this is just
System.Data.DataTable table = new();
while (true)
{
Console.Write("Enter expression: ");
Console.WriteLine(table.Compute(Console.ReadLine(), null));
}
>>
What does it mean for a pointer to hold an address? Don't you need more memory cells the larger the pointee? So, shouldn't pointers to double or large structs hold more than one address? In fact, can't void pointers be arbitrarily large?
>>
File: 1741113851878689.png (224 KB, 800x523)
224 KB
224 KB PNG
Zoomers are done lmao
>>
>>106602057
when you realise they'd just be vibe coding instead of learning how to code you immediately stop feeling sorry about them
>>
>>106602011
what the fuck am I reading lmao
do you need a larger address when referring to a mansion compared to a hut?
>>
>>106600189
I dunno if clean code is referring to some specific book here but clean code generally tries to reduce number of files because navigating them becomes a pain. I was once working on a CRUD project with literally 1000 files that could basically have been 100.
>>
https://en.wikipedia.org/wiki/Monadology
>300 years later
>people are still trying to explain what's a monad is

>Leibniz uses his theory of Monads to support his argument that we live in the best of all possible worlds
Is he based or based?
>>
>>106602011
when you want to send anthrax to someone, does the address you write on the envelope get longer the bigger the target house is?

pointers to something only store the address where the thing begins, not its whole memory range
>>
>>106602117
oopsies btfo
>>
>>106602011
Run a
printf("%zu\n", sizeof(<pointer_name>));

On all of your pointers. Assuming you're on 64bit architecture, the pointer (which only holds an address location in memory; nothing else) should always be 8 bytes.
>>
>>106602117
we live in the only world there is and it is neither best nor worst nor comparable because hypotheticals don't mean shit
>inb4 pseud autismos need to be beaten and taught the definition of "universe" through torture
>>
>>106602125
>does the address you write on the envelope get longer the bigger the target house is?
How many times did you forget to demolish a building after you no longer send mail to the recipient?
>>
>>106602173
I always free() my house when I move; otherwise, my mail could end up getting opened by new people and they'll start screaming in garbled symbols and blow up the whole town.
>>
>>106600780
Read what pendantic is for instead of posting retarded questions online.
>>106602011
A pointer knows where to find your mom. A double pointer knows where to find a guy that can find your mom.
The pointer isn't concerned with how overly large your mother is.
>>
>>106602327
>a guy that can find your mom
STACK OVERFLOW
>>
>>106602011
I see where you are confused. Addresses contain 1 byte values. For a double that is 8 bytes wide, a double pointer contains the address where the double value STARTS in memory. e.g. for a double pointer that points to address 0x01 the compiler (knowing this is a double because of the pointer type) will load 0x01 TO 0x08 (a total of 8 addresses read) and treat it as double.
This isn't done like you imagine by reading 1 byte at a time, but by reading into a register that is 8 bytes wide using one instruction e.g. mov fp_reg, [mem]
>>
wht if alcohol/
>>
AT&T syntax users must be culled.
; the chad Intel syntax user
; rax = rbx
mov rax, rbx
; rax += 1
add rax, 1
; rax = value at addr
mov rax, [rbx + rdi*4 + 8]

; the retard AT&T syntax user
; rax = rbx
movq %rbx, %rax
; rax += 1
addq $1, %rax
; rax = value at addr
movq 8(%rbx, %rdi, 4), %rax
>>
>>106596143
The answer is sadly yes.
>>
File: screenshot.jpg (321 KB, 505x619)
321 KB
321 KB JPG
>>106602677
TRVTHNOVA
>>
>>106596143
The performance of webdev backend mostly depends on latency to internal services, drivers, database, cache, etc not on the language it was written in.
>>
>>106602704
nocoder cope
>>
>>106602714
Not an argument
>>
>>106602730
I don't need to argue with nocoders. I wouldn't even spit on them if they were on fire.
>>
>>106602738
And no one has to care what you think if you can't provide arguments for your claims.
>>
>>106602745
Your failing company will notify you of you being laid off eventually.
>>
Damn, I made nocoders cry so hard that this thread might die before bump limit. I'm very sorry that you feel bad, hope you can learn to mitigate your factphobia in the future so that the threads don't have to die over you being wrong.
>>
>>106603181
Are you the guy who said
>nocoder

If so, the other guy was right. The backend bottlenecks aren't language related.
>>
lmao @ containertards seething
>>
>>106603219
Don't (You) the schizos.
>>
>>106601754
Mother of all bloat. This shouldn't be in the standard library.



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