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 | Please consider participating in our mailing lists => https://pony.groups.io/g/pony
jemc has joined #ponylang
<SeanTAllen> jemc: it looks like you had the docker/llvm idea at some point, yes? https://hub.docker.com/r/ponylang/llvm/
<SeanTAllen> also jemc: does this mean that 0.21.0 didn't get a docker image built? https://hub.docker.com/r/ponylang/ponyc/tags/
<SeanTAllen> which would explain why the playground is still running 0.20.0... ?
<SeanTAllen> and latest is from 7 days ago... seems like the docker image builds is broken?
<SeanTAllen> ah so... " [91mcp: cannot stat '.docs/*': No such file or directory"
<SeanTAllen> jemc: you ok with my killing off those unused llvm docker projects? i'm going to do ones for each llvm version that we build by hand.
<jemc> SeanTAllen: feel free to kill off those unused repos, yes
<SeanTAllen> jemc: will do.
<jemc> not sure why the docker build is broken but it sounds like you're already investigating?
<SeanTAllen> i know why
<SeanTAllen> .docs isnt in the container
<SeanTAllen> so install fails now
<SeanTAllen> i think i figured out how to fix
<SeanTAllen> there's a build running now
codec1 has quit [Read error: Connection reset by peer]
nisanharamati has quit [Quit: Connection closed for inactivity]
<SeanTAllen> fixed jemc
<jemc> :tada:
<SeanTAllen> jemc: you around. i am stuck with docker.
<SeanTAllen> i did a docker build
<SeanTAllen> docker images shows my image
<SeanTAllen> but docker container ls doesnt show it
<SeanTAllen> and i cant figure out how to docker exec it
<SeanTAllen> what step am i unaware of that i'm missing?
<SeanTAllen> i want to exec /bin/bash in llvmtest and verify i can do ponyc's test-ci steps
aturley has joined #ponylang
jemc has quit [Ping timeout: 264 seconds]
* SeanTAllen got it jemc. jfc docker drives me nuts.
jemc has joined #ponylang
aturley has quit [Quit: aturley]
<SeanTAllen> awesome my login doesnt work from the command line
<SeanTAllen> ok i have an image up so i can try setting up circleci
khan has joined #ponylang
khan has quit [Quit: khan]
<SeanTAllen> jemc: i got a basic test running: https://circleci.com/gh/ponylang/ponyc/7
<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
<krig> without ref
<SeanTAllen> the ref there in the method name means... "this function can cause mutations"
<SeanTAllen> without it, you can mutate any fields of the object
<krig> ah, makes sense
<SeanTAllen> for the duration of a `fun mymethod`, youre object is effectively a `val`
<SeanTAllen> Bombe: same explanation applies for you
<SeanTAllen> the errors you get (which you can see if you do "Run" in Playground)
<SeanTAllen> receiver type is not a subtype of target type
<SeanTAllen> fun addPart(content: String) => _parts.push(content)
<SeanTAllen> that _parts (the reciver here is parts) doesnt match up
<SeanTAllen> receiver type: this->List[String val] ref
<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.
dipin has joined #ponylang
kempe has joined #ponylang
khan has quit [Quit: khan]
kempe has quit [Ping timeout: 265 seconds]
_whitelogger has joined #ponylang
kempe has joined #ponylang
kempe has quit [Ping timeout: 272 seconds]
kempe has joined #ponylang
gokr has quit [Quit: Leaving.]