« first day (2051 days earlier)      last day (2802 days later) » 

12:00 AM
@DJMcMayhem No, especially if the start article hasn't been wikifyied or the end article is an orphan
 
12:14 AM
@DJMcMayhem I've gotten to Programming in 6 clicks...
8 clicks to code golf if I counted right!
@DJMcMayhem: Canada -> Urbanization -> Modernization Theory -> Technology -> Computer -> Computer Program -> Programming Language -> Perl -> Code Golf
 
0
Q: Sum or difference of two powers of two

Conor O'BrienYour challenge, should you choose to accept it, is, given an integer K >= 1, find integers A and B such that at least one of the two conditions following hold: K = 2^A + 2^B K = 2^A - 2^B If there does not exist such A and B, your program may behave in any fashion. Test cases K => A, B 15 =>...

@Fatalize
 
@DJMcMayhem got 6! Tennis -> Tennis Ball -> Ball -> Golf Ball -> Golf -> Disambiguation -> Code Golf
@DJMcMayhem got 4!! Tennis @ Summer Olympics -> Golf @ Summer Olympics -> Golf -> Dismambiguation -> Code golf
 
That disambiguation page is really useful here. :P
 
^
 
0
Q: Sum or difference of two powers of two

Conor O'BrienYour challenge, should you choose to accept it, is, given an integer K >= 1, find integers A and B such that at least one of the two conditions following hold: K = 2^A + 2^B K = 2^A - 2^B If there does not exist such A and B, your program may behave in any fashion. Test cases K => A, B 15 =>...

 
12:24 AM
Milos_Raonic => NBA_All-Star_Celebrity_Game => Golf => Golf_(disambiguation) => Code_golf
 
@Downgoat Isn't that five clicks though? Takes one click to go from Milos Raonic to Tennis @ Summer Olympics.
 
Hm ok
 
@NewMainPosts for the 11th time, stop being ninja'd :P
Do I win? :P
 
@NewMainPosts soltuion: sqrt(n/2) :P
 
@Downgoat CMC: given n, calculatoe sqrt(n/2)
%:@-:, J, 5 bytes
 
12:30 AM
ches: n->sqrt(n/2)
pretty sure this is built-in in jelly
 
I think (sqrt)+(/)&2 works for same byte count
unless I mixed up precedence of + and &
 
No but it's two bytes in it
 
that makes sense
 
Halve and sqrt I mean
 
12:32 AM
@ConorO'Brien C: sqrt(n/2)
 
that's a snippet.
 
You said calculate, you didn't say do something with it
 
You know well what I meant.
 
@ConorO'Brien C: f(n){return sqrt(n/2);}
 
Will that work for float n?
 
12:40 AM
Argh I need help
 
@quartata Wow i just realized it won't work for n=m² m∈ℝ m∉ℤ
Add float at the beginning
 
How do I make a regex that matches something but doesn't match something else
I want to match all >'s but not match >'s if they're in ->
 
@Qwerp-Derp with magic
 
@ConorO'Brien Mathematica, 10 bytes: Sqrt[#/2]&
 
12:42 AM
@Qwerp-Derp (?!-)>
wait
no
 
@ConorO'Brien ?!
 
which flavour?
 
ummm
I have no idea
 
language?
 
JS?
 
12:44 AM
ah
 
I'm making it for Atom
 
Ahhh
 
replace all -> with , replace all > with whatever, then replace all with -> ? :P
 
WOAH dude
 
Wot
@ConorO'Brien How to do?
 
12:48 AM
actually
(?<!-)>
that works
 
Not supported in JS...
 
you said you were using atom?
 
Yeah
Which probs uses JS
You can inspect element so...
 
wait
atom the text editor, or something else?
 
Text editor built on node.js
 
12:51 AM
it works on my copy of atom
 
@ConorO'Brien Ah, it works
Thanks!
 
no problem! :D
 
1:08 AM
I still need help with regex
var a=input
out a>>
circ xor(a,b)->(!(a&b))&(a|b)
cond xor((a><),(a>>))->var b=a<+1+a>>/var b=a<+0+a>>
out b
# This is a comment
This is my code I'm trying to match stuff with
 
what are you trying to match?
 
This is my regex: (?<=var )(.*)(?=\=)
I'm trying to match all the var names
so a and b in this case
 
(?<=var )(.*?)(?==)
try that
 
Ah kule it works!
 
1:21 AM
Ummm one more thing
I'm trying to match the args for circuits only
 
# var x = y
 
And this is what I have: (?<=\()(.*?)(?=\)-)
 
is that a match
 
For regex
I want it to not match the commas, and I also want it to only match if circ is the first 5 chars
 
test cases plox
args look quite complex
 
1:23 AM
The same testcase as above
 
now to fix bug in interpreter
 
@Qwerp-Derp like, (a,b) in circ xor(a,b)-> and (a><),(a>>) in cond xor((a><),(a>>))->
?
 
Just the first one
 
oh
(?<=circ .+?\()(.+?)(?=\)->)
try that
 
"Invalid pattern in look-behind"
 
1:28 AM
really?
 
Ya
In rubular
 
works on atom
 
Rly?
 
ye. I'm testing these on atom
 
Oh
No commas?
 
1:29 AM
you don't want to match commas?
 
Ya
Is it possible?
 
idk
might be
might not be :/
 
@Qwerp-Derp Not entirely sure what you are trying to do but I think you need a proper parser
 
But this is atom...
I'm making atom syntaxy stuff
 
1:41 AM
What is this for? Syntax highlighting
Oh.
 
@Dennis There was a bug with the interpreter which I fixed. Please pull Woefully when you can.
 
And, as he gazed upon the screen / a sense of sorrow overcame him / and he pulled woefully
12
 
;_; y u do dis conor o'brien
 
1:58 AM
@ConorO'Brien I made a tiny calculator in 340 bytes of ES5 :) ethproductions.github.io/golf/calculator
4
 
@ETHproductions whoa
 
@Qwerp-Derp (^|[^-])>
 
Whoa what is that for
 
@Downgoat too late, and that matches only at beginning of string
 
2:00 AM
0
A: Sandbox for Proposed Challenges

Dopappcode-golfstring Make me a bad fade animation Your task is to, as the title discreetly suggests, make a bad fade animation of one word turning into a second word for yours truly. What exactly is this "fade animation" you may ask? To make a spectacular(ly bad) fade animation, you start with you...

 
@ConorO'Brien no?
 
@Downgoat doesn't it, with the anchors?
 
There's an OR
 
ah
well that contains the preceding character in the match
 
Well JS doesn't have lookbehinds do just use a capturing group
lookbehinds are porpoised for ES8 however
 
2:04 AM
@DestructibleWatermelon I pulled woefully.
 
@Downgoat he's not using JS :P
and what happened to ES7? :P
 
@Downgoat that makes me want to make a pun out of "reporpoised"
 
@ConorO'Brien ;_;
 
ES7/ES8 compatibility table: kangax.github.io/compat-table/es2016plus
Firefox is way behind on the exponentiation operator :-(
 
@Dennis thanks!
 
2:08 AM
@ETHproductions this is incorrect :(
 
@Downgoat What about it?
 
@ETHproductions rip :|
 
2:24 AM
I should make a hello world answer for woefully...
it will be hard, but I think I'm up to it... not sure about getting the golfiest solution, though
 
2:52 AM
that moment when you make a bot that tests a bomb (by having it run on itself), and it beats someone else's bot in a match...
 
Yes!
I uploaded my package to atom
 
what's it do?
something cool?
 
It's support for Logicode
 
rofl, just transposed something and then transposed it right back just to use the padding function on the first transpose: codegolf.stackexchange.com/a/92855/31343. still shorter than anything else... D:
 
night y'all
 
3:00 AM
Night
 
a bomb!
start:spl 0,{1
slt #200,#201
mov 2,start
jmp start
dat #0,#0
slows down the enemy before killing it
actually I should probably beef up those numbers
 
@Maltysen Pyth: where golfing off 5 bytes is "a lot". :P
 
at some point my scanner became a bomber wat
argh
now to attach this bomb to a program
 
@El'endiaStarman well its 18%... :P
 
3:19 AM
why does my bomb not work ;_;
IT WORKS NOW WOO
wait no it doesn't...
oh
 
Poll: Would you write bots for a KoTH whose controller (and therefore its bots) are written in a functional language (i.e not Java JS or Python)
Erlang is such the right tool for this it hurts...
And "universal" KoTHs with IPC never work out right
 
...did chrome change fonts on you guys?
everything looks so...different
 
@quartata I'm not great with functional languages in general, but I'm good at tinkering with boilerplates code. Given a working template to handle the basics, I might if the challenge itself is interesting.
 
@quartata if I actually participated in KoTHs, possibly. I agree with geobits. I'd also likely want a list of "helper" functions I could call
(common routines that submissions would likely need to perform, such as path finding)
oO
I just realized that I'm running chrome 32 bit
 
3:50 AM
is chat dying...
 
Dying = becoming less spammy?
@DestructibleWatermelon So how did your language even work?
With those backwards coordinates and all.
 
uh, they weren't entirely backwards
line wrapping was just messed up
 
Did it produce the right answer by accident somehow?
 
good thing noone had tried making any programs with line wrapping
@feersum nope
def move():                                                              #
    global cp                                                            #
    cp[0]+=stack_A.pop()                                                 #
    while cp[0]>=len(program[cp[1]]):                                    #
        cp[0]=cp[0]-len(program[cp[1]])                                  #
        cp[1]+=1                                                         #
        if cp[1]>=len(program):cp[1]-len(program)
you'll notice that this is fixed up now, but before
it had the while part and if part messed up
but the cp[0]+=stack_A.pop() was right the entire time, so it was fine
It didn't get found immediately because I hadn't used that feature yet. Thanks for letting me know though
did you see the shorter solution I made?
 
Only in the sense of seeing a wall of pipes.
 
3:59 AM
heh
I should do the 10*10 asterisks challenge
 
4:19 AM
ok, here is ten asterisks
| ||||||||| | |
|| |||||||| |
||| ||||||| |
|||| |||||| |
||||| ||||| |
|||||| |||| |
||||||| || |
|||||| || |
||||| || |
|||| ||| |
||| |||| |
|||| ||| |
||||| || |
|||||| || |
||||||| || |
|||||||| || |
||||||||| || |
|||||||||| || |
||||||||| || |
|||||||| || |
||||||| || |
|||||| |||| |
||||| |||||| |
|||| |
||| |
|| |
| |
| |
| |
| |
| |
| |
|| |
|| |
|| |
|| |
|| |
|| |
| |
| |
| |
| |
| |
|| |
|| |
|| |
|| |
now I just need to loop that ten times
this is gonna be a challenge...
 
0
Q: "Too broad" close reason applied to "restricted source" puzzle

agcAfter posting a rather specific, narrow, restrictive, one-language (well... one group of languages: POSIX-ey shells) puzzle, thats been "closed as too broad". Commentators then offered explanations inconsistent with the notion of "too broad": "challenges that are restricted to one language ar...

 
4:41 AM
starting to think I'm going about this challenge the wrong way...
ah screw it
 
5:11 AM
@quartata @Downgoat @ConorO'Brien youtube.com/watch?v=0PtLBAkk6Bc
 
Argh I need to make a successor function for Logicode
 
@Qwerp-Derp Successor?
 
successor of a is a+1
 
can functions take arbitrary sized input?
 
Yes
Hang on
Uhhh... yeah, they can
 
5:17 AM
if they can't, it's impossible
ok, good
well, what you want to do, in pseudo code is
if last of input==0, (output input except last of input, and 1, ) else output (this function with input all of input but the last part of input) and zero
that's kind of cinfusing, let me try again
funcname: if input[-1]==0, output input[:-1]+[1], else output funcname(input[:-1])+[0]
 
Ummm... we only have heads and tails
 
except last of input? that's not going to be easy
 
Introduce more stuff?
So we have both classics
 
@Qwerp-Derp No
we can't get the middle that way
 
@Qwerp-Derp just make it take input backwards!
 
5:23 AM
I'm not finished
Oooh yeah
 
oh wait, that won't work, will it
 
We also have ~ to reverse string
 
We can either add behead and betail
@Qwerp-Derp Wait what
 
Actually no scratch that
Going back from the start
We have < and > staying as-is
But we have ~ to reverse a binary string
So if a is 111011, ~a is 110111
 
Also btw what is supposed to happen for 001&1
 
5:25 AM
Ummm
 
@Qwerp-Derp That would work too
 
@ASCII-only Which would work?
The ~ thingo?
 
@Qwerp-Derp Yeah
 
TBH we can get rid of ?
Should we?
 
@Qwerp-Derp ?
Random is useful (sometimes, rarely), but it's not needed for it to be TC
If you bother making a large enough library you can use ? in something like random(min, max)
 
5:28 AM
True
Will you implement the ~?
 
@Qwerp-Derp Okay brb
 
Kule thx
 
@Qwerp-Derp BTW I may need to fix multibit operators
 
Is 001&10 001&100 or 001&010 or 01&10 or 00&10
 
5:31 AM
???
Uhhh
It should probably be either 001&010 or 01&10
I'm leaning towards the former
 
Okay
 
@Fatalize plz help, I was trying sum or diff with prolog, not working
 
@Maltysen example?
 
2^A + 2^B is 264; 2^A - 2^B is 264.
gives false
 
you can't have variables on the left side of is
nevermind
you can't have variables on the right side of is
but
you can't have an arithmetic expression on the left side either and expect it to work
is is for low lvel arithmetic really
 
5:37 AM
oh, it doesn't solve?
 
no
 
how do I solve stuff then?
 
You have to use library(clpfd) for that
and then 2^A + 2^B #= 264; 2^A - 2^B #= 264.
will add constraints to A and B
you can obtain values for them with label([A,B])
 
so there's no way with vanilla prolog?
 
well there's alway brute force :p
clpfd is pretty much vanilla at this point, though in SWI-Prolog you still have to load it for some reason
 
5:40 AM
oh, i see
 
@Qwerp-Derp Should be done now
 
@Fatalize I guess brachylog deals with stuff fine?
 
@Maltysen Another problem that you will have though after that is that you can't label variables that have an infinite domain in CLPFD
1
A: Sum or difference of two powers of two

FatalizeBrachylog, 23 bytes ,A:B#+.:2rz:^a{+|-}?,.= Try it online! This is much faster than required, e.g. this is still under 10 seconds on TIO. Explanation This is basically a direct transcription of the formula with no optimization: ,A:B The list [A, B] #+ Both A and B are greater tha...

 
so how does brachylog deal with infinite domains?
 
This was mostly implemented by the person who implemented CLPFD for SWI-Prolog
The reason this isn't implemented by default in CLPFD is because you have no guarantees of termination when the domain is infinite which Prolog people don't like
5 ?- [library(clpfd)].
true.

6 ?- [A,B] ins 0..264, (2^A + 2^B #= 264 ; 2^A - 2^B #= 264), label([A,B]).
A = 3,
B = 8 ;
A = 8,
B = 3 ;
false.
This works
 
6:01 AM
facepalm This is probably the worst ad I've ever seen.
 
@DJMcMayhem Where
 
The ad was "Learn Ethical Hacking", and it has a picture of a dude sitting at a laptop with a guy fawkes mask.
Somebody should be fired for that
 
Anonymous
@DJMcMayhem Wait you mean that's not how you code golf?
 
@Mego Of course not, DJ has a red striped hat, not a mask
 
If this company honestly thinks that Anonymous is the emblem of ethical hacking, WTF would I expect them to be smart enough to teach me anything worth knowing?
 
6:13 AM
Also: multi-digit inputs?
That shouldn't be too hard
 
@Qwerp-Derp Syntax?
 
Just input
It should support multiple digits
 
Also is it not possible with existing syntax
 
Not really
 
why not
circ in(n)->input+in(decrement(n))
Plus input is designed partly for TIO compatibility, partly for convenience, you can input at start of program
Unless you want to split by newlines
Or some other character
 
6:17 AM
Yeah, no, it doesn't work
With something like this
var digit=0+input
out digit
And with input as 111
The output is 01
 
Yeah
That's what is supposed to happen
You can either do 0+input+input or tell me a separator char for input so I can fix it
 
Why is that supposed to happen?
Isn't the output meant to be 0111?
 
Wot
 
input takes input 1 bit at a time
We can't make it do anything else since we supply input at the start
But I can split input into multiple bit chunks, like 0;111;10 or something, but IDK if you mind separator chars and IDK what separator char you want
 
6:21 AM
Why does input take one bit at a time though
I thought it was meant to take multiple bits
 
Because IIRC Logicode was originally designed to process 1 bit at a time
 
Ah
Uhhh... can we change it to multi-bit input now?
Or no
 
I'm fine but you haven't specified how that would work ;_;
If you want it to run on TIO you need to be able to specify multiple inputs at once before interpretation starts
Do I just split input by spaces
 
Input should probs be split by \n's
 
okay, brb fixing
 
Anonymous
6:25 AM
Newlines would make the most sense
 
We should probably talk in the LC room
Hang on... how many langs have we all made?
@Mego How many langs have we actually made?
 
Who
 
Like everyone here
 
50-100 I'd guess
@Qwerp-Derp btw done hopefully
 
Yus
I should probs get crackalackin' on the wiki for Logicode.
 
6:32 AM
56
Q: What programming languages have been created by PPCG users?

PhiNotPiLanguage-creation has become a popular activity on PPCG. A decent portion of answers, especially code-golf answers, are written in languages invented by the community. These are also languages that might be unfamiliar to this site's wider viewing audience. What languages (esoteric, golfing, or...

66 answers...
 
Ummm... I'm going to post a challenge
Make a program that, using +,-,*,/,sqrt,ceil and floor, output the numbers 1 to 100 using as few 1's as possible
 
@Qwerp-Derp So just replace every 1 with 2/2?
 
What do you mean
The only numeral you're allowed is 1
 
Why?
 
6:36 AM
> Using as few 1's
You don't disallow anything else
 
OK...
 
@Qwerp-Derp btw you may want to edit this sometime
 
Your task is to make a program that, using +, -, *, /, sqrt, ceil, ! and floor, output 100 equations that equal every number from 1 to 100 using as few 1's as possible in the output. The only numeral you are allowed in the output is 1.
@ASCII-only done.
 
@Qwerp-Derp BTW 1. I don't think it's that similar to logisim anymore, plus there are no strings, just lists of bits
 
@ETHproductions That is exceptionally cool :D
 
6:52 AM
0
A: Sandbox for Proposed Challenges

Qwerp-DerpThere is only 1 Your task is, given a number n, to generate an equation that equals to the number n. The catch is: you're only allowed the number 1 in the output. The operators at your disposal are: +, -, * and / sqrt (as s) ceil and floor (as c and f respectively) ! (factorial) You must a...

 
test
I'm back
 
The longest meta answer I have ever written:
0
A: "Too broad" close reason applied to "restricted source" puzzle

DJMcMayhemFirst off, I'm sorry that your first contribution to our site was so poorly received. I hope this doesn't discourage from posting more challenges. Writing good challenges is really hard, especially for users who are unfamiliar with our rules and culture. But, they are extremely important for the ...

 
@mbomb007 Hm, this works in trinket.io but not on IDLE. Strange
 

« first day (2051 days earlier)      last day (2802 days later) »