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
NhanH has quit [Ping timeout: 264 seconds]
ericbmerritt has quit [Ping timeout: 250 seconds]
adamkittelson has quit [Ping timeout: 250 seconds]
bbhoss has quit [Ping timeout: 264 seconds]
adamkittelson has joined #ponylang
ericbmerritt has joined #ponylang
bbhoss has joined #ponylang
NhanH has joined #ponylang
c355e3b has quit [Quit: Connection closed for inactivity]
mcguire1 has left #ponylang [#ponylang]
mcguire has left #ponylang [#ponylang]
<emilbayes> Coming from a ducktyped, dynamic langauge, how do you deal with runtime input in a strongly typed language such as Pony? Concretely I'm thinking query parameters in HTTP. Is it just as I'm used to, that you write out a whole bunch of validation by hand or can you leverage the type system in some way? I guess not, since that functionality is lost when
<emilbayes> compiled?
<doublec> emilbayes: generally you'd parse the query parameters into some typed structure to help you verify things
<emilbayes> doublec: You can do that at runtime? Maybe I'm misunderstanding how pony is compiled
<doublec> emilbayes: In typed languages there are things you can do to track at compile time the general state of runtime things
<emilbayes> doublec: Arr ok, I thought all the checking was lost once the program was compiled
<doublec> emilbayes: that's a lot of what the 'value dependent types' work is - tracking array sizes, a runtime value, at compile time.
<emilbayes> doublec: Yeah, with the compile time expressions?
<doublec> emilbayes: some of that, yeah
<doublec> emilbayes: even without that, phantom types can let you do things like track state information in types
<doublec> emilbayes: here's some rust examples https://bluishcoder.co.nz/2013/08/15/phantom_types_in_rust.html
<emilbayes> doublec: Thanks, will have a read!
<emilbayes> doublec: That was exactly what I needed. Thank you. There are so many new concepts and patterns to learn when you have types
<doublec> emilbayes: yes, lots of cool things can be done. Especially with dependent types.
<doublec> emilbayes: here's another language for example that uses types to make C FFI much safer: https://bluishcoder.co.nz/2012/08/30/safer-handling-of-c-memory-in-ats.html
<doublec> emilbayes: skip to the conclusion to see what safety it provides
<emilbayes> doublec: Alright! Have seen ATS mentioned in regards to Higher Order ASTs, but don't know more about it than that
<doublec> emilbayes: I'm a big fan of ATS - it's quite low level though. It has no GC and type safe pointer handling. Things that require 'unsafe' in Rust can be done in safe code.
<doublec> The downside is it is quite verbose and requires a fair amount of annotations in functions.
<emilbayes> doublec: How do the ecosystems around strongly typed languages usually play out in practise? It seems that you're much more at the mercy of the module/library author and their use of the correct abstractions than in something weak such as Javascript
<doublec> emilbayes: yes, that's true. You're very much constrained by how the module author designed things.
<doublec> emilbayes: I'm also a dynamic type fan. I have great mental battles over what to use sometimes :)
<emilbayes> doublec: Haha, I can already see that in the horizon too
<doublec> emilbayes: I like Oz and Self as examples of dynamic languages.
<doublec> emilbayes: And Lisp
<doublec> I tinker with semi abandoned languages a bit, hence Oz and Self.
<emilbayes> haha was just about to say
<emilbayes> Lots of obscure languages I've barely heard about
<doublec> I like bits off all of them. I like the Self development environment where you are programming with live objects.
<doublec> I like Oz's logic, dataflow and distributed programming model
<doublec> I like ATS types
<doublec> Pony concurrency
<doublec> I need a weird merge of them all
<doublec> Pony seems like a good mix of what I like to program in at least
<emilbayes> Oz sounds interesting
<doublec> it is - it's used as the language for the examples in https://mitpress.mit.edu/books/concepts-techniques-and-models-computer-programming
<doublec> which is a great book
<doublec> Sadly the main implementation did a rewrite for the next version which seems to have stalled
<doublec> So people stopped using the current version because the rewrite was coming along and people aren't using the new version because it's not finished
<emilbayes> Oh, so it kinda died?
<doublec> I prefer "in a holding pattern" - the older implementations are still usable to explore ideas - but yeah, seems mostly dead.
<emilbayes> Hmm,.. I'll have a look at that book. Maybe I can find a PDF online
<doublec> emilbayes: there's a PDF of a pre-release draft around
dynarr has quit [Quit: A merry Christmas to all, and to all a good night!]
<njbartlett> Hi, I asked the following question on the mailing list but it kind of got lost in the noise:...
<njbartlett> Is there a Pony language spec? One of the presentations I’ve seen suggests that it exists but I haven’t found it yet. Otherwise it seems like the tutorial is the canonical source of information (or… the compiler source?)
<doublec> njbartlett: I have not seen one
<doublec> njbartlett: there are papers that describe it in detail but nothing I'd call a spec
<njbartlett> doublec: Thanks, do you have a link to any of those papers?
<doublec> njbartlett: the fast/cheap one particularly
<doublec> njbartlett: or the opsla one
<njbartlett> doublec: Thanks… slight typo in your URL, here’s the correct URL for others: https://github.com/ponylang/ponylang.github.io/tree/master/media/papers
<doublec> oops, not sure how the 'a' got there
<njbartlett> I wonder if there would be interest in writing a spec… maybe this should be an RFC
<doublec> njbartlett: there's still a bunch of change going on. Value dependent types to be merged, distributed model, etc.
<njbartlett> doublec: Yes I’m sure, so the spec would leave those sections TBD until the 1.0 release of the compiler. There’s plenty of other language features that seem quite stable.
<doublec> njbartlett: I'm sure it'd be useful - the pony devs tend to be around here a couple of hours from now.
<njbartlett> doublec: Yeah they’re on UK time? I’m usually in UK but currently in Japan
<doublec> njbartlett: I think they are, yes
skanur has joined #ponylang
<skanur> Hello. I'm going through the tutorial section of Pony and I've stumped by recurring use of this word "receiver". Who's a receiver? A function? object? behaviour? argument of a fun or be?
<skanur> Nevermind, I did a ctrl+F :)
<skanur> and found it being well defined
skanur has quit [Quit: Leaving]
skanur has joined #ponylang
moldy has left #ponylang [#ponylang]
montanonic has quit [Ping timeout: 265 seconds]
_andre has joined #ponylang
njbartlett has quit [Quit: njbartlett]
jtfmumm- has joined #ponylang
emil_ has joined #ponylang
emil_ has left #ponylang [#ponylang]
c355e3b has joined #ponylang
njbartlett has joined #ponylang
vrand has joined #ponylang
M-hrjet has quit [Remote host closed the connection]
srenatus[m] has quit [Remote host closed the connection]
srenatus[m] has joined #ponylang
skanur has quit [Ping timeout: 255 seconds]
M-hrjet has joined #ponylang
skanur has joined #ponylang
SilverKey has joined #ponylang
runehog has quit [Remote host closed the connection]
njbartlett has quit [Quit: njbartlett]
Praetonus has joined #ponylang
SilverKey has quit [Read error: Connection reset by peer]
amclain has joined #ponylang
vrand has quit [Quit: Leaving.]
graaff has joined #ponylang
runehog has joined #ponylang
runehog has quit [Ping timeout: 244 seconds]
TwoNotes has joined #ponylang
<TwoNotes> Release .3.0 *might* have fixed issue #1000. Still testing.
<SeanTAllen> that would be cool. also, long time to see TwoNotes
<TwoNotes> Yeah, I had put things on the back burner until this SegVio problem got fixed. This release seemed to have enough gc fixes that is was worth testig again
<TwoNotes> I had a similar problem maby years ago on the DEC Bliss compiler. We finally had to have the memory allocation/free code write a log file to find the problem
skanur has quit [Quit: Leaving]
<TwoNotes> Turned out the same chunk was getting freed twice
<TwoNotes> We added a lot of defensive code to the memory pool mechanism
<TwoNotes> Issue 1000 would turn up almost immediately in the speech in/out code. Unfortunately this is a VERY complicated program and it was impossible to narrow down a test case
<TwoNotes> So far it has not crashed. I will engage more modules gradually to exercise more code paths and see what happens
<TwoNotes> Woops. Just crashed as soon as I turned on the 'trace' function, which prints out messages moving over the UDP interface. Well, that's a clue
runehog has joined #ponylang
runehog_ has joined #ponylang
runehog has quit [Read error: Connection reset by peer]
<TwoNotes> WHat we did back then was, add a "magic value" just before every malloced block. (Soo malloc actually grabbed 4 bytes more than requested) Then checked for that value being there on 'free' calls. This was all under conditional compilation of course
<TwoNotes> Could also add "asserts" at any point to check that any suspicous pointer still had its magic value in place. If not, the pointer was probably bad
graaff has quit [Quit: Leaving]
<TwoNotes> Nope/. Problem is still there
_andre has quit [Quit: leaving]
TwoNotes has quit [Quit: Leaving.]
mytrile has joined #ponylang
vrand has joined #ponylang
TwoNotes has joined #ponylang
montanonic has joined #ponylang
<TwoNotes> I am putting assertions into the scheduler and actor modules to check validity of actor pointers. For now I use a test that the pointer value must be greater than 0x1000.
<TwoNotes> The hope it to catch the bad pointer earlier, perhaps as it gets pulled off a queue, or 'stolen'
<TwoNotes> Would the probablility of a scheduler stealing an actor increase if I reduce the thread count?
<SeanTAllen> what does your trace function do?
<TwoNotes> Just prints JSON messages to stdout
<SeanTAllen> can you gist the code?
<TwoNotes> It might not be related to that. I suspect a timing thing. It does not happen all the time
<TwoNotes> The tracing code is just calls to Debug.out("Rcv:" + s) where 's' is a String
<TwoNotes> Just look for references to '_tracing'
<SeanTAllen> thakns
<TwoNotes> Keep in mind, I have only seen this problem on ARM, not on x86_64. That might be significant
montanonic has quit [Ping timeout: 255 seconds]
<SeanTAllen> and we never did an official 64 bit ARM port. Just 32 bit. You are on 64 bit right?
<TwoNotes> ARM is in 32b mode
<TwoNotes> Both machines have 4 CPU cores. The x86_64 is quite a bit faster
<TwoNotes> The ARM hardware is an Rpi3, which I think is actually 64b, but the Arch Linux I have on there only runs in 32b mode. I think
runehog_ has quit [Ping timeout: 244 seconds]
montanonic has joined #ponylang
<TwoNotes> Ah, no ARM is an armv7l, which is 32b hardware
jemc has joined #ponylang
jemc_ has joined #ponylang
jemc has quit [Ping timeout: 260 seconds]
jemc_ has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
thorsten_ has joined #ponylang
thorsten_ has quit [Client Quit]
thorsten_ has joined #ponylang
thorsten_ is now known as thorstenb
thorstenb has left #ponylang [#ponylang]
TwoNotes has quit [Quit: Leaving.]
vrand has quit [Quit: Leaving.]
runehog has joined #ponylang
toblux has joined #ponylang
mytrile has quit [Quit: Connection closed for inactivity]
montanonic has quit [Ping timeout: 260 seconds]
montanonic has joined #ponylang
toblux has quit []
Praetonus has quit [Quit: Leaving]