« first day (2279 days earlier)      last day (2582 days later) » 

3:00 AM
like Mathematica: (* asdf *)
 
@ConorO'Brien What does isolate do?
I think we should move all of this into a separate room
 
yes

 Stacked

For discussing the Stacked language (github.com/ConorOBrien-Fo...
 
CMC: n → 1+2+3+...+n
 
@LeakyNun RProgN-2, 2 bytes. R+
 
@ATaco docs?
 
3:10 AM
RProgN2 is a little light on docs.
 
you mean a little non-existent
 
Correct, yes.
 
stack-based?
 
Yeah.
 
alright
 
3:12 AM
Simple enough, RANGE then ADD, Range implicitly uses a 0 as it's first argument, which, given say... 3, would produce a stack with the content (0, 1, 2, 3), +, when fed a stack, sums it.
 
question: in a language with automatic semicolon insertion, should:
3
/3
be: 3/3 or 3;/3 (i.e. syntax error)
 
Jelly, 2 bytes. RS
 
The latter is more sane I think
 
Idealy it should be 3/3.
 
"read until you have a valid expression", not "read until you can't"
 
3:14 AM
I think it's more / is the first part of the next line, so it probably wants to concatenate the line.
For example:
  "Hello, "
+ "World"
Is definitely expected to produce "Hello, World"
Or rarely, "Hello, \nWorld"
 
@ATaco only in languages where "Hello, " isn't a complete statement on its own
 
You can assume it's wrapped in a print or x = if you want, but + "World"definitely isn't a statement in most languages.
 
@MistahFiggins how do you add two numbers?
 
[?~-!-~]|
i.e. "until the first number is 0, add 1 to the second number and subtract one to the first"
then get rid of the trailing 0
 
3:19 AM
how do you add 1?
oh, never mind
 
I'm not sure if multiplication is shorter, because we don't really have a formula for that yet :/
 
then create one
try squaring a number
 
wait, not, WheatWizard got dennis to fix the bug
 
what bug?
 
but the stack clean multiplication that I came up with is 31 bytes alone
 
3:21 AM
never mind then
 
it used to be that a loop (with [code]) wouldn't check if something was 0 before it entered
it was a do while, not a while loop
However, I think stack dirty multiplication might be faster
 
@ATaco can't you use 1 as unary?
 
I can, I just like Underscores.
 
they are confusing
 
3:26 AM
has anyone here taken the AP CS A test?
 
@Downgoat I think so
pretty sure
 
@MistahFiggins do we need to know GridWorld?
 
what do you mean, "know"?
 
@LeakyNun Once. But it will loop endlessly.
 
3:27 AM
@ATaco how to not loop?
 
Well, I should clarify.
 
I'm not sure, but I don't think so
 
It keeps looping as long as the match/replace changes something.
 
how not to loop?
 
Ensure nothing is changed at the final iteration.
 
3:28 AM
@MistahFiggins is it on the test though?
 
Due to the nature of it, the entire math library is horrifying in how it works.
 
@Downgoat I doubt it. My memory is meh, but I don't recall so, no
 
@Mendeleev I haven't been around, sorry. What's up?
 
execution order? @ATaco
 
Arbitrary.
Based entirely on Java's Hashing.
 
3:29 AM
how to run two replaces?
 
@Phoenix you took AP CS A quiz recently right? I have questions, I have MC final tomorrow >_>
 
a/b/
c/d/
ac
Will turn into bd
If they've got conflicting matches, hope and pray.
 
loop order?
 
As I said, execution of replacements is completely arbitrary.
But they will only ever happen once in a cycle.
 
for example?
11112222?
 
3:32 AM
Perhaps I'm explaining this language wrong.
The entire language is just blocks of match/replace/match/replace.../starting text
Then, it takes each pair of match/replace, and executes it on starting text in no particular order.
 
@HelkaHomba wait what where did you get this— err I mean idk what you're talking about
 
And it keeps doing this until it stops changing.
 
yeah, gridworld wasn't on there at all @Downgoat
 
@ATaco that's quite pointless, to be honest
 
It's turing complete.
 
3:34 AM
well I can't do two replaces one after the other
 
:/ I mean I Know Java but I keep getting really bad like 80% on MC >_<
 
You can, if you get a bit smart about it.
 
though I can get a 70% and still get a 5
 
> almost
?
 
< , > are replaced with l i r, for convenient interface with the libraries.
 
@ATaco this is the best I got
 
It's not a very good language.
But it does entirely serve it's purpose.
The issue with the way you've tried to solve it, is you're IO was going to be identical, so it would have to loop forever. Changing /#input to something like /<#input> protects against that.
 
I wonder why (?<=^b(1+)) gives a "Look-behind group does not have an obvious maximum length near index 9" error, but not (?<=^(1+))
 
3:47 AM
@ThomasWard It seems like you have a lot of experience with nginx, I was wondering if you could help me with something
 
@Mendeleev wait you are in US right, have you taken AP CS A test
 
@Downgoat No
 
:(
 
you'll do fine
 
Should I?
 
3:48 AM
@Mendeleev live in the US, or take the test?
 
@MistahFiggins I already do the first one,
 
maybe I could have looked at your profile, or remebered that you are also in WA
 
@MistahFiggins you are in WA as well?
 
All my languages are in their roots experiments, so they usually aren't incredibly useful, but they are interesting.
 
@ATaco Can you make the color apply behind the username, not the message?
 
3:57 AM
Of course, hold on.
 
Question: can a static method access a private field in Java?
 
@Downgoat try it and you'll know
 
:( ok
 
@Downgoat It can access a static private field, but not an instanced private field.
TMK
@Mendeleev Done.
 
Huh, apparently it can't
 
4:01 AM
@ATaco Cool
 
class Main {
  private double a = 5;

  static void doThing(A a) {
    System.out.println(a.a);
  }

  public static void main(String[] args) {
    doThing(new A());
  }

}
I'm doing this right, right?
 
@ATaco Still shows behind messages.
 
@Mendeleev Have ya updated the userscript and refreshed..?
 
Yes
 
What version number..?
 
4:02 AM
@Downgoat The Main class can't access the fields of the A class, what a surprise.
 
@feersum wait what, there is no A class
... Java is throwing wrong error
@ATaco it can apparently :P
 
@ATaco 1.0
 
hello!
 
@Mendeleev Should be 1.1
 
ok better now
 
4:04 AM
Red Team has all the cool players, we've got Downgoat, Dennis, Me.
 
But can you make it only go behind the username? Not behind the whole message?
@Ruby Do you like to take trains?
 
what ?????
 
because then it would be Ruby on Rails
 
Text should be fine, because of the dimensions of the signature box, It looks terrible if I just put it under the username.
 
what do u mean ?
@Mendeleev
 
4:05 AM
it's a pun rubyonrails.org
 
IRB (Interactive Ruby) question: How do you call the last line. In Python, it's something like _(1)
 
hahahahahah
 
@ATaco team red?
oh hey I'm red :D
 
Team Blue contains all the people who use Stacked.
(That I know of)
And Leaky Nun, too.
 
Anyone?
 
4:08 AM
CMC: "abc" → "abcba"
@ATaco good luck using reregex to do that
 
On it boss.
Can we assume only letters will be used?
 
@LeakyNun Ruby: ->s{s+s.reverse[1..-1]}
 
Python 3, 20 bytes: lambda x:x+x[-2::-1]
 
anyone java the CMC?
 
@LeakyNun s->s+s.tail(-1).rev
 
4:11 AM
Oh that reminds me. Have you seen this challenge @LeakyNun? codegolf.stackexchange.com/questions/95100/…
 
@Downgoat cheddar :D
 
:D
 
@Sherlock9 I gave that up
 
Ah dang
 
@Downgoat what about s->s+s.rev.tail(1)?
wait, yours doesn't work
 
4:13 AM
Um... how about s->"abcba"
 
@feersum not funny
 
@LeakyNun Done.
 
@LeakyNun ah, yes that work :D
@LeakyNun what version are you using?
 
@ATaco how on earth did you use a and b and c in the code?
 
user165474
@LeakyNun 1+¡0
 
4:15 AM
@HyperNeutrino ?
 
a b and c were always followed by a <
 
@Downgoat v1.0.0-beta.45
 
user165474
@LeakyNun Sorry, missing context, that's the Fibonacci code from earlier today
 
user165474
I think I finally figured it out
 
@HyperNeutrino well have you tested it?
 
4:16 AM
@LeakyNun oh ok that's old, try npm i -g cheddar-lang@1.0.0 IIRC
 
user165474
I've tested it; it appears to return [1, 1, 2, 3, 5, 8, 13, ...][argument] so it differs from the built-in by an index of 1, but it's valid in certain implementations of the sequence itself.
 
I think newer versions I replaced .rev with a longer version
 
@HyperNeutrino can you fix it?
 
user165474
I'll try.
 
user165474
Shouldn't change the bytecount though, right?
 
4:17 AM
@Downgoat still not working
@HyperNeutrino right
 
user165474
Alright. I'll try to fix that.
 
@LeakyNun is there an error?
 
@Downgoat no, it gives me "abccba"
 
ohhh
ok, I guess .slice(1) at the end
wow, I am surprised I haven't fixed
 
you don't need the tail then
@Downgoat I'm surprised you haven't tested the code before giving me
@Downgoat what is wrong about tail?
 
4:21 AM
yayy openscad
 
@Downgoat PR
 
@LeakyNun Brainfuck, 12 bytes. ,[.>,]<<[.<]
 
@ATaco you picked the right language
 
Not the first time I've done something like this in Brainfuck.
Albeit with a fair bit more header.
 
user165474
@LeakyNun I can't seem to figure out how to fix it to match the built-in. I could try to reduce the number of iterations, but that adds extra bytes, so I'm pretty confident that that's not the way to go about it
 
4:28 AM
@HyperNeutrino it's easier than you think
 
user165474
1+¡0 My original thought was to change the numbers but that doesn't seem to work.
 
@HyperNeutrino well it works for me
 
user165474
Hm. Okay.
 
@Downgoat are you here?
 
user165474
I think the 0 is correct; not sure.
 
user165474
4:37 AM
Anyway, gonna go to bed now; 1237. GN!
 
4:49 AM
@Mendeleev Probably, if I weren't dead tired.
 
@ThomasWard Oh, sorry abuot that
I'll ask you tomorrow
 
5:05 AM
CMC: nCr
 
@LeakyNun Math.JS, 20 bytes C(n,r)=n!/(r!(n-r)!)
 
@ATaco you can use n=>r=> I guess
 
Not in Math.JS
Math.JS is, surprisingly, not a library.
Which is why n! is valid syntax.
 
@ATaco C(n,r)=n!/r!/(n-r)! is shorter
 
5:17 AM
Oh, I wouldn't have thought to do that.
Found the builtin!
combinations
 
that's nice
 
Not sure why it's not just nCr, but I'm not the developer.
 
@DJMcMayhem hi
 
@ATaco because it's not a golfing library
 
It's not a library.
Well, it is, but the eval is the interesting part of it.
 
5:25 AM
What's Pavel called now?
 
Phoenix
 
eval uses it's own Compiler/Parser/Interpreter
It's intention is just to process math.
 
Oh really?
Didn't realize
 
@ATaco Well yeah, Math.JS doesn't interpret JS, it inteprets a slightly modified language, and the language is not meant to be a golflang
 
It's not intended to be TC but here we are.
 
5:29 AM
@ATaco Wait what I thought it supported all JS syntax constructs
 
Nope, very few of them. It just follows a similar guideline.
' is the transpose function, not a string deliminator, ` does god knows what...
x=>x doesn't work, etc. etc.
However, {} is objects, and [] is matrices, which serves the same purpose as arrays.
 
0
Q: Currying with Programs

Challenger5We allow functions to return functions: f = lambda x: lambda y: x + y f is called like: f(3)(4) This is called currying. However, we also allow them to be called in other ways: lambda: lambda x, y: x + y # f()(3,4) lambda x, y: lambda: x + y # f(3,4)() lambda x: lambda: lam...

 
0
A: Sandbox for Proposed Challenges

Challenger5Find the Calling Pattern number function cops-and-robbers I've written a program to add two numbers a and b: f=lambda:lambda a:lambda b:lambda:a+b This has a very specific calling pattern. It must be called as: f()(a)(b)() In this case, it was fairly clear, but sometimes the calling patte...

 
5:53 AM
@Phoenix have you seen my answer to your challenge?
 
I have
It's pretty good, (I think)
I don't read Pyth
 
thanks
 
6:04 AM
Ey, Pavel's on the Red team!
 
?
What red team?
 
I made a Userscript that arbitrarily assigns chat users to teams.
 
Is it deterministic? Will We see everyone on the same team?
 
Yeah, it's based off the UserID.
Literally a userID%2 ? RED : BLUE
 
I see.
@ATaco for the caret-reply script: Just carets with noothing else on the line star the message pointed to instead of sending anything.
 
6:10 AM
That... Is rather smart.
 
Anonymous
I don't know if that's such a good idea
 
Would you prefer messages of that vein to have ^ messages, or to be starred?
 
Says someone on team blue :P
 
Anonymous
@ATaco Preferably neither, but if I had to choose, I'd prefer carets
 
It's just a convenience tool.
I highly doubt it will cause a problem.
 
Anonymous
6:13 AM
There are times when one would want to caret something without starring it
 
<space>^^
 
Rarely is just carreting something beneficial to the chat.
 
^ I disagree. This use case might be fine.
 
Anonymous
@ATaco I agree, but people use carets to mean "I agree with this". That doesn't necessarily translate into "I think this is important/interesting/funny enough to be starred".
 
You can put a space in front
No one is making you use the script.
 
6:15 AM
Alternatively, I could make ^^* or similar star the target.
 
I like that.
 
Of course, still supporting things like ^?cool message?*
 
On this answer, Destructible Lemon commented to the effect that a 1-byte solution would necessarily use a built-in. Is that true?
 
Anonymous
IMO the syntax should be <carets>*, and the script should suppress actually sending any message to the chat
 
That was the idea
 
Anonymous
6:21 AM
@Challenger5 Any single command that accepts a list and outputs a sorted list would necessarily be a sorting builtin.
 
However, ^*10 and ^?cool message? are valid selectors for the Caret script
 
@Challenger5 Practically, yes. In order to solve the problem without using built-ins, you must carry out at least two operations. Unless both of them fit into a single byte (a certain behavior before the code is executed or sub-byte tokens), a single byte will be a built-in.
 
Unless the language does magic like take input as an unordered list, and then happens to output it sorted.
 
Anonymous
@Phoenix In that case the 0-byte program would still be using a builtin. It just wouldn't have an explicit call.
 
^
 
6:23 AM
I'm thinking of a language called SortOf whose main operations are sorting lists. At the end of the program, the top array on the stack is sorted and then output. A one byte solution in this language would be the instruction to delete the input (which is on top of the stack).
 
Anonymous
@Challenger5 That's still using a builtin without an explicit call.
 
@Dennis seriously, you are 18 bytes now. I'm still trying to golf down my 22-byte Pyth program before posting it, just to see that the goal is farther and farther as time passes.
 
@Mego So how do you define builtin?
 
Anonymous
@Challenger5 A functionality present in the language/library/whatever that is not part of the program/function/whatever.
 
@LeakyNun If another language outgolfs Jelly at array manipulation, I have failed miserably. ⁹f€F is rather clumsy though: really slow, and it feels to long.
 
Anonymous
6:27 AM
Consider this Python program. There are 5 functions used: f, print, sorted, int, and input. All but f are present in the language - ergo they are builtins. f is not a builtin because it is defined in the program (however it uses the multiplication builtin).
 
@Dennis it took you quite a long time to realize though
 
Anonymous
In other words, if you don't have to define something yourself, it's a builtin
 
@Dennis so I'm wondering maybe I also missed some obvious things
 
@Mego So would you call ] in this question a builtin?
 
@LeakyNun Indeed. Way too long.
 
Anonymous
6:29 AM
@Challenger5 ] is not a builtin, but the fact that the default, implicit behavior is to count the number of matches of the first line's regex is a builtin.
 
@Mego Yes, and in SortOf, implicit behavior is to sort the list at the end.
Can you differentiate between those two cases objectively?
 
Anonymous
@Challenger5 Yes. You didn't write a program in SortOf to sort a list. The language did that for you. If the language/library/whatever does it for you, it's a builtin.
 
In the Retina answer, the programming language counts the number of instances of ] in the input and prints that number for you as well.
 
Anonymous
@Challenger5 Yes, and I said that behavior was a builtin. ] isn't a builtin because ] isn't a command - it's a parameter for a builtin.
 
ZISC vs. OISC. What's a parameter, what's its own instruction?
 
Anonymous
6:35 AM
Going back to Python examples: for sorted([1,2,3]), you wouldn't say [1,2,3] was the builtin - it's a parameter to the sorted builtin.
 
Anonymous
@Challenger5 Now you've gone completely off the rails. That tangent isn't going to further this conversation.
 
My point is just... shoot, I don't have a point.
Let's just [ban](https://codegolf.meta.stackexchange.com/a/11228/61384) non-observable requirements and be done with it.
OK I don't get the formatting in chat
 
Anonymous
@Challenger5 Builtins aren't non-observable requirements.
 
Looking at the program as a black box, I couldn't tell whether a language was using a builtin or solving using its own implementation.
 
@Challenger5 No formatting in multiline messages
 
6:40 AM
@Phoenix Oh, ok
 
Anonymous
@Challenger5 But you don't look at the program as a black box. You can see the source code. It is very clear when a program uses a builtin.
 
@Dennis what do you think I can golf down from here?
 
A person with common sense could tell, yes. But it's not objective what's a builtin.
 
Anonymous
@Challenger5 I literally just gave you an objective definition for a builtin. What more do you want?
 
@Mego What's part of the language, and what's part of the program?
 
Anonymous
6:44 AM
@Challenger5 Did you implement it yourself? If so, it's not a builtin.
 
Anonymous
I really don't know why that's so difficult
 
So is lambda x:sorted(x) not a builtin?
 
@Dennis for your answer, would it be longer using outer product?
 
Anonymous
@Challenger5 It's not a builtin, but it uses a builtin (you didn't implement sorted yourself)
 
I could argue that sorted is implicitly implemented at the beginning of every Python program.
 
6:47 AM
That's my way of saying QuickStar is done.
 
Anonymous
@Challenger5 But then you'd be making ridiculous arguments. It's implemented in python/Python/bltinmodule.c. Did you write the sorted code as part of your program? No? Well it's a builtin.
 
@ATaco Stars and TeamSpirit don't work well together
 
TeamSpirit was never designed to work well.
 
Fair enough
 
So they're builtins for CPython, but I could write an implementation in which my argument would be true
 
6:52 AM
And no, trying to star your self doesn't work.
 
Anonymous
@Challenger5 Unless you count the source code that implements sorted as part of your program, it's a builtin
 
Protip: Do not SIGKILL dist-upgrade
 
There's a shocker.
 
In other news, Ubuntu 17 is out.
 
@LeakyNun I don't know. I haven't golfed in Pyth in ages.
 
6:53 AM
@Dennis I thought this question should be easy with Jelly. And by easy I mean short, since Jelly is good at array manipulation.
 
@LeakyNun ×þ? I tried that, but the best I was able to come up with ties with my current approach.
@LeakyNun Haven't had the time yet.
 
Sorry gtg
 
Fuck it, I'm just going to accept that apt-get is forever broken.
Time to install Fedora
 

« first day (2279 days earlier)      last day (2582 days later) »