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 | Please consider participating in our mailing lists => https://pony.groups.io/g/pony
mollymorphic has quit [Quit: Lost terminal]
aturley has joined #ponylang
aturley_ has quit [Ping timeout: 258 seconds]
aturley_ has joined #ponylang
aturley has quit [Ping timeout: 255 seconds]
jemc has quit [Ping timeout: 264 seconds]
aturley has joined #ponylang
aturley_ has quit [Ping timeout: 248 seconds]
gopherist has joined #ponylang
vivus has quit [Quit: Leaving]
jemc has joined #ponylang
poned has joined #ponylang
poned has quit [Client Quit]
jemc has quit [Ping timeout: 248 seconds]
jemc has joined #ponylang
endformationage has joined #ponylang
krylon has joined #ponylang
krylon has left #ponylang [#ponylang]
martinium has joined #ponylang
martinium has quit [Client Quit]
jemc has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
paladin_ has joined #ponylang
paladin_ has left #ponylang [#ponylang]
jemc has quit [Ping timeout: 255 seconds]
user10032 has joined #ponylang
endformationage has quit [Quit: WeeChat 1.9.1]
gokr has joined #ponylang
user10032 has quit [Quit: Leaving]
dipin has quit [Quit: dipin]
dipin has joined #ponylang
codec_ has joined #ponylang
digdug_ has joined #ponylang
vaninwagen has joined #ponylang
vaninwagen has quit [Client Quit]
samuell has joined #ponylang
vaninwagen has joined #ponylang
Praetonus has joined #ponylang
vaninwagen_ has joined #ponylang
vaninwagen has quit [Ping timeout: 248 seconds]
krylon has joined #ponylang
<codec_> Hi
<codec_> @Praetonus, did you manage to do some progress on the code generation bug I discovered yesterday?
<Praetonus> codec_: Not yet. I'll take a closer look later today or next week
<codec_> maybe I should open a bug just we can keep track of it?
<codec_> Plus when you do a PR once you solve it will add some background
<Praetonus> Yeah, that'd be great
<codec_> will do
krylon has quit [Remote host closed the connection]
bitcrusher has quit [Read error: Connection reset by peer]
enilsen16 has joined #ponylang
_andre has joined #ponylang
codec_ has quit [Ping timeout: 260 seconds]
<gokr> Tried compiling Tokara but it fails with ... aha. It's the new ? syntax thingy.
<gokr> I am reading up on pony and will probably write some blog article comparing Pony to primarily Nim I think.
<SeanTAllen> gokr: Welcome! I dont know that Tokara is still being developed. We haven't seen the author in IRC for quite a while.
<gokr> Hi, thanks!
<SeanTAllen> I hope you enjoy Pony gokr. The goals are definitely different than Nim.
<gokr> A few random things I have noted so far - Pony is "behind" on the tooling side as (as we all know) and Nim has some nice KISS tooling that might serve as inspiration. For example, stable could be evolved into something similar to nimble (Nim's equiv).
<gokr> Yes, I know the goals are different - lots of things are different - but still, lots of overlap.
<gokr> Question: Nim has nimsuggest (the compiler running in a sort of query-mode, to offer completions etc for IDEs) - anything similar planned for Pony?
<doublec> gokr: things like that tend to be implemented by pony users who want it - I haven't heard of plans by anyone.
<SeanTAllen> gokr: the plan would be to support a language server. we are hoping someone picks that up.
<gokr> Curious, are you Chris Double?
<SeanTAllen> He is
<gokr> Ah :) Small world.
<gokr> SeanTAllen: Ah, there you go. Didn't know about that one, nice.
<doublec> gokr: yes, it is indeed a small world :)
<SeanTAllen> In the end, someone needs to step in and do it. so far, no one has had a large enough itch to want to tackle it.
<SeanTAllen> most of us who are committers already have packed schedules. need more help!
<gokr> Yeah, I understand. But from the looks of... Wallaroo (just stumbled over it) you at least have solid ground to stand on now. That's very nice.
<SeanTAllen> Wallaroo was very much "batteries not needed" for where we started from
<SeanTAllen> That helped a lot
<gokr> Yeah, I understand.
<doublec> Nim is nice, I used it for a couple of small utilities to get a feel for it a while back.
<SeanTAllen> THe surface of Pony APIs is small enough that autocompletion isnt something I've needed
<SeanTAllen> Hopefully some day, there will be many many many libaries and autocompletion is a thing we really need
<gokr> doublec: I have been dabbling with Nim, among other things for my own little weirdo lang (sprylang.org), but also recently a little server for remote controlling Arduino compilation/flashing etc.
<doublec> gokr: Oh nice, I'd seen mention of Spry before. It is inspired by the sorts of languages I like.
<gokr> SeanTAllen: I think "nimble" is prio 1 actually, you already have quite a lot of pony repos on github (I have skimmed a lot) - but no central way of using them.
<gokr> doublec: Spry is still very experimental (yeah, I know you used Factor a LOT) and a bit messy, but fun.
* gokr points at dom96
<gokr> SeanTAllen: So its simple, you give dom96 a HUGE lump of money and he can recreate nimble and choosenim for pony ;) And Jester.
<doublec> Oh, is dom96 the Nim in Action author?
<gokr> yeah, and nimble, and choosenim, and Jester and most of asyncdispatch and big parts of stdlib of Nim. ;)
<doublec> nice
<gokr> doublec: So are you mostly ponying these days or?
<doublec> gokr: I dabble with a few languages still. My day job is C++/JavaScript. My own projects tend to be Pony or ATS.
<gokr> No more Factor or Smalltalk? :)
<gokr> You are one of those out there that have been all over the place through the years.
<doublec> Not lately. I still have a project in Factor that I keep running that I originally wrote for testing HTML video in Firefox (http://tinyvid.tv) but don't do much other than fix bitrot.
<doublec> I like Pony's multicore capability, which I miss in Factor, etc, with them all being single threaded.
<doublec> I do still play with the Self, Oz, and other older language implementations though.
<gokr> For me its lots of js/nodejs, a bit of Arduino, and I think we are going to do quite a bit of Elixir/Phoenix also. Nim is mostly for fun still. I haven't touched Smalltalk in a long while, but... I still feel so frustrated that no other langs "come close" in productivity/environment.
<doublec> But for "real world" code, it's been Pony, ATS, C++.
<doublec> gokr: Yeah, I love the Self environment especially. Pharo smalltalk is very nice too.
<doublec> I'd like to do an Oz or Self VM in Pony as a project.
<gokr> I might try to port Spry to Pony, that would be nice.
<doublec> Yes, it'd be a good project to learn Pony
<gokr> exactly
<gokr> I do think Pony has something nice here - the Actor model combined with "reifying kinds of references". Nim has leanings towards Actors (one gc per thread, channels etc) but of course lacks the "reference capabilities". And Rust.. I dunno, it just turns me off. :)
<gokr> doublec: This is Araq's latest ideas which... I have not yet grasped the consequences of. https://nim-lang.org/araq/destructors.html
<doublec> interesting thanks. Nice to see other languages trying to do similar things to Pony and Rust in that area.
<doublec> I like Pony's capability model. It can be a learning curve but is really good at highlighting where you get things wrong at compile time.
<gokr> I have been trying to get Araq's view on Pony, because I do know he has studied it.
<gokr> Of course, his first comment was "yuk, it's written in C" :)
<gokr> Is there some plan on rewriting Pony in Pony? Or is it in C for good reasons?
<doublec> Yes, there's work in progress on a pony in pony
<gokr> Aha! Now we are talking.
enilsen16 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enilsen16 has joined #ponylang
gokr has quit [Ping timeout: 255 seconds]
jpoirier has joined #ponylang
jpoirier has left #ponylang ["Leaving"]
jpoirier_ has joined #ponylang
jpoirier_ has left #ponylang [#ponylang]
jpoirier has joined #ponylang
dipin has joined #ponylang
jemc has joined #ponylang
trevorriles has joined #ponylang
jemc has quit [Quit: WeeChat 1.9]
jemc has joined #ponylang
acarrico has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ponylang
Praetonus has quit [Quit: Leaving]
vaninwagen_ is now known as vaninwagen
dipin has quit [Quit: dipin]
dipin has joined #ponylang
_whitelogger has joined #ponylang
acarrico has joined #ponylang
_whitelogger has quit [Ping timeout: 258 seconds]
_whitelogger_ has joined #ponylang
acarrico has quit [Ping timeout: 258 seconds]
acarrico has joined #ponylang
samuell has quit [Remote host closed the connection]
krylon has joined #ponylang
samuell has joined #ponylang
gokr has quit [Ping timeout: 258 seconds]
Candle has quit [Ping timeout: 264 seconds]
Candle has joined #ponylang
nisanharamati has joined #ponylang
enilsen16 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dougmacdoug has joined #ponylang
dipin has quit [Quit: dipin]
dougmacdoug has left #ponylang [#ponylang]
xi2 has joined #ponylang
trevorriles has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<xi2> Hi. Newbie here just playing around with Pony. I found that one of the benchmarks segfaults and some example code does not compile. Would you like me to file github issues for these, or are they known about?
bp__ has joined #ponylang
<bp__> Hi friends. I'm trying out Ponylang and trying to write a little memcached pool as a first shot. I'm somewhat familiar with the actor model but certainly no expert. I'm a little stuck on the right way to, when there are no connections available in the pool, instantiate a new connection and then send it a new task when it's ready
<bp__> the tricky part right now being "when it's ready"
endformationage has joined #ponylang
<bp__> I see that I can notify and maybe put it into the pool, but what would be a sane way to pass it work to do?
<bp__> I'm trying to avoid e.g. sleeping in a loop for work as that definitely seems like the opposite of the good way here :)
dipin has joined #ponylang
xi2 has quit [Quit: Page closed]
xi2 has joined #ponylang
trevorriles has joined #ponylang
<jemc> x12: feel free to file issue tickets about those, that would be much appreciated, thanks
<jemc> bp__: I'm happy to help you find the right pattern, can you show what you have so far?
trevorriles has quit [Client Quit]
trevorriles has joined #ponylang
<xi2> jemc: ok, will do!
<bp__> @jemc Not much, as mostly still theorizing, but maybe the intent makes sense: https://gist.github.com/bpicolo/ec2abf53aa29aec20c6e9d23b4fd1196
<bp__> I think I'm missing one sort of primitive I would expect to make use of here as a first pass (a queue with a timeout for retrieving an item from?)
<bp__> So the question is how I could replace that
<bp__> and how I might wait for a connection to be available appropriately would be handy too, if I hit some max pool size
<jemc> bp__: my most immediate thought is to add another field to pool `let _pending: Array[(String, Promise[(String | None)])] = []`
<bp__> And then fire a command whenever a connection is released?
<jemc> yeah, if one is pending
<bp__> hmm
<bp__> am somewhat worried about the possibility for indefinite blocking
<bp__> Would I need some actor monitoring the process for that?
<bp__> every second <check command staleness, fail if lasted to long> ?
<nisanharamati> or a TimerNotify (that gets cancelled if the command completes before it times out)
<bp__> nisanharamati mind gisting an example of what that might look like?
<bp__> @jemc Will give that a shot though, thanks
<bp__> :)
<nisanharamati> I can do that in a few minutes :)
<bp__> Thanks !
<jemc> yeah, a TimerNotify would be the way to deal with timing out and "rejecting" the timed-out promise
<jemc> on timeout, you'd reject the promise and return the connection to the pool
enilsen16 has joined #ponylang
<nisanharamati> There's also https://patterns.ponylang.org/async/waiting.html for just using timers in general
<nisanharamati> note that while I'm using another TimerNotify to do the cancelling, any class or actor could do here... they would just need tags to the original Timer and the Timers actor
<nisanharamati> but another Timer simulates "a command that takes some time to complete" pretty well :)
<bp__> Thanks for the link :)
<bp__> will save it for later heh
enilsen16 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dipin has quit [Quit: dipin]
enilsen16 has joined #ponylang
enilsen1_ has joined #ponylang
enilsen16 has quit [Ping timeout: 264 seconds]
dipin has joined #ponylang
dipin has quit [Client Quit]
xi2 has quit [Quit: Page closed]
trevorriles has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bp__> what are my options if a actor constructor should die on an error?
<bp__> `an actor constructor must handle any potential error`
<bp__> the error-raising piece is `env.auth as AmbientAuth`
<bp__> The class holds a reference to a TCPConnection, so if I can't connect then...how do I bail?
_andre has quit [Quit: leaving]
<bp__> Do I just make everything nullable?
<bp__> well
<bp__> | None
<jemc> the best pattern for this would probably be to push the possibility for error back up to being the caller's responsibility
<jemc> in this case, the pattern would be to do the `env.auth as AmbientAuth` at the top level of your system, and just say that your `Pool` actor takes `AmbientAuth` instead of `Env` as its argument
<bp__> I want to have it around for logging too, hah
<bp__> well
<bp__> printline debugging
<bp__> :P
<jemc> for printline debugging, check out the `Debug` package
<bp__> Will do that, thanks
<jemc> err... I mean the `debug` package, which has a `Debug` primitive
<jemc> it's a way of "cheating" a bit and not passing around a logger reference where all you need to do is debug
<bp__> sounds like exactly what I need
<jemc> and you'd only pass around a logger reference to places where you actually expect to do "real" logging in your final application
<vaninwagen> bp__ in general for validating actor parameters and bail out for errors, there is the supply chain pattern: https://patterns.ponylang.org/creation/supply-chain.html
gokr has joined #ponylang
<jemc> vaninwagen: thanks for sharing that - I forgot we already had that write-up for the pattern I was trying to communicate
<bp__> @jemc Eyyy, I think I've successfully queried the darn thing. Thanks for the help
<vaninwagen> jemc i also forgot, SeanTAllen reminded me :)
<bp__> time to write the rest of the protocol up
<jemc> cool!
samuell has quit [Quit: Leaving]
vaninwagen has quit [Ping timeout: 240 seconds]
krylon has quit [Ping timeout: 258 seconds]
bp__ has quit [Ping timeout: 260 seconds]
enilsen1_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enilsen16 has joined #ponylang
enilsen16 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bp__ has joined #ponylang
<bp__> How does GC work for actors?
<bp__> `Garbage collection is never attempted on any actor while it is executing a behavior.` aha
<jemc> each actor is it's own GC scope, with GC being peformed in between behaviours for that actor, with an async protocol "behind the scenes" for actors doing something similar to reference counting to track when a shared object can be GC'd
<jemc> the actor itself would be one of the objects in its own GC scope, IIRC
<jemc> an actor will be GC'd as soon as the runtime can determine that it's not possible for it to receive any more messages
<bp__> Is it possibly to set TCP_NODELAY on a pony socket?
<SeanTAllen> yes
<SeanTAllen> there's a nodelay method on the socket
<SeanTAllen> you can call it from your notifier
<bp__> @SeanTAllen where is that?
<bp__> ahh
<bp__> @SeanTAllen don't see that in the docs? https://stdlib.ponylang.org/net-TCPConnectionNotify/
dipin has joined #ponylang
<bp__> ah thanks
enilsen16 has joined #ponylang
<bp__> is there a constant for number of bytes in a usize
<bp__> or some such
<jemc> `USize.bitwidth()` is the number of bits
<bp__> : ) Thanks!
enilsen16 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enilsen16 has joined #ponylang
bp__ has quit [Ping timeout: 260 seconds]
enilsen16 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]