mvzink has quit [Quit: A merry Christmas to all, and to all a good night!]
mvzink has joined #ponylang
montanonic has joined #ponylang
beatyfulmind has joined #ponylang
<beatyfulmind>
Hi all
<beatyfulmind>
does pony support distributed actors?
<SeanTAllen>
beatyfulmind: currently only concurrent support, sylvanc started work on distributed pony but other things have come up so its moving along slower than we had hoped for but it will eventually arrive.
<beatyfulmind>
@SeanTAlien thanks for the input, will keep an eye on that
beatyfulmind has quit [Quit: Page closed]
unbalanced has joined #ponylang
mvzink has quit [Quit: A merry Christmas to all, and to all a good night!]
mrkishi has quit [Read error: Connection reset by peer]
mvzink has joined #ponylang
mrkishi has joined #ponylang
mvzink has quit [Quit: A merry Christmas to all, and to all a good night!]
mcguire has quit [Ping timeout: 248 seconds]
mvzink has joined #ponylang
pyon has quit [Remote host closed the connection]
pyon has joined #ponylang
jemc has joined #ponylang
mrkishi has quit [Ping timeout: 255 seconds]
mvzink has quit [Quit: A merry Christmas to all, and to all a good night!]
jemc has quit [Ping timeout: 244 seconds]
montanonic has quit [Ping timeout: 255 seconds]
unbalanced has quit [Quit: WeeChat 1.5]
jemc has joined #ponylang
jemc has quit [Ping timeout: 240 seconds]
montanonic has joined #ponylang
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ponylang
avsej has quit [Ping timeout: 244 seconds]
Corwin has quit [Ping timeout: 244 seconds]
Corwin has joined #ponylang
avsej has joined #ponylang
avsej has joined #ponylang
avsej has quit [Changing host]
TonyLo has joined #ponylang
montanonic has quit [Ping timeout: 240 seconds]
<TonyLo>
Hi, can't find any info on how recursion is handled - does Pony use tail call optimisation?
<malthe>
TonyLo: yes, it should (unless using ponyc -d which disables optimizations).
<TonyLo>
great, thx
<malthe>
but it's not documented as far as I can tell :-(
<TonyLo>
yes, I noticed that :)
<malthe>
where would it be appropriate to mention it
<malthe>
maybe a fib example somewhere can briefly comment on it
<TonyLo>
for me it would have been useful to mention it in the tutorial where the recursive funtion is used to calculate the fib series
<Candle>
malthe: is it worth saying that it is disabled with -d ? or is that too much info for the tutorial?
<Candle>
I'm sure that's going to bite someone at some point!
montanonic has joined #ponylang
<TonyLo>
malthe: better, my view on -d is that it is too much info for the tutorial
montanonic has quit [Ping timeout: 265 seconds]
_andre has joined #ponylang
TwoNotes has joined #ponylang
trapped has joined #ponylang
TwoNotes has quit [Quit: Leaving.]
<TonyLo>
Hi, finally managed to compile ponyc on Windows 10 with VS 2015, all tests run ok but when I try and compile the helloworld program it fails. ponyc
<TonyLo>
returns: error buitlin: couldn't locate this path
<TonyLo>
I am running ponyc in the helloworld dir with no args. If I run it with -v I get: 0.3.2-fatal: Not a git repository (or any of the parent directories): .git [release] (llvm 3.7.1)
<TonyLo>
help appreciated
<TonyLo>
Does it have to run in a git repo?
mrkishi has joined #ponylang
<avsej>
is it possible to get docstring inside the function which described by this string? I'm trying to follow advice in usage() function here http://www.ponylang.org/ponyc/options--index/
<avsej>
ah, it just mean to use """ instead of concatenation. nvm
jemc has joined #ponylang
Praetonus has joined #ponylang
pyon has quit [Quit: goddammit emacs]
<SeanTAllen>
@TonyLo no that is a bug in Makefile
<SeanTAllen>
it tries to get the commit that it was created from
<SeanTAllen>
but it isnt accoutning for that
<SeanTAllen>
that happened when the binary was built
pyon has joined #ponylang
<TonyLo>
just discovered that, thx - I moved the files from their build directory
<TonyLo>
I copied the contents of the Release directory to \ponyc which caused the issue - if I use the path to the release dir it works fine but not from \ponyc
mcguire has joined #ponylang
amclain has joined #ponylang
graaff has joined #ponylang
runehog has quit [Remote host closed the connection]
<TonyLo>
Perelandric: yes, windows 10 - quick work :)
irx[m] has joined #ponylang
runehog has joined #ponylang
runehog has quit [Remote host closed the connection]
runehog has joined #ponylang
Perelandric has quit [Ping timeout: 240 seconds]
polypus74 has quit [Remote host closed the connection]
runehog_ has joined #ponylang
runehog has quit [Ping timeout: 276 seconds]
<malthe>
jemc: updated the patch; not sure how to express that in the review system.
TonyLo_afk has joined #ponylang
<malthe>
am I blind or is there no action to say that you've responded to review comments?
<malthe>
Candle: I guess if you use -d then there could be a big warning in the compiler output (maybe there already is).
<malthe>
but it's kind of funky that debug-mode disabled TCO if you really truly rely on it.
TonyLo has quit [Ping timeout: 244 seconds]
<malthe>
perhaps this is part of the reason why some argue against tail call optimization in the first place.
TonyLo_afk is now known as TonyLo
<jemc>
malthe: there's no explicit action in GitHub to say that you've updated in response to a review, but I do get a notification in GitHub that a PR I've commented on has been changed
<jemc>
malthe: Candle: it's an interesting question that gets a bit philosophical about whether TCO is considered a language feature, or just an optimization
<M-Ingo>
Can anyone tell me how I can get this ( https://gist.github.com/IngoHohmann/210acde186860c06075ea31395ee9fcb ) to compile? I know there's a problem with capabilities, but I have no idea how to get this right. (It's partly copied from restful-client, and partly done myself. The idea is to have several classes / actors working together.)
<SeanTAllen>
what that is saying is that conn is a tag. aka an opaque reference, in this case, to an actor. you can't call a fun getUrl through a tag
<SeanTAllen>
`fun getUrl` requires a box.
<SeanTAllen>
with a tag, the only thing you can call is `fun tag` functions and far more commonly, behaviours.
<SeanTAllen>
your `fun getUrl` returns no data, what you want is a behavior...
<SeanTAllen>
so like 26 becomes: be getUrl( url: URL) =>
<SeanTAllen>
and now, your code compiles
<SeanTAllen>
if any of the explanation is unclear, let me know and I'll explain further. I'm pretty busy today so if I don't respond quickly, drop me a line via email.
runehog_ has quit [Remote host closed the connection]
runehog has joined #ponylang
<M-Ingo>
It is, but give me some time to consume it.
<M-Ingo>
But, is this close to the way you had written it, or am I completely off track here?
graaff has quit [Quit: Leaving]
Matthias247 has joined #ponylang
<SeanTAllen>
i didnt really look at the logic, just dropped it in for compiling and fixed the errors.
<SeanTAllen>
i havent used the http code yet, so, not sure how i would do it
montanonic has joined #ponylang
<irx[m]>
OK, thanks, then I'll just trod along and see where it leads me.
<SeanTAllen>
irx[m]: are you the user formerly known as M-Ingo ?
<M-Ingo>
Ah, sorry, yes.
<M-Ingo>
Split personality :-)
montanonic has quit [Ping timeout: 240 seconds]
<avsej>
I have signature "int pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf);" and I'm trying to translate it to use statement
<avsej>
use @pcap_findalldevs[Int](alldevsp: Pointer[Pointer[_pcap_if_t]], errbuf: Pointer[U8])
<avsej>
but how I would define pcap_if_t structure?
<avsej>
it starts from lowercase, but I cannot define alias like this
montanonic has joined #ponylang
<avsej>
and is it possible to declare alias for struct which has pointer to itself?
<avsej>
struct pcap_if {
<avsej>
char *description;
<avsej>
char *name;
<avsej>
struct pcap_if *next;
<avsej>
struct pcap_addr *addresses;
<avsej>
bpf_u_int32 flags;
<avsej>
};
<avsej>
like this one
trapped has quit [Read error: Connection reset by peer]
shepheb has quit [Quit: Lost terminal]
_andre has quit [Quit: leaving]
<avsej>
so it seems like uppercase version works like this PcapIf
mrkishi_ has joined #ponylang
<doublec>
avsej: did you solve your struct issue?
<avsej>
no, still solving
mrkishi has quit [Ping timeout: 272 seconds]
<avsej>
I'm going to use pony struct
<avsej>
but can I just use some tag/opaque for 'addresses' member?
<avsej>
doublec, is it safe to use Pointer[U8] for char *?
<avsej>
and I32 for int
amclain has quit [Quit: Leaving]
<doublec>
avsej: yes, Pointer[U8] for char*
<doublec>
For addresses, create a primitive for pcap_addr and use Pointer[Pcap_addr] or whatever you call it
<jemc>
so `var foo = Foo.create(); addressof foo` will pass a `foo_t **`
<avsej>
addressof? okay
<jemc>
well, in your case I don't think that's the right solution
<jemc>
if I understand the C API you're trying to use, then you want something like `var first_dev = PcapIf`, then pass `addressof first_dev` as your parameter
<jemc>
your `alldevsp` parameter, that is
<jemc>
since `first_dev` is already a `pcap_if_t *` so taking the `addressof` it gives you a `pcap_if_t **`
<avsej>
but signature does not match in this case, I have to change use statement also
<doublec>
Mainly because I didn't know what might happen changing the actual pointer value to a 'var' from C and if it'd confuse pony, so making it a MaybePointer to be explicit.
<avsej>
i'm curious why there is 'end' for if, while, for, but does not for actor, class, fun, be?
montanonic has quit [Ping timeout: 276 seconds]
<jemc>
avsej: I wasn't involved in the original grammar planning for Pony, but as I understand it's simply because they aren't needed
<avsej>
initially I thought it is python-like with indentation
<avsej>
but then realized it is even better
<jemc>
all of the keywords allowed at the "declarative level" of a pony program are not allowed at the "imperative level"
<jemc>
those aren't official canonical terms in the grammar, just terms I came up with on the spot to describe the concepts
<jemc>
basically, whenever you see `fun` or `be`, it must be the end of the previous method or behaviour and start of a new one
<jemc>
similarly, whenever you see `class`, `primitive`, `struct`, `actor`, or `type`, it must be the end of the current type declaration and start of a new one
<jemc>
with the imperative-level block keywords, there is no such "context switch", so without an end-marker there is ambiguity about whether the next expression should be nested under the previous keyword's block or not
<lisael>
I wonder why the indented blocks of python are not used in new grammars, I love them
<lisael>
it's harder to parse, though
<jemc>
lisael: I think the coffeescript syntax is a pretty compelling and beautiful application of the indentation-sensitive grammar ideas popularized by python
<jemc>
but I know some people absolutely hate coffeescript and find it hard to grok
montanonic has joined #ponylang
<lisael>
typing savings aside, the best feature of indentation-sensitive grammar is that if you're far from the edge, you're too deeply nested
<lisael>
you can't say you did not realized.
<lisael>
is there a process to discuss about what has to be included in the stdlib in pony? I mean something more global than a RFC.
<doublec>
lisael: the mailing list I think
<doublec>
Is there a way to get the size of a pony struct? Something like C's sizeof?
<jemc>
lisael: you mean, like, defining the criteria for what belongs or doesn't belong in the standard library?
<lisael>
yes
<lisael>
when I look into packages/ I see a bunch of stuff without apparent coherence or direction (no critics here, I understand it's just young)
<jemc>
discussing on the mailng list could be a good starting point, though I think an RFC could be used for this kind of "meta" purpose
<Praetonus>
doublec: We don't have a thing like sizeof
<Praetonus>
Do you think it would be useful?
<jemc>
lisael: we have a variety of opinions across the community (and even across the core team) about what the scope of the stdlib should be
<jemc>
we've had some discussions about things like this in the past
<doublec>
Praetonus: it's useful for determining if the size of the Pony struct matches that of the C struct to see if errors were made in the definition
<jemc>
I tend to come down on the side of a stdlib being much more minimal (encouraging other packages to be third-party), while others adhere to a more "batteries included" philosophy
<doublec>
Praetonus: also useful for structs where a member needs to be set to the size of the struct - Some windows APIs use this.
<jemc>
Praetonus: doublec: I think a Pony-level sizeof would be nice, if such a thing is feasible
<lisael>
jemc: I come from python an I like the batterie included philosophy
<doublec>
I of the "standard libraries are where code goes to die" philosophy
<SeanTAllen>
lisael: pony dev mailing list.
<Praetonus>
I see. Implementing that would be trivial. However, I've been thinking of an addition to Pony that could cover this kind of cases and basically allow "importing" a struct definition from C. I really have to make a RFC about that
<doublec>
That is, once it's in the standard library, it's very hard to add features or try new approaches.
<jemc>
lisael: I do a lot of ruby for my day job - ruby has a batteries-included philosophy, but the batteries are like cheap knock-offs that come without a full charge and everyone ends up using their own batteries anyway
<SeanTAllen>
doublec: when its in the standard library, you can be fairly sure that no one is going to change something you have running in production out from underneath you
<lisael>
SeanTAllen: thank you for the link
<lisael>
I think that a fairly complete stdlib is a big plus for a new language and a burden for an aged one.
<lisael>
ocaml main criticism is about its minimal stdlib
<lisael>
python on the other side has a huge stdlib that no one uses
<lisael>
and that has to be maintained,
<doublec>
SeanTAllen: with a good package manager you could lock to the version you want and have the same peace of mind. And aren't exposed to standard library changes as the pony library is evolved.
<doublec>
But I definitely see there are multiple sides to the question and my thoughts are entirely likely to be suboptimal for most standard use cases.
<doublec>
I also don't like "cargo/cabal/package-manager-of-choice dependency hell" either so I'm torn
<SeanTAllen>
i'm firmly in the robust standard library camp.
<SeanTAllen>
one day jemc and i will have to thunderdome it out
<doublec>
haha
<jemc>
to be clear I like a robust standard library too - I'm just of the opinion that having a bigger standard library is an opposing force in that struggle for robustness
<jemc>
also, in terms of keeping your production dependencies safe and locked - I think third party packages are actually more useful in this respect - you can update ponyc (the compiler) to get a compiler bug fix without also having to update an API change on one of the packages
<jemc>
separate versioning of packages from the compiler is what gives you the flexibility to keep the dep locked while you upgrade the compiler
<lisael>
this can be achieved by maintaining the packages in a separate project
<SeanTAllen>
ill say this... if you have a library and you want to maintain control of its API, dont open an RFC to get included in the stdlib.
<lisael>
there's the same kind of question regarding the standardisation of APIs
<jemc>
lisael: that's certainly a good argument for community control of and collaboration over that interface, though I'd say that community control doesn't necessarily equal standard library :P
<jemc>
that is, through free association, database library implementers can collaborate on a common interface spec that they together treat as a standard
<jemc>
or, more broadly, the "official" channel of the ponylang org doesn't have to be the only conduit for community collaboration
<lisael>
agreed.
<jemc>
what you said earlier about young langs vs mature langs may hold some truth, in that it might be harder for a smaller community to "find space" for collaboration without "official" facilitation
<jemc>
I think my opinions also might be significantly influenced by my heavily anti-authoritarian political views :P
<lisael>
haha :D
<SeanTAllen>
i've NEVER thought that jemc
<SeanTAllen>
NEVER
<SeanTAllen>
not once
polypus74 has joined #ponylang
<polypus74>
"heavily anti-authoritarian political views", hear hear
<SeanTAllen>
let's keep on topic for a programming language channel though and not get into politics
<jemc>
polypus74: you must have been listening to the NSA alert system, to have joined right after that comment :D
<doublec>
Don't pony's run in packs with a leader :)
<polypus74>
:)
<jemc>
when pony reaches 1.0 will it become a stallion?
<SeanTAllen>
only if you get "i want a stallion" accepted into common parlance