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
<mvzink> i noticed there's an rfc for read_until() on buffered.Reader https://github.com/ponylang/rfcs/pull/34
<mvzink> i added something similar for StringBytes in my local ponyc repo. would that be worth an rfc?
<SeanTAllen> an RFC never hurts. i can't say if it would be accepted or rejected but there's no harm in opening a RFC.
mvzink has quit [Quit: A merry Christmas to all, and to all a good night!]
runehog has quit [Remote host closed the connection]
mvzink has joined #ponylang
runehog has joined #ponylang
mvzink has quit [Quit: A merry Christmas to all, and to all a good night!]
Praetonus has quit [Ping timeout: 255 seconds]
Praetonus has joined #ponylang
montanonic has joined #ponylang
<SeanTAllen> doublec: could you make sure all your pony related posts are accounted for in this list? https://github.com/ponylang/ponylang.github.io/blob/tufte-ponylang/content/community/planet-pony.md
<doublec> SeanTAllen: yep, they're all there
montanonic has quit [Ping timeout: 276 seconds]
montanonic has joined #ponylang
<SeanTAllen> awesome. thanks doublec
montanonic has quit [Ping timeout: 265 seconds]
Praetonus has quit [Quit: Leaving]
jemc has joined #ponylang
mcguire has quit [Ping timeout: 265 seconds]
runehog has quit [Remote host closed the connection]
mvzink has joined #ponylang
mvzink has quit [Client Quit]
runehog has joined #ponylang
polypus74 has quit [Remote host closed the connection]
montanonic has joined #ponylang
mrkishi has quit [Ping timeout: 265 seconds]
rurban has joined #ponylang
rurban has quit [Client Quit]
jemc has quit [Ping timeout: 240 seconds]
mrkishi has joined #ponylang
amclain has quit [Quit: Leaving]
TonyLo_ has joined #ponylang
mrkishi has quit [Ping timeout: 265 seconds]
rurban has joined #ponylang
montanonic has quit [Ping timeout: 272 seconds]
montanonic has joined #ponylang
montanonic has quit [Ping timeout: 240 seconds]
montanonic has joined #ponylang
montanonic has quit [Ping timeout: 240 seconds]
montanonic has joined #ponylang
montanonic has quit [Ping timeout: 265 seconds]
lispmeister has joined #ponylang
rurban has quit [Quit: Leaving.]
rurban has joined #ponylang
lispmeister has quit [Quit: Textual IRC Client: www.textualapp.com]
dinfuehr has quit [Ping timeout: 255 seconds]
dinfuehr has joined #ponylang
montanonic has joined #ponylang
montanonic has quit [Ping timeout: 248 seconds]
TonyLo_ has quit [Ping timeout: 244 seconds]
TonyLo has joined #ponylang
_andre has joined #ponylang
rurban has quit [Quit: Leaving.]
<TonyLo> type Rel is (Inh | Sim | Imp | Equ | And | Or) // defined as primitives
<TonyLo> type Term is (String | (Rel, Array[Term]))
<TonyLo> oops
<TonyLo> The question was how do I represent this recursive type in Pony - as the compiler complains about this approach?
<SeanTAllen> TonyLo: sadly, you can't at the moment.
rurban has joined #ponylang
<malthe> Was it ever considered to use a keyword when invoking a behavior, e.g. "async read_next()" or "schedule read_next()" - ? It's sometimes a little awkward that some function calls are synchronous and other asynchronous when you can't tell from the call site.
<malthe> This is mostly from reading the network implementation code.
<TonyLo> SeanTAllen: thx for the response - it's a shame this is not possible as this is a basic functional programming type requirement - Have to resort to clases then :)
<malthe> TonyLo: sylvanc calls it infinite type alias recursion (https://github.com/ponylang/ponyc/issues/267#issuecomment-134556074)
<malthe> but ocaml for example supports it fine: type intlist = Nil | Cons of (int * intlist)
<TonyLo> as does Haskell an F#
<TonyLo> I can see Sylvan's point though - if you want the compiler to produce safe types then I guess this is a sacrifice that has to be made
mitnk has joined #ponylang
<TonyLo> malthe: thx for the link - after careful reading it would seem that my requirement is not infinite recursion as it terminates with a String: type Term is (String | (Rel, Array[Term])), so maybe this will be possible at some point in the future :)
trapped has joined #ponylang
<TonyLo> I noticed that issue Allow finite recursive type aliases #267 has been changed to an RFC - is there a mechanism to vote on RFC requests in place?
Praetonus has joined #ponylang
jemc has joined #ponylang
jemc has quit [Client Quit]
jemc has joined #ponylang
mrkishi has joined #ponylang
<jemc> TonyLo: I don't think the "turn into RFC" label was correct, I've removed it, as I don't think it needs an RFC
<jemc> TonyLo: you can see outstanding RFCs here: https://github.com/ponylang/rfcs/pulls
<TonyLo> great thx
trapped has quit [Read error: Connection reset by peer]
<SeanTAllen> jemc: i think it should have an RFC to suss out issues
<SeanTAllen> TonyLo: allowing for the recursive defintions is desired functionality, it just hasnt been done. you arent the only one feeling that pain
<jemc> SeanTAllen: what kind of issues are you talking about - do you have any examples in mind for this particular ticket?
<jemc> as discussed in the ticket - it's already something sylvanc said (before we had the RFC system) that the language *should* support - it's just that the implementation in C will be complex and hasn't been done yet
rurban has quit [Quit: Leaving.]
<SeanTAllen> its an old issue that no one has discussed in a while. to say that we should go over it again before implementing at some point in the future, seems reasonable to me.
<jemc> SeanTAllen: well, we can certainly talk about it again at the next sync call, but I don't think there's anything else that particularly needs to be determined about it, and I also don't think it's in the class of issues that warrants or makes sense for an RFC
<jemc> we can get sylvanc to cast a tiebreaking opinion about it, I suppose
<Praetonus> TonyLo: You can spcify the array literal type explicitly like this: [as Term: "cat", "animal"]
<TonyLo> great thx, that is what I was looking for
rurban has joined #ponylang
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
<SeanTAllen> jemc you should be wary of sylvanc as a tie breaker. i have a lot of blackmail material on him. ;)
mitnk has quit [Remote host closed the connection]
amclain has joined #ponylang
* jemc can't tell if that was a warning to him or a warning to sylvanc :O
<jmiven> Blackmail-oriented programming :-D
<TonyLo> Hi, if anyone has the energy, could someone explain how the pingpong example with a single actor (with a ping and pong behaviour) can still use all the threads on my dev machine (16). My understanding is that an actor is single threaded and sequential so how can it use more than one thread to process it's behaviours?
<SeanTAllen> q 1: how do you know its using 16 threads?
<SeanTAllen> q 2: what does "using" mean?
<TonyLo> I set --ponythreads to 16 and watch CPU monitor max out
rurban has quit [Quit: Leaving.]
<SeanTAllen> what cpu monitor?
<TonyLo> Windows Task Manager
<TonyLo> When I run pong it hits 100% and drops back when it exits
<TonyLo> That's 100% across all cores
<TonyLo> This is the code - just in case I am being a complete idiot :) - https://gist.github.com/TonyLo1/cfcccaa6429c4929c7574594c11f9be5
<SeanTAllen> I'm not familiar with windows or windows task manager so I wouldnt be able to answer that beyond saying that those other threads that you told to run, they are going to be executing the work stealing code and trying to find work to steal. If you give Pony 16 threads its going to try to use them.
<SeanTAllen> you if you were to hook up a profiler i would suspect you'd see a lot of time in the work stealing code
<TonyLo> I have noticed that allocating more threads than actors does in fact slow the program down - so maybe that is the explanation - thx
<SeanTAllen> that said, it doesnt use 100% of all cpus for me on my machine so... there's i'm not a windows expert nor do i know how task manager does measurement aspects
<SeanTAllen> you will often find a single thread can result in best performance for some programs. it maintains cache locality a lot better. advice i often give is to test with various levels of threads and see what works best for you. that is, assuming you have a relatively small number of actors.
<TonyLo> yes, I have found this - the app I am building has millions of actors though, so I dont expect this to be an issue :)
<SeanTAllen> busy day on the RFCs
<malthe> ya I don't mean to be a OOP purist or pedantic but I think it's important to take a stand.
<malthe> like FP vs OOP, it's different paradigms.
<jemc> I actually feel like the stand Pony is making is to stand up to the "conventional wisdom" that a programming language can only support one or the other
<malthe> jemc: seems to me that you're arguing more in favor of FP then.
<malthe> i'm starting to get the conviction that OOP is wrong simply because N people will have N different interpretations of what's right.
<jemc> I love objects - I also love stateless functions - they both have their place, even coexisting in the same solution
<jemc> I think Pony is less about ideological purity and more about being able to get practical things done - having the power and flexibility to create performant, maintainable solutions to real world problems
<TonyLo> Did you guys happen to ctach Sylvan's Microsoft Research Talk where he says that Pony is really functional but does OOP so it doesn't scare off the object fraternity :)
<jemc> I don't think I've seen that particular talk, but I know this has been discussed in the past - Pony is proving that with rcaps and a good compiler, we can have many of the benefits of FP without giving up the benefits of objects
<TonyLo> as an F# programmer I find access to both paradigms very useful - there is benefits to both styles so why not use the best of each - I think that has beenth e Pony approach
<malthe> well case in point, a number format; it's actually a thing! a program might very well have one or more number formats to deal with.
<malthe> so if we have such a naturally occuring object, then why not embrace it.
<malthe> versus fibonacci, which is obviously a function.
<jemc> malthe: did you see my demonstration of how to use primitives for easily reusable formats?
<malthe> I think the performance argument is kind of weak or surprising. I never saw a program that was limited on the number of numbers it could format.
<malthe> jemc: ya, wrapping it, I saw it.
<jemc> primitives in pony are first class values, and can be passed around like `val` objects, because they are
<malthe> it's not a bad idea perhaps. having the stdlib-provided functions and then one can write objects if need be.
<jemc> you could also use a `lambda`, which is syntax sugar for pretty much the same thing (under the hood, it creates a primitive with "no name" and returns it as a value)
<malthe> I don't mind if it's turtles all the way down to some primitives.
<malthe> (some pure functions, essentially.)
<malthe> I do think that it raises a question of when do we put a function in a bag, and when do we attach it to a class as a method.
<jemc> having a clear set of API design practices for the standard library would definitely be a benefit to the project, with that concern included
<SeanTAllen> is this related to primitive vs class? there's zero use for a class that has no fields. primitives should be used. if you need fields aka state, you need a class.
<SeanTAllen> "number format is a thing" does not ring true to me. a "thing that formats numbers" is a thing. a number format is not a thing.
<SeanTAllen> 1. correct
<SeanTAllen> 2. fast
<SeanTAllen> that's my rubric for all things in Pony.
<SeanTAllen> we are willing to give up "ergonomics" and other such things for performance
<SeanTAllen> i'm working in a codebase where every branch has serious impact on our ability to sell so, i take the pony philosophy of correct and fast very seriously
<malthe> SeanTAllen: it does have state though.
<SeanTAllen> then it has to be a class. and the first question should be, can we do this with a primitive somehow, because there will be better performance. if not, then its a class.
<malthe> it knows about the number format, i.e. thousand separation etc
<jemc> malthe: it has state in the same way a curried lambda has state, so a curried lambda would be preferable
<malthe> at least my understanding of it is that it sort of represents the locale-specific number format (or something entirely custom).
<malthe> jemc: ya it has immutable state.
<malthe> some OOP proponents claim those are the only true objects!! :-)
<malthe> one argument goes like this: an object could be the key into a map. what happens if the object changes?
<malthe> for example, strings are often used as keys to a map, but in Pony, they're mutable.
<SeanTAllen> Strings are not mutable, they can be mutable. You can create mutable and immutable strings.
<malthe> right, if the string is made read-only to everyone then it's immutable. like that?
<malthe> like a String val
<jemc> malthe: of course he's talking about `String val` - `val` is immutable in Pony, which you know and we know - I don't know if you're going for rhetorical flourish, but please just make your point instead - there's no reason someone should have to answer your rhetorical question when we all know the answer already
<SeanTAllen> unrelated, jemc i might actually put the c preprocessor into our pony code base because i really really want/need macros. does that make me an awful person?
<jemc> ha!
<jemc> not awful, but it's good to know that it's a big deal for you
<malthe> sry, didnt mean to be a goof.
<jemc> SeanTAllen: would you want to set aside some phone time for pony preprocessor brainstorming so I can understand what your use case and requirements are?
<jemc> (and/or any ideas you may already have)
<SeanTAllen> all my ideas are probably bad and are definitely half baked. but yes, we should do that sometime. maybe early next week?
<SeanTAllen> i have a bunch of possible client and investor meetings next week so i can't say anything beyond "early next week" at moment as 3 of the 4 meetings are in flux.
<jemc> sure, no worries
<SeanTAllen> got to bring in that $
<jemc> amazing how that ends up being the top priority ;)
<SeanTAllen> i could eliminate many conditionals if we had "macros". which is big deal when those many conditionals get called a few hundred thousands times a second
<jemc> if you have time to gist a pseudocode / contrived version of such a case, I'd like to see it
<SeanTAllen> o god and i just realized the next step after that is embedding the compiler in binaries, except well i already knew we would need that eventually
<jemc> for REPL?
<SeanTAllen> no, to be able to dynamically change apps with new macro code at runtime
<jemc> heh, is it still a macro at that point?
<SeanTAllen> i think so...
rurban has joined #ponylang
_andre has quit [Quit: leaving]
montanonic has joined #ponylang
rurban has quit [Quit: Leaving.]
TonyLo has quit [Ping timeout: 240 seconds]
amclain has quit [*.net *.split]
pyon has quit [*.net *.split]
hakvroot has quit [*.net *.split]
prettyvanilla has quit [*.net *.split]
lisael has quit [*.net *.split]
mrkishi has quit [*.net *.split]
dinfuehr has quit [*.net *.split]
strmpnk has quit [*.net *.split]
gornikm has quit [*.net *.split]
Xe has quit [*.net *.split]
sjums has quit [*.net *.split]
adamkittelson has quit [*.net *.split]
shepheb has quit [*.net *.split]
unbalancedparen has quit [*.net *.split]
kajstrom_ has quit [*.net *.split]
Praetonus has quit [*.net *.split]
runehog has quit [*.net *.split]
bbhoss has quit [*.net *.split]
NhanH has quit [*.net *.split]
malthe has quit [*.net *.split]
sylvanc has quit [*.net *.split]
SeanTAllen has quit [*.net *.split]
dinfuehr has joined #ponylang
mrkishi has joined #ponylang
gornikm has joined #ponylang
strmpnk has joined #ponylang
adamkittelson has joined #ponylang
sjums has joined #ponylang
darach has quit [Ping timeout: 245 seconds]
mankyKitty has quit [Ping timeout: 263 seconds]
runehog has joined #ponylang
malthe has joined #ponylang
Praetonus has joined #ponylang
sylvanc has joined #ponylang
SeanTAllen has joined #ponylang
strmpnk has quit [Ping timeout: 252 seconds]
gornikm has quit [Ping timeout: 252 seconds]
emilbayes has quit [Ping timeout: 265 seconds]
amclain has joined #ponylang
prettyvanilla has joined #ponylang
hakvroot has joined #ponylang
pyon has joined #ponylang
Xe has joined #ponylang
c355e3b has quit [Ping timeout: 265 seconds]
lisael has joined #ponylang
srenatus[m] has quit [Ping timeout: 276 seconds]
irx[m] has quit [Ping timeout: 276 seconds]
kajstrom_ has joined #ponylang
unbalancedparen has joined #ponylang
shepheb has joined #ponylang
darach has joined #ponylang
jonrh has quit [Ping timeout: 244 seconds]
mankyKitty has joined #ponylang
mvzink has joined #ponylang
emilbayes has joined #ponylang
gornikm has joined #ponylang
irx[m] has joined #ponylang
c355e3b has joined #ponylang
srenatus[m] has joined #ponylang
jonrh has joined #ponylang
strmpnk has joined #ponylang
NhanH has joined #ponylang
bbhoss has joined #ponylang
prettyvanilla has quit [Ping timeout: 264 seconds]
prettyvanilla has joined #ponylang
mrkishi has quit [Remote host closed the connection]