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
trapped has quit [Read error: Connection reset by peer]
jemc has quit [Ping timeout: 248 seconds]
<shepheb> ooh, fancy
<shepheb> I was about to ask if jemc had made any progress on parsers, because I ended up going around in circles and not making a lot of progress.
<shepheb> I learned a lot about generics in Pony, got stuck badly enough that I scrapped them and used Any everywhere, hated the ergonomics of using the resulting parser, and gave up.
TwoNotes has joined #ponylang
<TwoNotes> Is there a way to have my own packages, for shared code?
<doublec> TwoNotes: pony-stable might do what you want https://github.com/jemc/pony-stable
<TwoNotes> PONYPATH seems to be the feature I am looking for
TwoNotes has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
jemc has joined #ponylang
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
copy` has quit [Quit: Connection closed for inactivity]
emancu has quit []
amclain has quit [Quit: Leaving]
srenatus has joined #ponylang
trapped has joined #ponylang
Scramblejams has quit [Ping timeout: 252 seconds]
trapped has quit [Read error: Connection reset by peer]
jemc has quit [Ping timeout: 248 seconds]
Scramblejams has joined #ponylang
<sylvanc> is this interesting? https://github.com/whyrusleeping/gx
<shepheb> certainly interesting. not sure about practical. I wouldn't want to be the first user who used it for a context other than Go, but if others have done it and it really works across targets, it sounds like a very useful jump start.
_andre has joined #ponylang
[CBR]Unspoken has joined #ponylang
_andre has quit [Read error: Connection reset by peer]
_andre has joined #ponylang
lispmeister has joined #ponylang
copy` has joined #ponylang
<darach> looks good. and doesn't have unpublish from what I can see ;)
<_andre> if i define `type T is (String|None)` then try `let a: Array[T] = ["foo"]` pony says "right side must be a subtype of left side"
<_andre> is this expected? it seems that the right side is indeed a subtype of left site
<_andre> `a.push("foo")` works
<shepheb> _andre: yes, it is.
<shepheb> that confused me a while back, too.
<shepheb> the literal ["foo"] has type Array[String] iso^ I think
<shepheb> and Array[String] is not a subtype of Array[(String | None)], which also slightly surprised me but makes sense
<_andre> why not?
<shepheb> I think maybe if we knew it was an iso it would be safe (though the type system still couldn't handle that)
<shepheb> but you don't want two aliases to the same array thinking they're different types.
<_andre> the error message says "right side type: Array[String val] ref"
<shepheb> it would be cool if the inference engine could handle that, though.
<_andre> doesn't mention iso
<shepheb> then the iso part was wrong
<shepheb> it's the [String] part that's the trouble, anyway
<shepheb> it matters more for primitive types: an Array[U32] is unboxed, Array[(U32|None)] is boxed.
<shepheb> so they're definitely not subtypes.
<_andre> ah
lispmeister has quit [Read error: Connection reset by peer]
lispmeister has joined #ponylang
<shepheb> I think the type inference engine could probably handle that, in principle.
<_andre> i have this big union type of things you can pass as parameters to MySQL queries, and a function that takes an array of parameters
<_andre> kinda sucks to have to write "let x: I32 = 1; let x': QueryParam = x" and then pass x' to that function
<shepheb> what about let x: QueryParam = I32(1)
<shepheb> that removes one of the layers.
<_andre> hadn't thought of that :)
<_andre> much better
<shepheb> (NB that's not really "cast" syntax; it's actually calling I32.apply I think.)
<doublec> sylvanc: yes, I've been looking at it too - I like the idea of an ipfs backed package system
<doublec> shepheb: it can't be a subtype because if Array[String|None] aliased an Array[String] then you'd be able to push a None onto the Array[String]
<doublec> shepheb: unless I'm misunderstanding the question
<sylvanc> yeah, what doublec said re generic subtyping
<sylvanc> in pony, generic subtyping is invariant
<sylvanc> for exactly that reason
<sylvanc> you can use an interface to provide "just the read part" or "just the write part"
<sylvanc> and maintain type safety
TwoNotes has joined #ponylang
<_andre> i have zero understanding of how this works, but in the case of an array literal, couldn't inference be based on type of the variable assigned to it?
<_andre> ie, ["foo"]'s type would be inferred as Array[T] if the assignment is `let a: Array[T] = ["foo"]`
<sylvanc> ah, i see
<sylvanc> yes
<sylvanc> currently, type inference in pony is local and entirely "bottom up", except for literals
<shepheb> except for (numeric) literals
<sylvanc> expanding it to be still local, but unification based for everything, would be very good
<sylvanc> shepheb: yes, sorry, numeric literals :)
trapped has joined #ponylang
<shepheb> that would solve the quirk in the current style where let x = try noErrorsHere(7) else 0 end can't be inferred.
<shepheb> then you get a "can't be inferred" error below for x, add a type, /then/ get "noErrorsHere is not partial", and /then/ the type is unnecessary.
<shepheb> I'm particularly bitter about this because ponyc takes ages to run on my RasPi :P
<_andre> is it preferred to give generic names to classes (eg. Error) and assume people will do `use mypkg = "mypkg"` and refer to the class as `mypkg.Error` or should i just name it MyPkgError?
lispmeister has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<doublec> _andre: I prefer the generic names approach
<doublec> _andre: unless its something that will clash a lot in which case I'd rename it
<_andre> cool
<_andre> me too :)
<sylvanc> generic names!
<sylvanc> for sure
<sylvanc> as long as they are understandable
Praetonus has joined #ponylang
lispmeister has joined #ponylang
emancu has joined #ponylang
trapped has quit [Read error: Connection reset by peer]
<TwoNotes> shepheb, which model Rpi?
<shepheb> TwoNotes: my main personal development machine (ha!) is a RasPi 2
<shepheb> (B)
<shepheb> the quad core, 1GB RAM one.
<shepheb> it's astoundingly powerful for US$35 but it's not exactly up to compiling Chrome.
<shepheb> and ponyc runs, it just takes multiple seconds to error out on small projects.
<shepheb> I move around way too much between Chromebooks and work and various machines at home to not have somewhere to keep my tmux sessions.
<TwoNotes> Compilers tend to be CPU intensive.
<shepheb> yep
<TwoNotes> Surprisingly, it can often be the case that the lexical scanning of all the included source files can be a major part of that.
<shepheb> does it make sense to simultaneously wish it were faster, and also to think optimizing to be fast enough for the convenience of tiny ARM machines is way, way down the list of priorities.
<TwoNotes> I don't know if that is the case with ponyc, but I have direct experience with this problem in older languages. (I used to be a compiler innards person)
<shepheb> speaking of vaguely double-think feelings about things
<shepheb> I write web stuff on the job, and have for years. I'm an expert on CSS, especially for mobile, and achieving good animations for Material Design and whatnot
<shepheb> but if I could scrap the whole DOM and CSS scheme for something sane (some kind of recursive layout a la Android or iOS) I would do it in a second, even though it would gut my own expertise.
Candle has joined #ponylang
jemc has joined #ponylang
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
<jemc> sylvanc: it's funny you mention gx - I had starred it in GitHub a few days ago and was intending to look into that deeper a little later
amclain has joined #ponylang
TwoNotes has quit [Quit: Leaving.]
trapped has joined #ponylang
M-hrjet has joined #ponylang
<shepheb> people seem to be of one mind on it, then.
<shepheb> the part I didn't see was how you tell that these two versions of a package were actually by the same author.
<shepheb> but I didn't look very deeply. maybe they're signed or something. that was my first encounter with a real use of IPFS, and I can't say I grok it.
<jemc> has anyone done research on the advent of quantum computing as it relates to IPFS?
<jemc> specifically, I wonder whether quantum computing will make it possible to reproducibly spoof IPFS hashes (obviously undermining the entire scheme if true)
<darach> Doesn't quantum computing undermine everything? So, not a bug, but a feature!?
<jemc> heh, well with IPFS being talked about as the future of content resolution on the internet, it seems like we would want it to be resilient and secure with respect to upcoming computing technology as well
<darach> Only fair. We need QUIPFS. Quantum IPFS. Also, quite funny and punny 'quip'fs vs 'qu'ipfs... Could be excessive yak shaving taking its toll!
[CBR]Unspoken has quit [Remote host closed the connection]
<jemc> asked in #ipfs and they say that the current hashes are not secure against near-future quantum, but they have a mechanism to upgrade to a different hash function later
<jemc> "multihash"
<darach> Interesting!
lispmeister has quit [Read error: Connection reset by peer]
lispmeister has joined #ponylang
lispmeister has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pulpfiction has quit [Quit: Leaving]
jemc has quit [Ping timeout: 240 seconds]
<shepheb> definitely interesting. I've always had the impression that the impact of quantum on the crypto arms race is that only quantum crypto can beat quantum attack
jemc has joined #ponylang
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
_andre has quit [Quit: leaving]
TwoNotes has joined #ponylang
srenatus has quit [Quit: Connection closed for inactivity]
vpm has quit [Ping timeout: 240 seconds]
vpm has joined #ponylang
jtfmumm has quit [Read error: Connection reset by peer]
jtfmumm has joined #ponylang
darach has quit [Read error: Connection reset by peer]
darach has joined #ponylang
Arch-KT has joined #ponylang
jemc has quit [Ping timeout: 250 seconds]
strmpnk has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
Arch-TK has quit [Ping timeout: 240 seconds]
strmpnk has joined #ponylang
TwoNotes has quit [Quit: Leaving.]
strmpnk has quit [Ping timeout: 248 seconds]
strmpnk has joined #ponylang
trapped has quit [Read error: Connection reset by peer]
<Praetonus> Linking ponyc in release mode on latest commit fails for me. No problem with debug build. Anybody with the same problem?
<SeanTAllen> Works for me on OSX. What's your setup look like Praetonus? What's the error you get?
<Praetonus> I'm on Archlinux with Clang and LLVM 3.7.1. I get a bunch of undefined references to functions like "stringtab_init", "pass_opt_init", "ast_setwidth" and about 20 others. Something may be messed up in my build environment, I'll try on a clean VM and open an issue if it still doesn't work
<SeanTAllen> New version will default to trying LLVM 3.8 but should fall back to 3.7.1
<SeanTAllen> Let me know if a clean environment works for you