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
aturley has joined #ponylang
aturley has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
runehog has joined #ponylang
runehog has quit [Remote host closed the connection]
devbug has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 240 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
runehog has joined #ponylang
SilverKey has joined #ponylang
jemc has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 244 seconds]
copy` has quit [Quit: Connection closed for inactivity]
aturley has joined #ponylang
aturley has quit [Ping timeout: 252 seconds]
SilverKey has quit [Quit: Cheerio!]
jemc has quit [Quit: WeeChat 1.4]
aturley has joined #ponylang
SilverKey has joined #ponylang
aturley has quit [Ping timeout: 244 seconds]
SilverKey has quit [Quit: Halted.]
devbug_ has joined #ponylang
srenatus has joined #ponylang
devbug has quit [Ping timeout: 258 seconds]
devbug_ has quit [Ping timeout: 260 seconds]
aturley has joined #ponylang
aturley has quit [Ping timeout: 272 seconds]
aturley has joined #ponylang
aturley has quit [Ping timeout: 264 seconds]
aturley has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
trapped has joined #ponylang
hibnico has joined #ponylang
Achraf has joined #ponylang
Achraf has quit [Quit: Page closed]
andreaa has quit [Ping timeout: 272 seconds]
hibnico has quit [Quit: hibnico]
andreaa has joined #ponylang
c355e3b has joined #ponylang
hibnico has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 240 seconds]
Applejack_ has joined #ponylang
<Applejack_> Hi, when I have defined the same function over two different argument types, say f(x: F64): F32 and f(x: F32): F32, then apparently the compiler expects some binding variable to be a subtype of (None | F32 | F64) and if I have a previously defined variable y:F64, then writing y = f(y) does not work because of subtyping problem : cf. https://gist.github.com/anonymous/051b6d845bbc2975fa1eacb71a82ef31
<Applejack_> Do I just have to live with that ?
andreaa has quit [Ping timeout: 272 seconds]
Praetonus has joined #ponylang
hibnico has quit [Quit: hibnico]
andreaa has joined #ponylang
copy` has joined #ponylang
<SeanTAllen> because of how case functions are implemented at the moment, that is a yes. case functions compile down to a match statement that can return a None.
aturley has joined #ponylang
<Applejack_> SeanTAllen: Ok, but apart from that would you consider better practice to change a function name if it's argument type changes, like in my particular case where I want F32 or F64 as input and output, or perhaps use a generic (which I've never used yet in Pony) ?
aturley has quit [Ping timeout: 258 seconds]
<SeanTAllen> In theory, case functions shouldnt have that issue, in practice they do. I'm not aware of anyone really using them. Generics and/or constructing a match statement yourself might work out better for you at the moment Applejack_
<SeanTAllen> case functions need some love
<Applejack_> SeanTAllen: What's a good/readable example code using generics, knowing the tutorial doesn't cover that yet?
hibnico has joined #ponylang
<Praetonus> Applejack_: You may be interested in sylvanc's VUG talk on generics: https://vimeo.com/163871856
Achraf has joined #ponylang
<SeanTAllen> Using or writing Applejack_ ?
<Applejack_> SeanTAllen: didn't understand your question
<Applejack_> Ah, ok
<Applejack_> I would just like to see how we can write a function that accepts generics, like f[A](...)
<Applejack_> But I thought a bit about it and I don't see how I can avoid outputting (F32 | F64) and thus falling again into the subtyping problem I sent a gist about above
<doublec> Applejack_: if the implementation of the functions is different, generics won't help
<doublec> I'm assuming pony doesn't have specialisation of generic functions like C++
<Applejack_> Having experience with Julia, I thought I could just define different argument types for a function and when using it it would dispatch to the correct one according to the used argument. If the case functions received the love they deserve, would that work as in Julia ?
<Applejack_> SeanTAllen: Yes, I kind of understood that generics would not help if the implementation was different.
<Applejack_> doublec: sorry, that was addressed to you, not SeanTAllen
<Praetonus> I think static dispatch for case functions when matching on types only could be a good optimisation
<doublec> Pity you can't have nested types and do: primitive Foo[A]\n type A as t
<doublec> Then in other code: fun tt[A](x: Foo[A].t) etc
<doublec> Applejack_: I believe that's the intent of case functions (what you described)
<darach> AppleJack_ Dependent types will make what you would like to achieve a lot easier ( & closer to what you experience with Julia )
Achraf has quit [Ping timeout: 250 seconds]
<Applejack_> The future looks bright. Does the work needed on case functions require low level knowledge?
Achraf has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 240 seconds]
<Applejack_> Praetonus: that VUG video is quite a height to dive into generics... But will see what I can groke.
Achraf has quit [Quit: Page closed]
fluttershy_ has joined #ponylang
fluttershy_ has quit [Ping timeout: 250 seconds]
fluttershy_ has joined #ponylang
<SeanTAllen> Applejack_: no, high level. requires exhaustive match.
unbalancedparen has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 252 seconds]
SilverKey has joined #ponylang
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
<Applejack_> SeanTAllen: I meant, could someone not versed in compilers help improve case functions ? If so, could u point me to the relevant source code ?
aturley has joined #ponylang
SilverKey has quit [Quit: Halted.]
aturley has quit [Ping timeout: 244 seconds]
SilverKey has joined #ponylang
srenatus has quit [Ping timeout: 264 seconds]
srenatus has joined #ponylang
<srm`> Payload.request return me a Payload iso^, but Payload.update is "fun ref update", how can it be possible ?
SilverKey has quit [Quit: Halted.]
Praetonus has quit [Quit: Leaving]
<SeanTAllen> Applejack_: it requires exhaustive match checking to be implemented in Pony which is a very non trivial task of first figuring out how to do it. see: https://github.com/ponylang/ponyc/issues/60
<Applejack_> Ah. Not in my league then.
SilverKey has joined #ponylang
<srm`> i think i need to transform my val to a ref but i dunno how to do that
hibnico has quit [Quit: hibnico]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
Applejack_ has quit [Ping timeout: 250 seconds]
amclain has joined #ponylang
trapped_ has joined #ponylang
trapped has quit [Read error: Connection reset by peer]
trapped_ is now known as trapped
<SeanTAllen> can you gist your code srm` ?
aturley has joined #ponylang
aturley has quit [Ping timeout: 260 seconds]
rurban has joined #ponylang
SilverKey has quit [Quit: Halted.]
rurban has left #ponylang [#ponylang]
<srm`> sorry was afk
<SeanTAllen> payload request is an iso so you can mutate it
<SeanTAllen> but when handing off to client you have to give up your reference to it
<SeanTAllen> thus the consume request on line 60
<SeanTAllen> lines 58 and 60 are the only things i changed
<srm`> /home/srm/sync/pony/src/kat/main.pony:59:21: receiver type is not a subtype of target type
<srm`> request.update("Accept-Encoding", "txt")
<srm`> ^
<srm`> Info:
<srm`> /home/srm/sync/pony/src/kat/main.pony:59:7: receiver type: Payload val
<srm`> request.update("Accept-Encoding", "txt")
<srm`> doesn't work for me
<srm`> oh sorry
<srm`> ok sorry :(
<srm`> thank a lot
<SeanTAllen> should work. does't iw rok for you?
<SeanTAllen> try 2.
<SeanTAllen> it should work, does it work for you?
<srm`> yes it work
<srm`> the problem was Payload: val instead of Payload: iso
aturley has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
<srm`> is there any gunzip system on pony ?
fluttershy_ has quit [Ping timeout: 250 seconds]
SilverKey has joined #ponylang
srenatus has quit [Quit: Connection closed for inactivity]
Applejack_ has joined #ponylang
<malthe> the flags class should have a docstring that explains how it can be used
<malthe> I couldn't really figure it out
<malthe> think what you will about testing, but at least it gives an example of how to use a piece of code
aturley has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
Onemorenickname has joined #ponylang
<SeanTAllen> srm`: not that i am aware of
<SeanTAllen> malthe: can you PR that?
<SeanTAllen> i've been going through and documenting the standard library when i have time outside of other commitments. help is greatly appreciated.
<Onemorenickname> hello people
<SeanTAllen> hello
<Onemorenickname> i dont know if it's the good place, but, when i'm trying to install ponyc (on debian wheezy), i get the error "llvm-c/TargetMachine.h : no such file"
<Onemorenickname> Do you know what is the problem and/or how I can solve it ? ( If this chan is not dedicated to help, sorry )
<SeanTAllen> which version of llvm do you have installed?
unbalancedparen has quit [Quit: WeeChat 1.5]
<Onemorenickname> SeanTAllen, how can I know ?
<Onemorenickname> (i'm new to linux too)
<malthe> SeanTAllen: I would if I understood even how to use it at all
<SeanTAllen> there should be a version off llvm-config-* in your path
<SeanTAllen> the * should have a version number, if there is just llvm-config then its probably 3.6
<SeanTAllen> malthe: i know the feeling, i had to learn how a number of things worked before documenting them. it sounded from your comment like you had figured it out.
<malthe> not yet, I gave up for a while and decided to use a different approach
<Onemorenickname> SeanTAllen, I've run "apt-get install llvm", and when I "echo $PATH", I do not have any path to llvm
<Applejack_> A question on the future distributed Pony: if I "use" a C library which I compiled for different architectures, then it should be different on different machines if the distributed system is heterogeneous. So I guess different nodes would run a locally different compiled Pony program. So is the idea to make possible the compilation of a single program that would have stuff like 'use "libfooosx" if osx' and 'use "libfoowin" if win
<SeanTAllen> Onemorenickname: llvm-config-* not llvm
<Onemorenickname> llvm-config-3.0, you're right, sorry ^^'
<SeanTAllen> the minimum version supported is 3.6 Onemorenickname
<Onemorenickname> oh
<Onemorenickname> i see
<SeanTAllen> you'll need to install llvm 3.6. wipe out everything in your build directory for pony and try again.
<SeanTAllen> i'd suggest trying to follow along with the debian jesse directions as much as possible
<SeanTAllen> Applejack_: i'm not sure i follow what you mean by "single program". do you mean single binary?
<Onemorenickname> ok
<Onemorenickname> thank you :)
<SeanTAllen> you're welcome
<Applejack_> I mean a single source code that would be copied to all the nodes and get compiled taking into account the conditional "use"
<SeanTAllen> wheezy is rather old Onemorenickname, a newer version might go easier.
<SeanTAllen> Applejack_: initially you would need to compile for the target platform that you are running on.
<SeanTAllen> Applejack_: hot code loading is something on the distant horizon that is applicable to distributed pony and that changes things but for first version, not a lot of magic.
<Applejack_> Ok, so a single source code gets copied to node A and node B, and over there gets locally compiled then messages are sent and off we go?
<Onemorenickname> SeanTAllen, you're right, I think I will do that
unbalancedparen has joined #ponylang
<SeanTAllen> Applejack_: no.
<SeanTAllen> Applejack_: you would be deploying a binary and telling it what nodes to connect to.
<SeanTAllen> homogenous in the beginning.
<Applejack_> Ah I see
<Applejack_> Not same machine but same characteristics allowing same binary to run
<SeanTAllen> given that there is no vm to abstract these things away, there are some challenging bits
<Applejack_> Contrary to Erlang for example, I see
<SeanTAllen> "full" distributed pony will take quite a while.
<SeanTAllen> hopefully usable version with restrictions by end of summer
<Applejack_> But is the full version's goal to indeed allow different binaries to converse?
<SeanTAllen> we are currently putting the very very early version of serialization/deserialization through its paces here at sendence.
<SeanTAllen> Applejack_: I've had some hand wave conversation with Sylvan. Hot code loading is required for a lot of advanced features. And hot code loading requires the compiler to exist in the binary and even if that was easy, it raises a host of issues. Best I can say is, its a goal we would like to achieve.
<Applejack_> Ok, I can imagine, so the one that will be available by end of summer should be a homogeneous distributed Pony ?
Matthias247 has joined #ponylang
jemc has joined #ponylang
flattershy has joined #ponylang
<SeanTAllen> Applejack_: yes
<flattershy> hi,about the pony sandbox, the website seems to be unfinished, only the syntax highlighting is working, it would be great to to have that tiny url feature like in rust playground (https://play.rust-lang.org/). it would make it easy to share code between teams.
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
flattershy has quit [Quit: Page closed]
Applejack_ has quit [Ping timeout: 250 seconds]
Onemorenickname has quit [Quit: Leaving]
<SeanTAllen> pony sandbox has been deprecated. we removed it from the website. its out of date and we dont have access to the code. :(
Applejack_ has joined #ponylang
<SeanTAllen> we are hoping someone will create a "new sandbox" using something like iPython
flattershy has joined #ponylang
aturley has joined #ponylang
hibnico has joined #ponylang
aturley has quit [Ping timeout: 260 seconds]
flattershy has quit [Quit: Page closed]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
jemc has quit [Quit: WeeChat 1.4]
hibnico has quit [Quit: hibnico]
jemc has joined #ponylang
hibnico has joined #ponylang
hibnico has quit [Client Quit]
hibnico has joined #ponylang
Applejack_ has quit [Quit: Page closed]
yann has joined #ponylang
yann has quit [Client Quit]
Applejack_ has joined #ponylang
Applejack_ has quit [Client Quit]
Applejack_ has joined #ponylang
hibnico has quit [Quit: hibnico]
jemc has quit [Quit: WeeChat 1.4]
SilverKey has quit [Quit: Halted.]
Applejack_ has quit [Quit: leaving]
aturley has joined #ponylang
Applejack_ has joined #ponylang
jemc has joined #ponylang
Applejack_ has quit [Client Quit]
Applejack_ has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
Applejack_ has quit [Client Quit]
hibnico has joined #ponylang
trapped has quit [Read error: Connection reset by peer]
<SeanTAllen> The pony stickers are pretty great https://usercontent.irccloud-cdn.com/file/pRrC6Ocx/IMG_4756.JPG
<doublec> They look gret
<doublec> great
* doublec is waiting for some to arrive
Matthias247 has quit [Read error: Connection reset by peer]
hibnico has quit [Quit: hibnico]
aturley has joined #ponylang
aturley has quit [Ping timeout: 246 seconds]