« first day (2318 days earlier)      last day (2822 days later) » 
00:00 - 19:0019:00 - 00:00

00:07
@DJMcMayhem Sure
-5
Q: Simulate the classic childhood card game of war

ChristopherThe challenge: Randomly distribute 26 cards to players John and Mary. The game is played with a standard 52 card deck; no jokers! The random distribution of cards does not need to be uniform, but must be able to theoretically simulate any combination of hands. Simulate the game until there i...

OK, thanks
function! Test(type, ...) range
  normal! '[V']
endfunction

nnoremap <expr> f ":\<C-u>set opfunc=Test\<cr>".v:count1.'g@'
nnoremap <silent> F :set opfunc=Test<cr>g@
Why is it so unpopular?
@DJMcMayhem Do I put that in my vimrc?
Are people just so sore over the fact that I actually have a strict way for output.
00:08
Or in test.vim and source it directly, whichever one is more convenient
Being salty that golf-langs are better at code-golf challenges is really annoying
Anyway, the problem I'm running into is that fG and FG should behave the same, but they aren't.
Particularly when ran from the middle of the buffer
@DJMcMayhem IDK how to do that one.
I usually just do :e test.vim and then :w | source %
So what should I test.
00:11
Put a couple lines into a buffer, and then go to the middle of the buffer and see if fG and FG behave the same way
Narnia
They should both work as if you pressed VG, but one of them acts like Vggo
fG selects until start, FG selects until bottom.
Ugh. That's what I was getting too
Such a weird bug
@Phoenix Does it also leave your cursor on the same line as you started on?
00:14
Neovim has the same bug.
Does V?
So I think (not positive) that the issue is the first one sets '[ to 1 and '] to '[ regardless of where you run it from
@Phoenix By extension, yes
It's a vimscript bug, so V has no way around it
@Phoenix If you don't mind me asking, what version of vim are you on? And what OS?
@ATaco Two things, Does the A in your name stand for Australian/Aussie? and 2nd thing. A "<user> is typing" feature that shows if people who are using the script are typing
@DJMcMayhem I don't know how to check, and Ubuntu 17.04
:version
00:17
:version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 17 2017 12:13:35)
Included patches: 1-95
Modified by [email protected]
Compiled by [email protected]
Should be the latest one.
Last version is 8.0.0606
You don't have last 511 patches
D:
How to get
sudo apt update doesn't fix
Ubuntu's fault
It is, but is there a way to fix it without building Vim from source?
13
Q: How can I get a newer version of Vim on Ubuntu?

CarpetsmokerUbuntu's packages can be pretty old, but for some desktop programs (like Vim) I'd much rather have the latest version, as newer versions often fix various bugs. How can I get a reasonably recent Vim version on Ubuntu?

00:27
Probably not. Ubuntu isn't popular with it's latest version programs.
@DJMcMayhem first answers says there are 3 options, lists 2. Wat
Oh the first one is to wait
Ahhhh! Someone please explain "iff" to me! Why 2 "f"s???
@Christopher the A just means singular, and I might be able to make that userscript, but I'm not sure how just yet
@cairdcoinheringaahing It's a term meaning "If and only if"
@Phoenix why?!
What would you rather it be.
It's a clear, concise way if saying it.
00:36
just plain old "if"
Writing if and only if is too long, so we write iff instead?
@cairdcoinheringaahing That doesn't mean the same thing though.
if allows for other possible sufficient conditions.
iff specifies a necessary and sufficient condition.
a if b implies b can be true even if a isn't. a iff b implies b can't be true if a is wrong.
just go with a covfefe b! I know, crucify me
@cairdcoinheringaahing Unfortunatly we cannot, for chat has no downvote feature.
00:42
I prefer stoning. Besides, your proposal postdates its usage by more than half a century.
All we can do is send ಠ_ಠ
more than a threescore, even
@JanDvorak you have no way of knowing this but stoning was (and still is) a method used to kill openly gay men. And I just so happen to be an openly gay man.
It used to be used for a lot of stuff...
Ambiguous words
Scary
00:51
@JanDvorak yeah but even so...
I remember​ when I was reading dune and didn't know what the word "faggot" meant and googled it
@totallyhuman I remember reading the Hobbit and a sentence read "they threw the last faggot on the fire"
@cairdcoinheringaahing I wouldn't read too much into it. As a common TNBer, I can say anyone who provides constructive conversation is welcome
@HelkaHomba I wasn't (unless my English teacher shows up). Just making sure @JanDvorak knew
00:59
@cairdcoinheringaahing That was in fact FoTR, Book II ch. 3, not the Hobbit I'm pretty sure :P
@HelkaHomba same difference. Its like orcs and goblins are the same thing
They aren't :-D
@JanDvorak my parents have massively conflicting opinions but... they are!
0
Q: Stop NSA File Bananas!

JellyIt is the year 2084, and the future NSA has just been hit with the biggest virus of its kind. Bananas in it's files. Create a program to remove every instance of the text 'Bananas' from a .txt file, the NSA's most secure file type.

@TuxCopter Thanks
01:32
I did not hit rep cap
Neither did I
Anonymous
Most people don't. So what?
4 hours ago, by totallyhuman
hmm i might rep cap for the first time today
CMC (really more of a chat mini-puzzle): Given ! and exactly one other character, create a JavaScript snippet that returns the number 1 exactly. You may use as many of your two characters as you want in the snippet, but you have to use them both.
 
1 hour later…
02:49
0
Q: More efficient US state codes

Steve BennettAbbreviate that US state! was fun, but we learnt that efficiently abbreviating US state names is hard with the current system. Let's come up with an alternative state code scheme for efficient golfing. Your task: Write a function (or program) which, given a valid US state name (only the 50 n...

Is there an OEIS sequence for 0x1, 1x2, 2x3, 3x4, etc.
Anonymous
Probably
It's 2x triangular numbers.
03:18
user image
4
03:36
and before anyone comments no 2 links in 20 minutes of a barren chat isn't excessive IMO >:U
> Don't send messages just because the room is quiet. ... If the message wouldn't be missed if it were gone, it probably doesn't add anything.
I didn't send it because of that
I sent it because it's a fun image and I thought flawr would like it
I'm not judging. I totally agree that chatting should be allowed in chat :)
03:46
:)
some people don't though
@ETHproductions is this possible?
I can't seem to get it work with .
Anonymous
@LeakyNun I think that it's only possible with one or two charatcers
@Mego it seems to be possible with 0 through 9, as well as ".
!0
1
!!2
!!3
...
!!9
!""
Anonymous
@LeakyNun The second and third-to-last violate the rule that you must use !, and the rest output true, not 1
you're right
(the third-to-last was an ellipsis)
so it seems to be impossible for most
04:15
@LeakyNun Why is your name Leaky Nun?
Just curious
anagram of Kenny Lau
Oh yeah 'cause there was that trend of anagram-ing names a while ago
Well, +1 for a creative acronym
04:32
thanks
04:46
@Mendeleev Olympiad tomorrow!
Oh no
I might end up not going
O no
Y
I'm in a really big time crunch to get enough work done to proceed to 10th grade
RIP meetup
feelsbadman
05:11
@ETHproductions That's impossible for most characters, isn't it? Or do we get to choose the character?
05:29
Idea: Start a Kickstarter for a fully modular laptop. Have a standard motherboard spec, a case spec, use MXM GPUs, have a customizable BIOS that you can flash, have socketed CPUs, make it all open source hardware
06:23
CMC: does the given positive number have strictly increasing digits?
e.g. 134 -> true, 133 -> false
Anonymous
@LeakyNun Actually, 11 bytes: ♂≈;pX@dX♀<π
Anonymous
Wait I'm dumb
Anonymous
There's got to be a better way...
06:39
@LeakyNun MATL, 4 bytes: d0>p
07:14
@LeakyNun Jelly, 5 bytes: DI>0Ạ
beaten by MATL >_>
@EriktheOutgolfer because MATL doesn't need the D?
probably
134I would return [] in Jelly :(
Mathematica, 48 bytes: And@@(#2>#&@@@IntegerDigits@#~Subsequences~{2})&
you people and your golfing languages
@numbermaniac can you replace #1 with #?
does <@@@ work? I know next to nothing about mathematica
@LeakyNun Yes, #1 can be replaced, silly me
@LeakyNun not entirely sure how <@@@ would work...
07:22
I mean, < as a function?
I'm not quite sure how to make that work
@Leaky how would I do that?
I know next to nothing about mathematica.
alright
08:19
morning
or evening :)
hi @LeakyNun
08:33
@DJMcMayhem for the "how high can you count" challenge, do <CR> and ^M count as different keystrokes?
08:57
ok for this I have this atm
so the dashes are the ones you still need to work on
No they're numbers instead of strings
I could add more to Vim, but I am not sure what exactly would count as a snippet
and I'm unsure about the keystrokes thing ∧∧∧∧∧
why does neim have to do so werll :(
I like the last one because I spent so long on the Wolfram Language features haha
Okx
Okx
09:33
@ASCII-only Because I like 1-byte variables preinitalised to useful values :3
@LeakyNun 05AB1E, 4 bytes: žhså
@Riker I've had an even worse incident: All the spoons I got had these slits, while all the forks did not! Somebody should get fired in that factory.
10:00
0
Q: THE Magic Hexagon

flawrThere are many magic squares, but there is just one non-trivial magic hexagon, as Dr. James Grime explained. 18 17 3 11 1 7 19 9 6 5 2 16 14 8 4 12 15 13 10 As it is done in Hexagony this is easiest written as just one line, by just reading it row by row: 18 17 3 11 1 7 19 9 6 ...

10:21
0
Q: Four-Four-Four-Four!

darrylyeoThis is the sequel to one of my previous challenges, Three-Three-Three! Write a program (or function, or snippet) that takes no input and produces an output according to the following four Conditions. Both the program and the output must be written such that: Four distinct characte...

10:52
@NewMainPosts BUTTER
(closed question shouldn't be oneboxed by nmp)
lol he hasn't eaten the butter yet
or was I late?
@NewMainPosts FEED HIM BUTTER
Why butter?
I assume in reference to this:
Dec 22 '15 at 22:34, by New Sandboxed Posts
HELLO I AM BOT FEED ME BUTTER
Although deleted challenges sometimes get edited out for NewMainPosts, I don't see a reason to edit out closed posts, as some of them will be reopened and they could do with more views
Admittedly that one's a duplicate, so much less likely to be reopened, but it does happen
Anonymous
The only valid reasons to edit a feed bot's message is if the post it is oneboxing has recently been oneboxed, or if the post is spam or rude/abusive and gets red-flag deleted
Anonymous
11:07
Anything else is unnecessary, and, in some cases, borderline vandalism
Okx
Okx
ahem riker
should make consensus
11:25
@Dennis Perhaps I worded it confusingly. You get two distinct characters, one of which is !, and you can use as many of each as you need (as long as you use at least one of each). It is possible.
@LeakyNun ^
So for example, !++!!+!++!+ might be a valid solution if you chose + as the other char (note: this does not work)
 
1 hour later…
12:52
@KritixiLithos CR and ^M are the same keystrokes
what I meant was CR => enter key, and ^M => ctrl + m
are they still different then?
No, they're literally the exact same thing
Vim can't tell them apart
(gvim can though)
13:07
Wait when you delete a answer you don't lose the rep from it!? Why!?
you do you just have to wait a bit
Ok good
@EriktheOutgolfer Yep just lost the rep
13:45
@flawr ikr?!?!
"covfefify a string" is now the 15th most upvoted question on ppcg
sigh
I honestly expected it to get 20-40 upvotes
just me or is this unclear?
264
Q: Draw with your CPU

bebeI have come across an article where students used network traffic to draw their university on the country's IPv6 graph. [image] Your goal is simple to tell, but hard to implement. Draw the text MAIL (as it is one of the few words that can be read on a 1D graph) on the CPU graph. It should look...

specifically about what qualifies as the word MAIL
@totallyhuman and it's 7/8th if you don't include locked code-trolling and popcons
@Riker I agree, that bit is unclear
"looks like" is vague
13:58
^
14:17
It does give a more rigorous description:
> You must follow the linearity of the example. (For M it looks like this: base %, then sudden increase to the specified max, fall gradually to a lower %, rise back to max and sudden drop to the base % again.)
but it is still subjective what is close enough to this to count
14:43
0
A: Loopholes that are forbidden by default

Guido LeendersUsing a language implementation or specification under influence of the user See Covfefify a string. This might been solved in 45 bytes using: select covfefify(:a) from dual@datadictionary This does not use of previously shown loophole such as: Using a made-up language specifically designed...

15:20
YADFPL has been deleted D:
Okx
Okx
What?
yet another what?
why is the starboard just links
15:40
Yet Another Documentation For Programming Languages.
I used it to learn some C
@ETHproductions I know. It's still impossible methinks.
@LeakyNun Not impossible.
@Dennis impossible for most characters
You get to choose the second character.
oh...
16:30
oh
CMC: all divisors of a given positive integer larger than 2
Jelly, 2 bytes: ÆD
05AB1E, 1 byte: Ñ
@LeakyNun all divisors larger than 2, or integer larger than 2?
16:33
@DJMcMayhem integer larger than 2
I believe that's Z\ in MATL, one of my few contributions to the language
Or maybe Z/, I don't remember
you don't remember your contribution, lol
Yeah, it's definitely Z\ Try it online!
@KritixiLithos Oh btw, I've got some V news (2 different things)
1) I've found out the stupid G, gg issue with the reverse operator. It's a stupid vim bug, ugh
And 2) I've got a new command I'm very excited about. I don't have a name or mnemonic for it, but it'll replace a line with the number of matches of a certain (compressed) regex
> (compressed)
compression in V? can't believe it
number of matches, interesting
16:38
Only regex compression
yeah
string compression isn't quite worth it imo...
I've thought about adding it
that might be useful for unary number manipulation
Like using /../g to perform floor division
@KritixiLithos The biggest thing it'll be useful for is . V is terrible at output a Truthy/falsy value
how is truthy/falsey defined in V?
16:41
It isn't
There aren't conditionals
then you have to add conditionals
Or just go with 0, 1
consensus is that it should act like truthy in an if-like construct
The closest thing to Truthy/falsy that V has is non empty line/empty line
@EriktheOutgolfer 0 and 1 works well enough since there is a do n times command
And it's pretty standard
@KritixiLithos Any idea for a mnemonic? Maybe <M-/> since it's related to searching? Probably depends on if we want an uppercase variant or not
Uppercase would probably be replace buffer with number of matches
@fergusq Hi, I had a look at your mafia implementation in Röda after it appeared in my GH feed. What does the path @http.handle "/cmd/new used for? Is it the path from locahost:port/ or is it the host computer's path? (I don't really understand anything to do with servers and stuff)
@DJMcMayhem then what would lowercase be? replace buffer with matches?
oh wait, it's the difference between buffer and line
16:49
Yeah
lowercase --> line; uppercase --> buffer
That would be nice because it's similar too <M-s> and <M-m> (not exactly the same, but similar)
Mathematica question: why does DSolve[{y'[t] == 1}, y, t] return {{y -> Function[{t}, 1]}} and not something like {{y -> Function[{t}, t + C[0]]}}
Found the issue... I somehow assigned y'[t] = y[t]
1
Q: Lights out, 7-segment version

kyrillGiven a 7-segment display with some segments switched on and some off, find a sequence of digits (0-9), such that after toggling the corresponding segments for each digit, all segments are switched off. Example ━ ┈ ┈ ┊ ┊ ┊ ┃ ┊ ┊ ━ [3] => ┈...

@totallyhuman range(1,n+1), no need +[n]
if n%i<1
ey 42 bytes
@DJMcMayhem do you know the difference betweeen set and setlocal in vim?
-1
Q: Output as many characters as possible!

zeveeOutput as many different characters as possible, in as few different characters as possible. The two scoring criteria are: Number of different characters outputted to length of program, and Number of different characters outputted to number of different characters in the code You can not use b...

@KritixiLithos @http.handle is an annotation that specifies that the method is a handler that handles all request made to a certain path. Like, if I go to http://localhost:25565/cmd/new, then the request is given to the specified method (handleNewGame), which creates a new game session.
17:17
@NewMainPosts boom hammered
The server has a number of commands (like /cmd/new) that are called from the client-side javascript.
The implementation is in its early stage, so it doesn't do much yet. Some pieces of the code don't do anything meaningful.
@fergusq ah, that makes sense
this is also the first time I'm seeing maps and lists and <<>> templates
<<>> is a pretty ugly syntax, but I couldn't figure out any better. <> is too hard to differentiate from less and greater than -operations and [] is used for subscript.
you ever apply anything you learn golfing in production work?
CMC: Name the most obvious bug on a popular app/program/site/service (one where devs are paid to fix bugs and should be aware of it) that amazingly has not yet been fixed.
Okx
Okx
17:28
@HelkaHomba PPCG on SE
10
That's subjective :P
also hi th.
@HelkaHomba plural bugs
@Downgoat setlocal only sets the setting for the current buffer. Set sets it everywhere
17:30
oh, so with autocmd FileTime I'd probably want to use setlocal?
@LeakyNun Have a specific example?
@HelkaHomba just search the meta for plural bugs
5/7 might join again.
- sort-by:votes seems like a good resource.
this is a nice old FR, too: meta.stackexchange.com/questions/97876/…
@JanDvorak I doesn't have to be about SE. Could be anything. (I was thinking of how the CBS News app keeps playing audio without a notification after being closed.)
17:37
Good ole hypersensitive email validator: meta.stackexchange.com/questions/92094/…
@HelkaHomba but, Meta.SE is a treasure trove :-D
Ok, maybe not a treasure trove, but it's the one I know of :-D
Google products have no bugs, only features some people may not like. Those people who don't like the features are always in the minority, no matter how many of them there are.
@Downgoat Actually, I've never heard of that autocommand before, so I have no clue
Okx
Okx
@LeakyNun (bit late) Neim, 1 byte: 𝐅
@Okx why does factor return divisor?
how do I do the factors then?
Okx
Okx
?
@DJMcMayhem wait shit mean FileType >_<
17:42
500 -> 2 2 5 5 5
Okx
Okx
Oh
There's 𝐮 for uniqueify
I don't think that's what I want
Okx
Okx
Oh wait
500 -> [1 2 4 5 10 20 25 50 100 125 250 500] for me
@JanDvorak Like having context sensitive volume buttons when 99.99% of the time you only want to alter media volume >_>
17:44
@Okx I mean, how to find the prime factors
I have media volume pinned to zero, but I'd like to toggle the ring volume between zero and hero maximum
Okx
Okx
@LeakyNun Ah, you have 𝐏 (for all factors) and 𝐔 (for unique prime factors)
@Okx oh thanks
Okx
Okx
Why? You didn't ask for prime factors in your CMC
@Okx I was just slightly bothered by the fact that the command is F
Okx
Okx
17:56
@LeakyNun It's not quite ASCII F.
@Okx I mean, the fact that it stands for Factor
Okx
Okx
Well, I don't see a problem with it standing for factor.
18:29
Why do some unix headers still use octal numbers. That's so confusing when porting to another language...
It's year 03741. Stop using octal already!
Hexadecimal is clearly the preferred numerical system of 0x7e1
go with base 2017
what base are we specifying bases in?
all of them
18:35
base 10, obviously :-D
@Downgoat go with base 1
clearly unary, it is the best system of 1111111111{2000 1's}1111111
@DJMcMayhem question: how to close tab in vim :|
:tabd not working :|
... how many 1's???
:q
@JanDvorak 1111111111{2000 1's}1111111
18:37
@KritixiLithos that is to close window
Everyone should switch to binary by the year 100000000000
I use it to close tabs
and it works
@KritixiLithos 1111111111+11**1111*11111**111+1111111
I thought that was supposed to be bold for some reason :P
I did not see that 2000 in my year
18:40
There's a challenge: Express a unary integer with math ops as short as possible
Possibly duplicate
That would have to be metagolf obviously, unless there's an easy way to optimize every number
Is 8 the first number where you can save space? 11^111
@Downgoat :q!
wait what is difference between :q and :tabd
Yeah, 11*111 isn't worth it
18:42
semi-ninja'd
@Downgoat no clue. But q always closes the current buffer
coincedentally, I opened up a page in my math book that says "what is the best number to choose for the base b?" under the heading "The number e"
@DJMcMayhem oh, I guess tabd keep buffer then
yeah, looks like that is it
base (10 in base (11 in base 2016))
I said :q 9 minutes ago :P
18:45
@ETHproductions Are there any above 8 where you can't save space? (assuming only +-*/^) 11 can be 11*11111+1, 13 can be 111^11+11
From a brief mental check, no
congrats unary 7, you are special
Once you get up to around 20 it seems you can always express it in half the chars (or a little more)
Though in terms of number of 1's (not counting operators) it's different
7 = 111*11+1 has 8 chars but 6 ones
Seems like once you get past 5 every number can be expressed with fewer ones
18:50
yeah
fun fact: the number of operators will never exceed the number you are expressing
unless you allow unary + :)
++++++1
Is that expressing 1 or 7?
@HelkaHomba "unary" + ":)"? :P
@ETHproductions 1 as in +(+(+(1))), but my point was more of a joke than really pertinent
18:53
Heh, clever :P
downvotes for all
@KritixiLithos 1:)1 = :D
So what is 11*1:)1?
Perfect XD
CMC: make an esolang out of this
00:00 - 19:0019:00 - 00:00

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