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
endformationage has quit [Ping timeout: 256 seconds]
doublec_ is now known as doublec
doublec has quit [Changing host]
doublec has joined #ponylang
bevo has joined #ponylang
endformationage has joined #ponylang
endformationage has quit [Quit: WeeChat 1.9.1]
vaninwagen has joined #ponylang
vaninwagen has quit [Ping timeout: 256 seconds]
b has joined #ponylang
b is now known as Guest23537
Guest23537 has quit [Client Quit]
dave24 has joined #ponylang
<dave24> is the `i8` function intentionally missing from the buffered writer?
ExtraCrispy has joined #ponylang
<SeanTAllen> I wrote an intro to Pony for opensource.com: https://opensource.com/article/18/5/pony
justheretolurk has joined #ponylang
justheretolurk has quit [Client Quit]
ty3rt23 has joined #ponylang
ty3rt23 has quit [Client Quit]
qazvdv has joined #ponylang
qazvdv has quit [Client Quit]
endformationage has joined #ponylang
SenasOzys has joined #ponylang
SenasOzys has quit [Remote host closed the connection]
<ExtraCrispy> SeanTAllen, You brought me here, thanks.
<SeanTAllen> Hiya ExtraCrispy !
<SeanTAllen> @dave24 not that i am aware of.
<SeanTAllen> ExtraCrispy: are you `abritinthebay` from HN?
<ExtraCrispy> No anD HN?
<ExtraCrispy> and*
<SeanTAllen> ExtraCrispy: well then, how did i bring you here?
<SeanTAllen> HN == hacker news
<SeanTAllen> i was having a conversation with someone there and suggested IRC as a better way to discuss
<ExtraCrispy> Ah.No i meant i read an article in opensource.com.
<SeanTAllen> Ah
<SeanTAllen> cool
<SeanTAllen> well, wecome!
<SeanTAllen> errr welcome!
<ExtraCrispy> Ah well i guess there is a bit of confusion here.:)
<ExtraCrispy> Yeah cheers man.
<SeanTAllen> So, feel free to ask any questions you have. We always answer but often in an async fashion so, you'll want to check the public irc logs if you dont get an answer when you are logged in.
<ExtraCrispy> Since ypu are here screw the logs hehehe.
<ExtraCrispy> Actually i wanted to ask about ther compiler?"
<ExtraCrispy> I guess it is not in the Debian stable repos?
<ExtraCrispy> Or later?
<SeanTAllen> Its not, its in our bintray account
<SeanTAllen> HOWEVER...
<SeanTAllen> it will be coming for fedora and ubuntu in PPA/COPR soon: https://github.com/ponylang/ponyc/pull/2726
<SeanTAllen> but that doesnt help for debian.
<ExtraCrispy> Well i would prefer NOT to add third-party repos but who cares.
<ExtraCrispy> Building from source in Sid doesn't need to add a third-party repo.
<SeanTAllen> we'd love if someone stepped forward to be a debian maintainer.
<SeanTAllen> no one on the existing team has time to take that on
<ExtraCrispy> Don't look at me.Not enough time either.
<ExtraCrispy> But maybe things will change who klnows?
<ExtraCrispy> Anyway i see the compiler can be installed in stable just like sid.
<ExtraCrispy> All the dependencies are already in the repos.
<SeanTAllen> have fun installing. when you run into problems, we'll be here. did you see the learning pony section of the website? it has some advice on how to go about learning.
<ExtraCrispy> Doing that right now.
<ExtraCrispy> Oh BTW i guess you should update the github page?
<ExtraCrispy> Actually just the README.md.
<SeanTAllen> update what specifically?
<ExtraCrispy> The compiler section.
<ExtraCrispy> Building from source in Debian Stable is same as in Sid.
<SeanTAllen> Ah, that generally gets updated via community PRs
<ExtraCrispy> Ah idk
<ExtraCrispy> Ah i think stable dosn't support ponyc after all.
<ExtraCrispy> GCC is the problem.
<ExtraCrispy> But i guess with backports it may run.
<SeanTAllen> which gcc?
<SeanTAllen> whats the problem you hit?
<SeanTAllen> if you could open an issue if its not building for you that would be great. gcc version, debian version, error you get etc.
<ExtraCrispy> Well...
<ExtraCrispy> The GCC version in Stable is below 4.7.
<ExtraCrispy> I will try and build it and see if any problems occur.
<SeanTAllen> ah, yes that would be an issue.
<ExtraCrispy> Ah well.
<ExtraCrispy> It seems the issue is with LLVM.
<ExtraCrispy> SeanTAllen, It got fixed by installing llvm-39 instead oif just llvm.
<ExtraCrispy> But a new weird issue occured.
<ExtraCrispy> When i tried to make default_pic=true
<SeanTAllen> what was the issue?
<ExtraCrispy> Wait lemme paste it.
<ExtraCrispy> Any ideas SeanTAllen ?
<SeanTAllen> I do not. Could you open an issue for that?
<ExtraCrispy> I don't have a github account.
<ExtraCrispy> I must make one.Anyway i will do it tomorrow cause i g2g
<ExtraCrispy> But anyway thanks for your time and help.
<SeanTAllen> thanks ExtraCrispy
ExtraCrispy has quit [Remote host closed the connection]
vaninwagen has joined #ponylang
wnk has joined #ponylang
wnk has quit [Client Quit]
wink_ has joined #ponylang
<wink_> A pony_assert in src/libponyrt/sio/epoll.c/pony_asio_event_resubscribe_read at line 181 "src/libponyrt/asio/epoll.c:181: pony_asio_event_resubscribe_read: Assertion `0` failed." in circleci (https://circleci.com/gh/winksaville/ponyc/1060).
<wink_> I just ran the job, circleci build --job ubuntu-openssl-110-debug, on my local machine and it worked fine.
<SeanTAllen> yup. there's an issue open for that
<wink_> txs
droman has joined #ponylang
wink_ has quit [Ping timeout: 260 seconds]
<jbk> ahh epoll.. the gift that keeps on giving :)
ghosttie has joined #ponylang
ghosttie has quit [Client Quit]
vaninwagen has quit [Quit: WeeChat 2.1]
Shorttail has joined #ponylang
<Shorttail> I'm using strftime.net to format a PosixDate. If I add %L (xxx milliseconds) to the format string, the resulting program crashes without an error message
<SeanTAllen> damn that sucks Shorttail
<SeanTAllen> do you have a minimal example?
<Shorttail> SeanTAllen: Comment out the second print statement. It seems to be compile time it's messed up, not runtime. If the second print is there, nothing is printed at all
<Shorttail> 0.22.2-cf85a77 [release] Windows 10 64 bit
ghosttie has joined #ponylang
<ghosttie> hey @SeanTAllen, you there?
<SeanTAllen> ghosttie: i am!
<SeanTAllen> Shorttail: this doesnt crash for me on OSX
<SeanTAllen> Shorttail: can you open an issue
<SeanTAllen> how are you doing ghosttie ?
<ghosttie> cool, so about this exception thing - you keep saying to use a union of error types but in a try-end there is no object, so are you talking about returning that from the function?
<ghosttie> I am spectacular how are you
<SeanTAllen> yes
<SeanTAllen> i think
<SeanTAllen> if we are talking about the same thing
<SeanTAllen> in the example you gave, you wouldnt use error there
<SeanTAllen> so your if not x() then error end
<SeanTAllen> yo wouldnt do 'then error' there as that is flow control
<SeanTAllen> but in a function that can have say 1 valid return type or 2 possible errors
<SeanTAllen> you would return
<SeanTAllen> (MyValidType | Error1 | Error2)
<SeanTAllen> you could perhaps even make that Error1 a class rather than a primitive if you want, and take the overhead of an allocation and attach information to it in a field.
<SeanTAllen> hopefully i didnt just dump too much information in
<SeanTAllen> as to how i am, its the end of my day, so im tired but otherwise good
<Shorttail> SeanTAllen: I'll open an issue asap
<SeanTAllen> Shorttail: thank you, feel free to note that i tried on OSX and wasnt able to reproduce.
<ghosttie> ok, i guess this is more of an issue the closer you get to the hardware (e.g. lots of reason why open file could fail) so it's more likely to be the standard library code that would have to deal with that
<SeanTAllen> how the pony standard library handles that file case right now is really bad
<SeanTAllen> but for that case, you would want a union type like (File | BadPath | BadPermissions) etc
<ghosttie> ok (not looked at that yet) but it sounds like that's how it should/will work
<SeanTAllen> yes
<ghosttie> so what is error for
<ghosttie> sounds like it's pretty similar to Go - error return vals and halt for really bad things
<SeanTAllen> more than anything it comes down to performance
<SeanTAllen> there are two ways to do it because of performance
<SeanTAllen> if an error rarely happens then its less expensive than the union type approach
<SeanTAllen> the union type approach you will be doing matching so the CPU is going to be doing a branch prediction which has a small amount of overhead
<ghosttie> but you can't tell what happened
<SeanTAllen> correct
<SeanTAllen> but for many errors, that is enough
<SeanTAllen> you know it from context
<SeanTAllen> for example if i have a function called divide
<SeanTAllen> and its partial
<SeanTAllen> the error would be that i divided by zero
<SeanTAllen> error is for partial functions which really mean "could not compute result"
<SeanTAllen> and for you as a programmer, you can then decide what to do with the lack of a value
<ghosttie> still wrapping my head around partials
<SeanTAllen> its a math term
<SeanTAllen> a partial function is an function that can not return a value for all possible inputs
<ghosttie> yeah, unfortunately my math educated stopped before that point :)
<SeanTAllen> as compared to a total function that can always return a value for all possible inputs
<SeanTAllen> so division in math is partial because the value of divide by 0 is undefined
<ghosttie> so anything that could error is a partial?
<SeanTAllen> error is how you indicate the "could not compute a value"
<SeanTAllen> which is kind of like an exception but not really the same
<SeanTAllen> all partial functions in pony have a ? attached to the name at the call site so you can identify them
<SeanTAllen> and if you try to call a partial function without the ? pony will complain and not compile your program
<SeanTAllen> the name()? i can tell from that that name is partial
<SeanTAllen> i might not be able to get the name
<ghosttie> so should all calls to a partial be wrapped in a try? or only partials can call a partial? how close is the relationship between errors and partials?
ikpa has joined #ponylang
<SeanTAllen> anything that can "throw an error" is a partial function
<SeanTAllen> and needs to be marked as such and called as such
<SeanTAllen> if you look at example, you can see that there is only one function called with ()? - name()? so it has to be what would cause our try to fail
<ikpa> new here ....found about Pony today via HN ...would like to learn it for fun..
<SeanTAllen> hi ikpa! welcome.
<SeanTAllen> i wrote the article you found out about Pony from.
<SeanTAllen> ghosttie: does that make sense?
<ikpa> #Awesome!! ....thanks for sharing
<SeanTAllen> in the end, partial just means "can not compute result" for whatever reason. there's no way for me to give you a valid result, sorry about that.
<SeanTAllen> you're weclome ikpa
<SeanTAllen> if you have questions ask away. we answer all questions but sometimes in an async fashion so do check the irc logs if you ask one and log off without getting an answer . the logs are here: http://irclog.whitequark.org/ponylang
<ikpa> if your mailing group active .....
<ghosttie> are there partials that don't throw errors?
<SeanTAllen> ikpa: there's the mailing list as well. folks seem to favor IRC. although I try to nudge folks to the mailing list.
<SeanTAllen> ghosttie: no, then it would be total because it can always compute a result.
<ghosttie> ok thanks
<ikpa> I prefer mailing list .. list me check it out
<SeanTAllen> you're welcome ghosttie
<ghosttie> different question - somewhere in the tutorial there was something that I think was called struct? something about allocating fields differently - what's up with that?
<SeanTAllen> ikpa: i like the mailing list because info conveyed there can be searched and found by future folks. irc isnt as good for posterity.
<SeanTAllen> ghosttie: struct is for C ffi.
<SeanTAllen> its pony's version of a C struct.
<ghosttie> oh ok
<ghosttie> ref and iso?
acarrico has quit [Ping timeout: 268 seconds]
<SeanTAllen> those are two reference capabilities. they are part of the type of a variable
<SeanTAllen> ref means "this is mutable"
<SeanTAllen> iso means "this is mutable and only 1 alias to it is allowed to exist"
<ghosttie> so it's like an optional version of the Rust thing? you could just make everything mutable and not get any benefit from it
<SeanTAllen> they arent optional
<SeanTAllen> every variable in Pony has a reference capability
<SeanTAllen> but each type has a default capability if you dont explicitly indicate
<SeanTAllen> reference capabilities are the pony equivalent to the Rust borrow checker in terms of the role they play in assuring data safety.
<ghosttie> i assume you can't pass references to an actor?
<SeanTAllen> so
<SeanTAllen> some types are safe to send between actors
<SeanTAllen> val, iso and tag being the big three
<SeanTAllen> val because its immutable
<SeanTAllen> tag because all you are sharing is the identity of the thing (only good for comparison and sending messages to an actor)
<SeanTAllen> iso because you have to give up your reference to it before sending to another actor
<ghosttie> ok, makes sense
<ghosttie> oh it was embed, not struct
<SeanTAllen> it gives you a little control over memory layout
<SeanTAllen> without embed, a variable that is a class would be (behind the scenes) a pointer
<SeanTAllen> with embed, its "inline" in the enclosing class, in terms of memory layout
<SeanTAllen> embed isnt used very often
<ghosttie> how would you decide when to use it
<SeanTAllen> it might give you a small performance boost so really, you would only use it if you need the performance boost and you benchmarked and found it mattered.
<SeanTAllen> sorry for delays in answering. im cooking dinner.
<ikpa> Just registered with your mailing list
<ghosttie> pretty impressive you're choosing to give this much time to a bunch of ignorant people on the internet, really
<ghosttie> also the tutorial is unusually good for a new language
<ikpa> But your conversation with @ghosttie is interesting
<ghosttie> i can't imagine how much time it must have taken to create a language and then write all that documentation
<ikpa> Let survey your tutorial
<SeanTAllen> ghosttie: thank you
<SeanTAllen> ghosttie: its a lot of work
<ghosttie> i've got to go, see ya
ghosttie has quit [Quit: Page closed]
<SeanTAllen> have a good night ghosttie
<ikpa> if Pony using space bar like Python ...
<SeanTAllen> sorry, i dont follow ikpa?
acarrico has joined #ponylang
<ikpa> Is this really true , **If your program compiles, it won't crash.**?
<SeanTAllen> in theory yes, in practice at this time, no because bugs in implementation and well, if you do certain C-FFI, things go out the window because you are back in C-FFI land.
<SeanTAllen> there's no such thing as an uncaught exception, you can not crash that way.
<SeanTAllen> exclusing bugs, and like i said C-FFI, its memory safe (same as Rust with the caveats about C-FFI redone as `unsafe`)
<SeanTAllen> if it crashes and you arent doing fun thing with C-FFI, its a compiler or runtime bug and you can report as such.
<SeanTAllen> and we aggresively stomp those bugs out.
<SeanTAllen> we haven't had runtime/library crash in Wallaroo in quite some time but we've contributed patches etc to fix errors over time.
<SeanTAllen> our crashes at this point come from not correctly handling things like null pointers coming back from the embedded Python interpreter.
<SeanTAllen> compared to c or c++ where compilation doesnt indicate you wont be crashing because of a bug in your program.
<SeanTAllen> i love c (and to a lesser extent, a subset of c++) and think its a wonderful language but i do miss those pony assurances when i'm coding in c.
<ikpa> thanks
<ikpa> why null pointer when you have reference capabilities
<ikpa> or is it because you Pony lacked ...lifetime
<SeanTAllen> because in Wallaroo we are calling into Python via its C api
<SeanTAllen> so there's no safety guarantees there.
<SeanTAllen> And we despite out best efforts sometimes incorrectly handled that output and didnt address the null pointers, because in the end that bridge is C. but, we think we have them all addressed now.
droman has quit [Quit: WeeChat 2.1]
<ikpa> A ref type is a reference type, meaning that the object is mutable
<ikpa> This is hard for me to wrap my head around
<ikpa> why not have **mut** keyword...
<SeanTAllen> because there is more than 1 kind of mutability
<SeanTAllen> there are mutable types that are safe to share (iso) and those that are not (ref)
<SeanTAllen> because the compiler will enforce that there is never more than 1 alias to the iso
<SeanTAllen> whereas `ref` is your usual mutable free for all and a `ref` is unsafe to share between actors. doing so would make dataraces a possibility.
<SeanTAllen> ikpa: whats your programming background?
<ikpa> a little of Rust, a little of JavaScript
<SeanTAllen> so...
<SeanTAllen> in a language with threads for concurrency without rust's borrow checker
<SeanTAllen> the only way to safely share data is...
<SeanTAllen> locks - but this can lead to deadlocks. which are awful to figure out. i learned a long time ago, avoid locks if possible or keep them very isolated
<SeanTAllen> outside of using locks you can..
<SeanTAllen> safely share immutable data. you just have to make sure you don't accidentally mutate it. thats what the `val` reference capability is for. the compiler will verify that you don't modify that value.
<SeanTAllen> you can safely use mutable data so long as thread A gives up its reference to the data when it gives it to thread B. that is, there is only ever 1 pointer to the data. only 1 alias. then, you can safely change it because only a single thread would be changing it. that's the `iso` refcap. Again, enforced by the compiler.
<SeanTAllen> now, you can have mutable data with many aliases to it, but that is only safe to share between threads with locks (see earlier). that's the `ref` refcap in pony. except, pony has no locks, so the compiler will verify that you don't try share ref data between threads which in pony, means between actors.
<SeanTAllen> there are other refcaps but those are the big 3 and they map to patterns for sharing data safely in something like C or C++.
<ikpa> thanks. ...I hope to be around morrow
<SeanTAllen> we'll be here.
<SeanTAllen> see you then.