Foaly has quit [Quit: Now 'mid shadows deep falls blessed sleep.]
srenatus has joined #ponylang
OtakuSenpai has quit [Remote host closed the connection]
OtakuSenpai has joined #ponylang
OtakuSenpai has quit [Ping timeout: 268 seconds]
_whitelogger has joined #ponylang
<srenatus>
_andre: nice package. the README's "Google's uuid package" link doesn't lead anywhere, though; I was curious since I'm unaware of any Golang "uuid" package _by Google_. ;)
jdhorwitz has quit [Quit: Connection closed for inactivity]
OtakuSenpai has joined #ponylang
acarrico has quit [Ping timeout: 245 seconds]
Nawab has joined #ponylang
OtakuSenpai has quit [Read error: Connection reset by peer]
rjframe has joined #ponylang
acarrico has joined #ponylang
Shad0wCore has joined #ponylang
<Shad0wCore>
Hey there. Is somebody there that can help me out with some stuff? I'm new to Pony and I'm having troubles with this 'iso', 'ref' etc. stuff
<SeanTAllen>
so i'm going to change your code to match what I think your intent was and post that here although there are several possible ways to address, ok?
<SeanTAllen>
take a look at let me know if i should explain any of those 3 vals i added
<Shad0wCore>
Yeah, please explain it to me. I've still got Java keywords in my head and I'm trying to find any relationships to them with Pony keywords
<SeanTAllen>
ok
<SeanTAllen>
so line 1
<SeanTAllen>
this says if I use "Logger" without a ref cap as a type that I mean "Logger val"
<SeanTAllen>
so that makes line 16 and 20 where you use Logger no longer mean Logger ref it means Logger val
<SeanTAllen>
does that make sense for line 1? (im building up to why all this fixes your compile error)
<Shad0wCore>
Honestly, I don't understand a single thing when it gets to those caps. Guess I have to iterate over that tutorial over and over again until I understand it
<SeanTAllen>
ok
<SeanTAllen>
lets step back for a moment
<SeanTAllen>
if i asked you to tell me what ref, val and tag are, could you explain them to me?
srenatus has quit [Quit: Connection closed for inactivity]
<SeanTAllen>
so next step is really to go through the process on the website
<Shad0wCore>
The one you sent?
<SeanTAllen>
yes
<Shad0wCore>
Aight
<Shad0wCore>
Gonna take a look at it
<Shad0wCore>
Thank you
<SeanTAllen>
start working through that and we'll be here to answer questions you have
<Shad0wCore>
Thanks
<SeanTAllen>
if no one answers right away, when you come back, check the logs
<SeanTAllen>
we answer all questions (unless they are intentionally asshat questions)
<SeanTAllen>
logs are here: irclog.whitequark.org/ponylang
<SeanTAllen>
question... when you have done Java, have you done any programming using multiple threads?
<Shad0wCore>
Barely
<Shad0wCore>
I started with Java and I've been programming with Java the whole time
<Shad0wCore>
I started learning C++ a month ago
<Shad0wCore>
But meh
<SeanTAllen>
ok
<SeanTAllen>
so that really is the root of the problem
<SeanTAllen>
refs caps are the compiler helpiing you with things that are important when you are doing concurrent programming
<SeanTAllen>
if you want, i'm happy to go over that some now, although its in the referenced materials as well...
<Shad0wCore>
First I'll have a look at the site you sent
<Shad0wCore>
website*
<SeanTAllen>
ok
<SeanTAllen>
sounds good
<Shad0wCore>
"We’re not going to pretend that all programmers know how to safely handle data when using threads. If they did, we wouldn’t need Pony." - This one got me
<SeanTAllen>
"Even the most experienced programmer makes mistakes and they are really hard to go back and find."
<SeanTAllen>
in the 90s when I was doing lots of multithreaded C++ programming, I came up with a lot of rules of thumb for how to handle data so that I didnt get data races and segfaults. They are fairly straightforward. The ref, val, and iso refcaps are basically a way for a compiler to help make sure those rules are followed.
<Shad0wCore>
You must have had some headaches when designing Pony, didn't ya?
<SeanTAllen>
I wasnt there for early design that was Sylvan. Although he and I have known each other for almost 30 years now.
<SeanTAllen>
A few years ago, sylvan sent me a link to the pony tutorial and repo as it existed at the time with the message "look what i made!"
<SeanTAllen>
a few months later I started playing with it and we decided it would be good for us to adopt at Wallaroo Labs and now I'm quite actively involved with Pony
<Shad0wCore>
I've got another question. You know the pointers and reference stuff? Of course you do, you worked with C++. However, how is this done in Pony? Is there even "Pass by Value"? Is this handled by the caps?
<SeanTAllen>
there's no pass by value in pony right now. although its something that there is ongoing discussion around
<SeanTAllen>
everything is a reference
<Shad0wCore>
Ok
<SeanTAllen>
the compiler controls what you can do with those references
<SeanTAllen>
so `val` it won't let you modify it
<SeanTAllen>
`ref` it won't let you send to another actor
<SeanTAllen>
`iso` it won't let you send to another actor without giving up your reference to it
<Shad0wCore>
I'd love to see a cheat sheet showing of actual code. The first article by John Mumm is great and all but real long
<Shad0wCore>
I mean realllllllll long
<SeanTAllen>
if you could send a `ref`, that is a pointer that has many aliases to another actor then you could have 2 things concurrently accessing and/or updating mutable shared state and that is bad
<SeanTAllen>
aturley did the cheatsheet. it's awesome.
<SeanTAllen>
John is a very thorough human. I love working with him because of that.
<Shad0wCore>
I guess I'll have to try different every time different caps because as of right now for me, trying to understand how those caps work is like studying for my finals lol
<Shad0wCore>
different caps variations*
<Shad0wCore>
lol
<Shad0wCore>
the whole sentence is messed up
<Shad0wCore>
I guess I'll have to try different caps combinations every time I encounter this problem, because as of right now, for me trying to understand how those caps work is like studying for my finals
<SeanTAllen>
i would focus on 4 refcaps
<SeanTAllen>
ref, val, iso, tag
<SeanTAllen>
if you want an immutable thing, you want val.
<SeanTAllen>
if you want a mutable thing that you can send to another actor or otherwise "share", then you want iso
<SeanTAllen>
if you want boring old mutable that you keep within an actor, you want ref
<SeanTAllen>
and tag is basically "the identity of a thing" which you can use for comparison and in the case of an actor, sending messages to
<Shad0wCore>
Why can't I just do it like this? This makes way more sense for me, marking a parameter as "val" indicating: Dude, stop, you can only read from it. https://paste.md-5.net/culafabuhe.coffee
<Shad0wCore>
It's just weird
<Shad0wCore>
It's like with C++ const soup
<SeanTAllen>
because PrimitiveOutStreamLogger isn't a val
<SeanTAllen>
"PrimitiveOutStreamLogger box is not a subtype of Logger val: box is not a subcap of val"
<SeanTAllen>
your PrimitiveOutStreamLogger is a ref
<SeanTAllen>
and its being "seen" through a "box" method.
<SeanTAllen>
so you get the error: "PrimitiveOutStreamLogger box is not a subtype of Logger val: box is not a subcap of val"
<Shad0wCore>
You should also enhance the error messages a bit
<Shad0wCore>
Something like "'PrimitiveOutStreamLogger box' is not a subtype of 'Logger val': Capability 'box' is not a subcap of 'val'"
<SeanTAllen>
that's a good suggestion, can you open an issue for that?
<Shad0wCore>
Yeah
<SeanTAllen>
and it can be discussed
<Shad0wCore>
On "ponyc"?
<SeanTAllen>
yes please
acarrico has quit [Ping timeout: 250 seconds]
<Shad0wCore>
I created an issue
acarrico has joined #ponylang
<SeanTAllen>
thanks
Shad0wCore has quit [Quit: Page closed]
<SeanTAllen>
stepping away
acarrico has quit [Ping timeout: 250 seconds]
rjframe has quit [Ping timeout: 240 seconds]
endformationage has joined #ponylang
Foaly has joined #ponylang
aturley_ has joined #ponylang
aturley has quit [Ping timeout: 250 seconds]
aturley_ is now known as aturley
Nawab has quit [Remote host closed the connection]
Foaly has quit [Quit: Now 'mid shadows deep falls blessed sleep.]
travis-ci has joined #ponylang
<travis-ci>
ponylang/ponyc#5523 (master - 7c44f14 : i-ky): The build was broken.