« first day (2523 days earlier)      last day (2318 days later) » 

1:00 AM
Can anyone here who knows C# InteropServices help me out with stackoverflow.com/questions/47973004/… by any chance?
 
 
2 hours later…
3:07 AM
TFW you discover Charcoal had a feature you wanted all along, it just needed documentation
 
 
4 hours later…
6:38 AM
0
A: Sandbox for Proposed Challenges

LyricLyIs it a haiku? code-golf string decision-problem So you want to create a haiku, but you're not sure if it follows the syllable rules for a haiku. I couldn't be bothered to write a proper blurb like I usually do, so you'll have to make do with this. Let's get stuck right in. Finding a haiku o...

 
 
1 hour later…
7:42 AM
@Neil s/Charcoal/any language/ (happens to me in 05ab1e sometimes)
 
 
2 hours later…
9:34 AM
@Mr.Xcoder s/any language/a language/ (for proper grammar)
 
 
1 hour later…
10:58 AM
0
Q: Simple stopwatch

MarkWestonThe algorithm is as follows: Get start time. Get current time. Compute difference. Print carriage return character. Print the difference in %T format (hh:mm:ss). Make sure to flush stdout. Sleep one second. Go to step 2. Behaviour after 23:59:59 may be undefined. Example in C, POSIX-compatib...

 
 
1 hour later…
12:19 PM

 Python Byte Shavers

A room dedicated to Python golfing founded by FlipTack and Mr....
Can any mod move the above conversation ^?
Or room owner ^
@Mr.Xcoder Add a please in there
 
12:33 PM
Is this possible
2 mines
 
@betseg I think this would mean one to the top left and one to the bottom right, but don't quote me on that
 
Nope, both diagonals work; I asked at gaming.SE's channel and they told me to guess and I guessed wrong :(
 
1:02 PM
the horror
 
1:14 PM
o.O
 
@ABcDexter ?
 
My compiler hates me.
> path/to/file.c(182): fatal error #2210: More than 100 errors, please improve yourself.
> If compiling a Windows program, make sure you use the /Ze option!
Pelles C.
 
@Mr.Xcoder that minesweeper
 
ah ok... The second one o.O was pretty much out of the blue :P
 
I think the mines are in the first two visible spaces going ltr->ttb.
@Mr.Xcoder Did I mess it up?
 
1:19 PM
@wizzwizz4 Perfect, thanks!
 
at this point, i would choose one of the tiles(preferable the left one) near the 1
and click
if boom, then :'(
else, :D
 
@wizzwizz4 yes :o
The guy on gaming channel said the same thing after telling me to guess
@ABcDexter 3 people said the same thing
 
1:34 PM
well, let's work out the probabilities
0.5 for each undiscovered cell near 1.
 
@ABcDexter Truly the most perfect approach to Minesweeper. :-)
 
0.5 for each undiscovered cell near 3(bottom most)
Now, what non-trivial deterministic solution do you get once you do the Maths?
 
@ABcDexter Hibernate the computer running Minesweeper.
 
imgur.com/a/LkxnR there are 2 valid solution
 
Then grab the hiberfile.sys and boot the computer up again.
Try something.
 
1:39 PM
haha, no
 
@wizzwizz4 android
 
Lol Python feeds already exploded in there :P... Already moved 5
 
If it explodes, shut down the computer.
Then rewrite hiberfile.sys and try again.
@betseg Root the phone, then add hibernation support.
 
@wizzwizz4 already rooted but too late for hibernation ;_;
 
Do you think my edit to the recent challenge is clear?
 
1:49 PM
@wizzwizz4 lame
find a minesweeper running on a retro system
and then an emulator which supports savestates
 
@NieDzejkob Retrocomputing: I do that all the time.
 
@wizzwizz4 It's hiberfil.sys. Without the e.
 
@user202729 You're right.
hiberfile is 9 characters.
Can I blame AutoCorrect?
 
You can name the hiberfile on Linux whatever you want, even emoji
Linux > windows confirmed?
 
I thought it meant "hiberfill"... because how it's named.
 
2:04 PM
@betseg It has been for a while.
In fact, Microsoft thought that it was the way to go.
Their UNIX clone, Xenix, was actually pretty good.
6
Q: How POSIX-compliant is Xenix?

wizzwizz4Xenix was the most popular Unix flavour of the 80's. However, it was designed before the POSIX standards came to be, and its final version was released shortly after the first POSIX specification was written. Many programs written for *nix-like operating systems since the 1980's conform to, and ...

 
 
1 hour later…
3:17 PM
What is the "edit this revision" feature used for?
 
3:32 PM
@user202729 It's like a rollback, but you also edit the old revision a bit
Let's say you golf your code and forget to update the Tio link. Then you edit the post, update the link but you accidentally delete your jelly code. You can edit the old revision and refresh the tio link, invalidating your most recent edit with the code removed.
 
0
A: Sandbox for Proposed Challenges

Mr. XcoderApproximate definite integrals using Riemann sums Background Left and right Riemann sums are approximations to definite integrals. Of course, in mathematics we need to be very accurate, so we aim to calculate them with a number of subdivisions that approaches infinity. As code-golfers, we often...

 
3:48 PM
@Adám once?
 
@Cowsquack When my father worked at IBM, they needed to translate between two code-pages. They wanted to do a plain lookup followed by indexing but both code-pages coudn't fit in memory at the same time. Therefore, the matter was transferred to IBM's Department for Seemingly Unsolvable Problems (i.e. my father) why managed to golf it by using the transformations and sub-ranges.
 
4:04 PM
Let's say I have two possible answers in Charcoal, one using drawing primitives, and one a port of a generic string-manipulation answer. I'm looking for an antonym of generic to describe the other answer.
 
4:17 PM
Challenge idea: draw a multifractal
 
+1 we don't have enough challenges
 
I'm hoping to get my Graphical Stars challenge ready in time for New Years'
 
is it in the sandbox?
 
0
A: Sandbox for Proposed Challenges

AdmBorkBorkGraphical Stars code-golf graphical-output Meta: this is currently pretty rough so I could get some ideas down quick. I'm also probably not using the right terminology as I'm not very familiar with graphs and graph theory. Looking for feedback. Take an input integer 50 <= n <= 300 and constr...

 
4:32 PM
does the orientation of the pentagram matter?
 
No, I don't think so. That's something I've been waffling on, but I think it'd be more interesting if it doesn't matter.
 
and do the edges need to be displayed?
 
I'm leaning toward "Yes"
 
does a chord have to connect two different points?
 
Well, it wouldn't be much of a chord otherwise, right? I think?
 
4:48 PM
okay, I was just trying to find an opportunity for golfing :P
"Randomly connect them with n/2 chords" so will the integer always be even?
 
Hmm, that's a point I hadn't considered. Sure, that makes sense.
 
also I think you need to provide exact specifications for the pentagram
 
Yeah, definitely
 
5:04 PM
is it allowed for two chords to be the same by chance?
 
I wouldn't see why not.
 
5:46 PM
hmm, idiomatic is near enough what I want
 
6:24 PM
CMP: recommend a board game you enjoy
 
What type of board games are you looking for?
Let's see... there's Small World, Pillars of the Earth, Dominion, Time Stories... some I can't remember the names of, etc.
 
Is there a more elegant way to prove that (n % 26) + 56 != n for all values of n (integer)? Currently I am saying that if n % 26 = n - 56 then n - 26a = n - 56 for some integer a, so 26a = 56, for which there is no integer solution
 
That seems pretty short to me.
 
well, there's always ((n % 26) + 56) % 26 = (n + 4) % 26 != n % 26
 
@Neil Thanks, that's a neat way of looking at it :)
 
6:37 PM
or there's always proof by computation as there's only 26 values to check
 
Yeah, I know it's always true but I was just curious as to what's the best way to prove it (I don't often write proofs which use mod)
 
Music I wrote over the past couple days: soundcloud.com/phinotpi/parapet
 
@DJMcMayhem I'm rather enjoying a board game called Tiny Epic Quest. It's in the Tiny Epic series, decidedly complex board games in very small boxes, and is rather fun for four players.
Of course, my favorite Board Game I Never Get To Play is an epic strategy game called Twilight Imperium. Average play time for a six player game is about 10 hours plus setup and cleanup.
 
@AdmBorkBork I've played TI3 a couple times before.
It's really good.
 
That's about it for me, too. I think I've played it only four or five times in the past four or five years.
 
6:42 PM
I've played it... twice? Maybe 3 times.
 
@DJMcMayhem settlers of catan
 
7:00 PM
@PhiNotPi I enjoy Dominion, but I don't know those other ones
@AdmBorkBork Holy crap. I have a hard time with games over an hour, and I personally probably couldn't stomach a game over 2 hours max. I'll check out tiny epic though
@Cowsquack That's a good one. My family played it tons growing up. The seafarers expansion is my favorite
Anyway, the reason I asked is because I had a 50 USD$ credit to a local game store. I couldn't figure out what to get cause I'm there were so many options I didn't know. I did end up getting Coup: Resistance, but I've got some left over
 
If you're playing in a gaming group (e.g., like 5 or 6 or more), I highly recommend Dixit as a "party game"
 
I have played that one!
I'm fairly good at apples to apples, but for whatever reason, I'm absolutely terrible at Dixit
@AdmBorkBork Fortunately, most of my friends are nerdy enough we can play more serious games in a large group rather than "party games"
 
Time Stories is a long (4-5 hour) cooperative board game (time-travel themed), it's good but there's relatively little replay value since it's mostly a giant riddle.
 
Pandemic is pretty good
Relatively short, too.
 
@PhiNotPi I actually saw that one in the store. It intrigued me, and I really like time travel. But I passed on it because I didn't know much about it, and it was slightly out of my budget
I didn't realize it was 4-5 hours though. That's kind of a turn-off for me
@AdmBorkBork One of my favorites. Already own a copy
I haven't tried any expansions though
Have either of you ever played anything in the One Night Werewolf series from Bezier games?
Hands down my favorite board/card game I've ever played
 
7:11 PM
Never even heard of it. :-/
 
Pillars of the Earth is... a "resource-allocation game" if I had to put a name to it. Medium length of 2 hours, medieval themed. The goal is to spend workers to acquire resources, spend money to acquire craftsmen, and spend other workers to do lots of other activities. Goal is to acquire the most victory points in 6 turns.
 
Heard of the party game Mafia?
 
@AdmBorkBork Love it too :)
 
@PhiNotPi So sorta like civ but smaller scope
 
@DJMcMayhem Oh wait, yeah, I played that once or twice at a Halloween party a few years ago. I found it rather lopsided, but that may have just been the group we were playing with.
 
7:12 PM
@DJMcMayhem Yeah, my favourite game with a big amount of people :)
 
@AdmBorkBork Which one, Mafia or werewolf?
 
Werewolf
@DJMcMayhem If you're looking for something with some real strategic depth, Castles of Burgundy makes Catan look like tic-tac-toe.
 
Certain rounds might be lopsided, but that's kinda up to chance on the cards people get and what things happen during the night. But of course, you can always balance it by adding or removing the right cards
 
How in the world did you answer this 37 minutes after it has been closed? o_O blames cachingMr. Xcoder 4 mins ago
@Mr.Xcoder Using the Force — Luis Mendo 52 secs ago
Lol 10/10
 
I greatly enjoy werewolf because 1) I like social manipulation/lying games a lot 2) It's easy to pick up, but some of the scenarios you can end up get really complicated, 3) endless mixing and matching of roles/expansions to keep it fresh and 4) since one round is only about 10 minutes, you get to play a bunch of rounds
And so far, every time I've played it it's stayed pretty fresh. I don't think there's any fool proof strategy, so it keeps you on your toes
 
7:18 PM
The only thing I dislike about Mafia (and my opinion is highly biased for that matter) is that I have never been the one of the killers, although I have played it many times
 
I recommend a Mafia spinoff called Bang, which is spaghetti western themed.
 
@Mr.Xcoder I absolutely agree. The nice thing about werewolf is that there are (usually) no villagers, so everyone gets something to do
 
Cool, might try it sometime
 
@AdmBorkBork Out of curiosity, when you say "Lopsided", do you mean too easy for werewolves, or too easy for townspeople?
 
I am looking for feedback about how floating-point inaccuracies can be handled here, and also looking for more appropriate tags (Note that the Sandbox post is really just a draft, I will add examples and stuff later). Any thoughts?
 
7:24 PM
In Bang, there's 1 sheriff, 2 deputies, 2 outlaws, and 1 renegade (if you have a 6-player game). Instead of doing a day-night cycle, players take turns drawing cards, which gives them things like ammunition. On your turn you can attempt to shoot any other player within range, which possibly takes away 1 of their life points. Nobody knows who anyone else is, except that everyone knows who the sheriff is.
 
@DJMcMayhem I don't really recall clearly. I just remember that one "side" seemed to win more often than the other. Like I said it could have been the group, too, because we were playing with like 2 people like yourself who had played dozens of games and three or four brand-new players.
 
When I say "spaghetti western", I mean that it's set in the Wild West, but the instructions are in Italian with English subtitles.
 
Anyone up for a game of Spyfall? Maybe too many people are gone during the holidays, though
 
@PhiNotPi That sounds similar to Coup, which has an element of BS to it (anyone can claim any role, but people can call you out if they think you're lying)
@AdmBorkBork Yeah, that could ruin it. I'd encourage you to try it again if that experience didn't leave a bad taste in your mouth. Generally, an experienced player is good to have to help balance out the roles/level of experience/number of players, so feel free to ask me for some good scenarios
5 players is generally the minimum, and I think 6-8 is the perfect size
 
Also a fun game to play (with creative people) is Story Wars. It's simple: there's a judge and two teams. The teams draw some character cards from a deck (imaginary/fantasy creatures and monsters), and they basically argue over which team of creatures would win in a fight. The judge picks a winner, teams rotate, etc.
 
7:30 PM
@PhiNotPi Like superfight!
 
Does anyone here play the card game Kemps? It's really fun if you are playing with the right people :)
 
@DJMcMayhem Haven't played that, but seems similar.
 
@Mr.Xcoder I think how you have the floating point precision is pretty well specified as is. Usually specifying accuracy to a certain decimal is sufficient.
 
@AdmBorkBork Is it overexplained? Should I trim it down to Your answers must be accurate to at least 3 decimal places?
Careful with the "distinct and consistent values for k" thing -- you could wind up with a situation where someone has "the left Riemann function" as one and "the right Riemann function" as the other, thereby negating any actual code golfing. — AdmBorkBork 4 mins ago
@AdmBorkBork Uhm, but consistent solves that, doesn't it?
 
@PhiNotPi It's the type of game where you have a serious argument about whether a 50 foot tall Hellen Keller or Darth Vader but obsessed with cats would win
 
7:35 PM
@Mr.Xcoder Mmm, possibly. Depends upon how they wind up formulating it. Take a look at the JavaScript answer on my ASCII Airplane Banner challenge.
 
Will do. Thanks. BTW, are you saying that I should choose truthy / falsy instead though?
 
That would likely be more consistent and less prone to a loophole.
@Mr.Xcoder That might be enough. See what others think, too.
 
Ok, I will change it
Thanks for the feedback
 
0
A: Sandbox for Proposed Challenges

Bruce ForteRhombus sequence Tags: code-golf math sequence Imagine enumerating the elements of rhombi that which grow [1],[1,3,1],[1,3,5,3,1],… (only odd numbers such that they align nicely). This would look like as follows, note that you always begin enumerating with 1: 01 1 ...

 
@Mr.Xcoder yes, I have played Kent. My friend and I came up with a signal that hasn't been discovered in any of the games in which we played as a team
 
7:57 PM
Oh I've played kemps, just under a different name
Its a pretty func game
 
8:09 PM
I love it, a fried and I have (as @Cowsquack said) a signal which hasn't been discovered ever since the fall of 2016, and we have played a bunch of games in the meantime
 
if I may ask, what is your signal?
 
@Cowsquack The rooster crows at midnight.
 
@Cowsquack Subtly swapping the middle cards while the teammate is looking at you
 
@AdmBorkBork what?
ours is tidying up the cards in the card pool so that they are orderly
 
Cool signal
For instance, the last round we played together against two other buddies, the score was 13 - 1 in our favour :D
I also like playing Rummikub with my family
 
8:17 PM
@Cowsquack Reference, here used as a Spy Speak (Warning: tvtropes link)
 
@AdmBorkBork crap, what have you done?!?!?
It's too late for me
 
I posted a warning
 
CMC: Write the shortest snippet of code that performs the mapping 1 -> 1, 2 -> 1, 3 -> 1, 4 -> 0, 5 -> 0, 6 -> 0, 7 -> 1, 8 -> 0, 9 -> 1 (mostly biased towards Python). snippet means that you can assume the input (which is an integer in the range [1, 10)) is stored in a variable x (so for Python for instance, in lambda x:<expression with x> you only count <expression with x>)
 
"a111000101"[$x] Try it online!
 
Oh lol... Yeah should have thought about that. Anyway, it might get shorter in Python
 
8:26 PM
hehe
 
A better format: [(1, 1), (2, 1), (3, 1), (4, 0), (5, 0), (6, 0), (7, 1), (8, 0), (9, 1)]
Haha, Python => 10 bytes for me! \o/
 
@Mr.Xcoder SOGL, 5 bytes
 
@dzaima Explain, please.
 
Compression.
 
@Mr.Xcoder How?
 
@DJMcMayhem xnor's tips on magic numbers and lookup tables: codegolf.stackexchange.com/a/41742/59487
I might get 8 bytes, though
 
@Mr.Xcoder APL, 10 bytes: ⎕⊃453⊤⍨9/2
 
@Adám Please, explain.
 
@Mr.Xcoder same idea as my answer
 
8:36 PM
@Mr.Xcoder input picks bit of 453 in 9-bit binary
 
I am bruteforcing ATM :D
Mine is 327>>~-x&1. I should be able to change the number and drop ~-
 
How the deuce do you index into a list in Jelly? Say I have ['a','b','c'] and want to do ['a','b','c'][2] to get 'c' ...
 
@AdmBorkBork Jelly is 1-indexed. So for 'c' you need 3
@AdmBorkBork
@Mr.Xcoder Jelly, 6 bytes. Beware of spoilers, Adm
 
Hah, that was just what I now came up with.
 
05AB1E, 7 bytes 12379s¢ | 05AB1E, 6 bytes 453bsè
 
9:46 PM
1
Q: Queue Our Decomposition

Wheat WizardIn this challenge I will ask you to find a QR decomposition of a square matrix. The QR decomposition of matrix A is two Matrices Q and R such that A = QR. In particular we are looking for Q to be an orthogonal matrix (that is QTQ=QQT=I where I is the multiplicative identity and T is the transpo...

 
@Mr.Xcoder That seems to calculate the Q value, you can probably find the R value pretty easily from there.
 
I know, fixing
 
CMC: output correct horse battery staple
 
> correct\ horse\ battery\ staple`
 
Also PHP, Jinja2, ...
 
Might be able to get shorter with Bubblegum, but not sure how.
Alright, Time to add os functions to Funky...
 
10:16 PM
@dzaima APL and J (and probably a whole lot others too): 'correct horse battery staple'
 
Both RProgN versions work with this, So does ARBLE.
 
0
A: Sandbox for Proposed Challenges

DonielFDivision Loops Given any positive integer supported by your language: Divide the input in half, rounding one up and one down. Divide either stack in half, then take the larger half and add it to the other stack. Ex: {2}{1,1}. You are allowed to completely exhaust a stack, i.e. continue dividin...

 
10:52 PM
The latest version of VSCode has a christmas hat on the Settings Icon.
 
@Pavel Uh, see the starboard :P
 
@WheatWizard Eh, oops.
 

« first day (2523 days earlier)      last day (2318 days later) »