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
gokr has quit [Quit: Leaving.]
jemc has quit [Ping timeout: 264 seconds]
acarrico has joined #ponylang
jemc has joined #ponylang
jemc has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
jemc has quit [Ping timeout: 240 seconds]
dougmacdoug has joined #ponylang
TheNet has joined #ponylang
TheNet has quit [Client Quit]
jemc has joined #ponylang
jemc has quit [Ping timeout: 240 seconds]
khan has joined #ponylang
dougmacdoug has quit [Ping timeout: 260 seconds]
gokr has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
mahmudov has quit [Ping timeout: 252 seconds]
khan has quit [Quit: khan]
mahmudov has joined #ponylang
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
bimawa2 has joined #ponylang
bimawa1 has quit [Ping timeout: 248 seconds]
codec1 has joined #ponylang
codec1 has quit [Quit: Leaving.]
mahmudov has quit [Ping timeout: 252 seconds]
codec1 has joined #ponylang
milisarge has quit [Ping timeout: 265 seconds]
mahmudov has joined #ponylang
ficl has joined #ponylang
codec1 has quit [Client Quit]
codec1 has joined #ponylang
codec1 has quit [Client Quit]
khan has quit [Quit: khan]
codec1 has joined #ponylang
_andre has joined #ponylang
codec1 has quit [Quit: Leaving.]
gokr has quit [Quit: Leaving.]
codec1 has joined #ponylang
khan_ has joined #ponylang
mahmudov has quit [Ping timeout: 252 seconds]
milisarge has joined #ponylang
mahmudov has joined #ponylang
codec1 has quit [Ping timeout: 248 seconds]
codec1 has joined #ponylang
gokr has joined #ponylang
codec1 has quit [Ping timeout: 240 seconds]
codec1 has joined #ponylang
gokr has quit [Quit: Leaving.]
vaninwagen has joined #ponylang
vaninwagen has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
gokr has joined #ponylang
dougmacdoug has joined #ponylang
mson has joined #ponylang
jemc has quit [Ping timeout: 256 seconds]
jemc has joined #ponylang
gokr has quit [Ping timeout: 240 seconds]
jemc has quit [Ping timeout: 240 seconds]
endformationage has joined #ponylang
jemc has joined #ponylang
jemc has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
ficl has quit [Ping timeout: 240 seconds]
_andre has quit [Quit: leaving]
gokr has joined #ponylang
TheNet has joined #ponylang
codec1 has quit [Read error: Connection reset by peer]
khan_ has quit [Quit: khan_]
khan has joined #ponylang
user10032 has joined #ponylang
nisanharamati has joined #ponylang
gokr has quit [Ping timeout: 252 seconds]
khan has quit [Quit: khan]
mahmudov has quit [Ping timeout: 240 seconds]
khan has joined #ponylang
mson has quit [Quit: Connection closed for inactivity]
jemc has quit [Ping timeout: 260 seconds]
jemc has joined #ponylang
codec1 has joined #ponylang
TheNet has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
khan has quit [Quit: khan]
khan has joined #ponylang
TheNet has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
<dougmacdoug> not sure if this is at the compiler/runtime level but I put a question here: http://playground.ponylang.org/?gist=46b66203d9cb2097e879a2b927309849 Its probably much ado about nothing, just trying to understand performance implications of a design pattern
<jemc> > does get_foo create a new pointer to Foo each time
<jemc> it'll return a constant value - the same Foo pointer every time, because `Foo` as an expression implies `Foo.create()`, which is a primitive constructor
<jemc> > does it require extra vtable lookups
<jemc> yes, I believe that any time you call a method on a `trait` or `interface` table, you're hitting a vtable - but I could be wrong on that, maybe someone will correct me
<jemc> the biggest performance issue you'll see with that snippet, is that "foo" + "bar" will allocate a new string every time you do it
<jemc> which you'll have with both the `bar` and `foobar` method
<jemc> if you want to measure the vtable impact, you can use the `ponybench` library to compare `bar` and `foobar`
<jemc> since they should otherwise be pretty identical
<dougmacdoug> yeah, foo + bar was just nonsense part.. the issue is I made some default methods on a trait and they all lookup the primitive they need then run a function.. I could solve it by copying the default code into each implementation.. so its a tradeoff
<dougmacdoug> each implementation would then be able to call the primitive directly without doing the "get_foo" call
khan has quit [Quit: khan]
khan has joined #ponylang
<jemc> this may be the perfect case for type parameters actually
<jemc> dougmacdoug: type parameters are resolved at compile time, so if you know which FooProvider to use at compile time, you can pass it as a type argument
<jemc> and then the vtable hit goes away
<dougmacdoug> the funny thing is my actual code is already using a type parameter but this is a great idea I think I can add another type parameter for this field
<dougmacdoug> cool.. going to try it out.. thanks!
khan has quit [Client Quit]
khan has joined #ponylang
mahmudov has joined #ponylang
user10033 has joined #ponylang
user10032 has quit [Ping timeout: 264 seconds]
<dougmacdoug> @jemc worked out great thanks again
<jemc> cool!
<jemc> no problem
user10033 has quit [Quit: Leaving]
Pyrrh_ has joined #ponylang
Pyrrh has quit [Ping timeout: 240 seconds]
Pyrrh_ is now known as Pyrrh
gokr has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
dougmacdoug has quit [Quit: dougmacdoug]