emancu has quit [Read error: Connection reset by peer]
emancu_ has quit [Remote host closed the connection]
emancu has joined #ponylang
emancu_ has joined #ponylang
emancu has quit [Ping timeout: 244 seconds]
emancu_ has quit [Remote host closed the connection]
emancu has joined #ponylang
SilverKey has joined #ponylang
SirWillem has joined #ponylang
graaff has joined #ponylang
SilverKey has quit [Quit: Halted.]
aturley_ has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
SilverKey has joined #ponylang
emancu has quit [Remote host closed the connection]
emancu has joined #ponylang
emancu has quit [Read error: Connection reset by peer]
emancu has joined #ponylang
emancu has quit [Remote host closed the connection]
emancu has joined #ponylang
_andre has quit [Ping timeout: 250 seconds]
_andre has joined #ponylang
tm-exa has quit [Quit: Computer has gone to sleep]
trapped has quit [Ping timeout: 240 seconds]
amclain has joined #ponylang
trapped has joined #ponylang
copy` has joined #ponylang
SilverKey has quit [Quit: Halted.]
emancu has quit []
<shepheb>
slightly odd question: has there been any movement on the JSON API front? I remember seeing mention of problems with the JSON library a few weeks ago.
<shepheb>
I also had a painful experience with it, it felt like a lot of hoop-jumping was required to work with it.
<jemc>
shepheb: I think it's only been brainstorming so far - maybe it makes sense to open an issue ticket and collect ideas and pain points with the current API
SilverKey has joined #ponylang
<shepheb>
okay, that's about what I thought. I don't have any concrete suggestions, and it's been a while since I tried to use it.
<shepheb>
I've lost my grip on the problems.
trapped has quit [Read error: Connection reset by peer]
unbalancedparen has joined #ponylang
TwoNotes has joined #ponylang
<SeanTAllen>
we might have need of a better JSON api in which case one might appear
<TwoNotes>
Bbut, I just got the old one to work! waah
<TwoNotes>
Seems a RPi3 can do speech recognition at 1.3x real time all by itself. My Pony program now runs self-contained on one.
<SeanTAllen>
nice
<TwoNotes>
Without even breathing hard. But I am concerned about memory consumptionif I ran a lot of Pony programs at once. No sharable run-time?
<TwoNotes>
Each Pony executable seems to contain everything inside itself. No use of external .so files
<TwoNotes>
And each program has its own private copy of all the common packages
<shepheb>
doesn't that weigh in at megs each? how many processes are you planning to run?!
<shepheb>
it's just not that much, even on a RasPi.
<TwoNotes>
Maybe3. It struck me that "megs each" is a lot for such small programs.
<TwoNotes>
But there is other stuff running on there too. The speech recognizer, the synthesizer, a music player. It adds up
lispmeister has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shepheb>
I suppose. maybe there's some reason why it wouldn't work, but it seems like more careful configuration would allow dynamic linking against libponyrt and so on.
tm-exa has joined #ponylang
<TwoNotes>
I don't know how big al the included packages amount to. I know why the compiler has to look at the source code of the packages each time, but it seems wasteful to actually generate code for them each time
<shepheb>
it may just be a "simplest thing that could possibly work", which is to statically link a big binary
<jemc>
it definitely sounds possible to share compiled pony packages as dynamic libraries, but I would think the overall usefulness of such an option would depend on how distributed pony ends up fleshed out
<jemc>
it could be that distributed pony solves this problem in use cases like yours, or maybe it won't (I wouldn't know at the moment)
<shepheb>
it makes inlining a lot harder and so on; I'm not sure how difficult or otherwise that would be.
<TwoNotes>
inlining? You mean expanding function calls in place?
srenatus has quit [Quit: Connection closed for inactivity]
<shepheb>
yes. if you want to dynamically link the package, you have to call into it, of course.
<shepheb>
otherwise the inlined version and callable version can diverge.
<shepheb>
I'm speaking in general here, though - I have no idea how much, if any, inlining the Pony compiler does.
<shepheb>
it's a key optimization technique, though. lots of functions are short and it's much faster to inline their code at their call sites.
nyarum has joined #ponylang
nyarumes has quit [Ping timeout: 250 seconds]
<shepheb>
kicking around ideas for the JSON API, I think the parse-to-val side of it works fine. it's the construction that's a problem.
<shepheb>
on that side, I wonder about a "JSON sink", where I set things but can't read them, and it's doing its bookkeeping internally.
<shepheb>
nested structures make that kind of awkward, though.
<shepheb>
in any case my basic idea is that it's more or less write-only, until you pull the iso/val structure out at the end and hand it to the network code.
<shepheb>
like a StringBuilder in Java. you stream updates in and then finalize.
<shepheb>
can have a constructor that accepts an iso structure like the one it returns, so you can resume editing if you sacrifice your pointer to the iso.
<shepheb>
of course, if it's maintaining an iso internally and wants to touch it, the receiver type needs to be iso as well! and then we're back at the current API :(
<shepheb>
or am I misremembering?
<TwoNotes>
I like the map-like mechanism for fetching values.
<SirWillem>
Are there any resources on String formatting for printing?
<TwoNotes>
shepheb, I wrote a JSON wrapper that encodes things like [("key",value), ("key", value), ("key", value)]. It makes sending simple things a lot more concise.
aturley_ has quit [Ping timeout: 260 seconds]
aturley has joined #ponylang
_andre has quit [Quit: leaving]
tm-exa has quit [Quit: Computer has gone to sleep]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
<jemc>
SirWillem: you mean like, formatting integers to be printed, for example?
<TwoNotes>
In my experience, Arm based platforms are just a bit too slow to run Pulseaudio, so I use ALSA instead. But that might not always be the case so I guess I should not infer how the user has his system set up just based on the machine architecture.
<jemc>
I think it would be cool for Pony to allow custom ifdefs that are set from the CLI when running ponyc to compile a package
<TwoNotes>
Like the -D switch some languages have.. hm yes
<jemc>
for example, a flag I could pass to ponyc when compiling pony-zmq to tell it to skip libsodium-related stuff because I don't want to use encryption
<jemc>
and a way to have that flag map to a custom ifdef
<TwoNotes>
You could then put some logic into the Makefile to decide which features to include
<jemc>
yeah, exactly, and the Makefile invokes ponyc with the appropriate args
<TwoNotes>
My Makefile is already over 100 lines long. Choosing audio subsystems is commonly done with a ./configure script anyway
<TwoNotes>
Hmm, or I could look at runtime environment variables
TwoNotes has quit [Quit: Leaving.]
trapped_ has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
trapped has quit [Ping timeout: 260 seconds]
trapped_ has quit [Read error: Connection reset by peer]
aturley has joined #ponylang
aturley has quit [Ping timeout: 250 seconds]
mcguire has quit [Ping timeout: 260 seconds]
mcguire has joined #ponylang
gsteed has quit [Quit: Leaving]
prettyvanilla has quit [Read error: Connection reset by peer]