/dpt/ — Daily Programming Thread

What are you working on, Any Forums?

Previous thread:

Attached: Cuis.png (1920x1006, 442.16K)

Other urls found in this thread:

planetnews.com/live/fox-news.html
open.spotify.com/search/jay-z
open.spotify.com/artist/3nFkdlSjzX9mRTtwJOzDYB
youtube.com/results?search_query=jay-z'))[1])[0];
automatetheboringstuff.com/
pythondiscord.com/resources/
pkg.go.dev/net/http/pprof
github.com/friendlyanon/cmake-init
twitter.com/NSFWRedditVideo

I'm trying to learn J
(+/ % #) i. 100

Pleb
print(*[i if (x:="%s%s"%(""if i%3 else"Fizz",""if i%5 else"Buzz"))==""else x for i in range(1,101)])

>%strings

its a litttle shorter than using "".join() and ""if i%3 else"Fizz"+""if i%5 else"Buzz" isnt going to work properly, so "%s%s" is the shortest option there

hmm is it happening?

the head jew is sending 3,000 US troops from 82nd airborne to Ukraine and Putin is allegedly invading asap

planetnews.com/live/fox-news.html

I hope they go after israel

I have an issue with the fact they exist.

>invading asap
Didn't they also "invade asap" in December and January? Also, this is /dpt/, post your SICP photo.

how does you're lang load json

Now do it printing "Fizzbuzz" instead of "FizzBuzz".

int json_load(const char *json_string, int len, json_object *out)
{
/* write your own parser here */
}

I'm trying to get Spotify Artist IDs without using their API using PHP or Javascript. I have
open.spotify.com/search/jay-z
and I want to use that or something else to generate
open.spotify.com/artist/3nFkdlSjzX9mRTtwJOzDYB
On YouTube I can scrape the search page to get video IDs like so
$data = explode('/ script>', explode('ytInitialData', file_get_contents('youtube.com/results?search_query=jay-z'))[1])[0];
$vr = explode('videoRenderer":{"videoId":"', $data);
$vids = [];
if (is_array($vr) && count($vr > 0) && is_numeric($depth) && $depth > 0) {
for ($a = 0; $a < $depth; $a++) {
$cnt = $a + 1;
${'vid_' . $a} = explode('"', $vr[$cnt])[0];
${'vtext_' . $a} = explode('"', explode('text":"', $vr[$cnt])[1])[0];
$vids[] = ['vid' => ${'vid_' . $a}, 'vtext' => ${'vtext_' . $a}];
}
}
return $vids;

I can do that because the IDs are in the returned markup, but Spotify does everything with ajax I guess and I can't get any data at all from open.spotify.com/search/jay-z using file_get_contents() or DOMDocument(). Why do they lock down their IDs like that? Can anyone think of any way to get them? I asked /wdg/ but they are useless.

Attached: spotify-logo.jpg (945x630, 49.89K)

print(*[i if(x:="%s%s"%(""if i%3 else"Fizz",""if i%5 else"Buzz"))==""else x.title() for i in range(1,101)])

anons ive lost my love for programming how do i get it back

any of you fags know any good python resources/forums to learn?

My Golang program is using 100% of the cpu. What am I doing wrong?

>I asked /wdg/ but they are useless.
Most of those niggers couldn't program their way out of a paper bag using just html

Are you using goroutines?

I only love programming in the night. Does that mean that my love for programming is simply animal lust?

If you know how to, read the Python docs
Completely new? Try automatetheboringstuff.com/
This place also has some really good resources pythondiscord.com/resources/

pkg.go.dev/net/http/pprof

Reminding anons to use github.com/friendlyanon/cmake-init when creating new C++ and C projects!

No thanks. I live in the 21st century and have Visual Studio for that.

how do I write cave story transition using visual shaders?

Attached: Screenshot_20220207_095815.png (585x520, 206.9K)

how the fuck do i handle Any Forums API md5 field of a post object? docs says it's
>24 character, packed base64 MD5 hash of file
but when i'm not getting anything meaningful when i decode it using base64

Is the guy that was working on an animal dex still around?

Attached: 9nsgatf9wga81.jpg (640x764, 62.72K)

What's language agnostic advice do people have for localization? I've never put consideration into it before but want to get into the habit of making my projects easy to translate in hte rare event someone actually wants to.
Is the convention similar to gettext the best option?

That is, everywhere you would use a string literal, would be replaced with a function call instead that indexes into some kind of map like this print(text(some_prefixed_constant)) or have better solutions come about? I can't think of a better way to handle it but wanted to ask.