« first day (1911 days earlier)      last day (2923 days later) » 

2:00 AM
For extremely narrow definitions of "learn"
 
Is there a faster way to parse a grammar rather than attempting all the things?
 
@Downgoat probably
 
pls tell
 
@Downgoat idk how to, but there usually is a better way than doing all the things
 
2:03 AM
probably not in grammars
e.g. If I have the grammar:
E -> α β
     ε
α -> ( E )
     L
     B
     P
     O E
β -> O E?
     ε
how would ii optimze
 
depends what type of grammar
 
@aditsu CFG
 
In computer science, top-down parsing is a parsing strategy where one first looks at the highest level of the parse tree and works down the parse tree by using the rewriting rules of a formal grammar. LL parsers are a type of parser that uses a top-down parsing strategy. Top-down parsing is a strategy of analyzing unknown data relationships by hypothesizing general parse tree structures and then considering whether the known fundamental structures are compatible with the hypothesis. It occurs in the analysis of both natural languages and computer languages. Top-down parsing can be viewed as an...
 
I came across an interesting "number puzzle" on social media.
 
@aditsu that is what I'm using
 
2:08 AM
1 + 4 = 5
2 + 5 = 12
3 + 6 = 21
8 + 11 = ?
 
it basically tries all the things
 
ugh pepper download faster I don't have all day
 
@PhiNotPi uh, 96?
 
Yes, but why that and not some other number? My first thought was "obviously there's infinitely many solutions"
 
2:10 AM
1 + 4 = 1 + 4(1) = 5
2 + 5 = 2 + 5(2) = 12
3 + 6 = 3 + 6(3) = 21
 
@PhiNotPi Method of finite differences
 
seems to work for most things
 
So, I went and tried to find other solutions of the form ax^2 + bxy + cy^2 + dx + ey + f
 
f(x+1,y+1) = f(x,y) + (x+1) + (y+1)
 
And, it turns out, regardless of what values of a,b,c,d,e,f I chose, that the answer was always 96.
 
2:12 AM
@Downgoat not sure what you mean by that, and it's been a long time since I did something like that, but I think there's a form of DP you can use
 
Also, does anyone see how this grammar could possibly enter an infinite loop?:
E -> α β
     ε
α -> ( E )
     L
     B
     P
     O E
β -> O E?
     ε
 
E -> α… -> ( E ) … -> ( α… ) …
 
@aditsu ಠ_ಠ
@aditsu but that's finite
there's no left recursion
 
What happens is that, since the sample points are linearly dependent (the second number is always 3+first number), the ax^2 + bxy + cy^2 + dx + ey + f polynomial simplifies down to gx^2 + hx + i, in which there's only three unknowns.
 
it's infinite
no left recursion indeed
 
2:16 AM
This means that, even though there's lots of solutions (x(1+y), or x(4+x), etc.) that produce different values for untested points, all of those solutions produce the same value for (8,11)
 
@aditsu oh
shit
any idea on how to fix
 
you want it to be left-recursive?
 
no, wait
no that won't cause inifnite recursion
 
then what do you want to fix?
 
what would be the input which would cause infinite recursion?
 
2:18 AM
it would be an infinite input
 
wat
 
So, I brought up that number puzzle because I thought it was interesting that, if not for the fact that the two inputs were linearly dependent, then there would be an infinite number of solutions (limiting ourselves to quadratic polynomials).
 
lim(n->∞) ("("*n ")"*n)
 
100 bytes, 8 languages!
 
If the last line were instead 8 + 12 = ? then it would be unsolvable.
 
2:22 AM
@PhiNotPi Isn't it, since there are three points, if the polynomial is f(n,n+3) = an^2+bn+c, there is only one solution?
Specifically, f(n,n+3)=n^2+4n
 
Or, I should of said, one was a linear function of the other.
 
@QPaysTaxes You can't define a quadratic from two points; you need at least 3
Given f(a,b), what is the relationship between a and b here? Is b a linear transform of a?
 
Every tutorial I've found for Pepper is in C++ :(
 
What's the more accurate term for... b is a linear polynomial of a?
as in, it can have a constant term, which it does here.
 
@PhiNotPi If b = ma + n, then b is a linear transform of a.
 
2:26 AM
Okay, then that's what I meant.
 
Which we can determine, since we're given ≥2 points on the line
 
I don't really have much more of a point to make, I was just trying to say "this is interesting, turns out the puzzle is only "solvable" because one input is a linear transform of the other"
 
Oh, ok. Lol
 
@ANerd-I It would also be funny if this were Python that lost its tabbing.
 
which languages use # as a comment?
 
2:32 AM
Perl
 
python
 
Python
 
coffeescript
 
ugh
Ninja'd
 
sumo'd
 
2:32 AM
ruby
bash
 
@CᴏɴᴏʀO'Bʀɪᴇɴ cheddar
 
Java if you squint really hard.
 
Thanks guys. Am working on a polyglot
 
bash
 
Even Google's examples are all in C++ even though I know Pepper has a C API
This is kinda annoying
 
2:34 AM
@Downgoat how do you output in cheddar?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ print
 
@CᴏɴᴏʀO'Bʀɪᴇɴ print(
 
but currently only numbers are supported
 
-int(-15/2) <-- what does that eval to in Cheddar?
 
2:35 AM
so like print 2+2 would work but print "foo" + "bar"
@CᴏɴᴏʀO'Bʀɪᴇɴ lemme run it through the call stack gen
 
You should use my language Element, it is really great and does all things.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ RunTime error as there is no int function
 
@PhiNotPi Does it have comments?
 
[citation needed]
 
@Downgoat aw :(
 
2:36 AM
You should use my language Arcturus, it <starts crying>
 
Comments in the form of "pushing a string on the stack and then deleting it"
 
@ANerd-I -1 for using - and not — or –
 
@Downgoat ok
 
@PhiNotPi how to write a string?
 
What languages use % as a comment?
 
2:37 AM
or docs
 
@ANerd-I postscript
 
Also, I totally missed what challenge this is for.
 
@ANerd-I brainfuck
@PhiNotPi Noncompeting entry to versatile integer printer
 
is HTML considered a programming language?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Isn't everything except the eight specific characters a comment?
 
2:38 AM
@ANerd-I that's the point ;)
 
<eyes>
 
@CᴏɴᴏʀO'Bʀɪᴇɴ docs are here
Make a string by literally having the string literal in the code.
 
So, like "asdf"?
 
Output is the ` character.
asdf
^ like that
 
@PhiNotPi what about phi's golfo supreme?
 
2:40 AM
Not enough functionality at the moment.
 
#El+"1"''(++)--[-[--<]>>--]<++++.j15+x#x
#~o+4                               ;n6<
print(-int(-15/2))
8 langs so far
 
nice
 
See how many you can guess.
 
bf, python
 
version of python?
 
2:41 AM
The program asdf`outputs the string asdf
 
@PhiNotPi oo that's helpful. what's terminate the program?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ both?
 
@Maltysen yes
@QPaysTaxes yes
4 / 8
 
@CᴏɴᴏʀO'Bʀɪᴇɴ lua?
 
@QPaysTaxes yes
@Maltysen nope
 
2:42 AM
<>< ?
 
@ANerd-I yes
The rest you don't know
^ nj
brainbash, reng are the other two
 
Well, the stuff beforehand is executed, but the results are never used, and the stuff afterwards is also not used (as long as you don't have another ` in a place that randomly causes it to print stuff)
 
@PhiNotPi So, 9` would print 9 and effectively do nothing else?
 
The only real concern is balancing brackets.
@CᴏɴᴏʀO'Bʀɪᴇɴ yes
 
What marks the start of the string?
oh
 
2:44 AM
Either whitespace or a non-alphanumeric character.
 
interpreter?
 
@Downgoat i actually saw a thing about HTML + CSS being Turing complete, as long as you have a person holding down the spacebar. Simulating some cellular automaton and leveraging the browser's element switching code to treat visible/nonvisible element differently.
 
@Downgoat you might be interested in en.wikipedia.org/wiki/CYK_algorithm
 
@QPaysTaxes Get to work. Write the number 9 every time I want you to.
 
:P
I gotta go.
 
@RenderSettings bu can it due primaiialiality checking is the questoin
 
@Downgoat It's Turing complete. So yes.
 
please giv sampl coed
 
@Downgoat I, uh, really don't want to have to try and put together a primality check simulation in Rule 110 :p
 
2:49 AM
i will giv you a +.500 bounty if you do
 
@CᴏɴᴏʀO'Bʀɪᴇɴ So... I think something up in the first line isn't happy with whatever arguments it received (run-time error or something)
^^ any further back in the source seems to cause an error.
So... IDK if you're going to be able to get it to work, sorry.
 
many Turing completeness proofs seem to go like "if you write these 20000 lines of code, it can simulate rule 34 110, which can simulate brainfuck, which can implement SKI calculus, which is proven in this 500-page book to be Turing complete"
 
@Dennis what process must a language go through to be put to TIO?
 
I'm getting a bunch of soundcloud spammers liking/following me.
 
@aditsu god this is actually completely accurate for Rule 110. it's like 4 layers of indirection to get a Turing machine, which is "will output a bit sequence xxxx iff the program halts"
/me glosses over the paper on compiling a Turing machine to Rule 110
This is not worth +500
 
3:05 AM
Man, Bicentennial Man is such a good movie...
 
Becomes human again and lives happily ever after?
 
Dammit, I just realized I'm probably gonna need to write my own module loader.
rip in perl quartata, killed by perlxs
 
3:26 AM
@QPaysTaxes Not the same, then.
@QPaysTaxes Oh, so it was the basis. In the movie, though, the robot is eventually declared human after all of his internal wiring and mechanisms were replaced with human organs.
Right.
Oh, I see, right.
Just read the plot summary on Wikipedia, and the story isn't quite the same. There are a lot of similarities though, especially the first part (before he gets his freedom).
@QPaysTaxes Hah, true.
 
3:47 AM
@Downgoat Step 1. Tell me which language. Step 2. Wait until I add it to TIO.
 
4:00 AM
8 bytes! \:D/
welp, that didn't last long :/ "Jelly, 3 bytes" - although that might not be correct, but it probably will take at most 1 byte to fix it
2
A: What's the missing column/row? (GCJ 2016-1A rankfile)

aditsuCJam, 8 - 10% = 7.2 With modified input/output formats, this works: Lq~]:^$p Try it online And here is the code I actually submitted at GCJ (24 bytes): li2*({l~}*]$e`{(2%*~}%S* Try it online Explanation: This basically lists the values that appear an odd number of times. L push an ...

 
@aditsu I just noticed the input format. That's not going to be pretty.
 
@Dennis "or modify the input format as you like"
 
Oh! Then all I have to do is sort, I think.
 
probably
looks like we got the "^" idea simultaneously
 
@aditsu That's actually what I did in Code Jam.
e# The CJam interpreter is available at sourceforge.net/projects/cjam

li{"Case #"V):V": "]o

li2*({[l~]}*]:^$S*

N]o}*
 
4:07 AM
oh I didn't know that, I just figured it out a few minutes ago
hmm, array of arrays, that makes it easier (as in shorter)
 
there's been a lot of challenges lately that come down to a mathematical trick
not sure how i feel about them
 
6 bytes ^_^ (still editing)
@Dennis you can claim the 10% bonus
 
Probably. Jelly is slow, but I don't think it's that slow.
 
@QPaysTaxes and three is 5 bytes
 
@aditsu I would have 3 bytes in pyth if we had a symetric difference
 
4:16 AM
@Maltysen I would have zero bytes if Jelly did this by default...
 
@Dennis hahaha
 
I still think everything should be counted in UTF-8
always
 
that's actually a really good idea
 
How about ascii?
That is what we actually type in (usually), and therefore, it should be counted in that.
 
@R.Kap that was my original idea, but that disqualifies APL so it's too contentious
 
4:19 AM
@R.Kap ascii doesn't allow all the characters, only the first 128 code points
also, ascii is the same as UTF-8 for the code-points it works for
 
0
Q: Which switches are on?

R. KapIntroduction Given an input of a block of string containing 1 or more of each character in !@#$^&*, output the coordinates of the switch(es) that is/are "on". A switch is a $, and a switch is "on" if and only if it satisfies at least 1 of the following criteria: It is surrounded by all ^. S...

 
@aditsu That assumes all submissions are character-based, which isn't true.
 
Are there any text encodings that aren't ASCII for the printable ASCII characters?
 
UTF-16
 
EBCDIC
And pretty much everything that came before ASCII.
 
4:21 AM
@Dennis Well, that's basically a given.
 
@Dennis all source code should be character-based
 
@QPaysTaxes unicode is a list of code points
utf-8 is the usual encoding, but there are others, like the custom one jelly uses
 
@QPaysTaxes no, an encoding is a mapping between code points and series of bytes
well, IMO, UTF8 is the encoding for Unicode :)
 
You know, I really must know, in Python, does chr() convert to utf-8 or asc-ii?
 
@aditsu We get quite a few submissions on a regular bases that aren't (TI-BASIC, machine code, Piet, etc.).
@R.Kap That depends on your locale.
 
4:25 AM
heh, "asc-ii"
 
Also depends on which Python
 
0
A: Sandbox for Proposed Challenges

R. KapWhich switches are on? code-golfstring Introduction Given an input of a block of string containing 1 or more of each character in !@#$^&*, output the coordinates of the switch(es) that is/are "on". A switch is a $, and a switch is "on" if and only if it satisfies at least 1 of the following ...

 
@Dennis machine code is not source code, Piet -> ASCII ppm, as for TI-BASIC, I say count the characters :p
 
@Dennis Locale?...
 
@aditsu You can save a byte by turning your program into a function.
In computing, a locale is a set of parameters that defines the user's language, region and any special variant preferences that the user wants to see in their user interface. Usually a locale identifier consists of at least a language identifier and a region identifier. On POSIX platforms such as Unix, Linux and others, locale identifiers are defined by ISO 15897, which is similar to the BCP 47 definition of language tags, but the locale variant modifier is defined differently, and the character set is included as a part of the identifier. It is defined in this format: [language[_territory][.codeset...
 
4:32 AM
@Geobits Yep, that was me. When I rain I pour.
 
obligatory ( ͡° ͜ʖ ͡°)
 
I waved at your kid as I was splattering on your windshield.
 
uh... ._.
 
oh jizz
@Dennis I think that's kind of a stretch… but maybe acceptable
 
@Rainbolt I'll make sure to let him know.
 
4:41 AM
@aditsu >:/
 
@Dennis looks like some odd smiley {:^$}
 
4:56 AM
Is it always possible to match a grammar specification with a language written in that grammar, or is that never possible?
 
I don't see why that wouldn't be possible
 
what do you mean by matching them?
 
Like, from a grammar specification, create a parser that will correctly parse that grammar to create a parser that etc... Kinda like a quine.
 
well, you can create a parser for a grammar, not sure about the 2nd "to create a parser" part
 
If I'm not mistaken, that wouldn't be too different from a language parsing itself, right?
 
5:05 AM
Yeah, I guess that's basically it.
 
user image
3
 
@phase That's amusingly relevant to jQueryOS or AvocadOS or whatever they decided to call it
 
@AlexA. why I just made it and posted it in this chat
 
Oh I didn't realize you made it
 
@AlexA. toollll
 
5:10 AM
This is amazing
 
Kids, there’s nothing cooler than having a clean desktop. #SonicSez https://t.co/NtqKB1jGLS
 
@phase how did you know what I'm doing right now? I mean, who does that?
(jk, I use gcp anyways)
 
 
@phase what
 
5:17 AM
 
a soya programmer ^
 
@aditsu lol @ author Bill O'Reilly
@Maltysen Is that drugs?!
 
@AlexA. google cloud platform - not even once
 
user image
6
 
XD
 
5:25 AM
> Easy as magpie
Excellent.
 
@QPaysTaxes a few ways, depends on the situation
is it a for loop?
where do you want to break?
so you can nest inside a function and return, but I think a for else: might be better
^^ oh for-else is perfect
for literal in literal_types:
	if condition:
		break
else:
	continue
 
For what it's worth, this is the first time I'm reading anything about for-else. :P
 
that doens't exactly work, but you get the idea
 
I think I only even heard of it days or weeks ago.
 
they also work on while loops
one of python's coolest features imo
 
5:41 AM
@Maltysen -1 billion for using tabs
 
yeah that code up there might not be exactly correct
@AlexA. fricken text boxes online
actually, brb copy-pasting tabs
damn it, its been 2 minutes
 
Tabs do show up in code blocks here. They just render as 8 spaces.
 
@Maltysen >:D
 
@Maltysen fixed
@AlexA. eleven
 
D:<
 
5:50 AM
@Dennis \o/
 

« first day (1911 days earlier)      last day (2923 days later) »