« first day (4368 days earlier)      last day (770 days later) » 
00:00 - 23:0023:00 - 00:00

00:21
why do I have so many MicroSD cards on my desk
00:54
why not
@RydwolfPrograms i don't think there's any sensible way to get around that
in the general case, that is
01:13
@Ginger because I put them there
I thought it'd be funny to make you wonder why there were so many there :p
01:25
@Simd I've got a C solution that seems to be working! Can't post it now, though, because the site's in maintenance mode. :P
It's 183 bytes of pure for-looping, array-indexing ugliness.
@lyxal You can't just name a variable adams_family and not expect me to post this
Well actually I did expect there to be some sort of reference to it :p
01:53
Oh hey the site's back
02:14
@UnrelatedString No, but if you know roughly how big certain variables are likely to be relative to one another, by changing how quickly they grow relative to another you can really improve the average case
<span style="color: #ffffff;">♚</span> and ♔ both look not good with colored background
 
3 hours later…
05:17
For backups, would y'all recommend an HDD (cheaper, might last longer in storage) or an SSD (wayyy faster)? Trying to decide between a SanDisk Extreme Pro, which would make backing stuff up super pleasant due to the speed, or a USB hard drive cage which I could stick a nice reliable NAS/enterprise HDD in to get maybe half to a third of the speed, but maybe better reliability
(worth noting I do have USB Gen 2x2, so I can make use of the speed from the SanDisk SSD)
(whereas with an HDD it wouldn't matter anyway since SATA would be the bottleneck, unless they make SAS external drive cages which...that's probably a bit niche)
Okay the only one I can find with SAS has USB 3.0 which is even worse of a bottleneck than SATA 💀
 
2 hours later…
07:20
Hi
 
1 hour later…
 
2 hours later…
10:05
Is binary search insertion sort O(n log n)?
m90
m90
10:37
@mousetail No, because moving the already-placed elements to open up a space for the new one takes up to linear time, and is done n times.
If it was a linked list?
m90
m90
@mousetail Then, reaching a given position takes time linear to the distance moved, and the overall time complexity is still quadratic.
Ok if it was a binary search tree
m90
m90
@mousetail Yes, that would make it O(n log n).
Do any other languages have a built in for pari's awesome forfactored function?
11:22
What does it do?
Iterates over numbers with their factorisation
I think it uses a prime sieve under the hood
12:29
@cairdcoinheringaahing mmm, crunchy
13:15
0
Q: Number-only switch

l4m2Write a function that take ASCII-only(charcode 32-126) input x and provide ASCII-only output f(x), such that f(f(x))=x f(x) consist of non-number(charcode not in 48-57) iff x don't consist of non-number You can assume input is not empty and never provide empty output, or treat empty input as "d...

13:30
Despite the fact their name is David www, their profile picture is the letter B
lmao
I henceforth declare them 🅱️avid LLL
because they are not getting a w on their spam. They are taking an L
The link leads to a page with a video featuring this guy:
burn
13:33
🅱️avid LLL. Goofy nerd. — lyxal 16 secs ago
would you trust this man?
@Ginger looks like someone I'd call 🅱️avid LLL
exactly
lol
@Ginger whatis that
@PyGamer0 EV3RY BUDDY'S FAVORITE [[Number 2 Rated Salesman1997]]
13:35
lol
@PyGamer0 That's a picture of our good friend 🅱️avid
and it's gone
Aw 🅱️avid LLL is no more posting
This is so sad can I get a 🅱️ in the chat for our fallen spammer friend
13:35
🅱️
🅱️
rip 🅱️avid
Oh hell no
-1
A: Carbon bike for commuting - concerns about durability

Barath offic worksA new opportunity has arisen for people who are capable of following instructions and sending simple messages online. This position is perfect for anyone who is reliable and seeks to earn around $288 per day. What you will be doing: You wll work as a live chat assistant, sending messages to websi...

🅱️avid LLL back at it on the bike site
🅱️avid LLL back at it with the goofy spam — lyxal 14 secs ago
quick someone warn them!
I wonder why bicycles.se
Our boy 🅱️avid has also been sussypended from stackoverflow
The plot thickens
13:41
I have alerted the Bicycle.SErs
imagine you're just casually chatting with your buddies about biking and someone kicks down your door and goes "YOU'VE GOT A SPAMMER"
@Ginger they too can enjoy the works of the great 🅱️avid LLL
I really should be getting to sleep, but holy frick 🅱️avid is such a funny name
I can't stop laughing send help
I mean, I guess this person has kinda done what they came for: gotten attention
we turned them into a chat meme and by doing so immortalized their spam
No no we've turned 🅱️avid into a chat meme. The original spammer is completely forgotten at this point :p
quick, make a wiki entry for 🅱️avid
lmao
 
1 hour later…
14:46
@Adám congrats!
15:40
@RydwolfPrograms Backups are only done once in a while, so speed probably doesn't matter as much. Cheaper and reliable might be better in that case
@lyxal Screenshot for us plebs?
15:58
LDQ I'll have 3 types of input commands: As a single string, as a array of lines, and as stuctured data (like JSON.parse but much more permissive) which type should the implicit input be?
string
if I'm understanding your question correctly you could make it attempt the third and if the format is wrong fall back to the first
sort of like how jelly args work
Third should be so permissive it will rarely fail
Single string or array of lines is probably what people would usually expect
Why not use flags for this? I don't think it'd be considered cheating here
16:15
There will be a override using flags, I'm also considering use in other sites that don't allow flags
16:37
Oh right, anarchy golf :(
My thoughts are optimize for the most strict IO requirements, then it will be good to for this site where they are more flexible
16:54
LDQ: should classes have a common base type?
related: should primitive types also have that common base type?
I do dislike languages where primitives work completely differently from everything else. If there is a "base" type for classes primitives should have the same functionality
my primitives work in the exact same way as other types, its just that theyre compiler defined and you cant actually find their definition anywhere
also i have a weird situation with the "dynamic" type
it basically turns off type checking. you can assign anything to it, and it will assign to anything
Is better be called "duck"
why
anyway, what i was saying: if i have a common superclass, would dyn be a subclass of that too?
17:11
dyn isn't really a class, so it might be considered a subclass in some situations but not always
If you have a issubclass or isinstance type thing I'd suggest to throw a error if you try to use dyn with it
since that doesn't really make sense
as in x is dyn would error?
at compile time yes
17:38
Hello
This is my first time using this chat
welcome
thank you
Hey, this is code golf and we talk about avocados.
17:56
good to know
i'll keep that in mind when considering my future inquiries into this discussion
so do people use this chat for figuring out solutions to problems or?
I don't understand most of the memes in this chat either
@Jacob Yes, also
Asking about tips to golf things, feedback on challenges, chat mini challenges, language design feedback etc. are all on topic here
ok nice thanks
@Jacob hi, welcome to TNB!
please make sure to read the chatiquette (if you haven't already)
hi thanks i'll read that
always nice to see a new face :p
17:59
i have a question, is this site called ppcg or cgcc or what?
@Jacob ostensibly yes, in practice not so much :b
@Jacob CGCC
okay beacuse i've seen a couple different things looking at random meta posts
yeah, it was renamed to CGCC a few years ago
I just call it CCGSCE to avoid confusion
Pode Polf Cack Gxchange :p
18:02
does it stand for Code Golf and Coding Challenges?
ok
Oh also if you want to chat with us about off-topic stuff there's a room for that
ok good to know thanks
18:05
np!
okay now back to figuring out why pypackage isn't showing download progress bars correctly
... why do you even care about that? :P
Looking at the starboard it's hard to believe this is supposed to be the on topic chat
0
A: Sandbox for Proposed Challenges

The ThonnuCapture the Flag... with a twist code-golf math Taken from the OUCC 2022 Seniors competition. Background Two teams of students are playing "capture the flag". They take turns invading each other's base and capturing their opposing team's flag in the shortest amount of time. The attacking players...

@mousetail yeah lol
@mathcat wdym? to be more specific, it's not showing progress bars at all
I think the issue has something to do with the PooledDownloader class
oh, that makes sense lol
18:07
lemme just update the repo rq
@Jacob yeah we have a bunch of chat specific memes; you might hear of avocado juice, the steggan hivemind, fridge nukes, or lyxal's limb stealing business
if you stay here for long enough eventually you'll learn all of them q:
remember, code golf is an addictive drug
We definetely need a meme list.
The fandom's kinda outdated.
TODO
tell me about the limb stealing business
18:13
@Jacob okay so
in chat, you have to escape backslashes in messages
so when you send an emoticon that uses backslashes (like ¯\_(ಠ_ಠ)_/¯), if you don't remember to escape the backslash it disappears and you get something like ¯_(ಠ_ಠ)_/¯
ah i see where this is going
and the joke is that @lyxal, one of our more prominent members, stole the limb and sold it on the black market
@mathcat this
@mathcat just update it then d:
got it
18:16
@Ginger ah well, guess I'll do it [sometime tomorrow]
i had mine stolen from my bio once, my meta bio is still missing it
waiting to find it on the black market
see? nobody is safe
i'll be careful
@mathcat why not today
@Ginger most of us who are active in chat can be considered "prominent" to those in chat :P
18:17
@Ginger good point
thanks edge, that's exactly what I was looking for
does chat use markdown
@Jacob yeah kinda
i would
18:18
@Jacob Only on the first line, and only during a lunar eclipse
markdown-ish?
chat markdown is cursed
@Jacob theres also a related one where the mods keep putting nukes under lyxal's fridge, and he uses the revenue from his limb stealing business to get new ones :P
ha
I used to have a gambling addiction but now I just guess if my chat messages will format correctly
8
18:20
multiline messages don't work at all with it, strikethrough syntax is --- for some reason, it's almost impossible to escape certain things correctly, and that's just the tip of the metaphorical iceberg
oh so not <s>a</s>
yup
got it
@Jacob SE Nitro is a webcomic by @RydwolfPrograms that incorporates most of our memes
(you can use the sandbox for testing btw)
18:20
SE Nitro itself is a meme; search the bookmarks to find it
@Seggan it's incomprehensible unless you know the memes tho
ive got an explainer but its only for the 1st 2 chapters
yeah i quickly got through the first 2 chapters just now but i dont get any of it
what is the canadian cia lol
it gets better as time goes on btw
ok
18:22
so what were we discussing again? :p
@Jacob the cia but canada edition
@Seggan wow now i understand everything
alright I have absolutely no idea what is wrong with the progress bars
what's wrong with what progress bars?
so I am currently working on a tool called pypackage that takes a Python project and turns it into a single file that you can easily install it with
18:27
awesome
and for some reason the progress bars that it uses to show its progress on downloading the dependencies aren't showing up
I've always hated writing packages for pip.
I restructured a bunch of code and something I did must've broken them
that sounds useful
i dont know any python tho
@Ginger why is this the first time im hearing of this
18:29
here's the repo, the code on the main branch is pre-restructuring and works fine but the code on the dev branch is broken
@Jacob i dont recommend it
don't listen to them, Python is great
probably beats JS..
@Jacob yes very much
(im a known python hater, so dont take my word for it)
@Jacob on that i agree
18:29
im not a fan of the lack of parens
Packaging in python is pain, even the python fans agree
if you don't know Python I strongly advise you learn it
@mousetail can confirm
tbh python is great for single file quick scripts, such as when i need to do mass curling or do some special file copying, but not for big (or medium) projects
see this conversation for more info on the problems with Python's packaging system
or i just discovered the http.server package and im like, this is the best thing since sliced bread
18:31
As in the command line version or the module?
finally no more complex apache stuff for a temporary webserver
@mousetail both
I like using Flask for servers
The module is terrible though, if you want custom behavior
im a typescript fanboy D:
@user Yeah, but if they're painfully slow, that'll discourage me from backing stuff up in the first place
18:32
@mousetail what more do i need than to set mime types?
so technically the code on the main branch works, in that it can package projects, but it doesn't work well and I'm about 90% sure that it can't install packages correctly yet
why dont you just invoke pip
@Seggan I am, but how I'm doing it is the issue :b
pypackage installs all the modules and such in a virtualenv, and getting that working has proven to be a pain in the ass
I used it once with just one special behavior that it should serve files from one folder but fallback to anther if the file didn't exist
super simple right?
it was pain
of course had Python come with a good packaging system I wouldn't even have to do this
18:34
wheel?
bad
and here's most of why:
Oct 19, 2022 at 14:16, by Ginger
did you know that due to the byzantine structure of Python packages there is no way to ascertain what dependencies a package will have before installing it?
by packaging you mean like a bundler thing that puts all the code in one file?
@mousetail if im writing an actual web server, ill use kotlin + ktor, but if i need something to quickly server up a few files, i use http.server
@Jacob i think the web equivalent is webpack
@Ginger I hate this so very much but there's nothing I can do about it
Yea I use the command line version all the time
It's just a pain to add anything to
18:36
@Jacob yeah, pretty much
the one reason i dont use the command line is because it cant serve up js files
mime type problems
the issue lies mostly with Python C extension libs like numpy
if those didn't exist, Python packaging would probably not be the mess it is
I belvie you can fix mime types with a environment variable
@Ginger im stupid and know nothing about python but...can't you just concatenate files to one
@Jacob wdym?
18:39
like if theres a.py with a = "hello" and b.py with b = "world" and c.py with import a "a.py" import b "b.py" print a + b (i don't know how python importing works) . i'm sure this wouldn't work but something like that? obv ur the expert tho
sadly, that wouldn't work
then it would become bundle.py with a = "hello" b = "world" print a + b
how do you do it then?
does it have to parse all the python files for tokens or something complicated like that
actually, that might work? idk
but I doubt it
That's how webpack works in JS
wrap everything in eval
JS's import system is cursed
18:43
The fact that there are 2 seperate systems is cursed
CJS and ESM
basically what pypackage does is it packages the program and all its dependencies into a single file, and to install it uses virtualenv to create a completely isolated, clean environment with nothing in it but the program and its dependencies
at least that's how it'd ideally work
the problem is with modules like gi, which are basically C libraries with Python bindings and as such are very picky about how they're installed
for example, gi isn't available on PyPI because it's not actually a Python module: it's a C library with Python bindings
I think Nix flakes might be able to do what you want (a sort of unified package manager that can install anything)
@user that's what waterjet was going to be
Your flake can declare all the dependencies it needs with specific versions
@Ginger was? :(
so if you've got a program that uses libraries like that, tough fricknuts: I hope your package manager can install from your OS's repos!
@user yeah, that project is on indefinite hiatus
I might come back to it someday, but right now I've got other things to work on
18:47
How do people generally install gi then?
clone and make?
@user I'm getting to that q:
it gets worse: most OS package managers include Python modules as packages, which are then installed into a special directory called dist-packages
so for something like pip, there are essentially two versions: the version from PyPI, and the version from the OS's repos
the latter one is usually several versions out of date and almost always conflicts with the one from PyPI
Why an extra version from PyPI?
Why not just the one that comes with the OS's python package?
@user all Python packages should go on PyPI, because that's where they're supposed to go: it's a standardized source for Python modules
@user I was just using pip as an example, ideally you'd use the one that comes with your Python distribution
the most egregious offender here is Debian: If you want to distribute a Python program using apt, you basically have to use the OS repos
and even then it's next to impossible, because apt was designed for compiled languages, not interpreted ones
okay, unless the audience has any questions I'm done with my rant now :p
¯\_(ಠ_ಠ)_/¯
18:58
@mousetail I'm not a huge fan of the exact byte restrictions
oh one more thing: The one good feature of Python package management is virtualenv, which is such a good idea that I wish would be used more often in OS package management
Perhaps allow the first program to be n bytes and force each next program to be twice the previous one?
@Ginger Well, Docker kinda covers that
@user But then how to do scoring?
And Nix, but that's not very popular
@mousetail idk, maybe ask that in your sandbox draft?
Perhaps you could divide by n, where n is the length of the first program?
Wait no
I specifically chose hard byte limites because most if not all code challenges that try to combine code length and accuracy in a score are badly balanced
19:01
@user yeah, but Docker kinda feels like overkill for a package manager, and besides neither it nor Nix are really made for casual desktop users
Multiply by n maybe
@Ginger thats why you dont distribute python programs
@Ginger Well, devcontainers are actually pretty easy to use if you've got VS Code, but yes, they're overkill
@Seggan @lyxal another plagiarizer :P
Instead of making a package manger, how about making a detailed guide so that the user can program their own pacakge and all it's dependencies
19:04
@user I don't really want to install an IDE just to use my package manager :b
@mousetail Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Make sure it includes instruction on how to create transistors from vacuum tubes
then it will be truely cross platform
make: Unable to locate microchip etching device. Stop.
@Ginger Give a man a fish, he'll have food for a day. Teach a man to fish, he'll have food for a lifetime. Teach a village to fish and they'll fish the fish to extinction then starve anyways
Gotta be a big fish if just one is enough to feed an adult for a day
And if it is a prize fish, you should show it off instead of giving it to suckers who can't fish on their own
Fish that big are quire common, unless the adult is obese
19:16
progress bars -> package management -> overused cliches -> fish size discussion
I love this chatroom
-> meta discussion about the progression of dicussions
-> recursively meta-meta jokes about the metaness of the joke
I feel like Douglas Hofstadter :p
@mousetail Maybe I just eat a lot lmao
@Ginger -> Hitler
Hitler famously once ate some fish
19:23
truly a pivotal moment in world history
@RydwolfPrograms pin plz
@lyxal just got confirmation from Bicycle.SE mods that our boy 🅱️avid LLL has been nuked from orbit
19:46
@user ?
oops :P
Why where we even involved with david? Why was he our boy?
20:37
Very pleased there is a C answer now
Julia should be comparatively trivial
21:14
@Adám Mazel Tov!
Thank you.
21:44
Hang on, did you have a child?.
I did.
@Adám mazel tov from me too!
Thank you.
Bad news, she will become less and less golfed quite rapidly
Good news, she will become better and better at golfing quite rapidly
21:48
@user :)
She started off at 52 cm, but I squeeze her a lot, so…
@Jacob I am the one who knocks steals limbs
Use inches so that number looks lower :P
I wonder if skill at code golf transfers to any real life stuff
I definitely think so. It forces you to know your PL much better.
@mousetail *🅱️avid. He was at it with the goofy spam on multiple sites so we all spam flagged his stuff and ironically turned him into a meme
21:51
@user Also, you can do code golf for work.
@Adám But one could argue that it mostly forces you to know the weird parts of your PL better, which usually don't come up in production code
@lyxal They had enough rep to edit stuff on multiple sites, right? I wouldn't be surprised if their account got stolen.
@Adám APL is special :)
Also, your aim is making the code as simple as possible, not just shorter, right? Even APLers don't golf their code at the cost of complexity or speed
@emanresuA no. All their accounts had 1 rep.
Then... how did they edit stuff?
21:53
They edited stuff?
🅱️avid LLL with the goofy edits too?
@lyxal This looks edited at least?
Ohhhh wait
Did they close it as a dupe
@user True, but some techniques that pop up in golfing can still be applied.
Fair enough
@emanresuA what? No. It's an answer.
I'm dumb
21:54
No, you're emanresu A
@user I learned functional programming things like mapping, filtering, etc as well as other cool things like lambdas from interacting with code golf. Now I use them as much as I can in real code
I try to write my production APL code as clear and airy as possible, but I golf my production JS.
Plus you learn a whole bunch of different ways to solve problems with techniques such as Cartesian products, take/drop while, finer array/list manipulation and more
I have unironically learned more about real world programing from code golf than I have from school and uni
Also, TNB is the go-to place for how-to programming questions. On SO, you'd just get your question closed or be told to do something else.
:/ should it be, though?
22:10
I mean, SO and TNB are different things
Reddit, Quora, Discord servers, and chatrooms like these are very accepting of questions that'd get closed on SO
@lyxal All my homies hate school and uni
@Adám May I ask why you golf your production JS? Don't want to use a minifier? :P
To make it readable and maintainable.
Golfing production code is kinda pointless - It's just harder for other people to read, and minifiers (/ source maps) exist anyway
Any math people know a simple proof that 1<sqrt(2)<2?
@Adám :-)
@emanresuA you can get fired for writing code your colleagues can’t understand, I had a friend who did
00:00 - 23:0023:00 - 00:00

« first day (4368 days earlier)      last day (770 days later) »