« first day (4836 days earlier)   

2:10 AM
0
Q: Enumerate all matches of a regex

emanresu AFor this challenge, we'll be using a simplified dialect of regular expressions, where: A lowercase letter from a to z matches itself. (expr1|expr2) matches either of expr1 and expr2. You will not have to handle more than two operands, and you can assume there will always be parentheses around th...

 
Achievement get: First question
 
 
2 hours later…
4:11 AM
> For example, given (a)*(b)*, your output should contain all strings consisting of zero or more as followed by zero or more bs.
> , a , b , aa , ab , ba , bb , aaa , aab , aba , abb , baa , bab ...
ba does not match (a)*(b)*
@emanresuA
 
I'm dumb and I pasted in the wrong testcase output
 
lol
 
Fixed
 
5:36 AM
How do EDIT.COM edit 3.3MB file and not lose them even if I modify source file?
 
5:54 AM
@emanresuA So uh how do you feel about me posting a Python + Regenerate answer? Should it be CW because the challenge is basically Regenerate lite?
 
Go ahead, IMO doesn't need to be CW (and very few things do)
 
0
A: Sandbox for Proposed Challenges

alephalphaFind the rule of a cellular automaton code-golf cellular-automata game-of-life There are already many challenges where you are given a cellular automaton rule and an initial state and you have to find the state after a certain number of steps. This challenge is the opposite: you are given the st...

 
@emanresuA Okay. I will, but maybe I'll wait a bit to avoid discouraging "real" answers.
 
In hindsight, all the answers are probably going to be bruteforcers because of how easy it is compared to proper analysis of the regex(/AST)
(not that that's particularly hard with this subset and given the AST, but it's nontrivial)
 
... oh yeah. Didn't think of that.
 
6:03 AM
So go ahead :p
 
I was trying to figure out how the one answer so far could be so short :p
 
6:14 AM
Never mind, nice job Bubbler!
Well, here's my (ungolfed) AST version in vyxal
 
 
1 hour later…
7:32 AM
@l4m2 The EDIT.COM that ships with Windows 95 or later is probably an EXE in disguise, and it also probably uses extended memory as it can cope with files of up to about 5MB according to Wikipedia. (The EDIT.COM that ships with MS-DOS is just a thin wrapper around GWBASIC.EXE and is limited by conventional memory.)
 
@Neil I use debug.com after exit and see text in memory to 0x95xxx
It's WinXP
and debug.com says EMS not installed
 
8:00 AM
> [A good beginners' programming language is] Assembly!! lots of people started from it for a reason, in the end it all gets translated to low level so would be really beneficial to your dev journey. In my opinion you don't want to skimp on your education and learn to walk. Assembly will humble and reward your journey. If you don't want to go that low, probably C is the best starting point, that won't hide too much away from your keystrokes-composed-code with glue-up-behind-the-scene magic.
 
@emanresuA i dont know anyone who started learning to program using assembly lol
 
Hence the xkcd
 
 
2 hours later…
@zoomlogo okay zoomer
 
@Bubbler Awesome. Though, it would give a bad complexity.
 
I find it oddly fitting that both of you, DLosc and Bubbler, came up with a 214 byte Python answer
Now if one of them gets golfed we have to find an equivalent golf for the other
205 bytes by encoding atoms as (ATOM, 'a') with ATOM=4. — DLosc 3 hours ago
damnit
 
 
2 hours later…
11:57 AM
@emanresuA and its not even about golfing languages, afaict theyre talking about normal ones
 
wow that's pretty easy to get quoted then
0 upvotes and a mention in the SO blog
 
12:18 PM
so TIL you can submit crosswords to appear as the NYT crossword
and uh this has horrifying implications
10 stars on this message and I submit a gen alpha themed crossword to the New York Times
 
12:31 PM
TIL s.tk/golf redirects to code golf
104
A: What shortened URLs are available through s.tk?

Jeff Mercado This is a community-maintained list of publicly-known s.tk URLs. Please note that several links have broken or been removed in the past. Long-term stability is not guaranteed. Note: The SE team announced on October 6, 2017 that no more s.tk URLs will be created. General /: Stack Exchange /about...

my favourite has to be s.tk/StackOverflowSecrets
some interesting stuff there
 
12:56 PM
@lyxal going through and adding those builtins you suggested to PCL
 
:+1:
 
@lyxal lol I got rickrolled!
 
what's the difference between rotate and stack rotation?
 
rotate item v rotate stack
 
so rotate is a trinary operation
 
12:57 PM
oh yeah that rotate
 
yh
 
yeah it's a triad
 
right
 
yeah
 
I already have a stack rotation builtin :3
 
12:58 PM
so rotate (the triad) reorders only the top 3, rotate stack rotates the entire stack
rotate (the triad) is actually useful
comes in clutch a lot
 
might be worth adding some kind of shortcut syntax for pushing a builtin wrapped in a function
like thing@ map == { thing } map
 
I know just the keyword
*:
so in your example *:thing
 
why that :p
 
3 guesses
 
uhh
looks like a person after eating a lemon
 
1:11 PM
2 more guesses
 
extremely loose resemblance to my pfp during the most recent April Fool's
 
1 more guess
 
john
 
Ginger what is it I'm well known for?
 
oh, where do I begin
 
1:13 PM
what's the one thing I've spent 4 years working on
 
oh
:goof:
I am very smart
I'll probably use a trailing : tho, makes the parsing simpler
 
:+1:
 
/** Push every number in [from, to] (inclusive) */
fun range(from: Double, to: Double) = (from.toInt()..to.toInt()).toList().map { StackValue.Number(it.toDouble()) }
/** Push every number in [from, to) (uninclusive) */
fun upto(from: Double, to: Double) = range(from, to).dropLast(1)
we do a little not repeating ourselves
some of these are duplicates lol
drop/behead
 
1:34 PM
those are different
drop is first n items, behead is remove first item
 
oh, I implemented drop as removing the first :b
 
silly :p
you can implement behead as a special case of drop but not the other way around
think pianos and tuna
 
Any CPU use stack top as registers?
 
1:50 PM
what does pop do
 
@Ginger is that a question to me or l4m2?
 
you
 
r0<-r1, r1<-r2, r2<-r3, ..., r15<-[sp+16]
++sp
 
@Ginger haha good one
 
I fail to see how it's different from behead
 
1:56 PM
Pop from the stack you bingus
 
what
 
Discard the top item
Pop it from the stack
 
isn't that what behead does
are they the same thing or what
 
@Ginger behead removes the first item from a list
Not the stack
 
no list datatype
what lists d:
 
1:57 PM
Then you don't need behead nor drop
@Ginger then how do you have ranges?
 
they push directly to the stack
 
And what do you map functions over?
 
the stack
 
I hate to tell you but that's already been done
You're basically reinventing the wheel here :p
 
whar
as in a language that does that exists already?
 
2:00 PM
At the very least the map a function over the stack part
And ^ being the only map
 
don't care q:
this is my thing, I made it
 
Yeah well the original is my thing. I made it :p
Horrible language design decisions abound
 
good for you
I'm still doing this tho :3
 
No you're Ginger
 
don't care
maybe I don't want to be defined by a single string, huh?
 
2:04 PM
Technically speaking your definition can always be made into a single string
 
what are strings but lists of codepoints
 
Objects with pointers to the next character in the string where each character is represented by a value in a very large enumeration
A valid, albeit bad, implementation of a string
@Ginger also you can have behead and pop
 
that sounds like a (linked) list of (pointers to) codepoints :b
but arguing semantics makes my hair hurt
 
Behead removes from the front, pop from the end
@Ginger good :p
 
I have behead and betail for those
 
2:08 PM
> makes my hair hurt
 
@Ginger Well then you already have them
 
@mathscat what about it
 
@mathscat as it should
Means I make more money from selling hair pain reduction remedies
Everything I do here is an elaborate ruse to sell products really
For example, you might want to buy elaborate ruse insurance
To ensure you don't fall for elaborate ruses
 
No fucking way I just had to teach my AP gov teacher about how the constitution works
He had no idea that it went to the House if neither candidate for president gets a majority
 
Do you mean an amendment goes to the house?
 
2:19 PM
@Ginger Not at home and won't be for a while, but will do that as soon as I am
@lyxal No, for elections, mb
Didn't write clearly
Anyway, off to a state computer science competition now o/
Oh also my internship's over and I won a laptop, will talk about that later
 
@RydwolfPrograms o/
 
@RydwolfPrograms thanks! and gl with the competition
 
3:24 PM
0
Q: Infer pluses and minuses

Nicola SapThe problem Consider an equation such as      "3 ± 2 ± 4 ± 1 = 4"      and determine if there exists a sequence of pluses and minuses that makes it arithmetically correct. If it exists, exhibit it. For instance, [-, +, -] works in this case:      "3 - 2 + 4 - 1 = 4". Sometimes it's impossible: e...

 
3:35 PM
> Update on the Imgur migration, April 25th 2024
> As of today, we have rolled out the new image uploader to Stack Overflow, Metas, and the international Stack Overflow sites, and plan to transition chat to the new uploader early next week.
it's happening
they're actually making changes to chat
 
I won't beleive it till I see it
Hopefully this accidentally mitigates some of the bugs
 
unlikely d:
 
Once code gets spagetti enough it's hard not to accidentally fix a bug
 
heh
 
3:52 PM
If you play 5 chess games and have equal chance of win , lose, or draw, what is the probability of getting 3.5 or more?
 

« first day (4836 days earlier)