OtakuSenpai has quit [Read error: Connection reset by peer]
srenatus has quit [Quit: Connection closed for inactivity]
OtakuSenpai has joined #ponylang
jemc has joined #ponylang
inoas has quit [Quit: inoas]
inoas has joined #ponylang
inoas has quit [Client Quit]
endformationage has joined #ponylang
Nawab has joined #ponylang
OtakuSenpai has quit [Ping timeout: 240 seconds]
mcintyre1994 has joined #ponylang
<mcintyre1994>
Sorry if you get this all the time, but I've skimmed through the tutuorial/examples at the end of it and I'm wondering if there's any examples of programmes using multiple actors and sharing data between them - or if anyone knows of good general actor model intros that might explain things a bit? I'm struggling to understand the concepts without seeing them being used!
Nawab has quit [Read error: Connection reset by peer]
OtakuSenpai has joined #ponylang
squirmybroom35 has joined #ponylang
<squirmybroom35>
Is there no functionality in the standard library for parsing a string into an integer?
<slfritchie>
squirmybroom35: The text is terse, but at roughly https://stdlib.ponylang.io/builtin-String/#i8 and below shows the String class functions for converting to various integer types (`I8`, `I16`, et al.). If the `base` argument is omitted, then those functions default to using the beginning of the string.
<slfritchie>
Unless `base` is instead the number system used, hmm, that would make a difference, wouldn't it? I'll have to look at the source, sorry.
<squirmybroom35>
Thanks! Think I got it to work by passing 10 as base.
<wyvern>
Just getting started with pony and I have some noob questions. First, I want to read a relatively small amount of data from stdin (UTF-8 bytes) and turn it into a String. What's the right way to structure this? I'm guessing that I want to create an object to pass to stdin that will accumulate data in an Array[U8], and then maybe hand that array off to some other actor when dispose() is called (stdin read is done)?
mcintyre1994 has quit [Ping timeout: 256 seconds]
<SeanTAllen>
wyvern: you register a callback with the Stdin actor and buffer it yourself
<SeanTAllen>
at some point in the buffering you can hand it off to another actor
<wyvern>
yes, that's what I'm getting at. Still struggling over getting the types right.
<SeanTAllen>
do you have something small you can put into the playground?
<squirmybroom35>
Wow, I managed to solve the first part of Advent of Code day 1! :) *pat on back*
<wyvern>
Gotta run for a bit; will look and get back to you. Thanks very much!
<vaninwagen>
squirmybroom35: congrats
<SeanTAllen>
squirmybroom35: awesome!
<wyvern>
heh, I'm also tackling advent of code. Pony's been on my to-learn list for years, and it seemed like as good a reason as any
<wyvern>
SeanTAllen: can you explain line 21?
<jemc>
wyvern: are you familiar with "destructive read" from the tutorial?
<wyvern>
Ohh Array[U8] is a constructor invocation. It looked like a type, hence the confusion.
<wyvern>
jemc: sort of, in that I've read the docs once. :)
<aturley>
if anyone is interested in seeing me write some pony, you can watch me here in 8 minutes: https://www.twitch.tv/aturls
<wyvern>
When `String`'s docs say "String does not specify an encoding", what exactly does that mean? How can things like `codepoints()` be defined if there isn't an encoding?
<SeanTAllen>
wyvern: does line 21 make sense now or shall i explain?
<wyvern>
Yep, all good, thanks.
<SeanTAllen>
wyvern: string doesnt specific an encoding in that... its just some bytes
<wyvern>
so why would you use String instead of Array[U8]?
<SeanTAllen>
well....
<SeanTAllen>
hehe
<SeanTAllen>
honestly i usually use Array[U8]
<SeanTAllen>
because i never do anyhting with string that is ummm... string like
<wyvern>
so, just hope that things are always UTF-8, etc?
<SeanTAllen>
well for what i work on
<SeanTAllen>
it doesnt matter
<SeanTAllen>
you need to know the encoding yourself and handle accordingly
<SeanTAllen>
i hope someone will someday write a whiz bang, knows about its encoding etc string library someday
<SeanTAllen>
have a look at the StringRunes class wyvern
<wyvern>
OK. It seems impossible that something like codepoints() could work correctly without knowing the encoding. An encoding aware string type seems like a good thing
<SeanTAllen>
that is for utf32
<SeanTAllen>
codepoints looks for unicode code points
<SeanTAllen>
jemc had a lot of ideas for String handling changes
<SeanTAllen>
jemc did you write those up anywhere?
<SeanTAllen>
also see utf32 method on String
<wyvern>
Yeah, I see that; the implicit assumption that text is UTF-8 seems weird to me given the top level docs of "string does not assume an encoding"
<wyvern>
having methods that *do* assume an encoding is... unexpected
<jemc>
no, I don't think I settled on any final ideas, but I'm going to be working on reapproaching that relatively soon at some point
<wyvern>
Point taken re the "contributions welcome" stance on encoding aware string type; I must admit it is a little disappointing to not find a more complete story around encodings. I love what I'm seeing of the type system and runtime characteristics but it's things like this that make it difficult to get Pony adopted at ${job} -- an obvious thing for someone to point at and say "but it doens't have X".
<wyvern>
So, I hope someone with more of an understanding of how to leverage the type system in library design solves that problem :)
<SeanTAllen>
if that is an argument at job then well, ya pony isnt going to win that one for a long long time
<SeanTAllen>
job needs to have a pressing need for something that pony is really good at and makes the immaturity worthwhile
<SeanTAllen>
we built wallaroo using it and recently wrapped up a POC for a client where in 3 weeks, we got them close to twitter load on an application we started from scratch
<SeanTAllen>
a big part of that is how we designed wallaroo
<SeanTAllen>
and a big part is the pony runtime under wallaroo
<SeanTAllen>
3 weeks to accomplish that app is quite amazing
<SeanTAllen>
for most people's jobs to adopt pony at this point, there needs to be a really really good reason of that sort for it
<wyvern>
Yeah, understood.
squirmybroom35 has quit [Remote host closed the connection]
Foaly has joined #ponylang
squirmybroom35 has joined #ponylang
squirmybroom35 has quit [Remote host closed the connection]
travis-ci has joined #ponylang
<travis-ci>
ponylang/ponyc#5508 (master - 6227d31 : Norbert Fuhs): The build was fixed.
<squirmybroom35>
Thanks a lot! It's past midnight and I'll never manage to get my head around that without some sleep first. I´ll take a close look tomorrow. :)
endformationage has quit [Ping timeout: 250 seconds]
squirmybroom35 has quit [Remote host closed the connection]
<SeanTAllen>
ok
<SeanTAllen>
if you have questions, post them here and ill respond
<SeanTAllen>
if you arent around when i respond, check the logs