« first day (1723 days earlier)      last day (3227 days later) » 

2:53 AM
beer!> Hey, arg
 
@uselesschien "ReferenceError: Hey is not defined"
 
 
2 hours later…
4:36 AM
@argentum47 yo
 
5:04 AM
@AwalGarg hi
 
@argentum47 sup
 
I was working on the plugin..
 
yay!
 
but I am stuck as to how should I do it :P
 
code?
 
5:07 AM
(function() {
  bot.addCommand({
    name: 'b> ',
    fun: babelTranspile,
    permissions: {
      del: 'NONE'
    }
  });

  // bot.listen(/^b?>\s(.*)$/,
  //            tanspilerListener
  //           );

  function babelTranspile ( args ) {
    var command;
    setTimeout( function() {
	    IO.injectScript( 'https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.js' );
    }, 1000 );

    command = args.parse();
    // lost,should I call prettyEval
  }
}());
 
have you pushed this to your github branch?
 
nope
 
If you can , I can put some comments on the specific line numbers. The present way to define commands is messy, to put it mildly.
 
you absolutely have to have a "finish" function, you can't just return a message object and have the adapter send it accordingly.
 
5:10 AM
ok, I was trying to figure out how are the things wired
 
they are just scrambled around here and there to make it "just work". no definite structure.
 
it is not possible, in the present way the code is laid out, to write a document explaining the flow of how a command is parsed and output is sent out. (atleast without as many exceptions as the number of LOC :D)
 
@argentum47 why is the listener commented out?
 
5:14 AM
couldn't figure out how to use it.
I tried to console.log args in the nudgeListener , but it was b=not logging anything
I figured that the callback function of the bot.command returned a string (native properties extended) and args.parse() returned the string after the command 'name'
 
@argentum47 nope. I added (and more coming) line notes.
@argentum47 github.com/argentum47/SO-ChatBot/commit/… added some notes. if they don't help, I'll clone and patch :)
 
I am workig on them
 
cool, let me know if you get stuck
bananas
 
5:32 AM
I want to say, that why don't I pass teh babel.transform(args.parse()).code to bot.prettyEval , and then send the o/p to directReply!
although I would have to format it by adding a > in the frpnt
 
@argentum47 yeah you can do that as well. adding a comment for that.
@argentum47 done
 
in the bot.js file ... line 376 , the last line of bot.Command function, you were saying of a callback function, what function is the callback function in the babelTranspile would refer to ..
 
@argentum47 bot.js line 376 doesn't seem to have anything to do with eval :/
 
ok, wait let me check the callback function.
 
which callback?
 
5:46 AM
the one you are talking .. cb.call
 
@argentum47 that is some dark magic thingy which only zirak can explain
 
!! echo !! echo !! echo !! wtf
 
@uselesschien "SyntaxError: missing ; before statement"
beer!> echo !! echo beer!> wtf
 
I was thinking, if there was someway in javascript one can do callback.call( thisArg, console.log.apply) and then it would print whatever everywhere it went, then it would be easier to track the code :D
 
5:51 AM
!!> echo !! echo !!> wtf
!! echo !! echo !! wtf
 
beer!> on?
beer!
 
my server is n't running
 
why :/
I wanted to start a loop
 
@argentum47 was possible with arguments.caller which is now deprecated
 
I don't drink beer this early
 
5:52 AM
cap invokes arg, arg invokes cap
 
@uselesschien bot doesn't listen to itself
 
What if there are two bots?
 
I are in mindjail ..
 
cool
 
5:58 AM
beer!b> class Test{}
@argentum47 "SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode"
 
beer!b> (function () { "use strict"; class Test {} })()
 
@AwalGarg "SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode"
@AwalGarg "ReferenceError: b is not defined"
I think he plugin isn't loaded
 
push your changes again
 
waits, I had an unwanted change
beer!b> class Test{}
@argentum47 That didn't make much sense. Maybe you meant: b>
 
lul
 
6:02 AM
beerb>
 
!!>
 
@AwalGarg "undefined"
 
pushed
 
beer!
 
@uselesschien That didn't make much sense. Use the !!/help command to learn more.
Error 502 occured, I will call the maid (@Zirak)
 
6:04 AM
beer!b> \0
 
@AwalGarg "SyntaxError: Unexpected token ILLEGAL"
@AwalGarg That didn't make much sense. Maybe you meant: b>
@AwalGarg That didn't make much sense. Use the !!/help command to learn more.
@AwalGarg That didn't make much sense. Maybe you meant: b>
 
@argentum47 why do you have a space after the command name?
 
wait I has a mistake
yup, no
 
beer!> echo !! echo hey
 
@uselesschien "SyntaxError: Unexpected token :"
 
6:06 AM
y u stop your server
 
beer!b> class Test{}
@argentum47 That didn't make much sense. Maybe you meant: b>
bcoz I has to make changes
@uselesschien "SyntaxError: Unexpected token !"
beer! b> class Test{}
@argentum47 That didn't make much sense. Maybe you meant: b>
whats a 409 ?
 
beer!b> class Test {}
 
@uselesschien That didn't make much sense. Maybe you meant: b>
beer!b> class Test {}
 
ok, /i have an error .. \m/
@argentum47 Could not process input. Error: unknown: Unexpected token (1:5)
1 | class,Test,{} :O
why would it add ,
beer!b> class Test {}
@argentum47 Could not process input. Error: unknown: Unexpected token (1:5)
coz my args.parse() is ["class", "Test", "{}"]
beer!b> class Test {}
 
6:12 AM
@argentum47 why are you doing args.parse()?
 
@argentum47 Could not process input. Error: Cannot read property 'toString' of undefined
dunno, I thought it stripped away the b> from the command
beer!b> class Test {}
 
just use args
 
ok
@argentum47 "use strict"
beer!b> let a = 1; console.log(a);
@argentum47 "undefined" Logged: 1
and I tried callback.toString() but callback is undefined
 
why would you toString callback o.O
 
I wanted to see the function
!!> function foo() {}; foo.toString();
 
6:17 AM
@argentum47 "function foo() {\n\"use strict\";\n}"
 
It is only passed for some inbuild magicals
 
and does not happen always
beer!b> let a = 1; console.log(a);
@argentum47 "undefined" Logged: 1
 
best! foo
@AwalGarg That didn't make much sense. Use the !!/help command to learn more.
best! define foo
...
 
pushed the changes
I have a doubt, whatif the IO.injectScript( 'https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.js' ); fails in the first line ?
 
(was just inspecting the signature of the args)
 
6:22 AM
this thing should go in te eval.js?
 
@argentum47 bot fails :D
 
Where is bot.invocationPattern?
 
in bot.invocationPattern
 
nvm. found it. source/bot.js
 
bot needs to be rewritten
:P
 
6:25 AM
beer!b> let beer = "lots of beer"; beer
@argentum47 "lots of beer"
 
beer!b> (function * () { for(;;) console.log((yield)); })(5)
 
@AwalGarg "ReferenceError: regeneratorRuntime is not defined"
 
@argentum47 you forgot including the polyfill
 
:/
 
6:27 AM
@AwalGarg {}
@AwalGarg {"value":"undefined","done":false}
@AwalGarg {"value":"undefined","done":false}
 
beer!b> (function * () { for(;;) console.log((yield)); })(5)
@argentum47 "ReferenceError: regeneratorRuntime is not defined"
 
Awful formatting
 
disable transpiling generators and templates anyways
both chrome and FF have them for a long time
so makes no sense
infact transpilation of generators makes code slow as hell
 
beer!> navigator.userAgent
awwww
 
beer!> (function * () { for(;;) console.log((yield)); })(5)
 
6:32 AM
formatting is not my effing fault, 4 space 8 space... no space, tab-width of how much isn't specified .. has to ask florian
 
Use tabs
 
beer!b> (function * () { for(;;) console.log((yield)); })(5)
 
See ./style.md
 
@argentum47 "ReferenceError: regeneratorRuntime is not defined"
@AwalGarg {}
 
see?
 
6:32 AM
@uselesschien tab width of how much
 
native supports it :)
@argentum47 tabs don't have width
 
babel sucks
 
@argentum47 tab width of one tab?
A tab is a tav
tab
 
You use two spaces, amiryt?
 
6:34 AM
yeah
 
u!
u!>
 
I included the browser polyfill but then what happened?
 
beer!b> regeneratorRuntime
 
@AwalGarg "ReferenceError: regeneratorRuntime is not defined"
that's a lie
 
6:40 AM
beer!b> babel
@argentum47 "ReferenceError: babel is not defined"
 
u!
u!> let me = "die"
k
K. All I get is parseMessage invalid
 
@argentum47 you have to inject the polyfill in worker code not window
 
in the new Blob
 
:(
u!
u!
 
@argentum47 with the code that you send to bot.prettyEval
 
6:43 AM
u!> undefined;
 
i wish /i could #build browser-polyfill.js
 
huh
u!
 
beer!b> regeneratorRuntime
@argentum47 "ReferenceError: regeneratorRuntime is not defined"
beer!b> _babelPolyfill
@argentum47 "ReferenceError: _babelPolyfill is not defined"
beer!> regeneratorRuntime
@argentum47 "ReferenceError: regeneratorRuntime is not defined"
 
auto unstar script on
 
auto unstar?
oh god
 
6:54 AM
see the changes in the star queue
 
>>>>>>>>>>>>>>>>>>>>>>>>>>>.
I see
u!
@Zirak boy, accept my pr
 
I like how the star queue is behaving like a live leaderboard now :D
 
beer!b> regeneratorRuntime
@argentum47 "SyntaxError: Unexpected identifier"
 
u!> ..
u!
 
beer!u>
@argentum47 That didn't make much sense. Maybe you meant: b>
 
6:59 AM
!!u>
 
@uselesschien That didn't make much sense. Use the !!/help command to learn more.
 
u> lol
 
var workerCode = function () {
//#build browser-pollyfill.js
//#build codeWorker.js
}.stringContents();
why wouldn't something like this work? I downloaded te browser-polyfill
 
@argentum47 because build is only done at compile time, not dynamically
 
I want to write an autostart script
 
7:05 AM
autostart what?
 
autostar
 
my auto-unstar script will defeat you :D
actually, let's compete :P
 
@uselesschien such fail XD
 
what is happening
 
7:09 AM
I accidetally started flagging
lol
 
aaaand clear
 
> Awal is evil - Crockford
 
he is the necessary Evil
so Awal.constructor === Bane
 
I am indeed. The Dark Lord Awal Garg aka Rash
 
I can't star more than one a second :(
 
7:14 AM
!!give me a firefly episode
 
@AwalGarg Episode 4 - Shindig
 
> You have fully used your vote allowance for today
 
hahahaha have fun
well it is stupid to challenge the dark lord in the first place
 
lol
 
7:18 AM
@argentum47 you didn't get bored of bot code yet? :P
 
I are hulk
hulk angry
 
7:47 AM
Oh, wow, megahal.alioth.debian.org /cc @AwalGarg @argentum47
 
8:08 AM
@uselesschien available online to play? where?
 
@uselesschien megahal.alioth.debian.org/How.html it says available online but no link (section 4.5)
 
instead of writing our own algorithm of brain, why don't we understand how a real human brain works and implement that on metal :(
 
AI takeover.
 
8:15 AM
better than Modi takeover, TBH
 
hahahahahahahahaha
Never underestimate steam.
 
steam OS?
 
Nah, H2O
 
feels weird to talk in two rooms at the same time. can we do 3 instead?
 
8:35 AM
@AwalGarg rofl
 
:P
 
var input = document.querySelector("#command");
var blob = new Blob( [input.value], { type: 'application/javascript'})
var codeUrl = URL.createObjectURL(blob);
var worker = new Worker(codeUrl);
worker.onmessage = function(e) {
  console.log(e);
};
worker.postMessage(input.value)
what m I missing
 
8:58 AM
@argentum47 no errors?
 
no nothing
 
:/
 
wait let me add an error handler
noep doesn't get called
@AwalGarg well there is a code in codeWorker.js
var exec = function ( code, arg ) {
	return eval( 'undefined;\n' + code );
};
so its eval in the end
why create a worker then
 
because worker doesn't get access to the dom
 
eval( 'undefined;\n' + input.value ); :D but well my worker isn't getting called ..
 
9:07 AM
I ran your on about:blank as this:
var input = {value: 'alert()'};
var blob = new Blob( [input.value], { type: 'application/javascript'})
var codeUrl = URL.createObjectURL(blob);
var worker = new Worker(codeUrl);
worker.onmessage = function(e) {
  console.log(e);
};
worker.postMessage(input.value);
and it said: Uncaught ReferenceError: alert is not defined
so it is working here :/
 
input.value is a string .. maybe my chrome problem? lemm try in ff
o ic
sorry :P
 
hrm?
 
well, I think the total thing is fine, cos, If I put alert(1);in the input field I too get the same error.. so the error might be logical
 
@argentum47 in chrome, go to chrome://inspect
 
then
 
9:15 AM
in sidebar, see the worker section
 
check for workers?
ok
 
do you see your worker listed? (it should not be listed if your code is working properly)
 
no
there is a google doc worker only
 
so your worker is running
@argentum47 do worker.terminate()
 
still no
ok got it
chrome-devtools://devtools/bundled/devtools.html?&remoteBase=chrome-devtools-frontend.appspo.. ?
no not this I guess, this is codeschooldevtools
 
9:31 AM
@argentum47 :/
 
actually there has to be a self.onmessage in the codeUrl
i guess
 
10:00 AM
What's amberlight?
 
amber light
 
as in
?
 
yes
 
Ya, right.
I work there/ That, right there, is my cubicle.
 
 
10 hours later…
user1804599
7:59 PM
Noun: oxi m (genitive oxa, plural øxn or oxar)
  1. ox
 

« first day (1723 days earlier)      last day (3227 days later) »