« first day (467 days earlier)      last day (2027 days later) » 

00:01
@cairdcoinheringaahing Done.
@NickClifford Correct me if I'm wrong, but Travis CI would require language authors to modify their repos. Automatic or semi-automatic updates are planned though.
00:20
@ConorO'Brien Could you check if the issue persists on dev.tio.run?
00:33
@Dennis yes, but only for a .travis.yml
I see your concern though
my thoughts are that if a language has unit tests through Travis (as Ohm soon will), if the author pushes a commit that fails said tests, it would not automatically deploy to TIO
01:15
@Dennis it still loses focus after the escape sequence on dev.tio
 
13 hours later…
14:44
@ConorO'Brien Should be fixed on dev. Can you try again?
Also, if someone could confirm that command mode still works on dev.tio.run with Edge and IE, that would be great.
@Dennis unfortunately not, I'll be AFK for most of today. I'll try once I return home, however.
No rush.
I actually tested it in Vivaldi, so I expect no surprises there. Not so sure about the MS browsers though, and I can't test it myself right now.
15:01
i might be able to do some tests here in IE.
@Dennis remind me how to get into that mode?
15:13
@ThomasWard By pressing Esc.
@Dennis tested in IE11, seems to work. Didn't delve in too much but...
I don't have edge here though.
@Dennis I've been reading through this on some help for using the API and I'm a little stuck on the DEFLATE part, would you mind helping me a little if you're not too busy?
@cairdcoinheringaahing DEFLATE as in unzip/uncompress
@Dennis Seems to work on Edge for me
i ran into the same confusion when working on TIObot at one point
15:20
@ThomasWard @cairdcoinheringaahing Thank for testing. :)
@Dennis No problem
@cairdcoinheringaahing What language are you using?
@Dennis Jelly on TIO, and Python as an interface
i should probably do more testing on the port of TIObot's TIO library for Python... hmmm i'm lazy
@cairdcoinheringaahing To DEFLATE in Python, you can use zlib.compress(<whatever>, 9)[2:-4].
15:25
@Dennis Hmm, I did that, and it returned a binary string of gibberish
That's the expected outcome of compression.
Would you mind explaining how to retrieve the expected result from the gibberish? This is the first time I've used compression
Decompression is just zlib.decompress(<whatever>, -zlib.MAX_WBITS).
@Dennis It's currently returning a 16 byte, newline-terminated string after being decompressed. What do I do with that?
16 bytes would mean the was no output, so the request is probably missing something.
15:35
The request is Vlang\x001\x00jelly\x00F.code.tio\x005\x00+F.input.tio\x003\x00Vargs\x002\x0020‌​\x0010R if that means anything to you
There's + that shouldn't be there, and the argument 10 isn't null-terminated.
@Dennis The + is the code FWIW
Oh! The request says the code is 5 bytes long though.
Ah, is that the \x005 part?
Yes. The input isn't 3 bytes long either.
15:40
Well, that'll teach me not to copy-paste old examples
ಠ_ಠ Back to the 16 byte output
@Dennis So, I've sent a POST to https://tio.run/cgi-bin/run/api/, for the result of JSON.stringify(stateToByteString()) when running this, and the output looks like b'4vdfjIPFIPsOCvBh\n'
My request looks like this: Vlang\x001\x00jelly\x00F.code.tio\x001\x00+F.input.tio\x000\x00Vargs\x002\x0020‌​\x0010\x00R
Can't find an error right now. What's the actual code you're using?
+
With the arguments 10 and 20
No, for the POST request.
import requests
import zlib

URL = 'https://tio.run/cgi-bin/run/api/'

def sendreq(code, inputs, args):
    session = requests.Session()
    data = 'Vlang\u00001\u0000jelly\u0000F.code.tio\u00001\u0000+F.input.tio\u00000\u0000Vargs\u00002\u000020\u000010\u0000R'
    print(repr(data))
    test = session.post(URL, data, verify=True, cookies=requests.utils.dict_from_cookiejar(session.cookies))
    return zlib.decompress(zlib.compress(bytes(test.text, 'utf-8'), 9)[2:-4], -zlib.MAX_WBITS)

if __name__ == '__main__':
You have to DEFLATE data.
And why would you compress test.text just to decompress it again?
15:57
@Dennis I don't know, I've never used zlib before. Also, that works, got the info from TIO, I just have to split on the 16 byte string at the start, right?
Yes.
@Dennis Thanks for the help, and for being patient with me!
16:51
@Dennis is there a way to retrieve the debug information if no output is produced?
17:13
What do you mean by if no output is produced?
@Dennis As in running @ in Jelly won't pip anything to STDOUT, but will to STDERR. Can that information be retreived?
Yes. After splitting by the first 16 bytes, the last chunk is the debugging information.
It doesn't seem to produce anything aside from the first 16 bytes for me. I'll have a look at it when I finish the current bit of debugging :P Thanks anyway
18:18
@Dennis Does the request have to be modified in some way to handle non-ASCII characters? If so, how?
Never mind, I figured it out
19:14
@Dennis when we send data into the API, does it need to be in gzipped form, or is a standard compressed string sufficient?
secondly, when we get the response, is any data in it specially encoded and needs decompressed or such?
trying to port a Tio library written in Java over to Python and I am struggling getting valid results.
 
1 hour later…
20:39
@Dennis et. al. can anyone give me an API guide of how I should structure an API post to the 'run' API? I can't find clear documentation.
20:52
@ThomasWard This is the script I'm using.
i didn't ask for a script I asked for a rundown of the format of the data item before compressing
because I ran your script locally and got nothing back
@ThomasWard When?
implied in the above.
i ran it also in the past hour and it failed
1 moment
@ThomasWard Vlang\u00001\u0000<language>\u0000F.code.tio\u0000<length of code>\u0000<code>F.input.tio\u0000<length of input>\u0000<input>Vargs\u0000<number of args><\u0000argn repeated the number of times for the arguments>\u0000R if that's clear to you
@cairdcoinheringaahing I presume your response should be ("The instruction '2' is not implemented") for your example sendreq from above here?
20:57
@ThomasWard Depends what request you're sending.
sendreq('+', '', ['20', '10']))
my guess is "no"
but now I have information to work with :P
grabs a hammer
@ThomasWard Even better. Hope that helps :P
hrm. I think something is fubar then in my functions here.
because I get that 16 character long string but... hrm
Are you compressing the query string (Vlang...R)?
well i'im further along than i was before.
"The variable '.code.tio' could not be declared."
21:04
@ThomasWard sounds like you're passing it to V?
and not F?
that's probably a minor code issue
hrm
WOW TYPO
>.>
i'm an idiot
what went wrong?
write_variable in my python port of Socratic Phoenix's TioJ library instead of write_file.
so yeah V then
uhm wtf lol? "<code string> is not an unsigned decimal integer literal." wat
21:08
wha
oh
right
i forgot something didn't I
needs to be as a base 10 number after compression I think?
one moment
wut
@quartata i'm confused, what do i have to do to pass the code string in proper?
OH
wait
i know
i forgot something
oh wait
I think you might be missing the file size
?
21:40
whoo it's working now heh
that was a pain in the ass xD
 
2 hours later…
23:11
@quartata do you happen to know if the code being submitted over the API, needs to be URL encoded or something to properly process?
Don't think so
Just needs to be null terminated
hrm
because it's not working from my python library...
this is one of my tests, and is the non-compressed version of the submitted API data for the POST command:
Vlang\x001\x00apl-dyalog\x00F.code.tio\x0017\x00\xe2\x8e\x95\xe2\x86\x90'Hello, World!'\x00R
the problem is, it gives a nasty little error: The instruction 'l' is not implemented.
which can't be true.
so I'm not entirely sure what to do here.
(this is APL Dyalog and its "hello world")
@ThomasWard \xe2\x8e\x95\xe2\x86\x90'Hello, World!' isn't 17 bytes long.
23:28
yeah, it's getting cut off at the l
or one of the ls

« first day (467 days earlier)      last day (2027 days later) »