« first day (2700 days earlier)      last day (2146 days later) » 
00:00 - 14:0014:00 - 00:00

2:05 PM
uh oh
company is moving to Microsoft Teams
this should be... interesting
 
Teams is pretty good.
 
HA
are you being for real?
 
Yes, what's the problem?
 
I've checked their website, and it looks like Skype
 
1) It uses far too much screen real-estate.
2) I can't separate IMs and chat into separate panes that I can see simultaneously.
3) I wish there were more themes
4) Auto-scroll doesn't work correctly (at least in browser)
5) The app uses a ton of memory
6) You cannot persist conversation to outlook like you could with Skype for Business
7) You cannot message an entire group without joining their team's channel
the list goes on
Message threads become a mess in public team channels
Bottom line: for a business chat tool it is missing several features that Skype for Business/Lync and even Microsoft Office Communicator had
it's a step backwards
 
2:24 PM
I thank Mego again for sudo init 5
 
I disagree, it works for us. We also heavily use many Teams integrations with MS tools (Planner, etc) as well as other integrations (e.g. dev tracks GitHub dependency releases via Teams, Sentry alerts, Intercom messages, VSTS tickets). Support and marketing could integrate all their products (e.g. Trello). It's a central hub for the entire company that unifies tons of different existing solutions. It simplified just about every workflow in every team around here.
 
@mınxomaτ you can disagree with my bottom line, i suppose, but some of my numbered complaints are objectively bad
Personally I'm fine having a corporate chat tool separate from a general chat tool
Like i was happy with Skype for Business + IRC
 
Our Groups are also Office groups, so you can message a group using Outlook -> Group or just using the Team's email address (Teams -> right click -> email address). Without joining anything.
 
@mınxomaτ this works for existing email groups?
because that's a major feature of skype that my team uses
so if it works that that'll be nice
 
@Poke If your "groups" are proper Office Groups, not just mailing list, sure.
 
2:28 PM
they probably aren't
 
Group <-> Team sync must be set on Team creation.
 
/sigh
i don't suppose i can update the team afterwards
 
@StewieGriffin I agree with you fwiiw. However I'm not planning on unhammering my own question just yet.
 
@Poke Teams is basically a frontend for the company, not a chat tool (at least not primarily). It is much more aligned with what companies previously abused SharePoint + Office Groups for. Once you realize that, it will probably make your life easier. That is, if you are invested in the O365 ecosystem with more than just ExO :). There's much room for improvement, but MS also pushes pretty big updates to Teams very regularly.
 
we semi-recently moved to o365
so that's likely the issue
also unfortunately we're using it primarily as a chat tool
haha
 
2:34 PM
@Soaku async list comprehensions are new in 3.6 so be careful
If you want 3.5 compatibility
 
@quartata I figured it out already, because 3.5 is the newest Python on my server
 
(Why do you need a list?)
 
I have a question, that I acknowledge up front is probably really naive: How would I make a simple interpreted script language? Degree of difficulty: I'm primarily a DBA.
Specifically, I'm thinking about making a "GolfSQL" that (primarily) defines really short keywords, then (when "run") simply expands them via simple replacement into fully-formed SQL 2017-compatible SQL code. It doesn't have to even be able to run the SQL, just transform my GolfSQL code into T-SQL.
I'm not even sure what platform or environment I would use to define those replacements, and how to get them to work the way I'm thinking
 
here's an ANTLR grammar for regular TSQL that you could modify: github.com/antlr/grammars-v4/tree/master/tsql
 
(So like S*FtWi=0 could expand into SELECT * FROM t WHERE i=0 or something)
 
2:41 PM
It really depends on how different the syntax is I suppose
 
@quartata Well, that's the trick; if my keywords are made of symbols not normally supported by T-SQL (like some of the upper-ascii char sets lots of golfing languages use), then replacement should be (mostly?) trivial, right?
Yeah, if I define S = SELECT I could have issues, but if I instead define Π= SELECT I shouldn't have much trouble
So, like æ*µtḊi=0 could expand (mostly trivially) into SELECT * FROM t WHERE i=0
(And since I'd be the one writing the GolfSQL code, I'll know to avoid putting characters like those into strings)
But the problem is that I can conceive of a list of replacement keywords and methods and tricks and stuff that would be really handy in GolfSQL, I just don't know where to DO it
 
@BradC Sounds like you can write the transformer in sed.
 
Well if you don't care about strings or other literals then yeah you can just use regex
s/Æ/SELECT /g
:p
 
Which programming language do you intend to write the interpreter in?
 
@quartata That's... an extremely versatile suggestion...
@user202729 in T-SQL? Lol, that's the problem. Maybe I'll make a T-SQL table of potential replacements and loop through, applying either a simple T-SQL replace, or perhaps using C# for regex
 
2:53 PM
@BradC :/ Well I don't know T-SQL so I can't say anything...
Although -- if that's all I'd say... it's not interesting.
(1) It's still not going to win the golf langs and (2) it will make code much harder to read.
Easier to read code = more likely to get upvotes. (I think so)
@user202729 I have added all the edits and clarifications requested in the discussion. Is this eligible to be reopened? — versatile parsley yesterday
 
Well, I'd likely include the "this is what my code expands into" T-SQL version of each for readability.
Plus, SQL is pretty efficient at some things, so with shorter keywords, it can certainly be much more competitive than it is now.
Plus, its a bit novel. T-SQL isn't rare on CG.SE, but it isn't that common either.
And depending on how good I get with the replacements, I can replace entire long phrases with single characters or combinations.
Like right now it is RIDICULOUSLY long to define a number table from, say, 0 to 100. But this is so commonly useful, I could easily define a keyword or pair like N(0,100). But that's not quite a trivial replacement, so may come later.
Thanks for the ideas and discussion.
 
3:11 PM
@user202729 see: jelly
(for a counter example)
 
Because HNQ...
 
Anyone know of a program I can use for sudo -A
 
and existing-votes effect.
 
Thinking about it now, a trivial REPLACE from a T-SQL table of keyword/replacement pairs is the most obvious starting option (and the most solidly in my wheelhouse). If, at some point in the future I need more sophisticated replacement or actual interpretation of the code I can move to a different method or platform.
Plus, if I'm requiring SQL 2017 to run the resulting (transformed) code anyway, I might as well just make a SQL 2017-compatible table and proc to do the work for me.
One final question: are there other requirements before I can start to answer questions on this site using my (as yet undeveloped) "GolfSQL"? Do I have to write a meta-question with details of it? Publish the specs at GitHub? Make an available running version online somewhere?
 
3:26 PM
@BradC Just "have an interpreter" is enough. Where you put it doesn't important, just that it has to exist.
If necessary, link to it in the post.
 
Sorry, final question #2: CG.SE used to have a "no answers using languages created after the question was posted" rule. Is that rule still in effect? Do people still care about it? One of my favorite things is browsing old popular questions and providing a new answer.
 
Github repo often suffices. Or ask Dennis to add it to TIO.
 
no, the non-competing rule isn't in effect anymore
 
Languages here are defined by their implementation. So, therefore, an implementation has to exist for it to be an acceptable language. It's OK if that implementation is a simple downloadable interpreter somewhere.
 
CMC: Given two alphanumeric+space strings A and B, and a printable ASCII string C, replace occurrences of A in C with B, except inside double-quotes. E.g. A:Hello B:Greetings C:Hello, "Hello"!Greetings, "Hello"!
 
3:29 PM
@Adám Are double quotes matched?
 
@user202729 Not necessarily. You'll have to go by the parity.
 
@Adám so, "inside double-quotes" also includes chars after the last double-quote, if the number of "s is odd?
 
So only replace occurences which is to the right of an even number of double quotes?
 
@EriktheOutgolfer No.
@user202729 yes.
 
@Adám then I'll not have to just "go by the parity"
 
3:31 PM
@BradC A downside is not many people focus on active question tab, so those answers are less likely to get upvotes.
 
@EriktheOutgolfer Thanks, was never a fan of that rule. Abuse like adding a single command to produce the entire text of "99 bottles of beer" are better handled individually than by a blanket rule.
 
@Adám What's the difference between my message and Erik's?
 
such abuse leads to a very...negative conclusion :P
the difference is that your message doesn't follow the logic of strings :P
CCC"CCCCC"SSSSS"CCC"SSSS, where S is a string area and C is a code area
or SSS"CCCCC"SSSSS"CCC"SSSS, if 0 "s count as an even number of them
 
@EriktheOutgolfer Looks wrong?
 
at least to me, yeah, that's what your message implies
VTC: unclear
 
ngn
4:28 PM
@Adám apl: '".*?"'A⎕R'&'B⊢C
 
4:53 PM
Just testing some high-bit character display: 162 ¢ 163 £ 164 ¤
188 ¼ 192 À 198 Æ 215 × 216 Ø
sweet
 
5:09 PM
CMC: Given a list of strings, extract the numbers from them, then stably sort the strings by those numbers. Example:
Input strings			To Numbers	Sorted		Expected result
"a32sd45f"		=>	3245		1234		"1234"
"12foobar123"		=>	12123	=>	3245	=>	"a32sd45f"
"1234"			=>	1234		12123		"12foobar123"
"zxc12123"		=>	12123		12123		"zxc12123"
 
0
Q: What happened to languages like CJam and Pyth?

Faraz MasroorIt's been a while since I've been here, and now it seems that nobody uses CJam or Pyth anymore. New languages have sprung up since then. Has that happened just naturally? Was there a rule change or something?

 
@Pavel Can we assume the strings are alphanumeric?
 
@DJMcMayhem Yes
 
Sweet
 
@Pavel 05AB1E, 4 bytes: {Σþï
 
5:21 PM
@Pavel V, 25 bytes: Try it online!
What a disgusting mess
 
Does V have any kind of builtin for sorting?
 
Yes. In that example, it's ún/<0x81><space>
 
That's pretty long
 
5 bytes, yeah
 
Well the builtin is ú. n/<0x81><space> is specifying certain flags
It's better than :sor n /.* /<cr> :P
 
5:24 PM
Is ú equivalent to any key in Vim or am I stuck with :sor?
 
Oh duh, I can cut off a really obvious byte: tio.run/##K/v//3BfpcrhRoUCrsObDvcqHGo8NPnwQiBzV57@oUYFrsN9aQou//…
@Pavel In vim? You'll need :sor. But ú is equivalent to <M-z> in vim, it's just that <M-z> only has special meaning in V
 
def obvious
 
*nods head while pretending to understand V*
 
@EriktheOutgolfer $á<space> vs Á<space> seems obvious to me :P
 
I have a very long time to even try out V...
 
5:27 PM
@Pavel A simple explanation is that the first half is transforming the text to a form that V can sort, and then the second half is sorting it and transforming it back
 
@Pavel Stax, 6 bytes: ┤◙U╓⌐τ
 
Oops, forgot to save the TIO link
@Pavel Do you know vim? The whole solution could be translated to this:
:%norm y$A <C-v><esc>p
qq:%s/ .*\zs\a//g
@qq@q:sor n /.* /
:%norm f D
 
I know some vim
 
Perhaps one of my favorite vim features ever is \zs and \ze, which AFAIK is basically \K in perl
 
I don't have any clue how registers work
Sometimes I hit q on accident and get super confused
 
5:33 PM
Oh, you mean macros
 
Yes that
 
OK, so take this example. Let's say you wanted to delete the first word on every line (ignore that we can do this with ex commands). So basically we want to type dwj a bunch of times
So qq == 'Start recording my keystrokes into "q', and then we type dwj and q stops recording.
So if we want to run that a bunch of times, we can run what we recorded as if we typed it a bunch of times with <n>@q
 
So what's @qq?
Your code has an @qq@q in it
 
OK, so let's say we want dwj on every line, but we don't know how many lines there are (again, ignoring :%norm)
That means that @q (calling the macro) is part of the inside of the macro, so it's basically a recursive function
Actually, to be more clear, we'll record it to 'a'.
So then q (start recording) a (to "a) dwj (delete the stuff) @a (then call "a again) q (stop recording) @a (start the recursive macro)
 
Ok, that makes sense
Thanks!
 
5:39 PM
And that conveniently stops running when we try j on the last line because that throws a soft error which breaks the loop
In my example, I had a recursive macro so that I could remove every [a-zA-Z] that comes after a space. That breaks once the regex doesn't match anymore. There might be a simpler way.
@Pavel Always glad to help
 
5:59 PM
@Pavel PowerShell, 33 bytes Try it online!
Err, 32 ... remove the space
 
29: use `\D
 
See, this is just me sucking at regex
 
@AdmBorkBork sorry, but that's invalid, the CMC asks for a stable sort
 
What's unstable about it?
 
ninja
uh, you do know what "stable sort" means, no?
 
6:03 PM
Oh, I see
Hmm
 
the solution is to just sort the list of arguments lexicographically first :P
or by using any form of stable sort
 
Wait, I'm still not understanding. You swapped the order of the arguments, so the order of the output swapped. What's wrong with that?
 
Stable sort means that elements that have an equal key stay in order
 
Right, and they are?
 
a sort is stable when every permutation of a list gets sorted to the same result (and of course the sort actually works)
 
6:05 PM
No
Adm's solution is fine
 
hm, am I wrong? I thought that was what a stable sort is...
hm, then my 05AB1E solution should not have the first byte
46 mins ago, by Erik the Outgolfer
@Pavel 05AB1E, 4 bytes: {Σþï
 
yeah, I googled it just now
 
Phew
 
apl, 20 bytes, {⍵[⍋(⍎⊢(/⍨)∊∘⎕d)¨⍵]}
 
6:10 PM
@EriktheOutgolfer No...
 
long ninja
 
I know
 
I know that I was ninja'd
 
I mean, what did you mean with "No..." then
 
6:11 PM
I meant "No, that's not what a stable sort is"
 
admit it, you just wanted to ping in :P
I'm wondering where is that PPCG post which defined "stable sort" otherwise...
 
18 bytes now, {⍵[⍋{⍎⍵/⍨⍵∊⎕d}¨⍵]}
 
6:42 PM
14 bytes: {⍵[⍋⍎¨∩∘⎕D¨⍵]}
 
7:20 PM
@quartata this one
@quartata I'm writing a paper on swarm AI as it applies to the borg from star trek
specifically, how they have a 'queen', but are able to function perfectly well without her, comparing to other things like bees IRL and computer-thingys like boids
it's quite interesting to write and I may end up with some tweet suggestions for you
 
Fun fact you can make any power of two in python using only balanced parentheses
 
Neato
 
Here is 4: ([]<()>[])<<([]<()>[])<<([]<()>[])>>([]<[]>[])>>([]<[]>[])
 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: '<' not supported between instances of 'list' and 'tuple'
 
@CatWizard Probably would help to specify python 2
 
7:26 PM
Works in python 2, but you can use [[]] instead of () for python 3
Example: ([]<[[]]>[])<<([]<[[]]>[])<<([]<[[]]>[])>>([]<[]>[])>>([]<[]>[])
I've tried to make non-powers of 2 but asside from 0 I have been unable to
 
@CatWizard golfed ([]<[[]])<<([]<[[]])<<([]<[[]])
 
@Cowsquack That's not balanced
 
oh I misunderstoof
 
Did someone say Pythonflak
 
CMC: Output balanced brackets that print a number in BF and evaluates to that same number in python
2
 
7:34 PM
Input is guarentted power of 2?
 
ooooh
 
@CatWizard Yes
 
I think I can do this
 
2 bytes: no
 
@EriktheOutgolfer Which esolang is that?
 
7:35 PM
balanced () on their own don't evaluate to numbers
 
Fine, brackets
 
so, 0 and 1? (like, False/True) hardcoding can be the solution here...
 
I just realized that this answer from two years ago is a snippet and not a valid submission. The OP is inactive, but it's a good solution and clearly took a lot of work, so I don't think it should just be deleted.
 
oh, <</>>, I forgot
 
@DJMcMayhem Since you're a mod and seem to be around right now, can I ask your opinion?
 
7:43 PM
I agree that it would be a shame to delete it, but I'm not sure what alternative would be better
 
um, where is it apparent that it's a snippet?
 
good opinion DJ
oh I missed hte backscroll
 
@EriktheOutgolfer It starts with var R=new Random();
 
I thought you were just responding with a random opinion
 
That's not a valid way to start a C# program or function
 
7:45 PM
Just edit it
 
I'd say post a comment about it first, and, if OP doesn't do anything (might be active sooner than you think) you might be able to VTD, and flag
 
:O C# Interactive to the rescue!
 
@quartata edit what, code? nah :P
 
Not very well golfed
 
Cool
(Why does it take the input twice)
 
7:47 PM
f takes the power of two you want in python and the power of 2 you want in brain-flak
 
Oh neat
 
@CatWizard I'm getting 16 in brain-flak and 8 in python...
 
@DJMcMayhem Oh yeah, that's an indexing issue
 
7:49 PM
why does it surprise me when somebody actually bothers to test it and finds out errors?
 
Oh. Dang.
 
@DJMcMayhem Fixed
 
@Pavel but the specified language is wrong, so I wouldn't call the solution valid
 
Why not putStrLn, then you don't get quotes in the output
@EriktheOutgolfer He said "C#", without specifying an implementation.
csi is just another implementation of C#
 
I just default to print because usually the object isn't a string.
 
7:51 PM
are you sure? I think that interactive versions of languages are considered separate languages, not separate implementations
 
There's literally no difference between "seperate language" and "seperate implementation" as far as PPCG is concerned.
Techinically, just "C#" without saying which implementation isn't a language at all.
 
@Pavel I feel like this could make a decent main challenge. There is a lot of optimizations that can be done and it is pretty open ended.
 
@CatWizard You can post it there if you want, I'm busy and don't really have time to formally define specs for it.
(Also, there's another challenge I want to write up)
 
Ok I think I will tomorrow.
 
Cool
 
7:56 PM
@Pavel the thing is, many answers don't specify an implementation, but calling all of them invalid would be detrimental to the community
 
Exactly. So I just quickly specified an implemntation where the solution works
 
if the answer instead said it's in Python (but without any link to e.g. python.org), would you still consider specifying that implementation of C# valid?
 
Yes
The OP clearly made a minor mistake, and his answer shouldn't be lost because of it
 
well, you can always post a comment with the implementation you have found
 
@CatWizard as a metagolf challenge?
 
8:11 PM
No just a code-golf
 
holy asdf I can stop bolding my variable names
 
?
 
@quartata Do you think it would be better as a metagolf?
 
How do you bold a variable name
 
I think it might be more interesting
But more complicated
 
8:13 PM
It depends on wether or not there's an easy "optimal" solution.
 
yeah
 
@Pavel Two asterisks on each side
 
I think my current answer is pretty optimal.
 
I suspect that there's an easy construction but the results will be long
So it depends on whether you want to reward better optimization of the output
 
@AdmBorkBork I'm just wondering how you could find yourself doing that to your variables
 
8:15 PM
var **foo** :p
 
@AdmBorkBork Yeah, why would you ever write that
 
Maybe it's an IDE setting?
 
I feel like both will be interesting
 
Conor was kinda vague and hasn't spoken since, so ... yay, speculation.
 
or lack of latex
in codegolf answers
 
8:16 PM
@CatWizard I also like the idea of extending it to take potentially different values for Py and BF like your solution, could either make the challenge more interesting or unnecessarily complicated.
 
I think that them being the same might give way for interesting optimizations
 
@Pavel Assume A is prime....
@AdmBorkBork oooOOOOooooooo
 
\$A\$ doesn't work in chat...maybe you've adopted the habit from Dennis?
 
maybe
but I mean in answers
 
you're supposed to \$...\$ it now
 
8:23 PM
like here
@EriktheOutgolfer yeah.... that's the point of having mathjax right
 
if not, what is? ;)
 
8:46 PM
Weird Wrong window
 
Feb 24 '17 at 4:37, by Dennis
Err, wrong window.
 
It happens.
 
Suddenly, Dennis poofs out of nowhere. It happens.
 
Pretty sure Dennis is just always watching
 
almost every general discussion chat room has the one (usually a mod) who's always watching :P
 
9:24 PM
o_O mitchs got 101 for fizzbuzz in sed
 
10:17 PM
Android Messages for web: Press "Shift + /" to see the keyboard shortcuts.
Why this couldn't have been Press "?", I don't know.
100 tweets. 100 is a good milestone..here are some 100 facts - the number of tweets i have is greater than or equal to 100 - 100 is an odd number - 100 is a base-10 harshad number - i was born at age 100 and age backwards exactly one of these things is untrue. the rest is canon
:thinking:
 
it;s true
 
So do you age backwards or is 100 an odd number
Both of those seem false
 
100 is clearly even, ive done research
4
 
And here I was hoping there was some super-obscure alternate definition of odd
Although
I suppose "odd" also means "weird"
And 100 is a pretty weird number
 
11:02 PM
100 is an odd number in any odd base
 
100 is divisible by 2 whatever base both are in
 
no?
 
0b10 divides 0b1100100 as 2 divides 100
 
$\exists k \, : \, 2k = 100$
 
Erik means 100 as in the number "one hundred". Frog means 100 as in the number represented by the digits 1, 0, 0 in whatever base you're working in.
Right?
 
11:07 PM
the result of about 5 years off research on my part..
 
1) you've mistyped the second \$ 2) MathJax doesn't work in chat
 
and yet all i get is english majors breathing down my neck on my tweets
it, should be a crime...
2
 
 
@EriktheOutgolfer it does when you have an extension
 
a-ta.co's mathjax renderer broke
 
11:08 PM
because a-ta.co broke in general
 
It was fixed at one point
 
11:28 PM
hey, a challenge over anagol that isn't ! but...it's too hard :(
 
T/F: for every prime p, (-1)^p ≡ -1 (mod p)
 
@LeakyNun (-1)^p is -1 for all numbers, not just primes.
So true
 
really? oh man, I thought (-1)^e = 1 for every even number e
 
At least all odds
Ninja'd
Although I suppose 2 is a special case.
-1 = 1 mod 2 though so it checks out
 
11:36 PM
yeah, I'm not sure what Leaky is trying to say here
 
it looks true at first, and then when you remember 2 you would say false, but then it is actually true
 
and then comes the obvious answer
> so don't "think"!
 
00:00 - 14:0014:00 - 00:00

« first day (2700 days earlier)      last day (2146 days later) »