« first day (4489 days earlier)      last day (650 days later) » 
00:00 - 19:0019:00 - 00:00

00:29
@DLosc Cool, I'm not the only one then. I think the nature of this site putting all the languages in same thread sort of encourages languages at are ultra concise and therefore complicated
00:45
Whilst there's a definite motivation to be the golfiest language for every challenge, longer but more interesting solutions are often better scoring. Brainfuck solutions are great fun, despite being huge.
@DarrenSmith Unfortunately, we're limited by the software we use: CGCC is, and always has been, a poor fit for the SE model
However, the inherent support from such a large company means that we can grow and be supported much more than any independent site
I partially touched on this in this blog post
There have been numerous previous attempts to move the site, but it's hard to move a community with a site. The best solution would be for SE push CGCC into its own format, and lean away from the Q&A model.
I think I've gotten too used to having built-ins for everything - when I go to use languages with smaller built-in sets, I often start wishing I had more to work with. I kinda like being able to express what I'm thinking without having to construct bigger things from smaller things.
@ATaco Axtell was the most promising, and that died with Mego's departure from CGCC
@lyxal Tbh, the thing I like the most about golfing languages is the abstraction found with the builtins
Yeah, I was excitedly following Axtell, quite a shame when Mego left ;-;
I miss that Penguin
00:54
Truly a shame he left in such a bad way :/
I also really hope Dennis is doing okay
I have no idea what you're talking about
I think we can all agree Dennis was one of the Pillars of the community.
@cairdcoinheringaahing same. Like it wouldn't matter if all the built-ins were multiple bytes or long words - they're basically idioms
@ATaco I recently had a dream that Dennis returned
Given the circumstances behind his departure, he's probably one of the "old guard" I think about the most, as I really hope he's doing okay with his medical issues
00:58
Does WW still lurk? I've not seem them in a long while.
Yep, WW's still around
And last I saw Downgoat dissapeared...
@ATaco WheatWizard? I've seen them recently
Yep, Downgoat left along with Axtell
WW is still around, but primarily doing mod stuff
@cairdcoinheringaahing now that's a site I haven't heard of for a while. I remember the first questions and answers on that site when it was a thing for just a little while
00:59
but I genuinely have no idea what Axtell is and I'm too new to the site to have interacted with Dennis
I've got myself all Nostaligic for a time passed now
Sandbox posts last active a week ago: Complex remainder
@Bbrk24 Axtell was going to be a dedicated site for golfing. Think Codidact but code golf exclusively
It was a site established after the Monica incident for code golf
01:00
@cairdcoinheringaahing Chrome is preventing me from seeing it
It supported built-in TIO, it was incredible
@cairdcoinheringaahing Wait that was after? I thought it was before
Unfortunately, between Mego and Downgoat, it never officially launched
@lyxal Around the same time
@cairdcoinheringaahing It was usable for a little bit
But mostly as a beta
I'm well aware
01:01
@cairdcoinheringaahing huh, interesting. I always thought it was started before
Shit, it started in 2017
Thought so :p
Apr 15, 2018 at 18:52, by Pavel
Anouncment: In case anyone cares, PPCGv2 has a name now and is called Axtell, named after Mount Axtell in Antarctica.
@Bbrk24 You can click through, the site won't give you any viruses
It says the challenges are from "three years ago" which would be 2020
Huh wow there's been answers from last year
01:03
@ATaco I was already feeling nostalgic from various sht tonight, and now we've gone and mentioned Axtell and Mego :/
Haha I have 4 followers on Axtell somehow
You can still make posts, they just don't show on the front page
Unrelated:
So there is a bug in the Trilangle disassembler that indicates my existing approach is inherently flawed, and I probably need to rethink the class from the ground up. The problem is I don’t even know where to begin like I have the code that will walk around the, code board I guess, but I need to follow _both_ paths when there’s a split of any kind, and implement loop detection.
In fact, there's 101 challenges, but the Challenges tab only shows 3
my existing approach is an attempt at a depth first search of the IP state space, but it’s incredibly janky with how it handles branches and loops
I don’t even know what to ask or what to look up
01:12
@cairdcoinheringaahing well that's probably because a lot of them are spam
@Bbrk24 Prolly would help if I understood the language
There’s an explanation in the readme iirc but I can answer any questions you have
It’s a 2D language where every instruction is a single character
01:38
I've known about this issue for a bit now, I just have no idea how to approach it
01:59
With regard to earlier messages, about Dennis and others. I hadn't heard of the others, there is much I missed. But I had ofcourse heard about Dennis and seen some of his great solutions. I never knew where he went, sad to hear that it is medical issues and not just doing something that usurped code golf for him
@cairdcoinheringaahing Thanks for that post, that was nice to read about and learn about some history of the site. Also FYI shinh is pretty happy to add langauges to anarchy golf, but you are right that it would never be true freedom of langauge as there endless possibilities
@lyxal To each his own. I totally get that. I guess from code golfing in normal languages (without libraries due to the import cost), I get used to expecting a certain level of built in functionality to be provided and no more. I do enjoy golfing with restrictions like using brainfuck, or symbols only in Ruby, etc. but I wouldn't always want to do that
02:22
CMC: Given a byte, return brainfuck code which produces that value. List of known smallest solutions. Score is average result length, tie breaker is source.
Theoretical implementation has wrapping 8bit cells
02:40
I want to write a bash script that just makes a curl request to that link and then parses it
Might be easier to scrape the Edit page, which has it all in one element
@ATaco is it okay to hypothetically print the smallest by brute force even if it takes a while to print?
Sure, even if it takes longer than the heat death of the universe.
Worth noting that whilst the Halting Problem is proven impossible, it is not impossible for a limited subset of Brainfuck that is needed to solve for the smallest solution for each value.
I mean, you'd only need to consider like 100 loops max for this challenge before calling it a time out
You'd be surprised.
Some of the solutions rely on strange Semiprimes.
02:51
Well there'd still be a finite upper limit
Maybe 100 is too small but there'd be some maximum loop count that when exceeded is equivalent to a time out
I might elevate this into a full challenge, I think there's potential.
Would scraping the wiki edit page be valid then?
Not in a full challenge, it's a standard loophole.
39
Q: Generate Brainfuck for the numbers 1–255

MasonWrite a program that, for the numbers 1 through 255, prints out BF code that will produce the given number in some byte of the array, plus a newline. For example, the first four lines of the output could (and most likely will) be: + ++ +++ ++++ The winner will be the smallest: source code + o...

Oh goody, someone beat me to it
 
2 hours later…
05:22
Hello!
Could anyone who understands C translate codegolf.stackexchange.com/a/260921/116117 into python for me please
Chatgpt does a terrible job sadly
05:38
it's Extremely Imperative in a way that may or may not translate well directly
Thanks
and then with descriptive variable names :P
https://tio.run/##bVHbjoIwEH2mXzEhWYNL7QIqYqpfYnggSBWDYKDsJYZfX3emNbtitg@lc@bMmZlDPjvk@e1W1hqUp6om0/CatW32xYGwqqgP@jiFKwM8Nt/1Z9hCIA1EpLzXjVJjrKz3xecf9HEsqwI8g27GonTuCv4WQvkL/lMDkwmY6XYGTTe28FGKDk2IWo9MOSLY6cbtht9Xqe5dn3UvLa6mPPdFgcupy5ulPYvYuy1039ZEk2wgh9k5K2vvvSn3U3ZljrGJw0ky5lhnddHpbpeibZh2AhFFHCKRJBxiMV9yWIlwxWEtwiXHfCTmGC0ogqVYrIgVL4gVhBwSkRgucgzXasUxRoO0zdFT2wxIG9MwmFmaFvdH/GT@H342MJdQkl9UcvL9dGomVJ6ZGHzaw6RS9MJxLr3uPNel94CCdyMCsuE7V1V26G6zTu@3ebL@AQ
06:11
:)
06:46
CMC regex to match N as followed by N bs
In PCRE2
I got 11 bytes but can it be done shorter?
07:41
@mousetail well, the canonical regex would be a(?R)?b assuming it's a whole match
if you want to support zero-length matches you could use a(?R)b|
08:06
guys thoughts on this comment on the recent closed question:
"task is" does not require Quine-McCluskey. QMC merely yields the most keywordy headline, the most sensible approach, and leaves liberties anyways, so feel free to submit a QMC contender. — Roman Czyborra 12 hours ago
is this grounds for re-open or no?
08:59
@AidenChow I think so
 
2 hours later…
11:19
@RydwolfPrograms someday I might consider resurrecting Schrödinger's Uno
12:02
How do I repost chat message?
@PlaceReporter99 Simply paste its direct url.
E.g. posting just https://chat.stackexchange.com/transcript/message/63575732#63575732 gives:
22 secs ago, by Adám
@PlaceReporter99 Simply paste its direct url.
Yeah, you can generate a permalink to any message. Simply paste that link and chat formats it
1 min ago, by Adám
E.g. posting just https://chat.stackexchange.com/transcript/message/63575732#63575732 gives:
17 hours ago, by Sandbox Posts
0
A: Sandbox for Proposed Challenges

HippopotomonstrosesquipedalianWHAT ARE YOU SAYING!?! In this challenge, you must write a programme that accesses the chat room named "The Nineteenth Bakery" and outputs the latest message. Message format Here is the format the output should be in: Sender: Message For example: GingerBot: I AM BOT FEED ME BUTTER.

Is my sandbox post ready for the world?
12:12
^
The challenge is generally uninteresting, it's just reverse engineering the API. Too complex to really golf. Not a good fit for this site.
me when Rich makes me use "bright black" instead of "gray"
@mousetail Too complex to golf? Then it’s really a challenge!
That's not how it works
You could just use an HTML parser
12:23
It's just JSON data
The issue is just the complex multistep process for authentication
no golfing there
you need auth?
Please try to solve challenges first before posting them
There are also a ton of edge cases, like what if the last message in the channel is more than 100 events in the past? You'd need a extra request
hey, would yall mind helping me with something? I've got some code that I'd like optimized
does this chat room consent to web scraping?
def messageForLine(self, line: int) -> Optional[tuple[int, MonologueMessage]]:
    def messagesByLine():
        for message in self.messages.values():
            for x in range(message.height + 1):
                yield x - 1, message

    for c, message in enumerate(list(messagesByLine())):
        if c == line - 1:
            return message
that, specifically
12:35
@PlaceReporter99 Use the sandbox room

Sandbox

Where you can play with chat features (except flagging) and ch...
that function gets called several hundred times upon startup and additionally every time a monologue widget is moused over, and I suspect it's contributing to the lag
I wouldn't write it that way at all
I thought as much, but I'm kinda tired rn and not sure how to rewrite it
Store the results somewhere
Now you are doing O(n) per message making it O(n^2)
I considered that, but every time a new message is added it'd have to be recalculated
12:37
But you are doing the same calculations over and over again
and I can't do that nicely
@Ginger That's much cheaper
Just shift all of them up by X
yeah but I don't have a way to do the recalculation every time the message list is modified
I can't listen for changes to it
PLDI CMC What will the main chat room be called?
@Adám The Garbage Collector
12:38
The Garbage Collector
Was that already decided?
so kinda
in Programming Language Design and Implementation, Nov 18, 2022 at 15:47, by Ginger
name suggestion for the main chatroom: "The Garbage Collector"
We could do a poll on the new meta maybe
Just so everyone gets a say
a poll sounds better
but I like garbage collector
12:39
That does kind of sound like it would be the off-topic room for the site.
Plenty of on-topic rooms have similar names
I'm burning with so many PLDI questions…
@mousetail for things like, say, me directly modifying the messages attribute to delete a message, I'd have to recalculate it
but I can't listen to those changes and recalculate automatically
For deletion you just need to move all messages after it up
but how do I know to do that
I don't
12:41
Even just remembering the position of a message during a single recalculation would save a massive amount of time
my code has no idea that anything has changed and then crashes when it attempts to access a value that no longer exists
i also feel like pldi probably wouldn't be likely to need an off topic room
what's that proverb about keeping multiple values synchronized?
Use any state management library and it's easy?
for all the overlap it has with the cgcc community, there's already the sand trap
and i'm not under the impression that the other sites tend to have these issues :P
12:44
Arqade has one
ayyyyy edit handling worked first try!
Anyway I wrote this cursed regex that mostly matches only correct HTML ^((?:<([a-zA-Z]+)(?:[ \n]+[a-zA-Z]+(?:=(["'])[\-_a-zA-Z0-9 &]*(\3))?)*>(?1)?<\/(\2)>|[a-zA-Z0-9\-_\n &]+)+)$
I saw this one regex golf about matching only balanced brackets, with the hint that “this is impossible in the general case, but there are finitely many test cases” and that really annoyed me
My regex is recursive so works for any cases
Balancing parenthesis is also possible in PCRE regex
12:54
PRCRE regex sounds more like a cfg then
It was ECMAScript which is one of the least powerful modern flavors
PRCRE? Not PCRE?
Both python and rust are worse than javascript
one might say they're purer :p
There are quite significant security benefits to a less powerful regex engine
13:35
WAIT TOMORROW'S PLDI DAY
I knew I was forgetting a date
@RydwolfPrograms Sometime this week actually
@mousetail nothing is worse than js, even python
@Seggan In terms of what subset of regex they support
14:10
0
Q: Borders of a Rectangular Matrix

Kevin CruijssenAlthough it's done a few times as sub-challenge of a larger challenge, and we also have a challenge to remove the borders of a square matrix, I couldn't find a challenge to output the borders of a given matrix, so here it is. Challenge: Given a rectangular-shaped matrix input containing integers,...

@mousetail correct?
how do you defined correct html?
There is plenty of HTML that browsers it does not match but any HTML should be re-presentable in a a way this regex can match and no invalid HTML should be matched
It checks for matched tags mostly
so something like <a href="www.example.com">Hyperlink</a> should match?
If I added the dot, whcih I seem to have forgotten, the the attribute character class yes
lol
that explains it :p
<a href="www.example.com/gaming">Hyperlink</a>
doesn't match :p
Ah yes but <a href="www.example.com&47;gaming">Hyperlink</a> does
doesn't
<a href="https:&47;&47;www.example.com&47;gaming">Hyperlink</a>
actually, even <p>:</p> doesn't match
Ah so many charcters I need to include
<p>Hello, World!</p>
doesn't match
this is why we don't parse html with regex
14:24
The principle works
I just need to manually type every character that is allowed in a specific position
and I didn't include most of them because I only wanted to prove the principle
but that gets complicated and messy real quick
Can you give any test cases where it's not just a trivial missing character?
<p>Text</P>
You can use the flag to make it not case sensitive
Also I'm fine with not matching that since it would be trivial to normalize the HTML to fit better
how would I allow ! to be a thing?
because <!DOCTYPE html> needs to match
and <DOCTYPE html> doesn't match either
and what about comments
14:29
Yea I'm not handling comments
I think they could be possible
Has anyone here played Hypixel Zombies
I wanna try playing with someone instead of a random group
@mousetail and then what about style and script tags? Are you going to allow those to be parsed correctly?
This version handles comments properly: regex101.com/r/RkuKdB/1
Script should be doable also
Wait why would script tags be an exception
Don't they have the same syntax as ordinary tags?
Oh wait nvm
JS lol
<script>
    console.log("</script>")
</script>
14:31
other tags inside script tags don't count
@lyxal This would parse properly with my regex
<script>
console.log('<a>')
</script>
This would not
@mousetail you sure
It's invalid HTML
A </script> always instantly ends a script even inside a string
you can use that for some fun XSS
That's why JSON is not safe to include inside a <script> element
<script>
    // </script src="text">
</script>
that doesn't seem to close the script
nvm vs code bad
however
<script>
  // <script>
</script>
correct html
Yea exactly what I said
It can't handle opening tags inside scripts properly
This is also fixable but annoying
And then css comments are a thing too
14:38
Even <script><script></script> is valid HTML
No need for the comment
And same for style of course
<script>let string="</script><script>alert(2);</script>"</script> this is a fun XSS trick when a website inserts a variable into a string
And what about the self closing tags
They don't match yet
HTML doesn't have them
Self-closing tags are a XML thing
That's not valid HTML
<link rel="..." href="..."/>
14:40
That's not valid HTML either
At least not HTML5, that syntax is from XHTML
I've literally never seen a link done differently
I don't think I've seen a link done with / for like 15 years
@mousetail w3 schools html validator begs to differ
It's w3schools tho lol
Doesn't complain
@RydwolfPrograms sorry not schools, the main site
14:42
It's technically invalid
but many browsers do accept it
Maybe I should parse XML with regex instead
a lot less weired edge cases
Like <br> is written without the / but it does not need to be closed
There is a fixed list of tags that have this property
That's so wack why didn't HTML just go with self-closing tags
XHTML did
it never caught on
@mousetail it's technically syntax sugar
1329
A: Are (non-void) self-closing tags valid in HTML5?

Quentin (Theoretically) in HTML 4, <foo / (yes, with no > at all) means <foo> (which leads to <br /> meaning <br>> (i.e. <br>&gt;) and <title/hello/ meaning <title>hello</title>). I use the term "theoretically" because this is an SGML rule that browsers did a very poor job of supporting. There was so li...

So valid
<title>code golf - Borders of a Rectangular Matrix - Code Golf Stack Exchange</title>
<link rel="shortcut icon" href="https://cdn.sstatic.net/Sites/codegolf/Img/favicon.ico?v=663a978a681d">
<link rel="apple-touch-icon" href="https://cdn.sstatic.net/Sites/codegolf/Img/apple-touch-icon.png?v=53b5e16c7d06">
<link rel="image_src" href="https://cdn.sstatic.net/Sites/codegolf/Img/apple-touch-icon.png?v=53b5e16c7d06">
<link rel="search" type="application/opensearchdescription+xml" title="Code Golf Stack Exchange" href="/opensearch.xml">
This site uses a mix of both lol
Yeah I just realized I do the same by accident
14:45
@Ginger you made the sechat python module right?
I did
I copy-pasted some <link>s from Google Fonts that don't have /s but my handwritten ones do
the documentation isnt very helpful for sechat
I am quite aware :p
I'm going to fix it soon™
@RydwolfPrograms I always </br> because I started doing html when html 4 was still cool and html 5 was still new :p
And similar tags too
14:48
@lyxal By that logic it would count the / as a > leavng a extra > which is invalid
That's html 4
> On HTML elements that are designated as void elements (essentially "An element that existed before HTML5 and which was forbidden to have any content"), end tags are simply forbidden. The slash at the end of the start tag is allowed, but has no meaning. It is just syntactic sugar for people (and syntax highlighters) that are addicted to XML.
> addicted to XML
</br> with no opening tag
stop it. get some help.
Not my fault the textbooks I learned from were still on 4 :p
15:18
30 messages moved to Sandbox
Wait hold up TNB was an option in the list of rooms to move to
I'm going to try moving this to TNB
It did nothing lol
@Ginger how do I log out in the sechat module
@PlaceReporter99 I mean, you don't really have to
why do you ask?
I will log out of mine and create another account to log in to
Your session won't persist across multiple uses of sechat
Just provide it new creds and you'll be good
15:24
No need to log out
(although that's not 100% true; once you log in successfully with one email any password will work for that email from then on due to how I store cookies)
!!!!!!!!!!!!!
BIG SECURITY RISK
are you selling my login to Korean gangsters?
what
@Ginger Oh does it store them in a file
@RydwolfPrograms yeah, that's how I persist them
I pickle the CookieJar and dump it to a file
15:26
Ah. More advanced than chatbot.py which just makes a new session every time (CAPTCHAs yay)
15:40
@lyxal People's Republic of China Regular Expressions?
ಠ_ಠ
Does anyone want to guess the argument order for C#’s Buffer.MemoryCopy (a wrapper around memmove)? It’s not what I expected
length, to, from?
void* src, void* dest, long destSize, long srcSize
15:48
It throws if srcSize > destSize, which is kinda nice, but
that argument order is neither consistent with memcpy nor itself
Oh it might make sense if srcSize is optional
it’s not
That's super dumb
today in cursed code I regret writing:
def on_click(self, event: Click):
    if event.y < self.content_size.height and event.x > 0 and event.x < 8:
        assert self.hoveredItem != None
        assert self.hoveredLine != None
        if (not self.hoveredLine[1].sentByMe):
            if self.hoveredItem in [2, 3]:
                return
        if self.hoveredItem in [1, 5]:
            return
        self.post_message(self.GutterButtonClicked(GutterButton(self.hoveredItem), self.hoveredLine[1]))
16:20
Guess what this python code prints:

f=open(__file__,'w')
f.write('__file__')
f.close()
f=open(__file__)
print(f.read())
f.close()
Indent every line with 4 spaces
That will just print "__file__" but also wipe itself
16:57
TIL rust has arrays
I mean if it didn't it would probably have used [] for Vecs
There are arrays, slices, and vectors
17:14
Swift uses “Array” for the equivalent of C++/Rust vectors, and tuples for C arrays
Swift also has a hard cap on tuple size at 4096
struct swift_cant_see_me {
    char big_string[8192];
};
Rust has no hard limit on tuple sizes but many basic operators are only implemented for tuples upto a given length
Rust has a distinction between arrays and tuples
Tuples can contain multiple types
Tuples in rust are actually like math tuples
No Swift tuples can do that too
It’s just that a C fixed-length array is imported as a Swift tuple
Ah, so it just doesn't have a direct equivalent of Rust/C arrays
17:18
which means your char buf[256] is seen by Swift as var buf: (CChar, CChar, CChar, CChar…)
Also, tuples don’t have dynamic indexing built-in, you have to perform pointer arithmetic yourself
Interesting. I guess that makes sense in some ways, I'd figure it'd use an array tho
Swift has array-to-pointer and string-to-pointer conversion, so a C function with a const char* argument can take an inout CChar, UnsafePointer<CChar>, [CChar], or String
but a struct with a fixed array field stores the members inline
so a variable-size type like [CChar] wouldn’t be appropriate
ah makes sense
The ability for Swift to have numeric arguments in addition to types, for something like a FixedLengthArray<CChar, 256> is an oft-requested but far away feature
Ooh interesting. Rust doesn't have that either.
17:29
Rust does have const generics which is that
It was added kind of recently though
Ooh it does?
Yep, you can do struct S<const SIZE: usize>([u8; SIZE])
17:59
Though the combination of variadic generics and macros both coming very soon means it will be possible to implement this as #fixedSizeArray(CChar.self, Int)
> width = self.content_size.width - 9 - 2 - (len(str(message.stars)) + 1 if message != None and message.stars > 0 else 0)
I am a very good programmer
Okay I was gonna paste some yucky momentum chess code but I think you still win
var f_dir = Math.atan2((p_pos[0] + 4) - focus.pos[1], ((upside_down ? focus.pos[0] : 8 - focus.pos[0]) - (p_pos[1] + 4)) * (focus.img[0] == "w" ? 1 : -1) * (upside_down ? -1 : 1));
(⌐■_■)
I have out-yucky'd even JS
18:22
I have trouble with competitions like this because if I notice my code is bad, I typically change it right away
So I probably have some bad code, but I don't know where to look
18:46
I realize I rather like rusts ownership system and how nicely it maps to mutable objects, resource management, and locks, and I want to implement it for rol
problem is, Rol is a GC’d lang, so the memory model would be an extra bother
ideas on how to implement it?
autocorrect
@Seggan Basically everyting would be wrapped in a Rc<RefCell<T>>
I’m having a hard time imagining that :P
You'd basically have just rust but with the optional memory management always turned out, maybe with extra cycle counting
18:52
Rol is transpiled to lua
And lua has a existing garbage collector you can use?
I know literally nothing about lua
Lua is garbage collected
And you want to enforce the only 1 mutable borrow at a time rule?
Not exactly
I like the thing where variable mutability == structure mutability
Oh it's specifically about mutexes?
@Seggan This could be checked at compile time
18:56
well now that I think about it mutexes would have to go without
@mousetail i wasnt finished lol
Sorry
But also how the memory model maps nicely to resources
Like how bufreaders, when closed, are inaccessible
That's hard to do in a garbage collected environment, since you don't know if's still accessible elsewhere, and you can't guarentee a garbage collector will run at a given time
I could possibly make a Resource trait and have it special cased in the compiler actually…
00:00 - 19:0019:00 - 00:00

« first day (4489 days earlier)      last day (650 days later) »