<shodan45>
and installing llvm >= 3.6 caused my package manager to barf :(
* shodan45
goes to play factorio while waiting for a response :P
aturley has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
rurban1 has joined #ponylang
rurban has quit [Ping timeout: 244 seconds]
Applejack_ has joined #ponylang
rurban has joined #ponylang
rurban1 has quit [Ping timeout: 244 seconds]
<Candle>
shodan45: I've had success with a full VM and not just a container.
<Candle>
shodan45: I've also had success on a mac. I've not had success on my arm6l raspberry pi.
<Candle>
shodan45: I havnt actually tried a docker container though, mostly because I had a VM setup already.
<Candle>
havn't*
Applejac1_ has joined #ponylang
Applejack_ has quit [Ping timeout: 264 seconds]
Applejac1_ has quit [Quit: leaving]
<shodan45>
Candle: yeah that was going to be the next thing I tried
Applejack_ has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 240 seconds]
rurban1 has joined #ponylang
rurban has quit [Ping timeout: 260 seconds]
rurban has joined #ponylang
rurban1 has quit [Ping timeout: 276 seconds]
rurban1 has joined #ponylang
rurban has quit [Ping timeout: 260 seconds]
devbug has quit [Ping timeout: 252 seconds]
rurban has joined #ponylang
shodan45 has quit [Quit: Konversation terminated!]
rurban1 has quit [Ping timeout: 260 seconds]
jemc has quit [Ping timeout: 250 seconds]
rurban has quit [Ping timeout: 244 seconds]
rurban has joined #ponylang
rurban has quit [Ping timeout: 244 seconds]
rurban has joined #ponylang
rurban has quit [Ping timeout: 264 seconds]
rurban has joined #ponylang
Kratos has joined #ponylang
Kratos has quit [Client Quit]
aturley has joined #ponylang
aturley has quit [Ping timeout: 246 seconds]
rurban has left #ponylang [#ponylang]
rurban1 has joined #ponylang
rurban1 has left #ponylang [#ponylang]
c355e3b has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 244 seconds]
Praetonus has joined #ponylang
Applejack_ has quit [Ping timeout: 244 seconds]
Perelandric has joined #ponylang
rurban has joined #ponylang
Perelandric has quit [Ping timeout: 250 seconds]
Perelandric has joined #ponylang
Applejack_ has joined #ponylang
rurban has left #ponylang [#ponylang]
aturley has joined #ponylang
aturley has quit [Ping timeout: 264 seconds]
aturley has joined #ponylang
SilverKey has joined #ponylang
SilverKey has quit [Client Quit]
rurban has joined #ponylang
rurban has left #ponylang [#ponylang]
SilverKey has joined #ponylang
rurban1 has joined #ponylang
rurban1 has quit [Quit: Leaving.]
TwoNotes has joined #ponylang
amclain has joined #ponylang
aturley has quit [Ping timeout: 260 seconds]
Matthias247 has joined #ponylang
dos000 has left #ponylang [#ponylang]
dos000 has joined #ponylang
<dos000>
jemc: thanks a lot )
Applejack_ has quit [Ping timeout: 250 seconds]
dos000 has quit [Quit: Page closed]
runehog has quit [Remote host closed the connection]
Matthias247 has quit [Read error: Connection reset by peer]
devbug has joined #ponylang
devbug has quit [Remote host closed the connection]
jemc has joined #ponylang
rurban has joined #ponylang
jemc has quit [Ping timeout: 246 seconds]
jemc has joined #ponylang
rurban has quit [Quit: Leaving.]
MC_Hamming has joined #ponylang
SilverKey has quit [Quit: Halted.]
<jemc>
shodan45: I just checked the latest `ponylang/ponyc` docker container - it works on my machine
<jemc>
it sounds like maybe there is a portability problem? maybe something with your machine's arch or kernel or something?
<jemc>
shodan45: out of curiosity were you running with your real machine as the docker host, or were you running inside a `docker-machine`?
<jemc>
If you were not running inside a `docker-machine`, that would probably be worth a try since it should give a more consistent environment with less portabilitiy sensitivity
<jemc>
however, I'm able to run on my bare machine with no `docker-machine` in the middle, so not sure what might be going on
SilverKey has joined #ponylang
<jemc>
SeanTAllen: looking at our list of open RFCs, I wonder if some of them should be put into the Final Comment Period - it's still not clear to me exactly when this should happen or who should make the decision to move an RFC into that state (a committer? the RFC author?)
fluttershy1 has joined #ponylang
runehog has joined #ponylang
Applejack_ has joined #ponylang
nyarum has joined #ponylang
nyarumes has quit [Ping timeout: 260 seconds]
shodan45 has joined #ponylang
jemc has quit [Ping timeout: 244 seconds]
fluttershy1 has quit [Quit: Leaving.]
<shodan45>
hello ponies
graaff has quit [Quit: Leaving]
felixgallo has joined #ponylang
aturley has joined #ponylang
SilverKey has quit [Quit: Halted.]
<shodan45>
is the pony docker container known to work?
SilverKey has joined #ponylang
Praetonus has quit [Quit: Leaving]
Applejack_ has quit [Ping timeout: 260 seconds]
<felixgallo>
the definition of U64.from() is: fun tag from[A: (Number & Real[A] val)](a: A): U64 => a.u64()
<felixgallo>
but I can't figure out how to invoke it properly, apparently.
jemc has joined #ponylang
<felixgallo>
I would have expected let a : U32: 5 ; let z = U64.from(a) to work, but I get 'not enough type arguments'. What am I overlooking?
rurban has joined #ponylang
rurban has quit [Client Quit]
Matthias247 has joined #ponylang
fluttershy1 has joined #ponylang
<jemc>
felixgallo: first of all, in your first statement, the second colon should be an equal sign
Fluttershy2 has joined #ponylang
fluttershy1 has quit [Read error: Connection reset by peer]
<jemc>
in your second statement, note that the U64.from method requires a type argument to specify the type you are converting from
<jemc>
from example, `let z = U64.from[U32](a)`
<jemc>
a more succinct option sould be `let z = a.u64()`
Fluttershy2 has quit [Client Quit]
<jemc>
in fact, that's how `U64.from[U32]` is implemented under the hood - it calls `.u64()` on the given `U32` reference
<felixgallo>
so I thought I'd supply a type argument; and I tried let z : U64 = U64[U32].from(a)
<felixgallo>
and ponyc complained: "couldn't find 'apply' in 'U64'"
<felixgallo>
but I guess I put it in the wrong place.
rurban has joined #ponylang
srenatus has quit [Quit: Connection closed for inactivity]
<felixgallo>
thanks for the help @jemc
rurban has quit [Client Quit]
<jemc>
no problem :)
<jemc>
yep, type parameters on a type go after the type name, while type parameters on a method go after the method name (before the parens)
<felixgallo>
yep. Was thrown by 'type parameters' and then went to the type.
<shodan45>
how is pony implemented? in pony itself? does it compile to an intermediate language like C?
<jemc>
shodan45: it is compiled to LLVM IR, which is a low level representation used by modern language toolchains (for example, Rust, Swift, etc)
<jemc>
also, the `clang` compiler compiles C code to LLVM IR
<jemc>
the LLVM IR is then compiled to native machine code on the particular platform
<shodan45>
nim, the other "alternative language" I'm familiar with, compiles to C
<jemc>
one of the nice things about compiling to LLVM IR is that there are some lower-level constructs that cannot be represented in C, so the pony compiler can make its intentions more clear
<felixgallo>
I want fun derp(x: U64, y: U64) : U64 => {...whatever...}, and then let z = DerpClass~derp(), and then z.arity() and z.args[0
<felixgallo>
].type
<felixgallo>
anyone have an idea how close I can get with that?
<jemc>
felixgallo: Pony doesn't really have much in the way of runtime introspection right now - this is partly due to simply not having implemented it yet, and partly due to some complications arising from having to uphold capabilities security and the fact that many pony constructs "fall away" at compile time, which is good for performance but not always good for introspection
fluttershy1 has joined #ponylang
<felixgallo>
makes sense. I can make producers supply their own arity, but it'd be nice to be able to get at the AST before erasure
fluttershy1 has quit [Read error: Connection reset by peer]
russelldb has left #ponylang [#ponylang]
Applejack_ has joined #ponylang
<jemc>
I'm working on some AST-related tooling that may eventually help in this regard, but it's not fully fleshed out yet
<felixgallo>
nice. I'm thinking about (a) erlang-style binaries/pattern matching, and (b) quickcheck
rurban has joined #ponylang
Praetonus has joined #ponylang
rurban has left #ponylang [#ponylang]
<felixgallo>
hmm. How do you write a type signature for the object literal created by a Class~Fun() call?
SilverKey has quit [Quit: Halted.]
<felixgallo>
let f = Fizz~buzz(); myfun(f : ??)
<Applejack_>
jemc: if "let u:USize = 3" then should "let r = F64.from[USize](u)" be the same as "let r = u.F64()" ? Because it's not in practice.
<felixgallo>
by the way the answer to my earlier question, "what is the type of the object literal created by Fizz~buzz()", is, if buzz is fun buzz(x: U32, y:U32) : U64, then {ref(U32,U32} : U64}, apparently
<felixgallo>
not finding a great reference in the docs to the bracket notation but it satisfies the compiler
<felixgallo>
it would be nice if I could say, instead of fun ref run(f: {ref(U32,U32} : U64}) : U64 => f(1,2), say: fun ref run(f: Function) : U64 => f(1,2) and have that work, but haven't figured out if that's a possibility yet
<jemc>
felixgallo: the {ref(U32,U32): U64} syntax for "lambdatypes" is fairly new, and I think not yet adequately covered in the tutorial
<jemc>
but to answer you other question about giving it a type name, there are two ways to do it
<jemc>
one is with a type alias `type MyFn is {ref(U32, U32): U64}`
<jemc>
in your case it would look like `interface MyFn fun ref apply(a: u32, b: U32): U64`
<jemc>
since a lambda object is really just an object that implements an `apply` method
<felixgallo>
aha, that interface thing looks interesting. I'd really like to be able to call arbitrary functions in this run() method though; like, sometimes pass it an arity-3 function of all U32 args, and sometimes an arity-9 of mixed complex type args, etc., etc.
<felixgallo>
maybe what I'm looking for is a nonexistent macro functionality.
shodan45 has quit [Quit: Konversation terminated!]
<felixgallo>
thanks again @jemc. :)
mcguire has joined #ponylang
<jemc>
depends on what you're doing, but type parameters may be able to help you with parameterizing on mixed types
<jemc>
for mixed arity, you could do a union of interfaces
<jemc>
for example `type MyFn is (MyFn1 | MyFn2 | MyFn3 | MyFn4)`
<jemc>
then, when you finally want to call the function, do a `match` block so you can have a branch for to each of the possible interfaces, and send the right number of arguments
<jemc>
however, it's not clear where those arguments would come from if the types and arity are so up in the air for the caller, so I'd have to know more about what you're trying to do to give a better recommendation
<felixgallo>
in quickcheck implementations for functional languages, there's often a function check(F, GeneratorList) where F is a function to test, and GeneratorList.length == F.arity and GeneratorList[N].generate().type == F.arg[N].type
<felixgallo>
so for example function add(x, y) might be checked with check(add, [int(), int()])
<felixgallo>
where int() generates a random integer, and so add() is tested a million times with different ints to find edge cases
<felixgallo>
in that world, it's nice to have check(F, GeneratorList) accept generic F
<jemc>
felixgallo: I imagine you can whip up something to that effect in Pony with some clever use of type parameters
<jemc>
I'll try to take a look at playing with that concept this weekend
<felixgallo>
I imagine/hope so too but it's eluding me so far :)
<felixgallo>
some languages do, e.g. type X = ( fun(A1)->R1 | fun(A1,A2)->R1 | fun(A1,A2,A3)->R1 ...) as a way to do a poor man's varargs
<jemc>
the arity is probably the hardest part - it might be easier once we have values-as-type parameters (dependent types)
<jemc>
this is a feature that Luke Cheeseman at Imperial College has been working on for some time, and is hoping to merge in soon
<jemc>
it'll open up a ton of new possibilities
<felixgallo>
unfortunately I can't seem to say type X is ({ ref(U32) : U32 } | { ref(U32,U32} : U32 }) because the checker doesn't like that the methods have different arity
<felixgallo>
dependent types will be pretty great when they land
SilverKey has joined #ponylang
<SeanTAllen>
Jemc: discuss at next sync?
<jemc>
SeanTAllen: sounds good
Praetonus has quit [Quit: Leaving]
runehog has quit [Remote host closed the connection]
runehog has joined #ponylang
rurban1 has joined #ponylang
runehog has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
Applejack_ has quit [Ping timeout: 264 seconds]
rurban has joined #ponylang
rurban1 has quit [Ping timeout: 250 seconds]
rurban has quit [Quit: Leaving.]
TwoNotes has quit [Quit: Leaving.]
SilverKey has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
trapped has quit [Read error: Connection reset by peer]