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 quit [Ping timeout: 260 seconds]
kr1shnak has quit [Ping timeout: 258 seconds]
obadz has quit [Ping timeout: 240 seconds]
obadz has joined #ponylang
tj800x has joined #ponylang
<tj800x> Hi everyone. I'm watching the Curry on Prague video and can't figure out why one of the examples isn't working.
<tj800x> actor Main
<tj800x> new create(env: Env) =>
<tj800x> let str = recover
<tj800x> String.append("Hello, ").append("world")
<tj800x> end
<tj800x> env.out.print(consume str)
<tj800x> I'm running ponyc 0.12.2-dc26414
chemist69 has quit [Disconnected by services]
chemist69_ has joined #ponylang
<SeanTAllen> ah
<SeanTAllen> still there tj800x ?
<SeanTAllen> append used to return "this" for method chaining but we had an RFC that did away with that
<SeanTAllen> String.>append("Hello, ").>append("world")
<SeanTAllen> fixes your issue
<tj800x> yep. I'm here.
<tj800x> Oh, okay.
<tj800x> How current is the tutorial and the standard library docs?
<tj800x> I've been having a lot of trouble learning Pony. I know it isn't easy to learn, but I've been wracking my brain trying to make simple things work.
<tj800x> Also, of all the language-aware editors, which one would be the best choice as far as keeping up with the language.
<SeanTAllen> tj800x: sorry for the delay
<SeanTAllen> the standard library docs are updated each time a release is done
<tj800x> No problem. You don't charge by the minute, right?
<SeanTAllen> the tutorial should be up to date anytime something is merged that requires a change. if it isnt, its an oversight.
<SeanTAllen> i do not
<SeanTAllen> so, tj800x, what are you having problems with? i'm going to guess references capabilities
<tj800x> Yes. reference capabilities. I think I'm getting it, but have a few questions.
<SeanTAllen> they are the trickiest part and the compiler messages need improvement
<SeanTAllen> question: do you have a background doing multithreaded programming?
<tj800x> Ah...a bit. I've done semaphores, locks and mutexes. It was long ago.
<SeanTAllen> ok, so then the basic concepts behind reference capabilities should make sense
<SeanTAllen> in terms of safely sharing data between threads
<SeanTAllen> that's good
<tj800x> I've been doing embedded C on microcontrollers for years, so I'm familiar with memory....but it was mostly bare metal without any RTOS.
<SeanTAllen> some folks come from a purely single threaded background
<SeanTAllen> we dont have a lot of good content for that background yet
<SeanTAllen> so
<SeanTAllen> 3 things that can help a lot at the moment with reference capabilities
<SeanTAllen> john mumm's blog post on them
<tj800x> Yes, I understand why we need to avoid races and why shared data is not scalable.
<SeanTAllen> sylvan's VUG on generics
<SeanTAllen> and doublec's blog post summarizing and explaining that VUG
<SeanTAllen> are you familiar with those 3?
<SeanTAllen> i'm going to be adding them to the "Learn" section of the new site sometime in the next week
<SeanTAllen> but if you arent familiar with them (or only familiar with some), i'll share the links now
<tj800x> I think I've seen the generics VUG. It quickly dove into a depth that was beyond what I needed.
<tj800x> Links would be great if they are handy. If not, I can google.
<SeanTAllen> the vug: https://vimeo.com/163871856
<SeanTAllen> i would suggest starting with johns, then doublec's
<SeanTAllen> then watch the vug talk
<SeanTAllen> the vug talk will hurt your head
<SeanTAllen> which is ok
<SeanTAllen> pause it, read doublec's post some more
<tj800x> Ok. I will check those out.
<SeanTAllen> switch back and forth
<SeanTAllen> every now and then go back to the vug talk
<SeanTAllen> you'll find it making more sense over time
<SeanTAllen> until you get it
<SeanTAllen> generics and reference capabilities are the hardest part of pony
<tj800x> Can I conceptually just pull tag out of the matrix and treat it as separate? It doesn't seem to interact with the rest of the reference capabilities.
<SeanTAllen> but doublec's post does a good job of starting you down the path to getting it
<SeanTAllen> yeah
<SeanTAllen> tag is opaque
<SeanTAllen> in the beginning i'd worry about val, ref, iso and tag
<SeanTAllen> those are the big 4
<SeanTAllen> when you run into trouble, by all means, email the mailing list, ask here or if you aren't comfortable with either, you can email me and i can help privately although i prefer the mailing list as others can learn from it as well
<tj800x> Mailing list is fine.
<SeanTAllen> i've done a couple pairing sessions over zoom as well to get folks over a hump from time to time
<tj800x> Does let always create immutable data?
<SeanTAllen> ah
<SeanTAllen> this is a little confusing at first
<SeanTAllen> and i'm trying to figure out how to rewrite the content for that
<SeanTAllen> let creates a binding that can't be changed
<SeanTAllen> var creates a binding that can be changed
<SeanTAllen> you can do
jemc has joined #ponylang
<SeanTAllen> let my_thing: MyClass ref
<SeanTAllen> and whatever "MyClass" you assign to it, has to remain the MyClass that is bound to the variable my_thing
<SeanTAllen> if its
<SeanTAllen> var my_thing: MyClass ref
<SeanTAllen> then you can assign a different MyClass to it later
<SeanTAllen> does that make sense?
<tj800x> So, can the reference capability change?
<SeanTAllen> no
<SeanTAllen> at least its a "no" if i understand your question correctly
<tj800x> so let name: String = "Tom" creates memory with "Tom" and a 'name' reference to that memory with a capability of val. Sound right.
<tj800x> It is totally immutable, both the memory "Tom" and the reference 'name' pointing to that memory.
<SeanTAllen> yes
<SeanTAllen> but if you did
<SeanTAllen> var name: String = "Tom"
<tj800x> And if I understand pony I can pass this 'name' reference around freely without having to do any other capabilities transformation.
<SeanTAllen> then you could later bind a new immutable string to that name
<SeanTAllen> correct
<SeanTAllen> val is safe to share
<tj800x> Sure, I could do name="Bob". To do that I would need to have a reference of iso, ref, or trn.
<SeanTAllen> it can be a val
<SeanTAllen> as you can see, that compiles and runs just fine
ponynewb has joined #ponylang
<tj800x> How can I change it with a val ref?
<tj800x> I'm pulling up your playpen now.
<SeanTAllen> i dont understand your question
<tj800x> It's okay. I've got it.
<SeanTAllen> awesome
<ponynewb> Is there an XML parsing library for Pony?
<SeanTAllen> ponynewb: not that i am aware of at this time, someone might have done a wrapping of libxml but i'm not aware of it
<tj800x> var name : String val = "Tom" makes sense to me. I know that it is just the explicit way of writing var name : String = "Tom"....and the "Tom" part is what is in the memory.
<SeanTAllen> yup
<tj800x> The strange part is that I would have thought that if later on I wrote name="Thomas" that I would be going beyond three bytes and it would be a problem, but it looks like space is reallocated with the new command for the longer name.
<ponynewb> shoot, okay
<SeanTAllen> ponynewb: a number of people have stopped by and asked, i'm hoping one of them has an itch strong enough to take it on
<SeanTAllen> i have PTSD from trying to bend libxml to my needs a few years ago
<SeanTAllen> and I have no itch to scratch in that area at the moment
<SeanTAllen> tj800x: there's no memory being reallocated
<SeanTAllen> think of it like a pointer
<SeanTAllen> all the strings still exist
<SeanTAllen> we are just pointing "name" as a label to point at a different immutable string
<tj800x> Oh..okay. That helps!
<SeanTAllen> whereas `let`, you can change the object the pointer is referencing
<SeanTAllen> sorry "can't" change
<ponynewb> SeanTAllen: Hopefully someone will contribute one someday. Unfortunately, writing a libxml wrapper is more work than I want to put into this toy HTTP crawler I'm trying to write
<SeanTAllen> the C ffi is pretty good ponynewb, you could give using libxml directly a try
<SeanTAllen> some libraries are easy to interface with, some not so much
<ponynewb> What's the link to the C FFI documentation?
<SeanTAllen> it covers some basics but there are gaps that need to be addressed
<SeanTAllen> ok, ive been up 20 hours now. time for to go to sleep.
<ponynewb> Night
<ponynewb> Thanks for the help
<SeanTAllen> you're welcome. if you need more, and there's no one around here, hit up the mailing list.
<tj800x> Within an actor can you only have one ref to a certain piece of mutable data?
<tj800x> Slide 16 of the Pony WG2.16 presentation makes me think that.
<tj800x> Correction. That presentation makes me think that I CAN have two refs to mutable data.
ponynewb has quit [Quit: Page closed]
<tj800x> Ok. Goodnight all.
tj800x has quit [Quit: Page closed]
amclain has quit [Quit: Leaving]
gmcabrita has quit [Quit: Connection closed for inactivity]
jemc has quit [Ping timeout: 240 seconds]
vaninwagen has joined #ponylang
xyproto has left #ponylang ["WeeChat 1.7"]
obadz has quit [Ping timeout: 268 seconds]
obadz has joined #ponylang
chemist69_ has quit [Ping timeout: 258 seconds]
chemist69 has joined #ponylang
gmcabrita has joined #ponylang
killerswan has joined #ponylang
killerswan has quit [Client Quit]
rurban has joined #ponylang
rurban has left #ponylang [#ponylang]
chemist69 has quit [Ping timeout: 246 seconds]
chemist69 has joined #ponylang
vaninwagen has quit [Ping timeout: 240 seconds]
atk has quit [Changing host]
atk has joined #ponylang
<staticassert> SeanTAllen: Interesting. I'd like to learn more about that at some point but thanks for the context. P.S. Had some computer trouble yesterday, now that I'm at work I can push out TWIP
<staticassert> I also did understand jemc's typo from the context :P
chemist69 has quit [Ping timeout: 258 seconds]
chemist69 has joined #ponylang
<SeanTAllen> staticassert: thought... should we rename it to Last Week in Pony?
<SeanTAllen> It seems more apropos
<staticassert> Ah... yes, that does make more sense.
<SeanTAllen> i will do that and some other cleanup after this passes CI and I merge
<staticassert> cool, thanks
<SeanTAllen> before i send out via twitter and what not
<staticassert> Working on finding a picture of myself lol
<SeanTAllen> go to kmart
<SeanTAllen> use a photobooth
<SeanTAllen> use camera phone to take picture of photobooth picture
<staticassert> Also should have a link to the website repo for anyone who wants to contribute to LWIP
<staticassert> lol
<SeanTAllen> email to self
<SeanTAllen> modify picture on computer to good sizing
<SeanTAllen> upload
<staticassert> compress it for size
<staticassert> take screenshot, recompress
<staticassert> I have a picture I used for rustconf last year lol just trying to find tha tone
<SeanTAllen> I think there should be an email address to send items of interest to OR we could direct them to the twitter account. but email is more universal.
<staticassert> yes, I'm setting up the email now - was thinking 'lastweekinpony@gmail.com' or 'last.week.in.pony@gmail.com' - assuming it lets me use .'s
<staticassert> I went with last.week.in.pony@gmail.com - we should have that email in future lwip posts
<Candle> fyi; gmail '.' character is ignored.
<Candle> so a.b.c.d.e.f@gmail.com == abcdef@fmail.com
<Candle> so a.b.c.d.e.f@gmail.com == abcdef@gmail.com
<staticassert> interesting, thanks
<Candle> You (may) have two mails to that address!
obadz has quit [Ping timeout: 258 seconds]
obadz has joined #ponylang
<SeanTAllen> staticassert: i change the "versions released" in LWIP as there is important info in each.
<staticassert> good idea
<SeanTAllen> Thanks staticassert
earnestly has joined #ponylang
jemc has joined #ponylang
jemc has quit [Client Quit]
jemc has joined #ponylang
chemist69 has quit [Ping timeout: 256 seconds]
amclain has joined #ponylang
_whitelogger has quit [K-Lined]
_whitelogger has joined #ponylang
tj800x has joined #ponylang
vaninwagen has joined #ponylang
staticassert has quit [Ping timeout: 260 seconds]
staticassert has joined #ponylang
Matthias247 has joined #ponylang
pduncan has joined #ponylang
<SeanTAllen> staticassert: did yu set up that email?
<staticassert> yep
<SeanTAllen> what did you go with for final?
<staticassert> last.week.in.pony@gmail.com
<SeanTAllen> cool
<SeanTAllen> im going to let people know to send things to that
<staticassert> although as Candle has shown (I just checked the email :P) you can refer to it with or without the dots
<staticassert> thanks
<SeanTAllen> during the sync call i asked folks who were listening to also send things like "this commit that was merged" etc type things along with blurbs etc
<staticassert> ah, that will help a ton, thank you
<SeanTAllen> so we can spread load on that
<SeanTAllen> you as editor rather than editor and writer and only reporter seems better
<SeanTAllen> and more sustainable
<staticassert> yeah, for sure, and ideally more contributors will join up and work can be split up - we can take on some more features for the blog
tj800x has quit [Ping timeout: 260 seconds]
<Candle> staticassert: :D
* Candle needs to try to get onto the sync call on wednesdays...
<Candle> next week... honest!
TwoNotes has joined #ponylang
obadz has quit [Ping timeout: 260 seconds]
obadz has joined #ponylang
TwoNotes has quit [Quit: Leaving.]
vaninwagen has quit [Ping timeout: 264 seconds]
jmiven has quit [Quit: WeeChat 1.7]
jmiven has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]