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
Guest81970 has quit [Ping timeout: 240 seconds]
Praetonus has quit [Quit: Leaving]
amclain has quit [Quit: Leaving]
[CBR]Unspoken has quit [Ping timeout: 244 seconds]
[CBR]Unspoken has joined #ponylang
jemc has joined #ponylang
TwoNotes has joined #ponylang
<TwoNotes> What is the form of the strings expected by UDPSocket.multicast_join?
TwoNotes has quit [Quit: Leaving.]
jemc has quit [Ping timeout: 268 seconds]
jemc has joined #ponylang
jemc has quit [Ping timeout: 244 seconds]
copy` has quit [Quit: Connection closed for inactivity]
trapped has joined #ponylang
lispmeister has joined #ponylang
trapped_ has joined #ponylang
_ has joined #ponylang
trapped has quit [Read error: Connection reset by peer]
_ is now known as Guest62470
trapped_ has quit [Ping timeout: 276 seconds]
lispmeister has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lispmeister has joined #ponylang
tdc has quit [Quit: Bye bye]
<mitchellvanw> morning. i'm extremely new to pony and am trying the following in the sandbox
<mitchellvanw> env.out.print(Url.is_valid("https://google.com"))
<mitchellvanw> but this doesn't seem to work. i'm probably missing some fundamental thing
<SeanTAllen> hi mitchellvanw : i'm not sure what works and doesn't work in the sandbox.
<SeanTAllen> i know there is some stuff that doesn't.
<SeanTAllen> because... security... let me check it out
<mitchellvanw> "This package isn't allowed to do C FFI."
<SeanTAllen> yeah, C FFI is disallowed in the sandbox
<SeanTAllen> So Url.is_valid is using C ffi at this point in time
<mitchellvanw> ah alright
<mitchellvanw> but this code should just work fine?
<SeanTAllen> we've talked about creating a sandbox you can run locally but no one has taken that up yet. In that case, that could be loosened
<mitchellvanw> so, i think i have a firm grasp on the Actor model; how that's supposed to work. but i fail to see how i can implement Pony in any way
<mitchellvanw> let's say that
<mitchellvanw> i have beanstalk or rabbitmq running, on which I dispatched some events that were recorded in my system
<SeanTAllen> that code isnt correct but it isnt far off
<mitchellvanw> would pony listen to rabbitmq or would I have a pony app running as the backend that accepts https requests and
<mitchellvanw> handles, the validity of the incoming request, and persists these events to my storage?
<SeanTAllen> mitchellvanw: this is your code... https://gist.github.com/SeanTAllen/c8a5775133b7973662fc
<mitchellvanw> awesome, thank you
<SeanTAllen> mitchellvanw: you could do either. there's no rabbitmq library at the moment, you'd need to learn the C FFI to use the RMQ C Library
<SeanTAllen> there is http support but it was done as a proof of concept. we need to had some real http and other web development support as it turns out according to our community survey to be very popular amongst what people would want to use Pony for.
<SeanTAllen> Looking at beanstalk really quickly, you'd want to use one of the C libraries for connectivity OR you could write your own in Pony but starting with C might be easier.
<SeanTAllen> If you decide to do something like that, I'd suggest starting with writing some simple TCP code to learn how the event driven APIs in Pony work so you can replicate in beanstalk or RMQ. This blog post might help as an intro: http://www.monkeysnatchbanana.com/2015/12/13/deconstructing-a-pony-echo-server/
<mitchellvanw> great! thanks
<mitchellvanw> SeanTAllen people whom filled in that survey, did they specifically ask for a web framework or something like that?
<mitchellvanw> or, just better http support?
<SeanTAllen> planning on using for "web development"
<SeanTAllen> of which, Pony has no real support to speak of at this point in time
<mitchellvanw> this might be a stupid question, but where do you use Pony, SeanTAllen ?
<SeanTAllen> we are one of the few places currently using for commercial work. we
<SeanTAllen> we're building a streaming data processing system and surrounding tooling using Pony
lispmeister has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
copy` has joined #ponylang
Praetonus has joined #ponylang
TwoNotes has joined #ponylang
<SeanTAllen> For anyone looking for something to do this weekend, we have 13 "easy" issues currently open: https://github.com/ponylang/ponyc/issues?q=is%3Aopen+is%3Aissue+label%3Aeasy
lispmeister has joined #ponylang
jemc has joined #ponylang
lispmeister has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shepheb> doublec: no, I never solved the List[U8] iso thing
jemc has quit [Ping timeout: 244 seconds]
<shepheb> poking around there to see what's up.
<shepheb> is it viewpoint adaptation or something? like, List's _head and _tail are refs, so in an iso list they're tags and then it breaks?
<shepheb> since it's a doubly-linked list, the nodes can't be isos at all. I could make the list elements val, if needed. or I could use a different seq, I guess.
<TwoNotes> The list elements are not just your objects. There is a ListItem object that then points to your object.
<TwoNotes> And a trick is, once an iso is in the List, you can't refer to it at all! Because that is not allowed by 'iso'.
<shepheb> yeah
<TwoNotes> To actually do anything to the node, you have to remove it from th elist first.
<shepheb> I've worked around it by refactoring so that the list is private and can be a ref.
<TwoNotes> Being in the List effectively 'uses up' the one reference allowed by iso
<shepheb> I'm putting val values in, though
<shepheb> but I can't have an iso List itself, I guess. anyway, it's not blocking me, but it would certainly move me one rock of the vending machine closer to grokking reference caps
<shepheb> (using Haskell's tipping-over-a-vending-machine metaphor)
<TwoNotes> In my case I had to be careful to have all the fields in an object set before putting it in a List, so I did not have to refer to it directly.
<TwoNotes> And my List was destined to being sent to another actor, so it had to be somewhat restricted to meet the 'sendable' rules
lispmeister has joined #ponylang
lispmeister has quit [Client Quit]
emancu_ has quit [Remote host closed the connection]
emancu has joined #ponylang
emancu has quit [Ping timeout: 264 seconds]
<SeanTAllen> jeremyheiler: want contributor access to ponylang-mode?
<jeremyheiler> sure; i got more stuff cooking
<SeanTAllen> done!
<SeanTAllen> i haven't had time to figure out how do to automated emacs-mode tests. if you know how, it would be great to add some.
<jeremyheiler> thanks!
<jeremyheiler> the clojure emacs projects do this, i can look there to figure out how
<SeanTAllen> there's still a couple parsing issues as well with indentation and what not that i think would require using an actual parser to address...
<SeanTAllen> there's that new hotness that some emacs modes are using but, so far, i fixed enough of the pain that i'm not motivated to learn it. at the moment, i'm blanking on the name of it and i can't find in my bookmarks
<jeremyheiler> hmm
<jeremyheiler> would be happy to learn it
<SeanTAllen> try as i might, i cant think of the name
<jeremyheiler> lmk if it hits you
<jeremyheiler> do you have some examples of where it's weird?
<jeremyheiler> the indentation
<SeanTAllen> atm, no, its relatively rare at the point.
<SeanTAllen> i'm mention it the next time i come across
<SeanTAllen> i got it better than the sublime mode sylvanc did which was my primary aim at the time
<jeremyheiler> haha nice
<SeanTAllen> 203-212 were most of the hacks I but in to have it deal with indentation and not being aware of what came before
<SeanTAllen> there's a couple places where those dont cover everything but again, i can't remember exactly what you have to do to trigger them
<SeanTAllen> anything you do will usually be updated within an hour in melpa.
<jeremyheiler> ok cool
<jeremyheiler> oh, does melpa pull?
<SeanTAllen> yeah, its set up to pull from master
<SeanTAllen> looks like last one started 4 hours ago and the one before that took 5 hours
<SeanTAllen> the pony snippets and spacemacs layers are also set up to use melpa
<SeanTAllen> actual spacemacs layer isnt i still need to do that
<jeremyheiler> cool
<SeanTAllen> for flycheck, this never got addressed: https://github.com/rmloveland/flycheck-pony/issues/2 not user if rmloveland is maintaining at this point. i'll probably ping him about taking it over at some point.
<SeanTAllen> but i've been head down in work and pony documentation stuff
<jeremyheiler> nice, i'll def check that out.
<jeremyheiler> awesome thank you
<jeremyheiler> on this note, i was thinking about working on a ponyfmt
<jeremyheiler> doe anything exist yet?
<SeanTAllen> i dont believe it does. i'd ping pony+dev on that.
<jeremyheiler> ok
<jeremyheiler> do all ffi definitions begin with `use`?
<SeanTAllen> i'm not sure i understand
<SeanTAllen> @ is for ffi
<SeanTAllen> o you mean for declaring stuff ahead of time
<SeanTAllen> you dont have to do use @SOMETHING
<SeanTAllen> you can just @SOMETHING
<SeanTAllen> but use @SOMETHING is safer, more compiler help
<TwoNotes> The "use" makes sure you are consistent
emancu has joined #ponylang
<jeremyheiler> i am trying to decide how/if i should format ffi calls
<jeremyheiler> see how declarations are highlighted differently than references?
<jeremyheiler> format/highlight/
emancu has quit [Ping timeout: 240 seconds]
<jeremyheiler> meh, just kept it simple and highlighted all ffi the same, yet different then everything else
<TwoNotes> I am using the emacs ponylang-mode. It used to indent properly - now it doesnt. Do I have to do that tab-set thing each time?
<jeremyheiler> TwoNotes: the hook that's mentioned in teh readme?
<TwoNotes> yes, that's it
<jeremyheiler> i think so. for now, add it to your init
<TwoNotes> Hmm, I thought I did. Maybe I did it wrong. https://gist.github.com/pdtwonotes/800468cd95597ab97a23
<TwoNotes> I can't remember where I got that
<jeremyheiler> it's also in the readme
<jeremyheiler> what's not indenting properly?
<TwoNotes> I put in the simpler form that is in the Readme - trying it now
<SeanTAllen> nothing has ever fully worked with ponylang-mode and indenting
<SeanTAllen> but its pretty good.
<TwoNotes> Ah, it works much better now. It was not observing the "2 spaces" convention.
<SeanTAllen> o btw, jeremyheiler
<SeanTAllen> do you know how melpa updates stable release?
<SeanTAllen> if not i will explain
<jeremyheiler> i don't
<SeanTAllen> because push to master just updates dev
<SeanTAllen> so top of the .el file
<SeanTAllen> ;; Version: 0.0.1
<SeanTAllen> it uses that version
<jeremyheiler> oh nice
<SeanTAllen> to decide when to change stable
<SeanTAllen> but for sanity
<SeanTAllen> should also tag for same
<SeanTAllen> so anytime you feel good about changes, feel free to rev it
<jeremyheiler> sure
<jeremyheiler> will do, thanks!
<SeanTAllen> i guess now that it is more than 1 person, one of us when they have time, should document that
<jeremyheiler> ill probably do so onc ei'm happy with the highlighting changes
<SeanTAllen> all that meta info at the top is important to melpa so be careful changing it
<jeremyheiler> where do you think that doc should go?
<SeanTAllen> not sure.
<SeanTAllen> probably create a CONTRIBUTING.md and include other good bits
<jeremyheiler> makes sense
<SeanTAllen> my brain is fried for today
<SeanTAllen> i started hacking away at stuff around 7.
<SeanTAllen> no more Pony stuff for today say I (and then I suspect in a couple hours I'll start again anyway)
<jeremyheiler> haha
<jeremyheiler> it's hard tos top
<TwoNotes> yes
<TwoNotes> Be doing something else and you think, "Hey, I could do it like *this*...."
<jeremyheiler> or "oh this change will be quick, hold on"
<jeremyheiler> *hours later*
<TwoNotes> lol.
<TwoNotes> I make just a few changes at a time, then recompile.
<TwoNotes> Otherwise the errors cascade. You can get one little hting wrong and get 6 screenfulls of error messages
<jeremyheiler> haha yeah
<TwoNotes> As soon as it compiles, I do a backup
<SeanTAllen> i did that last night jeremyheiler, i start hacking away at a couple documentation things at 8 and then next thing i knew it was half past midnight
<SeanTAllen> i have to say, adding documentation to the StdLib is turning out to be a great way to learn the standard library. Who'd have thunk it.
<TwoNotes> I have been doing some UDP programming, and have had to look up all sorts of general Linux stuff to figure out how the functions work. Including digging into the ponyrt C code.
<SeanTAllen> I'm going tackle writing docs for "net" package probably next weekend
<SeanTAllen> Will definitely have the most docs of anything so far, which given I've done more with "net" than anything else, kind of makes sense
<TwoNotes> Like ferinstance, the UDPSocket.multicast_join function takes a String parameter. But of what?
<TwoNotes> Host order, or network order? Include port?
<TwoNotes> I think a breadth-first approach to the doc would be most helpful. Get a bit of something written for each function. Then add detail later.
<TwoNotes> It is not like I am new to UDP programming - Ive done it in Erlang. But the Pony API looks different
<TwoNotes> Some places want an IPAddress object; others want a String...
<jeremyheiler> heh. refinement is definitely an important step in getting to 1.0
<TwoNotes> So I have been converting back and forth from String/IPAddress. I need to get a socket's assigned address from a BIND, then change the low order 8 bits to 255 to get a multicast address. But you can't manipulate an IPAddress directly, so I have to convert it to s string, parse the string to find the right place, insert the 255, etc etc
<TwoNotes> In C I would do mcaddress = ipaddress | 0xFF000000 and be done
TwoNotes has quit [Quit: Leaving.]
<shepheb> doublec: I sidestepped it by refactoring so List[U8] ref would suffice
emancu has joined #ponylang
<shepheb> whoops
DanC_ has quit [Ping timeout: 260 seconds]
Praetonus has quit [Quit: Leaving]
shepheb has quit [Read error: Connection reset by peer]
shepheb has joined #ponylang
<shepheb> is there a parser tool for Pony?
<jeremyheiler> not that i know of, but i am interesting building one
<shepheb> if not, I've got experience building a simple parser combinator library
<shepheb> that is, in-language, rather than a yacc-ish generator.
Guest62470 has quit [Read error: Connection reset by peer]
<jeremyheiler> i was either going to go that route, or implement a peg
<shepheb> if you were about to do that, go for it. if not, I'm idling on my laptop while watching TV.
<jeremyheiler> heh, don't let me stop you
<jeremyheiler> i am thinking about building a ponyfmt right now... and i would build a parser to parser the output of `pony --ast` if i don't implement it as part of ponyc
<doublec> shepheb: lists of unique things can be difficult. I had similar issues in ATS with linear types.