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:38 | reactormonk | how do I map over $? .map($) tells me it expects an expression, .map(`$`) Error: '$' cannot be passed to a procvar |
01:26:48 | reactormonk | or, 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:02 | girvo | hey all |
10:48:40 | dom96 | hello girvo |
11:00:57 | girvo | out of curiosity, do many use nim on Mac? I know Aporia has problems with it |
11:01:52 | dom96 | I 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:20 | girvo | ah cool, cheers. seems to have great Windows support? |
11:02:36 | girvo | trying to decide what VM i should set-up for nimrod dev :) |
11:02:54 | dom96 | Yeah. I'd say it works best on Linux though. |
11:03:28 | girvo | Oh 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:31 | girvo | cheers dom96 :) |
11:03:59 | dom96 | Yeah, I heard that people are having the same issues as on Mac. Weird. |
11:04:04 | dom96 | It works fine for me on Arch Linux. |
11:04:10 | girvo | yeah, pretty much. x64? |
11:04:18 | dom96 | yes |
11:04:36 | girvo | huh weird. must be Canonical's fault (like every other damn problem I have with Ubuntu :P) |
11:04:52 | girvo | one of these days I should just deal with it and swap to arch |
11:06:55 | dom96 | lol |
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:32 | girvo | hi again! |
13:52:12 | girvo | very 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:42 | dom96 | girvo: not really. It's done using scgi. |
13:58:21 | girvo | dom96: ah cool. I thought about that, but I haven't touched scgi in a few years now. performance is okay? |
13:59:51 | dom96 | Guest58253: 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:00 | gsp | fair enough |
14:20:43 | * | dyu joined #nimrod |
14:27:05 | * | zhtx quit (Quit: Leaving.) |
14:44:45 | girvo | how stable is the httpserver module currently? (like, api wise) |
14:45:03 | girvo | the 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:19 | Araq | I'm back |
15:15:30 | Araq | but 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:06 | filwit | hey dom96 |
17:09:37 | filwit | what APIs, if any, are you guys using on the forums? |
17:09:42 | filwit | also, who rights it? |
17:10:39 | filwit | i forgot, but did i hear that you wrote it? or maybe i just mis-remember that? |
17:10:57 | filwit | i was going to say good job to the person who wrote it :) |
17:13:20 | filwit | i 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:16 | dom96 | hi filwit |
17:53:05 | dom96 | Take a look at the contributors stats on github, it was me, Araq and gradha who wrote it. |
17:53:30 | dom96 | The forum just uses jester. |
17:53:38 | dom96 | and the compiler's rst parser |
17:57:13 | filwit | nice, i'm taking a look at all this, one sec |
17:57:20 | Araq | hi filwit, I wrote the forum and then dom96 rewrote essentially every line ;-) |
17:57:22 | filwit | good work then, btw |
17:57:32 | filwit | hi Araq |
17:57:41 | filwit | k, i'll look at your response |
17:58:05 | Araq | what? |
17:58:10 | Araq | what response? |
17:58:20 | filwit | nevermind |
17:58:39 | filwit | i thought you where talking about the forum post i made |
17:58:54 | filwit | one sec |
17:59:05 | Araq | already read it |
17:59:21 | filwit | yeah i figured, besides it's just what i showed you before |
17:59:54 | filwit | just wanted to see what other's said about all that, and figured the forum was better than IRC for it |
18:00:24 | filwit | i really like the Nimrod syntax integration in the forums, btw |
18:00:42 | Araq | thanks |
18:00:51 | Araq | coming from you I know this means something ;-) |
18:01:16 | Araq | you surely know about design, everybody likes our new homepage |
18:01:35 | filwit | glad to hear it :) |
18:04:27 | filwit | btw, Araq, maybe you know |
18:04:53 | filwit | is there a way to do this: var x {.nodecl.}: SomeType ?? |
18:05:12 | Araq | yeah? just like the way you wrote it? |
18:05:31 | filwit | it caused some stack-trace error message |
18:05:43 | filwit | i think, i was trying a bunch of stuff |
18:05:54 | Araq | JS backend? |
18:06:02 | filwit | i will try again later, but you're saying it should work like that? |
18:06:08 | filwit | yes, for the JS backend |
18:06:11 | filwit | forgot to mention that |
18:06:37 | Araq | yeah that should work but it's not useful, use "importc" instead |
18:07:11 | Araq | otherwise the mangled symbol name is used but not declared anywhere |
18:07:28 | Araq | or maybe nodecl implies importc ... can't remember |
18:07:55 | filwit | okay, i will test it later and ask you |
18:08:12 | filwit | also, there's no {.forceinline.} ability anywhere is there? |
18:08:36 | Araq | no but there is .inline |
18:08:46 | filwit | i'm assuming not, since you probably just pass __inline down to the C compiler |
18:08:48 | Araq | for forceinline a template should do the job |
18:09:02 | filwit | oh right, right, dom told me that too |
18:09:07 | filwit | i forgot, haha |
18:09:19 | Araq | yeah for now, but I have a new optimizer in the works |
18:09:33 | Araq | well it's in the "design phase" |
18:09:58 | Araq | turns out that you get a global CSE for free when you do the control flow dependent typing |
18:10:20 | filwit | CSE? |
18:12:11 | filwit | jester looks pretty cool as well, dom. What does the '@' do to strings again? |
18:16:07 | Araq | cse = common subexpression elimination |
18:18:14 | dom96 | filwit: it grabs a piece of form data, or the corresponding @name in the url pattern, or the value of a query string. |
18:21:24 | filwit | aw, i see. didn't do a full read through. Thought it was a built-in string operator |
18:22:27 | filwit | i was looking at Adrian's code here: https://github.com/AdrianV/nimrod-tools/blob/master/oopExample2.nim |
18:22:34 | filwit | and it looks pretty cool |
18:22:51 | filwit | that's the sort of thing i was trying to do before, but couldn't get it to work |
18:23:39 | filwit | is it possible to do something similar to his 'declClass' macro, but for procs ? |
18:24:09 | filwit | like... declFunc foo(bar:int): ... |
18:24:21 | filwit | ? |
18:25:18 | Araq | kind of yeah |
18:26:51 | Araq | declFunc do (bar: int) -> gah: |
18:26:53 | Araq | ... |
18:28:04 | Araq | I dislike that we don't have 'specialRoutine foo(bar: int) = ...' but it's hard to do with nimrod's parsing technology |
18:34:53 | filwit | yeah that would be interesting |
18:35:06 | filwit | so could i do something like: |
18:35:23 | filwit | declType Foo from Bar: ... |
18:35:51 | filwit | declFunc baz gives int: ... |
18:36:12 | filwit | where 'from' and 'gives' are the same as your '->' operator? |
18:36:49 | Araq | no |
18:37:05 | filwit | hmm, okay |
18:37:05 | Araq | 'do' is a keyword introducing a lambda |
18:37:27 | filwit | 'do'? |
18:37:34 | filwit | you mean the ->? |
18:37:45 | Araq | no I mean 'do' |
18:38:29 | filwit | okay. well i will take a deeper look at it later |
18:45:02 | Araq | filwit: what time is it for you? |
18:46:07 | filwit | 2:45 |
18:46:21 | filwit | well, 14:45 |
18:47:33 | Araq | hmm that's why it all feels wrong |
18:57:04 | dom96 | It's called jetlag :P |
19:20:02 | * | algoban joined #nimrod |
19:20:06 | * | algoban left #nimrod (#nimrod) |
19:29:25 | Araq | filwit: you never answered how 'var Foo' would be handled with your scheme |
19:29:38 | Araq | proc var Foo.abc(x: int) ? |
19:29:42 | Araq | for |
19:29:52 | Araq | proc abc(this: var Foo, x: int) |
19:57:57 | * | dyu quit (Quit: Leaving) |
19:59:30 | filwit | sorry, was gone for a sec |
20:00:15 | filwit | and yes, just like that i think |
20:00:23 | filwit | unless there's some issue with that |
20:01:21 | filwit | or.. hmm.. wouldn't it default to that? |
20:01:26 | filwit | so: |
20:01:42 | Araq | it would work but it's ugly imo |
20:01:43 | filwit | proc Foo.abc() |
20:01:44 | filwit | for |
20:01:51 | filwit | proc abc(this: var Foo) |
20:02:02 | Araq | meh |
20:02:04 | filwit | since you normally want that |
20:02:15 | Araq | no |
20:02:18 | Araq | if you have |
20:02:25 | Araq | type Foo = ref object |
20:02:28 | Araq | you don't |
20:02:36 | filwit | ah, right right |
20:02:51 | filwit | yeah, so just the 'proc var Foo()' then |
20:03:11 | filwit | but hey, if there's some way i could define my own through macros, i am not care |
20:03:33 | filwit | like that: declFunc foo(): .. |
20:03:48 | filwit | if that can work like i want, then i'll work around that |
20:04:09 | filwit | if not, i'm not gunna try and fight for a feature no one wants |
20:04:12 | Araq | there needs to be a 'do' in there though |
20:04:32 | filwit | ahh.. i see what you meant now |
20:04:40 | filwit | so '->' == 'do'? |
20:04:49 | Araq | but I'd just use the declClass or something macro |
20:05:04 | Araq | that does want you want even more nicely anyway |
20:05:10 | dom96 | I 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:24 | Araq | dom96: well have that |
20:05:32 | Araq | it's not in the stdlib though |
20:05:33 | filwit | yes, i agree with dom96 |
20:05:59 | filwit | but i have a couple of ideas and questions about what's possible |
20:06:09 | filwit | which will take some time for me to digg through things again |
20:06:20 | filwit | and i don't really have the time to do that just yet |
20:06:41 | Araq | good I don't feel like thinking anyway |
20:06:51 | Araq | my stomach seeks to explode for some reason |
20:07:13 | filwit | ate too much :) |
20:07:17 | filwit | are you back in Germany? |
20:08:05 | filwit | oh, one question though. is there a way to make a "static object"? |
20:08:17 | filwit | type Foo = global object ... |
20:08:25 | filwit | so then i can just use 'Foo' |
20:08:45 | * | Guest_1134 joined #nimrod |
20:08:46 | filwit | without needed to do: type TFoo = object ... var Foo: TFoo |
20:09:13 | * | Guest_1134 quit (Client Quit) |
20:09:22 | filwit | just wondering |
20:10:49 | dom96 | I don't think so. |
20:11:20 | Araq | no and it's misguided |
20:11:26 | dom96 | What would you use it for? |
20:11:35 | filwit | sanity :P |
20:11:54 | Araq | objects use nominal typing so ... the type name is important |
20:12:14 | * | dom96 was looking for an example |
20:13:03 | filwit | yeah, Araq.. i think something to 'grab' the TypeInfo of a def is a better system |
20:13:19 | filwit | typeof(instance).name # const data |
20:13:31 | filwit | type of thing |
20:13:45 | filwit | and it's not so rigid i think |
20:13:46 | Araq | type(instance).name should do exactly that |
20:14:08 | Araq | but then you prefer to write type(Foo) everywhere instead of TFoo ? |
20:14:18 | filwit | right, so why does there need to be a unique name for the Type of a global instance? |
20:14:18 | Araq | you're a strange guy ... :P |
20:14:35 | filwit | yes, i prefer write type(Foo) everywhere |
20:14:54 | filwit | i think it helps with sanity on large code bases |
20:15:04 | filwit | less symbols to remember |
20:15:41 | Araq | 'T' is a common prefix though, no need to "remember" it if you *use* the language |
20:15:51 | filwit | so 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:07 | Araq | how so? |
20:16:14 | Araq | var otherFoo: type(Foo) |
20:16:29 | filwit | true, it's a common prefix, but it helps developers to understand structure if they see how the type is used, at definition |
20:17:05 | filwit | good point |
20:17:38 | filwit | still prefer it for naming, but that's just a personal preference i guess |
20:17:44 | Araq | devs are more helped by a proper CS education instead of your constant fight to care the biggest dumbass around |
20:17:51 | Araq | *to care for |
20:18:16 | filwit | there are reasons verbose syntax help sanity i think |
20:19:20 | Araq | and yet you propose a shortcut for singletons |
20:19:24 | filwit | it helps you focus on important data, how often is type(Foo) really used? |
20:19:39 | Araq | it could be everywhere |
20:19:52 | Araq | proc a(this: var TFoo) ... |
20:19:57 | dom96 | i'm confused, are we still discussing static objects or 'T' prefixes now. |
20:20:03 | dom96 | ? |
20:20:15 | Araq | dom96: both I think |
20:20:35 | filwit | they are related |
20:22:41 | Araq | filwit: lets flip this: |
20:23:02 | Araq | if a guy comes along and says "waaah, I can't remember the T prefix for types" |
20:23:10 | Araq | would really like to work with him? |
20:23:27 | Araq | *would you |
20:23:53 | filwit | that has little objective relevance to the pros or cons of my arguments |
20:23:57 | Araq | chances are high he can't script your cool game anyway, right? |
20:24:22 | filwit | that's a horrible outlook, lol |
20:25:02 | Araq | but it's relevant in the sense that I think you think way too much about trivialities |
20:25:13 | dom96 | I guess you could think of a module as a static object, if I understand static objects correctly. |
20:25:24 | Araq | dom96: yes that's correct |
20:25:41 | filwit | we are talking about language syntax design, Araq.. it's all trivial details at this level |
20:25:49 | * | Associat0r quit (Quit: Associat0r) |
20:26:11 | Araq | no. there are objectively bad syntaxes simply because they are ambiguous or very hard to parse |
20:26:49 | filwit | yes, true. |
20:27:11 | filwit | but i don't see "it's trivial to me" as a convincing argument |
20:27:31 | filwit | i'm not sitting here saying "you have to use do it or NOONE will use the language" |
20:27:37 | Araq | sure |
20:28:19 | Araq | but then you're the only guy that constantly comes up with strange things like that ;-) ok, daddye does too |
20:28:59 | Araq | the real thing is: you're not grateful :P |
20:29:13 | filwit | haha |
20:29:20 | Araq | program in Pascal and Ada for a few years and then tell me Nimrod's syntax isn't pure joy |
20:29:27 | filwit | nah, i just like language design, even the petty things about it |
20:29:53 | filwit | and i would never program in Pascal or Ada, nor am I claiming Nimrod is comparable to those languages |
20:30:44 | filwit | but 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:17 | filwit | so i raise those arguments here sometimes... really it was just my question that sparked this argument anyways, lol |
20:31:40 | filwit | you're the one who originally claimed it was misguided thinking |
20:31:56 | Araq | knowing the history of the C#/D syntax that's a hard sell here ... |
20:32:08 | filwit | sorry, that sounded more accusatory than i meant it |
20:32:47 | filwit | well i wasn't advocating C#/D get everything right, there are some really nice features of Nimrod, even in the syntax, lol |
20:33:30 | filwit | i don't mind the Python style (expect the object decl syntax), and I like the macro/template/proc definitions and stuff |
20:33:37 | filwit | more than C#/D i mean |
20:34:19 | filwit | the only really issue i have with Nimrod, is categorizing things bye objects, like i'm used to in those languages |
20:34:31 | filwit | the line between types and modules is very blurred in Nimrod |
20:34:39 | Araq | lol |
20:34:46 | Araq | in fact it's the opposite |
20:34:48 | filwit | and while that's good, some people like thinking that way. it's also confusing to some |
20:35:11 | Araq | it's 'class' that completely blurs things |
20:35:41 | filwit | well, actually, you might be right about that, and it brings me to another question i had |
20:35:54 | filwit | can i do this: Console.log("...") |
20:36:01 | Araq | I know it's useful for you but *objectively* it really does, go read a book about it ;-) |
20:36:03 | filwit | where 'Console' is module? |
20:36:09 | dom96 | yes |
20:36:09 | Araq | yeah |
20:36:39 | dom96 | I still would like to see an example of where static classes really are useful. |
20:36:42 | * | dom96 is curious |
20:36:47 | filwit | so basically i don't need to use types for global objects? i can just use modules |
20:37:26 | dom96 | I guess in C# you can't just have global functions, you need an enclosing class. So you would create a static class. |
20:37:30 | filwit | also, what i meant bye "Console.log()" is that i don't import it where "log" is available without the prefix |
20:37:34 | filwit | is that possible? |
20:37:59 | filwit | so basically you could either "import Console" then just use 'log', or you could just use "Console.log".. ? |
20:38:06 | filwit | guess i should just try it out... |
20:38:08 | filwit | one sec |
20:38:43 | dom96 | no, you need to import it. |
20:38:53 | dom96 | Same way you need a reference to something in C#. |
20:39:01 | dom96 | (and a 'use'?) |
20:39:21 | dom96 | hrm, nah I guess the 'use' is not needed. |
20:41:02 | filwit | that's the problem with modules then |
20:41:07 | filwit | compared to static objects |
20:41:28 | filwit | cause i don't want to "import" everything inside of Console into my module |
20:41:42 | dom96 | You can do: from console import nil |
20:41:57 | filwit | hmm... that's an interesting idea |
20:42:28 | filwit | maybe I could make a template that makes that easier.. using Console |
20:42:44 | filwit | where 'using' is template that just spits out: from Console import nil |
20:42:49 | dom96 | But I don't see why you would, unless you want to get rid of a lot of ambiguities |
20:44:27 | filwit | ^ yes that |
20:44:46 | Araq | filwit: you need the import; ultimately the IDE can produce it for you though |
20:44:47 | filwit | and so i can think of modules like static objects... at least to a degree... |
20:45:09 | filwit | they still can't have hierarchy like static objects can |
20:45:43 | dom96 | what if you put a global var in your module? :P |
20:45:58 | filwit | Araq: it's not about typing the import at the top, it's about not being able to use 'log' without the prefix |
20:46:12 | dom96 | hrm, nah, that's probably a bad idea. |
20:46:21 | Araq | dom96: I'm making the compiler 'guess' the package name from the directory the module resides in |
20:46:26 | dom96 | filwit: why is that so important to you? |
20:46:28 | filwit | dom96: i don't follow |
20:46:40 | dom96 | Araq: what? |
20:46:56 | Araq | like jester/src/foo.nim --> jester_foo.c |
20:47:31 | Araq | the rule I have in mind is: parentDir(filename) unless that is in ["src", "source" |
20:47:39 | dom96 | oh, right. Well. 'guess' sounds risky. |
20:47:45 | Araq | , "package", "pckg", "lib", "library" ] |
20:47:52 | Araq | then we go further up |
20:48:11 | dom96 | I think it should go from the directory that is in Nimrod's PATH |
20:48:32 | Araq | I don't see how that changes anything |
20:49:14 | dom96 | why are you ignoring the 'src' etc? |
20:49:22 | Araq | and a heuristic seems to be good enough, we only need the prefix for disambiguation |
20:49:26 | Araq | because |
20:49:37 | Araq | jester/src/utils.nim |
20:49:46 | Araq | fooPackage/src/utils.nim |
20:49:49 | Araq | might be common |
20:50:43 | Araq | dunno what Babel says about this |
20:50:47 | dom96 | huh |
20:51:07 | dom96 | What if we have: jester/src/utils.nim and jester/source/utils.nim? |
20:51:15 | Araq | 2 jesters? |
20:51:35 | Araq | Babel can't handle it this way |
20:51:39 | Araq | it would be |
20:51:43 | Araq | jester-1.0/src |
20:51:50 | Araq | jester-1.1/source |
20:52:03 | Araq | and then it's fine again :P |
20:52:14 | dom96 | I don't see the problem in just making it: jester_src_utils.c |
20:52:34 | Araq | max command line length is 4K on linux iirc |
20:52:41 | Araq | so long names suck |
20:52:55 | dom96 | well, don't assume that people are going to be using babel |
20:53:18 | filwit | okay, great, i guess i can live with this, haha |
20:53:22 | dom96 | 4k should be enough |
20:53:36 | filwit | template using(e:expr) = from e import nil |
20:53:41 | filwit | works out very well :) |
20:54:39 | filwit | is there a way to make every compiled file implicitly import another nim right? |
20:54:43 | Araq | yup, it's superb, making me write Console.write like I'm some idiot |
20:54:58 | Araq | I appreciate these things |
20:55:10 | Araq | ;-) |
20:55:21 | filwit | haha, well it's good for script kiddies dude |
20:55:27 | Araq | so you say |
20:55:36 | filwit | and if you write a game engine, you want to make limitations that way |
20:55:46 | filwit | and if you dont like it.. just use 'import Console" |
20:55:49 | filwit | fixed |
20:56:01 | filwit | so both are still supported |
20:56:03 | filwit | i like it |
20:56:28 | Araq | why? 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:34 | dom96 | yay, Nimrod will become C# |
20:56:38 | filwit | i would actually advocate to make a built-in 'using' template to the object.nim |
20:56:59 | * | Araq doesn't get it |
20:57:15 | filwit | that's not an argument Araq, it's all just ad hominem |
20:57:36 | Araq | yeah 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:39 | dom96 | filwit: why do you prefer to waste hours of your life typing 'console'? |
20:57:59 | filwit | the point is to limit the brain power required so the programmer can focus on other tasks |
20:58:04 | Araq | filwit: I don't mean it personal |
20:58:16 | Araq | like what other tasks? |
20:58:21 | filwit | dome96: yes, i prefer to type Console.write than echo for large projects |
20:58:32 | dom96 | huh? |
20:58:37 | Araq | like what can I do apart from *reading*? |
20:58:47 | dom96 | If anything you need to use more brain power to remember the extra piece of info, which is 'console'. |
20:58:48 | Araq | play some game at the same time? |
20:59:11 | filwit | Araq: reading other's code in a large code base is very important |
20:59:39 | Araq | reading 'Console.' all over place doesn't help with reading |
20:59:57 | filwit | dom96: no, because then you catagorize everything under 'console'. there's less symbols to remember, especially with inteli-sense |
21:00:11 | dom96 | ahh, so the point is to be able to find the function quickly. Because you know it's part of some 'Console' class. |
21:00:33 | filwit | Araq: Console is just an example. the point is to use if for other things, like Physics.rayCast(...) |
21:00:39 | Araq | and nobody actually really *reads* code, it's too large anyway, instead you skim around and fix what's wrong |
21:00:58 | Araq | in my experience anyway |
21:01:11 | Araq | but sure |
21:01:23 | Araq | go ahead and read the 100K of Quake's engine |
21:01:24 | filwit | Araq: 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:12 | filwit | Quakes 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:40 | filwit | i also have never read the Quake code, so idk what it's like |
21:03:12 | filwit | you know guys.. this is really hard to talk to both you over text.. |
21:03:18 | Araq | it was just an example |
21:03:22 | filwit | we should just talk sometime over skype |
21:03:38 | filwit | i think we can do conference calls there right? |
21:03:49 | Araq | sure thing |
21:04:05 | Araq | but it's bad for the people who read logs |
21:04:34 | Araq | filwit: the real problem that I have is that you optimize for the *casual* reader |
21:04:41 | filwit | yes, but it's hard to give eachother time to be clear, and talk to multiple people at the same time |
21:04:57 | Araq | not for the guy who already *knows* quite a bit about your code base |
21:05:06 | filwit | Araq: i just want the *ability* to optimize for the casual user |
21:05:25 | filwit | Araq: and i'm glad to see that my using template makes that much easier |
21:05:30 | Araq | yeah but no need to argue for that, nimrod in this case gives you want |
21:05:40 | Araq | *gives you want you want |
21:05:43 | filwit | Araq: i really would suggest adding that to the object.nim as an option for people |
21:06:12 | filwit | Araq: the 'using' template i mean |
21:07:07 | Araq | well zahary doesn't like it, we wants to make 'using' a keyword for Pascal-like 'with' functionality |
21:07:50 | filwit | yes you told me that |
21:07:50 | Araq | and I don't like it because it encourages pettiness which I increasingly cannot stand anymore |
21:08:04 | filwit | if that's actually going to happen, i would argue 'with' is a better name for it |
21:08:42 | Araq | in the near future I will demand "show me in a very concrete way how it avoids bugs" ;-) |
21:08:54 | filwit | 'pettiness' is just another way of saying "things i dont like that arn't major features" lol |
21:09:32 | filwit | i see, well as long as i can make my own modules that are included everywhere, i would be happy |
21:09:36 | filwit | is that possible? |
21:09:46 | Araq | kind of yes |
21:10:01 | Araq | make an "import inlcude" and include that |
21:10:02 | filwit | so something like: nimrod c -implictInclude:global.nim main.nim |
21:10:13 | Araq | yeah we have taht too iirc |
21:10:22 | Araq | never used it so I don't remember its name |
21:10:33 | filwit | okay, i will look it up and try it |
21:12:13 | Araq | dom96: I'm wrong max command line is more like 2MB these days |
21:12:17 | filwit | what's the difference between --import and --include again? |
21:12:29 | Araq | --import doesn't help you in this case |
21:12:44 | Araq | import imports, include includes |
21:12:55 | Araq | yeah I know that's not a useful explanation |
21:13:06 | Araq | include is like C's #include |
21:13:19 | Araq | and import like a module system that C lacks |
21:14:03 | filwit | well import imports exposed things right? |
21:14:11 | Araq | right |
21:14:25 | dom96 | Araq: there ya go |
21:14:31 | filwit | yeah, okay so --import works just fine |
21:14:32 | filwit | great |
21:14:40 | filwit | awesome, i can live happy with this :) |
21:14:43 | dom96 | Araq: You know, you still have not tested babel :P |
21:14:57 | Araq | dom96: babel doesn't work |
21:15:07 | Araq | it can't work |
21:15:16 | dom96 | what!? why? |
21:15:17 | Araq | everybody now has an "utils" module |
21:15:30 | Araq | I need to fix the compiler to make it work |
21:17:23 | dom96 | you can still test it :P |
21:17:30 | Araq | dom96: but jester_src_utils.c is much uglier and what's worse I only have absolute paths here |
21:18:08 | Araq | so it would be usr_ugly_unix_babel_jester-1.0_src_utils.c |
21:18:20 | dom96 | that's why I told you |
21:18:27 | dom96 | Base it on the PATH |
21:18:30 | dom96 | that the compiler gets |
21:18:49 | Araq | what makes you think the PATH is not absolute? |
21:19:14 | dom96 | ok, let me explain. |
21:22:54 | dom96 | So 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:09 | dom96 | So jester_private_utils.c |
21:24:01 | Araq | ok but this doesn't work if you use --path:jester/private and import utils but I guess packages can't do that |
21:24:29 | Araq | but then I can't assume Babel is used either |
21:24:41 | Araq | so ... this doesn't work |
21:24:54 | dom96 | I guess you can't trivially check whether the path will conflict. |
21:25:09 | Araq | and apart from that I don't store the "import path" anywhere anyway |
21:25:21 | Araq | so that would be lots of work |
21:25:58 | * | q66_ joined #nimrod |
21:26:00 | Araq | lets just try my way |
21:26:32 | * | q66 quit (Read error: Operation timed out) |
21:26:39 | dom96 | also, why not just create directories :P |
21:26:43 | filwit | so wait, back to my declFunc thing.. could it work like this: on update do: ... |
21:26:51 | filwit | where 'on' and 'do' are macros |
21:26:52 | dom96 | in the nimcache dir? |
21:27:04 | filwit | 'update' is the name of the proc or whatever |
21:28:10 | filwit | i'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:33 | dom96 | Araq: Please think about it carefully, I fear these rules will end up with cases where the paths clash. |
21:29:33 | Araq | dom96: lots of directories in nimcache/ are annoying for debugging generated C code |
21:29:47 | Araq | in general directories are annoying |
21:29:57 | Araq | hierarchies are |
21:30:36 | dom96 | I think a good file browser can help with that |
21:30:42 | Araq | you want a banana but you have to write jungle.fruits.banana |
21:30:48 | Araq | lol yeah |
21:30:56 | Araq | a "good" file browser |
21:31:00 | Araq | where do I find that? |
21:31:07 | Araq | and how can I make Aporia use it? |
21:31:17 | * | dom96 adds another project to his todo list |
21:31:27 | Araq | ever used google btw? |
21:31:40 | Araq | does it make you write jungle.fruits.banana? |
21:31:52 | dom96 | The thing is, you're turning hierarchies into single files. |
21:31:55 | Araq | ever wondered why it doesn't? now you know :P |
21:32:07 | dom96 | it will certainly annoy people :P |
21:32:20 | dom96 | To be honest I don't care that much. |
21:32:25 | Araq | good |
21:32:29 | dom96 | as long as it works |
21:33:40 | Araq | I wouldn't mind banana.fruits.jungle that much though because that's in the order how the brain works |
21:34:05 | Araq | forum.nimrod-code.org # good design |
21:34:05 | dom96 | hrm, perhaps you should add the path to the nim file which was compiled to the .c sources |
21:40:07 | Araq | what do you mean? |
21:41:19 | filwit | https://gist.github.com/PhilipWitte/6664132 |
21:41:23 | dom96 | In the generated .c files: "Generated from: path/blah/file.nim" |
21:41:24 | filwit | any way to get that to work? |
21:41:37 | filwit | or something similar |
21:42:13 | dom96 | argh, github. Why do you mess up the indentation!? |
21:42:29 | dom96 | Do I need to write my own pastebin now too? |
21:43:09 | filwit | gist has always worked well for me |
21:47:30 | Araq | you can make it work with a macro for this case I think |
21:47:41 | Araq | problem is that (a: b) is a tuple construction |
21:47:53 | Araq | and you want to turn it into a param declaration |
21:48:15 | filwit | well i just want it to work, i don't care if it's a expr or tuple |
21:48:19 | filwit | let me try with tuple |
21:48:32 | Araq | you don't understand I think |
21:48:53 | filwit | yeah i see |
21:49:01 | filwit | cause it's not the same thing |
21:51:38 | Araq | onUpdate do (y: int): ... |
21:51:47 | Araq | that's what we had in mind |
21:52:11 | Araq | but that passes a lambda to 'onUpdate' |
21:53:37 | Araq | you could try a source code filter |
21:54:42 | filwit | is passing a lamba bad for performance? |
21:55:24 | Araq | it's not too bad but also not too good |
21:55:32 | filwit | crap |
21:55:39 | filwit | cause i would be fine with the syntax |
21:55:45 | filwit | but i don't want any performance hit |
21:56:08 | filwit | hmm.. you know what, it might not matter maybe |
21:57:12 | Araq | er |
21:57:22 | filwit | but i'll figure it out later i guess. |
21:57:31 | filwit | i need to take off, actually |
21:57:43 | Araq | wait a sec |
21:57:46 | filwit | okay |
21:58:01 | Araq | #! replace(sub="on ", by = "proc ") |
21:58:15 | Araq | try that in some.tmpl file please |
21:58:21 | Araq | and include some.tmpl |
21:58:33 | filwit | well that's actually not what i'm trying to do. but that's interesting |
21:58:45 | Araq | and in some.tmpl you can then use 'on ' instead of 'proc ' |
21:58:57 | Araq | but yeah likely not what you want |
21:59:34 | Araq | you can easily make 'onUpdate' a macro though and eliminate the lambda this way |
21:59:39 | filwit | i 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:51 | Araq | yeah that's what I thought |
22:01:10 | filwit | for the most part, things don't need incoming parameters... so just: on update: ... would be fine |
22:01:29 | filwit | but sometimes, like with collisions, you want: on collision(c:CollisionPoint): ... |
22:02:15 | filwit | i'm thinking though, that i might be able to just pre-define these 'CollisionPoint' params |
22:03:22 | filwit | so.. template on(name:expr, body:stmt) = when name == collision: proc name = var c: CollisionPoint .. body |
22:03:26 | filwit | something like that |
22:03:38 | filwit | kinda hard to understand strung out like that |
22:04:09 | * | comex quit (Ping timeout: 252 seconds) |
22:07:27 | filwit | hmm... how do i do the "when name == 'collide':" line exactly? |
22:07:48 | * | comex joined #nimrod |
22:07:55 | Araq | when astToStr(name) == "collide" I guess |
22:08:45 | Araq | ## This is often the same as the ``head`` result of ``splitPath``. |
22:08:47 | Araq | ## If there is no parent, ``path`` is returned. |
22:08:52 | filwit | k thanks i'll try |
22:08:58 | Araq | from 'parentDir's docs |
22:09:04 | Araq | gah, that is nastry |
22:09:07 | Araq | *nasty |
22:09:12 | Araq | it should return "" otherwise |
22:09:30 | Araq | while (let parent = parentDir(x); parent != ""): ... |
22:10:15 | dom96 | just make it 'parent != x'? |
22:10:28 | Araq | but that's stupid, no other API behaves this way |
22:10:33 | dom96 | it should raise an error |
22:10:39 | Araq | no way |
22:10:43 | dom96 | I swear we've discussed this before. |
22:10:45 | Araq | look at my example code |
22:10:49 | filwit | lol |
22:10:56 | Araq | yes we did |
22:11:01 | Araq | but I didn't push it enough |
22:11:13 | Araq | and now gradha went on and made it worse |
22:11:16 | dom96 | it seems as if we never arrive at a solution |
22:11:27 | filwit | astToStr(name) == "collide" is not working :-/ |
22:11:37 | Araq | why not? |
22:12:00 | dom96 | somebody must have pulled his pull request *cough* |
22:12:02 | filwit | https://gist.github.com/PhilipWitte/6664132 |
22:12:20 | filwit | says it can't find 'x' in the 'on collide:' |
22:12:41 | Araq | welcome to the world of hygienic macros |
22:12:57 | Araq | you need 'var x {.inject.} = 324 |
22:13:09 | filwit | ahh, okay |
22:13:16 | dom96 | Well as I said before, I would rather get a good runtime error. Than for some code to later fail because parentDir returns "" |
22:13:24 | Araq | or just make the template a dirty, immediate |
22:13:26 | filwit | i thought when didn't introduce scope like D's static if |
22:13:32 | Araq | it doesn't |
22:13:38 | Araq | just like in D |
22:13:49 | Araq | it has nothing to do with 'when' but with 'template' |
22:13:51 | * | io2 quit () |
22:14:06 | Araq | just make the template a {.immediate, dirty.} |
22:14:15 | Araq | that's what everybody else does anyway ;-) |
22:14:21 | filwit | okay |
22:14:21 | Araq | and then it should work |
22:14:55 | Araq | dom96: but but but ... I like to loop without try ... except |
22:15:22 | Araq | and in any case, returning path unchanged is the worst of all worlds |
22:15:30 | Araq | return "" or raise |
22:15:44 | Araq | but don't just return the old path. when is THAT useful? |
22:16:11 | dom96 | does 'normalise' return "" when there is nothing to normalise? :P |
22:16:36 | Araq | normalize cannot fail so it has nothing to do with the matter |
22:16:42 | filwit | well it fixed one problem, but not the other |
22:16:44 | filwit | one sec |
22:18:51 | filwit | https://gist.github.com/PhilipWitte/6664132 |
22:19:30 | Araq | get rid of the 'params' |
22:19:49 | Araq | and of the 'inject' too |
22:20:08 | filwit | that causes a different problem, one sec |
22:20:52 | dom96 | Araq: I don't get what is so bad about returning the path unchanged. |
22:21:01 | filwit | updated, just refresh the gist page |
22:21:29 | Araq | 1. get rid of params |
22:21:35 | Araq | 2. invoke like: |
22:21:37 | Araq | update() |
22:21:57 | filwit | oh, duh, completely missed the params.. |
22:22:17 | filwit | great, it worked |
22:22:18 | filwit | thanks |
22:22:53 | Araq | dom96: oh well, I don't care |
22:23:02 | filwit | awesome.. so, that's not bad syntax for a script engine i think |
22:23:20 | filwit | just as easy as Unity3D's, and you have much more power if you want |
22:23:37 | Araq | wow |
22:23:45 | Araq | can't believe you like it :P |
22:24:25 | Araq | finally you and Nimrod are getting warm ;-) |
22:25:00 | dom96 | they're getting what now? |
22:25:02 | filwit | i'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:30 | filwit | so 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:09 | Araq | dom96: I guess you can't say that in English this way :P |
22:26:18 | Araq | filwit: nice |
22:26:22 | filwit | and 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:39 | Araq | excellent, I have to sleep now |
22:26:46 | Araq | good night |
22:26:47 | filwit | alright, night |
22:27:30 | dom96 | lol, good night |
22:29:31 | dom96 | filwit: You must make sure to convert some people on the D forums to the Nimrod side :P |
22:31:45 | filwit | the connection might be worth something, but i don't actually post much on the D forums |
22:32:15 | filwit | and 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:21 | dom96 | ok, then you need to earn their trust first. |
22:32:41 | dom96 | And then convert them from the inside :P |
22:32:47 | filwit | maybe with a little game sdk example of how to use Nimrod like i want, more people there will agree |
22:33:03 | filwit | yes, haha, infiltration |
22:33:15 | Araq | you know |
22:33:27 | Araq | they don't come here and try to convert us either |
22:33:38 | Araq | that's not polite |
22:33:48 | Araq | *would be |
22:33:53 | dom96 | Araq: shhhhh, you should be sleeping. |
22:34:06 | filwit | dom just has more ambition then they do :P |
22:34:45 | dom96 | indeed |
22:35:15 | dom96 | I remember a certain someone encouraging people to convert us on the D forums :P |
22:35:29 | Araq | well I guess they might try it if we had a decently sized community ... |
22:35:49 | dom96 | yea-- ... :( |
22:35:51 | Araq | what? |
22:36:04 | Araq | do you mean me? |
22:36:11 | dom96 | no |
22:36:25 | filwit | i'm sure things like presentations at StrangeLoop conferences and better documentation will help the community grow |
22:36:26 | dom96 | Andrei or whatchma call him |
22:37:00 | dom96 | oh yeah, in fact. We need to get to work on writing blog articles. |
22:37:13 | filwit | yes ^ that too |
22:37:22 | filwit | gotta advertise a bit more i think |
22:37:41 | filwit | keep new content coming to the web-page and get some "google juice" |
22:37:59 | dom96 | This one really gathered a fair bit of attention: http://forum.nimrod-code.org/t/220 |
22:38:10 | dom96 | if we could sustain the momentum with articles like that |
22:38:22 | dom96 | it would be great. |
22:39:36 | Araq | I will release my slides this week |
22:39:54 | Araq | with an article that comes with it |
22:40:02 | dom96 | good. |
22:40:18 | dom96 | When will the video be public? |
22:40:21 | filwit | make sure to talk about how much you love kittens... the internet loves kittens |
22:40:31 | Araq | no idea, dom96 |
22:40:47 | Araq | filwit: well I don't |
22:41:15 | Araq | but you're right |
22:41:20 | dom96 | puppies ftw |
22:41:48 | Araq | pussies? |
22:42:36 | filwit | haha, that might detour all the current "women in tech" activist groups if you write about that.. |
22:42:45 | Araq | lol yeah, will talk about how much I love pussies instead |
22:42:58 | filwit | LOL |
22:43:25 | filwit | Nimrod tech talk with a side of pornographic oversharing |
22:45:12 | Araq | well here in germany we have a different problem |
22:45:26 | Araq | too few women are into waste management |
22:45:33 | Araq | and yet nobody talks about it! |
22:45:44 | dom96 | haha |
22:45:49 | filwit | lol wut.. |
22:46:08 | Araq | I call it a big discrimination |
22:46:22 | filwit | oh, haha |
22:46:39 | Araq | we need to do something about it |
22:46:52 | Araq | some free day where girls can practice to collect waste |
22:47:36 | filwit | i thought i knew what you where talking about.. but now i'm back to being confused ;P |
22:47:41 | dom96 | oh yeah, I could use a maid. |
22:47:50 | filwit | ^ |
22:48:22 | Araq | filwit: I think you understand me |
22:48:43 | Araq | just forget the last sentence if it confuses you |
22:49:35 | filwit | okay folks, i'm taking off |
22:49:49 | dom96 | bye filwit! |
22:49:55 | filwit | good to talk with you both again, i will be around more |
22:49:58 | filwit | bye |
22:50:00 | * | filwit quit (Quit: Leaving) |
22:50:54 | dom96 | well I might as well go to sleep then |