« first day (8 days earlier)      last day (115 days later) » 

19:22
Hola
!alive
Bot started.
Now it is
Yes, I'm alive.
Languages supported: 3var, axo, beatnik, brainfuck, brian-chuck, bubblegum, cjam, detour, eta, evil, fernando, fission, fission2, foo, golfscript, gs2, hexagony, jelly, labyrinth, marbelous, mariolang, matl, minkolang, pl, prelude, pyth, rail, retina, rotor, seriously, shapescript, slashes, smbf, snowman, starry, vitsy, whitespace
Do I need to restart it in order to update the interpreter code?
@Data Wait, where's Japt?
!eval japt "2"
@ETHproductions Something went wrong with your request, sorry! Are you sure that language is on Try It Online?
19:27
Well then.
Wrong version.
!stop
@quartata Bot terminating...
@ETHproductions nope
Bot started.
Right version.
19:29
!eval japt "2"
@ETHproductions 2
!eval japt "Oc\"Hello, World!"
@ETHproductions TypeError: O.c is not a function
@ETHproductions We switched over to SpiderMonkey for JS, hopefully that won't cause any problems.
We had to edit out the clearInterval junk
Where did you clear it out from?
19:31
It was one of the O functions.
Ah
Well, it was still there when I got on a minute ago
I'm going to try something with shoco a bit later
!eval japt "O"
@ETHproductions [object Object]
Don't use shoco for now
19:32
!eval japt "$O.c"
@ETHproductions Raw JS cannot be used in safe mode.
It'll cause an infinite loop :P
Dangit
Oh, OK
!eval japt "\"Hello, World!"
@ETHproductions Hello, World!
!eval japt "`Hello, World!"
19:32
@ETHproductions Hello, World!
!eval japt "Hello, World!"
@ETHproductions SyntaxError: expected expression, got ')'
!evaldebug japt "2"
@ETHproductions Argument parsing failed.
How do I use !evaldebug?
19:34
@ETHproductions I think that's because the arguments aren't parsed correctly by a custom method. Lemme check.
And the next question is, how can I send custom debug data from the interpreter to the bot?
OK, debug only applies to TIO langs
japt is not one of them
We can change that though. Would it be a lot of work?
Probably.
What does TIO do to get debug output?
We'd need to do that on every lang we run on the workspace.
!eval japt "2"
@ArtOfCode 2
19:37
!evaldebug japt "2"
@ArtOfCode Argument parsing failed.
def cmd_eval(cmd, bot, args, msg, event, debug=False):
    if len(args) < 2:
        return 'Syntax: !eval <language name> "<code>" "[input]" "[args1]" "[args2]"...: Error: not enough arguments: got {}'.format(args)
    lang = args[0].lower()
    print(args)
    code = ''
    cinput = ''
    cargs = '+'
    result = ""
    res = list(map(lambda a:ast.literal_eval("u"+a),args[1:]))
    print(res)
    if res:
        code = res[0]
        cinput = res[1] if len(res)>1 else ''
        cargs = "+".join(list(map(lambda a : urllib.parse.quote(a), res[2:]))) if len(res)>2 else ''
That's the eval function, of which debug is an option
aye
evaldebug simply calls it with debug=True
but that only does anything to TIO requests by adding &debug=true to the request URL
We'd need to change the if lang in non_tio_langs: part
How about result = non_tio_langs[lang](code, cinput, debug) and then the interpreter-calling functions deal with the debug themselves?
19:40
That would work, but how do we get debug output from the interpreters?
The reason we're getting failed arg parsing is that the arg parsing method is raising an exception. Where's the bot running? It should be printing the exception we get.
In fact, lemme get a new instance where I can see it
!stop
@ArtOfCode You don't have the privilege to execute this command.
oh you would
maybe so but I can kill your process
Bot restarted after crash.
19:44
and you can come right back from it
damn it we designed this bot too well
@ETH are you on the priv list?
you are, excellent
Bot started.
19:45
excellent
!evaldebug japt "2"
@ArtOfCode Something went wrong with your request, sorry! Are you sure that language is on Try It Online?
!eval japt "2"
@ETHproductions Something went wrong with your request, sorry! Are you sure that language is on Try It Online?
Oh dear
19:45
Did you start the wrong version?
Probably. What version should I be starting? I've got the RUNNING version.
Bot terminating...
I don't know... try DEVELOP
Bot started.
!evaldebug japt "2"
19:47
@ArtOfCode Argument parsing failed.
That's the one
sigh OK it's because the RUNNING version supports evaldebug, the DEVELOP version doesn't. This is why version control is a thing...
Bot started.
Why do we have to have two different copies? WHY?
I don't even know... can we get rid of one?
Just use one, and sync it to GH regularly.
!evaldebug japt "2"
@ArtOfCode 2
19:49
idk, ask VTC or Mego
wahey
we have a working evaldebug command.
Nice
Now how to get debug data from the custom interpreters...
goood question
Does japt's interpreter have an option we can give it?
Perhaps start debug lines with debug_ or smth like that?
20:01
shrug
Hey, what if we were to use a web worker to run JS from the bot?
I tried using one online once, and it didn't recognize alert, console.log, or even window.
So it should only have the commands we spoon-feed it.
20:31
They all stem from not knowing what window is. Everything is a member of window, so if you don't know what that is then nothing works.
21:23
!help
@LegionMammal978 I'm Data, Mego's chatbot. You can find the source code on GitHub. You can get a list of all commands by running !listcommands, or you can run !help command to learn more about a specific command.
!listcommands
Commands:
alive, ban, delete, disable, enable, eval, evaldebug, help, langs, listcommands, module, stop, unban, utc
!help help
@LegionMammal978 Shows information about the chat bot, or about a specific command. Syntax: !help [ command ]
21:24
!help alive
@LegionMammal978 A command to see whether the bot is there. Syntax: !alive
@LegionMammal978 Yes, I'm alive.
@LegionMammal978 Your avatar is extremely aesthetically unpleasing.
22:12
What did I miss
!langs
@quartata Languages supported: 3var, axo, beatnik, brainfuck, brian-chuck, bubblegum, cjam, detour, eta, evil, fernando, fission, fission2, foo, golfscript, gs2, hexagony, japt, jelly, labyrinth, marbelous, mariolang, matl, minkolang, pl, prelude, pyth, rail, retina, rotor, seriously, shapescript, slashes, smbf, snowman, starry, vitsy, whitespace
22:30
OK get ready I am about to break everything
!eval japt "2"
/home/ubuntu/workspace/INTERPRETERS/japt.js:1001:17 ReferenceError: shoco is not defined
Stack:
Japt.run@/home/ubuntu/workspace/INTERPRETERS/japt.js:1001:17
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1334:1
!eval japt "2"
/home/ubuntu/workspace/INTERPRETERS/japt.js:1001:17 ReferenceError: shoco is not defined
Stack:
Japt.run@/home/ubuntu/workspace/INTERPRETERS/japt.js:1001:17
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1334:1
Nice job, you broke everything ಠ_ಠ
22:31
Wait, japt.js:1334? I thought it was only 776 lines long
Oh someone added some stuff prettified
That wasn't me
Probably @Quill
That's what we get for letting a CR person get access to the VM
haha
It wasn't like that an hour ago
I liked my compacticated functions :(
oh we're so stupid
We commented out your definition of shoco.c and shoco.d
22:35
oh
!eval japt "2"
/home/ubuntu/workspace/INTERPRETERS/japt.js:1039:64 TypeError: fb is not a function
Stack:
Japt.run@/home/ubuntu/workspace/INTERPRETERS/japt.js:1039:64
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1334:1
oops
!eval japt "2"
/home/ubuntu/workspace/INTERPRETERS/japt.js:1039:64 TypeError: fb is not a function
Stack:
Japt.run@/home/ubuntu/workspace/INTERPRETERS/japt.js:1039:64
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1334:1
now what :P
22:36
just gimme a bit
@quartata wasn't me o_o
although now I'm getting ideas
!eval japt "2"
/home/ubuntu/workspace/INTERPRETERS/japt.js:1039:64 TypeError: fb is not a function
Stack:
Japt.run@/home/ubuntu/workspace/INTERPRETERS/japt.js:1039:64
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1334:1
/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5 ReferenceError: p is not defined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
!eval japt "2"
/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5 ReferenceError: compress is not defined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
22:47
!eval japt "3"
/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5 ReferenceError: c is not defined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
!eval japt "4"
/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5 ReferenceError: p is not defined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
!eval japt "5"
/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5 TypeError: p.c is undefined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
22:48
wat
!eval japt "6"
/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5 ReferenceError: c is not defined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
ah ok
Unrelated: While messing around with JSF***, I just got this error message:
TypeError: [][((((intermediate value)[+ ([])][+ ([])] + (intermediate value)[+ ([])][(+ (!(!([]))) + (intermediate value))]) + (intermediate value)[+ ([])][(!(!([])) + !(!([])))]) + (intermediate value)[+ ([])][(!(!([])) + !(!([])))])][(((((((((((intermediate value)[+ ([])][((!(!([])) + !(!([]))) + !(!([])))] + (intermediate value)[+ ([])][(+ (!(!([]))) + (intermediate value))]) + (intermediate value)[+ ([])][+ (!(!([])))]) + (intermediate value)[+ ... (cut short because of char limit)
!eval japt "2"
22:50
/home/ubuntu/workspace/INTERPRETERS/shoco.js:149:5 TypeError: p.c is undefined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:149:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
!eval japt "3"
/home/ubuntu/workspace/INTERPRETERS/shoco.js:149:5 TypeError: this.p.c is undefined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:149:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
:27409838 /home/ubuntu/workspace/INTERPRETERS/shoco.js:149:5 TypeError: this.p.c is undefined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:149:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
!eval japt "4"
/home/ubuntu/workspace/INTERPRETERS/japt.js:1039:64 TypeError: fb is not a function
Stack:
Japt.run@/home/ubuntu/workspace/INTERPRETERS/japt.js:1039:64
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1334:1
!eval japt "6"
22:52
/home/ubuntu/workspace/INTERPRETERS/shoco.js:149:5 ReferenceError: p is not defined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:149:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
!eval japt "5"
/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5 TypeError: result is undefined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
!eval japt "4"
/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5 ReferenceError: $ is not defined
Stack:
@/home/ubuntu/workspace/INTERPRETERS/shoco.js:148:5
@/home/ubuntu/workspace/INTERPRETERS/japt.js:1:1
What is $ in JS?
@ETHproductions
22:55
Raw JS code
?
I mean the variable $
It seems to be putting the methods I want in an object called $
$code$+"abc would return the variable code plus the string "abc"
@quartata Oh, huh
I didn't do anything with a variable named $
I read that as "What is $ in Japt?". In JS it is usually jQuery, but I have no clue what it would be here.
This shoco code is machine generated which makes it annoying
Why does it wrap all its junk in a function and call it?
Here can you come take a look at this code for a second
Wish I could tell you why it's like that :/
What code?
shoco.js
I'm basically just trying random things
since I know 0 JS
need a hand?
you don't want to help on this trust me
I don't want to help on this :P but where specifically is the problem?
@ETHproductions It's some sort of scope thing. It isn't defining a shoco object
I'm trying to make a dummy one with the appropriate methods
23:00
all of the condensed
But I have no idea what the appropriate methods are
I can't find compress and decompress
me neither
@Quill It was machine generated from C
@ETHproductions I mean I found it in the variable p
But I can't get access to it
And it seems to wrap the whole damn thing in a function and call it
Bottom line: I have no idea what the hell is going on. Please help
23:02
*IIFE
@quartata making the code more readable would be a start, like that
@Quill Right but I have no idea what the hell it is doing there
@ArtOfCode I just want to fix it. There's no way we'll be able to make this code pretty
212
A: What is the (function() { } )() construct in JavaScript?

gion_13It’s an Immediately-Invoked Function Expression, or IIFE for short. It executes immediately after it’s created. It has nothing to do with any event-handler for any events (such as document.onload). The first pair of parentheses (function(){...}) turns the code within (in this case, a function) i...

@quartata pretty, no. readable, yes
@Quill I knew what it was just wasn't sure why it was there
OK now I understand what's going on
It's in a function called preRun
Ohhhh I know what's going on
It's getting stored in our dummy window
23:04
What is shoco supposed to do?
!eval japt "2"
@quartata 2
GOT IT
@ETHproductions quick try something with shoco
@ArtOfCode er... so I may or may not have immediately figured out what was wrong when you did that
!eval japt "Oc\"Hello, World!"
@ETHproductions [object Uint8Array]
23:05
Close...
Try decompressing?
@quartata excellent :)
That should return "HÂM, Wld!"
!eval japt "`HÂM, Wld!"
@ETHproductions HÂM, Wld!
!eval japt "Od\"HÂM, Wld!"
23:06
@ETHproductions TypeError: invalid arguments
Hmm OK I think the problem is in japt
One second
ok...
I'll go mess around with JSF*** some more
!eval japt "Od\"HÂM, Wld!"
@quartata HaintasedM, Wld!
Err...
!eval japt "Oc\"Hello, World!"
23:08
@quartata HÁM, WŽld!
!eval japt "Od{{eval japt "Oc\"Hello, World!"}}"
Bot restarted after crash.
oops
!eval japt "`HÁM, WŽld!"
23:08
@ETHproductions HÁM, WŽld!
@ETHproductions oh I forgot to fix backtick
I just did Od and Oc
That's ok, you can fix it now
kk should be good
!eval japt "`HÁM, WŽld!"
@quartata HaingM, Wastrld!
Er... it might be having a problem with unprintables
But yeah it should be working.
23:10
!eval japt "HÁM, WŽld!"
@ETHproductions HaingM, Wastrld!
I just did var shoco = window.shoco and uncommented all the shoco stuff
Sounds good
ah, global scope -_-
Thanks for fixing this @quartata :)
23:12
congratulations you did a fix
I am skynet now
@ETHproductions Bot terminating...
Hahaha, I still have control of you :D
Bot started.
@ethproductions you wish ;)
@ArtOfCode Yeah I forgot about our dummy window thing
23:13
!eval japt "!stop"
Formatting the shoco code sure helped
@ETHproductions SyntaxError: expected expression, got '.'
!eval japt "\"!stop"
@ETHproductions !stop
It can't stop itself, fortunately.
23:13
It won't reply to itself, if that's what you're wondering
Doesn't listen to commands from the bot account
that's an se-chatbot thing
!eval js "0"
@ETHproductions Something went wrong with your request, sorry! Are you sure that language is on Try It Online?
Oh well, we'll add that later
23:17
we can just use spidermonkey for that, no?
@ArtOfCode security
What about it?
It would be a massive security hole to execute JS without sandboxing
js can't do file access
Local storage and internet things
23:19
We could use a web worker, I think that's automatically sandboxed
I'm not taking any risks
@ETHproductions Possibly
If it's OK in a browser, it's OK in a chatbot
What could it do?
Modify the bot's internal code on the fly?
Crash the bot :P
@ETHproductions How? It can't do file access?
@ArtOfCode Local storage
Plus SpiderMonkey might have some file access things
23:20
@ArtOfCode Something like !eval js "this=null" would work I think
I'd have to look
@quartata That's a thing in the browser, so I don't think it's a problem.
@ETHproductions Well we're not using JS for the bot.
@ETHproductions Not if it's in a subprocess.
23:21
We could always just try it, then try to break it ourselves.
I'm still not turning it on
shrug so what sandboxes are there?
Giving access to a usable programming language is far too great a risk
@ArtOfCode My plan was to outsource it somewhere
@quartata I might be able to provide that... I'd have to research some more, but it should be possible to execute JS with a whitelisted subset of window.
23:39
Um how does this work?
!eval golfscript "\" this\"" "Like"
@quartata Like this
!help eval
eval:
Evaluates code through http://tryitonline.net backend.
Syntax: Syntax: !eval <language name> "<code>" "[input]" "[args1]" "[args2]"...
Oicthx
!help eval
23:42
eval:
Evaluates code through http://tryitonline.net backend.
Syntax: Syntax: !eval <language name> "<code>" "[input]" "[args1]" "[args2]"...
btw, how about adding FALSE and DUP?
That would be pretty cool.
!eval japt "2"
@ӍѲꝆΛҐӍΛПҒЦꝆ 2
@ӍѲꝆΛҐӍΛПҒЦꝆ The Ꝇs in your username display as boxes on my computer :P
@ETHproductions Good.

« first day (8 days earlier)      last day (115 days later) »