jemc changed the topic of #ponylang to: Welcome! Please check out our Code of Conduct => https://github.com/ponylang/ponyc/blob/master/CODE_OF_CONDUCT.md | Public IRC logs are available => http://irclog.whitequark.org/ponylang
tm-exa has quit [Quit: Computer has gone to sleep]
SilverKey has quit [Quit: Halted.]
Perelandric has quit [Ping timeout: 250 seconds]
Applejack_ has joined #ponylang
Applejack_ has quit [Ping timeout: 260 seconds]
SilverKey has joined #ponylang
c355e3b has quit [Quit: Connection closed for inactivity]
graaff has joined #ponylang
jemc has joined #ponylang
unbalancedparen has quit [Quit: WeeChat 1.5]
SilverKey has quit [Quit: Halted.]
mrkishi has quit [Ping timeout: 250 seconds]
amclain has quit [Quit: Leaving]
jemc has quit [Ping timeout: 240 seconds]
Applejack_ has joined #ponylang
copy` has quit [Quit: Connection closed for inactivity]
Applejack_ has quit [Ping timeout: 250 seconds]
Matthias247 has joined #ponylang
jemc has joined #ponylang
jemc has quit [Ping timeout: 244 seconds]
nyarumes has joined #ponylang
nyarum has quit [Ping timeout: 250 seconds]
Matthias247 has quit [Read error: Connection reset by peer]
Applejack_ has joined #ponylang
tm-exa has joined #ponylang
zaquest has quit [Ping timeout: 260 seconds]
zaquest has joined #ponylang
c355e3b has joined #ponylang
_andre has joined #ponylang
Perelandric has joined #ponylang
trapped has joined #ponylang
TwoNotes has joined #ponylang
wizeman has joined #ponylang
aturley has quit [Ping timeout: 244 seconds]
aturley has joined #ponylang
SilverKey has joined #ponylang
copy` has joined #ponylang
shelajev has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
Applejack_ has quit [Ping timeout: 258 seconds]
aturley has joined #ponylang
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
trapped has quit [Read error: Connection reset by peer]
SilverKey has quit [Quit: Halted.]
jemc has joined #ponylang
unbalancedparen has joined #ponylang
SilverKey has joined #ponylang
runehog has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
trapped has joined #ponylang
amclain has joined #ponylang
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
kulibali has joined #ponylang
mrkishi has joined #ponylang
SilverKey has quit [Quit: Halted.]
runehog has joined #ponylang
amclain_ has joined #ponylang
amclain has quit [Ping timeout: 240 seconds]
tm-exa has quit [Quit: Computer has gone to sleep]
SilverKey has joined #ponylang
shelajev has quit []
tm-exa has joined #ponylang
copy` has quit [Quit: Connection closed for inactivity]
SilverKey has quit [Quit: Halted.]
Applejack_ has joined #ponylang
M-hrjet has quit [Remote host closed the connection]
SilverKey has joined #ponylang
Applejack_ has quit [Ping timeout: 244 seconds]
tm-exa has quit [Quit: Computer has gone to sleep]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
sdorunga has joined #ponylang
AndroUser has joined #ponylang
M-hrjet has joined #ponylang
<AndroUser> Hello
<SeanTAllen> hello
<AndroUser> Can anyone give me any tips on turning an http payload response from a byte array to a string? I'm trying to parse a json response but I've gotten quite sick
<AndroUser> *stuck
sdorunga has quit [Ping timeout: 250 seconds]
Applejack_ has joined #ponylang
<SeanTAllen> can you post your code that you are having an issue with? a minimal bit of it...
runehog_ has joined #ponylang
runehog has quit [Ping timeout: 252 seconds]
<AndroUser> Give me a few minutes. Just realised i hadn't sent myself the code. I'll have to rewrite
sdorunga has joined #ponylang
kulibali_ has joined #ponylang
kulibali has quit [Ping timeout: 244 seconds]
kulibali_ is now known as kulibali
<SeanTAllen> ok
sdorunga has quit [Ping timeout: 250 seconds]
SilverKey has quit [Quit: Halted.]
runehog has joined #ponylang
runehog_ has quit [Ping timeout: 276 seconds]
kulibali has quit [Quit: Going offline, see ya! (www.adiirc.com)]
sdorunga has joined #ponylang
<sdorunga> Finally
<sdorunga> I'm @AndroUser btw
<sdorunga> Here's the code
<sdorunga> It complains at the data bit, because it seems to think that my parsed JSON is actually None
Applejack_ has quit [Ping timeout: 264 seconds]
AndroUser has quit [Read error: Connection reset by peer]
<sdorunga> Actually now that I built ponyc from scratch to get the latest version
<sdorunga> I'm getting "Array[U8 val] val is not a subtype of String val type ByteSeq is (String | Array[U8] val)"
Applejack_ has joined #ponylang
<sdorunga> and "not every element of (String val | Array[U8 val] val) is a subtype of String val"
<sdorunga> for the "json.parse(chunk)" bit
<sdorunga> Which seems really odd to my, because ByteSeq is meant to be a union type of String
<sdorunga> So it should behave as a string from what I'm understanding
graaff has quit [Quit: Leaving]
tm-exa has joined #ponylang
SilverKey has joined #ponylang
<TwoNotes> let s: String val = recover String.append( consume data ) end
<TwoNotes> That converts an Array[u8] iso to a String val
smandy has quit [Read error: Connection reset by peer]
<SeanTAllen> @sdorunga parse doesnt return an object
<SeanTAllen> fun ref parse(source: String) ? =>
<SeanTAllen> your error is that your are assigning the None form that parse
<SeanTAllen> you want to work on the json doc that gets updated by the parse call
<SeanTAllen> use
<SeanTAllen> json.data after parse call to get at the data
_andre has quit [Quit: leaving]
Applejack_ has quit [Ping timeout: 252 seconds]
Applejack_ has joined #ponylang
<sdorunga> @SeanTAllen that makes sense. So then once I parse it, I can just assign `json.data as JsonObject` ?
Matthias247 has joined #ponylang
runehog has quit [Remote host closed the connection]
<SeanTAllen> or use a match to determine which JsonType it is... and do what you need to do...
<SeanTAllen> are you looking to print it out or is that just an artifact of playing around with the code?
<sdorunga> Basically just playing around to get some of the basic concepts of pony
<sdorunga> :( match on JsonObject gives me "couldn't find 'eq' in 'JsonObject'"
<sdorunga> Am I matching on the wrong thing?
<sdorunga> I'm doing it directly on the type
<SeanTAllen> yeah that isnt what you would want
<SeanTAllen> but i think all the JsonTypes have a string method you can use
<SeanTAllen> json.parse(...)
<SeanTAllen> json.data.string()
<SeanTAllen> and use that string to print
copy` has joined #ponylang
<sdorunga> yes, they do, but my goal is to be able to parse what's in the actual response
SilverKey has quit [Quit: Halted.]
tm-exa has quit [Quit: Computer has gone to sleep]
shelajev has joined #ponylang
shelajev has quit [Remote host closed the connection]
shelajev has joined #ponylang
shelajev has quit [Ping timeout: 272 seconds]
runehog has joined #ponylang
SilverKey has joined #ponylang
<TwoNotes> If my Pony program hangs when run with --ponythreads 1, does that mean I have a potential deadlock somewhere?
SilverKey has quit [Quit: Halted.]
<doublec> TwoNotes: it probably means one of your actors behaviours is not returning
<doublec> sdorunga: did you solve your json problems?
<sdorunga> Didn't figure it out, but i'll go to bed and maybe it'll fix itself in the morning :)
<doublec> sdorunga: is it in that gist?
<sdorunga> That's the one without trying match because I couldn't get that naywhere interesting
shelajev has joined #ponylang
sdorunga has quit [Ping timeout: 250 seconds]
shelajev has quit [Ping timeout: 272 seconds]
<doublec> sdyou need a match on chunk to check what type it is
aturley has quit [Ping timeout: 260 seconds]
<doublec> If they come back this is a working snippet: http://pastebin.com/ENaAm59g
<doublec> There isn't an Array[8] iso there though
<doublec> Oops, I was scrolled back and thought the last line was a reply
aturley has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
SilverKey has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
Applejack_ has quit [Ping timeout: 264 seconds]
SilverKey has quit [Quit: Halted.]
aturley has joined #ponylang
aturley has quit [Ping timeout: 258 seconds]
Applejack_ has joined #ponylang