<<16-06-2012>>

01:45:52*mal``` joined #nimrod
01:51:11*XAMPP quit (Quit: There is no such thing as coincidence, only the inevitable.)
01:54:03*XAMPP joined #nimrod
01:54:03*XAMPP quit (Changing host)
01:54:03*XAMPP joined #nimrod
01:58:18*XAMPP quit (Remote host closed the connection)
02:01:40*XAMPP joined #nimrod
02:58:33*XAMPP quit (Read error: No route to host)
03:02:25*XAMPP joined #nimrod
04:31:22*Bosc0p joined #nimrod
04:31:47*Boscop quit (Disconnected by services)
04:31:49*Bosc0p is now known as Boscop
04:31:51*Boscop quit (Changing host)
04:31:51*Boscop joined #nimrod
04:57:14*XAMPP quit (Quit: There is no such thing as coincidence, only the inevitable.)
08:08:44Araqhi mal``` welcome
08:11:21Trixar_za:D
08:11:49AraqTrixar_za: do you know mal``` ?
08:12:25Trixar_zaNope, but I just created a multiple socket bot using asynchronous sockets in less lines than the first one I wrote for only one
08:14:09Araqdid you write it in nimrod?
08:15:35Trixar_zaNot yet, but I will attempt it now
08:15:45Trixar_zaNow that I understand the underlying principle, its actually easy
08:16:01Trixar_zaAnd I just created 7 bots on the fly. This is awesome
08:17:30Araqalright, I have to go, see you later
08:17:45Trixar_zaLater Araq
08:17:48Araqhopefully closures will be done by the end of the weekend ...
08:18:02Araqbut I doubt it ... *sigh*
08:18:20Araqbye
09:49:21dom96hello everyone
09:49:43Trixar_zaHey dom96
09:50:02dom96Trixar_za: how goes the bot making? Started writing one in Nimrod yet? :P
09:50:24Trixar_zaWell, mastering AsyncIO took some time :P
09:51:01Trixar_zaAnd not yet. But I did make the python version create new bots on demand. Which to me is kind of awesome.
09:52:04Trixar_zaIt is a funny thing though. It was hard until the moment I actually wrote the code. Then it started to make sense.
10:03:50*zahary joined #nimrod
10:03:53dom96Yeah, I felt that way about AsyncIO too.
10:34:29Araqping zahary
10:40:45zaharypong
10:42:14Araqwe should make the .borrow feature work with the new generic + ops
10:44:22zaharyyep
10:44:29zaharyI was about to say the same :)
10:44:41Araqotherwise .borrow becomes pointless :-)
10:44:53Araqshould be easy to do though
10:45:05Araqiirc there is special code for the searching
10:45:24zaharyyes, there is (see semBorrow)
10:45:39zaharyit should do something similar to overload resolution
10:45:54Araqperhaps
10:46:21AraqI'd simply take tyTypeClass into account though
10:47:22zaharywell, it should work with regular generics too - I think, it should just skipTypes over the distinct and try regular overload resolution with the resulting (original) type
10:50:29zaharybtw, I have some other use cases for distinct types that doesn't work well right now.
10:50:29zaharyfor example, when you want a custom hast table, the nimrod design suggest that you should create a unique type with overloaded hash and equals. usually, you'll just want to create a distinct that's in every way the same as the original except these two procs
10:50:41zaharywe can introduce a borrowAll pragma to do that
10:52:42zaharyand if we have borrowAll, I imagine the implementation will be very similar to "predicated borrow" - where you can specify some wildcard mask (regex) to specify which functions you want
11:18:48Araqhm
11:18:59Araqsounds good
11:19:28Araqperhaps we can somehow marry it with another idea I always wanted to try
11:19:38Araqwhich is language support for delegation
11:20:18Araqwhere you have a field in a object/tuple x and want to delegate all the operations to x.field
11:20:41Araqyou can do it right now with a converter to 'var T' though
11:32:33zaharyconverter to var gets the job done here indeed and there are the proxy type rewrites for more customized forms of delegation
11:36:18Araqbut a converter to var allows all operations
11:36:42Araqand it's nicer to whitelist the valid operations
11:41:42zaharyaha, I see
14:21:26*fowl joined #nimrod
15:04:03*apriori_ joined #nimrod
15:11:53apriori_did something change with imports?
15:12:17apriori_I import another import, which imports several other nims which export types.. and these types are no longer visible in my main.nim
15:19:59dom96If module C exports function foo, module B imports C and you import B, `foo` won't be accessible to your application.
15:20:43apriori_so.. what would be the solution?
15:21:16apriori_I mean.. sure I can directly import.. but that's not really convenient
15:21:46apriori_I guess.. I would need to use "include" in such a case
15:22:25dom96In most cases a better solution is to have a 'types.nim' or 'utils.nim' which all modules can import.
15:22:55apriori_ok, ty
15:23:12Araqapriori_: nothing changed wrt import (I hope)
15:23:38Araqand the planned 'export' feature will allow for symbol forwarding
15:23:47Araqbut dom96's advice is good
15:24:41apriori_yeah, ok
15:24:59apriori_for now I just made a "opencl.nim" which has several import lines.. and "include" that
15:25:55apriori_btw., one nice syntax for module forwarding would be like import A*
15:27:11Araqnah ;-)
15:27:20Araqplanned is:
15:27:24Araqimport A
15:27:29Araqexport A.x, A.y, A.z
15:27:47apriori_no whole module export?
15:28:11Araqwould that be useful?
15:28:29apriori_well...
15:28:43apriori_otherwise you would enforce the structure as described by dom96
15:29:08apriori_because no one would like dozens of export foo.bar
15:29:32Araqwell I dunno, perhaps you're right
15:29:49Araqalright, we need a syntax for whole module export
15:30:14Araqpeople hate the * export marker so I'm not too sure "import A*" is good enough
15:30:17apriori_import A* would be consistent with the current usage of export
15:30:31Araqthat's true
15:31:02apriori_why do they hate the import marker?
15:31:23Araqbecause they can't figure out the meaning without reading a tutorial about nimrod ...
15:31:32apriori_...
15:31:37apriori_hardly a reason to hate it
15:31:45Araq*shrug*
15:31:57apriori_oh.. surprise.. you need to read something about a language in order to understand it...
15:32:07AraqI often wonder if people who nitpick about these things ever actually write a single line of working code ...
15:32:28apriori_unlikely ^^
15:33:39apriori_is there a way to make a forwarded function which is imported from a c-library only fail at runtime if it is actually called?
15:34:10Araqsure use {.deadCodeElim:on.} in the wrapper
15:34:14apriori_I know its a strange case.. but with opencl I encountered a case in which a function which is described in the headers is not even implemented in the shipped OpenCL library (of nvidia)
15:34:19apriori_ah, ok
15:34:21apriori_ty
15:34:23Araqwell
15:34:36Araqthat's not fail at runtime if it's actually called
15:34:48Araqbut "fail if client module actually uses it"
15:34:58apriori_thats enough
15:35:25Araqmost wrappers use this pragma :-)
15:35:58apriori_{.deadCodeElim:on, importc: "clGetGLContextInfoKHR", dynlib: "libOpenCL.so".}
15:35:59apriori_hm
15:36:05apriori_nimCL/cl/cl_gl.nim(128, 81) Error: invalid pragma: deadCodeElim: on
15:36:15apriori_some syntax error?
15:39:26Araqit's a module wide pragma
15:39:37Araqso make it a top level statement:
15:39:44Araq{.deadCodeElim:on.}
15:39:55apriori_ah, ok
15:39:55Araqput it before any procs are defined
15:40:01apriori_thanks
17:17:14*apriori_ quit (Quit: Konversation terminated!)
17:51:44Araqping Boscop
17:59:22*Zerathul joined #nimrod
18:04:38*Zerathul quit (Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725])
19:58:24Boscoppong Araq
19:58:46Araqoh hi
19:58:54Araqonly a minor point
19:58:54Boscophi
19:59:19Araqbut ever tried to change some fonts to make _ look more like - ?
20:00:56Boscopno, but because _ is often visually nearly in the next line, my lang uses - for multi-word identifiers, like lisp, it's also one keypress less
20:01:59Araqwell yes I know
20:02:12Araqbut I still prefer - for minus and _ for separating words
20:02:21Boscop- is minus too
20:02:50Araqso you require whitespace around it?
20:03:12Boscopyes
20:03:29BoscopI usually leave whitespace around it in C/C++/D anyway
20:03:40Araqdo you require whitespace for other operators too?
20:03:49Boscopno, but I recommend it
20:04:51Boscopit's a compromise, I could have used one of the unicode hyphens/minuses but those aren't easily typeable
20:05:17Araqthere is also the idea to make whitespace precedence relevant
20:05:28Boscopyes, I do that, too
20:05:36Araqso 1+3 * 3 is (1+3) * 3
20:05:42Boscopyes
20:05:51Araqinteresting
20:05:52Boscopbut I only do it one level deep
20:06:01Araqhm yeah that's good
20:06:13Boscopso multiple spaces are treated as one
20:07:04AraqI'd perhaps choose 2 levels deep but I dunno
20:07:54Boscopyeah, it's a bit experimental, but it's just syntax, it can be changed later if it doesn't work out
20:08:10AraqI came to the conclusion that _ is misdesigned and all fonts should be fixed :-)
20:08:27Araqand then nimrod supports your favourite way too :D
20:08:41Boscopyes, but it's harder to fix all fonts for everyone ;)
20:09:30Araqtrue but a language needs IDE support anyway
20:09:41Araqand you only need to fix it in the IDE mostly
20:10:18Boscopyeah, the IDE could allow easy access to unicode minus/hyphen
20:10:29Boscopinstead of messing with fonts
20:10:31Araqwell that too yes
20:10:48Araqhm
20:11:54Boscopat least _ is better than camelCase in that it allows separation of acronym names, e.g. SQLWriter vs SQL_writer or SQL-writer
20:14:38Boscopthe problem I'm currently thinking about is how to manage different configs of modules, usually there is debug/release but there can also be custom configs, e.g. which interface type to use, CLI,GUI,web etc. and how to propagate configs to the imported modules (e.g. if A imports B and A is debug, B should be automatically debug too, but also for custom program-wide configs)
20:15:15Araqwhat's the problem? just do it like nimrod ;-)
20:15:27Boscophow does it do it?
20:15:42Araqthere is a project wide configuration file
20:16:06Araqwhich supports basically all command line options to the compiler
20:16:20Araqand support C-like "defined symbols"
20:16:37Araqwhich can be accessed in nimrod code via the built-in "defined(...)"
20:17:07Araqand there are pragmas like {.push boundChecks:on.} and {.pop.}
20:17:21Araqto change the settings for code sections
20:19:16Boscopyeah, I also want to allow e.g. optimization flags per code sections
20:19:33Araqsee http://nimrod-code.org/nimrodc.html#configuration-files for the configuration file stuff
20:19:40Boscopbut the whole system should be as simple as possible, not like make or even requiring make
20:19:47Boscopah
20:20:12Araqnimrod doesn't use 'make' either
20:20:53Araqand invokes multiple GCC processes in parallel
20:21:17Araqthe compiler itself is almost impossible to parallelize due to nimrod's static semantics
20:21:40Araqbut at least the backend is fully parallelized
20:22:42AraqI think this is inherently the case for every compiler for a real world programming language
20:23:29Araqhttp://nimrod-code.org/nimrodc.html#compilation-cache may also be interesting for you
20:24:07Araqand this: http://nimrod-code.org/intern.html#compilation-cache
20:25:53Boscopbut then users need to learn the format of another config system which fulfills a special case of make..
20:27:01Araqin nimrod's case unfortunately yes, but you can easily re-use the parser
20:27:13Araqand use the same syntax for configuration files
20:27:37AraqI'd do it this way if I would do the config system again
20:27:48Araqbut there are always better things to do ;-)
20:28:26Araqwhen I wrote it, the nimrod parser was not finished I think
20:37:35Araqso Boscop, what's your opinion about rust?
20:51:03Araqwell write down the answer if you like, I need to go
20:51:09Araqgood night
20:52:54BoscopI haven't had time to start a project in Rust yet, but I've read the tut/docs and blog posts about it
20:54:05Boscoppeople complained about usability issues, but the rust people are working on improving that
20:54:52Boscope.g. not nestable types, having to propagate template args etc.
21:00:14Boscopit seems to have limited metaprogramming capabilities