00:03:37 | * | irrequietus quit () |
00:07:47 | * | vendethiel- joined #nim |
00:11:40 | * | vendethiel quit (Ping timeout: 265 seconds) |
00:19:45 | * | zepolen joined #nim |
00:59:49 | * | yglukhov joined #nim |
01:04:21 | * | yglukhov quit (Ping timeout: 265 seconds) |
01:08:32 | * | vendethiel- quit (Ping timeout: 255 seconds) |
01:25:55 | * | jaco60 quit (Ping timeout: 240 seconds) |
01:31:11 | * | yglukhov joined #nim |
01:36:05 | * | yglukhov quit (Ping timeout: 260 seconds) |
01:52:11 | * | brson joined #nim |
02:02:34 | * | yglukhov joined #nim |
02:07:23 | * | yglukhov quit (Ping timeout: 264 seconds) |
02:15:56 | * | [CBR]Unspoken quit (Ping timeout: 250 seconds) |
02:31:04 | * | [CBR]Unspoken joined #nim |
02:34:01 | * | yglukhov joined #nim |
02:38:29 | * | yglukhov quit (Ping timeout: 245 seconds) |
02:42:05 | * | Varriount-Laptop joined #nim |
03:05:25 | * | yglukhov joined #nim |
03:09:44 | * | yglukhov quit (Ping timeout: 245 seconds) |
03:37:27 | * | yglukhov joined #nim |
03:41:49 | * | yglukhov quit (Ping timeout: 245 seconds) |
04:08:36 | * | vendethiel joined #nim |
04:08:54 | * | yglukhov joined #nim |
04:13:04 | * | yglukhov quit (Ping timeout: 245 seconds) |
04:26:32 | * | brson quit (Ping timeout: 276 seconds) |
04:28:34 | * | brson joined #nim |
04:32:40 | * | vendethiel quit (Ping timeout: 265 seconds) |
04:35:30 | * | brson quit (Quit: leaving) |
04:40:27 | * | yglukhov joined #nim |
04:44:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
05:15:46 | * | Varriount-Laptop quit (Ping timeout: 256 seconds) |
05:28:27 | * | darkf joined #nim |
06:11:49 | * | BitPuffin|osx quit (Ping timeout: 245 seconds) |
06:31:18 | * | yglukhov joined #nim |
06:34:50 | * | Varriount-Laptop joined #nim |
06:35:34 | * | yglukhov quit (Ping timeout: 245 seconds) |
06:42:14 | * | vegansk joined #nim |
06:51:32 | * | Varriount-Laptop quit (Ping timeout: 256 seconds) |
07:03:01 | * | yglukhov joined #nim |
07:05:07 | * | sepisoad joined #nim |
07:07:14 | * | yglukhov quit (Ping timeout: 245 seconds) |
07:21:18 | * | pregressive joined #nim |
07:24:03 | * | pregressive quit (Remote host closed the connection) |
07:24:13 | * | Demon_Fox joined #nim |
07:30:32 | * | vqrs quit (Ping timeout: 250 seconds) |
07:31:43 | * | vqrs joined #nim |
07:34:41 | * | yglukhov joined #nim |
07:38:54 | * | yglukhov quit (Ping timeout: 245 seconds) |
07:56:29 | * | sepisoad quit (Read error: Connection reset by peer) |
07:58:04 | * | vikaton quit (Quit: Connection closed for inactivity) |
08:06:07 | * | yglukhov joined #nim |
08:10:34 | * | yglukhov quit (Ping timeout: 245 seconds) |
08:39:52 | * | yglukhov joined #nim |
08:44:19 | * | yglukhov quit (Ping timeout: 245 seconds) |
08:45:23 | * | matkuki joined #nim |
09:09:44 | * | yglukhov joined #nim |
09:33:16 | * | yglukhov quit (Remote host closed the connection) |
09:44:43 | * | irrequietus joined #nim |
09:48:49 | * | yglukhov joined #nim |
09:53:04 | * | yglukhov quit (Ping timeout: 245 seconds) |
10:03:36 | * | yglukhov joined #nim |
10:07:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
10:10:18 | * | yglukhov joined #nim |
10:15:06 | * | yglukhov quit (Ping timeout: 272 seconds) |
10:18:00 | * | zepolen quit (Read error: Connection reset by peer) |
10:26:27 | * | matkuki quit (Read error: Connection reset by peer) |
10:26:45 | * | yglukhov joined #nim |
10:31:02 | * | yglukhov quit (Ping timeout: 255 seconds) |
10:36:08 | * | Demon_Fox quit (Quit: Leaving) |
10:38:23 | * | gunn quit (Read error: Connection reset by peer) |
10:39:22 | * | gunn joined #nim |
11:03:08 | * | Trustable joined #nim |
11:05:40 | * | jaco60 joined #nim |
11:13:11 | * | yglukhov joined #nim |
11:17:35 | * | yglukhov quit (Ping timeout: 264 seconds) |
11:28:48 | * | yglukhov joined #nim |
11:33:30 | * | yglukhov quit (Ping timeout: 260 seconds) |
11:35:00 | * | sora joined #nim |
11:48:10 | * | yglukhov joined #nim |
11:52:16 | * | yglukhov quit (Ping timeout: 250 seconds) |
12:09:49 | * | sora quit (Remote host closed the connection) |
12:57:43 | * | Rush_ quit (Read error: Connection reset by peer) |
12:58:05 | * | reactormonk quit (Ping timeout: 276 seconds) |
12:58:44 | * | r-ku- quit (Ping timeout: 276 seconds) |
12:59:00 | * | r-ku joined #nim |
12:59:09 | * | reactormonk joined #nim |
13:01:00 | * | RushPL joined #nim |
13:39:25 | * | Trustable quit (Remote host closed the connection) |
13:43:25 | * | matkuki joined #nim |
13:43:51 | * | matkuki quit (Client Quit) |
14:02:26 | * | matkuki joined #nim |
14:05:49 | matkuki | Anybody got glut working on windows? |
14:06:33 | matkuki | Tried MinGW and MSVC, both give segfault on glutInit function. |
14:10:29 | matkuki | I tried the stuff on the forum, but it doesn't work on windows: http://forum.nim-lang.org/t/917/1 |
14:10:30 | matkuki | Also tried fowlmouth change, but no change: https://github.com/nim-lang/opengl/issues/23 |
14:24:29 | * | boopisaway is now known as boop |
14:24:32 | * | boop is now known as boopisaway |
14:30:27 | NimBot | nim-lang/Nim devel 25e862b def [+0 ±1 -0]: Fix osproc compilation on NetBSD, use workaround for missing execvpe |
14:30:27 | NimBot | nim-lang/Nim devel cbab2ec Dominik Picheta [+0 ±1 -0]: Merge pull request #3663 from def-/netbsd-fix... 2 more lines |
14:31:05 | dom96 | matkuki: Sorry, don't have windows right now otherwise would try to help you. |
14:31:14 | dom96 | matkuki: If you don't get an answer here then please ask on the forum. |
14:35:09 | matkuki | dom96: Thanks, will try. |
14:40:45 | * | sorakun joined #nim |
14:43:10 | * | dom96 quit (Changing host) |
14:43:10 | * | dom96 joined #nim |
15:07:15 | * | tyu joined #nim |
15:15:39 | * | vendethiel joined #nim |
15:35:37 | * | sorakun quit (Remote host closed the connection) |
15:38:20 | * | matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 43.0.2/20151221130713]) |
15:39:24 | dom96 | Araq_: There is no way for me to retrieve the flags specified in the nimscript file |
15:39:30 | dom96 | using ``switch`` |
15:40:18 | dom96 | because ``switch`` calls processSwitch. ProcessSwitch does not store the flags anywhere, but instead has a giant case statement which configures a large amount of variables depending on the switch it gets |
15:41:17 | dom96 | So it looks like we'll need to change the implementation of it |
16:11:01 | * | vendethiel- joined #nim |
16:14:54 | * | vendethiel quit (Ping timeout: 260 seconds) |
16:33:32 | dom96 | booyah https://github.com/nim-lang/nimble/commit/84f371982bc9643f4e42507929f59244f200a10c |
16:33:51 | dom96 | This now works: https://github.com/nim-lang/nimble/blob/master/tests/nimscript/nimscript.nimble#L20 |
17:17:37 | * | tyu quit (Quit: Connection closed for inactivity) |
17:25:24 | * | Demon_Fox joined #nim |
18:26:19 | * | darkf quit (Quit: Leaving) |
18:47:43 | * | nchambers joined #nim |
18:55:28 | * | nchambers quit (Disconnected by services) |
18:59:44 | * | BitPuffin joined #nim |
19:12:16 | Araq_ | dom96: or you use when compileOption("key", "value") ... |
19:13:20 | dom96 | Araq_: Not sure I follow |
19:14:53 | Araq_ | oh sorry, I misunderstood your problem |
19:15:14 | Araq_ | ok, well |
19:15:30 | Araq_ | the question is whether 'switch' stays for compiler switches |
19:15:42 | Araq_ | or whether it's also used for nimble switches |
19:16:28 | Araq_ | does nimble have switches? and why do I need to influence them? |
19:16:44 | Araq_ | I couldn't do that in the traditional .nimble file either. |
19:19:48 | * | sorakun joined #nim |
19:28:11 | dom96 | of course it does |
19:28:35 | dom96 | nimble c -r blah.nim # the `-r` is passed as a flag to the nim compiler |
19:28:43 | dom96 | so you need to do: |
19:28:45 | dom96 | --r |
19:28:51 | dom96 | setCommand "c", "blah.nim" |
19:29:08 | * | nchambers joined #nim |
19:31:20 | Araq_ | seems stupid. |
19:32:12 | Araq_ | exec "nim c -r blah.nim" |
19:32:16 | Araq_ | setCommand "nop" |
19:32:21 | Araq_ | problem solved. |
19:32:29 | dom96 | No |
19:32:38 | dom96 | nimble c -r blah.nim is not the same as nim c -r blah.nim! |
19:33:10 | dom96 | but actually. setCommand itself seems stupid |
19:33:21 | dom96 | What's the point of it at all when you can just exec? |
19:33:37 | Araq_ | to save 1 roundtrip in the compiler |
19:34:17 | Araq_ | there is no difference for nimble since nimble exec's the compiler anyway |
19:34:17 | nchambers | Araq_, nice tail |
19:34:53 | dom96 | ahh great |
19:34:53 | Araq_ | nchambers: thanks, the ladies enjoy it |
19:35:03 | dom96 | So there is no reason for setCommand to even be supported in Nimble |
19:35:03 | nchambers | :D: |
19:35:33 | Araq_ | dom96: well right now setCommand in nimble sets the *nimble* command |
19:35:40 | Araq_ | how nimble should proceed after the task |
19:36:04 | Araq_ | so it's not redundant, but different from what it means for nim |
19:36:21 | dom96 | i may as well just use 'exec' |
19:36:45 | dom96 | The only difference is that it will use the 'nimble' that is in PATH |
19:37:06 | Araq_ | hrm true |
19:37:55 | dom96 | or better yet |
19:38:10 | dom96 | I will override 'exec' to check whether the user is trying to execute 'nimble' |
19:38:25 | dom96 | And you should do the same in NimScript for the compiler |
19:39:36 | dom96 | setCommand can be supported too, but I'm not sure what situation makes it beneficial |
19:39:55 | dom96 | it's already awkward to work with |
19:42:06 | * | vendethiel- quit (Remote host closed the connection) |
19:42:14 | * | vendethiel joined #nim |
19:42:50 | Araq_ | dunno, I think it's totally natural |
19:43:00 | Araq_ | task build, "alias for c": |
19:43:04 | Araq_ | setCommand "c" |
19:43:31 | Araq_ | and now you also know why it doesn't support options |
19:43:45 | Araq_ | because these are taken over from the command line just like before |
19:44:03 | Araq_ | setCommand "c", "foo.nim" is the weird special case |
19:44:11 | Araq_ | where it *changes* the subject |
19:48:37 | dom96 | See. I was not aware of that. |
19:49:27 | dom96 | setCommand is not specified concretely anywhere |
19:50:08 | dom96 | so in that case `nim build -r foo.nim` will translate to `nim c -r foo.nim` |
19:51:55 | dom96 | If that's what setCommand should be used for then please document that fact |
19:52:20 | dom96 | In that case let's keep it, but we should also make exec "nim c foo" work as I described |
19:53:23 | Araq_ | yeah, will improve its docs |
19:53:40 | Araq_ | not sure about exec "nim c foo" doing special casing |
19:54:05 | Araq_ | but I don't like exec "$nim c foo" either, so hrm |
19:54:17 | dom96 | then introduce another proc |
19:54:19 | Araq_ | I think we should document that 'exec' shouldn't be used |
19:54:33 | dom96 | exec will be necessary |
19:54:38 | Araq_ | and have execNim, execNimble, etc |
19:55:05 | dom96 | or how about just 'nim' and 'nimble' |
19:55:18 | * | nchambers quit (Changing host) |
19:55:18 | * | nchambers joined #nim |
19:55:29 | dom96 | nim "c foo" |
19:56:23 | dom96 | It's also a bit annoying to see a different API for NimScript |
19:56:33 | * | nchambers is now known as mewtwo |
19:56:48 | dom96 | at least keep the names consistent |
19:57:17 | * | mewtwo is now known as charmander |
19:57:30 | dom96 | for example cpFile vs. copyFile |
19:57:43 | Araq_ | I took the names from nake |
19:57:59 | Araq_ | and the semantics are different so they have different names |
19:58:21 | Araq_ | cpFile supports logging |
19:58:27 | Araq_ | copyFile doesn't |
19:59:07 | * | charmander is now known as squirtle |
20:00:35 | dom96 | right |
20:00:36 | dom96 | so |
20:00:39 | dom96 | nim "c foo"? |
20:00:59 | Araq_ | meh, I prefer execNim |
20:01:11 | Araq_ | but I guess 'nim' is fine |
20:01:25 | dom96 | meh fine |
20:02:39 | * | squirtle is now known as bulbasaur |
20:02:59 | * | bulbasaur is now known as nchambers |
20:04:04 | dom96 | Sometimes I realise why some channels are +N |
20:04:13 | dom96 | (No nickname changes) |
20:04:58 | nchambers | that was the lasttime I promise |
20:05:49 | dom96 | Araq_: Would you be okay with me splitting up setupVM? |
20:06:21 | dom96 | into a proc which sets up the builtins that will always have the same implementation |
20:06:26 | * | nchambers quit (Changing host) |
20:06:26 | * | nchambers joined #nim |
20:06:28 | dom96 | vs. stuff like switch() |
20:06:30 | * | nchambers quit (Changing host) |
20:06:30 | * | nchambers joined #nim |
20:06:55 | dom96 | which will need to be different for nimble |
20:07:14 | Araq_ | that split is already there |
20:07:30 | Araq_ | but nimble likes the same builtins as nim, IMO |
20:07:44 | Araq_ | so it uses nim's setupVM and builds stuff on top of that |
20:07:56 | dom96 | I had to copy the setupVM proc |
20:08:00 | dom96 | from compiler's sources |
20:08:11 | Araq_ | hrm? |
20:08:26 | Araq_ | iirc I just used it |
20:09:12 | dom96 | https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim#L170 |
20:09:34 | dom96 | But maybe it's valid to just call registerCallback again? |
20:10:11 | dom96 | so: vmdefs.setupVM(); blah.registerCallback("ProcWhichWasAlreadyRegisteredInVmDefs", ...) |
20:10:53 | dom96 | like I said, I had to do that because what vmdefs.setupVM did was not good enough for Nimble |
20:12:20 | dom96 | or rather not vmdef but scriptconfig: https://github.com/nim-lang/Nim/blob/devel/compiler/scriptconfig.nim#L28 |
20:12:29 | dom96 | https://github.com/nim-lang/Nim/blob/devel/compiler/scriptconfig.nim#L118 |
20:12:52 | dom96 | See what I mean? |
20:17:48 | * | vikaton joined #nim |
20:28:16 | Araq_ | I see that you messed with 'switch' which you shouldn't have |
20:35:21 | Araq_ | nimble doesn't need its own 'switch' |
20:41:21 | dom96 | Araq_: Why do you think that? |
20:42:02 | dom96 | what if I want to define a 'cr' alias which is just 'nimble c -r'? |
20:42:59 | Araq_ | what if you don't? and what if you introduce your own nimbleSwitch proc? |
20:43:53 | Araq_ | what if I like to use the *same* nimscript file for nim and for nimble and I don't want to wrap every call to 'switch' in a 'when not defined(nimble)' section? |
20:45:11 | Araq_ | please think about your end users. 2 different impls for 'switch' is just annoying |
20:45:24 | dom96 | huh? |
20:45:38 | dom96 | I think you got this the other way around |
20:45:53 | dom96 | if I introduce a 'nimbleSwitch' then you will need to use `when not defined(nimble)` |
20:46:25 | Araq_ | not if I just want to call the switch for the nim compiler |
20:46:53 | dom96 | Sorry, I don't understand what you mean |
20:47:13 | Araq_ | right now I call 'switch' and the meaning is: set a Nim switch. |
20:47:40 | Araq_ | you plan to change it into: set a Nim or Nimble switch, depending on what was invoked |
20:48:07 | dom96 | yeah... |
20:48:27 | dom96 | If you're invoking Nimble, how can you expect 'switch' to set a Nim switch? |
20:48:41 | Araq_ | when I write |
20:48:50 | Araq_ | task build: |
20:49:00 | Araq_ | switch("deadcodeelim", "on") |
20:49:23 | Araq_ | it's pretty obvious I don't mean Nimble's deadcodeelim because that doesn't exist |
20:49:46 | Araq_ | but if you override its behaviour for nimble, I need to do: |
20:49:50 | Araq_ | task build: |
20:49:56 | Araq_ | when not defined(nimble): |
20:50:00 | Araq_ | switch(...) |
20:50:18 | * | sorakun quit (Remote host closed the connection) |
20:50:26 | Araq_ | or disable the build task altogether for Nimble. |
20:51:13 | dom96 | so you want the `switch` to do *nothing* in Nimble? |
20:51:51 | Araq_ | yeah and that's what the current implementation does, albeit implicitly |
20:51:52 | dom96 | Why would you invoke the `build` task in Nimble when it's meant for Nim? |
20:52:17 | dom96 | an error is surely better than silently ignoring it |
20:52:21 | Araq_ | because I enjoy not giving a fuck about whether it's "nim build" or "nimble build" |
20:52:32 | Araq_ | to build my Nim based software |
20:52:51 | Araq_ | that was one of the original ideas behind the nimscript support for both Nim and Nimble. |
20:53:56 | dom96 | But there is a difference. |
20:54:00 | dom96 | Nim != nimble |
20:54:01 | Araq_ | likewise for common tasks like 'tests' and 'docs' |
20:54:47 | dom96 | But more importantly, how about you calm the hell down. |
20:55:26 | Araq_ | I'm calm but will watch my language |
20:56:40 | dom96 | We either talk about this now, or I will implement it as I see fit and you will complain in 6 months that it's not right. |
20:56:49 | dom96 | By then it will be too late. |
20:57:02 | Araq_ | don't worry, I am calm. |
20:57:22 | Araq_ | and we surely need to discuss it now |
20:57:37 | dom96 | Right. I think your dream of not caring whether it's "nim build" or "nimble build" is impossible. |
20:58:12 | Araq_ | that would be very sad. what are the reasons? |
20:58:37 | dom96 | I may be wrong but here is that I think. |
20:58:39 | dom96 | *what |
20:59:40 | dom96 | It really depends on the use case. Let's say you want to create an alias for 'c'. |
20:59:56 | dom96 | If you want to call it 'build' then you already have a problem |
21:00:04 | dom96 | because 'build' is defined by Nimble already but not by Nim. |
21:00:19 | Araq_ | (that's a Nimble bug then :P but go on) |
21:00:36 | dom96 | If you name it 'build_this_shit' then the alias will work |
21:00:43 | dom96 | but then 'nim c' != 'nimble c' |
21:00:56 | dom96 | That said, it is close. |
21:01:15 | dom96 | So actually, your `switch("deadcodeelim", "on")` *will* work. |
21:01:26 | dom96 | inside the 'build_this_shit' task |
21:02:19 | dom96 | But like I said, they are different. |
21:02:58 | dom96 | The difference is small: 'nim c' looks at ~/.nimble/pkgs/ and adds the latest version of each package to its path. |
21:03:12 | dom96 | So that the file you are compiling can "import jester" successfully. |
21:04:09 | dom96 | 'nimble c' calls 'nim c' with the --noNimblePath (or something like that) switch which disables this behaviour, it instead passes a list of paths explicitly which it builds itself. |
21:04:24 | dom96 | The list of paths it passes is generated based on the dependencies specified in the .nimble file |
21:05:02 | dom96 | So if your .nimble file doesn't specify "requires "jester >= 0.1.0"" then you won't be able to "import jester" |
21:05:44 | dom96 | It also looks at the version range specified in the .nimble file and picks the right version (not just the latest like the Nim compiler does) |
21:06:10 | dom96 | With me so far? |
21:06:17 | Araq_ | sure |
21:06:37 | Araq_ | and I have to admit I wasn't aware "nimble c" does all that |
21:06:57 | Araq_ | but it makes sense |
21:07:14 | dom96 | Indeed. You need to use Nimble more :P |
21:07:30 | Araq_ | so "nimble build" is the "build properly caring about its dependencies" |
21:07:45 | dom96 | yes |
21:07:51 | Araq_ | and my "nim build" would be "build it according to the build task" |
21:08:16 | dom96 | hrm, perhaps. |
21:08:26 | * | tyu joined #nim |
21:08:27 | dom96 | Not sure what you mean by "according to the build task" |
21:08:29 | Araq_ | well that's what it does already |
21:08:45 | Araq_ | it looks for a task named "build" in the nims file |
21:09:05 | dom96 | Oh, you mean because Nimble already defines a 'build' |
21:09:24 | Araq_ | yeah |
21:09:29 | dom96 | it does a bit more too |
21:09:39 | Araq_ | o.O |
21:09:51 | dom96 | it reads the 'bin' key in the .nimble metadata and builds the files specified there |
21:09:55 | Araq_ | you mean "nimble build" does more than "nimble c"? |
21:09:58 | dom96 | yes |
21:10:05 | Araq_ | ah ok |
21:10:07 | dom96 | 'nimble c' takes a parameter |
21:10:11 | dom96 | nimble build does not |
21:11:12 | dom96 | But let's go back to 'build_this_shit' |
21:11:52 | dom96 | in that case it is good that `switch` will also work in Nimble |
21:11:55 | dom96 | instead of being ignored |
21:12:43 | dom96 | So 1 point in my implementation's favour ;) |
21:13:41 | Araq_ | I fail to see how |
21:14:14 | dom96 | Ahh. I guess I forgot to mention another thing that 'nimble c' does |
21:14:17 | dom96 | :P |
21:15:00 | Araq_ | well, it's pretty obvious now how this thing should work |
21:15:02 | dom96 | nimble c -d:release foo -> nim c -d:release <x> foo (where <x> is --noNimblePath and all the --path specs) |
21:15:15 | dom96 | i.e. flags are passed to nim |
21:15:28 | Araq_ | yeah ofc |
21:15:29 | dom96 | Another scenario: https://gist.github.com/dom96/89ae2870b5733ea575b1 |
21:15:53 | dom96 | If you already knew that then you should understand why it's 1 point in favour of my implementation |
21:16:30 | Araq_ | well no, sorry |
21:16:34 | dom96 | but in this second scenario: I want to define a 'cr' task, which is just an alias for 'nimble c -r' |
21:16:38 | dom96 | (or 'nim c -r' |
21:16:39 | dom96 | ) |
21:16:50 | Araq_ | that means 'switch' *always* sets a compiler switch |
21:17:08 | Araq_ | and only due to implementation details nimble needs to implement it differently |
21:17:17 | Araq_ | so that it actually does the right thing |
21:17:31 | dom96 | Hrm, okay. So in those scenarios, Nimble perhaps gets lucky. |
21:17:38 | dom96 | Because it passes those flags to nim anyway |
21:17:47 | Araq_ | it's a cool thing, but it's different from nimbleSwitch. |
21:17:56 | dom96 | So please tell me another scenario where it would be different |
21:18:05 | dom96 | I'm not sure what you mean |
21:18:21 | dom96 | How is it different from nimbleSwitch? |
21:18:23 | Araq_ | say nimble supports --verbose |
21:18:44 | Araq_ | switch("verbose") means activate *Nim*'s verbosity |
21:19:04 | Araq_ | nimbleSwitch("verbose") means activate Nimble's verbosity |
21:20:21 | Araq_ | independently from whether I invoked "nimble build" or "nim build", switch("verbose") always means "make Nim verbose" |
21:21:08 | Araq_ | but lets first switch the topic slightly |
21:21:25 | Araq_ | so we know what "nimble c" means and what "nim c" means. |
21:21:34 | Araq_ | and the distinction is cool. |
21:21:58 | Araq_ | but the same should be for "nimble build" and "nim build" |
21:22:51 | Araq_ | for "nim build" it's already the way I want it ... argh, no screw that |
21:23:11 | Araq_ | it's way too late to change "nimble build", right? |
21:24:32 | dom96 | maybe not, what do you want to change it to? |
21:27:11 | * | BitPuffin|osx joined #nim |
21:29:29 | Araq_ | to be consistent with "nim build" |
21:29:52 | Araq_ | but hrm |
21:29:58 | Araq_ | this cannot work -.- |
21:30:46 | Araq_ | or maybe hrm |
21:31:24 | Araq_ | so what "nimble build" could do is the following: |
21:31:53 | Araq_ | it runs the task "build" like Nim does, but Nimble has a different 'exec' implementation |
21:32:28 | Araq_ | that patches things like "nim c foo.nim" to "nim c --noNimblePath --explicit-deps-here foo.nim" |
21:32:54 | Araq_ | then it would be consistent with "nimble c foo" vs "nim c foo" |
21:33:09 | Araq_ | but I'm not sure I like this. |
21:36:20 | dom96 | nooo |
21:36:39 | dom96 | if you're exec'ing 'nim' with specific args then that is what should happen |
21:37:31 | dom96 | Is it really that bad to have two nimscript files? |
21:37:35 | dom96 | one for nim and the other for nimble? |
21:37:47 | dom96 | The Nimble one already will have a .nimble extension |
21:38:19 | Araq_ | yeah but I planned to make the compiler accept .nimble in addition to .nims |
21:38:28 | dom96 | that way I can keep the nimble-specific stuff implemented in nimble |
21:38:46 | dom96 | it feels messy right now |
21:38:50 | Araq_ | but I really like to have 1 file with the meta stuff in it |
21:39:09 | Araq_ | that describes how to build the software |
21:39:23 | Araq_ | and how to invoke tests, how to build the docs |
21:39:26 | Araq_ | and its dependencies |
21:39:39 | Araq_ | it's very friendly for our users IMO |
21:40:10 | dom96 | it sounds to me like there is no point to even having nim itself supporting nims |
21:40:21 | dom96 | what tasks will need to be nim-specific? |
21:40:32 | dom96 | everything can just go into .nimble and be invoked via 'nimble' |
21:41:14 | Araq_ | well Nims replaces Nim's old config system. |
21:41:21 | Araq_ | which predates Nimble. |
21:41:44 | Araq_ | so maybe you're right but what harm does Nim's nimscript support do? |
21:42:24 | Araq_ | so yeah, 'nimble' can run every task and 'nim' only a subset of the available tasks |
21:42:36 | Araq_ | seems fine to me. |
21:43:14 | Araq_ | and it's a good thing since nimble can download stuff and Nim cannot. |
21:43:51 | Araq_ | so if I run "nim foobar" I can be ensured it works when I'm offline |
21:43:58 | Araq_ | *assured |
21:44:15 | dom96 | Okay. So you are fine to have the nimble-specific stuff be separate from the nim-nimscript stuff? |
21:44:37 | Araq_ | not for the tasks: build, tests and docs |
21:45:04 | Araq_ | these should require no special casing for either nim or nimble. |
21:50:56 | dom96 | In the long run I don't think Nim will be able to eval the .nimble file |
21:51:23 | dom96 | So the metadata var definitions may as well be removed from system/nimscript.nim |
21:51:33 | dom96 | and defined by Nimble itsel |
21:51:33 | dom96 | f |
21:52:02 | dom96 | For tasks like the ones you listed. I don't know, I guess you could put them in a .nims file, that way Nimble can still eval that |
21:52:04 | dom96 | and so can Nim? |
21:52:20 | dom96 | But then Nimble will need to first check the .nimble file, but also all the .nims files for tasks |
21:54:55 | ekarlso | so what's hot in nimland ? |
22:01:27 | dom96 | ekarlso: nimble getting nimscript support |
22:03:13 | Araq_ | dom96: well .nimble can just include a .nims file for that |
22:03:56 | dom96 | true, but it's nicer to make it automatic :P |
22:04:30 | dom96 | The problem is: I doubt users will care, they will just put all tasks in the .nimble file |
22:08:33 | dom96 | I suppose it's in their hands then |
22:09:14 | dom96 | So, you're fine with me moving the var definitions (for the metadata: version, license etc) from the nimscript.nim file into Nimble? |
22:14:03 | Araq_ | not really. |
22:14:33 | Araq_ | it feels like giving up way too early |
22:15:37 | Araq_ | and think about the 'version' problem |
22:16:12 | Araq_ | const Version = '1.1' # foo.nimble |
22:16:30 | Araq_ | from "foo.nimble" import Version # in the project.nim |
22:17:03 | Araq_ | # doesn't work because .nimble is full of Nimble specific stuff |
22:17:17 | dom96 | I don't think it will even work now |
22:17:20 | Araq_ | but never mind, that problem exists with .nims too |
22:17:24 | dom96 | yeah |
22:17:25 | Araq_ | yeah |
22:18:04 | Araq_ | for my newer projects I have an include file that just has that version const |
22:22:33 | Araq_ | do we agree 'switch' should always set a Nim compiler switch? |
22:22:55 | dom96 | Not if .nimble is only evaluatable by nimble |
22:24:25 | Araq_ | lol |
22:25:08 | * | irrequietus quit () |
22:25:48 | * | BitPuffin quit (Remote host closed the connection) |
22:27:29 | dom96 | in that case it should set a Nimble switch |
22:27:32 | dom96 | don't you agree? |
22:28:27 | Araq_ | no, I know Nim's switches and they are all important but I cannot say the same for Nimble :P |
22:30:07 | dom96 | But it will only ever be evaluated by Nimble |
22:30:15 | dom96 | It doesn't make sense to leave it unimplemented |
22:37:38 | Araq_ | hmm |
22:47:41 | dom96 | well? :) |
22:52:53 | Araq_ | IMO it's confusing if switch changes its semantics |
22:53:16 | dom96 | but... |
22:53:18 | dom96 | it doesn't |
22:53:33 | dom96 | it's context-specific |
23:00:45 | dom96 | well, that's how it is implemented right now |
23:00:51 | dom96 | so I will just keep it |
23:01:16 | dom96 | only thing needed now is to separate the nimble-specific stuff from system/nimscript.nim |
23:07:19 | Araq_ | right. |
23:07:32 | Araq_ | I just realized it's easier if I just accept everything you do. |
23:09:37 | dom96 | lol |
23:11:16 | dom96 | perhaps |
23:11:20 | dom96 | But I want your opinion anyway |
23:11:38 | dom96 | I guess when it comes down to us disagreeing... |
23:11:50 | dom96 | may as well just pick one side |
23:17:33 | Araq_ | well it's not important enough so go ahead and I will likely accept it |
23:17:37 | * | tyu quit (Quit: Connection closed for inactivity) |
23:31:36 | * | brson joined #nim |