« first day (2467 days earlier)      last day (2377 days later) » 

11:00 PM
This might help you. It's how Smokey is made and it's quite nice to use. Just take the example, read through it, fiddle around with it (in sandbox please! :P) and hopefully it works :P
 
@HyperNeutrino GPA wise yes
 
but... but it's not java
 
Also note that bots are not allowed in TNB.
 
Aw, not even a TIO bot? :(
 
@SocraticPhoenix ChatExchange comes in Java and Python; if I linked the Python one, just search for the Java one :P
 
11:00 PM
fun fact. my name has a suffix: EM
 
@HyperNeutrino thank the chat lords... I already created a TIO library in java...
 
@Adám Good.
 
didn't want to do it again in python..
 
@VoteToReopen Nope, all bots. I made an arbitrary python bot once and got "told off" (I mean, kindly informed) by Mego :P
 
@HyperNeutrino I think a bot might be allowed if fully tested and only ROs and mods could use it. It'd have to be tested in the Sandbox though
Especially if it benefits the community
 
11:01 PM
Hmm...
 
@SocraticPhoenix It's not that hard is it? Then again, I haven't tried, so I won't judge xD
 
@cairdcoinheringaahing No exceptions :|
 
I remember there being a TIO API...
 
@cairdcoinheringaahing In that case, the ROs and mods might be willing to make an exception.
 
@HyperNeutrino then what's "new main posts..."
 
11:02 PM
@Christopher2EZ4RTZ Christopherem?
 
@HyperNeutrino Christopher Peart EM
 
@SocraticPhoenix It's a feed. Really just a bot, but it's here because it's useful to us.
@Christopher2EZ4RTZ oh ok :P
 
-_-
no exceptions?
 
@HyperNeutrino Because I am a Professional member of ETA international
 
@SocraticPhoenix I'd love to have a TIO APL bot in the APL chat room.
 
11:02 PM
For your intended purpose, I can assure you 11/10 that it will not be excepted/accepted.
 
@SocraticPhoenix Oh? How'd you implement it?
 
I would also love to have an Enlist bot in the Enlist room :D
A Jelly bot in JHT might be nice too, though I'd have to ask Erik or Leaky about that.
 
waits for dennis to say "No exceptions :|"
 
Out of curiosity, where are bots disallowed?
 
@HyperNeutrino You can start with a commit feed.
@SocraticPhoenix TNB.
 
11:03 PM
Good idea hm.
 
@Christopher2EZ4RTZ Wait, can't I as RO allow bots in my room?
 
Italics with the :| face makes it look drunk :|
 
@VoteToReopen no where does it say that
 
@Adám no he's talking about here
 
@Adám Well in your room but not TNB
I need a award to be given, quick vote me to be Honorary Moderator.
 
11:04 PM
?
 
nu
 
@muddyfish rotational symmetry?
 
@HyperNeutrino ?
 
just make a room and claim you're a room owner :D (please don't!!!)
@muddyfish if you rotate "nu" by 180 degrees it says the same thing :D :D
 
11:05 PM
@HyperNeutrino I need a big thing
 
So, maybe we can have a community TIO bot which various ROs can allow as they see fit? @TIO APL 2+2 would be so cool
 
I'm already a room owner for some rooms?
 
I found the Java library but I'm usually always lost trying to dig for something in a Java project...
 
Lost with a java project. We all have heard that before
 
@Adám That would be a great idea :D I'm going to try to make that sometime though I can't host a bot :P :P
 
11:06 PM
@HyperNeutrino I never noticed that
 
@muddyfish xD I'm a bit weird :P
> a bit
 
I'm already hosting several bots on Pyke
 
my internet cuts out between 11 and 8 so it would be rather pointless to even try. besides, my laptop's wifi dies unexpectedly often enough that it would definitely be a bad idea
 
Yeah, you can rotate "no u" and adjust the spacing to have it be the same.
 
@HyperNeutrino We could make a community code golf like GoL Tetris.
 
11:08 PM
I can host a bot if it's wanted
(In case it's not known already I'm hosting one that pushes chat from TNB onto the TNB discord server)
 
ooh cool :D if I or the ancient greek fire bird get one working and ROs want it that would be great :D
 
@muddyfish oh yeah I remember that, that one was nice :D
@VoteToReopen well rip, it's a chat message so nope D:
 
@VoteToReopen LOL tru
 
And if anyone knows how to make ChatExchange more stable over long periods that would be appreciated
 
11:09 PM
@HyperNeutrino It's supposed to be.
 
just figure out how the links are encoded and then use a GET request and scrape the .output.tio field :P :P :P
 
It crashes randomly every so often and I don't notice
 
@HyperNeutrino Nah use the API
 
api is still better because it's designed to be used by machine request :P
 
It's pretty easy actually...
 
11:10 PM
@HyperNeutrino That's awful. :P
 
once you understand it..
 
@VoteToReopen I know, that's the point xD
 
I'm trying to make head and tail of Dennis' message.
 
which took about an hour of back and forth with dennis and some transcript scraping
 
No, thanks. :P
 
11:13 PM
Writing in java is Cruel and Unu.... Error Please Update Java
 
lol, then at least look here. The API basically works by allowing you to send files & variables. Relevant files: .code.tio and .input.tio, Relevant variables: lang, args, TIO_OPTIONS, and TIO_CFLAGS
You just smush them all together in one post request
Then throw in R at the end
 
Okay, well I kinda can understand this, however, I'm not gonna try to make the bot.
I know one person who would jump on the oppurtunity though...
 
@VoteToReopen I would try if I had not homework
 
Heh, I have similar reasons.
Okay, how do you break this down? Vlang\u00001\u0000neim\u0000F.code.tio\u00001\u00002R
 
Before I leave, does anyone know any good maths challenges on main that are, say, high-school level maths?
 
11:18 PM
@VoteToReopen No idea
 
V with name=lang, set to neim. .code.tio file set to that content, R for run
 
...Why couldn't it be just a simple JSON API? ;-;
 
^dunno
\u00001 means array of length 1 for the variable
\u0000 is null termination
 
CMC: [loosely defined] Make a JSON to whatever-the-heck-tio-API-uses format converter
 
11:19 PM
everything is null terminated
 
> V must be followed by a NUL-terminated variable name, an array length n (decimal, then NUL), then n NUL-terminated strings.
 
should take reasonably readable JSON and output exact functional tio-API code
 
@HyperNeutrino That's called outsourcing. :P
 
@HyperNeutrino a deflated command string is reasonable, yes?
 
11:20 PM
example?
 
{"code":[1,2,3]} where [1,2,3] is the post request
:)
Or just use java
I wish I knew how json worked in python...
 
@HyperNeutrino a few bytes: go to vihan.org/p/tio and type in things then open up browser and inspect request :P
 
V lang [null] 01 [null] 0 neim [null] 0 F .code.tio [null] 01 [null] 02 R
 
@Downgoat ok then :P
 
@VoteToReopen I think
[null] 02 feels wrong
wait no that's right
cuz 01 is the file length
 
11:23 PM
real answer:
function generateByteArray(obj) {
    function toBytes(string) {
        var chars = string || "";
        var res = [];
        for (var i = 0; i < chars.length; i++) {
            res.push( chars.charCodeAt(i) );
        }
        return res;
    }

    var language = << LANGUAGE ID GOES HERE >>
    var code = unescape(encodeURIComponent(obj.code));
    var input = unescape(encodeURIComponent(obj.input));

    var array = toBytes("Vlang\u00001\0" + language + "\u0000F.code.tio\u0000" + (code.length >>> 0) + "\0" + code + "F.input.tio" + "\0" + (input.length >>> 0) + "\0" + input + "Vargs\
object is in form { code: ..., input: ... }
 
woooah not very golfy
 
who need golfy when you can have javascript
 
is that just the tio source?
 
@SocraticPhoenix its from vihan.org/p/tio i cannot read tio source
 
11:26 PM
@Downgoat I can't reach that website for some reason... also, why not?
 
@SocraticPhoenix try using https
@SocraticPhoenix by cannot read I mean spaghetti not like don't have access
 
Okay, looks like I'm gonna get a functional TIO bot in sandbox soon.
I say "functional"...
 
golfed: (a,b,c)=>`Vlang\u00001\0${a}\u0000F.code.tio\u0000${b.length}\0${b}F.input.tio‌​\0${c.length}\0${c}Vargs\0\0R`;
 
@VoteToReopen I thought you said you weren't going to do it..
 
11:28 PM
No, but I also said I know somebody who's practically over-enthusiastic about it.
 
is it you?
 
Nope.
 
oh..
still confused then
 
It's a friend of mine who's gonna write it, but I'm gonna test it in the sandbox.
 
oh cool
(grumbles about how I wanted to write it)
 
11:30 PM
(you still can :p try to write a super golfy one)
 
@Riker but i can't golf at all
 
@SocraticPhoenix write in something that you can post in TNB for golf help :p
 
lol I almost gave myself a heart attack because I have a history essay due tomorrow and I opened the folder on the wrong account (one account has the finished essay which I'm editing right now, and the other has an empty t-chart) xD
 
@HyperNeutrino lol
 
...Never mind, I'm also gonna write a bot.
 
11:34 PM
For the TIO api, the components are Language Name, Code, and Args, right?
 
Crap, we have too many people working on this.
Abort mission, abort mission!
 
I already have a chat bot that just needs a bit of editing to work with this xD
 
@HyperNeutrino yep. That being said, none of that is technically required
 
also .input.tio
(for STDIN)
 
11:36 PM
Does anybody happen to know a good way to deflate a string in Python?
 
@VoteToReopen I use a knife
 
Unprofessional.
 
Anyone here into natural language processing? Apart from the usual POS and relation tags, is there a standard (or proposed standard) of the actual layout of a syntax dependency tree (body->sentences->tokens/words)? I.e. should token indexes be implicit (google style) or explicit (bloomberg style) and things like that.
 
@VoteToReopen I'm not sure, but be careful that it's the same format... I had to tweak some settings on the Java Deflater to get it to come out the same
 
how do you deflate a string
 
11:37 PM
...
 
oh ninja'd xD
 
@mınxomaτ I'm into it enough to really want to know what you're talking about
 
I was told this was a great place to get fast technical help...
 
@VoteToReopen What idiot kind soul told you that?
 
---strike---
 
11:39 PM
strike
 
how does post work in python o_O (requests.post)
also, post is giving errors because it can't decode the characters :P
 
@HyperNeutrino Have a look at this.
 
thanks
 
37
Q: Python: Inflate and Deflate implementations

DemiI am interfacing with a server that requires that data sent to it is compressed with Deflate algorithm (Huffman encoding + LZ77) and also sends data that I need to Inflate. I know that Python includes Zlib, and that the C libraries in Zlib support calls to Inflate and Deflate, but these appare...

maybe?
 
Ugh, this bot has to deal with compression and HTTP, two really annoying things...
 
11:43 PM
@VoteToReopen and lol Java has libraries for compression and HTTP!
 
ok so I'm getting a 16 byte string back which is supposedly a good sign
 
I'm sure Python does too, but they're still annoying. :P
@HyperNeutrino Starting 16 bytes is important but you should have more.
 
yes :P
 
^
The first 16 bytes are the separator... If you're just getting that it doesn't understand your request
But at least you contacted the server!
 
posting an empty string there also gives 16 bytes so that's not helpful
@SocraticPhoenix haha yes true :P
also technically it's 17 because of the trailing newline... :P
 
11:45 PM
meh
 
>>> requests.post('https://tio.run/cgi-bin/run/api/')
<Response [200]>
>>> _.text
'7HyBwLvLdYiViti7\n'
I believe we're both doing the same thing...
 
yeah probably
 
you are inflating the response, yes?
(pretty sure you need to do that)
 
>>> requests.post("http://bugs.python.org", data={'number': 12524, 'type': 'issue', 'action': 'show'})
<Response [200]>
>>> _.text
'<!--\n This is the default body that is displayed when people visit the\n tracker...
 
>>> requests.post("https://tio.run/cgi-bin/run/api/", data = "Vlang\0001\000neim\000F.code.tio\0001\0002R")
<Response [200]>
>>> _.text
'K/e8o7LuVvw10GD0\n'
 
11:46 PM
I also did that, following SO's lead. :P
@HyperNeutrino Good, next step, deflation!
 
@HyperNeutrino data must be deflated though (ninja'd)
 
huh how do you do that ಠ_ಠ
 
Still stuck there...
 
Also, the response has to be inflated
 
11:48 PM
zlib should have what is necessary, but I don't how to utilize it properly.
 
that being said, I'm not sure that question is much help
 
Yeah, I'm going through that.
 
just implement the deflate algorithm yourself... duh
 
ಠ_ಠ
 
Processing Dennis' docs, SO's answers and requests' docs at the same time is slightly painful.
 
11:50 PM
>>> requests.post("https://tio.run/cgi-bin/run/api/", data = zlib.compress(b"Vlang\0001\000neim\000F.code.tio\0001\0002R"))
<Response [200]>
>>> _.text
'gzJCPt6uBuy8LO4b\n'
 
Neat, I got a dynamic syntax highlighter working for the Funky Repl.
 
@HyperNeutrino but the deflate has no header or checksum
 
>>> s = zlib.compress('Vlang\01\0neim\0F.code.tio\01\02R')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: a bytes-like object is required, not 'str'
>>> s = zlib.compress(b'Vlang\01\0neim\0F.code.tio\01\02R')
>>> s
b'x\x9c\x0b\xcbI\xccKgd\xc8K\xcd\xccep\xd3K\xceOI\xd5+\xc9\xccgd\n\x02\x00e\xca\x07\x81'
 
@ATaco Can I just say, I love your website address
 
very confuz now
 
11:51 PM
Progress.
 
@SocraticPhoenix Dennis showed me it, and I had to claim it.
 
@ATaco ooo nice is very impressed :D
 
>>> u = 'https://tio.run/cgi-bin/run/api/'
>>> requests.post(u, s)
<Response [200]>
>>> _.text
'vTIykE8xAUGo2H5d\n'
:|
 
but also, arithmetic, not arithmatic
 
I know, I know.
But the token name is already set, i'm not changing it now.
 
11:54 PM
@ATaco incomplete tokens are highlighted white in the REPL, making it somewhat difficult to use. otherwise, +1
Hold on does Funky not have proper order of operations?
 
RTL?
 
Yeah
 
Now that's funky.
4
 
@Pavel it was... uh... the sheep next door. please follow through on your statement
 
And incomplete tokens are highlighted like that because I have no way to know what they are otherwise.
(Because of the recursive tokenizer)
 
11:56 PM
in talk.tryitonline.net, 1 min ago, by VoteToReopen
@Dennis Since you know Python, could you please explain how one can "DEFLATE" a string for the TIO API in Python?
Best ask himself. :P
 
I know how to implement the order of operations.
 
The algorithm it describes sounds complicated, but really isn't that bad
but then why not implement it?
 
But the tokenizer I wrote doesn't make it convenient.
 
me neither!
 
11:57 PM
my parser works like a regex engine :D
 
@ATaco But it doesn't matter if it's convenient for you, it matters if the language is convenient for the user :)
 
and it's extremely inconvenient. But inconvenience is something I'm willing to endure for the sake of making the language be convenient for those using it
wow ninja'd
 
:)
just greedily consume operators, throw them in a list, stack them up and stack them down! Then stack them all around!
 
(And more importantly, I've already done it this way and it might ruin some things if I change it now)
 

« first day (2467 days earlier)      last day (2377 days later) »