<SeanTAllen>
my plan is to make a different image for each LLVM type and put on docker hub then run each of the linux PR builds in circleci
<SeanTAllen>
macos will stay on travis
<SeanTAllen>
release builds will stay on travis
<SeanTAllen>
we could also move docker builds back to travisci at some point in the future, but for now, this seems reasonable to me
SenasOzys has joined #ponylang
jemc has quit [Ping timeout: 252 seconds]
jemc has joined #ponylang
endformationage has quit [Quit: WeeChat 1.9.1]
<SeanTAllen>
i've been using xenial as the base instead of trusty. that would mean: llvm 3.7.1 is hard to get setup (I think we should drop support for it)
<SeanTAllen>
it also oddly means that I cant get 4.0.1 working but I can get 4.0.0 working. oddly I can't get 4.0.1 working with a trusty base either, yet the same llvm works on travis. why? i don't know. so, we could test 4.0.0 instead of 4.0.1 or i could leave 4.0.1 on travis for now (and possibly 3.7.1 as well).
<SeanTAllen>
jemc praetonus thoughts? ^^
<SeanTAllen>
another option, i could try having 4.0.1 build from source first in the docker container. rather than using a prebuilt or i could try installing via apt-get.
jemc has quit [Ping timeout: 248 seconds]
<SeanTAllen>
and the apt-get packages from them install llvm-4.0.0 not 4.0.1
<krig>
SeanTAllen: Cool, thanks :) I'm here now (in sweden so slightly different time zone...) yeah, I'm sure I got it wrong, would love an explanation!
khan has joined #ponylang
samuell has joined #ponylang
<Bombe>
How do I specify a constructor that does nothing?
SenasOzys has quit [Ping timeout: 256 seconds]
SenasOzys has joined #ponylang
<doublec>
Bombe: new foo () => None
<doublec>
Bombe: although the default does nothing so you don't really need one
<Bombe>
doublec, okay, and if I omit the constructor I create a new object of a class with “Foo”?
<doublec>
Bombe: yes, there's a default constructor called 'create
<doublec>
'create', so you can doo. Foo.create(), or just Foo
<doublec>
The latter being equivalent
<Bombe>
Okay, but Foo() would try to call Foo.apply()?
<Bombe>
(At least that’s what the compiler error suggests.)
<doublec>
Bombe: I believe it would create an object and call apply() on it
<Bombe>
Okay, thanks. Back to battling the capabilities thing. :)
<doublec>
have fun :)
dipin has quit [Quit: dipin]
codec1 has joined #ponylang
<SeanTAllen>
Bombe: need any help?
<Bombe>
Oh, absolutely. :)
<Bombe>
I have a class with a List[String] in it and I want to add a String to that list.
<Bombe>
But, alas, receiver type is not a subtype of target type.
<Bombe>
let _parts: List[String] = List[String]
<Bombe>
And in a method: fun addPart(content: String) => _parts.push(content)
<SeanTAllen>
ah right ok
<SeanTAllen>
can you put your small example in https://playground.ponylang.org/ and put the link here so we have a specific error to discuss and i can show you the solution and try to explain it?
<krig>
Bombe: "fun ref addPart(...)" works for me, though the fun type declarators is something I'm also not clear on
<SeanTAllen>
krig: so when you need to add `fun REF mymethod()` that's very common
<SeanTAllen>
fun addPart(content: String) => _parts.push(content)
<SeanTAllen>
you will see an error in the error message pointing to `_parts`
<SeanTAllen>
and then: `target type: List[String val] ref
<SeanTAllen>
so the target is ref
<SeanTAllen>
which is because
<SeanTAllen>
of the next part of the error message
<SeanTAllen>
`fun ref push(a: A) =>`
<SeanTAllen>
so `push` that you call on `_parts` needs a ref
<SeanTAllen>
AND
<SeanTAllen>
last part of error mesage says...
<SeanTAllen>
`List[String val] box is not a subtype of List[String val] ref: box is not a subcap of ref`
<SeanTAllen>
and its a "box" rather than a "ref" because...
<SeanTAllen>
`fun addPart(content: String)`
<SeanTAllen>
there's 3 real options there
<SeanTAllen>
the one you have means:
<SeanTAllen>
`fun box addPart(content: String)`
<SeanTAllen>
box methods can operate on mutable or immutable data BUT... you can not mutate said data
<SeanTAllen>
`fun val addPart(content: String)`
<SeanTAllen>
val methods can't mutate anything . for the purposes of our conversation right now, it might as well be the same as box
<SeanTAllen>
there's a distinction but its not important now
<SeanTAllen>
`fun ref addPart(content: String)`
<SeanTAllen>
ref methods can mutate data
<Bombe>
Ah, okay, so a) box is the default for methods, and b) the ref cap of the method specifies the ref cap of “this”?
<SeanTAllen>
now, in this case, "data" here means "fields on the object in question"
<SeanTAllen>
yes
<SeanTAllen>
exactly
<Bombe>
Okay, thank you very much. I’ll see how much further I can get with this. :)
<SeanTAllen>
Awesome
<SeanTAllen>
minimal examples in playground can definitely help when explaining here in IRC or on the mailing list. If you can create them when you run into trouble, it almost always makes it easier for folks to help.
<Bombe>
I will remember that.
inoas has joined #ponylang
inoas has quit [Ping timeout: 252 seconds]
inoas has joined #ponylang
inoas has quit [Quit: inoas]
<SeanTAllen>
krig: you around.
<SeanTAllen>
I wanted to talk for a minute about the "passing receiver to notify"
aturley has joined #ponylang
aturley has quit [Quit: aturley]
bougyman has quit [Ping timeout: 248 seconds]
bougyman has joined #ponylang
dipin has joined #ponylang
gokr has joined #ponylang
dipin has quit [Quit: dipin]
<krig>
SeanTAllen: Hi Sean, sorry - only in for a bit.