<< 22-09-2013 >>

00:20:31*q66 quit (Quit: Leaving)
00:24:24*q66 joined #nimrod
00:25:54*q66 quit (Remote host closed the connection)
00:29:22*ltbarcly joined #nimrod
00:34:01*ltbarcly quit (Client Quit)
00:44:14*ltbarcly joined #nimrod
01:17:48*brson quit (Quit: leaving)
01:23:02*Guest14108 quit (Ping timeout: 256 seconds)
01:26:38reactormonkhow do I map over $? .map($) tells me it expects an expression, .map(`$`) Error: '$' cannot be passed to a procvar
01:26:48reactormonkor, how do I convert a string to a cstring?
01:37:52*ltbarcly quit (Quit: Computer has gone to sleep.)
02:24:31*ltbarcly joined #nimrod
03:00:57*ltbarcly quit (Quit: Computer has gone to sleep.)
03:11:14*OrionPK quit (Read error: Connection reset by peer)
03:21:24*ltbarcly joined #nimrod
04:02:05*ltbarcly quit (Quit: Computer has gone to sleep.)
05:08:19*Associat0r joined #nimrod
05:35:59*zhtx joined #nimrod
05:51:25*ponce quit (Disconnected by services)
05:51:34*ponce joined #nimrod
05:51:51*ponce is now known as Guest41546
06:04:32*zhtx quit (Quit: Leaving.)
06:33:09*zahary joined #nimrod
07:27:46*Associat0r quit (Quit: Associat0r)
07:43:56*Associat0r joined #nimrod
07:43:56*Associat0r quit (Changing host)
07:43:56*Associat0r joined #nimrod
08:15:42*Guest14108 joined #nimrod
09:07:41*Guest14108 quit (Read error: Connection reset by peer)
09:14:00*q66 joined #nimrod
10:02:33*Guest41546 is now known as p0nce
10:46:27*girvo joined #nimrod
10:47:02girvohey all
10:48:40dom96hello girvo
11:00:57girvoout of curiosity, do many use nim on Mac? I know Aporia has problems with it
11:01:52dom96I wouldn't say many. But some do yes. Araq got a Mac recently so he may be able to fix the issues with Aporia on it.
11:02:20girvoah cool, cheers. seems to have great Windows support?
11:02:36girvotrying to decide what VM i should set-up for nimrod dev :)
11:02:54dom96Yeah. I'd say it works best on Linux though.
11:03:28girvoOh true? Neat. I couldn't get Aporia compiling on Ubuntu oddly enough, but I'll fire up a new vm and give it a shot!
11:03:31girvocheers dom96 :)
11:03:59dom96Yeah, I heard that people are having the same issues as on Mac. Weird.
11:04:04dom96It works fine for me on Arch Linux.
11:04:10girvoyeah, pretty much. x64?
11:04:18dom96yes
11:04:36girvohuh weird. must be Canonical's fault (like every other damn problem I have with Ubuntu :P)
11:04:52girvoone of these days I should just deal with it and swap to arch
11:06:55dom96lol
11:38:17*girvo quit (Remote host closed the connection)
12:22:04*shevy joined #nimrod
12:42:40*OrionPK joined #nimrod
13:34:23*gs joined #nimrod
13:34:46*gs is now known as Guest58253
13:51:28*girvo joined #nimrod
13:51:32girvohi again!
13:52:12girvovery quick question, nimforum: how is it setup? is there an nginx reverse proxy pointing to a nimrod-compiled app that has a http server?
13:52:28*zhtx joined #nimrod
13:57:42dom96girvo: not really. It's done using scgi.
13:58:21girvodom96: ah cool. I thought about that, but I haven't touched scgi in a few years now. performance is okay?
13:59:51dom96Guest58253: You should really change your nick to something which isn't already taken.
14:00:36*io2 joined #nimrod
14:01:28*Guest58253 quit (Quit: Leaving)
14:01:34*Guest58253 joined #nimrod
14:01:35*Guest58253 quit (Client Quit)
14:02:13*gsp joined #nimrod
14:03:00gspfair enough
14:20:43*dyu joined #nimrod
14:27:05*zhtx quit (Quit: Leaving.)
14:44:45girvohow stable is the httpserver module currently? (like, api wise)
14:45:03girvothe docs say unstable, so I figure thats still the case?
15:01:10*girvo quit (Remote host closed the connection)
15:04:55*sdw joined #nimrod
15:15:19AraqI'm back
15:15:30Araqbut not for long ...
15:22:31*XAMPP quit (Read error: Connection reset by peer)
15:51:23*io2 quit (Read error: Connection reset by peer)
15:52:04*Associat0r quit (Quit: Associat0r)
15:52:31*io2 joined #nimrod
16:01:51*Associat0r joined #nimrod
16:01:51*Associat0r quit (Changing host)
16:01:51*Associat0r joined #nimrod
16:34:36*gsp quit (Ping timeout: 245 seconds)
17:08:51*filwit joined #nimrod
17:09:06filwithey dom96
17:09:37filwitwhat APIs, if any, are you guys using on the forums?
17:09:42filwitalso, who rights it?
17:10:39filwiti forgot, but did i hear that you wrote it? or maybe i just mis-remember that?
17:10:57filwiti was going to say good job to the person who wrote it :)
17:13:20filwiti just joined and it's much more functionally complete that D's.. it's kinda silly that D uses a newsgroup with the editing capabilities of Notepad and no after-post editing abilities.
17:52:16dom96hi filwit
17:53:05dom96Take a look at the contributors stats on github, it was me, Araq and gradha who wrote it.
17:53:30dom96The forum just uses jester.
17:53:38dom96and the compiler's rst parser
17:57:13filwitnice, i'm taking a look at all this, one sec
17:57:20Araqhi filwit, I wrote the forum and then dom96 rewrote essentially every line ;-)
17:57:22filwitgood work then, btw
17:57:32filwithi Araq
17:57:41filwitk, i'll look at your response
17:58:05Araqwhat?
17:58:10Araqwhat response?
17:58:20filwitnevermind
17:58:39filwiti thought you where talking about the forum post i made
17:58:54filwitone sec
17:59:05Araqalready read it
17:59:21filwityeah i figured, besides it's just what i showed you before
17:59:54filwitjust wanted to see what other's said about all that, and figured the forum was better than IRC for it
18:00:24filwiti really like the Nimrod syntax integration in the forums, btw
18:00:42Araqthanks
18:00:51Araqcoming from you I know this means something ;-)
18:01:16Araqyou surely know about design, everybody likes our new homepage
18:01:35filwitglad to hear it :)
18:04:27filwitbtw, Araq, maybe you know
18:04:53filwitis there a way to do this: var x {.nodecl.}: SomeType ??
18:05:12Araqyeah? just like the way you wrote it?
18:05:31filwitit caused some stack-trace error message
18:05:43filwiti think, i was trying a bunch of stuff
18:05:54AraqJS backend?
18:06:02filwiti will try again later, but you're saying it should work like that?
18:06:08filwityes, for the JS backend
18:06:11filwitforgot to mention that
18:06:37Araqyeah that should work but it's not useful, use "importc" instead
18:07:11Araqotherwise the mangled symbol name is used but not declared anywhere
18:07:28Araqor maybe nodecl implies importc ... can't remember
18:07:55filwitokay, i will test it later and ask you
18:08:12filwitalso, there's no {.forceinline.} ability anywhere is there?
18:08:36Araqno but there is .inline
18:08:46filwiti'm assuming not, since you probably just pass __inline down to the C compiler
18:08:48Araqfor forceinline a template should do the job
18:09:02filwitoh right, right, dom told me that too
18:09:07filwiti forgot, haha
18:09:19Araqyeah for now, but I have a new optimizer in the works
18:09:33Araqwell it's in the "design phase"
18:09:58Araqturns out that you get a global CSE for free when you do the control flow dependent typing
18:10:20filwitCSE?
18:12:11filwitjester looks pretty cool as well, dom. What does the '@' do to strings again?
18:16:07Araqcse = common subexpression elimination
18:18:14dom96filwit: it grabs a piece of form data, or the corresponding @name in the url pattern, or the value of a query string.
18:21:24filwitaw, i see. didn't do a full read through. Thought it was a built-in string operator
18:22:27filwiti was looking at Adrian's code here: https://github.com/AdrianV/nimrod-tools/blob/master/oopExample2.nim
18:22:34filwitand it looks pretty cool
18:22:51filwitthat's the sort of thing i was trying to do before, but couldn't get it to work
18:23:39filwitis it possible to do something similar to his 'declClass' macro, but for procs ?
18:24:09filwitlike... declFunc foo(bar:int): ...
18:24:21filwit?
18:25:18Araqkind of yeah
18:26:51AraqdeclFunc do (bar: int) -> gah:
18:26:53Araq ...
18:28:04AraqI dislike that we don't have 'specialRoutine foo(bar: int) = ...' but it's hard to do with nimrod's parsing technology
18:34:53filwityeah that would be interesting
18:35:06filwitso could i do something like:
18:35:23filwitdeclType Foo from Bar: ...
18:35:51filwitdeclFunc baz gives int: ...
18:36:12filwitwhere 'from' and 'gives' are the same as your '->' operator?
18:36:49Araqno
18:37:05filwithmm, okay
18:37:05Araq'do' is a keyword introducing a lambda
18:37:27filwit'do'?
18:37:34filwityou mean the ->?
18:37:45Araqno I mean 'do'
18:38:29filwitokay. well i will take a deeper look at it later
18:45:02Araqfilwit: what time is it for you?
18:46:07filwit2:45
18:46:21filwitwell, 14:45
18:47:33Araqhmm that's why it all feels wrong
18:57:04dom96It's called jetlag :P
19:20:02*algoban joined #nimrod
19:20:06*algoban left #nimrod (#nimrod)
19:29:25Araqfilwit: you never answered how 'var Foo' would be handled with your scheme
19:29:38Araqproc var Foo.abc(x: int) ?
19:29:42Araqfor
19:29:52Araqproc abc(this: var Foo, x: int)
19:57:57*dyu quit (Quit: Leaving)
19:59:30filwitsorry, was gone for a sec
20:00:15filwitand yes, just like that i think
20:00:23filwitunless there's some issue with that
20:01:21filwitor.. hmm.. wouldn't it default to that?
20:01:26filwitso:
20:01:42Araqit would work but it's ugly imo
20:01:43filwitproc Foo.abc()
20:01:44filwitfor
20:01:51filwitproc abc(this: var Foo)
20:02:02Araqmeh
20:02:04filwitsince you normally want that
20:02:15Araqno
20:02:18Araqif you have
20:02:25Araqtype Foo = ref object
20:02:28Araqyou don't
20:02:36filwitah, right right
20:02:51filwityeah, so just the 'proc var Foo()' then
20:03:11filwitbut hey, if there's some way i could define my own through macros, i am not care
20:03:33filwitlike that: declFunc foo(): ..
20:03:48filwitif that can work like i want, then i'll work around that
20:04:09filwitif not, i'm not gunna try and fight for a feature no one wants
20:04:12Araqthere needs to be a 'do' in there though
20:04:32filwitahh.. i see what you meant now
20:04:40filwitso '->' == 'do'?
20:04:49Araqbut I'd just use the declClass or something macro
20:05:04Araqthat does want you want even more nicely anyway
20:05:10dom96I think it's better if we have a 'class' macro or something: class (x: Foo): proc blah() = ... # we get the x param added to our proc's params
20:05:24Araqdom96: well have that
20:05:32Araqit's not in the stdlib though
20:05:33filwityes, i agree with dom96
20:05:59filwitbut i have a couple of ideas and questions about what's possible
20:06:09filwitwhich will take some time for me to digg through things again
20:06:20filwitand i don't really have the time to do that just yet
20:06:41Araqgood I don't feel like thinking anyway
20:06:51Araqmy stomach seeks to explode for some reason
20:07:13filwitate too much :)
20:07:17filwitare you back in Germany?
20:08:05filwitoh, one question though. is there a way to make a "static object"?
20:08:17filwittype Foo = global object ...
20:08:25filwitso then i can just use 'Foo'
20:08:45*Guest_1134 joined #nimrod
20:08:46filwitwithout needed to do: type TFoo = object ... var Foo: TFoo
20:09:13*Guest_1134 quit (Client Quit)
20:09:22filwitjust wondering
20:10:49dom96I don't think so.
20:11:20Araqno and it's misguided
20:11:26dom96What would you use it for?
20:11:35filwitsanity :P
20:11:54Araqobjects use nominal typing so ... the type name is important
20:12:14*dom96 was looking for an example
20:13:03filwityeah, Araq.. i think something to 'grab' the TypeInfo of a def is a better system
20:13:19filwittypeof(instance).name # const data
20:13:31filwittype of thing
20:13:45filwitand it's not so rigid i think
20:13:46Araqtype(instance).name should do exactly that
20:14:08Araqbut then you prefer to write type(Foo) everywhere instead of TFoo ?
20:14:18filwitright, so why does there need to be a unique name for the Type of a global instance?
20:14:18Araqyou're a strange guy ... :P
20:14:35filwityes, i prefer write type(Foo) everywhere
20:14:54filwiti think it helps with sanity on large code bases
20:15:04filwitless symbols to remember
20:15:41Araq'T' is a common prefix though, no need to "remember" it if you *use* the language
20:15:51filwitso i read: type Foo = gobal object.. and I know there will never be but one instance of it, and how to reference the type data from it
20:16:07Araqhow so?
20:16:14Araqvar otherFoo: type(Foo)
20:16:29filwittrue, it's a common prefix, but it helps developers to understand structure if they see how the type is used, at definition
20:17:05filwitgood point
20:17:38filwitstill prefer it for naming, but that's just a personal preference i guess
20:17:44Araqdevs are more helped by a proper CS education instead of your constant fight to care the biggest dumbass around
20:17:51Araq*to care for
20:18:16filwitthere are reasons verbose syntax help sanity i think
20:19:20Araqand yet you propose a shortcut for singletons
20:19:24filwitit helps you focus on important data, how often is type(Foo) really used?
20:19:39Araqit could be everywhere
20:19:52Araqproc a(this: var TFoo) ...
20:19:57dom96i'm confused, are we still discussing static objects or 'T' prefixes now.
20:20:03dom96?
20:20:15Araqdom96: both I think
20:20:35filwitthey are related
20:22:41Araqfilwit: lets flip this:
20:23:02Araqif a guy comes along and says "waaah, I can't remember the T prefix for types"
20:23:10Araqwould really like to work with him?
20:23:27Araq*would you
20:23:53filwitthat has little objective relevance to the pros or cons of my arguments
20:23:57Araqchances are high he can't script your cool game anyway, right?
20:24:22filwitthat's a horrible outlook, lol
20:25:02Araqbut it's relevant in the sense that I think you think way too much about trivialities
20:25:13dom96I guess you could think of a module as a static object, if I understand static objects correctly.
20:25:24Araqdom96: yes that's correct
20:25:41filwitwe are talking about language syntax design, Araq.. it's all trivial details at this level
20:25:49*Associat0r quit (Quit: Associat0r)
20:26:11Araqno. there are objectively bad syntaxes simply because they are ambiguous or very hard to parse
20:26:49filwityes, true.
20:27:11filwitbut i don't see "it's trivial to me" as a convincing argument
20:27:31filwiti'm not sitting here saying "you have to use do it or NOONE will use the language"
20:27:37Araqsure
20:28:19Araqbut then you're the only guy that constantly comes up with strange things like that ;-) ok, daddye does too
20:28:59Araqthe real thing is: you're not grateful :P
20:29:13filwithaha
20:29:20Araqprogram in Pascal and Ada for a few years and then tell me Nimrod's syntax isn't pure joy
20:29:27filwitnah, i just like language design, even the petty things about it
20:29:53filwitand i would never program in Pascal or Ada, nor am I claiming Nimrod is comparable to those languages
20:30:44filwitbut I'm used to features from the C#/D languages, and I think some have valid, objective arguments in there favor (OOP-style i mean)
20:31:17filwitso i raise those arguments here sometimes... really it was just my question that sparked this argument anyways, lol
20:31:40filwityou're the one who originally claimed it was misguided thinking
20:31:56Araqknowing the history of the C#/D syntax that's a hard sell here ...
20:32:08filwitsorry, that sounded more accusatory than i meant it
20:32:47filwitwell i wasn't advocating C#/D get everything right, there are some really nice features of Nimrod, even in the syntax, lol
20:33:30filwiti don't mind the Python style (expect the object decl syntax), and I like the macro/template/proc definitions and stuff
20:33:37filwitmore than C#/D i mean
20:34:19filwitthe only really issue i have with Nimrod, is categorizing things bye objects, like i'm used to in those languages
20:34:31filwitthe line between types and modules is very blurred in Nimrod
20:34:39Araqlol
20:34:46Araqin fact it's the opposite
20:34:48filwitand while that's good, some people like thinking that way. it's also confusing to some
20:35:11Araqit's 'class' that completely blurs things
20:35:41filwitwell, actually, you might be right about that, and it brings me to another question i had
20:35:54filwitcan i do this: Console.log("...")
20:36:01AraqI know it's useful for you but *objectively* it really does, go read a book about it ;-)
20:36:03filwitwhere 'Console' is module?
20:36:09dom96yes
20:36:09Araqyeah
20:36:39dom96I still would like to see an example of where static classes really are useful.
20:36:42*dom96 is curious
20:36:47filwitso basically i don't need to use types for global objects? i can just use modules
20:37:26dom96I guess in C# you can't just have global functions, you need an enclosing class. So you would create a static class.
20:37:30filwitalso, what i meant bye "Console.log()" is that i don't import it where "log" is available without the prefix
20:37:34filwitis that possible?
20:37:59filwitso basically you could either "import Console" then just use 'log', or you could just use "Console.log".. ?
20:38:06filwitguess i should just try it out...
20:38:08filwitone sec
20:38:43dom96no, you need to import it.
20:38:53dom96Same way you need a reference to something in C#.
20:39:01dom96(and a 'use'?)
20:39:21dom96hrm, nah I guess the 'use' is not needed.
20:41:02filwitthat's the problem with modules then
20:41:07filwitcompared to static objects
20:41:28filwitcause i don't want to "import" everything inside of Console into my module
20:41:42dom96You can do: from console import nil
20:41:57filwithmm... that's an interesting idea
20:42:28filwitmaybe I could make a template that makes that easier.. using Console
20:42:44filwitwhere 'using' is template that just spits out: from Console import nil
20:42:49dom96But I don't see why you would, unless you want to get rid of a lot of ambiguities
20:44:27filwit^ yes that
20:44:46Araqfilwit: you need the import; ultimately the IDE can produce it for you though
20:44:47filwitand so i can think of modules like static objects... at least to a degree...
20:45:09filwitthey still can't have hierarchy like static objects can
20:45:43dom96what if you put a global var in your module? :P
20:45:58filwitAraq: it's not about typing the import at the top, it's about not being able to use 'log' without the prefix
20:46:12dom96hrm, nah, that's probably a bad idea.
20:46:21Araqdom96: I'm making the compiler 'guess' the package name from the directory the module resides in
20:46:26dom96filwit: why is that so important to you?
20:46:28filwitdom96: i don't follow
20:46:40dom96Araq: what?
20:46:56Araqlike jester/src/foo.nim --> jester_foo.c
20:47:31Araqthe rule I have in mind is: parentDir(filename) unless that is in ["src", "source"
20:47:39dom96oh, right. Well. 'guess' sounds risky.
20:47:45Araq, "package", "pckg", "lib", "library" ]
20:47:52Araqthen we go further up
20:48:11dom96I think it should go from the directory that is in Nimrod's PATH
20:48:32AraqI don't see how that changes anything
20:49:14dom96why are you ignoring the 'src' etc?
20:49:22Araqand a heuristic seems to be good enough, we only need the prefix for disambiguation
20:49:26Araqbecause
20:49:37Araqjester/src/utils.nim
20:49:46AraqfooPackage/src/utils.nim
20:49:49Araqmight be common
20:50:43Araqdunno what Babel says about this
20:50:47dom96huh
20:51:07dom96What if we have: jester/src/utils.nim and jester/source/utils.nim?
20:51:15Araq2 jesters?
20:51:35AraqBabel can't handle it this way
20:51:39Araqit would be
20:51:43Araqjester-1.0/src
20:51:50Araqjester-1.1/source
20:52:03Araqand then it's fine again :P
20:52:14dom96I don't see the problem in just making it: jester_src_utils.c
20:52:34Araqmax command line length is 4K on linux iirc
20:52:41Araqso long names suck
20:52:55dom96well, don't assume that people are going to be using babel
20:53:18filwitokay, great, i guess i can live with this, haha
20:53:22dom964k should be enough
20:53:36filwittemplate using(e:expr) = from e import nil
20:53:41filwitworks out very well :)
20:54:39filwitis there a way to make every compiled file implicitly import another nim right?
20:54:43Araqyup, it's superb, making me write Console.write like I'm some idiot
20:54:58AraqI appreciate these things
20:55:10Araq;-)
20:55:21filwithaha, well it's good for script kiddies dude
20:55:27Araqso you say
20:55:36filwitand if you write a game engine, you want to make limitations that way
20:55:46filwitand if you dont like it.. just use 'import Console"
20:55:49filwitfixed
20:56:01filwitso both are still supported
20:56:03filwiti like it
20:56:28Araqwhy? what's wrong with using your brain instead of trying to switch it off during coding? and try to rely on some minor things that don't guarantee anything?
20:56:34dom96yay, Nimrod will become C#
20:56:38filwiti would actually advocate to make a built-in 'using' template to the object.nim
20:56:59*Araq doesn't get it
20:57:15filwitthat's not an argument Araq, it's all just ad hominem
20:57:36Araqyeah it's 'log' and that's still the Console.log. The *opposite* is perhaps confusing. Like having 'log' and it finally means something differentt
20:57:39dom96filwit: why do you prefer to waste hours of your life typing 'console'?
20:57:59filwitthe point is to limit the brain power required so the programmer can focus on other tasks
20:58:04Araqfilwit: I don't mean it personal
20:58:16Araqlike what other tasks?
20:58:21filwitdome96: yes, i prefer to type Console.write than echo for large projects
20:58:32dom96huh?
20:58:37Araqlike what can I do apart from *reading*?
20:58:47dom96If anything you need to use more brain power to remember the extra piece of info, which is 'console'.
20:58:48Araqplay some game at the same time?
20:59:11filwitAraq: reading other's code in a large code base is very important
20:59:39Araqreading 'Console.' all over place doesn't help with reading
20:59:57filwitdom96: no, because then you catagorize everything under 'console'. there's less symbols to remember, especially with inteli-sense
21:00:11dom96ahh, so the point is to be able to find the function quickly. Because you know it's part of some 'Console' class.
21:00:33filwitAraq: Console is just an example. the point is to use if for other things, like Physics.rayCast(...)
21:00:39Araqand nobody actually really *reads* code, it's too large anyway, instead you skim around and fix what's wrong
21:00:58Araqin my experience anyway
21:01:11Araqbut sure
21:01:23Araqgo ahead and read the 100K of Quake's engine
21:01:24filwitAraq: that's my point.. you want to read exactly what the structure is rather than constantly guess where the procs are coming from and what they effect in global space
21:02:12filwitQuakes engine is very old, so IDK if you're saying it's good code or bad, but i'm sure things have changed in game-dev practice since then
21:02:40filwiti also have never read the Quake code, so idk what it's like
21:03:12filwityou know guys.. this is really hard to talk to both you over text..
21:03:18Araqit was just an example
21:03:22filwitwe should just talk sometime over skype
21:03:38filwiti think we can do conference calls there right?
21:03:49Araqsure thing
21:04:05Araqbut it's bad for the people who read logs
21:04:34Araqfilwit: the real problem that I have is that you optimize for the *casual* reader
21:04:41filwityes, but it's hard to give eachother time to be clear, and talk to multiple people at the same time
21:04:57Araqnot for the guy who already *knows* quite a bit about your code base
21:05:06filwitAraq: i just want the *ability* to optimize for the casual user
21:05:25filwitAraq: and i'm glad to see that my using template makes that much easier
21:05:30Araqyeah but no need to argue for that, nimrod in this case gives you want
21:05:40Araq*gives you want you want
21:05:43filwitAraq: i really would suggest adding that to the object.nim as an option for people
21:06:12filwitAraq: the 'using' template i mean
21:07:07Araqwell zahary doesn't like it, we wants to make 'using' a keyword for Pascal-like 'with' functionality
21:07:50filwityes you told me that
21:07:50Araqand I don't like it because it encourages pettiness which I increasingly cannot stand anymore
21:08:04filwitif that's actually going to happen, i would argue 'with' is a better name for it
21:08:42Araqin the near future I will demand "show me in a very concrete way how it avoids bugs" ;-)
21:08:54filwit'pettiness' is just another way of saying "things i dont like that arn't major features" lol
21:09:32filwiti see, well as long as i can make my own modules that are included everywhere, i would be happy
21:09:36filwitis that possible?
21:09:46Araqkind of yes
21:10:01Araqmake an "import inlcude" and include that
21:10:02filwitso something like: nimrod c -implictInclude:global.nim main.nim
21:10:13Araqyeah we have taht too iirc
21:10:22Araqnever used it so I don't remember its name
21:10:33filwitokay, i will look it up and try it
21:12:13Araqdom96: I'm wrong max command line is more like 2MB these days
21:12:17filwitwhat's the difference between --import and --include again?
21:12:29Araq--import doesn't help you in this case
21:12:44Araqimport imports, include includes
21:12:55Araqyeah I know that's not a useful explanation
21:13:06Araqinclude is like C's #include
21:13:19Araqand import like a module system that C lacks
21:14:03filwitwell import imports exposed things right?
21:14:11Araqright
21:14:25dom96Araq: there ya go
21:14:31filwityeah, okay so --import works just fine
21:14:32filwitgreat
21:14:40filwitawesome, i can live happy with this :)
21:14:43dom96Araq: You know, you still have not tested babel :P
21:14:57Araqdom96: babel doesn't work
21:15:07Araqit can't work
21:15:16dom96what!? why?
21:15:17Araqeverybody now has an "utils" module
21:15:30AraqI need to fix the compiler to make it work
21:17:23dom96you can still test it :P
21:17:30Araqdom96: but jester_src_utils.c is much uglier and what's worse I only have absolute paths here
21:18:08Araqso it would be usr_ugly_unix_babel_jester-1.0_src_utils.c
21:18:20dom96that's why I told you
21:18:27dom96Base it on the PATH
21:18:30dom96that the compiler gets
21:18:49Araqwhat makes you think the PATH is not absolute?
21:19:14dom96ok, let me explain.
21:22:54dom96So the PATH to the jester package is: ~/.babel/pkgs/jester-0.1.0/, I import "jester/private/utils.nim". I guess you could just use the "jester/private/utils.nim"?
21:23:09dom96So jester_private_utils.c
21:24:01Araqok but this doesn't work if you use --path:jester/private and import utils but I guess packages can't do that
21:24:29Araqbut then I can't assume Babel is used either
21:24:41Araqso ... this doesn't work
21:24:54dom96I guess you can't trivially check whether the path will conflict.
21:25:09Araqand apart from that I don't store the "import path" anywhere anyway
21:25:21Araqso that would be lots of work
21:25:58*q66_ joined #nimrod
21:26:00Araqlets just try my way
21:26:32*q66 quit (Read error: Operation timed out)
21:26:39dom96also, why not just create directories :P
21:26:43filwitso wait, back to my declFunc thing.. could it work like this: on update do: ...
21:26:51filwitwhere 'on' and 'do' are macros
21:26:52dom96in the nimcache dir?
21:27:04filwit'update' is the name of the proc or whatever
21:28:10filwiti'm thinking about how you could apply it for a game engine script areas, where every nimrod file under the 'scripts' folder had implicit 'on' procs to handle game-engine callbacks (like Unity3D).. and that syntax would actually be really nice
21:28:33dom96Araq: Please think about it carefully, I fear these rules will end up with cases where the paths clash.
21:29:33Araqdom96: lots of directories in nimcache/ are annoying for debugging generated C code
21:29:47Araqin general directories are annoying
21:29:57Araqhierarchies are
21:30:36dom96I think a good file browser can help with that
21:30:42Araqyou want a banana but you have to write jungle.fruits.banana
21:30:48Araqlol yeah
21:30:56Araqa "good" file browser
21:31:00Araqwhere do I find that?
21:31:07Araqand how can I make Aporia use it?
21:31:17*dom96 adds another project to his todo list
21:31:27Araqever used google btw?
21:31:40Araqdoes it make you write jungle.fruits.banana?
21:31:52dom96The thing is, you're turning hierarchies into single files.
21:31:55Araqever wondered why it doesn't? now you know :P
21:32:07dom96it will certainly annoy people :P
21:32:20dom96To be honest I don't care that much.
21:32:25Araqgood
21:32:29dom96as long as it works
21:33:40AraqI wouldn't mind banana.fruits.jungle that much though because that's in the order how the brain works
21:34:05Araqforum.nimrod-code.org # good design
21:34:05dom96hrm, perhaps you should add the path to the nim file which was compiled to the .c sources
21:40:07Araqwhat do you mean?
21:41:19filwithttps://gist.github.com/PhilipWitte/6664132
21:41:23dom96In the generated .c files: "Generated from: path/blah/file.nim"
21:41:24filwitany way to get that to work?
21:41:37filwitor something similar
21:42:13dom96argh, github. Why do you mess up the indentation!?
21:42:29dom96Do I need to write my own pastebin now too?
21:43:09filwitgist has always worked well for me
21:47:30Araqyou can make it work with a macro for this case I think
21:47:41Araqproblem is that (a: b) is a tuple construction
21:47:53Araqand you want to turn it into a param declaration
21:48:15filwitwell i just want it to work, i don't care if it's a expr or tuple
21:48:19filwitlet me try with tuple
21:48:32Araqyou don't understand I think
21:48:53filwityeah i see
21:49:01filwitcause it's not the same thing
21:51:38AraqonUpdate do (y: int): ...
21:51:47Araqthat's what we had in mind
21:52:11Araqbut that passes a lambda to 'onUpdate'
21:53:37Araqyou could try a source code filter
21:54:42filwitis passing a lamba bad for performance?
21:55:24Araqit's not too bad but also not too good
21:55:32filwitcrap
21:55:39filwitcause i would be fine with the syntax
21:55:45filwitbut i don't want any performance hit
21:56:08filwithmm.. you know what, it might not matter maybe
21:57:12Araqer
21:57:22filwitbut i'll figure it out later i guess.
21:57:31filwiti need to take off, actually
21:57:43Araqwait a sec
21:57:46filwitokay
21:58:01Araq#! replace(sub="on ", by = "proc ")
21:58:15Araqtry that in some.tmpl file please
21:58:21Araqand include some.tmpl
21:58:33filwitwell that's actually not what i'm trying to do. but that's interesting
21:58:45Araqand in some.tmpl you can then use 'on ' instead of 'proc '
21:58:57Araqbut yeah likely not what you want
21:59:34Araqyou can easily make 'onUpdate' a macro though and eliminate the lambda this way
21:59:39filwiti don't want just another name for proc, i want to do some bookkeeping on when and where that proc is used... (wire it up to the game engine, for example)
21:59:51Araqyeah that's what I thought
22:01:10filwitfor the most part, things don't need incoming parameters... so just: on update: ... would be fine
22:01:29filwitbut sometimes, like with collisions, you want: on collision(c:CollisionPoint): ...
22:02:15filwiti'm thinking though, that i might be able to just pre-define these 'CollisionPoint' params
22:03:22filwitso.. template on(name:expr, body:stmt) = when name == collision: proc name = var c: CollisionPoint .. body
22:03:26filwitsomething like that
22:03:38filwitkinda hard to understand strung out like that
22:04:09*comex quit (Ping timeout: 252 seconds)
22:07:27filwithmm... how do i do the "when name == 'collide':" line exactly?
22:07:48*comex joined #nimrod
22:07:55Araqwhen astToStr(name) == "collide" I guess
22:08:45Araq ## This is often the same as the ``head`` result of ``splitPath``.
22:08:47Araq ## If there is no parent, ``path`` is returned.
22:08:52filwitk thanks i'll try
22:08:58Araqfrom 'parentDir's docs
22:09:04Araqgah, that is nastry
22:09:07Araq*nasty
22:09:12Araqit should return "" otherwise
22:09:30Araqwhile (let parent = parentDir(x); parent != ""): ...
22:10:15dom96just make it 'parent != x'?
22:10:28Araqbut that's stupid, no other API behaves this way
22:10:33dom96it should raise an error
22:10:39Araqno way
22:10:43dom96I swear we've discussed this before.
22:10:45Araqlook at my example code
22:10:49filwitlol
22:10:56Araqyes we did
22:11:01Araqbut I didn't push it enough
22:11:13Araqand now gradha went on and made it worse
22:11:16dom96it seems as if we never arrive at a solution
22:11:27filwitastToStr(name) == "collide" is not working :-/
22:11:37Araqwhy not?
22:12:00dom96somebody must have pulled his pull request *cough*
22:12:02filwithttps://gist.github.com/PhilipWitte/6664132
22:12:20filwitsays it can't find 'x' in the 'on collide:'
22:12:41Araqwelcome to the world of hygienic macros
22:12:57Araqyou need 'var x {.inject.} = 324
22:13:09filwitahh, okay
22:13:16dom96Well as I said before, I would rather get a good runtime error. Than for some code to later fail because parentDir returns ""
22:13:24Araqor just make the template a dirty, immediate
22:13:26filwiti thought when didn't introduce scope like D's static if
22:13:32Araqit doesn't
22:13:38Araqjust like in D
22:13:49Araqit has nothing to do with 'when' but with 'template'
22:13:51*io2 quit ()
22:14:06Araqjust make the template a {.immediate, dirty.}
22:14:15Araqthat's what everybody else does anyway ;-)
22:14:21filwitokay
22:14:21Araqand then it should work
22:14:55Araqdom96: but but but ... I like to loop without try ... except
22:15:22Araqand in any case, returning path unchanged is the worst of all worlds
22:15:30Araqreturn "" or raise
22:15:44Araqbut don't just return the old path. when is THAT useful?
22:16:11dom96does 'normalise' return "" when there is nothing to normalise? :P
22:16:36Araqnormalize cannot fail so it has nothing to do with the matter
22:16:42filwitwell it fixed one problem, but not the other
22:16:44filwitone sec
22:18:51filwithttps://gist.github.com/PhilipWitte/6664132
22:19:30Araqget rid of the 'params'
22:19:49Araqand of the 'inject' too
22:20:08filwitthat causes a different problem, one sec
22:20:52dom96Araq: I don't get what is so bad about returning the path unchanged.
22:21:01filwitupdated, just refresh the gist page
22:21:29Araq1. get rid of params
22:21:35Araq2. invoke like:
22:21:37Araqupdate()
22:21:57filwitoh, duh, completely missed the params..
22:22:17filwitgreat, it worked
22:22:18filwitthanks
22:22:53Araqdom96: oh well, I don't care
22:23:02filwitawesome.. so, that's not bad syntax for a script engine i think
22:23:20filwitjust as easy as Unity3D's, and you have much more power if you want
22:23:37Araqwow
22:23:45Araqcan't believe you like it :P
22:24:25Araqfinally you and Nimrod are getting warm ;-)
22:25:00dom96they're getting what now?
22:25:02filwiti'm trying to narrow down my options. I'll probably be working on my current app (the one i'm going to port to Nimrod) for another year or more, depending on how the marketers want to evolve it
22:25:30filwitso i have a lot of animation rendering stuff i've made in JS for it, and I would like to structure that into Nimrod in a more friendly way
22:26:09Araqdom96: I guess you can't say that in English this way :P
22:26:18Araqfilwit: nice
22:26:22filwitand i'm thinking, since i'll need a HTML5 canvas backend & an OpenGL backend, might be nice to start a little Nimrod 2D game sdk that targets both
22:26:39Araqexcellent, I have to sleep now
22:26:46Araqgood night
22:26:47filwitalright, night
22:27:30dom96lol, good night
22:29:31dom96filwit: You must make sure to convert some people on the D forums to the Nimrod side :P
22:31:45filwitthe connection might be worth something, but i don't actually post much on the D forums
22:32:15filwitand i may end up arguing against some of Nimrod's designs, lol.. but then, I'm liking that i can do some things like what i just figured out
22:32:21dom96ok, then you need to earn their trust first.
22:32:41dom96And then convert them from the inside :P
22:32:47filwitmaybe with a little game sdk example of how to use Nimrod like i want, more people there will agree
22:33:03filwityes, haha, infiltration
22:33:15Araqyou know
22:33:27Araqthey don't come here and try to convert us either
22:33:38Araqthat's not polite
22:33:48Araq*would be
22:33:53dom96Araq: shhhhh, you should be sleeping.
22:34:06filwitdom just has more ambition then they do :P
22:34:45dom96indeed
22:35:15dom96I remember a certain someone encouraging people to convert us on the D forums :P
22:35:29Araqwell I guess they might try it if we had a decently sized community ...
22:35:49dom96yea-- ... :(
22:35:51Araqwhat?
22:36:04Araqdo you mean me?
22:36:11dom96no
22:36:25filwiti'm sure things like presentations at StrangeLoop conferences and better documentation will help the community grow
22:36:26dom96Andrei or whatchma call him
22:37:00dom96oh yeah, in fact. We need to get to work on writing blog articles.
22:37:13filwityes ^ that too
22:37:22filwitgotta advertise a bit more i think
22:37:41filwitkeep new content coming to the web-page and get some "google juice"
22:37:59dom96This one really gathered a fair bit of attention: http://forum.nimrod-code.org/t/220
22:38:10dom96if we could sustain the momentum with articles like that
22:38:22dom96it would be great.
22:39:36AraqI will release my slides this week
22:39:54Araqwith an article that comes with it
22:40:02dom96good.
22:40:18dom96When will the video be public?
22:40:21filwitmake sure to talk about how much you love kittens... the internet loves kittens
22:40:31Araqno idea, dom96
22:40:47Araqfilwit: well I don't
22:41:15Araqbut you're right
22:41:20dom96puppies ftw
22:41:48Araqpussies?
22:42:36filwithaha, that might detour all the current "women in tech" activist groups if you write about that..
22:42:45Araqlol yeah, will talk about how much I love pussies instead
22:42:58filwitLOL
22:43:25filwitNimrod tech talk with a side of pornographic oversharing
22:45:12Araqwell here in germany we have a different problem
22:45:26Araqtoo few women are into waste management
22:45:33Araqand yet nobody talks about it!
22:45:44dom96haha
22:45:49filwitlol wut..
22:46:08AraqI call it a big discrimination
22:46:22filwitoh, haha
22:46:39Araqwe need to do something about it
22:46:52Araqsome free day where girls can practice to collect waste
22:47:36filwiti thought i knew what you where talking about.. but now i'm back to being confused ;P
22:47:41dom96oh yeah, I could use a maid.
22:47:50filwit^
22:48:22Araqfilwit: I think you understand me
22:48:43Araqjust forget the last sentence if it confuses you
22:49:35filwitokay folks, i'm taking off
22:49:49dom96bye filwit!
22:49:55filwitgood to talk with you both again, i will be around more
22:49:58filwitbye
22:50:00*filwit quit (Quit: Leaving)
22:50:54dom96well I might as well go to sleep then