00:25:08 | * | dsrw_ joined #nimrod |
00:25:36 | * | dsrw_ quit (Remote host closed the connection) |
00:26:44 | * | dsrw quit (Remote host closed the connection) |
00:33:31 | * | dsrw joined #nimrod |
00:39:06 | Varriount | Does nimrod have anything akin to a ternary operator? I can/could implement one with a template but would like to know if there is something similar/better available. |
00:39:44 | OrionPK | if: else: |
00:40:09 | OrionPK | let x = if y > 0: 5 else: -5 |
00:44:35 | Varriount | Thanks. Also, I just got an opportunity to use the swap() function. :D |
00:51:27 | OrionPK | oh yah? |
00:51:29 | OrionPK | what for |
00:52:51 | * | NewGuy joined #nimrod |
00:53:24 | NewGuy | Howdy fellas. |
00:54:33 | OrionPK | hol |
00:54:33 | OrionPK | a |
00:56:16 | NewGuy | Real quick, how do modules relate to directories? |
00:56:56 | OrionPK | they're kind of like a namespace, I guess |
00:57:11 | OrionPK | so folder.module would point to folder/module.nim |
00:57:38 | NewGuy | And then folder/folder.nim or folder.nim would be the folder module? |
00:58:03 | OrionPK | eh... you'd have to import folder/folder if it's folder/folder.nim |
00:58:43 | NewGuy | Oh okay, so you'd do foo.nim for the foo module, then foo/bar.nim for the foo.bar module? Simple enough. |
00:59:00 | OrionPK | yeah |
00:59:19 | NewGuy | I couldn't find this in the tutorial/manual, but it's definitely something that should go in there. |
00:59:42 | NewGuy | Hell, looking at the compiler and Aporia's code I couldn't get an answer, since they don't use any subdirectories or anything. |
01:00:01 | OrionPK | yeah I'm not a fan of the way aporia's code is structured |
01:00:22 | OrionPK | not sure if I've ever seen a good example of how to structure a large nimrod project |
01:01:17 | NewGuy | Yeah, but it seems like it would work nicely in theory. |
01:01:59 | NewGuy | But thank you very much for the quick answer. |
01:03:29 | OrionPK | it'd be nice if there was maybe a {.module.} pragma or something |
01:03:29 | NewGuy | Ah yes, and how would you reference backwards? |
01:03:37 | OrionPK | maybe there is and I dont know about it |
01:03:57 | OrionPK | you put it at the top of a .nim file, and the compiler scans the directory for that the module entry point |
01:04:02 | NewGuy | Yes, that would be great. Or simple a module keyword. |
01:04:10 | OrionPK | reference backwards? |
01:04:31 | NewGuy | i.e. foo/bar.nim importing foo.nim |
01:05:16 | NewGuy | would it be `import foo` like in the main directory? |
01:05:27 | NewGuy | or something a little less pretty like `import ../foo` |
01:05:45 | OrionPK | I wouldn't do that |
01:06:47 | NewGuy | Hm? I mean, that's pretty necessary IMHO? |
01:07:11 | OrionPK | for a module to reference something that's a directory up? |
01:08:01 | * | ltbarcly joined #nimrod |
01:08:05 | NewGuy | Well in this case, I'm just writing unit tests for a few functions. But I don't want the unit tests cluttering the module & it's file. |
01:08:31 | NewGuy | So I wanted to make foo/tests.nim, where I'd put the unit tests. But these unit tests would need to call the functions in foo.nim |
01:11:30 | OrionPK | I think thats generally how you do the unit tests |
01:11:41 | OrionPK | inside the module, using when isMainModule: |
01:11:50 | OrionPK | put some tests at the bottom of the file |
01:11:52 | NewGuy | I'd say that's pretty essential stuff right there... Almost all submodules have some dependencies within the main module... |
01:12:06 | OrionPK | in what language? |
01:12:28 | NewGuy | C++, Rust, D, a lot more? |
01:12:54 | Varriount | NewGuy, I currently have a git branch open for improving documentation. |
01:13:09 | * | ltbarcly quit (Ping timeout: 272 seconds) |
01:13:17 | Varriount | I was planning to submit a pull request to Araq later today |
01:13:23 | NewGuy | Varriount, mind a link? I'd happily add it if you want. |
01:13:50 | Varriount | Do you have Nimrod's source? |
01:14:02 | NewGuy | Nope. |
01:14:18 | OrionPK | generally importing one file in another and then vice versa would create a circular dependency, right? |
01:14:34 | Varriount | Ah, then I'll post the manual file on github, and you can give me back the edits. |
01:15:15 | NewGuy | OrionPK, Why would a main module import a submodule? That's why they're separated, isn't it? The submodule has extras to add to the main. |
01:15:39 | NewGuy | Varriount, If you want, I could just type up a small summary to add to the modules section? Save the need to do any complicated Github stuff |
01:15:53 | OrionPK | you mean to export things from the submodule to the main module? |
01:16:12 | OrionPK | or do you mean for the sub module to REFERENCE things defined in the main module |
01:16:16 | Varriount | NewGuy, that would be fine. |
01:16:35 | NewGuy | The latter, have the submodule use functions/globals defined in the main module. |
01:17:04 | NewGuy | Varriount, Cool beans. Let me just figure out this last piece out with Orion here and I'll write a little something up. |
01:17:30 | OrionPK | you would generally do something like that in a common file |
01:17:34 | OrionPK | or common module |
01:17:39 | OrionPK | that both other files share |
01:17:54 | Varriount | NewGuy, once you give it to me, it might take a day or two for me to submit it. It has to be formatted in reStructured Text, and then pushed. |
01:18:16 | Varriount | And then submitted as a pull request. And then accepted. |
01:18:27 | NewGuy | Varriount, Sure thing. Once I understand what's going on, no rush! |
01:20:46 | Varriount | OrionPK, I used the swap function here -> https://gist.github.com/Varriount/7050608 |
01:21:44 | OrionPK | exciting |
01:21:49 | NewGuy | OrionPK: That's the main module...? It has all the functions necessary. |
01:22:16 | Varriount | NewGuy, generally you split up a project into various sub-modules |
01:22:18 | OrionPK | the main module sits at the top, referencing everything else but nothing should reference it |
01:22:25 | Varriount | ^ |
01:24:20 | NewGuy | Gimme a sec real quick |
01:24:51 | Varriount | This isn't a nimrod-specific detail. Typically, in a project longer than 2000 lines of code, you split things into submodules, each module reflecting a different component of the project. |
01:25:24 | OrionPK | what language do you generally use, NewGuy? |
01:26:05 | NewGuy | http://pastebin.com/NURdPatG |
01:26:14 | NewGuy | C++ && Ada |
01:26:23 | NewGuy | That's what I'm trying to accomplish. |
01:26:30 | Varriount | OrionPK, I've shuddered at the times I've seen python projects, where the only file is a single 5000 line __init__.py in a folder |
01:26:52 | OrionPK | yeah, I've seen some nim files like that unfortunately |
01:27:20 | OrionPK | newguy, if you want to break your tests into a diff file |
01:27:22 | NewGuy | I want a module Foo, with a submodule Tests. The module Foo makes no reference to Tests, but the module Tests calls functions within module Foo. |
01:27:25 | OrionPK | use include |
01:27:48 | Varriount | Include just includes the source, same as C's #include |
01:27:58 | Varriount | Why can't he use import? |
01:28:09 | OrionPK | he can |
01:28:15 | OrionPK | but then the tests module should reference the main module, not vice versa |
01:28:22 | OrionPK | and also it can only reference exported symbols |
01:28:23 | NewGuy | The main module isn't the main module. |
01:28:42 | NewGuy | I have a main module, and modules that are used by that main module |
01:28:45 | NewGuy | Foo is just one of them |
01:29:02 | NewGuy | I have a test condition on the main module, which runs the unit tests. |
01:29:14 | NewGuy | And then prints out the results of the tests in a nice and pretty way. |
01:29:52 | OrionPK | https://gist.github.com/onionhammer/7050672 |
01:31:35 | OrionPK | if you want to run the tests in that module, you run it as the main module |
01:32:04 | NewGuy | I'll be right back, fellas. |
01:39:10 | NewGuy | Here is my directory structure: http://pastebin.com/auHEejcm ; Here is Nimtest: http://pastebin.com/f6wpFgr1 ; here is Foo: http://pastebin.com/cSTZ8XE0 ; and here is it's testing submodule, Bar: http://pastebin.com/QavnqFUs |
01:40:26 | NewGuy | If unit testing is enabled, calls are made that bring all the testing modules of the used libraries and send them to nimtests run_test function, which runs them all and prints the results cleanly. |
01:44:44 | NewGuy | So I don't want to do when Is_Main_Module for all my modules |
01:45:04 | OrionPK | then do it in your test module |
01:45:18 | OrionPK | and compile that instead of your main module |
01:46:20 | NewGuy | Which is why I need my test module for each module, to be able to call the function I'm testing... |
01:47:29 | NewGuy | In Ada or C++, this is pretty simple stuff, since packages/namespaces aren't bound to files... But I don't know how to do this in Nimrod. |
01:47:55 | OrionPK | it's essentially the same way you would do it in C++ |
01:48:49 | NewGuy | In C++, I would import Foo from within Foo's testing file/namespace, the directory up. So would `import Foo` within Foo/Bar.nim in this example import Foo? |
01:49:06 | * | dsrw quit (Remote host closed the connection) |
01:50:34 | OrionPK | you can import things the directory up |
01:50:43 | OrionPK | (not that you should) |
01:50:45 | OrionPK | with quotes |
01:52:44 | OrionPK | but you cant import a file that's importing "you" |
01:53:25 | NewGuy | That one makes sense. |
01:55:20 | OrionPK | thats pretty much all we've been telling you |
01:55:42 | NewGuy | Well all I wanted to do was import from a directory up, not import cyclically! |
01:55:49 | NewGuy | Haha, miscommunication, I suppose. |
01:57:15 | OrionPK | gotcha.. |
01:57:30 | OrionPK | I wouldnt import a directory up, but you can by doing "../modulename" |
01:58:24 | NewGuy | Actually I didn't even need to do that, apparently. import foo worked just fine, it looked the directory up automatically. |
01:59:10 | NewGuy | (thinking back, it would have been a lot easier to have just tested it myself than explain this entire thing) |
01:59:22 | * | NewGuy feels like an idiot. |
01:59:33 | OrionPK | heh, alright well, afk a bit |
02:01:15 | NewGuy | Thanks so much guys, |
02:27:33 | * | dsrw joined #nimrod |
02:33:43 | * | dsrw quit (Remote host closed the connection) |
02:52:24 | * | dsrw joined #nimrod |
02:57:13 | * | dsrw quit (Remote host closed the connection) |
02:57:38 | * | dsrw joined #nimrod |
02:58:43 | * | dsrw quit (Remote host closed the connection) |
03:08:36 | * | DAddYE quit (Remote host closed the connection) |
03:18:09 | * | DAddYE joined #nimrod |
03:24:12 | * | dsrw joined #nimrod |
03:25:31 | * | ltbarcly joined #nimrod |
03:25:31 | * | ltbarcly quit (Client Quit) |
03:46:05 | * | dsrw quit (Remote host closed the connection) |
03:52:14 | Varriount | NewGuy, do you still plan on writing that bit on importing? |
03:55:04 | * | OrionPK quit (Quit: Leaving) |
04:16:39 | * | dsrw joined #nimrod |
04:19:23 | * | brson quit (Quit: leaving) |
04:20:56 | * | dsrw quit (Ping timeout: 240 seconds) |
04:35:21 | * | NewGuy quit (Ping timeout: 250 seconds) |
05:18:59 | * | dsrw joined #nimrod |
05:23:39 | * | dsrw quit (Ping timeout: 248 seconds) |
05:25:36 | * | Endy joined #nimrod |
05:28:23 | * | BitPuffin quit (Ping timeout: 272 seconds) |
05:37:16 | * | ltbarcly joined #nimrod |
05:41:38 | * | ltbarcly quit (Ping timeout: 240 seconds) |
05:52:22 | * | dyu quit (Quit: Leaving) |
06:20:16 | * | dsrw joined #nimrod |
06:24:27 | * | dsrw quit (Read error: Connection reset by peer) |
06:24:47 | * | dsrw joined #nimrod |
06:26:36 | * | dsrw_ joined #nimrod |
06:26:36 | * | dsrw quit (Read error: Connection reset by peer) |
06:30:48 | * | dsrw_ quit (Ping timeout: 240 seconds) |
06:35:47 | Varriount | O_o I just found out that my keyboard has a "light up keys" button. I've had this laptop for about half a year now. |
06:45:08 | * | kryton9 joined #nimrod |
06:47:45 | kryton9 | . |
06:48:04 | * | kryton9 waves hello |
06:50:00 | Araq | hoho |
06:50:21 | kryton9 | Hi Araq, just trying IRC commands, very few seem to work |
06:50:36 | kryton9 | I am using a webclient |
06:50:41 | kryton9 | probably why |
07:02:55 | * | kryton9 quit () |
07:28:01 | * | dsrw joined #nimrod |
07:32:24 | * | dsrw quit (Ping timeout: 256 seconds) |
08:03:21 | * | profmakx waves from san francisco |
08:17:55 | * | Varriount lights up his keyboard |
08:29:16 | * | dsrw joined #nimrod |
08:34:13 | * | dsrw quit (Ping timeout: 272 seconds) |
08:41:48 | * | Endy quit (Ping timeout: 240 seconds) |
09:31:10 | * | dsrw joined #nimrod |
09:35:47 | * | dsrw quit (Ping timeout: 265 seconds) |
09:38:47 | * | wlhlm joined #nimrod |
09:45:59 | * | q66 joined #nimrod |
10:00:56 | * | ltbarcly joined #nimrod |
10:05:28 | * | ltbarcly quit (Ping timeout: 240 seconds) |
10:11:07 | * | DAddYE quit (Remote host closed the connection) |
10:11:37 | * | DAddYE joined #nimrod |
10:14:51 | * | Endy joined #nimrod |
10:15:55 | * | DAddYE quit (Ping timeout: 248 seconds) |
10:16:08 | * | DAddYE joined #nimrod |
10:25:38 | * | DAddYE quit (Remote host closed the connection) |
10:30:26 | dom96 | 'morning |
10:32:25 | * | dsrw joined #nimrod |
10:37:27 | * | dsrw quit (Ping timeout: 272 seconds) |
10:52:01 | * | silven quit (Remote host closed the connection) |
11:26:46 | * | DAddYE joined #nimrod |
11:33:02 | * | DAddYE quit (Ping timeout: 240 seconds) |
11:33:54 | * | dsrw joined #nimrod |
11:38:20 | * | dsrw quit (Ping timeout: 256 seconds) |
12:06:12 | * | dsrw_ joined #nimrod |
12:10:57 | * | dsrw_ quit (Ping timeout: 265 seconds) |
12:29:36 | * | DAddYE joined #nimrod |
12:34:37 | * | DAddYE quit (Ping timeout: 272 seconds) |
12:39:39 | * | silven joined #nimrod |
12:56:15 | * | Amrykid quit (Changing host) |
12:56:15 | * | Amrykid joined #nimrod |
12:59:30 | * | dsrw joined #nimrod |
13:07:29 | * | dsrw quit (Remote host closed the connection) |
13:30:06 | * | DAddYE joined #nimrod |
13:36:27 | * | DAddYE quit (Ping timeout: 248 seconds) |
13:57:33 | dom96 | Debugging a stack corruption sure is lots of fun :( |
14:16:28 | * | OrionPK joined #nimrod |
14:24:37 | * | ltbarcly joined #nimrod |
14:29:40 | * | ltbarcly quit (Ping timeout: 265 seconds) |
15:33:43 | * | DAddYE joined #nimrod |
15:40:49 | * | DAddYE quit (Ping timeout: 272 seconds) |
15:52:14 | * | Associat0r quit (Quit: Associat0r) |
16:04:58 | * | BitPuffin joined #nimrod |
16:38:14 | * | wlhlm quit (Ping timeout: 240 seconds) |
17:10:52 | * | NewGuy joined #nimrod |
17:13:56 | NewGuy | How do I use nimrod's doc2 tool to generate for the entire project? Right now it just generates for the file I explicitly gave it |
17:14:11 | NewGuy | Or must I do it for each file? |
17:18:53 | * | DAddYE joined #nimrod |
17:30:24 | * | DAddYE quit (Remote host closed the connection) |
17:30:54 | * | DAddYE joined #nimrod |
17:35:02 | * | DAddYE quit (Ping timeout: 240 seconds) |
17:39:39 | Araq | NewGuy: there is some command flag for this |
17:40:15 | Araq | --project |
17:41:33 | NewGuy | Already tried that one. Same result. |
17:42:32 | Araq | submit a bug report then |
17:43:06 | NewGuy | Will do. |
17:44:10 | Araq | or even better debug this issue |
17:44:18 | Araq | compiler/docgen2.nim proc close() |
18:14:41 | * | xenagi joined #nimrod |
18:14:59 | * | Ricky_Ricardo joined #nimrod |
18:22:22 | Araq | hi xenagi, welcome |
18:22:57 | * | Ricky_Ricardo left #nimrod (#nimrod) |
18:24:14 | xenagi | hi! |
18:24:37 | xenagi | I'm gonna try writing a module for nimrod this weekend |
18:24:54 | xenagi | first time trying nimrod. we'll see how well this goes |
18:25:28 | Araq | what kind of module? |
18:25:53 | xenagi | reading/parsing TOML files |
18:26:04 | xenagi | It's like a cleaner JSON :) |
18:29:14 | dom96 | Looks a lot like the .ini format. |
18:29:46 | xenagi | huh so it does |
18:29:54 | * | xenagi doesn't really develop for windows :/ |
18:30:06 | dom96 | Nice though, create a babel package out of it once you're done :) |
18:30:20 | xenagi | sure thing |
18:30:49 | * | NewGuy quit (Ping timeout: 250 seconds) |
18:31:30 | * | DAddYE joined #nimrod |
18:38:31 | * | DAddYE quit (Ping timeout: 272 seconds) |
18:52:24 | * | BitPuffin quit (Ping timeout: 256 seconds) |
19:03:00 | * | BitPuffin joined #nimrod |
19:17:15 | * | NewGuy joined #nimrod |
19:17:40 | Araq | NewGuy: do you write blog posts? |
19:18:05 | NewGuy | Not that I know of? Why? |
19:18:42 | Araq | you should write about how nimrod is faster than c++ and takes half the lines of code |
19:19:11 | Araq | or make some benchmark showing nimrod's gc is independent of the heap size where Go's, D's and Java's isn't |
19:19:23 | Araq | I wanted to do that |
19:19:29 | Araq | but I never find the time for it |
19:20:05 | Araq | it might give nimrod a big boost |
19:20:31 | NewGuy | Araq: I'm still in uni, so it might take a while (my schedule is so buggered up), but I'll see what I can do! |
19:20:51 | NewGuy | Didn't dom write a raytracer that outperformed it's C++ counterpart, too? |
19:21:25 | dom96 | I think that was AdrianV. |
19:21:28 | Araq | that was Adrianv, yes |
19:21:43 | NewGuy | Ah yeah, my bad. |
19:21:49 | OrionPK | dont think nimrod outperforms C++ is a true statement, at least not always :p |
19:23:44 | NewGuy | My usual case is about -10-20%. Rare cases can go as low as -50%. |
19:23:58 | NewGuy | Then the other 1/4 of the time, the numbers are almost identical. |
19:24:30 | NewGuy | Note: I use Clang for all my stuff. |
19:26:55 | NewGuy | Ah, well I've got to get to work on a couple essays. Talk to you fella's later! |
19:26:59 | * | NewGuy quit (Quit: Page closed) |
19:31:17 | * | BitPuffin quit (Ping timeout: 248 seconds) |
19:34:21 | * | DAddYE joined #nimrod |
19:38:04 | Araq | OrionPK: "always outperforming" is meaningless though, sometimes Java can be faster than C++ for instance |
19:38:08 | xenagi | I'd read that blog |
19:38:38 | * | DAddYE quit (Ping timeout: 240 seconds) |
19:38:42 | dom96 | We should really be comparing idiomatic Nimrod to idiomatic C++. |
19:38:57 | OrionPK | Araq i agree |
19:39:05 | dom96 | Optimisations can be done endlessly for both languages. |
19:39:33 | OrionPK | right.. the the point of unreadability |
19:39:41 | Araq | yeah true |
19:40:10 | Araq | but then the ability to optimize the heck out of things is common for both |
19:40:25 | Araq | so I don't know ... |
19:40:41 | OrionPK | I would just say that nimrod performs similarly to C++ |
19:40:47 | Araq | optimizing Nimrod or C++ is kind of the point of these languages |
19:40:49 | OrionPK | let the numbers speak for themselves |
19:42:27 | * | BitPuffin joined #nimrod |
19:43:36 | xenagi | In a recent Go blog post, Rob said that they tried to target Go towards the C++ crowd, but, surprisingly, they didn't take the bait |
19:43:51 | xenagi | C++ users were more/less set in their ways. |
19:43:56 | xenagi | masochists, if you will. |
19:44:29 | xenagi | So, why not compare to Go and Rust, the new kids on the block? Try to lure some of them users who are looking to experiment with a new lang |
19:45:24 | OrionPK | the best way to attract people is to write good apps IMO |
19:45:33 | OrionPK | open source ones, obviously |
19:46:20 | Araq | it's not at all surprising that C++ users don't migrate to Go and if Rob is surprised by that then ... |
19:51:47 | * | shevy joined #nimrod |
19:52:04 | shevy | can NimBot eval code on IRC? |
19:52:14 | Araq | nope |
19:52:43 | Araq | xenagi: how exactly is using a language without exceptions or generics not masochistic anyway, xenagi? |
19:58:09 | xenagi | lol, as for exceptions, to each his own |
19:59:18 | xenagi | but i agree with generics |
20:00:27 | * | BitPuffin quit (Ping timeout: 248 seconds) |
20:02:55 | Araq | xenagi: http://axisofeval.blogspot.de/2012/07/when-somebody-says-he-doesnt-like.html |
20:04:19 | xenagi | lol |
20:04:24 | NimBot | Araq/Nimrod master 7f0e8ef Dominik Picheta [+0 ±3 -0]: Fixed regression on ARM caused by the changed behaviour of noStackFrame in commit 725dab4bedd. |
20:04:46 | xenagi | i knew exceptions were a hot button... |
20:09:26 | Araq | also good: http://axisofeval.blogspot.de/2012/07/when-code-base-uses-directory-structure.html |
20:12:17 | xenagi | *cough*Java*cough* |
20:13:31 | NimBot | Araq/Nimrod master 0d90796 Dominik Picheta [+0 ±1 -0]: Fixed definition of seqShallowFlag. |
20:14:14 | * | io2 joined #nimrod |
20:16:58 | * | Ricky_Ricardo joined #nimrod |
20:17:16 | * | Ricky_Ricardo left #nimrod (#nimrod) |
20:30:49 | * | Associat0r joined #nimrod |
20:30:49 | * | Associat0r quit (Changing host) |
20:30:49 | * | Associat0r joined #nimrod |
20:34:51 | * | DAddYE joined #nimrod |
20:38:46 | * | BitPuffin joined #nimrod |
20:41:02 | * | DAddYE quit (Ping timeout: 240 seconds) |
20:44:00 | * | Endy quit (Quit: HydraIRC -> http://www.hydrairc.com <- Like it? Visit #hydrairc on EFNet) |
20:44:59 | OrionPK | wheres the source for nimbot |
20:51:11 | dom96 | nimbuild repo |
20:52:48 | * | silven quit (Remote host closed the connection) |
20:54:56 | * | DAddYE joined #nimrod |
20:57:55 | shevy | aren't exceptions basically nothing more than sugar for failsafe if/else decisions to do? |
20:58:43 | xenagi | idk if if/else decisions can propogate through a stack like exceptions |
21:04:06 | * | XAMPP-8 joined #nimrod |
21:14:29 | * | xenagi quit (Quit: Leaving) |
21:14:47 | * | xenagi joined #nimrod |
21:40:05 | * | brson joined #nimrod |
21:40:06 | * | Associat0r quit (Read error: Connection reset by peer) |
21:41:14 | * | Associat0r joined #nimrod |
21:41:14 | * | Associat0r quit (Changing host) |
21:41:14 | * | Associat0r joined #nimrod |
21:58:01 | dom96 | !seen gradha |
21:58:01 | NimBot | gradha was last seen on Wed Aug 28 23:07:47 2013 quitting with message: Quit: bbl, need to watch https://www.youtube.com/watch?v=fS9CcTpA9i0 again |
21:58:23 | * | dom96 misses gradha |
22:02:16 | Araq | yeah |
22:02:29 | * | Araq wonders what happened to him |
22:03:04 | dom96 | Well he's still blogging at least: http://gradha.github.io/ |
22:08:45 | * | XAMPP-8 quit (Ping timeout: 245 seconds) |
22:12:28 | * | XAMPP-8 joined #nimrod |
22:20:49 | shevy | he could be zombie-blogging |
22:22:20 | * | xenagi|2 joined #nimrod |
22:25:47 | * | xenagi quit (Ping timeout: 272 seconds) |
22:32:02 | * | xenagi|2 quit (Ping timeout: 265 seconds) |
22:35:15 | OrionPK | seen:gradha |
22:35:19 | OrionPK | hows this work |
22:36:20 | OrionPK | !ping |
22:36:20 | NimBot | pong |
22:36:24 | OrionPK | !seen:gradha |
22:36:35 | OrionPK | !seen:OrionPK |
22:36:48 | dom96 | come on, you've just seen me use it. |
22:36:57 | dom96 | it's a space not a : |
22:37:02 | OrionPK | oh didnt even notice you do it |
22:37:06 | OrionPK | I was going over the source |
22:37:12 | OrionPK | coincidence :) |
22:37:19 | dom96 | oh lol |
22:37:26 | OrionPK | was going off this line "if d.r.exists("seen:" & nick): " |
22:40:23 | dom96 | that's a redis query |
22:41:41 | * | xenagi joined #nimrod |
22:41:56 | OrionPK | wasnt looking too closely, just saw "seen:" |
22:56:13 | OrionPK | can you importc variables/consts? |
22:57:23 | * | io2 quit () |
22:59:36 | OrionPK | ah I figured it out for var, but doesnt work for const/let |
23:03:49 | Araq | I think it should work for 'let' |
23:04:11 | OrionPK | actually, cant get it to work at all from a nimrod dll |
23:05:25 | xenagi | lol |
23:06:18 | xenagi | is it coincidence that the syntax is python-esqe? |
23:08:51 | profmakx | yes |
23:09:47 | * | XAMPP-8 quit (Ping timeout: 248 seconds) |
23:10:19 | Araq | no |
23:10:52 | Araq | I copied what makes sense of Python's syntax. imho of course |
23:11:51 | * | ltbarcly joined #nimrod |
23:11:51 | * | ltbarcly quit (Client Quit) |
23:12:41 | OrionPK | so araq, if I wanted to export a variable from a dll |
23:12:48 | OrionPK | var some_number = 5 |
23:13:02 | OrionPK | var some_number* {.exportc, dynlib.} = 5 |
23:13:19 | Araq | I don't think that's supported |
23:13:55 | OrionPK | cant export/import variables? |
23:13:56 | xenagi | why var? |
23:14:20 | OrionPK | xenagi why not? |
23:14:36 | xenagi | if i understand correctly, variables are just that...variable/mutable. exporting that would be a function of time |
23:14:42 | OrionPK | I tried const first |
23:15:07 | xenagi | but what do i know? *shrugs* |
23:15:32 | xenagi | brb |
23:15:40 | Araq | "const" is a compile time thing, there is no point in exporting or importing it |
23:15:56 | Araq | importing vars from DLLs is supported |
23:16:05 | Araq | exporting is not |
23:16:28 | OrionPK | ok.. so you can import vars, just not from nimrod dlls |
23:16:48 | Araq | some say features start as being "unimplemented" and then people request them and some kind soul changes the status to "implemented" |
23:16:58 | Araq | ;-) |
23:17:08 | * | ltbarcly joined #nimrod |
23:17:29 | OrionPK | well I dont know if you have some philosophical objection to these things araq :P |
23:17:40 | OrionPK | you like being obdurate sometimes |
23:18:13 | Araq | that's my job |
23:19:50 | OrionPK | my feature request would be.. better support generally for linking together separate shared nimrod libraries :D |
23:26:30 | Araq | ok |
23:28:48 | shevy | my feature request is docu-explosion! :D |
23:32:13 | xenagi | oh? is it random-feature request time?! |
23:33:15 | xenagi | my feature request is nimgrep should search amazon! :D |
23:33:20 | xenagi | https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/1055766 |
23:41:48 | Araq | meh, nimgrep is already much better than grep :P |
23:47:37 | OrionPK | Araq what do you think about the ?? operator |
23:47:42 | OrionPK | in C# |
23:48:19 | * | ltbarcly quit (Quit: Computer has gone to sleep.) |
23:48:39 | Araq | template `??` (a, b: expr): expr = (let x = a; if x.isNil: b else: x) |
23:49:10 | OrionPK | something like that, yeah |
23:49:16 | OrionPK | is it in the standard library? |
23:49:44 | OrionPK | https://gist.github.com/onionhammer/7062992 |
23:50:32 | OrionPK | actually both can be templates, updated |
23:51:49 | * | dsrw joined #nimrod |
23:54:12 | Araq | not something like that, that's C#'s ?? |
23:54:36 | OrionPK | hmm? |
23:55:11 | dsrw | Is there any way to get the name of an object type as a string from a proc, or will I need to use a macro? typetraits#name() is just giving me "object" |
23:56:50 | OrionPK | C#'s ?? was what I was aiming for |
23:58:07 | Araq | OrionPK: well now you know what C#'s ?? does |
23:58:21 | Araq | hint: it doesn't deref |
23:58:38 | OrionPK | no, it doesnt.. but I wanted the same effect |
23:59:03 | OrionPK | in a way it does deref |
23:59:12 | OrionPK | if you pass in a nullable<int> it returns an int |
23:59:30 | OrionPK | the .Value from the passed in item |