lyagushka has quit [Remote host closed the connection]
lyagushka has joined #ponylang
lyagushka has quit [Client Quit]
<runehog>
speaking of other languages, today I learned about Go's automatic testing of example code in docstrings and drooled a bit
<doublec>
That's nifty
Praetonus has quit [Quit: Leaving]
c355e3b has quit [Quit: Connection closed for inactivity]
Dyserna_ has joined #ponylang
Dyserna__ has quit [Ping timeout: 250 seconds]
montanonic has quit [Ping timeout: 244 seconds]
montanonic has joined #ponylang
jemc has quit [Ping timeout: 250 seconds]
montanonic has quit [Ping timeout: 244 seconds]
montanonic has joined #ponylang
Matthias247 has joined #ponylang
tm-exa has joined #ponylang
tm-exa has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
montanonic has quit [Ping timeout: 276 seconds]
tm-exa has joined #ponylang
tphilipp has joined #ponylang
tphilipp has quit [Client Quit]
<malthe>
sylvanc: what's going on with the causality.io website
<malthe>
looks super weird
<sjums>
malthe, looks like some kind of monitoring/debugging tool?
Matthias247 has quit [Read error: Connection reset by peer]
gsteed has joined #ponylang
<doublec>
Looks like results of a port scanner
k0nsl has quit [Ping timeout: 240 seconds]
k0nsl has joined #ponylang
k0nsl has quit [Changing host]
k0nsl has joined #ponylang
catears has joined #ponylang
<catears>
Hi, I just tried out the pony-lang, looks awesome. But I unfortunately stumbled upon a runtime segmentation fault, where I expected there to be none. I wanted to come by here to see if someone could help me replicate it, before going to github and making issues about it. code: http://pastebin.com/PcnUc8TR
<catears>
*an issue (not several issues -.-)
<catears>
Compiling works fine, but when I run it with 'program 1:2' it crashes
<doublec>
catears: what version of ponyc are yo using?
<catears>
0.2.1-1064-gf333878 [debug]
<catears>
appears when I run 'ponyc -v'
<catears>
I also run on Ubuntu 16.04, if that is relevant
<doublec>
catears: is the segfault running the program, or compiling it?
<catears>
it is when I run the program, it compiles fine
<doublec>
catears: it runs fine on 0.2.1-1047-gf9e68b3 [release]
<doublec>
catears: I'll test a later version now
<catears>
but I have to run it with 1:2 as argument for it to happen
<doublec>
oh
<doublec>
ok, I get a segfault with that
* doublec
looks
<catears>
I assumed that it was somewhere in split() or how I used the value I got from split(), but I am too new to the language to actually look into it ;)
<catears>
Oh, perhaps I should also say, I replaced all the tuples "(a, b)" with "return (a, b)" (code: http://pastebin.com/6kewuZYP) and I no longer get the seg fault
<doublec>
I'm assuming a bug in 'split'
<doublec>
I seem to recall some recent changes there
* doublec
moves to a commit before those changes
<doublec>
heh, before those changes there was no split
<catears>
hah, well then there was no bug then ;)
<doublec>
hehe
<catears>
Should I make an issue on github about this? Do you want me to add something along the lines "doublec on IRC managed to replicate it"?
<doublec>
catears: yeah, that sounds like a good idea
<catears>
That is actually similar to what I started out with. At first I thought it was a problem with the match statement
<doublec>
btw I'm using printf for debugging because env.out is an actor and I wanted to remove that interaction as a source of the error
<doublec>
Not as a general "You should use printf" :)
tm-exa has joined #ponylang
<doublec>
plus it's a useful cheat to avoid hacking 'env' in places to debug crashes
<catears>
yeah, I realized quickly that accesing stdout was a bit tedious if you had to access it through env.out all the time
<catears>
"How do they debug in this language?" ;)
<doublec>
There is a debug logging thing but I never remember how to use it
<doublec>
It lets you have logging appear in programs compiled with debug only
<catears>
okay, I skimmed the logger package before, perhaps I should look a bit more into it when I have the time :)
<doublec>
Ah, it's: use "debug"
<doublec>
Then: Debug.out("foo")
<doublec>
See packages/debug/debug.pony
<catears>
thanks =)
<doublec>
I managed to get an illegal instruction error with a variation of the code
<doublec>
I pasted to your issue
<doublec>
catears: nice find for your first encounter with pony :)
<catears>
Yeah, save the comment. Thanks =)
<catears>
saw*, not save -.-
catears has quit [Ping timeout: 264 seconds]
<lisael>
oO this debug thing is awesome!!
TwoNotes has joined #ponylang
wizeman has quit [Quit: Connection closed for inactivity]
otremblay has joined #ponylang
<otremblay>
Hi, I was wondering if there was any code completion tool available for ponylang?
<otremblay>
Also other question: is it more appropriate to just say Pony? --> s/ponylang/Pony
<Candle>
otremblay: I haven't *seen* any IDE integration yet. I've been looking into getting some *vague* form of package management working.
gsteed has quit [Quit: Leaving]
<otremblay>
Candle: Full disclosure, I come from Go-land, where they have "gocode", which basically allows easy integration for most development environments. https://github.com/nsf/gocode
<otremblay>
Unless I'm mistaken, this is used by a good few integrations
jemc has joined #ponylang
gsteed has joined #ponylang
Praetonus has joined #ponylang
amclain has joined #ponylang
TwoNotes has quit [Quit: Leaving.]
jtfmumm- has quit [Ping timeout: 240 seconds]
Goba has joined #ponylang
<Goba>
i dont see the point of ponylang when we have rust already
<Goba>
why do i need actors? i mean golang has actors too..so...
<otremblay>
I'm not sure I can tell whether this is trollspeach or not.
<Goba>
ok golang has goroutines, which are very similar to actors
<otremblay>
New to Pony but still: I'm guessing that it has different guarantees than either Rust or Go.
<otremblay>
I think the difference is in the design; while you can probably achieve the same in either Rust or Go, Pony is explicitly designed for actors.
<otremblay>
There was something I read about mathematical proof on the site, I didn't get there yet in the tutorial (if it's at all mentioned).
<otremblay>
Furthermore, there's no null.
<otremblay>
Don't know rust much, I was under the impression that it does have nulls.
<Goba>
not really, it has Option with can be None
<Goba>
i dont really see the difference but whatever
<jemc>
one distinct advantage of Pony's guarantees is the causal message ordering
<jemc>
another advantage is the per-actor garbage collection (with no stop-the-world step, just stop-the-actor)
<Goba>
ok but what if im just writing a normal program that doesnt use threads/actors
<jemc>
Goba: then you can look at Pony as something competing more with a language like C++
<Goba>
but c++ doesnt need a GC
<otremblay>
No, but you have to manage that part on your own.
<Goba>
a GC will always be slower than no GC..
<jemc>
Goba: that's not really true - if you're managing your own memory its entirely possible that you're doing it in a really suboptimal way
<otremblay>
And/or wrong.
<otremblay>
(I'd do it wrong.)
<jemc>
for example, you could be doing a `malloc` call for every new object, instead of managing slabs, etc
<jemc>
that would be far worse performance than any well-tuned GC
<jemc>
automatic memory management was created in part because humans have a hard time manually managing memory in an optimal way - and even when they are able to do so, it often detracts from the maintainability of their program
tm-exa has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Perelandric has joined #ponylang
<jemc>
anyway Goba, I don't know if it's your intention or not, but your attitude is indeed coming across somewhat troll-y - so you may find that folks are unwilling to play along for very long if you don't show some interest, good-faith, and/or intellectual curiosity about Pony
<Goba>
your responses are very typical, nothing you said is new to me
<jemc>
put another way, if you can't start to see the benefits of Pony from the arguments and material you've already come across, you may not be in the target user base anyway, and we're happy to let you use another language that you think is more useful to you
<jemc>
in terms of our time and effort, we get huge payoffs from helping interested folks learn and become part of the community, while we get very little payoff for trying to sell someone on Pony who doesn't get why it's useful to them
<Goba>
but you havent explained WHY i should care about actors
<Goba>
why are actors a big deal
<Goba>
it seems that is the main selling point of ponylang but it never mentions how that is a good feature or why
<Goba>
rust also says that it prevents most data races
<SeanTAllen>
Goba: we have a respectful community here. You are very close to getting kicked by me. If you want to have a real discussion that's fine but at the moment you are acting like a bit of an ass.
<jemc>
actors are not a very new concept, and certainly not uniquer to pony - there's plenty of reading material out there for the curious
<jemc>
I have a day job and I don't have time to explain things to you that are easily googlable when you haven't said anything that convinces me you really want to listen to what I have to say
<Goba>
ok i get it now, actors are like async in c#
<SeanTAllen>
No. They aren't.
<SeanTAllen>
Message passing is asynchronous but there's more to actors than that.
<Goba>
ok i just read that actors dont require their own threads? so i could have 50 actors and they all run on the same thread?
<SeanTAllen>
That's a scheduler issue
<SeanTAllen>
Most actor systems will have a scheduler thread per cpu
<SeanTAllen>
Actors are then run by a scheduler
<SeanTAllen>
So you can have massive concurrency with a small number of threads
<Goba>
ok what i meant is that actors dont have to run in parallel or concurrently? or do they?
<SeanTAllen>
Actors run when scheduled. They are scheduled when they have work to do.
<Goba>
actor.run(); actor.run();, do these calls necessarily go into the scheduler or can i say "hey, this is an actor but i dont need it to run on a thread"
<SeanTAllen>
You never call "run"
<SeanTAllen>
You create an actor. It will be scheduled when it has work.
<otremblay>
Typically when you pass it a message, unless I'm mistaken
<SeanTAllen>
Or an async io event occurs
<jemc>
otremblay: right, a message is the basic unit of work for an actor
<jemc>
though as SeanTAllen points out, sometimes a message will be sent from the underlying async io engine
<Goba>
ok i get it
<Goba>
ok but the main advantage of that kind of programming is.. code quality by isolation right?
<otremblay>
Also data races
<SeanTAllen>
There's a lot of literature about the advantages of actor models
<SeanTAllen>
Anything I put here would be a gross simplification
<otremblay>
Now I feel bad. :P
<SeanTAllen>
There is also plenty of literature critical of the actor model
<Goba>
that seems like a big promise "If your program compiles, it won't crash"
<SeanTAllen>
So long as you don't do anything nasty w c ffi and we don't have implementation issues, that is true
<SeanTAllen>
At the moment we have known implementation issues
<SeanTAllen>
So while the type system can guarantee that, we can't from an implementation standpoint because we have bugs
<otremblay>
In the gotcha's I've read a portion about memory allocation in a long-running actor; how does Pony react to allocating when there's no memory left?
<Praetonus>
otremblay: Currently, it calls abort
<otremblay>
( I know it's said "don't do that", it's also said that it's a common question :P)
<otremblay>
Meaning, it kills the actor?
<Praetonus>
It kills the whole program. It's the C function abort
<Goba>
it's the same for all languages though
<Goba>
java also just crashes
<otremblay>
I'm aware of that; I was just wondering if it would try something clever.
tm-exa has joined #ponylang
<otremblay>
In Erlang I think your supervisor would just restart the app
<SeanTAllen>
Clever is never a good idea
<SeanTAllen>
That's not true otremblay
<SeanTAllen>
Erlang supervisors restart actors not Beam
<otremblay>
I will therefore stop thinking that. Also, makes sense.
<SeanTAllen>
If BEAM crashes, the actors can be restarted elsewhere but you need to restart the VM
<SeanTAllen>
BEAM crashes are rare. Erlang is pretty rock solid tech.
<SeanTAllen>
We have a ways to go to catch them.
<SeanTAllen>
20+ years of development is good for stability
<SeanTAllen>
Or can be anyway
<Goba>
what if i do all my programming in a single actor? then i will have a stop the world GC right
<jemc>
regarding "if your program compiles, it won't crash" - this is more oriented toward unhandled exceptions - in Pony there are no unhandled exceptions, which is a type system guarantee
<jemc>
there could be implementation flaws that cause crashes, or OOM crashes (which can't really be avoided once that condition is reached)
<otremblay>
I was trying to find a case of exception where out-of-memory would be recovered by killing a subprocess, can't think of any. Doesn't strike me as an especially good idea, now that I think about it, because there's no guarantee that an allocation would be made in a memory-hungry thread/subprocess/actor/goroutine/application
<SeanTAllen>
Goba: you wouldn't do that.
<SeanTAllen>
Not for any non trivial application
<jemc>
otremblay: actually, in Pony, we could detect which actors have the biggest heaps and "get rid" of those, but the problem is that you would wreck some of the other guarantees if you go around destroying actors in the program - there are other actors which might be depending on those
<SeanTAllen>
If that's your use case, you shouldn't be using an actor language
<Goba>
so ponylang is best used for writing databases and http webservers and stuff like that?
<otremblay>
jemc: I'm most comfortable in Go, and there's no scenario I can see where killing off memory-hungry goroutines by memory usage would be a good idea in case of memory-leakage.
<SeanTAllen>
If you don't have concurrency problems then you don't want to use an actor language
<jemc>
otremblay: right, so in my opinion what Pony needs is some easy-to-use memory-oriented instrumentation / telemetry, so you can quickly detect and diagnose over-consumption of memory in your program, and make code or other operational changes to improve those problems
<jemc>
maybe SeanTAllen has some good ideas about this, since he and his colleagues have been doing a lot of work in the area of maximizing performance of a Pony application
<SeanTAllen>
I have some half baked ideas
montanonic has joined #ponylang
graaff has joined #ponylang
<Goba>
sounds like ponylang simply doesnt GC anything until the actor is done
<Goba>
since everything is an actor, it sounds like a simple form of malloc/free where free() is called on everything on actor exit
<Praetonus>
There are "classic" objects too
<Praetonus>
Actors do GC between messages when their heap size is above a given threshold
Matthias247 has joined #ponylang
<jemc>
Goba: that's definitely not a correct summary - if you made the same extrapolation in a language that has a single global GC, you would be saying that all objects are allocated at the same time before the program starts running, and all objects are freed at the same time at the end of the program - in other words, the GC would never run and it would not be a GC'd system
<Goba>
"Garbage collection is never attempted on any actor while it is executing a behavior" - ponylang docs
<SeanTAllen>
Again Goba: if you don't have concurrency, then an actor model language is not the right tool
<Goba>
well there is always some kind of concurrency, even in a GUI. you can add some concurrently updating stuff, fetching from db.. etc
<jemc>
Goba: the quote you cited has nothing to do with "actor exit", and it *definitely* has nothing to do with the distinction between a garbage collector and per-object malloc/free
<otremblay>
Actors don'd do work unless they receive a message; your quote means garbage collection is performed between the end of a "job" and the reception of another message, while other actors are performing their work. As such, actors don't stop executing mid-"job" so that GC can execute
<otremblay>
That's my understanding anyway.
<jemc>
otremblay: yes, that's right - that's what the quote described, and that's how it works in the current implementation of pony
<jemc>
there's been some discussion about whether or not it would be useful to allow some mid-behaviour GC (perhaps with a higher threshold), but the general advice is to restructure your program to avoid long-running behaviours
<jemc>
(which has other benefits as well, including freeing up the scheduler thread to do other work)
runehog has quit [Remote host closed the connection]
Goba_ has joined #ponylang
Goba has quit [Ping timeout: 264 seconds]
runehog has joined #ponylang
k0nsl has quit [Ping timeout: 264 seconds]
k0nsl has joined #ponylang
k0nsl has quit [Ping timeout: 250 seconds]
k0nsl has joined #ponylang
graaff has quit [Quit: Leaving]
moldy has joined #ponylang
<moldy>
hi
eom has joined #ponylang
<jemc>
hello, moldy
eom has quit [Quit: Leaving]
srp has joined #ponylang
k0nsl has quit [Ping timeout: 244 seconds]
srp has quit [Client Quit]
sylvp has joined #ponylang
<moldy>
i am having a look at the tutorial, i'm on debian jessie
<moldy>
i'd rather not install pcre2 in that way (writing stuff to /usr is bad)
<moldy>
is there an alternative? i took a guess and installed apertium-pcre2, skipped the pcre step from the tutorial, and the hello world thing is working ;)
k0nsl has joined #ponylang
<Praetonus>
moldy: You only need pcre if you're using the regex package
sylvp has quit [Client Quit]
<moldy>
Praetonus: hmm, ok.
<moldy>
is there a better (ideally, non-root) way to make it work?
psylvain has joined #ponylang
k0nsl has quit [Ping timeout: 244 seconds]
<Praetonus>
You can install the library locally and supply its location to ponyc with the --path flag. This flag indicates where to look for packages and libraries
<moldy>
Praetonus: ahh, thanks
k0nsl has joined #ponylang
TwoNotes has joined #ponylang
prettyvanilla has joined #ponylang
prettyvanilla_ has quit [Ping timeout: 264 seconds]
<doublec>
Smalltalk being an exotic platform specific or application specific language for example
Matthias247 has quit [Read error: Connection reset by peer]
<SeanTAllen>
That was a thing
<doublec>
I bit my tongue and jid my keyboard on " I see no reason to add a specific tag for some brony language that hasn’t had any traction lately anyway."
<doublec>
s/jid/hid/
<SeanTAllen>
¯\_(ツ)_/¯
* doublec
goes back to coding
<mankyKitty>
ignore the haters, stay awesome. :p
runehog has quit [Remote host closed the connection]