<< 10-08-2014 >>

00:00:44AraqJehan_: do you know why actors.nim is so slow? I never looked into it, cause it's crap either way
00:01:10Jehan_Araq: No idea, I've never looked at it.
00:01:33Jehan_Do you have an example that shows it being slow or is that just an impression?
00:01:49Araqwell I benchmarked it against threads+channels once and it's like gradha says
00:02:11Araqgot some speedup of 1.8 on a 4 core machine
00:02:41Araqand with threads+channels close to factor 4
00:02:48Jehan_There's honestly a lot that can go wrong.
00:03:20Jehan_For example, it's pretty easy to write actor code that doesn't actually exploit all cores if actors sit idle a lot of the time.
00:03:56Jehan_Write an actor system that simulates a token ring, as an extreme case, and you'll never get a speedup.
00:04:20Jehan_Excessive blocking can also be a problem.
00:04:41Araqwell according to gradha it's all in the 'sync'
00:04:54Araqwhich seems unrealistic
00:05:18Araqalso I don't know if he profiled it properly / at all
00:06:02Jehan_Hmm. Also, if each actor only executes short fragments of code, execution will be dominated by message passing overhead.
00:07:24Araqyeah well all this "light weight" concurrency doesn't make much sense to me
00:08:40*Boscop quit (Read error: Connection reset by peer)
00:08:47*flaviu joined #nimrod
00:08:56Araqit's not "light weight" on the hardware level and most PCs out there still have 4 cores or less
00:08:57*brson joined #nimrod
00:09:05*Boscop joined #nimrod
00:09:16Jehan_Yup.
00:09:58Jehan_It's really not possible with current hardware to efficiently break execution up in very small concurrent slices, except with compiler support.
00:10:06*superfunc quit (Ping timeout: 260 seconds)
00:10:37Araqnot sure what a compiler can do here
00:11:16Araqmost compilers are handicapped because there is no execution cost analysis anywhere
00:11:35flaviujust looking to learn here, what you consider lightweight concurrency/which model do you prefer?
00:11:52Araqand when functions are often block boxes, how can a compiler do any kind of cost analysis?
00:12:00Araq*black boxes
00:13:29*brson quit (Client Quit)
00:13:37*brson joined #nimrod
00:15:32Jehan_Araq: It requires language support, too. Something like what, e.g., ParaSail does.
00:20:59Araqflaviu: usually a simple fork&join parallelism at the top level is enough to keep all the cores busy
00:21:32Araqyou don't have to introduce micro parellelism everywhere and fight with its complexities
00:21:43Araqit depends on the domain of course
00:22:08Araqbut I never had problems to use all the cores on a server
00:22:41Araqwhich you don't want to do anyway, usually it also runs other important things as well
00:23:36Jehan_You also run into composability problems, which is another reason why fine-grained parallelism can be problematic.
00:25:20Araqor let's look at it this way:
00:25:47Araqsay Mozilla re-implements Firefox in Rust and it runs good on your smart phone
00:26:12Araqand since it scales perfectly the browser is 16 times faster on your home PC
00:26:43Araqso ...
00:27:00Araqthis either means it's too slow on phone
00:27:23Araqor you don't notice the 16x speedup on your PC at all
00:27:38Araqbecause it would be more than fast enough either way
00:28:23AraqIMO this means they spend a lot of effort for nothing
00:31:49Jehan_Araq: That's a special case, though.
00:32:57Jehan_And you can argue that it allows for, e.g., web apps that aren't really targeted at phone/tablet users.
00:33:24Araqyeah I guess
00:34:42Araqfor web apps the JS stack is most important though
00:35:32Araqwhich is 1 component, you don't excessive parallelism everywhere to make it "scale"
00:35:39Araq*don't need
00:46:47Jehan_Again, web browsers are really a special case.
00:47:05Jehan_An important special case, but 99.99% of the world won't develop a web browser.
00:47:49Jehan_Parallelism is pretty much always important for server-side stuff, HPC, and can be pretty important for desktop applications.
00:48:01Jehan_Oh, and I finally saw gradha's post and wrote an answer.
00:48:16Araqflaviu: in general I don't think this "small actors that communicate via message passing" is a good way to do software engineering. This means Smalltalk-like OO, Erlang-like FP or microkernels in OS design are all misguided. The resulting systems are too hard to debug and reason about. Feel free to disagree.
00:48:16Jehan_TLDR version: parallelizing os.sleep is an exercise in futility.
00:48:40Araqah lol
00:49:23Jehan_Araq: I know Erlang programmers who'd disagree, though arguably that's because of Erlang's superior VM.
00:51:44Araqlet me guess: the erlang debugger gives you a global view over the system state ;-)
00:52:30flaviuMy problem is that I want more-fine-grained than just top-level parallelism like you originally said, but I don't want to deal with shared memory
00:53:02flaviuI do like the idea of channels
00:53:28Araqbut you do want to deal with shared memory:
00:54:00Araqmerge(sort(a[0..x]), sort(a[x+1.. a.high]))
00:54:14*saml_ joined #nimrod
00:54:47Jehan_Erlang doesn't have shared memory.
00:55:12Jehan_It has really, really lightweight processes so that you can emulate shared memory via cheap RPC.
00:55:21AraqI didn't mean to imply that
00:55:55Araqit also has a builtin database for shared memory
00:57:40AraqJehan_: well there is definitely a problem with the actors' implementation
00:58:00Jehan_Araq: I wouldn't be surprised, I haven't had a close look at it.
00:58:35Jehan_However, running gradha's example with a real worker thread did utilize all cores on my machine and seemed to have a reasonable speedup.
01:00:05Araqoh? with the actors module? ok then
01:02:22Jehan_Araq: Yeah.
01:03:04Jehan_I can't tell if there aren't perhaps more subtle problems or how efficient the message passing is without further investigation, though.
01:03:14*Trustable quit (Quit: Leaving)
01:06:11Jehan_Araq: Is there a way to specialize generic implementations for entire type classes?
01:07:01AraqI don't think so
01:07:18Araqbut I never played with type classes tbh
01:08:34Jehan_I'm really mostly interested in having specialized implementations for all TSignedInt or such.
01:08:48Araqcan you please run tests\parallel\tinvalid_array_bounds.nim ?
01:09:01Jehan_With what version? devel?
01:09:20Araqyeah, any version is fine
01:10:29Jehan_I get a compile error.
01:10:38Jehan_tests/parallel/tinvalid_array_bounds.nim(16, 14) Error: (0)..(15) not disjoint from (i)..(i)
01:10:49Araqok I get the same
01:11:34Jehan_Specialized implementations: I can do overloading for each individual integral type, but that's a bit cumbersome.
01:11:52Araqyeah well we'll get it
01:11:54Jehan_And doesn't allow me to do one for enums.
01:12:05Jehan_It's nothing that's terribly critical.
01:12:33Jehan_I need it to optimize serialization for common cases.
01:12:53Jehan_where I can also use a `when` clause most of the time so far.
01:13:23Araqok gotcha
01:13:53Araqdamn ... why does it never say "can prove: i + 1 > 30"
01:14:32AraqI surely implemented that, why else would I have written this test?
01:14:49Jehan_Heh. :)
01:15:03Araqpretty impressive though
01:15:23Araqa[i]; a[i+1] is a valid sequence when you inc i, 2
01:16:06Araqthe compiler complains when you do inc(i)
01:22:44NimBotAraq/Nimrod devel 18ded6c Andreas Rumpf [+41 ±146 -4]: Merge pull request #1363 from Araq/devel... 2 more lines
01:22:44NimBotAraq/Nimrod devel 76011e4 Araq [+1 ±4 -0]: progress on 'spawn'
01:22:44NimBotAraq/Nimrod devel 86b654c Araq [+0 ±0 -0]: Merge branch 'master' of https://github.com/Araq/Nimrod into devel
01:22:44NimBotAraq/Nimrod devel 037d7e4 Araq [+1 ±9 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
01:23:03Araqgood night
01:23:21VarriountGood night.
01:33:34*EXetoC quit (Quit: WeeChat 0.4.3)
01:50:30*Jehan_ quit (Quit: Leaving)
02:24:18*bogen left #nimrod (#nimrod)
02:25:01*bogen joined #nimrod
02:40:08*q66 quit (Quit: Leaving)
03:24:45*gsingh93 joined #nimrod
04:01:46*saml_ quit (Ping timeout: 255 seconds)
04:23:49*flaviu quit (Ping timeout: 260 seconds)
04:28:19*brson quit (Quit: leaving)
05:06:42*superfunc joined #nimrod
05:22:38*bogen left #nimrod (#nimrod)
05:50:25*superfunc quit (Ping timeout: 244 seconds)
06:19:41*gsingh93 quit (Quit: Connection closed for inactivity)
08:00:16*superfunc joined #nimrod
08:06:00*skyfex joined #nimrod
08:38:52*kunev joined #nimrod
08:38:58*zahary joined #nimrod
08:48:31*zahary quit (Quit: Leaving.)
08:50:39dom96good morning
09:06:33*Matthias247 joined #nimrod
09:09:09dom96yay, forum is still alive.
09:41:57*superfunc quit (Ping timeout: 245 seconds)
09:43:35*Francisco joined #nimrod
09:45:58*Fr4n quit (Ping timeout: 260 seconds)
09:54:32NimBotdom96/jester new-async 9e44471 Dominik Picheta [+0 ±1 -0]: Changes for new URI parser.
09:55:54NimBotAraq/Nimrod devel eb6ac2a Dominik Picheta [+0 ±1 -0]: Asynchttpserver now uses new uri module for URL parsing.
09:55:54NimBotAraq/Nimrod devel 8b08e98 Dominik Picheta [+1 ±6 -0]: Merge branch 'devel' of github.com:Araq/Nimrod into devel
10:29:01Araqhi dom96 ... so what's missing for 0.9.6 from your point of view?
10:29:15dom96async files
10:29:25dom96async irc,ftpclient,scgi .. etc
10:29:53Araqwell no, that are features
10:30:09Araqwe need some bugfix release
10:30:27Araqmaybe we should name it 0.9.4.2 ?
10:30:34dom96well then we shouldn't call it 0.9.6 I don't think
10:30:56dom96yeah, maybe
10:31:43dom96You will need to add a 'MinorMinorVersion' constant to system.nim though lol
10:39:57NimBotAraq/Nimrod devel ef2f377 Dominik Picheta [+0 ±4 -0]: Added SafeDisconn for accept.
10:41:04dom96I think it would be nice to get all modules to use the new async stuff
10:41:23dom96then we can release 0.9.6
10:41:37dom96Getting that done shouldn't take too long.
10:41:46dom96Also async db modules
10:41:49Araqmuhaha
10:41:57dom96and varriount needs to finish his file monitoring module
10:42:06Araq"shouldn't take long" ... yeah I've heard this before
10:42:15dom96lol
10:42:31dom96It shouldn't take long as long as I don't hit any bad bugs :P
10:42:40dom96if I do then we can just give up lol
10:42:55Araqok fair enough
10:45:05Araqany objections with breaking code and doing declared vs defined ?
10:46:00dom96no, do it.
10:46:12Araqok, will write forum post about it though
10:46:28dom96alright
10:49:44*EXetoC joined #nimrod
10:50:13Araqdom96: the db_* modules need to be designed differently
10:50:25Araqthe string based data typing doesn't work properly
10:50:51AraqI think we need dbj_* modules that use JSON instead of strings
10:51:29dom96argh, too much work lol
10:51:41Araqno, it's easy
10:57:33Araqmeh this is stupid, I'll introduce a deprecation warning
11:01:00dom96Do you think the async* naming convention is fine? or should I put all these async module into a 'async' directory?
11:01:04dom96*modules
11:02:27Araqno idea, I guess the longish names are annoying
11:02:51Araqdo we keep non async versions around?
11:03:07Araqif so what should be the default?
11:05:12*kunev quit (Ping timeout: 272 seconds)
11:07:09dom96the default?
11:07:16dom96We have net and asyncnet for example.
11:07:29dom96sync should be default I think
11:07:38dom96as in it shouldn't have a prefix
11:28:34NimBotAraq/Nimrod devel a2ec3c9 Dominik Picheta [+0 ±2 -0]: Fix asyncnet example. Rearrange net code.
11:31:56Araqok then you can't really use a directory unless it's not in the path
11:32:20Araqcurrently every subdir ends up in path for convenience
11:32:47dom96Yeah, it's not in the path though right?
11:33:05dom96lib/async doesn't exist so why would would it be in the path
11:33:48Araqcause we add it?
11:34:08dom96just leave it out of the path
11:34:09Araqso this is the first time we require users import async.ftpclient
11:34:14dom96yeah
11:34:19Araqmeh :P
11:34:32*Araq is reminded of .NET
11:34:59Araqbut ok, let's do it
11:35:02dom96I think it's sexy :P
11:35:06dom96and most people will too
11:35:08Araqpeople love dots
11:35:25dom96I prefer import async/ftpclient
11:35:26dom96:P
11:35:38dom96that is still supported right?
11:35:45Araqright
11:35:49Araqbut thinking about it
11:36:04Araqyour approach has a serious drawback, I think
11:36:12dom96what is that?
11:36:19Araqonce we move async.ftpclient into its babel package
11:36:42dom96what
11:36:43Araqand then we have multiple babel packages that should all end up in "async", perhaps
11:36:56dom96you mean a dummy .babel file?
11:37:04Araqno, a real babel package
11:37:21dom96so you want to get rid of these from the stdlib?
11:37:47Araqyeah because their development speed is different from the compiler's
11:38:11dom96I disagree.
11:38:20Araqthey are definitely part of the "batteries included" though
11:39:09dom96Even so, if there are multiple babel packages with an async dir in them it will work.
11:39:39dom96It only makes sense to put these modules in a babel package if they are still in development though.
11:40:15dom96I guess that is technically the case.
11:40:23dom96But the base of them is stable.
11:40:31dom96There is nothing experimental about them.
11:41:08dom96I just need to expose some generic FTP stuff in the sync ftpclient
11:41:30dom96Rewrite some stuff to use it, and reuse the code in the async version but add some awaits in there :P
11:42:17Araqok fine, whatever
11:42:39dom96Should asyncdispatch be in the async dir too?
11:42:42dom96I guess it should.
11:42:56Araqand now the fun happens
11:43:10Araqasync.asyncdispatch?
11:43:12dom96or perhaps I should just call it async :P
11:43:19Araqasync.dispatch?
11:43:25Araqasync.async ?
11:43:45Araqstd.array.Array ?
11:43:55Araq(D style)
11:43:57dom96will the compiler get confused if there is a module by the name of 'async' and a dir by the name of 'async'?
11:44:00Araq( D style)
11:44:20AraqI don't think so but that doesn't mean it's a good idea
11:45:07Araqio.async.async # now we're talking
11:45:08dom96async.core :P
11:45:25Araqas opposed to non IO async ... :P
11:45:38dom96ugh, stop being silly
11:45:51dom96It's a waste of time.
11:45:56Araqasync.core is pretty cool
11:46:05Araqgo for it
11:46:08dom96good
11:46:18Araqbut async.dispatch is fine too I think
11:46:35dom96core is shorter and describes it better
11:47:17dom96and is the reverse of what clojure calls it lol
11:50:17dom96hrm, what is system/inclrtl?
11:50:25dom96and why is it included in asyncdispatch?
11:51:56Araqthat provides the .rtl pragma
11:52:05Araqwhich is used for DLL generation
11:52:13Araqdunno if asyncdispatch uses it
11:54:55dom96hrm, to import the sync net module I have to write 'import "../net"'
11:55:07dom96That sounds like it could bring problems when disambiguating.
11:56:21dom96Araq: Shall I continue?
11:57:10Araqno, why do you need to import ../net ?
11:57:21Araqthat shouldn't be necessary if net is in the path
11:58:01dom96yes, but the async net is in the same dir as the other modules.
11:58:06dom96So it thinks that I want to import it
11:59:13Araqugh, don't do it then
11:59:40dom96:(
11:59:40Araqconfusing&sexy is worse than ugly&working
12:00:27dom96Would it be hard to implement a "import blah as B" syntax?
12:00:40Araqit's already implemented
12:01:37dom96well then there is no problem
12:01:42dom96when was this implemented?
12:01:54Araq0.9.4 has it
12:02:29Araqbut net vs async.net is meh
12:02:37dom96why?
12:02:57AraqI think it's confusing :P
12:03:05dom96What's confusing about it?
12:03:29dom96oh... bah.
12:03:29Araqasync.core needs net, not async.net
12:03:42Araqthat doesn't feel right
12:03:48dom96Why does importing async.net mean that the module name will be net in the code?
12:04:19Araqbecause the compiler has no notion of a "directory" within nimrod code
12:04:35Araqit's simply not a concept in the language
12:04:41dom96Well...
12:04:52Araqthe compiler is concerned with *modules*
12:04:53dom96This means that everyone will need to use the 'as' stuff
12:05:05dom96Consider changing this.
12:05:08dom96Please
12:05:27Araqno, it's quite some work and it doesn't make any sense
12:06:02dom96Why doesn't it make sense?
12:06:58dom96Regarding the fact that async.core needs net. Well... net contains basic socket functionality.
12:07:07dom96async.net builds on top of async.core
12:07:15dom96so async.core shouldn't import it
12:09:19Araqmeh fine I don't care
12:09:25AraqC# here we come
12:10:13dom96No. If you don't want it this way then tell me.
12:10:19Araqso if I do
12:10:22dom96Otherwise you will blame me later for any small issues that arise.
12:10:29Araqimport async.net
12:10:34Araqcan you do
12:10:38Araqnet.foo(bar)?
12:10:45Araqor can you only do
12:10:55Araqasync.net.foo(bar)?
12:11:06dom96Only the latter.
12:11:18Araqand if I do
12:11:23Araqimport async/net
12:11:32Araqthen it's net.foo ?
12:12:51dom96no
12:12:54dom96it's still the same
12:13:07Araqand if I do import net and have async in path?
12:13:55dom96error
12:14:07dom96if lib/pure is also in the path that is
12:14:32Araqthis breaks everything
12:15:20Araqand improves nothing
12:17:03*darkf quit (Quit: Leaving)
12:17:09Araqgah, I really hate this obsession with dots and hierarchies and directories
12:17:18dom96how so?
12:17:32Araqdirectories suck, there is not a single tool that handles them conveniently
12:18:11Araqthe order is wrong, I think file.io.stdlib, and not stdlib.io.file
12:18:27dom96I think you're exaggerating a bit, unless I am unaware that when I import a module there are two modules with the same name and the compiler does some magic to determine which one to pick
12:21:17Araqin my opinion filesystems that don't support arbitrary nesting are a feature
12:22:42Araqanyway, consider it a vote against an async/ directory
12:35:24dom96ok, let's see what other people vote :P
12:45:02*EXetoC quit (Quit: WeeChat 0.4.3)
13:07:57*q66 joined #nimrod
13:18:45*n3t joined #nimrod
13:26:10dom96hello n3t
13:27:10n3tHi.
13:41:05Araqn3t: welcome
13:41:53n3tHello. Nice people on IRC channel. It is pretty uncommon ;)
14:19:01Araqdom96: ping
14:36:36*flaviu joined #nimrod
14:37:11Araqhey flaviu
14:37:21flaviuhi Araq
14:37:31AraqI'm wondering if having to keep a whitelist for 'defined' is acceptable
14:38:09flaviu'defined'?
14:38:44Araqso somewhere there would be list like [release, debug, ssl, useWinAnsi, booting, ...] and then the compiler can check there is no typo in 'defined(boting)'
14:42:16flaviuOh, I see. It'd be best if the defined whitelist could also modified by the use. Maybe when the user passes `--defined:foo`, it could add `foo` to the witelist
14:43:34flaviuThat's assuming that you're using something a bit more complex than string comparison here though.
14:49:30Araqhmm good idea
14:49:41Araqwe already have --define and --undefine
14:50:21dom96Araq: sup?
14:51:44Araqdom96: read the logs please
14:51:48Araqit's about defined
14:52:13dom96I think we should make adding to the whitelist explicit
14:52:28Araqwhen we have a whitelist somewhere we can make the compiler smart enough to properly support the new defined vs declared
14:53:16dom96I don't see how flaviu's idea would work. As soon as someone doesn't write --defined: foo all code that uses ``when defined(foo)`` would fail to compile no?
14:53:32Araqyeah
14:53:45Araqin some .cfg you need to have --undef:foo then
14:54:29flaviudom96: No, my idea has more heuristics. If someone had not written `--defined:foo` but had written `--defined:fod`, then it would emit a warning
14:54:39dom96I'd rather see something like {.defineWhitelist: [foo].} at the top of the source file.
14:54:56Araqno way, it has to be in the config file
14:55:20Araqwe have no {.define.} pragma for good reasons
14:56:39dom96so --defined will add to the whitelist and --define will define it?
14:56:55Araqsomething like that, yes
14:57:22Araqwe need a better name for --defined though
14:57:25dom96yes
14:57:51dom96flaviu: Do you think the async modules should go into an async directory and be imported via: import async.net, async.core etc?
14:58:09flaviuThat sounds good to me
14:59:29dom96Araq doesn't like it
15:00:50flaviuWell, I do, but I'm not going to argue since these sort of things never end up going anywhere
15:02:05dom96that's not true
15:08:11*Matthias247 quit (Read error: Connection reset by peer)
15:11:56*gkoller joined #nimrod
15:12:07dom96flaviu: If you want to play around with the async stuff or got nothing else to do you could help me rewrite some of the modules in the stdlib which use the old async module.
15:12:30dom96It'll be a good test for it.
15:12:49dom96if you're interested then you pick whichever module you want
15:12:55dom96I have to leave for a while bbl
15:22:38AraqI think it should be --symbol
15:22:44Araqsame here, bbl
15:24:11*n3t quit (Quit: Leaving)
15:58:51flaviudom96: Sorry, I'm busy with other things
16:00:37*EXetoC joined #nimrod
16:03:23*bogen joined #nimrod
16:07:10*ics quit (Ping timeout: 255 seconds)
16:07:53*ics joined #nimrod
16:30:06*gkoller quit (Ping timeout: 272 seconds)
16:31:41*gkoller joined #nimrod
17:04:29*gkoller quit (Ping timeout: 260 seconds)
17:11:57*Demos joined #nimrod
17:21:51*def- left #nimrod (#nimrod)
17:27:28*ics quit (Ping timeout: 250 seconds)
17:28:10*ics joined #nimrod
17:30:00*Demos_ joined #nimrod
17:33:06*Demos quit (Ping timeout: 250 seconds)
17:38:18*kunev joined #nimrod
17:42:03*Trustable joined #nimrod
18:29:49*kunev quit (Ping timeout: 255 seconds)
18:46:54*jpoirier joined #nimrod
18:47:55*Matthias247 joined #nimrod
18:52:18*Trustable quit (Quit: Leaving)
18:57:51*fran__ joined #nimrod
18:59:26*Francisco quit (Ping timeout: 250 seconds)
19:09:18*kunev joined #nimrod
19:19:35*bogen left #nimrod (#nimrod)
19:24:59*superfunc joined #nimrod
19:50:42*superfunc quit (Ping timeout: 245 seconds)
20:01:45*Boscop quit (Read error: Connection reset by peer)
20:02:08*Boscop joined #nimrod
20:02:09*Boscop quit (Changing host)
20:02:09*Boscop joined #nimrod
20:04:04*Jehan_ joined #nimrod
20:16:31dom96I put all the async stuff into an async folder and I don't want to erase that work. So how about we decide how to proceed?
20:17:22dom96Araq: I don't suppose people preferring 'import async.core' will convince you?
20:17:23*kunev quit (Ping timeout: 264 seconds)
20:19:25Araqno but go ahead
20:32:46dom96Well it seems importing 'async.net' and 'net' doesn't work.
20:33:22dom96it's complaining about a redefinition of 'net'
20:33:43dom96is this a bug or how it was designed?
20:35:07Araqthat's how it's been designed
20:37:14dom96Yeah, it should really use 'async.net' for disambiguation then.
20:40:20dom96I'm going to hold off on this and create issues for a proper discussion.
20:40:32Araqyeah well, I'll happily patch the compiler for your misguided design
20:42:08AraqI mean seriously ... using different module names for different modules is not overly restrictive
20:44:44dom96ok. As you wish.
20:45:05Araqand
20:45:16Araqimport async.net as anet should work
20:45:36dom96I won't put these modules in an async dir.
20:46:38Jehan_The one problem I have with the module semantics is that you can't really have two libraries with an identically named module each.
20:46:50Jehan_Or rather, that there's no way to disambiguate that I know of.
20:47:33dom96There is.
20:47:38dom96You do what Araq wrote above.
20:47:43Araqthinking about it ...
20:47:55Araqwithout different babel packages codegen will fail
20:48:03Araqit will name both net.c ...
20:48:51Jehan_dom96: I know, I'm talking about having them at the top level.
20:49:28dom96Jehan_: In that case you should put their parent dir in your compilation path.
20:49:50dom96Then import pkgA/module as moduleA; import pkgB/module as moduleB
20:50:34Jehan_dom96: That's what I've been doing. Still an issue with third-party libraries that don't follow that convention.
20:50:56Jehan_As they also have to structure their internal usage accordingly.
20:51:10dom96I'm not sure how else it can work.
20:51:25dom96Babel needs to enforce this convention.
20:52:02dom96Araq: So what are you saying? It won't work? You are rethinking this and think I may be right? or what?
20:52:11Jehan_Allow module qualification by package, prioritize modules local to the package over external modules.
20:52:40Araqdom96: it won't work and I consider this a feature
20:53:09Araqso name your module 'net' and 'asyncnet' or 'web' or 'anet' or whatever
20:54:09dom96Jehan_: That requires more babel support from the compiler I think.
20:55:58Jehan_dom96: Dunno. But that packages can pollute the global module namespace is a problem.
20:56:40dom96It won't be a problem once babel enforces the convention.
20:56:58dom96I will only allow modules to be in the global namespace if their name matches the name of the package for example.
20:57:20Araqbtw this *whole* discussion only exists because 'async.net' is sexy and 'async_net' is not ...
20:57:33dom96I still haven't thought about it all that much though.
20:58:58dom96Araq: I think it's more about being organised than about sexiness.
20:59:08Jehan_dom96: Even without babel, there's the problem with having a module that's named the same as something in the stdlib.
20:59:15Araqbut it's not
20:59:19Araqyou want to use
20:59:23Araqimport async.net
20:59:35Araqand then async.net.foo everywhere
20:59:55Araqand disallow net.foo
21:00:12dom96For babel this will be necessary
21:00:15Araqyou really want to replace _ by . because it looks better
21:00:18dom96and making it easy for the user is good.
21:00:35Araqyou might as well patch your font instead of patching the compiler
21:01:01dom96Maybe for babel you should just replace the dot with nothing.
21:01:19dom96So that I don't need to write: import jester/utils as jesterUtils
21:01:28dom96just to be able to disambiguate it
21:02:17dom96I suppose what you want is for package writers to name their modules pkgName_module.nim
21:03:43dom96Makes perfect sense of course, who wants to navigate these pesky directories.
21:03:53dom96Lets just put all our files in the same place
21:03:55dom96and prefix them
21:04:05dom96with some categories
21:04:53dom96Our OS will just have a root partition with a billion files
21:05:51dom96Much easier than navigating these blasphemous hierarchies right?
21:07:29Araqhere is some user interface that works: https://www.google.com
21:07:54Araqbillions of websites and yet I don't have to navigate through some petty hierarchy
21:08:30dom96Yeah, let me just grab my supercomputer to search through my files.
21:09:10Jehan_http://www.asktog.com/columns/085BrowseVsSearch.html
21:11:48Jehan_What I'd do, incidentally, is to allow something like "import package:module". Including special packages for the stdlib and local modules. E.g.: import foolib:bar; import stdlib:os; import local:os
21:12:12Jehan_With a package qualifier, search would go local -> stdlib -> packages (in some defined order)
21:12:21Jehan_s/With/Without/
21:13:31Araqdom96: thinking about it some further ... the async directory can get its own fake babel file and then it should work
21:13:37dom96Indeed. What if I don't know what I am searching for?
21:13:51dom96Araq: I'm way ahead of you.
21:14:00dom96it did work.
21:14:10Araqok good
21:14:14dom96But I already deleted it.
21:14:53Araqwhatever
21:15:46*Joe_knock joined #nimrod
21:16:14Araqdom96: when you don't know what you're searching for I fail to see how async.core and async.net helps to find it
21:16:42Araqthese names are chosen for being sexy, nothing more, nothing less
21:17:11Araqit's ok to be sexy, but it's not ok to pretend it's about anything else
21:18:40dom96why does the nimrod repo have any directories at all then?
21:20:54Araqwe even have lib/pure/collections, but look at what the stdlib does: it adds it to your path, so you can do: import tables
21:21:40Jehan_That's actually a problem with compatibility (the way it works now).
21:21:52Jehan_Adding a new module to the stdlib can break existing code.
21:22:07Araqnot really
21:22:18Araqproject specific modules are preferred
21:22:32Jehan_Oh? Okay, that's good.
21:22:46Jehan_Wait.
21:23:02dom96what about babel packages?
21:23:14dom96Araq: That doesn't answer my question
21:23:23Jehan_So, what if I import foo from the stdlib, the stdlib:foo module imports bar, but I have a bar module in my project?
21:23:43dom96Araq: You say you hate directories and yet you use them
21:24:10Jehan_Do stdlib modules importing another module prefer stdlib modules also?
21:25:26AraqJehan_: I planned to do this, but this is also used as a feature ... so that you can override modules
21:25:40Jehan_Umm ...
21:26:03Jehan_I think that creates more problems than it solves.
21:26:51*saml_ joined #nimrod
21:26:57Jehan_I really think that import should prefer related modules (i.e., project modules import other project modules first, stdlib modules import other stdlib modules first, package modules import other modules from the same package first).
21:28:23Araqdom96: I don't know what to answer. The question is too childish to take it seriously.
21:34:26AraqJehan_: actually I planned to have an elaborate scheme to do overriding, so yeah, this will be done differently in the future
21:35:56dom96To me it seems a bit arbitrary where you decide that hierarchies are fine and where you decide they are not
21:36:09Araqthey are never fine
21:36:25Araqbut they can be the lesser of 2 evils, given existing OSes and file systems
21:36:46dom96however I think that an 'async' dir is barely a hierarchy
21:36:54Araqthe dir is fine
21:37:09Araqmaking people aware of it is not what the stdlib currently does
21:37:46Araqand causes problems and I'm tired of this bike shedding with the perfectly fine module system
21:38:10Araqit already has more features than anything else out there
21:38:28Araqbut no no no, I wanna use the dot in yet one more circumstance
21:39:21Araqa _ doesn't cut it, it needs to be a .
21:40:52Araqbtw I recently put some grouping in compiler/, every module got its own subdirectory. I never pushed this change because it's annoying as hell to navigate
21:41:41Araqand for some modules the category was not easy to determine
21:41:57*superfunc joined #nimrod
21:48:35VarriountHello!
21:49:17Jehan_That's what ctags is for. :)
21:49:36Jehan_Which reminds me that I really need to figure out a way to generate decent ctags for Nimrod.
21:52:44AraqJehan_: fixing "nimrod idetools" seems more useful
21:52:51Araqhi Varriount
21:53:27Jehan_Araq: idetools is inherently more powerful, but also more cumbersome to set up.
21:53:47Jehan_ctags are more limited, but are simple and work.
21:54:13VarriountAraq: Updated https://github.com/Araq/Nimrod/pull/1467
21:55:07NimBotAraq/Nimrod devel 7c3a28a Clay Sweetser [+0 ±1 -0]: Fix #1424
21:55:07NimBotAraq/Nimrod devel 7a09b3b Clay Sweetser [+0 ±1 -0]: Fix #1424 some more
21:55:07NimBotAraq/Nimrod devel 74213fc Varriount [+0 ±1 -0]: Update semexprs.nim
21:55:07NimBotAraq/Nimrod devel 94131e1 Andreas Rumpf [+0 ±1 -0]: Merge pull request #1467 from Varriount/fix-1424... 2 more lines
21:57:07VarriountAraq: If you want an example of "uneeded subdirectories", point to the CPython source layout.
21:57:52AraqVarriount: no need. every Java project in existance is an example.
21:58:05VarriountOh yeah. *shudder*
22:01:18Araqugh ... we really have lots of conditional defines
22:01:20Jehan_Well, Java is designed under the assumption that you use an IDE to navigate the hierarchy.
22:01:54Jehan_Something that I'm not a fan of, to be clear.
22:02:15Araqno, even under this assumption, the design has lots of problems
22:02:21VarriountAraq: Yeah, but the conditional defines are there to help distinguish things. Where would we be without defined(windows)?
22:03:24AraqVarriount: yes but I'm trying to introduce defined vs declared
22:03:34Araqand it's lots of work
22:09:28*saml_ quit (Read error: Connection reset by peer)
22:11:20dom96So async is now stable enough to handle the forum.
22:11:38AraqYAAYY!
22:11:39dom96Please do test it everyone.
22:12:58Varriountdom96: Can/Should the builder be updated to use it?
22:13:54dom96hrm.
22:13:58dom96It should be possible.
22:14:16dom96You can do that if you want, in a new branch.
22:14:30dom96Getting the stdlib modules to use it is more important though.
22:14:45AraqI can imagine lots of more important things, yeah
22:15:04*superfunc quit (Ping timeout: 272 seconds)
22:16:22*fran__ quit (Ping timeout: 260 seconds)
22:23:47*Matthias247 quit (Read error: Connection reset by peer)
22:25:21dom96good night
22:32:38VarriountAraq: Updated https://github.com/Araq/Nimrod/pull/1461
22:35:04AraqVarriount: I guess it's fine this way but I'll pull tomorrow
22:35:18VarriountAraq: Do you think there's a better way?
22:41:59AraqVarriount: no
22:50:28*darkf joined #nimrod
22:50:35*darkf quit (Changing host)
22:50:35*darkf joined #nimrod
22:53:32Araqgood night
22:59:43*Jehan_ quit (Quit: Leaving)
23:23:04*bogen joined #nimrod
23:56:13*xenagi joined #nimrod