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
mcguire has quit [Ping timeout: 240 seconds]
mcguire has joined #ponylang
SirWillem has joined #ponylang
SirWillem has quit [Ping timeout: 252 seconds]
mcguire has left #ponylang [#ponylang]
SirWillem has joined #ponylang
c355e3b has quit [Quit: Connection closed for inactivity]
unbalancedparen has quit [Quit: WeeChat 1.5]
SirWillem has quit [Ping timeout: 260 seconds]
jemc has joined #ponylang
jemc has quit [Ping timeout: 260 seconds]
copy` has quit [Quit: Connection closed for inactivity]
trapped has joined #ponylang
trapped has quit [Read error: Connection reset by peer]
rurban has joined #ponylang
rurban has quit [Quit: Leaving.]
tm-exa has joined #ponylang
tm-exa has quit [Quit: Computer has gone to sleep]
Praetonus has joined #ponylang
Applejack_ has joined #ponylang
lispmeister has joined #ponylang
tm-exa has joined #ponylang
c355e3b has joined #ponylang
<Applejack_> Hi, why is the method used to retrieve an element at index i of an array V called "apply", requiring V.apply(i), which reads kind of weird for what it does ?
<SeanTAllen> I'm not sure I understand Applejack_, can you post a snippet of code?
<Praetonus> Applejack_: You can use syntaxic sugar. myobject(i) will be sugared to myobject.apply(i)
trapped has joined #ponylang
_andre has joined #ponylang
<Applejack_> SeanTAllen: well, I mean that if you have an array V then accessing element at index i is V.apply(i), cf. http://www.ponylang.org/ponyc/collections-List/#apply
<Applejack_> Praetonus: sylvanc: ok, so it's basically because we want to be able to use the sugar V(i)... I see
<sylvanc> and you can also use the update sugar:
<sylvanc> given x: Array[U64]
<sylvanc> let y = x(3)
<sylvanc> x(3) = 7
<malthe> python's setdefault sugar is so bad, b/c of eager evaluation of the default.
<malthe> what does pony do here
<malthe> r/sugar/api
<shepheb> wow! I had my JSON parser running through this 80MB file in ~8 seconds
<shepheb> then I commented out all the Debug() calls, which assembled soemtimes complex strings
<shepheb> even though I wasn't building in debug mode
<shepheb> now it runs in < 0.5s
<shepheb> fast enough that I now distrust that it's parsing correctly
<shepheb> I guess I need to remember that in non-debug mode a Debug() still builds the string and calls the function, it just happens to be empty.
<shepheb> I'm getting "cannot allocate memory" but it doesn't seem to be due to exhaustion.
<shepheb> not sure what that means
copy` has joined #ponylang
<SeanTAllen> shepheb: Debug operating like Logger does might make sense, where a shortcircuit prevents the strings from being constructed if not needed.
<shepheb> it's easy to avoid when I'm not debugging the parser itself, anyway
<shepheb> according to a valgrind profile, this used ~800M of memory before dying
<shepheb> which is a lot more than it should, on the one hand
<shepheb> but nowhere near enough to OOM-kill the process on the other
<shepheb> (architecture now is an actor listening for results and pushing them onto an array, while another actually runs tail-recursively through the parser. I think that will allow GCs as it goes.)
<sylvanc> shepheb: i just pushed a memory leak fix
<sylvanc> dunno if it will affect what you're doing
<shepheb> I'll pull and try again, then
<sylvanc> but maybe worth trying?
<shepheb> same result, I'm afraid.
<shepheb> it's worth noting that it crashes almost instantly, while parsing entry 4 of 61k
<shepheb> and the memory usage during that short time looks like (MB): 0.4, 2.5, 5, 7, 10, 18, 152, 303, 454, 589, 723, 723, 723, 723 - dead
<shepheb> which suggests that parsing or constructing each object is causing ~150MB explosion.
unbalancedparen has joined #ponylang
srm` has joined #ponylang
<srm`> Hello :)
<srm`> I'm happy to see lots of people there
<srm`> Is it possible to display the current capability of an objet/variable ?
<srm`> (for debug purpose)
<Praetonus> Capabilities don't exist anymore at runtime
<shepheb> so I've solved some of the problems but now I'm back to the one where it's getting slower and slower and slower as I parse more
<shepheb> is it GCing across all the items I've parsed so far?
<srm`> oh... well ok thanks Praetonus
hibnico has joined #ponylang
<shepheb> hm
<shepheb> well, I've come full-circle on this JSON parsing problem
<shepheb> I had a memory explosion using the original JSON parser, so I split it into an actor to allow a GC between each parse
<shepheb> that was brutally slow as the working set got larger
gsteed has joined #ponylang
<shepheb> I wrote a faster JSON parser in parallel, that also generates ~no garbage
<shepheb> now I find that the GCs are finding nothing to collect but still taking lots of time
<shepheb> folding my actors back into a single synchronous call results in sane memory use and parses 80MB of JSON in under 1s.
hibnico has quit [Quit: hibnico]
hibnico has joined #ponylang
_andre has quit [Ping timeout: 240 seconds]
<Applejack_> Is it possible to know the thread number and cpu/core number an actor (or rather its behavior) ran on ?
_andre has joined #ponylang
<Praetonus> Applejack_: Seems to be the runtime function pony_thread_self
Praetonus has quit [Quit: Leaving]
SilverKey has joined #ponylang
<Applejack_> Praetonus: How do we access runtime functions? How can I access pony_thread_self inside a behavior?
Applejack_ has quit [Ping timeout: 250 seconds]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
<srm`> how i can make an object isolated to pass it to an actor ?
jemc has joined #ponylang
amclain has joined #ponylang
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
<shepheb> srm`: it needs to be isolated from the start. the simplest way is recover MyObject() end
<shepheb> that returns a MyObject iso
<shepheb> then you can pass it by consume-ing it
tm-exa has quit [Quit: Computer has gone to sleep]
aturley has joined #ponylang
<jemc> AppleJack_: @pony_thread_self[ULong]()
hibnico has quit [Quit: hibnico]
<jemc> srm`: if you want to see the reference capability of a reference, you can try assigning it to a new reference that is the wrong type, so that the compiler will tell you that the type doesn't match and show what the type (including the ref cap) is
<jemc> for example, you can use the type `None val` to force a type mismatch
<jemc> let x: None = consume obj
<jemc> you'll see a compiler error message like: "MyObject ref is not a subtype of None val"
<srm`> ok thank you
tm-exa has joined #ponylang
tm-exa has quit [Quit: Computer has gone to sleep]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
Praetonus has joined #ponylang
SirWillem has joined #ponylang
lispmeister has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Matthias247 has joined #ponylang
Lingo has joined #ponylang
Lingo is now known as jkleiser
Applejack_ has joined #ponylang
<Applejack_> jemc: Praetonus: thanks, will try to find the core number now.
<jemc> looks like it doesn't give you a core number directly - it gives you the pthread number
SirWillem has quit [Ping timeout: 244 seconds]
_andre has quit [Quit: leaving]
aturley has quit [Ping timeout: 240 seconds]
aturley has joined #ponylang
Applejack_ has quit [Ping timeout: 250 seconds]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
aturley has quit [Ping timeout: 264 seconds]
aturley has joined #ponylang
Applejack_ has joined #ponylang
unbalancedparen has quit [Quit: WeeChat 1.5]
trapped has quit [Read error: Connection reset by peer]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
Applejack_ has quit [Quit: Page closed]
jkleiser has quit [Quit: Be back later ...]
Praetonus has quit [Quit: Leaving]
hibnico has joined #ponylang
hibnico has quit [Client Quit]
aturley has quit [Ping timeout: 276 seconds]
hibnico has joined #ponylang
hibnico has quit [Quit: hibnico]
SilverKey has quit [Quit: Halted.]
hakvroot_ has joined #ponylang
hibnico has joined #ponylang
akant_ has joined #ponylang
amclain has quit [*.net *.split]
akant has quit [*.net *.split]
puzza007 has quit [*.net *.split]
cquinn has quit [*.net *.split]
jonrh has quit [*.net *.split]
hakvroot has quit [*.net *.split]
jkleiser has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
<SeanTAllen> What'd you change shepheb ?
jkleiser has quit [Ping timeout: 276 seconds]
hibnico has quit [Quit: hibnico]
aturley has joined #ponylang
aturley has quit [Ping timeout: 240 seconds]
SirWillem has joined #ponylang
amclain has joined #ponylang
cquinn has joined #ponylang
gsteed has quit [Quit: Leaving]