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
amclain has quit [Quit: Leaving]
<cquinn> Hey all. Now that we have a nice cli library, I am thinking about getting back into working on the package manager we were discussing a while back. Having a real tool to flesh out the missing bits of the cli, plus adding some functionality to what we have with stable.
<cquinn> I have sketched out a rough design in a google doc here: https://docs.google.com/document/d/1c7puEQLks3X1wpabuXxox8Qi1HUhfSwhobUvmVE56Rw/edit#
<jemc> cquinn: speaking broadly, and at first glance, what you've laid out seems to make sense as a good next evolution for pony-stable
<cquinn> oh good, thanks for looking
<jemc> that last point in your document is definitely a sticky one, and I think it requires some more thought
<jemc> > Since Stable (and Corral) include all the package roots in a flat list in PONYPATH, it seems that the package name space is thus global for a project
<jemc> I feel like this is a root problem in the strategy of only setting `PONYPATH` to point to a package bundle
<jemc> in that I can't depend on two bundles that have the same package name inside them
<cquinn> yeah, I deduced that as I worked out all of the models of the different dep managers
<jemc> I think there's two overall paths that might make sense to mitigate that (without changing anything in ponyc to accomodate)
<cquinn> one option I thought of is the symlink farm to select the desired subset of packages
<cquinn> but the bundles might have trouble with that themselves
<jemc> yeah, I was about to say that both options boil down to the idea that the dep manager needs to "think" in terms of packages, not bundles
<cquinn> yes
<jemc> in that I need to specify which packages from which bundles I want to use, not just which bundles
<cquinn> exactly. that's why I added a package list to the project file. for that package->bundle mapping
<jemc> and possibly set up an aliasing system, so I have a way to include packages that have the same name?
<cquinn> interesting, yes. Go tools do that for forked or cached packages
<jemc> hm, maybe the "way out" is that the pony source needs to `use "bundlename/packagename"` instead of just `use "packagename"`
<cquinn> but I wonder if in Pony we might run into trouble if we start aliasing packages, how will packages within a bundle fine each other?
<jemc> within a bundle, you'd always want to use relative paths, I think
<cquinn> oh, that might work if we kept bundlename simple and not contain full location information
<jemc> hm, but we'd still have problems if I depend on two different bundles, who each depend on a bundle that they gave the same `bundlename`
<jemc> that is, if I depend on bundles A and B, and they each have a bundle that they call `c`, but they are different bundles, they all end up in the same global PONYPATH namespace...
<cquinn> we could allow aliasing of the bundlename part though
<cquinn> ah, ponyc would have to know about that
<cquinn> I think if we want to be completely flexible and handle all cases, we will need to make adjustments to ponyc
<jemc> right, I'm not sure we can totally avoid these problems without extra support from ponyc - which I was trying to avoid, but as long as we keep it very general and not tied up with the specifics of `stable` / `corral`, I think it would be okay
<cquinn> exactly. I'll think about that some more in my noodlings
<jemc> I wonder if PONYPATH could be made to accept a special path format such as `@/.corral/whatever`, where the `@/subdir` implies: "starting from the directory of the package being compiled, go up one dir at a time until you find the given subdir"
<jemc> then we give each bundle its own `.corral` subdir, and ponyc will use the right `.corral` for that particular bundle when compiling source files from a package in that bundle
<jemc> I think that would solve our problems of each bundle needing to have its own "namespace" for fetched packages, that doesn't pollute other bundles
<cquinn> I think I follow that
<cquinn> that could still be laid out with symlinks I think
<jemc> sorry, are you saying symlinks are compatible with that idea, or that symlinks make it so you don't need that idea?
<cquinn> I think they are compatible
<jemc> right, okay
<jemc> well, roll that around the old idea-mill, and we can discuss more later
<cquinn> ok, will do
<jemc> for now I've got carpentry to do :P
<jemc> (trying to build a bed frame for the new bed we bought before my inlaws arrive for a visit at the end of the week :yey:)
<cquinn> ha. good luck!
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
obadz has quit [Ping timeout: 240 seconds]
obadz has joined #ponylang
nyarum has joined #ponylang
endforma1 has joined #ponylang
endformationage has quit [Ping timeout: 276 seconds]
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 240 seconds]
endforma1 has quit [Quit: WeeChat 1.7]
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 255 seconds]
jemc has quit [Ping timeout: 246 seconds]
jemc has joined #ponylang
papey_lap has joined #ponylang
<cquinn> @jemc I think I just derived a solution that I think is the same as what you where saying above with the @ notation. Now I get it :)
jemc has quit [Ping timeout: 276 seconds]
vaninwagen has joined #ponylang
Matthias247 has joined #ponylang
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 276 seconds]
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 276 seconds]
_andre has joined #ponylang
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 276 seconds]
vaninwagen has quit [Ping timeout: 260 seconds]
jemc has joined #ponylang
papey_lap has quit [Quit: WeeChat 1.8]
joncfoo has joined #ponylang
aav has quit []
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
aav has joined #ponylang
endformationage has joined #ponylang
shelajev has joined #ponylang
nyarum has quit []
Matthias247_ has joined #ponylang
Matthias247 has quit [Ping timeout: 276 seconds]
amclain has joined #ponylang
aav has quit []
Matthias247_ has quit [Read error: Connection reset by peer]
<adam_> Performance question. I modified examples/httpget to connect to a server that delivers a stream data. Even if I don't do anything at all with the data, CPU usage jumps around in the 4% to 10%. What is going on here?
<adam_> Actual amount of data received is small, couple of hundred bytes a second
<adam_> Sorry, nothing to do with http. Running the example from https://stdlib.ponylang.org/time-Timer/#timer also uses the same amount of CPU
shelajev has quit [Remote host closed the connection]
shelajev has joined #ponylang
<adam_> Running same timer on a much less powerful (and single-core) cloud instance uses only 2-3% CPU.
<adam_> But in any-case, I would expect this to use a non-measurable amount of processing
shelajev has quit [Ping timeout: 276 seconds]
<adam_> It used over 8 seconds of time to count to 42!
joncfoo has quit [Ping timeout: 258 seconds]
joncfoo has joined #ponylang
shelajev has joined #ponylang
<adam_> One thread is sitting in epoll_wait, from ponyint_asio_backend_dispatch, presumably the timer. The others in nanosleep from ponyint_cpu_core_pause.
<jemc> adam_: you can reduce CPU usage for timers by increasing the "slop" of the timer
<jemc> adam_: also, in the past we have had some issues with "waiting" using more CPU than necessary on some platforms - what platform are you running on?
<jemc> it looks like there's an open issue on OSX - https://github.com/ponylang/ponyc/issues/1787
<adam_> jemc - ubuntu 16.04
<adam_> jemc - I could change slop for timer to fix this instance, but I also see it in the httpget example, I'd have to dig through the library code for that to ensloppen timers everywhere too
shelajev has quit []
Praetonus has joined #ponylang
<jemc> in the issue ticket I linked to there was talk of a global runtime-level tweak option for this kind of thing
Matthias247 has joined #ponylang
vaninwagen has joined #ponylang
_andre has quit [Quit: leaving]
Praetonus has quit [Ping timeout: 260 seconds]
Praetonus has joined #ponylang
<adam_> jemc - I see that, but agree with SeanTAllen about it potentially appearing as black-magic, certainly it is to me. P
<adam_> Pony needs a better default here. I know nothing about scheduling, so I'm loath to modify the C code myself just to "fix" it for myself
<jemc> I think it's hard to know what the right default is - if we made it significantly "sloppier", we'd probably have people complaining about poor timer precision
<adam_> From the linked discussion, it seems the current version relied on nanosleep(0) taking longer than an instant. It seems this doesn't apply on OS X, or Ubuntu 16.04, so though it worked before, it was accidental. The sensible default would be however many micro-seconds it takes on those systems that don't display such high CPU usage.
<adam_> If people want nanosecond timers, then that could be a dial to twiddle, but I suspect that most don't, but will notice high CPU
<jemc> seems like a reasonable PR if you wanted to file it, though maybe check with SeanTAllen about it, because he's more plugged into this issue than I am
vaninwagen has quit [Ping timeout: 276 seconds]
vaninwagen has joined #ponylang
Praetonus has quit [Quit: Leaving]
jemc has quit [Ping timeout: 276 seconds]
vaninwagen has quit [Ping timeout: 240 seconds]
Matthias247 has quit [Read error: Connection reset by peer]
<SeanTAllen> I'm not in favor of that PR. I'd need convincing.
<SeanTAllen> "That PR" being a change to default slop.
<SeanTAllen> I'm not against it either. I am dubious.
<SeanTAllen> I'd like to have a better understanding of the reasoning.
joncfoo has quit [Ping timeout: 276 seconds]