« first day (1500 days earlier)      last day (2022 days later) » 

12:09 AM
This is what that page looks like for me (and @MartinBüttner, I believe, since he's an owner):
Ah, neat. Thanks
8 hours later…
8:00 AM
@Optimizer "I think this can be improved"... I'd like to see that :D
@MartinBüttner me too :D
but I would be surprised, given the recent 22 to 17 byte golf I did
8:24 AM
good thing I didn't post the regex challenge yesterday... forgot to close a really important loophole...
.net regex should be considered a loophole
8:48 AM
regex should be considered as a loophole
9:00 AM
So much hate
9:22 AM
So much regex
9:38 AM
did I mess up the examples somehow? codegolf.stackexchange.com/questions/47562/…
edc65 says so
that's why I asking
let me try
3 2 20[1 2 2 3 4 5 6 6 6 8 9 10 11 11 13 14 14 14 15 17]
everything else seems fine
yep, that's wrong
edc65's last test seems wrong
1 hour later…
10:47 AM
Q: Adding Numbers with Regex

Martin BüttnerI want to try a new type of regex golf challenge, which will ask you to solve nontrivial computational tasks with nothing but regex substitution. To make this more possible and less of a chore, you will be allowed to apply several substitutions, one after the other. The Challenge We'll start si...

1 hour later…
11:55 AM
holy moly, 10 upvotes on 25 views.
Better give an answer quick for the HNQ then :P
overwhelmed ? want a down vote ?
@Sp3000 you should have been able to post an answer by now .. :P
@Sp3000 If I don't get any submissions in the next two or three hours I might post my unoptimised version for reference
... I only just woke up from a nap
Can JS regex even do it ?
11:57 AM
I don't think I used any .NET-specific features
okay, I did use a .NET specific feature, but it's trivial to work around at the expense of a bit more
12:05 PM
Hmm I'm a bit confused how substitutions work
So if I have, say, (.)(?=,)|(.)$ and the replacement is $2
Then for 12,34 I get 1,34?
How does that work? I'd expect 14,34 or something
each match is replaced individually
for the first match, the second alternative is never checked and hence the second group is empty
for the second match, the first alternative fails, so the first group is empty but the character is captured in the second group
... hmm k
not clear?
if you'd simply match (instead of replace), you'd get two matches: the first one matches 2, with 2 group 1 and nothing in group 2. the second one matches 4, with nothing in group 1 and 4 in group 2. this is exactly the information that is used for each of the two substitutions.
12:11 PM
Makes sense, but makes me think I might have to change my approach
@MartinBüttner Can you do multiple replacements in the one regex/replacement files in Retina?
e.g. one regex per line
ah no, not yet
Ah, no wonder
no just use separate files
and pass them all as arguments
sorry, should have updated the documentation
so echo "12,34" | Retina add1.rgx add1.rpl add2.rgx add2.rpl ...
12:31 PM
@Sp3000 updated the documentation
12:42 PM
I believe I am ready to post the Nano Core War KOTH, does anybody have any feedback?
A: Sandbox for Proposed Challenges

PhiNotPiNano Core War [WIP] king-of-the-hill This is an adaption of Core War, a programming KOTH dating back to the 20th century. To be more specific, it is using an incredibly simplified instruction set primarily based off of the original proposal. Background In Core War, there are two programs batt...

oh right, I wanted to read that
I believe the controller boasts several advantages over my previous one, mainly the use of a settings file.
@PhiNotPi okay, I've got a few questions
what happens when I try to address out of bounds? or is the memory cyclic?
Yes, it's cyclic. I should edit that in.
then, what is the meaning of a label in relative or indirect addressing?
12:58 PM
In immediate addressing, the number of the line is inserted, with relative/indirect addressing, the relative offset of the line is inserted, so that it refers to the same line.
so if I use a label, all three addressing modes yield the same thing? or will indirect addressing actually then read B at the label's address and then move to that offset from the label?
:( (?=(.),.*(.)&)(?:.*&)(.) isn't doing what I want it to - the stuff in the (?: ... ) is getting replaced
sure, it's still part of the match
if you don't want to to vanish make it a capturing group and write it back in the replacement string
do you want a,...&b to turn into something like ab,...&?
If you do "@label" it would insert the relative address of the label. Then, when it is executed, it would read the field of the label and move to that offset from the label.
I think you could state that more explicitly. at least that immediate and relative mode are identical when labels are used
(initially, anyway)
1:03 PM
Yeah, initially
It matters when the line is copied somewhere else.
yeah, true
@MartinBüttner Similar, but not quite. Variable length lookbehinds seem to have done the job though
I take it MOV only moves A and B, not the opcode?
MOV does move the opcode, I should definitely make that clear.
for ADD and SUB, which address is modified? B? both of them?
1:11 PM
Both of them.
I tried to explain that in the description of the MOV opcode.
k, could be clearer
and what is the unused memory initialised to?
What about the sentence below the list of opcodes?
It is initialized to DAT #0 #0
@PhiNotPi that didn't really imply to me where the result goes
@PhiNotPi is that mentioned somewhere?
I'll edit all these details in, in about two hours.
@PhiNotPi is there a limit to the numbers we can use?
1:23 PM
what does replacing empty regex with a string mean ?
insert the string at every position
so in his case 1,2 would turn into 987654321019876543210,987654321029876543210
I see
1:41 PM
Well I think user23013's just made everyone else's look a lot less impressive :P
Any further thoughts before I post this? Additional tags? Ambiguous rules? Obvious potential for abuse or loopholes?
wait for an hour before posting ?
@Optimizer Yes, in case someone is reading it.
No, just that I get back home and can work on it peacefully :P
I won $60 on Friday playing Magic, and then won another $110 on Saturday, a playmat and some sleeves, and free entry plus a bye to a larger tournament next weekend. It was a good weekend for my deck apparently.
1:51 PM
@Rainbolt of course
That's $20 entry fees, so $150 profit. No wonder some people play professional Magic.
@MartinBüttner Thanks, edited
so people have started paying mages for doing Magic now ?
@MartinBüttner Does Retina use g by default for replace mode? I can't tell if I'm implicitly using g or not
.NET doesn't have g. all replacement is done globally by default
... interesting...
1:55 PM
you'd have to limit the number of replacements manually, which Retina doesn't support yet
(.NET's Regex.Replace has a numerical parameter for that)
I see :)
Also HNQ #2, nice job
I just hope this won't only generate rep for user23013 but for the other submissions as well
I like the diversity of the approaches
I was waiting for the unary :P I'd assumed that's why repeats counted as exactly 10
I was considering making them count more, but the general idea was really just that getting rid of loops should in general be beneficial for the score, even if that needed several single steps
is he using variables in regex ?
2:00 PM
@Sp3000 and as grc shows, you don't need 10 steps for the unary conversion if you prepare the string
@Optimizer he? user23013?
sort of. he's using balancing groups, which are named stacks.
we should have a challenge to convert a subset of cjam operators in regex
forEach in regex
well, that doesn't make any sense though
I'll probably post a challenge like this to interpret Brainfuck at some point... I just wanna try it myself and see how hard it actually is
user23013 - score 8 (1 for each operation)
2:03 PM
A: Sandbox for Proposed Challenges

ZgarbWho's That Probability Distribution? code-challenge random classification Introduction In this challenge, you are given a list of nonnegative floating point numbers drawn independently from some probability distribution. Your task is to infer that distribution from the numbers. To make the cha...

no BF should be impossible without a loop
"should be"
You could try Code Golf SE as well. — ghosts_in_the_code 5 hours ago
^ wat?
A lot of people seem to misunderstand PPCG's scope :/
2:13 PM
That guy is a regular on PPCG I believe
Oh, maybe not
I must have run into him on Board and Card Games SE
not a regular , at least
can a similar approach be taken to subtract numbers too ?
2:46 PM
@MartinBüttner You around?
3:04 PM
@MartinBüttner I wasn't sure how to make the javascript snippet you provided work. I ran it in console on another challenge and nothing happened. Perhaps now that the challenge has a permanent url, you can provide instructions for dummies?
3:24 PM
did anyone find any pattern in that spiral ?
You mean beside the spiral pattern, right? ;)
even that !
I think Martin posted it in chat last week.
Something like "move this way X times, this way X times, etc...".
The diagonal bars go 1,1,1,1,2,2,2,2,3,3,3,3... etc
The horizontal bars go 1,3,3,5,5,7,7,9,9... etc.
The vertical bars go 1,1,1,1,1... etc.
I believe that's all of them
what do you mean by 1,1,1,1,2,2,2,2,3,3,3,3... ?
oh, the number of each, in order ?
3:30 PM
I mean the first diagonal is length 1. The second is length 1. The third is length 1. The fourth is length 1. Then it increases to 2, 2, 2, 2.
In other words, the length of the diagonal is equal to the spiral number.
The length of the vertical bars is always 1.
I can't think of a good equation for the horizontal bars on top and bottom
The tops go 1,3,5,7,9 and the bottoms go 3,5,7,9,11
yeah, but the hard part is to order the diagonals correctly ..
So.... (2 * spiralNumber) - 1 for the top and (2 * spiralNumber) + 1 for the bottom
ok . now the golden question, how to convert input to spiral number :P
lenFirstspiral = (1+1+1+1)+(1+1)+(1+3) = 10 // diagonals + verticals + horizontals
lenSecondSpiral = lenFirstSpiral+(2+2+2+2)+(1+1)+(3+5) = 28
@MartinBüttner Would you happen to know if any regex engines detect being in the same state twice, and auto-failing if so?
3:57 PM
33 bytes just to get the numbers -__-
4:20 PM
@Sp3000 well if not, then the .NET flavour is Turing complete after all ;)
@Rainbolt went to take a nap
? how so
@Rainbolt just tried it on your challenge, works like a charm
how many bytes ?
@Sp3000 because BF is Turing complete. if you can interpret BF, your language is Turing complete, too.
Oh right, I thought you were replying to my other question
4:23 PM
sorry, didn't get there yet :D
lol, actually I think my answer to that message could actually be the same though :D
no, I don't know any flavours that you can send into an infinite loop
A: Sandbox for Proposed Challenges

matsjoyceReflected binary is Gray Write: A program or function that takes a number n and converts it from binary to binary-reflected Gray code. A program or function that takes a number n and converts it from binary-reflected Gray code to binary. Rules n is an unsigned number where 0 <= n < 42949...

Hmm k... guess I'll have to rethink things a bit then
Anyone having any progress on the spiral ascii art one ?
I just gave up.
5:00 PM
hm, I wonder if Boost regex has a chance of beating user23013
it's the only one that has conditionals for the replacement string, so it doesn't need to prepare the string
but without balancing groups it seems near impossible to do it in a single replacement to begin with
Looking forward to Retina v2, featuring balancing groups, backreferences, variable length lookbehinds, recursion, fuzzy matching, conditional replacements and predefined characters sets for everything under the sun.
I'm not sure I feel like writing my own flavour
but patching in conditional replacements might be possible
Patch in length asserts too :P
(although, apart from the addition question and Calvin's minecraft challenges, I'm not sure how useful they'd actually be for 1D regexes)
@Sp3000 well no... that amounts to having to write my own flavour. writing my own replacement function based on the given flavour is a different thing, and much easier.
Ah k :)
5:10 PM
@Sp3000 they'd be useful for anything you want to match on a grid
Trying to think of other potential applications, but I'm not sure. Maybe as another way to match palindromes? XD
I guess it would help if you wanted to split a string into N parts of equal length
5:46 PM
@MartinBüttner Tried what? I wasn't able to accomplish anything by running that JavaScript in the console in Chrome. Nothing happened at all.
that's odd
firefox ?
I literally just pasted it into the chrome console and hit enter and it worked
I'll try again
likewise, if you type javascript: into the URL bar, then paste it and hit enter
$('#question pre').css('line-height',1)
5:48 PM
Oh, I see. It only affects code blocks
I tested it on a question with no code blocks
oh :D
Can a link be generated that people can just click on?
Like a bookmarklet I guess?
let me try
I got upto a point where I was able to print the whole spiral in around 60 bytes. but scraping was too much.
@Rainbolt hm no, stack exchange seems to remove links that it doesn't recognise as a URL
5:56 PM
Can a stack snippet affect the remainder of the page?
different domain iframe can't easily access parent page.
off to bed
Review time again:
A: Sandbox for Proposed Challenges

PhiNotPiNano Core War [WIP] king-of-the-hill This is an adaption of Core War, a programming KOTH dating back to the 20th century. To be more specific, it is using an incredibly simplified instruction set primarily based off of the original proposal. Background In Core War, there are two programs batt...

@MartinBüttner ^ I think I addressed all of your concerns rather thoroughly.
ah we had a misunderstanding earlier
when I asked whether ADD and SUB would modify both of them, I meant the arguments of ADD and SUB, not the A and B of the arguments
so both fields of B are modified, but A is unchanged
Well, do you think that it is much clearer now?
yes, the example clears that up
6:12 PM
I can post it now if you think it is ready.
looks good to me
I fixed some formatting, hope you don't mind
Core War is a real thing, this is a simplified version.
Chances are that no real Core Wars bot will work in this version, and vice-versa.
Nano Core War is too short for a title.
awww, two letters short
"The ..."?
Copy-paste non-breaking spaces?
I tend to think there's a reason for the limit and don't try to cheat my way around it :P
6:23 PM
The Nano Core War KOTH
sound good?
you don't need KOTH there (and I don't think it looks nice)
apparently somebody else agrees with you
@PhiNotPi nbsps don't work, I've tried
Q: The Nano Core War

PhiNotPiThis is an adaption of Core War, a programming KOTH dating back to the 20th century. To be more specific, it is using an incredibly simplified instruction set primarily based off of the original proposal. Background In Core War, there are two programs battling for control over the computer. Th...

It will probably be a while until somebody has a submission.
6:40 PM
I wish people would hover over the comment button and read the tooltip. "Use the comments to ask for more information or suggest improvements. [...]"
The tooltip does not say "Use the comments to ask for more information, suggest improvements, or post your random observations. [...]"
Q: Spiral Programming

RainboltWrite a named function or program that accepts a single integer N and prints (to STDOUT) or returns (as a string) the first N bars of the spiral below, beginning with the vertical bar in the center and spiraling clockwise outward. _______________ / _____________ \ / / ______...

At least I'm thinking :P
also this is really polite:
give me a solution for that sum — Oana Andone 6 mins ago
@Rainbolt oh right
well I think sometimes random observations are actually quite interesting... like here:
In general, at the kth iteration, the kth element in the array gets transposed to the 2kth position, and won't get touched again until the 2kth iteration, at which time it gets transposed to the 4kth position, ad infinitum. A prime doesn't get transposed until its turn comes along, so to speak, so all primes get shuffled forward. But we can easily make a list of the innocent victims simply by printing off the first element to be transposed at iteration 2 and each odd iteration. The list goes: 2, 3, 5, 7, 10, 11, 13, 21, 17, 19, 30, 23, 27, 25, 29, 31, 45, 42, 37, 54, 41, 43, 65, ... — Théophile Mar 5 at 13:34
6:43 PM
Why not discuss in chat?
because it might be interesting to people reading the question, not to people who are currently in chat
Well again I point to the tooltip.
It must be written that way for a reason.
Also, not everything in here is interesting to all people. And interesting observations are more on topic here than most of the random things we talk about in here.
Before you voice such an absolute opinion, are you sure I will only find comments in these two categories (suggesting improvements and requesting clarification) if I browser all of your comments on PPCG? ;)
No. I do not have a spotless all time history.
Can I evolve now, or am I bound to be the same guy forever?
@Rainbolt For your enjoyment:
You decided Mew isn't an "original"? Poor Mew... — Bigtoes 25 secs ago
6:48 PM
Bigtoes jokes are an exception to the rule #GeobitsHumor
That's a Bigtoes joke, though.
Ok. Same hashtag though
@Rainbolt What's the next form you'll evolve into? Hailbolt?
6:49 PM
@Geobits He should have done the names from the Honest Trailer vs the real names.
He seem seasonally appropriate right now (for this part of the world). Its basically spring here, so rain it is.
@Geobits You are in Texas no?
It's been raining or snowing here for almost two weeks straight.
God no. Florida :P
Haha ok
It's been sunny some days, rainy others. 75-80F the last few. Beautiful weather, really.
6:51 PM
I love the steady rain. It helps me sleep
Last night it was heavy. The kind where you can see sheets of wind blowing through the rain. I slept like a baby.
rainymood.com is fantastic
I use to go to sleep listening to it with the theme from Vertigo on repeat
and my computer would turn itself off, and then some times it would turn itself back on to hibernate, and I would be woken up by thunder
I only use rainymood if it doesn't rain at all for weeks... I don't think I've opened the site once since I moved to London :D
just found this site on reddit... I really like the design (and the idea as well, I guess): thecodelesscode.com/case/1
Sounds like a terrible master unless there was a bit of followup ;)
lol... I think he made his point though :D
That you should spend a long time sweating the small details? I guess, if you're sure that everything else is good to go.
7:04 PM
@Ypnypn just wondering, are you actually interested in heading this fortnightly challenge? I noticed that you edited and deleted the theme proposal, but I haven't seen you in the chatroom yet.
Wordlessly breaking a toe doesn't seem like the best way to impart that.
7:28 PM
So @Doorknob is gonna mod a third site. I feel him slipping away from us... :(
Bah, kids these days :D
7:40 PM
Fixed, since everyone complained. I'm not a Pokemon fan. — EMBLEM 3 mins ago
Let the shitstorm commence.
I don't really like how one of the comments on Nano Core War is a suggestion to change the instruction set more.
It's too late for that.
Holy horizontal scrollbar! codegolf.stackexchange.com/q/47582/2867
Micro Core War, however, could definitely be a thing.
And then Milli Core War
Is that a thousandth of a Core, or a thousandth of a War?
7:59 PM
@Calvin'sHobbies heh, funny language. is it Turing complete? :P
@MartinBüttner I imagine so. It can "maintain an arbitrary number of variables" and has a branchy thing.
yeah, I was mostly wondering whether the weird arithmetic would be limiting... but I guess you can set an unused large number to zero with V V V and then use X 9 to increment and X V 9 to decrement, which is really all you need
I'm hoping to see some questions on this site answered in it someday :)
Though it's pretty tedious, that may be a long shot :P
you should write a quine :P
The plumbing company is turning off water to the building for four hours tomorrow. Does that justify taking a piss on the grass outside of the back of the building?
8:16 PM
From what floor?
Only time I ever pissed out of a window was when I was grounded and didn't realize I was allowed to leave my room to go to the bathroom.
I pushed the screen out and my parents found it in the grass. I was like 10 years old
Old enough to know better anyway
Anyone here a SQL guru?
I have this condition WHERE MyTable.Date > ISNULL(@MyDate, '1900-01-01')
@MartinBüttner Do you think a DAG style challenge would be way too hectic? (I need something special for my 100th challenge.).
And I was thinking, is the call to ISNULL really necessary? Would WHERE @MyDate < MyTable.Date be identical, since NULL comparisons are always false?
Nevermind. They aren't equivalent. Ran the same query with that expression replaced and got different results
8:31 PM
@Calvin'sHobbies I suggested the possibility of that when we were first discussing these challenges on meta ;)
With a snippet that renders the DAG, I think it should be possible.
I remember!
you can use d3 in snippets
8:55 PM
There are 22,020,096 possible different nano-core-war programs.
9:05 PM
@TheBestOne I feel like there should be a lot more.
7 instructions ^ 64 length -> 1.2E54
@MartinBüttner Not for sure, yet. (and don't worry; I'll never abandon PPCG!) :P
9:37 PM
@MartinBüttner I don't understand your behavior in the Sandbox comments. Have you read this?
Seems like you are policing for people to clean up their stubs, but I'm not sure why.
FYI - I voted for the "delete it" post, but it isn't the top voted post right now, so I leave my stubs. Less work for me.
Errr, I just changed my vote because I just realized something
If I delete my post in all of its glory, then people who can see deleted posts have to see the entire post.
If I whittle it down to a stub, then they don't.
Seems like the best of both worlds would be to whittle it down and then delete it, but who is going to actually do that?
So I vote for whittling it down to a stub, because that's the next best thing.
10:08 PM
@Rainbolt that consensus is outdated
A: We Have a Messy Sandbox

Doorknob5. Delete posted challenges, keep abandoned.

the idea is to do both
edit down to reduce clutter for high rep user and delete, so a) your eye can skip over them more easily and b) sorting by votes is much nicer
@Rainbolt most people do that I think
(I've been doing it for ages, and judging by a lot of other posted challenges, some other people also do)
A: Sandbox for Proposed Challenges

ReticalityOne Code, All the Challenges Now, I always want to solve as many code-golfs as possible, so I thought "Why not solve them all at once?". Your task Create a block of code that solves another code-golf challenge on this Stack Exchange network. You must also make it so that when it is rotated (90...

10:27 PM
@MartinBüttner I see. We have two meta posts that ask the same question at different times and receive different answers. The older one needs to be deleted IMO, because it contains misinformation.
In any case one of them is a duplicate, right?
I went ahead and started a close vote on the older post since I need to leave now. Feel free to argue against it or vote with me. Link: meta.codegolf.stackexchange.com/q/1997/18487
@Rainbolt joined your vote

« first day (1500 days earlier)      last day (2022 days later) »