[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: chads.jpg (87 KB, 700x454)
87 KB
87 KB JPG
What are you working on, /g/?

previous >>101101055
>>
Scraping nyaa.si in C++, with my internet, I'm getting consistent <300ms from startup to entire page of greppable results with magnet links in my terminal, need to implement checking for extra pages next because 75 results isn't always enough.
>>
str.split(', ')[1].split('.')[0]

What's happening here, what does passing a character position like [1] and [0] after applying the split method actually do?
>>
>>101130465
still rewriting my weather app. also beta OS has a few new features.
>>
>>101130731
split returns an array of strings
>>
>>101130465
No one cares. People aren't going to use my shitty code, if I manage to finish this project anyway.
>>
>>101130731
split a string in to an array of string, select the second element in the array (a string), split it in to an array of string, then select the first element (a string)
>>
>>101130834
why are you making things you don't need?
>>101130847
which looks like this
>>> str = "a, b.c, d"
>>> str.split(', ')
['a', 'b.c', 'd']
>>> str.split(', ')[1]
'b.c'
>>> str.split(', ')[1].split('.')
['b', 'c']
>>> str.split(', ')[1].split('.')[0]
'b'
>>
>>101130811
>>101130847
>>101130857
Thank you.
>>
>>101130465
>Scraping nyaa.si in C++, with my internet, I'm getting consistent <300ms from startup to entire page of greppable results with magnet links in my terminal
$ time curl 'https://nyaa.si/?f=0&c=1_2&q=kimi' | grep -o 'magnet:.*announce'
real 0m0.378s
user 0m0.193s
sys 0m0.156s

I'm kinda surprised your scraper isn't significantly faster, this was from a raspberry pi 2 btw, nearly all the time must be spent waiting on the network
>>
>>101130923
the difference is my output looks like this
$ time ./nyaa 'kimi' | head | sed s/^magnet.*/redACKted/g
# 2024-06-22 02:25 S: 20 L: 2 D: 616 683.9 MiB [MagicStar] Kimi ga Kemono ni Naru Mae ni EP12 END [WEBDL] [1080p] [U-NEXT] [JPN_SUB]
redACKted
# 2024-06-22 02:25 S: 9 L: 3 D: 219 1.2 GiB [MagicStar] Believe - Kimi ni Kakeru Hashi - EP09 END [WEBDL] [1080p] [JPN_SUB] [Audio Description]
redACKted
# 2024-06-22 02:25 S: 41 L: 4 D: 1438 1.2 GiB [MagicStar] Believe - Kimi ni Kakeru Hashi - EP09 END [WEBDL] [1080p] [JPN_SUB]
redACKted
# 2024-06-20 19:18 S: 6 L: 1 D: 69 706.6 MiB [ToonsHub] Kimi Ni Todoke From Me to You S01E01 1080p HULU WEB-DL AAC2.0 x265 10bit (Eng-Sub)
redACKted
# 2024-06-20 06:32 S: 9 L: 4 D: 701 182.9 MiB 君を忘れる恋がしたい 第01-02巻 [Kimi o Wasureru Koi Ga Shitai vol 01-02]
redACKted

real 0m0.292s
user 0m0.083s
sys 0m0.007s
>>
File: maxresdefault.jpg (85 KB, 1280x720)
85 KB
85 KB JPG
pretty cool
https://www.youtube.com/watch?v=PTCFddZfnXc
>>
>>101131239
that's funny, I just let GCC cope by deleting my copy constructors because copying and moving is bloat that's not necessary in a well structured program.
>>
>>101131239
shouldn't be relying on RVO anyways, you end up getting in to situations where you get objects that can't be moved and only be RVO'ed it's nonsense
>>
>>101131449
Returning an object from function is neither copying nor moving, semantically speaking.
>>
>>101131474
Yeah it's one of those things that's nice to get for free but unless we're talking micro optimizations it's a waste of time to care about, i don't need more warnings I get enough as it is all it does is remind me that i have more work to do
>>
>>101130465
>Weev and Sven
kek
>>
>>101131500
I have 0 warnings in my projects so not my problem, I am not a wagecuck so I'm currently on -std=gnu++20 and I am basically guaranteed a RVO anyway so yeah, this isn't that useful, but it's nice, for same reason that -Winline is useful. There's even a warning for autovectorizations but forgot its name.
>>
>>101131535
If you have 0 warnings then you aren't pushing the language, the code you write today will have warnings in the future that didn't exist at the time it was written, gotta go fast if it works it works
>>
>>101131689
my code has no warnings because I'm not a retard and maintain my code.
>>
>>101131732
what's wrong with a signed and unsigned comparison in an assert statement? maybe I don't want to make both operands unsigned, the cast is implicit smd, fuck you
>>
>>101131758
>no code posted to reproduce it
I accept your hallucinations.
>>
>>101131732
your TODO app doesnt count
>>
File: yesofficer..png (23 KB, 541x563)
23 KB
23 KB PNG
>>101131773
problem?
>>
>>101131808
NOOOOOOO THE FLOAT IS TOO BIG YOU CANT FIT IN THAT LITTLE CHARR AAAACKKKK
>>
In your opinion, what's the maximum amount of characters for a function name?

As long as it needs to be to understand what it does at a glance? Or take shortcuts to get it below a certain number?
>>
>The syntactic similarity between if (x == y) and if (x = y) belies their drastically different semantics. Thus this proposal uses := to clarify the distinction.
It's the same edit distance to me, but those big words...
>>
how would one go about backporting chromium to a 2.6.x kernel distro
>>
>>101132100
5
>>
>>101132166
>I need a name for a function to read a post from Anonymous in /g/'s /dpt/ thread
>rpagd
based
>>
>>101132207
that's literally just 'read', holy shit way to overthink it, put it in a namespace and call it a day, then there is read2, read3, the possibilities are endless
>>
>>101132229
it's just an example
functions called in the style fun[0-9]+ are absolute cancer
>>
>>101132229
rdPst
>>
>>101132261
>functions called in the style fun[0-9]+ are absolute cancer
you can leave a little comment too don't worry
>>
>>101132298
REEEEEEEEEEEEEEEEEEEEe
>>
>>101132100
Depends on the program, who the interface is being designed for, and the overarching design philosophy (or the so-called "language paradigm" if you insist).
A systems level routine in a game (not an API or something), for example, can be something
ridiculously literal.
Also historically speaking it would depend on the limitations of the underlying host system and compiler, but that rarely comes up these days.
>>
>>101132279
auto post = post_reader::read<post_reader::post>(101132279);
>>
>>101130465
wow the nigga on the left have built in dual monitor
>>
>>101130731
Dear lord, RTFM noob

str.split() returns a list of strings that represent str broken up around the argument passed to it.

In the example, first you're splitting str up based on the ', ' literal, and grabbing the second element of the list.

So, if str was "you, you are a faggot. Jfc" then str.split(', ') would be ["you", "you are a faggot. Jfc"] and str.split(', ')[1] would be "you are a faggot. Jfc".

Then we split this new str on the literal '.', yielding for our example, the list ["you are a faggot", "Jfc"]. Finally, we pick the first element in this list "you are a faggot", yielding the result that "you are a faggot".

This sort of thing is useful for parsing file paths.

Also, wtf do you mean character position? That's just an index.
>>
>>101132100
how big is the file? starting from a minimum of 6 every 100 lines you add 1 character and stop at 15
>>
File: 1709511302014652.jpg (54 KB, 434x469)
54 KB
54 KB JPG
>>101130731
>getting called a noob in 2024
>>
>>101132506
it can happen to you too, anon, but in your case you're more likely to get called an homo and a troon
>>
>>101130465
should i use a uft8 library for string handling or go full on "lol lmao" and use ascii null-terminated strings for parsing a file, in C of course.
>>
>>101132539
there's a 59% chance you're wrong
>>
>>101132608
where do those numbers come from?
>>
>>101132569
name a piece of software that has emogay support that isn't a bloated piece of shit and you might convince me
>>
File: file.png (53 KB, 1059x748)
53 KB
53 KB PNG
>>101130731
you literally have a REPL bro
>>
>>101132376
var post = PostFactory.Instance.CreatePost(new PostReader().Fetch(101132279, HttpMethod.Get, URLDatabase.GetURL(URLS.Base)));
>>
>>101132938
>PostFactory.Instance
SHIGDDTIY
>>
File: 1000.png (560 KB, 1534x2803)
560 KB
560 KB PNG
Trained my NN and looked at the neurons
>>
" There is also the little matter of caching. The CPU normally caches data from memory, but that is a bad idea when I/O is involved for a number of reasons. Attempts to read a full cache line from I/O memory can have no end of unexpected side effects, and delaying writes to I/O memory can change the way the device operates. I/O memory should normally function as a direct control channel to the device; to that end, ioremap() disables caching on device memory — on the x86 architecture, at least.

In truth, the caching status of a memory range obtained from ioremap() is not fully defined. As a general rule, uncached is the default, but there is still an ioremap_nocache() that can be called by code that wants to be absolutely sure that there will be no cache between it and its device memory. "

they cant into PAT, this is the last post i am going to make about linux, it is irredeemably bad.
>>
>>101133397
feed it tiktok videas and post results
>>
>>101133435
dont you want to write your own kernel drivers anyways? I always wondered why users got away from the idea Linux should be easy and you don't need to know C or what's in the code you're compiling. It's really a shame how far we have fallen.
>>
>>101133379
Use Singleton Pattern Sir very good for you to access class instance from global
>>
Below is my crappy function for a dictionary that has keys and key values. It returns a list of the key values that match with the key.

is there a better way to do the part where I put the nested if statements? I feel like its not tidy but it still works

def parse_metadata(metadata: dict, key: str):
try:
return metadata[key]
except KeyError:
return None

def parse_tags(metadata: dict, prefixes, split: bool=True, exclude_prefix: bool=False) -> list[str]:
# Returns a list with the tags that start with the specified prefixes
tags = parse_metadata(metadata=metadata, key="tags")
if not tags:
return []

if not exclude_prefix:
if split:
return [tag.split(':')[1] for tag in tags if tag.startswith(prefixes)]
else:
return [tag for tag in tags if tag.startswith(prefixes)]
else:
if split:
return [tag.split(':')[1] for tag in tags if not tag.startswith(prefixes)]
else:
return [tag for tag in tags if not tag.startswith(prefixes)]
>>
>>101134035
>non static factory method
please feel free to reapply in 6 months
>>
>>101134086
it's bad i can tell from just looking at it, use a set or something
>>
>>101134099
fuck you bloody bitch bastard fucking i fuck you bloody
>>
>>101134086
Instead of a separate function and error catching, you can just do
tags = metadata.get(key, [])


You could reorganize the nested ifs into a flat else-if structure. Or use a helper function to do some checking inside the comprehensions and reduce the number of if statements, but really, you have four possibilities and need to account for each. So I don't think it matters much.
>>
File: architect.jpg (329 KB, 721x979)
329 KB
329 KB JPG
>>101132100
no limit
https://www.youtube.com/watch?v=443UNeGrFoM&t=1223s
>>
>>101134211
20m23s
>>
>>101134211
>// spacing matter!!
>>
>>101134211
x = /* uh */ 3 / /* um */ x + /* so */ 2
>>
>>101133599
low quality bait, kys.
>>
>>101134403
10 / 10 reply deserves many (You)s thanks for sharing
>>
>>101132100
if my cpu can hash it, your code should be capable of compiling it
>>
>>101131788
if I ever add any TODO's to my code, they are removed before I commit, and replaced by the thing that was to be done
>>
>>101134581
So you have nothing left to do?
>>
Is there any real issue with LGPL 3 vs 2.1? I don't get why people seem to hate it. As far as I can tell it's the same purpose with some extra protections.
Or are they just being cucked fags about it?
>>
>>101134611
for that commit? yes.
>>
>>101134641
I'm more of an uncommit kind of fellah if you know what I mean, no homo of course
>>
>>101134639
always use latest amd strongest GPL, if it's offline tool, sure, use GPLv3+, but if it has anything to do with servers, AGPLv3+ or you're a cuck, ignore everyone who says otherwise, making exceptions to your copyright ownership is like making exceptions to who gets to fuck your wife.
>>
>>101134641
you're fired
>>
>>101134677
you never hired me, I just came to your office for free coffee
>>
>>101134211
It's good to be descriptive, but if your code is overflowing from 100+ columns it just becomes annoying. It's hogging screenspace that I want to use for other things at that point. If you can have long names and just start doing multiline stuff to fit it under a sane limit, okay, but I feel like it's pushing it a bit

>>101132100
I try to limit my names to ~15 characters, I think it's a good balance between descriptiveness and not being able to fit the code in my desired window size
>>
>>101134445
niggerfaggot i hope the next dildo pierces your intestines and kills you, i wish i could see your father's face then, though the only way might be through a portrait.
>>
>>101134667
Agreed, I'm just wondering why everyone freaks over GPL/LGPL v3 over v2.1.
Isn't the only real difference the clauses requiring no jewish shit of making the source useless by preventing builds without firmware/proprietary stuff?
>>
>>101134768
gpl3 is based.
>>
>>101134768
Main difference is tivoization which is a long topic that makes even Linus Torvalds seethe, just ignore the cucks. Reminder that AGPLv3+ is not the strongest license, it's possible to power it up with things like /pol/ shitposting. Here's an example: AGPLv3+NIGGER+TRANNY+YWNBAW+HOLOCAUST+NEVER+HAPPENED
>>
You're all advanced compared to me who's still learning so I need to ask, is it better to learn programming & web dev via replit on my phone or should I wait until I always get home on my computer? I'm so happy that this works but it's hard to do so on my phone and it's quite advanced and working on the computer in the heat is difficult
>>
File: 1644499051163.png (756 KB, 762x712)
756 KB
756 KB PNG
>>101134843
>I'm learning web dev on my phone
Jesus H Christ is this what /dpt/ has become
>>
marching cubes sphere with scalar interpolation
>>
>>101134843
field is oversaturated, kys
>learning from phone
kys
>>
>>101134861
I have to work on campus and the computer lab is shut down, what do I do
>>
>>101134937
go to a library? I did all work in a library because there's no way I am installing microsoft office on Linux.
>>
>>101134937
>what do I do
ignore the trolls, keep learning, but look at what you need to learn based on job requirements for entry level, just keep in mind that the requirements will change every year
>>
>>101134963
>>101134937
also, keep in mind that if you manage to get a job, you'll be using a computer and not your phone
>>
>>101134861
i started out that way too idk, styling html pages and shit
>>
>>101134843
wait until you are home, the big screen has the ability to trigger autism
>>
>>101134937
are you brown? what kind of student doesn't have a laptop or a desktop?
>>
>>101134963
what a faggot ass post
>>
>>101130923
after some thought, I think I will do this in C++, just optimize the case of pulling magnets, there's little usecase to pretty printing
>>
File: blonde_high.gif (758 KB, 609x450)
758 KB
758 KB GIF
>tfw using recursion in the real world
feels fucking nice
>>
>>101136150
use a functional programming language like Haskell if you like recursion.
>>
Guys at my hangout spot are arguing about programming languages a lot and I'm feeling left out, can you give me some talking points to use?
They were shitting on Go and its static linking and seem to like Rust so if you have anything to hit back that would be great, thanks.
>>
>>101136604
tell them that go is used by real professionals while rust is an OSS meme with proprietary crates, also tell them they will never be women
>>
>>101136604
just walk up tp them and say "guys, I...", they will interrupt you, but you should counter interrupt with "ywnbaw"
>>
>>101136604
Tell them that scripting langauges peaked at perl.
use strict;
use warnings FATAL => "all";
use v5.10;

my $video_file = qr{
\. (?: mp4 | mpe?g | mkv | webm? | avi | flv | wmv | m4v ) \z
}x;

my @files = map { chomp; s|\A\./||r } qx{ find -type f };

FILE:
for my $file (@files) {

if (!($file =~ $video_file)) {
next;
}

my @lines = split /\n/, get_output($file);
if (!@lines) {
next;
}

for my $line (@lines) {
if ($line =~ /(\d+(?:\.\d+)?)\s+fps\b/) {
printf "%-6s %s\n", $1, $file;
next FILE;
}
}

printf "%-6s %s\n", "undef", $file;
}

sub get_output {
my $file = shift;

pipe my($read, $write);

my $pid = fork;

if (!$pid) {
close $read;
close STDOUT;
close STDERR;
open STDOUT, ">&", $write;
open STDERR, ">&", $write;
exec "ffprobe", $file;
}
else {
close $write;
local $/;
my $output = <$read>;
waitpid $pid, 0;
if ($?) {
say STDERR "ERROR: ffprobe failed: $?";
return;
}

return $output;
}
}
>>
>>101136960
unreadable garbage, thank industry for deprecating it
>>
>>101136604
I've taken to arguing in favour of rust, while still programming in C. you get the best of both worlds, it's really nice.
>>
File: 1sxwqh.jpg (129 KB, 1600x900)
129 KB
129 KB JPG
>>101136966
>unreadable garbage
>>
>>101136972
same, but I argue for both c and rust depending where I am, while I stick to C++ without the retards.
>>
anybody into x64dbg? i got a an app that takes in a file and check the key if its valid. but i struggle so much finding exactly when the key is processed. i tried breakpointing on winapi events, but it doesnt seem to trigger on WM_DROPFILES or WM_COPYDATA.
somehow i'd need to know when exactly the assembly is doing something with the key, but i dont know how to have a breakpoint when the key is used for comparison or so.
i dont even know how cracking groups figure this stuff out, it seems impossible to me. do they have better tools or do they spend weeks stepping through every single instruction until they find it?
which is something i also find very annoying because of (kinda frequent) crashes destroying all your progress.
>>
>>101137178
do some stupid inline asm shit with a label and then find the label in the binary, gcc names them like .Lxxx so if call it niggerraper32f you are going to find it 100%
>>
>>101136150
Now rewrite it imperatively so it performs and scales better
>>
>>101134581
I use FIXMEs for that, but I'm not as anal as you about making each commit perfect. (It fails the CI build if they're in, and TODOs get surfaced in the UI.)
>>
>>101137571
if your commits aren't perfect, your project is worthless
>>
>Put TODO/FIXME/IMPROVEMENT
>Never do it
>Everything continues to work
>One day come across one when I'm not focused on a task
>Can't understand what I was exactly supposed to do/fix
>>
>>101137555
this scales better, that was the point of writing it, it is one iteration of recursion in 1/3 cases, plus it is startup overhead so i dont really care
>>
>>101137822
>IMPROVEMENT
>doesnt light up in nano
larping
>>
>>101138071
I suspect that's not the case
>>
>>101138082
Why would I use nano?
>>
>>101138156
I suspect you are retarded
>>
File: 1622685241083.png (268 KB, 462x476)
268 KB
268 KB PNG
I'm currently trying to implement a radix tree similar to the one used in the linux kernel.
Man, it's hard to wrap my head around this and write sane, elegant code for it.
>>
>>101139930
never implemented it but have you an idea of what the types look like yet?
>>
File: mc_green_flythrough.webm (3.24 MB, 1280x720)
3.24 MB
3.24 MB WEBM
marching cubes for my Vulkan game engine written in C.
>>
How can I diversify if I already know the basics of python and c/c++? There's basically two options which are
>"Programming Language" in 100 seconds
>Buzzword buzzword buzzword, which wil allow you to quickly buzzword buzzword with speed and efficiency
>And this has been "Programming Language" in 100 seconds
or
>"Programming Language", the complete course
>10 hours long
>"So I would like to begin this talk with a brief history of some shit you don't care about"
What do I fucking do? My problem is that I can never find a clear, concise explanation about what these languages are actually used for that's comprehensable to me. I want to learn either GO or GLEAM because from what I can observe they aren't hobbyist just for fun languages and both serve functions c++/python don't. Am I wrong?
>>
>>101140505
Linux has some neat stuff in it. I've been writing a small support library for my own programs with stuff inspired by it, including things like container_of, their linked lists, their hash tables (surprisingly simple), and now I'm getting to one of their really meaty data structures, "XArray", which is really a radix tree.
I tried brute force reading their implementation, but it's so entangled with how the kernel does its memory management and other advanced features, that it become really hard to understand. I'm now just copying their basic interface and trying to implement it on my own, but it's still not a simple data structure.

It's not "string" based like the literature, instead just storing integer indices (i.e. bit strings). The index is split up into chunks (I'm using 6-bits), so each node contains 64 children, and the compression comes from not needing to store chunks with all 0 bits.
It seems like it would be quite efficient if all of the keys are relatively close together, especially if they're low, which would be a fairly common use case.
>>
>>101140588
No idea about Gleam. Go, you can get started with in an hour or so using the Go Tour (interactive web tutorial). Lots of writing about it on the web, especially some interesting history from Rob Pike’s blog, but the meat of it is that the language was designed to make it very easy and cost-effective to stand up and iterate on RPC servers (hence GC, the very easy to use concurrency primitives, the fast build times, and the general avoidance of any features that risk threatening those principles). C++ at Google was beginning to fail at that task, e.g. Rob’s story about a 45 minute build during which he and the other designers hashed out the beginnings of Go. It’s also good for general-purpose binaries, but is inappropriate if you have lots of dependencies that are well-served in existing languages or are doing something weird like embedded systems.

It’s a very fun and powerful language, much more focused than C++ but also very conservative in its design - it only got its version of generics recently.
>>
>>101140588
'serve functions'.
You'll need to define this.

You can do anything with most languages.

What do you want to do? Get a job?
Look at the languages in your area.

If you are just learning a language because you want to pick up a new one, then you'll be better off researching languages for yourself and coming to the conclusion of what you'd like to learn next.

Gleam sounds like a good choice because it is a functional programming language so you may learn a new paradigm.

Go sounds like a good choice if you'd like to go get a job in Go. It's pretty popular.

Gleam and Go are both used for backend web development mostly.
>>
>>101140588
python is used by lazy mathfags to shit out terrible quality research code and retards who can't use anything else because it is genuinely shit all the way down and the former category don't care because that's not their job and the latter don't care because they're stupid, it perpetuates because it has packages and the idiots can just use pip and import solution and have never tried to do anything real in python
it forces the real hell mostly onto the developers of those libraries

C++ is used in high performance native applications, games, multimedia shit, the backends of all the shit the lazy mathfags use, graphics programming since it can be compiled for accelerators like GPUs, audio engineering, high frequency trading etc. as well as legacy enterprise applications where it's used absolutely horribly
basically if it's not web related and it doesn't perform like ass there's a decent chance it's probably C++, also actually learn C++, you almost certainly don't know the basics, you think you do but you don't

Go is a language that's retarded on purpose, and was designed for retards by very clever people, and I hate it and love it for that
it's designed for large scale enterprise maintainability first, meaning you aren't allowed to get clever with it, and a person who has been writing go for 1 year and a person who has been writing go for 10 years will largely produce the same code
used for webshit backends but probably a good idea to be familiar with in general
not something that takes too much effort to learn

gleam's apparently one of the erlang derivatives so that'll be finance
not something i'm familiar with
>>
>>101141120
also, when someone wants to make a tool or utility for workflow automation and they're stupid, they'll use python
when they're smart they use go
working with tools written in go is so fucking pleasant, and unfortunately you don't see it too often
tools written in python which you unfortunately see all the time on the other hand are terrible due to issues like python's extreme version fragmentation (including with dependencies) and performance issues
>>
>>101130465
starting to read Category Theory for Programmers

im like highkey retarded and i havent learned anything in the past 5 years so im trying to learn math and cs and shit before my sophomore year of college starts. i want to get into the habit of being able to learn things on my own and unretard myself
>>
>>101141178
because python script takes 5 minutes to write instead of 5 months, and things like docker take more like forever, they're still adding more bloat to it
>>
>>101141596
>because python script takes 5 minutes to write instead of 5 months
yea, and go takes 10 minutes instead of 5 and it's significantly faster and more maintainable
>>
>>101130465
Damn sam hyde has really been around forever
>>
Looking for a Python beginner project but pretty much everything I'm seeing on the Internet is either a game/scraper/automation. Are there any projects that will look cool to the average joe like with Web Development?
>>
>>101141613
Go took 10 minutes for me to realize that it's a shitlang, still using Python, when performance becomes a problem, I just rewrite it in C++.
The only go program I used to use was fzf, but then I found out about fzy which is written in C, as a gentoo user, I'm glad that go compiler is not part of my dependency tree anymore.
>>
I literally cannot stop using DuckDB. It's so useful for storing and retrieving data. I'm never using json again.
>>
Figuring out how to integrate stripe for my first SaaS platform.
>>
>>101141728
what makes it better than sqlite?
>>
>>101141789 (me)
nevermind, found this https://hannes.muehleisen.org/publications/SIGMOD2019-demo-duckdb.pdf
>>
>>101141789
what's so great about sqlite? I keep hearing about how it's good
>>
>>101142342
It's fast, compact, and I use it when I need anything more complex than a plaintext file that looks something like this:
$ cat config.ini
a=c
42=d
lp=a
$ cat test.py
with open('config.ini') as f:
config = {}
for line in f:
key, value = line.rstrip().split('=')
config[key] = value
print(config)
$ python test.py
{'a': 'c', '42': 'd', 'lp': 'a'}
>>
>>101142398
https://docs.python.org/3/library/configparser.html
>>
Is it possible to learn C++ in 3 months? If not, what would be a more realistic goal? Also, which is harder between Rust and C++ and takes longer to learn?
>>
>>101142414
I just wrote the example in Python, Python itself is not relevant, most of my code is in C++ and I'm not going to use worthless premade parsers for my custom configuration files.
>>
>>101142398
I'm watching a video about it
https://www.youtube.com/watch?v=poA497gSs-4
>8m52s
>Milestones
>Mozilla Foundation help set the (((guidelines)))
thanks Mozilla, we couldn't have done it without you
>>
>>101142517
you couldn't even be bothered to link to exact timestamp in the url that made you butthurt, do you have anything else to say beyond reminding us that you cannot find >>>/pol/?
>>
>>101140531
Cool shit, good job

>>101142517
>Mozilla now is Mozilla 15 years ago
Underaged

>>101142533
go suck jews off elsewhere, faggot >>>/lgbt/
>>
>>101142435
You can learn any programming language in minutes as long as you know its paradigms from another language you already know (that is, it's easy to learn C++ if you know Java, but harder if you only know Haskell). The problem is mastering all it's stupid shit that C++ or any other language has. If anything, spend a few minutes reading the basics of a language (I believe there is a site called learn x in y minutes for programming languages) and then go build stuff while finding out better/faster way of doing something in that language.
It will take time no matter what language you are going to learn.
>>
>>101142435
you'll probably wind up with a semi-workable knowledge of it but actually getting properly good at C++ takes years, the vast majority of C++ programmers don't know most of C++
rust has a similar fetish for complexity, but i've heard has better learning resources
given its priority is correctness over development iteration speed i'm guessing you need to learn more to actually make proper use of it
in C++ most intro books they typically don't even cover the kind of concepts rust makes you deal with inherently from the start, a lot of aspects of learning to properly write C++ and rust are going to conceptually the same, getting used to the concept of memory allocation and lifetimes and an execution environment that's exposed to the hardware more
>>
>>101142533
found the Mozilla employee, Google bucks well spent I see
timestamps works half the time
>>
>>101142880
>thinks C++ is complex
lol, lmao
>>101142905
>found an employee on unemployed NEET forum
>>
File: cpp_is_easy.png (196 KB, 628x868)
196 KB
196 KB PNG
>>101142912
>thinks C++ is not complex
lmao
>>
>>101143109
is pic related supposed to convince me otherwise?
>>
>>101136960
>let's write bash, but worse
no thanks
>>
>>101143197
it's better than bash, perl is like Python, if Python had shitty syntax
>>
>>101143217
>>101143197
If you're an 8 year old girl, Perl might end up being a better fit too.
>>
>>101142912
to your average person? yes
your average C++ programmer writes C with classes dogshit like the Qt fags and barely even touches anything added to the language
if they use multithreading it's through futures and promises and not manual thread management and using atomics
if they need to generate code they write a python script using something like jinja instead of template metaprogramming

and even if you don't have to engage with the complexity of the language most of the time though you are forced to deal with the complexity of the implementations
like the parts of MSVC's STL (big one being <regex>) that have bugs baked into them since fixing them would break ABI compatibility with binaries that were originally compiled for XP and this is a bad thing for some reason or how MSVC has 4 or so different representations of member function/data pointers and you don't know which you'll end up with ahead of time
not sure of any persistent problems like that with the GNU STL, but i do keep finding small typos in headers pertaining to the current in-development standard which really seem like they should be handled by automatic testing tools or something
>>
>>101143236
>average
not relevant, programming is intellectual endeavour and average human is retarded
>>
File: brainlet.jpg (44 KB, 800x450)
44 KB
44 KB JPG
>>101143120
>t.
>>
>>101143291
cool selfie, now go on about how basic lifetimes filtered you
>>
>>101143308
you would shit your pants if I crawled you trough that minefield in an interview
>>
>>101143404
if interviewer asked me about irrelevant things like that I'd just walk out, but more importantly, I am not interested in having a job, sorry
>>
File: Fox_and_Grapes.jpg (61 KB, 400x624)
61 KB
61 KB JPG
>>101143425
nice cope
>>
>>101143432
yes it's really nice to see you cope about being filtered by lifetimes...
>>
genz killed this site
>>
>>101143508
your low IQ posting killed this site
>>
>>101140531
rad
>>
>>101130465
Might be low iq posting but i cant figure out how you can lay the pages out in memory unless the mmu goes and checks present bits for everything
So like, you go from level 4 to page directory 'pointers' and if you want to find the array corresponding to the 3rd entry to L4 you want to finish teh entire L4 table, then go through 4 present bits? i dont see another way
>>
3* present bits
>>
>>101144095
yes it literally does this, but instead it uses a tree instead of whatever you imagined
>>
>>101142868
c++ trait classes inspired Haskell associated types.
Semantics take the most time to learn. For example,
squares = []
for x in range(5):
squares.append(lambda: x**2)
squares[2]()
16
squares[4]()
16
squares2 = []
for x in range(5):
squares2.append(lambda n=x: n**2)

I thought x was a value not a reference.
But if x is a reference then how do I
remember that n=x copies the value
and not just the reference? An easy
rule might not exist.
>>
>>101144158
in C++ this is just
for (auto& x : range(5))
, love the fact that C++ is simpler and more readable than Python.
>>
>>101144157
>yes it literally does this
>but instead it uses a tree
? you know... i have the iq to understand that the max address bit field gets lower as you drop levels into the pagetree. Are you projecting your retardation or something?

Look, i will illustrate the problem:
you cant use the max address field to as a pointer to the next layer of the tree because of two reasons:
1) this doesnt allow for true virtualization
2) it implies fixed size tables (lol)
>>
also does no one care that corpos are lying and the max address space we can do is 38+12 bits and NOT 57 because the mmu wont check past bit 50? (rtfm)
>>
>>101144216
yup, you really are retarded
>>
I'm learning neovim. Do any of you here use it?
>>
>>101144258
Yes, unfortunately. Why not plain old vim? I use it because of the sunk cost but I would go with Vim if I were starting now.
>>
>>101144258
>RIP left pinky
>>
>>101144268
there's literally 0 meaningful differences, dropped neovim few years ago and had 0 issues
>>
>>101144308
I would have to port my config file which would be a pain. Maybe next time neovim updates and breaks something that ends up wasting my morning I'll just give in. I'd like to retvrn to plain vi but I like using language servers and would have to develop a new workflow to replace them.
>>
>>101144338
your own fault for being a ricetroon
>>
File: Untitled.png (50 KB, 797x546)
50 KB
50 KB PNG
>>101130506
all of nyaa.si? Are you using the RSS? If, not, it makes life easier. I wrote my own c++ program that would download weekly episodes for me, the only thing it doesn't do is rename & move to my media server.
picrel is a config editor I made for the rss program.. doesn't play well with my local theme so some icons appear blank. THey appear fine when I use a default theme
>>
>>101144420
no, it's supposed to be commandline tool that you use actively, I have no usecase for automating this, I simply have calendar app remind me when final episode of season airs and then I manually add torrents to download when I want to watch entire season
>>
I just violated RAII
>>
>>101144256
>you are retarded mimimi
then why dont you enlighten me, sir?
>>
finally decided to run perf on my C++ program, my code unironically does not show up in the flamegraph, malloc and strcmp are tiny %, but the rest is gone, feels good to be good at programming, too bad 4chan doesn't seem to like svg for some reason so I can't post it here.
>>
>>101144581 (me)
nvm, I'm retarded https://files.catbox.moe/rzn45r.svg
>>
What's wrong with readdir(3)? (don't answer that)

Python is just kicking the can down the road, people only use it because shell trivialized it's own problem space, perl and now python make that space slightly larger. Now we write larger scripts that are just as brittle outside their problem space, but the inside isn't as friction-less. Of course few practitioners realize this as they spend most of their free time reading manuals

What would be ideal is a single language and a service that connects paying users to programmers with checks and balances to make sure the users aren't being scammed.
>>
>>101144686
you do realize that you can literally go pay money to companies who offer these services, right?
>>
>>101144725
How much money does a new os and systems language cost?
>>
>>101144779
(cont) How much money to get rid of drivers?
>>
>>101144779
>systems language
C goes fast enough honestly

btw do you have experience with the way gcc moves around inline functions? like will it respect them as a context switch or do whatever it wants like with macros. I havent tried yet
>>
>>101144779
you can pay a company to write custom proprietary modules for Linux, moron, if you have money, they will do it.
>>
>>101144811
I just reconfigured my kernel on gentoo to cut compile time from 5 hours to 1 hour, mostly drivers I don't need got axed, it cost me nothing.
>>
>>101144889
>pay a company
>aka pay 200 workers for the effort of one
retardation
>>
>>101144909
ok, start your own company and create contract with a freelancer to do the job for you
>>
>>101144832
>moves around functions
It literally doesn't matter (past ub, as the processor does the same thing, so if gcc does anything it's just cargo culting)
But that would also imply that they care, I still remember the first time I (failed to) stepped through printf. They can't even notice when printf is equivalent to write.
101144889
no yu for u
>>101144906
... lmao I had to check if this was dpt or fglt. What about the drivers that programs that you use need? They should just get fucked? Why? You literally use those programs. You should be clamoring for user level programmable hardware.
>>
I don't understand python function decorators
>>
>>101144952
>They can't even notice when printf is equivalent to write.
You are correct that for simple cases where printf is used without format specifiers, GCC could theoretically optimize by directly using write. This is a special case optimization, and indeed, some compilers or compiler configurations might perform such optimizations. However, several reasons might explain why GCC does not always implement this optimization:

Optimization Complexity:

Implementing this optimization requires the compiler to perform additional analysis to ensure that the format string contains no format specifiers and that all arguments are literals or constants. While this is feasible, it adds complexity to the compiler's optimization logic.
Consistency and Maintainability:

The GCC maintainers prioritize consistency and maintainability of the compiler codebase. Adding special-case optimizations can complicate the code, making it harder to maintain and extend. Ensuring that such optimizations do not introduce bugs or unexpected behavior also adds to the testing burden.
Existing Optimizations:

Some optimizations might already be handled at a different level. For instance, the C standard library's implementation of printf could include fast paths for simple cases, reducing the need for the compiler to perform such optimizations.
Trade-offs in Compilation Time vs. Execution Time:

Compilers often need to balance the time spent optimizing code with the resulting runtime performance improvements. For simple cases, the performance gain from replacing printf with write might not be significant enough to justify the additional compilation time and complexity.
>>
>>101144952
>... lmao I had to check if this was dpt or fglt. What about the drivers that programs that you use need?
which drivers would that be?
>>
>>101144686
All modern languages are scripting languages at the end of the day. You have to use syscalls to do anything. How do you design an os to get past this? motherboard level os? 10phz cpu that can just simulate any hardware?
>>
>>101144952
>You should be clamoring for user level programmable hardware.
this, linux is a friend of the corporation, not little guy, it doesnt even allow you to get the apci root pointer to know the offset of the IOspace in memory to read from pci-pci_bridge device's DMA ranges (companies can hide functionality in memory instead of their devices' registers), it is evil.
>>
>>101145101
Do you use xorg? Check out the log file sometimes.
>>
>>101145018
gpt loves the state so much that it will tell you that professionals being incompetent is fine.
After you point that out it will tell you that gnu does the job for free and you are shameless.
After you point out that the entire world relies on gnu's compilers and the fsf gets corpos founding it will say complete nonsense
>>
>>101145143
>do the work for me!
no, what drivers does it use?
>>
>>101144990
it's a composite function
def f(*args):
// complex stuff

def g(*args):
print("foo")
res = function(*args)
print("bar")
return res

// decorated function
f(g("foo", "bar")


If you put g inside a function that receives a function "f" as a parameter you will get the default implementation of a decorator.
>>
>>101145143
oh so you mean that gpu driver which was detected by lsmod and left enabled by make localmodconfig...? Retard.
>>
>>101145223
I'm glad you agree that xorg would like to use a gpu. So why not just let it do that?
>>
>>101145243
why not read and use your brain, retarded faggot?
>>
>>101145219
So it's just like f(g(x)) in math?
The @ syntax is weird I guess
>>
>>101145243
>make evil hardware
>you call it
>it takes over your program and starts uploading user files
I think I'll stick with the linux guys. BAWWW to nvidia if you want them to open up their stack, they own it; you don't deserve fast graphics.
>>
>their adhd eyes need faster graphics to browse 4chan
kek
>>
>OOP
Which languages got it right?
>>
>>101145471
C
>>
>>101145499
if you're doing OOP in C, your code would've been better in C++, tranny.
>>
>>101145514
I'm not, so branch yourself to /dev/null
>>
>>101145520
I don't have /dev/null on my system.
>>
>>101145557
std::ostream cnull(0); sar
>>
>>101145641
>std::ostream
sorry I don't use bloat
>>
>>101145127
retard
>>
>>101146682
I'm sorry that my post offended you.
>>
>>101145127
scripting means that you are putting together multiple programs with some logic
Syscalls are just hardware interaction so they dont count unless you are ragebaiting
>motherboard OS
by your logic firmware calls are scripting, either go all the way or shut up
>>
>>101146829
>Syscalls aren't programs
You some kind of js dev?
>go all the way
To what? A cpu circuit level os can't interoperate with a gpu
You clearly haven't thought before posting.
>>
File: humiliation ritual.png (191 KB, 1228x1150)
191 KB
191 KB PNG
>A cpu circuit level os can't interoperate with a gpu
tihis retard unironically believes this, but I am not surprised by this on /dpt/
>>
>>101146984
honestly it is incredible KKEKEKKEKE
>>
>>101146984
not naively you zoomer, shitposting frognigger.
>>
>>101147109
natively*
>>
>>101146984
i honestly miss the old /dpt/ where we had that touhou avatarposter who making his own OS, the one weirdo making a pedo GTA game in c and sdl, all the haskell autists, the one guy making a brand new network stack from scratch, all of them. now all we have is "i want job how do i into nodejs" posters and retards like the one above who clearly know nothing and only care about posturing like they do. it's ogre
>>
>>101147109
so you wanted all of your software to be read only? my third eye had figured but damn you really are retarded
>>
>>101147398
What is this strawman, how do you even come up with something so retarded. Stop typing forever.
>>
File: 1716677699900170.jpg (30 KB, 700x700)
30 KB
30 KB JPG
I'm working on my PhD on speech synthesis for a low resource language. Today an AI lab with 10x the funding of my department published their multi speaker multi language model that contains my language... I can basically throw my shit in the bin and start over from scratch
>>
Learn haskell.
>>
>>101147477
rip, i hope you find an ever better project idea.
i'm working on my master's degree but i will NEVER pursue a phd. it seems that your success as a phd student is at the whim of your advisor and other faculty and how much they like you, and less to do with the quality of your research.
>>
>>101147519
why?
>>
>>101147648
fuck nobody has ever asked that what do i do
>>
>>101147697
Quick, spout some buzzwords! Lambda calculus! Hindley-Milner!
>>
>>101130465

Going through Tim Coreys C# Masterclass as an absolute beginner. On methods now and its good but the guy can be extremely boring and drag on shit. A lot of it is better on 1.5x speed.
>>
File: 1695678198151765.png (58 KB, 1200x800)
58 KB
58 KB PNG
>>101130465
Getting filtered by the crab.
Trying to understand the error handling and syntax, but struggling.
>>
I am a complete and total brainlet. Could someone please explain how to use this code in my own C++ program? I don't know anything about cmake.
https://github.com/icculus/physfs/tree/main
>>
>>101148039
virus do not click
>>
>>101145136
Who is on our side, then?
>>
>this is the optimal API for finding strings
char*
find(char* const beg, char* const end, std::string_view const needle) noexcept;

I hate programming so much it's unreal.
>>
>>101147751
seq breaks parametricity but it's still useful for
understanding the kind of contracts you can
express with type variables.
>>
>>101145136
is this a technical limitation or a political one? could someone theoretically modify their kernel and add a new syscall or something to expose this data to user mode?
>>
>>101148159
nope, no dunning kruger can modify a kernel which has full source code out in the open in public and is used by many to build their own kernel at home, it's just not possible for sub 80 IQ.
>>
>>101147751
if you dont know what a monad is you are not a real programmer
>>
>>101148103
me, evrybody else is lazy so only me.
One day the completely free and open source OS will come, it will on everything from x86 to raspberry pis but never arm, because arm is evil. It will also have erotic games out of the box.
>>
>>101148173
i am going to make a patch but not right now because i needed the module to be done quickly so i can show something aside from arduino driving and failed projects to an employer.
For now it is only config space in response to irq monitoring (using proprietary pozzed shit, "contact intel for information on the IO apic" kek)
>>
>>101148302
Everybody knows that
>>
>>101148039
i hate explaining how linkage and dependency resolution works, so this is only a shorthand
you need to build the library binaries, install them and the header files, tell the compiler where the header files are (include directory) so it can find them, include the header files which tell the compiler the information it needs to reference the symbols in the binaries, then you need to tell the linker where the binaries are (library directory), and what binaries you're using (linked libraries) so it knows how to resolve those references
those three things in parenthesis are what you should look for in your compiler's command line options if you want more information
the basic build environment on your system already does this for your basic dependencies, that's how you use system libraries
linux has defaults for installing and using things, windows does not because the windows SDK uses batch scripts in the visual studio install directory to set everything up instead (these need to be run before you compile things from the command line)

cmake and other build systems like MSBuild or even makefiles are tools for automating this and the other parts of building a program

you should use vcpkg, it's a package manager, and it will build and install libraries from source, (and that one's on there), and add helpers to things so packages can be found easier
it has integration with build systems like cmake and msbuild, and i think it even ships with visual studio now, just install it and try to follow the instructions
>>
>>101148345
Doesn't the Raspberry Pi use ARM?
>>
>>101148439
>>
>>101148439
when talking to a beginner you need to mention the syntax, that the compiler doesnt only use one directory at a time under '<>', it instead keeps a list of paths under which it is going to look for the files and that the "" work for both absolute paths and relative to the current directory
>>
>>101148459
>it does
holy shit, well, it will be those few arduinos that can do DMA, everything aside from that is irrelevant
>>
>>101147186
I can't imagine someone here trying to make their own OS. That seems impossible.
>>
>>101148498
just steal the source files and build them into your project as if they were your own source files
>>
>>101148585
a guy posted a picture of a command line some time ago, i dont know what he didnt write but he 100% wrote all of the subsystems and the windowing system, he might tell you himself though
>>
>>101148718
Windowing system? He should have forked X, since the current maintainers are biased against it.
>>
>>101148663
I mean, that's literally what it says in the instructions.
>>
>>101148740
X is finished software, there's nothing left to add
>>
>>101148788
Feature wise, yes, but there's still bugs/issues they are ignoring probably on purpose.
>>
>>101147519
I want to learn Haskell just to taste another programming paradigm. Perhaps I can bring some beneficial things from functional programming over into my main C development.

So, my Haskell side project is a Symbolic Math App. Like Wolfram Alpha.

So I'll also be writing a parser with it and small Domain specific language to do the math notation.

project is for the purposes of learning math and functional programming.
>>
>>101148740
a windowing system can (and should be) less than 1000 lines, X is cancer, everything ring 0 needs to be in kernel.
>>
>>101148803
never experienced any bugs so I don't care, if you were affected by any bugs so much, you'd have fixed them by now.
>>
For those of you who have gotten a good job recently; How many hours of leetcode you did per day, and for how long?
I know I should try to build a project as, maybe more importantly than doing leetcode, but I keep hearing that leetcode is not to be ignored.

I am currently trying to improve my leetcode skills using C++ especifically because it's a language I really "enjoy" and would like to master. Unfortunately, for projects I think I would have to use Python or something else as those seem more "project oriented" or so to speak. Maybe I'll learn Go.

Anyway I was wondering how many hours per day should I do leetcode. (What if I encounter a particularly difficult problem that takes me hours? I suppose I could end there for that day).
>>
>>101148825
You should work for IBM.
>>
>>101148818
>Perhaps I can bring some beneficial things from functional programming over into my main C development.
The best thing you can bring is not using C.
>>
>>101148872
its called ghC
it FFIs with C
the only reason not to use C with it is because haskell is already the best imperative programming language
>>
File: jej.png (11 KB, 640x734)
11 KB
11 KB PNG
>>101148872
in almost every program I write, C code shows up in perf more than my C++ code, despite my C++ code doing the most useful things.
>>
>>101143432
That fox looks like a dog
>>
Is there any reason at all to learn LISP?
>>
File: 1718915009088373.jpg (74 KB, 500x500)
74 KB
74 KB JPG
>>101147630
Don't ever do a PhD if you're smart you're better off applying to a FAANG level company and earn some money, the hours and culture might suck, but so do they on a PhD and you get paid a hell of a lot less. If I could start over I'd just go to work, this shit isn't worth it.
>>
>>101149040
Lisp is powerful. You can write a whole OS in Lisp.
https://github.com/froggey/Mezzano
>>
File: 1717601822256710.png (640 KB, 753x707)
640 KB
640 KB PNG
>>101149040
Honestly in my case it has just made me realize how bad the other languages are and made me hate my day to day webshit job in typescript. I've tried to push ClojureScript to the guys but get the default
>hurr durr parens
So no, I don't recommend it, it'll make you yearn for something you can't have
>>
>>101149084
can you write a good optimizing LISP compiler that creates self modifying binary programs in LISP?
>>
Trying to learn C. Some of it seems easy enough and others (like pointers to pointers) make me feel like I'm too retarded for this shit.
>>
>>101149201
Pointers to pointers have nothing to do with C. C makes simple things complicated by using retarded syntax.
>>
>>101149114
Can you give any examples of what LISP does so well? The parens are obnoxious but not a real issue.
>>
>>101149040
I've tried learning lisp dialects on a few occasions, but never got very far. It just feels clunky and awkward to work with. I admire the simplicity and keep being drawn to it, but I don't see the appeal of actually working with it.
>>
File: fx5rk2e5x3m31.jpg (27 KB, 720x303)
27 KB
27 KB JPG
>>101136960
>what do you mean compiled regexes can be values?
>what do you mean non-capturing groups exists?
>what do you mean \A and \z are more precise than ^ and $?
>what do you mean regex substitute any value and return the result as a value?
>what do you mean by map?
>what do you mean arrays of strings and iteratings over them?
>what do you mean regex match on a value?
>what do you mean by split?
>what do you mean by loop control flow?
>what do you mean capturin group?
>what do you mean label?
>what do you mean functions can return values?
>what do you mean pipes are streams and streams could be returned as values?
>>
>>101149273
in other words, C++ literally doesn't have this problem
>>
>>101149397
shit, here you go >>101143197
>>
>>101148147
you could replace the pointers/iterators with a std::span (or range) so there's two parameters
>>
>>101149531
That would require more typing for what I am doing. Two pointers is unironically optimal for my usecase.
>>
>>101130731
Which programming language is this
>>
Wha
y should I use macros, what are they usefull for other than implementing headers with #ifndef ?
>>
File: 1705247563.png (134 KB, 598x902)
134 KB
134 KB PNG
>java
>.NET C#
What internship would benefit me more as a junior developer who never had a real job?
On one hand a company tried to sell me C# as a "niche" language (compared to java) that pays well and that doesn't suffer from a saturated market. On the other hand java is way more popular which means there will be way more companies using it and therefore way more job offers
>>
>>101149804
mostly for coping with inadequacies of a language. C and C++ allow you to concatenate string literals if you put them side by side, so macro strings can be concatenated too. Doesn't work if you assign it to variable and use them obviously, so it has to be literal or a macro.
>>
>>101149766
python
>>
>>101149820
pick the one that you can stomach building projects in.
>>
learning tcl
kind of gay language but tk is ok so I guess it's fine
better than js at least
>>
zig imports are fucking atrocious
>>
>>101149946
I'd like to say C# but that's because Java is more verbose. I genuinely had fun working with C# but having to write more isn't necessarily a deal breaker either. While I figure out which one I like the most, I'd like to know what the market actually looks like from you all and possibly what language to focus on from a mere tactical perspective considering specializing in particular fields seems to be a key part of this job
>>
>>101150003
don't use zig then
>>
>>101150021
this will vary based on where you intend to work or source your remote jobs from. Just look on indeed.com in your desired area.
>>
SIGNIFICANTLY sped up my doujin search script by having it create hardlinks to the matching doujins instead of copying them like my retarded ass originally told it to.
>>
>>101150026
too late, plus I'm almost done setting modules up. I just need to figure out why tests still can't find the module after I add exe_unit_tests.root_module.addImport("my_stuff", my_stuff);
it worked for the normal exe
>>
>>101150139
It's never too late to stop being retarded and learn C++.
>>
>>101130465
is this the doxing thread? no thanks.
>>
>>101148818
For you https://okmij.org/ftp/tagless-final/course/lecture.pdf . I hope you'll have results to share soon.
>>
File: 1719266441418908.jpg (50 KB, 687x676)
50 KB
50 KB JPG
>>101149285
For me it's the brutally simple way it handles data, but after getting used to prefix notation it's super readable. Having a parinfer setup that handles parens slurp and barf is also a gamechanger.

If I could have slurp/barf operations with html/jsx blocks bullshit I'd be a lot faster. Generally any kind of prototyping was super fast, however I understand that it's not always good to give people speed... Maybe it's better that they can't do so much damage super fast, a ton of boilerplate to play work with is why Typescript and such win out at the end.
>>
File: 1713479724659362.jpg (109 KB, 1022x1024)
109 KB
109 KB JPG
>>101149285
Honestly, give Clojure a try, it's from the Lisp family and in my experience has the lowest barrier of entry
https://tryclojure.org/
Or if you want a more obtuse experience
http://clojurescriptkoans.com/
>>
>>101150217
wdym?
>>
>>101130731
>split(', ')
>', '
gross
>>
>>101149285
If you ever thought of "I wish the language supported X" then you can implement it. Even static typing (https://github.com/coalton-lang/coalton).
>>
Why is C++ so damn good bros
>>
>>101150703
>a ton of boilerplate to play work with is why Typescript and such win out at the end
Static typing wins because when you are a small company, you don't get access to your client's production environment. You get the logs and you get to play the broken telephone game to fix bugs. Maybe if they risk losing millions you get a fast track pass. Otherwise, no.
>>
>>101149804
so you dont have to write magic numbers twenty times, it is the same reasoning with typedef, can you imagine if ipv6 ever became standard? It will come, nobody wants to go and change all of the int to char * so you can toss it up to a macro for the function and a macro for the type which you are going to define once, anybody informed is going to know anyway
>>
>>101150217
>faggot thinks doxing somebody in 2024 will get them killed or anything
i will just change my face and name eventually, go on.
>>
is this undefined behaviour?
int func(struct Thing *const restrict thing, ...)
{
int *const restrict field1 = &thing->field1;
int *const restrict field2 = &thing->field2;
...
...
...
}
>>
>>101151792
No because everything goes through thing
>>
>>101151792
>if some object that is accessible through P (directly or indirectly) is modified, by any means, then all accesses to that object (both reads and writes) in that block must occur through P (directly or indirectly)
>If the object is never modified, it may be aliased and accessed through different restrict-qualified pointers (note that if the objects pointed to by aliased restrict-qualified pointers are, in turn, pointers, this aliasing can inhibit optimization).
>The compiler is free to ignore any or all aliasing implications of uses of restrict.
>>
>>101151792
I think it's fine to drop the restrict on the int pointers you have.
>>
file.c:46:12: error: 'vm_thing' redeclared as different kind of symbol
46 | uint16_t * vm_thing = 0;
| ^~~~~~~~~
file.c:41:35: note: previous definition of 'vm_thing' with type 'void *'
41 | uint32_t find_incongruence(void * vm_thing, void * previous, uint32_t start_offset){

gcc cant into scoping kek
>>
>>101153352
Function arguments are in the same scope as the block, not a block above it, so the same rules apply as if you tried to do
void *vm_thing = magic_get_arg0_function();
uint16_t *vm_thing = 0;
>>
#include <string>
[[nodiscard]] const std::string get_company_size(const int num_employees) {
return (num_employees < 50 ? "small" : (num_employees >= 50 && num_employees <= 250 ? "medium" : "large"));
}
>>
>>101153696
>>101153696
>>101153696



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