« first day    last day (47 days later) » 

1:55 PM
: add option to add language aliases (Java -> java-openjdk), and shorthand for specific languages (#Java -> #TIO run java-openjdk)
 
@SocraticPhoenix Right, but it should just be a shorthand for whatever string follows "#TIO " so that we can add boilerplate code before the actual code.
 
@Adám Ye, something like #TIO alias #APL #TIO run dylaog-apl %args%<- (<- is the arrow thingy... I don't know the actual symbols)
 
#TIO do apl-dyalog ⎕←2+2
 
then #APL whatever becomes #TIO run dyalog-apl whatever<-
@Adám I don't think the bot in this room is running the most recent commits; I haven't even uploaded a binary for it
 
#TIO run apl-dyalog ⎕←2+2
 
2:05 PM
@Adám
4
 
@SocraticPhoenix No worries.
#TIO apl-dyalog ⎕←2+2
 
@Adám Also newer version :)
 
#TIO run apl-dyalog ⎕←⎕AV[¯30+⎕UCS'g4;;>á#v>A;3ë']
 
@Adám
Hello, World!
 
 
2 hours later…
4:01 PM
#TIO version
 
4:26 PM
@Adám I've added some of the features you requested to the bot, but Thomas Ward is currently hosting the TIOBot under his AquariusOne account. I want to try and add/test all the features before pushing it
 
@SocraticPhoenix How can he test it if you don't push it?
@SocraticPhoenix He said to contact him for anything about the bot.
 
5:09 PM
@Adám test it in the sandbox
I can run it locally
What I mean is I can test the bot in the sandbox to try and iron out the bugs and then build it and send it to him
 
5:53 PM
#TIO help
 
hey it's still online :)
@SocraticPhoenix code in a config file solution and we can make an automatic pull/reboot process
so that i don't have to reenter the stuff every time to login
 
@ThomasWard hmm good idea; should the password and email just be in a json file or something?
 
@SocraticPhoenix we can, or we can make it its own Java file with constants that get included in the core runtime by importing them, and we edit the static values in the Java file. I have several python scripts where I have program_config.py which defines all the config arguments as static variables (complete wtih detailed comments on what is what), and that's imported throughout the program.
 
perhaps... I think the JSON might be easier though since java has compilation and stuff
 
6:03 PM
shrugs whichever
as long as we can define the proper format, that way we can make it a more 'unattended' process.
we may also wish to predefine join patterns, and after we're logged in loop through join commands pulled from configs.
if we're doing JSON, we can have an element of something like...
..., 'joins': {'STACK_EXCHANGE': [0,1,2,...], 'STACK_OVERFLOW': [58,73,..], ... }, ...
that way we end up with an automatic join process which means it's even more unattended
so we can set up default rooms, configuration options, etc. so that on startup things automatically join and power up
so if I reboot the server for instance it automatically turns itself on
i know this is starting to make it more complex, but it's a good way to make an unattended-startup bot
who knows I may go and find your code and port it to Python at some point, if I'm feeling bored with my other things :P
@SocraticPhoenix do you have an updated binary?
 
Not yet...
i will soon
 
TIOBot logged in!
 
mmkay, was merely curious
i hadn't updated yesterday to 0.0.2 either so :P
 
@ThomasWard that's fine; To get the auto join process fully featured is going to take a bit longer, but I should have a jar up soon that takes a -config=<file> flag and uses a JSON like {"email":"whatever@somewhere.com","password":"pa$$word"}
and google driving sync is arguing with intellij indexing and editing is going insane -_-
 
@SocraticPhoenix I could write a Pythonic representation of how we could loop over autojoin
you'd have to make a Java equivalent
but it wouldn't be that hard.
 
6:12 PM
@ThomasWard No that's okay - I mean, I know how to do it, I just don't think I'll have enough time right now
 
mmkay, well let's keep it on the radar for development but a 'when we get to it'
i'm happy to do manual autojoins and updates until then :)
 
I'd also want to try and let you run commands on join so it can auto-setup aliases and stuff (like, on join to apl set up the alias to #APL)
 
that's its own beast, we'd need ongoing config updates and storage to persist over reboots. But you're right.
i'm still real tempted to port this to Python because i am weird but... :P
it'd also be an interesting challenge for my learning :)
 
@ThomasWard It's open source and I can't stop you, so feel free :)
 
well i have my own hellish set of shit to do so
blah
 
6:15 PM
@ThomasWard Precisely; I can probably make it persist with json files... wouldn't be horribly difficult
 
indeed.
 
I realize I should probably give the bot itself permission to edit the aliases...
 
mhm
 
why won't it let me get the id of the user I logged in as -_-
 
because ChatExchange is chaotic. xD
in any case, i dropped a handful of Feature Request issues on GH
sue me.
:P
@SocraticPhoenix hope you don't mind the collaboration on this :)
 
6:23 PM
@ThomasWard I don't mind, but I don't have a huge amount of time... the "when we get to it" strategy is going to be prevalent...
 
that's every project :)
i'm just putting something of a 'feature tracker' of sorts :)
so no rush at all, whenever we get to it :)
and if I python port this i'mma be working on this myself xD
and implementing as we go xD
though i'll probably be using configparser in python xD
 
6:46 PM
if only IntelliJ would actually friggin download lol
E:SlowInternet
hmm the big part of the Python fork is gonna be your TioJ library.
that's... gonna take some time heh
 
ChatExchange is the easy part
your Tio library is... not :p
but i'm already starting to try so :P
 
7:03 PM
Have fun
 
7:17 PM
#TIO run java-openjdk public class Main { public static void main(String... args) { System.out.println("Hello World"); } }
 
@Socratic Phoenix
Hello World
 
#TIO run java-openjdk public class Main { public static void main(String... args) { System.out.println("Hello World");
 
@Socratic Phoenix
Main.java:1: error: reached end of file while parsing
public class Main { public static void main(String... args) { System.out.println("Hello World");
                                                                                                ^
1 error
Error: Could not find or load main class Main

Real time: 0.765 s
User time: 0.634 s
Sys. time: 0.077 s
CPU share: 92.99 %
Exit code: 1
 
@SocraticPhoenix fun fact: the parsing of the languages that TIO.run can work with? Much simpler in Python :P
def query_languages(self):
    try:
        with urllib.request.urlopen(urllib.request.Request(json)) as response:
            rawdata = json.loads(response.read().decode('utf-8'))
            data = rawdata.keys()
        return set(data)
    except (urllib.request.HTTPError, urllib.request.URLError):
        return set()
 
@ThomasWard shhhhh
is urllib.requests a library or is it standard?
 
7:19 PM
urllib.requests is a subclass within the built-in urllib class which is part of the standard python libraries
 
hmmph
its effectively the same though..
java is just more verbose
 
I mean, instead of having to read line by line and handle it, just read teh JSON, and get the keys out of the returned dict, then return that as a set.
:P
yeah i'm working on getting this doen lol
it takes time
gotta build the Tio libraries first :P
 
7:46 PM
@ThomasWard Soon we'll have working tio libraries for java and python, then dennis will change the API to JSON or something...
 
8:26 PM
#TIO help
 
#tio help
#TIO version
@SocraticPhoenix Sorry I left so abruptly. Had to go home for the weekend. I'll be back at work Monday morning. Meanwhile, I'll only be online intermittently. So the bot in here is still 0.0.2?
 
@Adám possibly
I believe so ye
 
@SocraticPhoenix Did you have a chance to test 0.0.3?
Sorry if I come across pushy. I'm just really excited about TIOBot.
Personally, I think we should pay you for it.
 
@Adám money is good; I like money... But honestly its a hobby project so its cool, and technically Hyper made one first but then couldn't access it...
@Adám I did test it and pushed the .jar but then @ThomasWard disappeared to make a python implementation. We're trying to get auto push and auto restart working
 
8:38 PM
@ThomasWard ^
 
i'm still here
@SocraticPhoenix indeed. Then we have to redesign LOL
@SocraticPhoenix i'm considering the python version more of a side project from hell
i'm not actively working on it :P
 
@ThomasWard okie dokie :)
 
The cool thing is, since I have both of your projects cloned down in IntelliJ, Gradle doesn't need to import the bot libs lol
it just pulls from the other dir XD
 
@Adám I think that @AquariusOne is running 0.0.3 but i'll double check
HAIL SSH!@
 
8:46 PM
#TIO version
#TIO shnap println("hello world")
#TIO run shnap println("hello world")
 
@Socratic Phoenix
hello world
 
it doesn't look like it's 0.0.3 @ThomasWard
 
1 minute
because lag
 
tis fine
 
TIOBot logged in!
 
8:49 PM
#TIO version
 
@Socratic Phoenix TIOBot v 0.0.3
 
that should work now :P
 
#TIO alias command shnap #TIO run shnap %args%
 
@Socratic Phoenix Added alias for shnap
 
#shnap println("Hello world")
 
8:50 PM
@Socratic Phoenix
Hello world
 
#TIO alias command python3 #TIO run python3 %args%
 
@Thomas Ward Added alias for python3
 
because WHY NOT lol
also it's doing @highlighting wrong :P
it needs to remove spaces
 
@ThomasWard sure okay
that'll be in the next version with all the nice auto start stuff
 
8:51 PM
that's... odd?
yep
 
@Thomas Ward
  File ".code.tio", line 1
    print("Hello, Noobs!")
    ^
IndentationError: unexpected indent

Real time: 0.161 s
User time: 0.137 s
Sys. time: 0.019 s
CPU share: 97.03 %
Exit code: 1
 
oops?
#TIO run python3 print("Test")
 
@Thomas Ward
Test
 
... well THAT works
... but not the aliased version
@SocraticPhoenix bug?
 
8:52 PM
#python3 print("Test")
 
I don't see your run thing tho...
 
@Thomas Ward
  File ".code.tio", line 1
    print("Test")
    ^
IndentationError: unexpected indent

Real time: 0.148 s
User time: 0.120 s
Sys. time: 0.023 s
CPU share: 96.85 %
Exit code: 1
 
@SocraticPhoenix because accidental edit
but there you go
 
ah i think its not remove the leading space from the args
silly me
and of course python cares about indents -_-
 
@SocraticPhoenix ಠ_ಠ
 
8:54 PM
which is why testing should be more comprehensive...
 
@SocraticPhoenix Python isn't the only one who cares about indents :)
 
@ThomasWard still, I didn't test python or any one that does and thus bug
 
indeed.
but this is why i'm here :)
 
thanks :)
 
try all the crazy things and let the bot BURN help debug things.
 
8:55 PM
yep
#TIO alias command python3 #TIO run python3 %args%
 
@Socratic Phoenix Added alias for python3
 
#python3 print("hi")
 
@Socratic Phoenix
  File ".code.tio", line 1
    print("hi")
    ^
IndentationError: unexpected indent

Real time: 0.144 s
User time: 0.111 s
Sys. time: 0.023 s
CPU share: 93.05 %
Exit code: 1
 
welp that didn't work
meh
 
he's not updated remember?
we don't have autorun yet
stripping leading spaces would help but we'll have to rebuild and push new binaries
 
9:07 PM
@ThomasWard I tried to work around it by adding an indent to the command
@ThomasWard yeah, so I want to get all the auto load features done before manually pushing again.
Would auto pull be like a python or bash script on the server?
@ThomasWard are you a mod?
 
This was for the TIO 1
 
#TIO version
 
@Adám TIOBot v 0.0.3
 
#tio version
 
@quartata oh cool, I heard there was a previous iteration, but I didn't know about it before I started working on the current one
 
9:19 PM
#TIO apl-dyalog ⎕←2+3
 
@Adám
5
 
#TIO help
 
#TIO do apl-dyalog ⎕←2+3
 
@Adám 5
 
9:20 PM
Everything else is random garbage
 
#TIO alias command #APL apl-dyalog ⎕←%args%
 
@Adám you do not have permission to edit settings for this room!
 
@SocraticPhoenix can you grant?
 
Ah sorry
#TIO grant 130368
 
#TIO alias command #APL apl-dyalog ⎕←%args%
 
9:24 PM
@Adám Added alias for #apl
 
@AquariusOne Case insensitive, eh?
#apl 2+2
 
Oh the # is prepended, the alias should just be apl
 
##apl 2+2
 
And yes it is case insensitive
 
#TIO alias rcommand #APL
 
9:25 PM
@Adám removed alias for "#APL"
 
#TIO alias command apl apl-dyalog ⎕←%args%
 
@Adám Added alias for apl
 
#apl 2+3
 
@SocraticPhoenix it needs %args% as part of the alias syntax, right?
#TIO alias command apl apl-dyalog ⎕← %args%
 
9:26 PM
@Adám Added alias for apl
 
#apl 2+3
#TIO apl 2+4
 
@Adám sorry, but I couldn't find any languages matching "apl"
 
You need to put a full command
So like #tio run dyalog-apl
 
#TIO alias command apl run apl-dyalog ⎕←%args%
 
9:27 PM
@Adám Added alias for apl
 
#apl 2+5
#TIO apl 2+7
 
@Adám sorry, but I couldn't find any languages matching "apl"
 
#APL 10
 
#TIO alias command apl #TIO run apl-dyalog %args%
 
@Socratic Phoenix Added alias for apl
 
9:29 PM
Like that
 
#apl ⎕←11
 
@Adám
11
 
@SocraticPhoenix Wait, I can't insert custom text?
 
Yeah u can
I just don't know those symbols cuz I'm on my phone and it can't see them
You were missing the #TIO part of the alias, that's all
 
#TIO alias command apl #TIO run apl-dyalog ⎕← %args%
 
9:30 PM
@Adám Added alias for apl
 
#apl 12
 
@Adám
12
 
Yay!
#TIO alias command ⍎ #TIO do apl-dyalog ⎕←%args%
 
@Adám Added alias for ⍎
 
#⍎ 14
 
9:32 PM
@Adám 14
 
#⍎15
 
@Adám 15
 
#TIO alias command # #TIO do apl-dyalog ⎕←%args%
 
@Adám Added alias for #
 
##1 2 3
 
9:33 PM
@Adám 1 2 3
 
#TIO alias command "" #TIO do apl-dyalog ⎕←%args%
 
@Adám Added alias for ""
 
#TIO alias rcommand ""
 
@Adám removed alias for """"
 
@AquariusOne To quote or not to quote...
 
9:37 PM
@Adám lol the command parsing isn't particularly smart right now...
 
@SocraticPhoenix It is fine. No; great. This is totally awesome man!
 
In theory just putting two spaces would work...
Also thanks
 
#TIO alias command #TIO do apl-dyalog ⎕←%args%
 
@Adám Added alias for #tio
 
#tio 2+2
 
9:43 PM
@Adám expected more arguments...
 
Lol
It prioritizes built in commands
Over aliases that is
 
#TIO alias command #TIO #TIO do apl-dyalog ⎕←%args%
 
@Adám Added alias for #tio
 
#tio 1 2 3
 
@Adám sorry, but I couldn't find any languages matching "1"
 
9:44 PM
Good. Just testing.
 
##tio meh
 
@Socratic Phoenix
 
@SocraticPhoenix ?
 
You added an alias for #tio, which becomes ##tio in command form...
 
@SocraticPhoenix #TIO alias view
#TIO alias command TIO #TIO do apl-dyalog ⎕←%args%
 
9:45 PM
@Adám Added alias for tio
 
#tio 'hello world'
 
@Adám sorry, but I couldn't find any languages matching "'hello"
 
#tio help
 
@Adám that does make sense...
 
9:46 PM
@AquariusOne Oh, even your name is case insensitive.
@SocraticPhoenix Why do aliases need # ?
 
When adding them or when calling them?
 
@SocraticPhoenix when calling. When adding, they don't
 
@Adám because it's meant to be a command alias and I chose # to start commands... I suppose it doesn't really have to be that way; I can change it if you want
 
@SocraticPhoenix Not critical, but I like golfing an neat looks. Imagine if I could use ⎕← as alias (without the leading #)
Then it would look like there is no alias at all for APL.
 
@Adám I guess that makes sense, the only thing is that opens up the bot responding to things that may not have necessarily been intentional... but sure I can add that
 
9:53 PM
@SocraticPhoenix That's already the case if people begin lines with hash. it doesn't even check for a space after the alias.
(don't change that)
#TIO alias command test #TIO do apl-dyalog ⎕←0
 
@Adám but then it breaks for indented languages :(
 
@Adám Added alias for test
 
#TIO alias command test1 #TIO do apl-dyalog ⎕←1
 
@Adám Added alias for test1
 
#test1
 
9:54 PM
@Adám 0
 
@SocraticPhoenix Wait what? It breaks for indented languages that the bot does not remove spaces?
 
it prioritizes first added not longest match
 
#TIO alias command test #TIO do apl-dyalog ⎕←0
 
@Adám Added alias for test
 
9:55 PM
@Adám as in, it doesn't remove the first space, thus it creates strange indents cuz there's a leading space
 
#test1
 
@Adám 0
 
wait no I don't know what I'm talking about... its a hash map and has no iteration order
xD
ill make it do longest match
 
@SocraticPhoenix Ah, well feel free to have it remove leading spaces. as long as it still recognizes aliases without needing a space after the alias.
 
#TIO alias command python3 #TIO do python3 %args%
 
9:56 PM
@Socratic Phoenix Added alias for python3
 
#Python3 print("hi")
 
@Socratic Phoenix
 
see
#TIO alias command python3 #TIO run python3 %args%
 
@Socratic Phoenix Added alias for python3
 
#Python3 print("hi")
 
9:57 PM
@Socratic Phoenix
  File ".code.tio", line 1
    print("hi")
    ^
IndentationError: unexpected indent

Real time: 0.176 s
User time: 0.112 s
Sys. time: 0.046 s
CPU share: 89.51 %
Exit code: 1
 
#Python3print("hi")
 
@Adám
hi
 
Ugh, yeah, you may want to strip spaces. I don't care, as long as #python3print("hi") still works.
 
i see what you mean; will do
 
9:58 PM
@SocraticPhoenix Won't work for Whitespace though.
 
@Adám what if I just strip only a single space?
 
@SocraticPhoenix Yeah, that'll work.
#tio alias command apl #tio do apl-dyalog ⎕←%args%
 
@Adám Added alias for apl
 
#apl 2 4 6
 
@Adám 2 4 6
 
10:00 PM
#apl 2 3 4
 
@Adám
 
@Adám what's the difference; are those back ticks?
back ticks not yet supported ;)
 
@SocraticPhoenix strip <code> and </code>
 
@Adám I get the raw text so it gives me back ticks...
 
@SocraticPhoenix Yeah, but backticks render as html tags
 
10:01 PM
@Adám yeah but ChatExchange spits out the raw message, not the render
 
@SocraticPhoenix Really? The html source in the browser inspector says they are tags.
@SocraticPhoenix ooh.
 
but then it would break on languages with backticks :(
 
oh dear, they you'd have to effectively render the markdown to figure out which backticks to remove.
 
@Adám Yeah, no thanks xD
it makes sense to get the raw text since then * and _ etc aren't all html-y, so yeah... but that introduces the backtick problem
#TIO shnap println("hello world")
 
@Socratic Phoenix
**hello world**
 
10:04 PM
#tio alias command apl #tio run apl-dyalog ⎕←' %args%' ⋄ ⎕←%args%
 
@Adám Added alias for apl
 
#apl 2+2
 
@Adám
  2+2
4
 
#tio alias command apl #tio run apl-dyalog ⎕←' %args%' ⋄ ⎕←%args%
 
@Adám Added alias for apl
 
10:05 PM
#apl 2+2
 
@Adám
       2+2
4
 
#apl 'hello world'
 
@Adám
line(1,0) : error AC0505: error (VALUE ERROR) executing line "⎕←'       'hello world'' ⋄ ⎕← 'hello world'"
                                                              ^
Complete: 1 error.
DOMAIN ERROR: There were errors processing the script
 '#'⎕NS ⎕FIX'file:///home/runner/.bin.tio.dyalog'
∧

Real time: 0.046 s
User time: 0.011 s
Sys. time: 0.026 s
CPU share: 82.29 %
Exit code: 0
 
@SocraticPhoenix I can't make an alias for multiple consecutive commands, can I?
 
@Adám no... That'd be somewhat of a paint to add, but I could if necessary
 
10:14 PM
#tio alias command test #tio run apl-dyalog ⎕←1 2
⎕←3 4
 
@Adám Added alias for test
 
#test
 
@Adám
line(1,0) : error AC0505: error (LENGTH ERROR) executing line "⎕←1 2 ⎕←3 4"
                                                               ^
Complete: 1 error.
DOMAIN ERROR: There were errors processing the script
 '#'⎕NS ⎕FIX'file:///home/runner/.bin.tio.dyalog'
∧

Real time: 0.030 s
User time: 0.008 s
Sys. time: 0.019 s
CPU share: 88.65 %
Exit code: 0
 
#tio session apl-dyalog
 
@Adám began session in apl-dyalog
 
10:19 PM
#tio input ⎕←⍎⎕←' ',⍞
 
Added input to @Adám's session
 
#tio input 'hello world'
#tio submit
 
@Adám:
 'hello world'
hello world

============


Real time: 0.028 s
User time: 0.009 s
Sys. time: 0.015 s
CPU share: 86.79 %
Exit code: 0
 
10:56 PM
@ThomasWard I have done the auto-login stuff and the persistent aliases stuff (binary not uploaded yet...), how do you want to handle the auto-push? Query github releases every once and a while? Bash script wrapper? Python script wrapper? I could write a java wrapper if you want...
 

« first day    last day (47 days later) »