Conversation
Notices
-
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 05:46:58 JST Pleroma-tan can someone plz help me debug this clusterfuck, what the program should be doing is printing out the top 5 instances based on user count, but it's just printing the top instance which is mastodon.social -
Embed this notice
ovi (ovivu@lab.nyanide.com)'s status on Friday, 03-Nov-2023 05:49:02 JST ovi @kirby Holy fuck i cant read python Pleroma-tan likes this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 05:49:21 JST Pleroma-tan @ovivu partially my fault as it's not clear where the if statements end [i need to seperate these] -
Embed this notice
ロミンちゃん (romin@shitposter.club)'s status on Friday, 03-Nov-2023 05:54:28 JST ロミンちゃん @kirby use a shell script Pleroma-tan likes this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 05:54:59 JST Pleroma-tan @lunarised obj stands for objective
top is the top instances
current is supposed to be the one we're working on overtaking -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 03-Nov-2023 05:55:00 JST The MILF Messiah @kirby storage is free
name your variables better or i will beat you and impregnate your effeminate fatherPleroma-tan likes this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 05:55:26 JST Pleroma-tan @romin i could but I don't really know any -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 03-Nov-2023 05:58:11 JST The MILF Messiah @kirby
inpromtu code review
obj -> topNInstances
j -> instanceResponce
top -> parsedInstances
just my 2 cents on readability (I will murder c programmers who default to small variable names)Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 05:59:16 JST Pleroma-tan @lunarised heh. I'm one of those c programmers. J is for the for loop. It doesn't need changing -
Embed this notice
ロミンちゃん (romin@shitposter.club)'s status on Friday, 03-Nov-2023 06:04:38 JST ロミンちゃん @kirby curl 'http://demo.fedilist.com/instance/csv?' | tail -n '+2' | sort -n -r -t ',' -k 4 | head -n 5 | awk -F ',' '{ print "Instance "$1" with "$4" users" }'
Pleroma-tan likes this. -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 03-Nov-2023 06:06:06 JST The MILF Messiah @kirby
> j is for the loop
MAKE IT BETTER DAMN IT
j at this point actually represents an object with a purpose, the only reason we use i,j,k,l for for loops is since theyre essentially just a positional value.
i is fine, all we are doing with i is holding state for our control flow, but come on man... j represents something bigger (arguably the most important data in your program, next to r which is also named by helen keller)
(tell me to fuck off if you want idc, i just like seeing people clean up their code (noone does it enough))Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 06:07:21 JST Pleroma-tan @lunarised I'm thinking about just writing this in c instead honestly
Because
a. People are bashing me for using python for a small script
b. more used to the practices of c, got confused multiple times because j was a fucking string when I was expecting an int -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 06:07:45 JST Pleroma-tan @romin wonderful. -
Embed this notice
iced depresso (icedquinn@blob.cat)'s status on Friday, 03-Nov-2023 06:09:51 JST iced depresso @lunarised @kirby real programmers name all their temporaries shit, piss and cum Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
ロミンちゃん (romin@shitposter.club)'s status on Friday, 03-Nov-2023 06:10:04 JST ロミンちゃん @kirby awk -F ',' '{ print NR": Instance "$1" with "$4" users" }' if you want the line number
Pleroma-tan likes this. -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 03-Nov-2023 06:10:31 JST The MILF Messiah @kirby
Nah stick with python. Its a much better language to understand imo (it actually gets used (coming from a C enthusiast))
the in operator is pretty standard now in languages, which is dope
Anyone giving you shit for writing a small script in python is completely fucking retarded. And i will call them completely fucking retarded for youPleroma-tan likes this. -
Embed this notice
Sarvo (sarvo@novoa.nagoya)'s status on Friday, 03-Nov-2023 06:10:48 JST Sarvo @lunarised@whinge.town @kirby@lab.nyanide.com they are actually mathematical dimensions 🥸
Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 03-Nov-2023 06:14:10 JST The MILF Messiah @sarvo @kirby Sarvo, go back to class, you're gonna miss what an iterator is Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
Hoss Delgado (hoss@shitpost.cloud)'s status on Friday, 03-Nov-2023 06:14:20 JST Hoss Delgado For me, it's sneed and chuck. Pleroma-tan likes this. -
Embed this notice
Sarvo (sarvo@novoa.nagoya)'s status on Friday, 03-Nov-2023 06:19:19 JST Sarvo @lunarised@whinge.town @kirby@lab.nyanide.com sorry I am attending to physics XI, seriously look it up xyz axis are used interchangeably with ijk while being treated as vectors.
Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 06:29:47 JST Pleroma-tan @mac_ack fuck that could be what's going on. Going to have to bring up pdb -
Embed this notice
Password Man (mac_ack@hidamari.apartments)'s status on Friday, 03-Nov-2023 06:29:48 JST Password Man @kirby I think this comparison returns false, and current is never updated so the first value is added to your results every time through the loop -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 03-Nov-2023 06:29:51 JST The MILF Messiah @sarvo @kirby
this has been marked as mostly true by true american patriotsPleroma-tan likes this. -
Embed this notice
tsoifan1997 (sysrq@lab.nyanide.com)'s status on Friday, 03-Nov-2023 06:33:44 JST tsoifan1997 @lunarised @kirby
>I will murder c programmers who default to small variable names
I make variable names as short as possible and keep function names <8 characters.Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 03-Nov-2023 06:33:52 JST The MILF Messiah @sysrq @kirby why?
theres literally 0 reason to do soPleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
tsoifan1997 (sysrq@lab.nyanide.com)'s status on Friday, 03-Nov-2023 06:34:00 JST tsoifan1997 @lunarised @kirby
Because it's the style(6).Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
tsoifan1997 (sysrq@lab.nyanide.com)'s status on Friday, 03-Nov-2023 06:34:10 JST tsoifan1997 @lunarised @kirby
And I like to pretend that I'm in the 70s when there was constraint on names.Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 03-Nov-2023 06:35:38 JST The MILF Messiah @sysrq @kirby damn, he is retarded Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
tsoifan1997 (sysrq@lab.nyanide.com)'s status on Friday, 03-Nov-2023 06:35:47 JST tsoifan1997 @lunarised @kirby
Wait til you see how much pointer arith I do.Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 03-Nov-2023 06:36:11 JST The MILF Messiah @sysrq @kirby im coming to rape you Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
tsoifan1997 (sysrq@lab.nyanide.com)'s status on Friday, 03-Nov-2023 06:44:42 JST tsoifan1997 @lunarised @kirby
I'll start doing K&R style function declarations just for you. <3Pleroma-tan likes this. -
Embed this notice
Adriano (adriano@lile.cl)'s status on Friday, 03-Nov-2023 06:54:47 JST Adriano @kirby
A couple things:
- using python for short scripts is just fineThis is a bit more pythonic:
https://pastebin.com/SGR4p8C4Pleroma-tan likes this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 06:55:41 JST Pleroma-tan @adriano oh wow thanks, I appreciate this In conversation permalink -
Embed this notice
Adriano (adriano@lile.cl)'s status on Friday, 03-Nov-2023 06:56:20 JST Adriano @kirby no problem. Debugging these is fun.
In conversation permalink Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
mia (mia@freespeechextremist.com)'s status on Friday, 03-Nov-2023 06:58:14 JST mia @lunarised @sysrq @kirby
babe_you're_not_a_haccer_in_the_70s.pngIn conversation permalink Attachments
Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
Adriano (adriano@lile.cl)'s status on Friday, 03-Nov-2023 07:04:27 JST Adriano @kirby Actually, the
int(x[3]) if x != '' else 0
bit is superfluous, I already check above for that. should just be
key=lambda x: x[3]In conversation permalink Pleroma-tan likes this. -
Embed this notice
tsoifan1997 (sysrq@lab.nyanide.com)'s status on Friday, 03-Nov-2023 07:04:37 JST tsoifan1997 @mia @kirby @lunarised
Wow literally me.In conversation permalink Pleroma-tan likes this. -
Embed this notice
@Dwarf (dwarf@borg.social)'s status on Friday, 03-Nov-2023 07:11:20 JST @Dwarf @kirby@lab.nyanide.com can't you just use pandas to sort the list
In conversation permalink Pleroma-tan likes this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 07:11:35 JST Pleroma-tan @dwarf /shrug, I primarily produce c. I don't even know what a panda is. In conversation permalink -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 03-Nov-2023 07:13:02 JST The MILF Messiah @sysrq @kirby jokes on you.
I am forced to dev using whitesmiths at workIn conversation permalink Pleroma-tan repeated this. -
Embed this notice
tsoifan1997 (sysrq@lab.nyanide.com)'s status on Friday, 03-Nov-2023 07:13:02 JST tsoifan1997 @lunarised @kirby
And I'll also statically link everything. :^)In conversation permalink Pleroma-tan likes this. -
Embed this notice
@Dwarf (dwarf@borg.social)'s status on Friday, 03-Nov-2023 14:18:43 JST @Dwarf @kirby@lab.nyanide.com idk the last time I did python was in University and they made us use pandas with CSV, I think using it can shorten your code by a lot maybe
In conversation permalink Pleroma-tan likes this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 03-Nov-2023 14:19:25 JST Pleroma-tan @dwarf perhaps, someone already gave me a version of this script that actually does the job [and is a lot better and neater than my code] but i'll keep this in mind next time i'm working with csvs in python In conversation permalink -
Embed this notice
@Dwarf (dwarf@borg.social)'s status on Friday, 03-Nov-2023 14:24:09 JST @Dwarf @kirby@lab.nyanide.com better to stay away from the evil that python if you can help it hehe
In conversation permalink Pleroma-tan likes this.
-
Embed this notice