« first day (2319 days earlier)      last day (2526 days later) » 

11:02 AM
Ooh, that's nice
 
We're considering adding a system name which will allow access to the last returned result in APL's REPL. This is basically equivalent to TI-BASIC's Ans. What would be a good name for it?
APL system names begin with and are case insensitive, but usually written in uppercase. E.g. ⎕ANS or ⎕THAT.
 
Ruby uses _ because it can't be used as a regular variable
 
@JanDvorak Well, ⎕_ would be a possibility, but it does look cryptic.
 
In haskell it's it
 
@JanDvorak ⎕IT is cute.
 
11:12 AM
hmm, if I have a regex group like this ([("]), which matches an open parentheses or a double quote, how can I have a 2nd matching group that matches a closed paren if the first group is an open paren, or another double quote if the first group is a double quote?
 
Anonymous
@Adám ⎕RES or ⎕RESULT seems like a good choice
 
⎕ANS
 
Anonymous
@Mayube That's not how regex works
 
Anonymous
I think you'd need to use two separate groups (for quotes and parens) with positive lookbehind assertions on the ends
 
11:15 AM
but then again, "group $n was / was not matched" seems like a nice assertion to add to regex
 
Okx
@Adám ⎕APL_LAST_RESULT (taking it too literally :P)
 
@Okx Ugh, no way! You're joking, right?
 
Anonymous
⎕LAST or ⎕PREV might also be good names
 
Not too literal, just too verbose
I like ^^
 
@Okx For a while, we had a model implementation of it that used ⎕SE.Dyalog.LastResult!
 
11:19 AM
@Adám ⎕<-
 
@SIGSEGV What? ⎕← is already used.
 
Anonymous
⎕WHAT
 
Wait how to you type that letter umm
I'm on mobile
 
@Mego We have ⎕THIS :-P
@SIGSEGV Android?
 
@Adám Yeah
 
Hmm
I really need a planck keyboard tho
 
@SIGSEGV An ortho-linear one?
 
Yeah
 
@Mego oh wait can't I just match (.*) OR ".*"?
 
Or just a programmable one
 
11:25 AM
something like (\(.*\))|(".*")
 
@SIGSEGV On Android? Really‽
 
@Adám or not
I think I should make a USB-to-Bluetooth-and-Back-to-USB thingy so I dont need cable management
 
@SIGSEGV I make my own layouts on Windows.
 
\(. ?((?:\(.*\))|(?:".*")) ?((?:\(.*\))|(?:".*"))\) this is what I wanted, little ugly but matches perfectly
 
We really need custom layouts on android
I know I can make keyboards but meh
 
11:31 AM
@SIGSEGV The RIDE interface for Dyalog APL allows you to reassign your keys on the fly. You open the preferences (this displays a keyboard), then you can just click on a symbol and replace it.
 
Btw can anyone use google assistant on android 4.4
I have it on my 5.0 tablet (well that was quite a work) but I cant find a way for my phone
 
@ETHproductions Dang
 
Its extremely old
 
@ATaco Thank! You are the only taco I won't eat
 
I can upgrade to lollipop but 1.Using the official update needs an unroot 2.flashing a custom rom needs a wipe
 
11:38 AM
Will someone install Ataco userscript on the starboard?
I want to see if it works
 
11:49 AM
CMC: output the following
*
**
***
****
*****
******
*******
********
*********
**********
@PhiNotPi hi
 
@LeakyNun oh yay
 
Wasn't this a real challenge once?
 
@LeakyNun Braingolf: V9R#*[R!&@.v];
 
@PhiNotPi I think so; I don't care
 
oh wait hold on forgot about newlines
@LeakyNun Braingolf 18 bytes
hmm hold on @LeakyNun should it output an empty line first?
 
11:52 AM
@Mayube the output here is valid
 
10.times{|i|puts ?**i}
 
but why is there an input?
 
@LeakyNun leftover from something else I was working on, doesn't matter cos it's STDIN input, so braingolf ignores it unless explicitly read with i
Braingolf only implicitly inputs from args
 
@LeakyNun Charcoal, 5 bytes: G↘←χ*
A bit longer than I expected though :(
 
@LeakyNun GolfScript, 13 bytes: 10,{)'*'*}%n*
 
11:54 AM
@ASCII-only where is the 10 encoded?
 
10,{)'*'*n} for 12 if two trailing newlines are allowed
 
@LeakyNun χ I assume
 
Jelly, 7 bytes: ”*ẋЀ⁵Y
 
@EriktheOutgolfer it's even longer than Charcoal
 
@LeakyNun The preinitialized variable χ
 
11:57 AM
@LeakyNun maybe I can make it shorter...
also Charcoal is actually designed for such things
 
Anonymous
Actually, 7 bytes: 9uR'**i
 
actually actual Actually actually ties actually actual Jelly o_O
 
seriously?
 
Jelly, 6 bytes: ⁵R”*ẋY
not anymore :P
 
@EriktheOutgolfer congratulations
 
12:00 PM
still not shorter than Charcoal >_>
 
@LeakyNun APL, 10 bytes: ↑'*'⍴¨⍨⍳10
 
Can definitely be golfed more
 
@Adám nice
 
Yes. Seriously. Seriously.
 
12:05 PM
@LeakyNun APL, 9 bytes: ↑,\10⍴'*'
 
@Adám nice trick
 
@LeakyNun Can we return a list of strings?
 
@Adám of course not
 
@TuxCopter yes it can: A,:)'*f*N*
 
What is that witchcraft
 
12:06 PM
> :)
 
yes it means increment each element by 1
btw markdown for that is > :)
 
@LeakyNun J, 8 bytes: ,\10$'*'
 
@EriktheOutgolfer B,'*f*N* if leading empty line is allowed
 
I guess not
since then it would be 0-10...
 
@LeakyNun Too bad you didn't choose # instead of *; it would have saved me a byte.
 
12:09 PM
@Adám how?
 
 
btw if non-whitespace output is allowed: AA,f#N*
(CJam)
 
@Adám O_o why is it in input
 
1
10
100
1000
10000
100000
1000000
10000000
100000000
1000000000
 
Heh, even A\nAB\ABC\n…ABC…J is shorter than <code>*\n**\n…</code>!
@ASCII-only That just executes the code in the session REPL. I do that for CMCs so I don't have to go define a function and then call it.
 
12:13 PM
⁵*ḶY in Jelly...
 
@EriktheOutgolfer Seriously?
 
@Adám Oh cool
 
yes but not stars
it's the output I posted above
 
@Adám So you're abusing both the language and TIO? lol
 
@TuxCopter How are those abuses?
 
12:14 PM
For TIO I don't think executing an REPL was intended
 
@TuxCopter For APLs, there is no difference between STDIN and REPL.
 
ooh, making progress on my "real" interpreter, got the parser side if it mostly working :P
 
0
01
012
0123
01234
012345
0123456
01234567
012345678
0123456789
CMC: ^^
 
@Adám nice, my first instinct was ↑'*'⍴⍨¨⍳10
 
jelly, 5 bytes
which 5 bytes they are is left to the reader as an exercise
 
12:22 PM
@LeakyNun Oh, I thought it was bytes.
 
@Adám ...
 
You have 2^40 guesses
 
@KritixiLithos So was mine.
 
hmm, think this might be outside the scope of regex...
 
@Adám Charcoal, 13 bytes: M¹⁶→UBγ0G→↓χ
 
12:24 PM
@Mayube What? Parsing HTML?
 
Okx
@Adám 05AB1E, 7 bytes TƒžhN£, also works: TƒžhN£»
 
:| so long
 
@Adám hahaaa no
also obligatory HE COMES
 
4426
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

 
nah i'm trying to catch a variable amount of arguments for a function in a lisp-like language
 
12:25 PM
@Okx 5 bytes: žh.p»
 
@ASCII-only I'm disappointed. I thought Charcoal would be good at such.
 
if there are exactly 2 arguments I can do it no problem, but when there aren't... things get tricky
 
@Mayube it sounds pretty easy, example?
 
@LeakyNun 5?
 
Okx
@Emigna Forgot about .p
 
12:25 PM
@EriktheOutgolfer yes
 
@Adám sorry but it's numbers D: charcoal doesn't like numbers
 
@Adám Charcoal, 14 bytes (longer but same method as before): G↘←χ0123456789
 
@EriktheOutgolfer what?
 
12:28 PM
Retina, 19 bytes, Try it online!
outputs two trailing newlines
 
@LeakyNun oh right...what? yeah, that if you can beat me ;)
 
@ASCII-only the function looks like this (p a b), where p is the function name, a is the first argument, and b is the second. There will never be more than 2 arguments, but there may only be one. The arguments can either be a number literal 0123, a string literal "foobar", a variable name foo_bar or another function (p a)
 
@EriktheOutgolfer no way
 
full program
 
Jelly, 4 bytes: ⁵RḶY
(yes, rly.)
 
12:30 PM
@Mayube Okay there's recursion meaning it depends on your regex flavor
 
javascript regex
 
@LeakyNun I had ⁵Ḷ€Y with fewer links but whatever
 
@Mayube then no because recursion
 
@EriktheOutgolfer Sley
 
but seriously why are you using regex for parsing
 
12:31 PM
oh and for the record if the argument is another function, I don't need to parse into that function too, I just need to return it as a string
 
@Adám what sley?
 
@EriktheOutgolfer That's what your code looks like.
 
@EriktheOutgolfer (yes, ley.)
 
so (p (p (a "b")) (p (a "b"))) should return the argument "(p (a \"b\"))" twice
 
my code looks like "hey"
Leaky's looks like "SRSLY?!?!11"
 
12:32 PM
@Mayube O_o what 0/10 it's very inefficient
 
50 brownie points for doing it in Jellyfish
 
@ASCII-only no?
 
Okx
@LeakyNun Doing the 0123456789 triangle?
 
@Okx yes
 
@Mayube well you'll eventually need to parse the inner function call right?
 
12:33 PM
and another 50 brownie points for doing it in Pyth
and yet another 50 brownie points for doing it in Brachylog
 
@ASCII-only yes, but this is parsing, not interpreting
this is taking code input and parsing it into a json representation of the code, which can then be passed to the interpreter to actually run
 
@Mayube Yes so the more times a function is nested the more times it is parsed
 
a given function is only parsed once
 
@Mayube No? you have to detect the function as an argument (or part of one), then parse the function
 
if you parse function (p (p (a "b")) (p (a "b"))), it finds the function name p, then the 2 args (p (a \"b\")) and then parses the args into their own json objects, which are contained within an arg array of the parent object
 
12:36 PM
yeah if you want to do that write a parser not a regex
a regex would have to work layer by later
 
Okx
Is this question a dupe or not? People can't seem to decide codegolf.stackexchange.com/questions/124414/dankify-this-string
 
@Mayube Will argument names ever be >1 char long?
 
@LeakyNun I deserve brownie points for this? jmjkUdST
 
so that function would become something like {"func": "p", "args": [{"func": "p", "args": [{"func": "a", "args": ["b"]}]},{"func": "p", "args": [{"func": "a", "args": ["b"]}]}]}
 
@EriktheOutgolfer yes
 
12:38 PM
@ASCII-only yes
 
Okx
@EriktheOutgolfer jmjkUdST
 
@EriktheOutgolfer jjLk._UT interestingly for the same number of bytes
 
like I said, I already have this working if there are exactly 2 args
 
@Okx what's the difference?
 
just doesn't work for a variable number of args
 
Okx
12:39 PM
@LeakyNun between?
oh
You don't get my humour :P
 
@Okx I don't
 
@Mayube ew objects = slow
 
...
I'm writing an interpreter in javascript I clearly don't care about speed
 
@Okx I don't either
 
@Mayube JS can be fast as well
 
12:41 PM
@Mayube Actually what you should do is transpile that object to JS and execute it
 
@Mayube Also you don't want an interpreter than runs in 1 hour when it could run in 0.01s
 
It'll be faster
 
@LeakyNun ._ <int> should default to ._U...
...but it doesn't
 
@Mayube what are valid identifier characters
 
@EriktheOutgolfer it's the sign of <int>
 
12:42 PM
@ASCII-only for a varname? [a-zA-Z_]
 
@LeakyNun oh so that's why it needs the U tacked there
 
@Mayube Same with function right?
 
@ASCII-only yes
@ASCII-only err no sorry, function names can be [^\s()<>{}[]0-9"'`]
 
So 1 is a valid function name? oh
 
fix'd
there that's everything :P
 
12:46 PM
@Mayube so ]0-9"'`] is a valid function name? O_O
 
no?
 
your regex says it's valid
 
^ at the start
 
I break your regex into [^\s()<>{}[], 0, -, 9, ", ', ` and ]
the first part has a ] which closes it
 
that's because you're being pedantic about escape characters
 
12:48 PM
@Mayube That makes f1 invalid
 
if you use common sense you can obviously tell the first ] is supposed to be escaped
 
The regex should be [^\s()<>{}[]0-9"'`][^\s()<>{}[]"'`]*
 
@TuxCopter correct
f1 is invalid
 
@Mayube hmm not grave?
@TuxCopter No
 
12:50 PM
@ASCII-only you mean backtick? It's in there
 
[^\s()<>{}\[\]0-9"']+`
@Mayube I wonder why :P
 
0
A: Sandbox for Proposed Challenges

OkxAppending Numbers code-golf string A fairly simple challenge: You will receive two inputs, a string and a number. If the string does not end in a number (ie, it does not match the regex \d$), just append the number to the end of the string. If the string does end in a number (ie, it matches th...

 
[^\s()<>{}[\]0-9"'`]+ there, a properly formed regex for matching valid function names
 
CMC: return/output \n (backslash N – not a newline)
 
@Adám Braingolf 7 bytes "\\n"&@
 
Okx
12:53 PM
@Adám Charcoal, 2 bytes: \n
 
@Adám Braingolf, 6 bytes #\#n&@
 
@Okx That'll be hard to beat.
 
Okx
Definitely
Neim can do it in 5 bytes: (\n)B (but it is awful at string things)
 
@Adám Decimal/09D, 18 bytes 11092D11110D301301
 
APL, J: '\n' K: "\n"
 
Okx
12:58 PM
What if we don't use \ or n in our code? (downvote, don't do X without Y :P)
 
@Mayube ! Now I want to see a Java answer.
 
@Adám Fission, 6 bytes R"\n";
 
I still have no idea how to do the 0123456789 triangle in Jellyfish...
 
@Mayube Doesn't work for 1 arg though
 
@ASCII-only correct
 
12:59 PM
@LeakyNun i'll try soon lol but have things to do first
 
and thus far my attempts at making it work for 1 arg cause it to see 2 args as 1 big arg
 
@Mayube Which is why a parser so so much better and easier and more readable and faster
 
@Adám C#, 10 bytes ()=>"\\n";
:37885622 Braingolf always has and always will be a mess because I'm too lazy to re-write the interpreter to not be a POS
same reason it still doesn't support nested loops or conditionals
 
Okx
POS?
 
RProgN, 3 bytes. "\n
 
1:02 PM
Piece of S**t
 
Okx
Ah I see :P
 
@Okx Point Of Sale
 
@ATaco also Pyth
 
does pyth not have \n escapes?
 
oh wait it does?
hmm...
 
1:04 PM
I have no idea, I'm on my phone
 
Okx
Jelly, 05AB1E, Pyth (the list goes on) all use messy code for their tokens D:
 
@Mayube Looks similar to ;# code.
 
Okx
RProgN2 is good though xD
 
1:04 PM
Oh, you like my token system?
 
Okx
I think it's split into classes, right?
Each token
 
Yeah
 
@Adám Jelly, 3 bytes: ⁾\n
 
Pff, RProgN is the OG 3 byter
Anyway, I need to sleep. Good night
 
1:07 PM
@Okx Carrot does it at a close three, \\n
 
@Adám Fireball, 5 bytes "\n"☺
 
@Mayube ☺
 
@Adám Fireball operation for "pop and print"
(fireball uses CP-437 encoding)
right @Okx?
 
@ASCII-only what is this?
 
1:10 PM
@KritixiLithos bored so writing a parser for mayube's lisp lang thing
 
1
Q: Exploring the xorspace

GrimyThe xorspace of a set of integers is the set of all integers that can be obtained by combining the starting integers with the usual bitwise xor operator (^). For example, the xorspace of (8, 4) is (0, 4, 8, 12): 0 is 4^4, 12 is 4^8, and no other numbers can be reached. Your goal is to write the ...

 
@ASCII-only you can do +[->---[-<]>-]>.>-[>--<-------]>. using esolang constants
 
0
A: Sandbox for Proposed Challenges

WossnameChallenge Decode an RS232 signal and output the message as ascii. The signal is provided to you in the following format... -----------_---___-_----_----_--_-----___--_--_-------__--__--_--------------------- ...which decodes as "Golf". The protocol is RS232, specifically: LSB first, 8 data ...

 
@Mayube what is a valid string
Also are decimals valid
 
hi all.. any Rust people in? Or, how do I run Rust code that has been given as an answer?
In windows
 
1:23 PM
@Lembik TIO :P
 
@ASCII-only Sadly I have to time it on my laptop :(
 
I have installed rust!
but you cant just compile rust code it seems
 
@Lembik oh then rustc <file>
@Lembik Does it error or something?
 
hmm.. let me try that again
2 secs
 
1:33 PM
@ASCII-only a valid string is ".*[^\\]"
 
@ASCII-only I was completely wrong. rustc worked!
thank you
 
1:48 PM
my question is crying out for one of our resident combinatorics geniuses to get their teeth stuck in :)
 
2:03 PM
0
Q: What is Big O notation?

Beta DecayI've never answered a fastest code challenge, or challenges which are about efficiency because they require you to score your program using Big O Notation. Now, I've seen a lot of these questions and still have no real clue what Big O Notation is and how to write a program accordingly. So: W...

 
@ASCII-only jsfiddle's just completely crashed now
 
@Mayube lol sorry
 
^ is this on-topic? Seems general-programming
 
well we do use it quite often...
should it be on meta?
 
@totallyhuman yes
 
2:11 PM
how can you find all the users that have answered any of your questions?
 
@NewMainPosts I asked that question in chat not long ago
 
@Mayube sorry here
@Mayube oops again sorry
 
@totallyhuman I dunno. It's​ most definitely relevant for this site :P
 
@ASCII-only jsfiddle's collaborate sux, get it working then just send me a non-collaborate jsfiddle link :P
 
it's a good question because i didn't what it was either lol
 
2:21 PM
@Mayube another collaborate link :P but i've fixed it and added infinite loop prevention
 
i just segfaulted on tio
>.>
guess what language i was using
 
@totallyhuman Jelly :P
 
2:23 PM
 
> /srv/wrappers/shp: line 3: 30192 Segmentation fault (core dumped) /opt/shp/shp .code.tio "$@" < .input.tio
 
@Mayube I think it's fixed btw
 
FR: chat interface for tio.run
 
2:24 PM
oh god no
ohhh
i totally forgot the while loops check the accumulator in ;#+
>.>
 
 
Um wot
 
Shift
Shift Shift
 
2:40 PM
That's ... shifty
 
where can I buy it?
 
Tab
 Backspace
Esc
    Delete
 
And uh... why is the number pad on it backwards
 
@Riker link?
 
2:44 PM
$575!?!?!?
 
Okx
@Mayube You can just use "\n, Fireball has implicit printing
 
@Riker hmm... this inspires a where you can only use your left/right keyboard
 
I only have one keyboard
 
@Okx ooh
 
2:51 PM
*left/right part of your keyboard
 
Okx
@Mayube You're never going to outgolf the author of a language :P
 
Wth Dvr cn t wth st th rght hnd sd nd lv t th rst nd stll b ndrstd.
 
@Riker You can see the right half keys really small in the center of each key
 
Translation: With Dvorak you can type with just the right hand side and leave out the rest and still be understood.
 
1
Q: I <3 conditionals

ArtyerYou end up having a lot of very long, boring-looking conditionals in your code: if flag == 1: while have != needed: if type == 7: These can be transformed into their much more lovable <3 conditionals counterparts: if abs(flag - 1) + 2 <3: while 3 - abs(have - needed) <3: if 2 + abs(type...

 
2:54 PM
Do you think left shift key should be <<
Cause, uhh
Bitshifts
Bit 'shift'
 
no
 
oh no 0% battery remaining
 
Yes
That is funny
 
bye i guess
windows actually shows 0%
 
@ASCII-only Goodbyte :_(
 
2:57 PM
Good'byte' Good typo
 
Yeah I saw it but it is not needed fixing
 
:^(
 
0
A: Sandbox for Proposed Challenges

ArtyerCollatz Bearings Everyone knows the collatz conjecture. It is that this function: when repeatedly applied on a positive non-zero integer will reach one. There are many ways to visualise this. Inspired by this post, with the original source of this method here, this is how we will do it: Sta...

 

« first day (2319 days earlier)      last day (2526 days later) »