« first day (2089 days earlier)      last day (2758 days later) » 

9:01 AM
0
A: Sandbox for Proposed Challenges

Kevin CruijssenLife is a Maze: We take the wrong Path before we learnt to walk code-golfmazepath-finding Input: A maze containing the characters: -- (horizontal wall); | (vertical wall); + (connection); (walking space); I (entrance); U (exit). I.e. an input could look like this: +--+--+--+--+--+--+--+-...

 
9:14 AM
@Mego Also if all the strings are similar enough can't I just retrain shoco?
 
9:24 AM
I wonder how many of Conor and Tux's languages are worth submitting
Help @anyone are there any generic string compression methods/binary compression methods that work well with strings?
Also is it possible to obtain any better results than just converting from base 96 (95 printable + newline) to base 256?
And would there be any numbers/strings useful for ASCII-art
 
I think shoco might actually work well for an ASCII art language, since most of your strings will probably be short and consist mostly of typical ASCII-art characters like -|+_#.
 
@ASCII-only Using the minimum base the input string is representable in instead of always 96 produces a more compressed result.
 
@Zgarb Not really
There are hardly any challenges like that, plus those can be done with builtins already
 
Ok yeah, builtins may be better for those.
 
9:40 AM
@Emigna Minimum base the input string is representable in? How would the result be stored?
 
@ASCII-only I mean if you have the string "012", it's better to compress from base 3 to base 256 than to use base 96.
 
The result would be \x03<compressed> right?
 
you'll need a way to uncompress to a specific basen then
compress(3,256) <-> uncompress(256,x)
 
That shouldn't be too hard, the problem is with longer strings - what's the best way to compress say 1$$T$$n$$$'
 
maybe preprocessing the string replacing $,T,n with 0,2,3?
depends on how long the string is though
as you'll to replace the chars after compression in that case
I tend to do that quite often while compressing in 05AB1E
replace 1 or 2 high values with lower ones and replacing after uncompressing
 
9:53 AM
Something like \xFF<compressed list of chars>\xFF<base><compressed string> would work (I think), I'm not entirely sure it's short enough to be worth implementing
I could use a different starting quote so I wouldn't need the first \xFF, and I'm not sure how useful RLE would be as an alternate option
 
If you have enough 1-byte commands available, you could have different base conversion functions, 1 starting with special chars, 1 with digits,1 with alphabet or something like that. So base-3 in one method might be 0,1,2 while in another it could be $,#,% and then you use the one most suited to the task
 
That seems like it would be better just setting variables to different character sets and having a charset conversion operator
Would having a charset in the compressed string itself ever be useful?
 
10:09 AM
xkcd.com/1434 LOL'd (comic too big, didn't want a onebox)
 
10:20 AM
Halp I found this paper that I can't understand, it looks useful though ;_;
 
10:38 AM
Hi
 
11:01 AM
@ASCII-only They seem to have designed a space-efficient binary encoding technique for constant-length strings that has very fast decoding of arbitrary substrings. It's exactly as space-efficient as simply encoding each string as the binary representation of its base-n encoding, where n is the size of the alphabet.
 
11:18 AM
I'm wondering if it would be faster than encoding a single number in Python, or if it would even make a diffference
 
If you have a very long encoded string and want to access some short substrings without decoding the whole thing, then it could be practical. Otherwise not.
 
0
Q: According to C Programming

Shalinda KumaraWrite a program that prints out two stored numbers with the larger number printed first. Test your program on identical values. Modify it to display a suitable message if the numbers are identical.

 
11:56 AM
:D compression works, now I just need some character sets
 
:/ Why Bison don't have macros
 
@TuxCopter Because why would it need any
 
A lot of operator definitions for VSL are in this form:
| expr OP_PLUS expr                { $$ = OP(AST_OP_ADD, $1, $3); }
So it would be useful to have macros to shorten this to like
OPERATOR(OP_PLUS, AST_OP_ADD)
@ASCII-only I think there is an error in the specs, ~ is classed 'infix'
! is also classed 'infix'
 
@TuxCopter Yeah those are errors
 
@ASCII-only => is a possible cast operator but it's also the lambda definition operator... ?
 
12:04 PM
@TuxCopter Wait wat it isn't cast
 
> · => (cast) (1/0)
Wait semicolons are optional
 
@TuxCopter Fixed
@TuxCopter Yeah
 
Damn this is going to complicate parsing
 
No how
All that happens for me is I keep making mistakes and shift/reduce and reduce/reduce issues keep appearing
 
Because I don't know how to match a newline, a semicolon or EOF with flex's regex
 
12:10 PM
//bison
Separator:
  NEWLINE
| SEMICOLON
|
  ;

//flex
[\r\n] return NEWLINE;
";"     return SEMICOLON;
 
I think I found how
 
0
Q: The brain is smarter than you think

Joel ChristAs you may (or may not) know, the human brain is very good at filtering stuff out. Making things easier for us. Take the next sentence for example: Tihs is a vrey esay seetcnne wtih smoe lnog wdros and smoe smlelar wrods You read that pretty easily didn't you? Good! Now for the challenge: Wri...

 
@NewMainPosts You posted an hammered question ಠ_ಠ
 
@Emigna Is 4 bytes overhead (2 for delimiters and 2 for base and charset order) too much for a compressed string?
 
For a long string that's totally fine. I've usually had more overhead in 05AB1E on compressed strings.
 
12:18 PM
Would that be best for builtin compression though
 
Not sure if it's the best, but it seems quite competitive. 05AB1E was originally made for being good at base compression and has more overhead that that in any instance where the compressed string has non-digits
 
@TimmyD Huh
 
@Emigna Would it be better to have two types of strings, one with charset order and one without? (also how often would excluding base shorten the compressed string length compared to including it - is it worth adding syntax for as well?)
 
having a default charset order is a good idea
hard to say where the breakpoint would lie as it should be dependent both on string length and content
 
Whatcha talkin bout
 
12:24 PM
string compression methods
 
@TuxCopter What's up?
 
Your avatar...
 
Everyone else seemed to be changing it for the Halloween season. So, I opted to as well.
Don't you like it?
 
Yep
 
what's the green thing? bramble?
 
12:25 PM
It's a stylized pumpkin.
 
aah
 
Powerpumpkin? Or Pumpkinshell?
 
Pumpkinshell seems good. Same abbreviation :)
 
We'll go with Pumpkinshell.
 
Brb creating a shell named Pumpkinshell
 
12:34 PM
cmd /K title Pumpkinshell
 
Sure, but that starts a new CMD window. Eww.
 
Fewest bytes!
 
@Emigna What do you think is used the most (what order should numeric, lowercase, uppercase, whitespace and symbol go in for best compression)
@TimmyD Does $host.ui.RawUI.WindowTitle = "Pumpkinshell" work?
 
12:57 PM
@ASCII-only Seems dependent on what type of challenges it's primarily aimed at. Ascii-art very often use whitespace/#/|/- and so on, but a lot of challenges also use the alphabet.
 
Anyone wanna play arimaa?
 
1:24 PM
@ASCII-only Yeah. That's the usual method for changing a PowerShell window title.
 
@Qwerp-Derp Is it Turing complete / does it mean PPCG's defn of a programming language?
 
1:45 PM
Someone made logic gates in chess
 
wut
 
Lolwut
 
8
A: Golf all the 16 logic gates with 2 inputs and 1 output!

Destructible WatermelonChess/mediocre chess player in endgame, 70 pieces Inspired by that domino answer, I decided another game should have this honor. Note that I took a few rules for how the pieces move. Because I don't feel like studying the optimal moves for every situation, the rules for whites move is simple: S...

 
neat
 
Huh.
That's a pretty fascinating take on logic.
 
1:49 PM
Domino one is better :p
 
11
A: Golf all the 16 logic gates with 2 inputs and 1 output!

jimmy23013Go (game), 33 stones, 73 intersections If domino and chess are acceptable, then this. It can't be too golfy on a full 19x19 Go board. So I used small rectangular boards. The input is whether the stones marked 1 and 2 are present. The output is whether black wins. It uses area scoring, 0.5 komi, ...

Huh
 
Lemme make one in Arimaa :p
 
2:28 PM
19
Q: Are physical analogs of programming legitimate?

NonlinearFruitBy physical analogs, I mean solutions written via objects in the physical world. Specifically, I am referring to a couple solutions to this challenge (including my own and a couple others). Should we allow solutions like this? If so, where is the cut off? Should they publish a language spec...

 
;-; pastebin is down for me
 
2:44 PM
Spoooky!
4
 
Uh-oh
 
@Dennis Huh
 
@Dennis I have to say, I've really appreciated how you handled the recent suspensions. I've always felt like the gossipping/antagonizing wasn't ok, and you've emphasized our need to be nice :)
14
 
Anyone have a clue of transforming [0,1] to [1,-1] shorter than [1,-1](k%2) (in Python)?
 
I just reviewed the same answer in three different review queues! #FeelingAccomplished
 
2:47 PM
@Shebang k*2-1
oh, that's backwards
 
That would get [-1,1] I think, but 1-k*2 works yeah
Good catch!
 
@Shebang If you only have 0 or 1 as input, do you need the %2?
 
My input is from 0-3 unfortunately
 
@TuxCopter That's not the programming language "Chess".
 
2:59 PM
@TuxCopter Plus, the language isn't implemented yet, and I don't even think the specs are that great.
Martin could probably design a better one.
Or @Adnan
Since Adnan plays Chess at a professional level
 
He does? O_o
 
@Dennis Spooky icon.
 
So does swapcontext not work if the function returned?
I'm getting garbage :(
324768200
22128512
22128512
22128512
22128512
I know long jumps just record the stack marker so they don't work if the function returned
but I was under the impression that getcontext starts its own stack
nevermind I'm stupid
I never changed the state
No, still broken.
OK.... looks like this is more complicated than I thought...
 
3:15 PM
CMC: Stack based language compiling to brainfuck
 
You do know that the M stand for mini, yes?
 
Now it stand for mega
 
@Dennis ?
Ohhh I know the problem. The generator is overwritten when I restore the context the first time....
So the state is always idle and it tries to return twice.
 
woah dennis changed avatar
 
I revise my previous statement: You know your C++ code is on point when you find yourself saying things like "tries to return twice"
 
3:20 PM
I'll try. CMC: given a string of bits where every run of 0s has even length, replace the runs of 0s by repetitions of 10, and the 1s by 0s. For example, 0000100111000000100 => 1010010000101010010.
 
> tfw you just got here
 
I can't test it rn, but I think you could do :%S/{00,1}/{10,0}/g in vim.
 
Do we have a challenge about multiplying two integers?
 
Probably
 
> E464: Ambiguous use of user-defined command
 
3:25 PM
I can't find it
 
@betseg Yeah, it needs a plugin
 
@TuxCopter Too trivial anyway, in my opinion.
 
In some languages it can be interesting
 
Like brainflak?
 
And Brainfuck
 
3:28 PM
Turing-tarpits in general.
 
@DJMcMayhem thats actually pretty cool
 
Yeah, it's one of my favorites
 
we actually need a "add two numbers"
that way we can actually say "answer these two challenges with your language, and its definitely a programming language"
 
It already exist
 
I don't think so
 
3:32 PM
@betseg If you're ever looking for vim-plugns, a list of my favorites are here
 
19
Q: Given two numbers, output their sum

Dmitry KudriavtsevInput: Two decimal integers. These can be given to the code in standard input, as arguments to the program or function, or as a list. Output: Their sum, as a decimal integer. For example, the input 5 16 would lead to the output 21. Restrictions: No standard loopholes please. This is code-golf, ...

 
Speaking of which, the criteria of adding numbers and primality-checking have always been taken too literally, in my opinion. "Primitive recursive functions" is much more in the spirit of the rule.
 
@TuxCopter why don't they use the word "add" anywhere?
bah
 
¯\_(ツ)_/¯
 
@PhiNotPi I know, but it still provides a good "proof-of-concept"
 
3:35 PM
@TuxCopter I think that was the first challenge I ever answered in bflack
 
also, @PhiNotPi per yesterday's conversation, for scoring algorithms that are order-dependent (like Elo scoring), your algorithm may stop earlier than its supposed to
 
explain your reasoning?
 
because ELO scoring is gradual
the person who is in first stays in first for a while, even if he is supposed to be in last
(assuming they start with a high score)
 
@NathanMerrill I wanted to use add but it was too short
 
hmm... that is true... I need to relate how volatile the rankings are with how accurate they might be.
 
3:42 PM
well, the solution I think is to feed the scores in a random order to Elo
 
less volatile = more likely to be accurate, but the relationship is different for different ranking algorithms
that is true, to make it less likely a player is in a completely wrong order
This math problem is quickly escalating in complexity
 
heh
I have an uncle in statistics, and I've actually emailed him asking for his thoughts
I'll let you know what he says
 
This is probably some of the strangest C/C++ coding I've ever done. If you ever stumble across the manpage for getcontext and think "huh this sounds cool I bet I could use this to solve xyz," just say no
@NathanMerrill What's this about?
 
Identifying when to stop running a KoTH tournament
aka, getting some statistics that we are X% sure that this is the correct ranking
@PhiNotPi oh, I had another idea! What if we simply consider each player independently, and simply identify how accurate their position is?
 
Do we have data on previous KoTHs to see how the rankings changed towards the end?
 
3:48 PM
we're using random variables right now to simulate :)
 
Hm.
 
@NathanMerrill I'm not sure if this is an improvement, since the distance between two sets of rankings, is proportional to the average distance between each player's rankings (the way I am measuring it).
 
what advantage do we gain by considering them collectively?
 
Or maybe... we can identify solidified rankings 1-by-1, and thus determine which contestants we are least sure about.
That's probably what you are referring to.
 
I've actually considered in the past if there was any point really in ending KoTHs
 
3:50 PM
I'm saying, we take a player, get every position he's ever been in
 
For hard ones at least I think it would be more interesting to let new bots enter whenever they want. We already play musical green checkmark with code golf anyways :P
 
and perform the sum of squares on him
 
@quartata We're not talking about ending the entire competition, rather when to end a single run of the controller.
 
@PhiNotPi Ohhh.
 
we can get both his average position, as well as the standard distribution
 
3:51 PM
Well I feel stupid
3
haha
 
That being said, I don't generally "end" my KOTHs.
@NathanMerrill That's probably a good idea... might actually work out better for larger competitions.
 
On that point, the main problem I have with leaving KotH open-ended is that later entries tend to game the hell out of it by running a week's worth of analysis against the current entries to win. While it may be interesting to see what the overall equilibrium turns out to be, it's boring when the "winner" of every one turns out to be "I ran 50k simulations and this is what I got".
That being said, I generally don't give mine a hard-close either.
 
KoCP would have been too resource-intensive to leave running indefinitely so I was planning on closing it after 2 weeks
I kind of felt like that was too short though
 
neural network?
 
69*5*O => ++++++>+++++++++<[>[->+>+<<]>>[-<<+>>]<<<-]>>[-<<+>>]<[-]+++++<[>[->+>+<<]>>[-<‌​<+>>]<<<-]>>[-<<+>>]<[-]>++++++++++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>>[-]>>>+++‌​+++++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>>[>++++++[-<++++++++>]<.<<+>+>[-]]<[<[‌​->-<]++++++[->++++++++<]>.[-]]<<++++++[-<++++++++>]<.[-]<<[-]< :D
 
4:03 PM
-1
Q: Spaced-out numbers

Conor O'BrienGiven a list of N non-negative numbers, output those numbers with each left-padded by spaces to a length of N. (Alternatively, return a character/string list.) You may assume that N is greater than or equal to the number of digits of the largest number in the list. Trailing spaces are allowed in ...

 
@PhiNotPi so, lets say I have a list of average scores as well as their standard deviation. Obviously one possible ending condition is "The player in 1st has a standard deviation less than X".
are there other useful "ending conditions"?
also, how do you consider a player that is in 5th position on average, but has a standard deviation of 6?
 
Implying that there's a chance that the player could be either first or dead last (or anything in between)?
 
right
 
Of all the things I expected to cause segfaults in this code, the one I didn't expect was when I appended an element to the vector
One of those days when easy things break and hard things work the first time
@NewMainPosts What's up on the downvotes with this? Looks fine to me
 
4:21 PM
so I'm in this school that promises "independent project based learning"
 
@Dennis What happened to your avatar? Looks like you got sunburnt!
 
but because some people decided to sit on tables and chat all day instead of working
I'm now stuck in a classroom for half of the day
fml
 
@LuisMendo That would be the worst looking sunburn ever. If that's what it is, he really needs to see a doctor.
 
@LuisMendo It got spooky.
 
4:37 PM
How to read a number in brainfuck?
 
In base 10? Black magic.
 
@DmitryKudriavtsev What does fml stand for?
 
f*** my life
 
@DmitryKudriavtsev Ah.
I hate it when "those people" don't care enough about other people to think that perhaps other people want the opportunities that they seem to want to be without so much. :-(
 
4:51 PM
I'm not sure I follow. Is it not "independent", or what? To me that means that your work doesn't rely so much on others that it would matter what they were doing.
 
i{oi:} cat program in my new language (StackFuck) compile to the following bf program: ,[.[-],[->+>+<<]>>[-<<+>>]<]>
 
@Geobits A lot of other people were messing around, so everybody got punishment in the form of different lessons that didn't allow the messing around.
@TuxCopter You could've called it "BrainStack"...
 
¯\_(ツ)_/¯
 
or "Brain stuck"
 
I'm guessing it was more a calculated use of 'fuck' than an oversight, guys.
 
4:57 PM
@TuxCopter o is pop?
 
@Dennis Could you pull Jellyfish, please?
 
@betseg o is print, i is input, {...} is while loop, : is dup
 
@Zgarb thanks for adding the function names to the docs :)
 
@TuxCopter What condition does the loop run on?
 
Top of stack != 0
It's compiled to a standard BF loop
 
4:59 PM
@MartinEnder They really should've been there from the start. :P
 
@TuxCopter why does print [-] ಠ_ಠ
 
Because it's a stack
And if I don't clear the TOS it will bork the whole thing since push operations simply use +
 
@Zgarb Pulled.
 
Thanks!
 
I'm currently trying to find out whether that esolang contest I posted this morning accepts languages that were designed before the contest started, but if so, you should totally submit Jellyfish :)
 
5:04 PM
@Dennis Have you tried XORing your current profile picture with your usual? I think it would look even more spoopy, but haven't tried it.
 
@MartinEnder They write "we are especially interested in far-reaching designs whose relevance exceeds the time frame in which they were conceived", so maybe there is a time frame... we'll see.
 
5:26 PM
0
A: Sandbox for Proposed Challenges

Sunny PunAlphaGo..olf? code-golf (Slight paraphrased) Extract from Wikipedia: AlphaGo is a computer program developed by Google DeepMind in London to play the board game Go and is the first computer Go program has beaten a 9-dan professional without handicaps. In order to appreciate the Go art mo...

 
0
Q: String Calculator

KingKreeper17Assume you're writing in one method, (or whatever you call them) with 3 inputs. The first string, a character that contains a '+', '-', '*' or a '/' symbol, and the second string. Example in Java: public String strCalc(String str1, char symbol, String str2) { //code... } What it should re...

 
there's a new whatif!
10
 
:O
 
@NathanMerrill We should have a feed for that!
whois ro
 
I'd say we should only if a large majority of users want it. Show that's the case if you want it considered ;)
 
5:38 PM
Zzyzx (/ˈzaɪzᵻks/ ZY-zəks), formerly Camp Soda and Soda Springs, is an unincorporated community in San Bernardino County, California, United States, within the boundaries of Mojave National Preserve. It is the former site of the Zzyzx Mineral Springs and Health Spa and now the site of the Desert Studies Center. The site is also the location of Lake Tuendae, originally part of the spa, and now a refuge habitat of the endangered Mohave tui chub. Zzyzx Road is a 4.5-mile-long (7.2 km), part paved and part dirt, rural collector road in the Mojave Desert. It runs from Interstate 15 generally south to...
dafuq
 
eh, this one really wasn't that interesting :/
 
@TuxCopter Zzyzx road
 
@NathanMerrill No... :-(
 
Yeah. "Can we dig a trench?"
 
Yeah, what kind of lame What-If is this? The earth doesn't even get destroyed.
 
5:44 PM
Hello, could someone help me golf this answer? I have been working on it for about two months and I think I hit a dead end.
 
@feersum Or colonised by moles. Or Mars renamed "New Netherlands". Or the largest black hole in the galaxy created only a few light-years away.
 
@NathanMerrill Huzzah!
 
Yay. Another language that compiles to BF.
 
@ASCII-only Cloned the repo and it seems to be fine, but I don't understand your remarks regarding --repr and input. I grepped all files and I can't find a --repr switch anywhere.
 

« first day (2089 days earlier)      last day (2758 days later) »