00:03:52 | * | nsf quit (Quit: WeeChat 1.5) |
00:21:44 | * | Trustable quit (Remote host closed the connection) |
00:30:52 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:34:23 | * | yglukhov joined #nim |
00:38:36 | * | yglukhov quit (Ping timeout: 250 seconds) |
00:46:04 | * | Kingsquee joined #nim |
00:55:15 | FromGitter | <gogolxdong> @BlaXpirit thanks |
01:07:08 | * | desophos quit (Ping timeout: 260 seconds) |
01:35:29 | * | chemist69 quit (Ping timeout: 260 seconds) |
01:35:45 | * | yglukhov joined #nim |
01:40:20 | * | yglukhov quit (Ping timeout: 260 seconds) |
01:43:31 | * | Dankrad joined #nim |
01:49:17 | * | chemist69 joined #nim |
01:51:11 | enthus1ast | NSIS is supporting every windows version from win95 |
02:15:37 | * | desophos joined #nim |
02:17:19 | FromGitter | <gogolxdong> which package should be imported to support `undeclared identifier: '%'` with `logging.debug("quantile:$1" % $quantile) ` |
02:29:41 | FromGitter | <gogolxdong> found , strutils |
02:34:46 | FromGitter | <gogolxdong> how to trace crash stack? |
02:39:00 | FromGitter | <gogolxdong> --stackTrace:on |
02:43:53 | * | Demon_Fox joined #nim |
02:47:56 | FromGitter | <gogolxdong> looking for help ,https://glot.io/snippets/ej6wey8wqi |
03:11:05 | * | FuntDobra quit (Quit: leaving) |
03:16:37 | * | kulelu88 quit (Quit: Leaving) |
03:29:56 | * | FuntDobra joined #nim |
03:29:56 | enthus1ast | gogolxdong try to import strutils and `logging.debug("quantile:$1" % [quantile] )` |
03:30:22 | enthus1ast | or |
03:30:30 | enthus1ast | debug(..) |
03:36:42 | * | chemist69 quit (Ping timeout: 250 seconds) |
03:37:01 | * | yglukhov joined #nim |
03:40:47 | * | chemist69 joined #nim |
03:41:40 | * | yglukhov quit (Ping timeout: 260 seconds) |
03:44:18 | * | FuntDobra quit (Ping timeout: 244 seconds) |
03:48:45 | * | bjz quit (Ping timeout: 268 seconds) |
04:07:06 | * | FuntDobra joined #nim |
04:10:25 | * | Demon_Fox quit (Quit: Leaving) |
04:16:37 | * | desophos quit (Read error: Connection reset by peer) |
04:43:27 | * | brson joined #nim |
05:15:58 | * | bjz joined #nim |
05:29:02 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:33:16 | * | enthus1ast quit (Ping timeout: 250 seconds) |
05:52:27 | * | FuntDobra quit (Quit: leaving) |
05:53:40 | * | FuntDobra joined #nim |
05:58:18 | * | FuntDobra quit (Client Quit) |
05:58:31 | * | FuntDobra joined #nim |
05:59:54 | * | FuntDobra quit (Client Quit) |
06:01:27 | * | FuntDobra joined #nim |
06:17:14 | * | yglukhov joined #nim |
06:21:07 | * | brson quit (Quit: leaving) |
06:21:39 | * | nsf joined #nim |
06:31:21 | * | yglukhov quit (Remote host closed the connection) |
06:36:20 | * | FuntDobra quit (Quit: leaving) |
06:36:50 | * | FuntDobra joined #nim |
06:38:14 | * | FuntDobra quit (Client Quit) |
06:39:26 | * | FuntDobra joined #nim |
06:39:46 | * | FuntDobra quit (Client Quit) |
06:40:18 | * | FuntDobra joined #nim |
06:40:42 | * | FuntDobra quit (Client Quit) |
06:41:30 | * | FuntDobra joined #nim |
06:58:45 | * | bjz quit (Ping timeout: 248 seconds) |
06:59:09 | * | yglukhov joined #nim |
06:59:28 | * | bjz joined #nim |
07:04:14 | * | yglukhov quit (Ping timeout: 268 seconds) |
07:14:48 | * | vonh joined #nim |
07:49:24 | * | bug2000 quit (Remote host closed the connection) |
07:52:39 | * | gokr joined #nim |
08:36:08 | * | Matthias247 joined #nim |
08:49:22 | * | akaisora joined #nim |
08:52:44 | * | Kaini joined #nim |
08:53:25 | * | gokr quit (Ping timeout: 248 seconds) |
09:02:52 | * | gokr joined #nim |
09:09:22 | * | akaisora is now known as praisethemoon |
09:09:32 | * | praisethemoon quit (Changing host) |
09:09:32 | * | praisethemoon joined #nim |
09:15:34 | * | ARCADIVS joined #nim |
09:15:56 | * | kunev quit (Quit: е те!) |
09:16:17 | * | gokr quit (Ping timeout: 240 seconds) |
09:20:24 | * | kunev joined #nim |
09:20:58 | * | pie_ joined #nim |
09:28:22 | * | enthus1ast joined #nim |
09:44:07 | * | pie_ quit (Changing host) |
09:44:08 | * | pie_ joined #nim |
09:51:16 | * | enthus1ast quit (Ping timeout: 260 seconds) |
09:51:28 | * | nsf quit (Quit: WeeChat 1.5) |
09:51:35 | * | gangstacat quit (Quit: Ĝis) |
10:04:57 | * | gangstacat joined #nim |
10:08:48 | * | brechtm joined #nim |
10:09:39 | * | Ven_ joined #nim |
10:12:44 | * | enthus1ast joined #nim |
10:17:39 | * | yglukhov joined #nim |
10:17:50 | * | yglukhov quit (Read error: Connection reset by peer) |
10:18:11 | * | brechtm quit (Remote host closed the connection) |
10:22:26 | * | yglukhov joined #nim |
10:22:28 | * | praisethemoon quit (Ping timeout: 260 seconds) |
10:23:34 | * | akaisora joined #nim |
10:26:38 | * | yglukhov quit (Ping timeout: 250 seconds) |
10:30:57 | * | FuntDobra quit (Quit: leaving) |
10:31:12 | * | FuntDobra joined #nim |
10:40:01 | * | elrood joined #nim |
10:52:51 | * | bjz_ joined #nim |
10:53:37 | * | bjz quit (Ping timeout: 240 seconds) |
10:55:51 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:56:32 | * | enthus1ast quit (Ping timeout: 260 seconds) |
11:01:50 | * | Snircle joined #nim |
11:08:07 | * | brechtm joined #nim |
11:17:19 | * | enthus1ast joined #nim |
11:19:59 | * | brechtm quit (Remote host closed the connection) |
11:21:15 | * | yglukhov joined #nim |
11:24:05 | * | Demon_Fox joined #nim |
11:26:29 | * | yglukhov quit (Ping timeout: 248 seconds) |
11:35:42 | FromGitter | <gogolxdong> `Error: sdl2.init(INIT_VIDEO): Failed to connect to the Mir Server ⏎ Error: could not set stencil size: Video subsystem has not been initialized ⏎ Could not create window!` |
11:40:05 | FromGitter | <gogolxdong> apt-get install mir-demos ubuntu-desktop-mir |
11:41:36 | flyx | is it possible to execute a process at compile time? nimscript can do it, but I cannot access the nimscript API in a macro, right? |
11:42:37 | * | gangstacat quit (Ping timeout: 260 seconds) |
11:43:24 | elrood | flyx, staticExec? |
11:44:20 | flyx | oh, I oversaw that |
11:44:34 | flyx | nice |
11:44:54 | flyx | but it doesn't seem to allow me to check the exit code |
11:47:41 | flyx | is there a possibility to retrieve it? |
11:59:53 | * | Dankrad quit (Ping timeout: 260 seconds) |
12:00:41 | flyx | hmm, I have an error again when reading a file. this time with slurp. but staticExec("pwd") returns the correct directory, so it doesn't seem to be the same error as yesterday |
12:01:37 | * | gangstacat joined #nim |
12:03:22 | * | gokr joined #nim |
12:07:33 | * | pafmaf joined #nim |
12:08:24 | flyx | oh dear |
12:08:42 | flyx | I have an assertion failure when compiling NimYAML with Nim debug build |
12:08:46 | flyx | better report that |
12:12:05 | * | akaisora quit (Read error: No route to host) |
12:13:07 | FromGitter | <gogolxdong> still stuck after install mir |
12:14:24 | flyx | gogolxdong: does not seem to be a Nim-related problem, perhaps ask Mir people? |
12:15:07 | elrood | flyx, apparently neither zahary nor araq considered exit-codes returnworthy at the time, if there's a compelling use-case you'd need those for and you're filing issues anyway you might want to add one for that as well |
12:15:42 | flyx | elrood: yeah, good idea. |
12:20:03 | elrood | in that context, do magic compiler features imply humble users shouldn't fiddle with or try to comprehend those? and do we want inline assembly in nim? |
12:21:58 | flyx | elrood: there's already http://nim-lang.org/docs/manual.html#statements-and-expressions-assembler-statement |
12:23:20 | elrood | oh, nice, was grepping for assembly and missed those. thanks |
12:24:10 | flyx | elrood: most of the things in system.nim are magic, but very common. I do not think it makes sense to have some kind of barrier labelled „only go behind this if you know what you're doing“. some features of Nim obviously assume that (like inline assembly), of course |
12:26:12 | flyx | heh. I now have 8 entries on Nim's Issues front page. |
12:28:49 | Araq | elrood: no idea what you mean. |
12:28:55 | Araq | we use exit-codes. |
12:30:59 | elrood | you do? staticExec returns a string, there didn't seem to be an obvious way to retrieve the spawned process' exit code. please enlighten us |
12:31:59 | Araq | ah staticExec, there is an issue open for that :P |
12:33:26 | elrood | filed by flyx a few minutes ago, perchance? ;P |
12:34:58 | Araq | no, it's an old issue |
12:35:24 | flyx | ah yes, I found it |
12:35:29 | flyx | will close mine as duplicate |
12:38:06 | * | FuntDobra quit (Quit: leaving) |
12:39:56 | * | FuntDobra joined #nim |
12:42:03 | elrood | it's even marked as easy.. a hacktoberfest-candidate, flyx? ;) |
12:44:14 | * | cheatfate joined #nim |
12:45:40 | * | cheatfate quit (Client Quit) |
12:46:10 | * | cheatfate joined #nim |
12:49:33 | flyx | let me first create another issue to compensate for the one I just closed: https://github.com/nim-lang/Nim/issues/4871 |
13:02:43 | * | dddddd joined #nim |
13:03:04 | * | pafmaf_ joined #nim |
13:05:14 | * | pafmaf quit (Ping timeout: 250 seconds) |
13:07:40 | * | Matthias247 quit (Read error: Connection reset by peer) |
13:08:57 | * | Matthias247 joined #nim |
13:14:55 | * | ftsf quit (Quit: Leaving) |
13:22:18 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:25:07 | * | bjz joined #nim |
13:25:43 | * | Ven_ joined #nim |
13:27:18 | dom96 | So I finally modified Nimble to use the main feature that NimScript support brought https://github.com/nim-lang/nimble/blob/master/nimble.nimble#L4 |
13:27:37 | * | Sembei joined #nim |
13:28:12 | * | Pisuke quit (Ping timeout: 260 seconds) |
13:29:52 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
13:50:27 | dom96 | Does anyone know if methods work with the JS backend? |
13:54:42 | * | yglukhov joined #nim |
13:54:55 | * | yglukhov quit (Remote host closed the connection) |
13:55:02 | * | yglukhov joined #nim |
13:57:20 | flyx | hum, I wonder if „walkDir does not work on travis“ a good issue description |
13:57:29 | flyx | *+is |
14:00:21 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:01:46 | flyx | I wonder even more if all these things work on Windows |
14:05:01 | * | yglukhov quit (Remote host closed the connection) |
14:05:20 | * | Matthias247 quit (Read error: Connection reset by peer) |
14:06:23 | * | Ven__ joined #nim |
14:06:31 | * | Ven_ quit (Read error: Connection reset by peer) |
14:21:21 | * | Ven__ quit (Ping timeout: 244 seconds) |
14:22:30 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:24:45 | * | Snircle joined #nim |
14:24:50 | * | Ven_ joined #nim |
14:35:54 | * | irrequietus joined #nim |
14:44:34 | * | yglukhov joined #nim |
14:48:49 | * | yglukhov quit (Ping timeout: 260 seconds) |
15:02:38 | Araq | dom96: they do work. |
15:02:50 | Araq | flyx: walkDir works on every OS I tried it |
15:03:20 | Araq | "So, staticExec uses the current working directory, while staticRead uses the source file's location." |
15:04:00 | flyx | Araq: well all I know is that it didn't work on travis. issue may be elsewhere, but debugging on travis is hard, so I just called ls instead, which worked. |
15:04:05 | Araq | yes, and that's correct or at least not a bug. usually you don't have binaries next to .nim files |
15:04:26 | * | PMunch joined #nim |
15:04:56 | Araq | staticExec is different from staticRead, I'm tired of this "inconsistent" bullshit Totschlagargument |
15:05:38 | Araq | it's not inconsistent because consistency is not implied by similar names. It's different, big deal. |
15:07:56 | flyx | it is not just the names which make those procs similar. I do not see how you can argue that they do not have to do anything with each other |
15:09:01 | Araq | "usually you don't have binaries next to .nim files" |
15:10:52 | flyx | consistency is usually assumed by the user if functionality is grouped in some way. grouping can be done in a number of different ways, including packages, files, or whatever. and yes, in a large package like system.nim, grouping happens by similar names and positioning in the documentation (they are next to each other) |
15:11:24 | flyx | you can like it or not, but from a user perspective, this is unexpected behavior |
15:11:30 | Araq | the proposed consistency makes no sense. |
15:12:35 | PMunch | Wait, what's the proposed consistency? |
15:12:57 | PMunch | Looking at the docs they appear to behave as you would suspect |
15:17:37 | PMunch | No one? |
15:19:03 | flyx | for me, the inconsistency makes no sense. I cannot see how this would help anyone to write or read Nim code. if you have to keep in mind the exact environment for every different proc rather than for groups of procs, this makes both reading and writing code harder. |
15:19:36 | PMunch | What inconsistency though? Sorry I dropped into the conversation a bit late |
15:20:00 | flyx | PMunch: https://github.com/nim-lang/Nim/issues/4871 |
15:21:14 | PMunch | Aaah, I can see how that would be confusing.. |
15:22:24 | PMunch | Personally I think that staticExec should be changed to work like staticRead, even without knowing of staticRead |
15:23:00 | PMunch | That way executing the compiler from different locations won't give different results which honestly would be quite confusing. |
15:23:20 | flyx | yes, I would also prefer that solution |
15:26:40 | Araq | ok, so fix it |
15:28:44 | Araq | makes staticExec inconsistent with the stuff of osproc, but we only care about consistencies when it suits our arguments, right? |
15:30:50 | * | pafmaf_ quit (Ping timeout: 250 seconds) |
15:35:20 | flyx | that is a different module, its procs have a different environment (compile time vs. runtime), so I do not see how there can be any consistency that could be broken |
15:36:32 | flyx | the working directory of a binary compiled with Nim actually is a third thing besides the working directory of the compiler and that of the source file, so it would be „inconsistent“ anyway |
15:37:18 | * | Ven_ quit (Ping timeout: 268 seconds) |
15:38:21 | Araq | whatever man. 'nim c -r' means these dirs are often the same and somebody not aware of these differences would argue about "consistency" from his point. |
15:39:00 | Araq | which is actually my main point: Arguing staticExec should behave differently because of reasons is good and convincing. |
15:39:10 | Araq | (In fact, you already convinced me.) |
15:39:36 | Araq | but the argument "it's inconsitent with some other thing" is tiresome and not convincing. |
15:39:49 | * | Ven_ joined #nim |
15:45:50 | * | ARCADIVS quit (Quit: ARCADIVS) |
15:48:03 | * | Sentreen quit (Read error: Connection reset by peer) |
15:48:49 | * | Sentreen joined #nim |
15:52:15 | * | yglukhov joined #nim |
15:56:26 | Araq | hmm bug #4856 is really hard |
15:57:07 | * | yglukhov quit (Remote host closed the connection) |
15:58:02 | Araq | it doesn't help the description of what happens is wrong |
16:05:21 | flyx | well that wasn't too hard. https://github.com/nim-lang/Nim/pull/4872 |
16:05:41 | flyx | I think if that gets merged, I can also tackle the issue about the missing error code |
16:08:24 | Araq | consider it merged and work on the error code already |
16:09:38 | Araq | ah plus I don't want to merge it until 0.15.2 is out |
16:09:52 | Araq | it changes behaviour |
16:10:30 | flyx | understandable |
16:15:53 | PMunch | Araq, I totally agree with your stance on the inconsistency thing. As long as they're not actually related then inconsistency doesn't matter. But I'm glad to see that you agree on the other reasoning for changing staticExec. Must be an ungrateful task being the owner/coordinator of a language, don't envy you for that :P But to let you know I really like what you've done and keep doing with Nim :) |
16:16:48 | PMunch | Oh by the way, is there a way to create a macro using < and > as brackets? It seems to parse them as less than/greater than which leads to syntax errors in the case I wanted to use them. |
16:17:10 | Araq | there is no way besides hiding the <> in a string literal |
16:17:50 | derlafff | hmm. /me is getting strange "Cannot allocate memory" |
16:17:55 | Araq | I consider it a great feature of the language that the same parsing rules are used throughout |
16:18:09 | derlafff | while I still have about 7M for free |
16:18:13 | Araq | (ooops, am I arguing for consistency) |
16:19:56 | PMunch | Makes sense, I was just wondering |
16:20:25 | * | yglukhov joined #nim |
16:20:31 | Araq | PMunch: what I did for xml was something like <>tagname(attr=value) |
16:20:56 | Araq | not ideal, but close enough |
16:21:27 | derlafff | Error: unhandled exception: An attempt was made to complete a Future more than once. Details: |
16:21:27 | derlafff | whoooa |
16:21:56 | PMunch | Hmm, that makes sense I guess. I was just looking into the possibility of implementing docopts(.org) into a macro that would evaluate types and create a more robust parser. So the only thing you would have to worry about was writing your program :) |
16:27:19 | * | PMunch quit (Quit: leaving) |
16:28:00 | * | fredrik92 joined #nim |
16:28:29 | * | fredrik92 quit (Client Quit) |
16:29:35 | * | fredrik92 joined #nim |
16:33:11 | * | yglukhov quit (Read error: Connection reset by peer) |
16:37:24 | flyx | Araq: why has gorge a `= discard` in system.nim, while slurp hasn't? is that relevant? |
16:37:35 | Araq | no |
16:37:59 | Araq | with the = discard it's easier to bootstrap things |
16:38:04 | Araq | so newer things tend to use it |
16:42:20 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:51:33 | jh32 | hi |
16:53:53 | jh32 | regarding PR #4828: should I remove the refactoring part? But I think the exit code issue that is shown by the test case really needs to be fixed. |
16:59:56 | * | onionhammer1 quit (Ping timeout: 268 seconds) |
17:00:25 | Araq | jh32: I don't see the refactoring as a problem, but the "assign -3 hack" should somehow be removed |
17:00:32 | Araq | any ideas how to accomplish this? |
17:01:37 | Araq | oh wait sorry |
17:01:40 | jh32 | it's fixed with PR #4828 - I just thought that you might not want the refactoring part of it |
17:02:11 | Araq | so this doesn't really change behaviour except for edge cases right? |
17:02:36 | jh32 | that's the intention :-) |
17:03:27 | Araq | alright, it'll be in 0.15.2, merged. |
17:03:47 | jh32 | cool, thanks |
17:03:59 | * | zidane_g joined #nim |
17:05:44 | Araq | hi zidane_g welcome |
17:06:42 | jh32 | should I try to get rid of the -3 thing? |
17:06:43 | flyx | Araq: I think I need some background on the VM. I have no idea what things like `genBinaryABCD` are and how I use them to add a parameter to gorge |
17:06:46 | zidane_g | hello, thank you |
17:08:06 | Araq | flyx: there is no ABCD |
17:08:33 | Araq | a VM instruction is opcode + up to 3 optional arguments |
17:08:52 | flyx | well that's what's used here: `of mStaticExec: genBinaryABCD(c, n, dest, opcGorge)` |
17:09:11 | Araq | if you need 4 arguments you need to use a 2 word instruction |
17:09:24 | flyx | ah okay, and the first argument is the return value |
17:09:29 | flyx | if I read it correctly |
17:13:08 | * | libman joined #nim |
17:15:00 | Araq | well it depends |
17:15:08 | Araq | it's the "destination" |
17:22:09 | flyx | okay, but in this case, it is. that's why it is already a two-word instruction |
17:22:27 | flyx | so I should add the additional parameter to the second word |
17:26:54 | * | Matthias247 joined #nim |
17:29:12 | Araq | flyx: are you talking about staticExecEx which returns (exitCode, string) ? |
17:30:09 | flyx | Araq: I want to implement the version with an optional bool parameter onErrorRaise |
17:30:35 | Araq | hmm? |
17:31:04 | Araq | ah ok |
17:31:19 | flyx | I almost have it |
17:31:26 | flyx | only need to raise an exception now |
17:32:00 | flyx | looks nontrivial, but I can probably borrow the code from opcRaise |
17:33:33 | * | dddddd quit (Ping timeout: 244 seconds) |
17:35:53 | flyx | any advice on how to generate an Exception object to raise? |
17:37:39 | Araq | he, no, I think it's quite impossible to get the proper type descriptor at this point |
17:37:52 | elrood | flyx, it would be quite useful to return the exit code and let the developer decide how to handle that instead of hiding that information and offering a black-or-white solution, don't you think? |
17:39:34 | flyx | elrood: yeah, that can be in the Exception's msg. anything else would ask for an additional staticExecEx command. and I believe Araq when he says that returning a tuple is hard, so I do not want to try that for now. |
17:39:44 | flyx | Araq: I feared that |
17:40:29 | chemist69 | Hi, is there a version of `echo` that does not add a newline at the end? |
17:41:25 | flyx | chemist69: stdout.write |
17:41:55 | Araq | flyx: returning a tuple is hard, but raising an exception is harder |
17:41:58 | chemist69 | great, thanks. |
17:42:34 | flyx | well I have an implementation that breaks with a stack trace if onErrorRaise is true. that's a good start |
18:01:05 | * | chemist69 quit (Ping timeout: 260 seconds) |
18:01:39 | * | onionhammer1 joined #nim |
18:02:23 | flyx | Araq: if I see it correctly, I cannot use the same "StaticExec" magic for a staticExecEx proc, because I cannot check which one was called in opcGorge. but if I add another magic, bootstrapping will become a problem? |
18:03:18 | * | chemist69 joined #nim |
18:11:13 | Araq | no, '= discard' solves the bootstrapping problems |
18:16:47 | elrood | 0.15 << 1.0 we shouldn't be too afraid of breaking changes yet, especially when they are minor, easy to fix and a step forward. an improved staticExec in the long run would be the better alternative to another proc which essentially does the same thing |
18:16:48 | * | Ven_ joined #nim |
18:21:28 | * | Ven_ quit (Read error: Connection reset by peer) |
18:21:57 | * | Ven_ joined #nim |
18:24:35 | * | Trustable joined #nim |
18:34:05 | * | brson joined #nim |
18:35:56 | * | Ven_ quit (Read error: Connection reset by peer) |
18:36:15 | * | Ven_ joined #nim |
18:37:38 | Araq | elrood: for my the version number only says "serious bugs left" |
18:37:51 | Araq | it's not an excuse to never deliver anything stable. |
18:40:14 | dom96 | IMO staticExec should raise an exception and we should add staticExecEx as well which returns a tuple |
18:40:22 | dom96 | That way it's consistent with osproc, kind of ;P |
18:45:11 | elrood | Araq, laudable attitude, otoh if one wants to smooth out rough edges, it's better done early and often than too late or never |
18:46:24 | * | Calinou quit (Ping timeout: 244 seconds) |
18:53:27 | * | Ven_ quit (Read error: Connection reset by peer) |
18:56:10 | * | libman wants a lot more compile-time features, especially the ability to `import` |
18:56:43 | * | Calinou joined #nim |
18:57:36 | flyx | Araq: made it. https://github.com/nim-lang/Nim/pull/4874 I guess it is no problem for it to include the other PR, because you'd merge it after 0.15.2 anyway |
18:58:02 | * | Ven_ joined #nim |
18:59:28 | Araq | libman: 'import' is resolved at compile-time |
19:01:27 | libman | I wanted to walkDir() a source sub-directory to automatically import .nim files which register additional arguments for this command. |
19:01:52 | flyx | dom96: well as Araq said, raising an exception is very hard. but I added an optional onErrorBreak to staticRead in my PR. |
19:02:05 | libman | In https://github.com/lbmn/nim/tree/master/lice (WARNING: super duper ugly unfinished code) |
19:03:41 | * | yglukhov joined #nim |
19:04:40 | flyx | libman: that should be already possible with a macro |
19:05:25 | dom96 | flyx: what is the difficulty in raising an exception? |
19:06:32 | flyx | dom96: generating the exception object inside the VM |
19:07:41 | dom96 | I think that in the long run we should ensure that staticExec raises an exception (and staticRead too if it doesn't already). |
19:07:51 | dom96 | As long as it doesn't require us having to rewrite the VM of course |
19:08:45 | dom96 | elrood: I do agree with you. If I can help it, 0.16.0 will polish as much as it can even if that means many breaking changes. |
19:10:40 | * | stisa joined #nim |
19:12:27 | * | yglukhov quit (Read error: Connection reset by peer) |
19:14:03 | * | stisa quit (Remote host closed the connection) |
19:14:27 | * | stisa joined #nim |
19:14:49 | * | yglukhov joined #nim |
19:18:17 | * | yglukhov quit (Read error: Connection reset by peer) |
19:18:29 | flyx | dom96: staticRead currently issues an errCannotOpenFile if it fails |
19:21:22 | dom96 | and what is that? |
19:21:56 | * | yglukhov joined #nim |
19:25:05 | flyx | it break with a stacktrace and an error message. |
19:27:34 | flyx | so, basically, we need a possibility to create an exception object within the VM to make these improvements. that's the hard part, if we have that, raising it looks rather easy |
19:33:29 | chemist69 | does Nim have something like the `shuffle` function in Python, which randomizes the order of the elements of an array or a seq? |
19:35:38 | flyx | I don't think so. |
19:36:01 | chemist69 | ok, thanks. |
19:39:32 | * | fredrik92 quit (Quit: Client disconnecting) |
19:53:06 | * | PMunch joined #nim |
19:53:31 | * | kulelu88 joined #nim |
19:59:04 | * | yglukhov quit (Remote host closed the connection) |
20:03:38 | * | yglukhov joined #nim |
20:04:47 | * | yglukhov_ joined #nim |
20:04:56 | * | yglukhov quit (Read error: Connection reset by peer) |
20:09:08 | * | FuntDobra quit (Remote host closed the connection) |
20:09:21 | * | Demon_Fox quit (Quit: Leaving) |
20:09:29 | * | yglukhov_ quit (Ping timeout: 250 seconds) |
20:12:30 | * | chemist69 quit (Ping timeout: 250 seconds) |
20:18:50 | * | chemist69 joined #nim |
20:21:54 | * | FuntDobra joined #nim |
20:25:29 | * | bjz joined #nim |
20:39:06 | * | shodan45 joined #nim |
20:46:04 | * | Kingsquee joined #nim |
20:48:03 | cheatfate | why you guys dropped support for asmgen? |
20:52:49 | * | PMunch quit (Quit: leaving) |
20:52:59 | * | Ven_ quit (Ping timeout: 244 seconds) |
20:53:31 | * | PMunch joined #nim |
20:55:02 | * | libman quit (Remote host closed the connection) |
20:55:07 | Araq | cheatfate: did we? |
20:55:22 | cheatfate | Araq, last update was in 2015 :) |
20:57:39 | * | Ven_ joined #nim |
21:08:50 | * | Ven_ quit (Ping timeout: 250 seconds) |
21:11:23 | * | Ven_ joined #nim |
21:14:00 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:25:40 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:30:47 | * | Kingsquee quit (Read error: Connection reset by peer) |
21:30:56 | * | Kingsquee joined #nim |
21:34:39 | * | Trustable quit (Remote host closed the connection) |
21:37:11 | * | yglukhov joined #nim |
21:55:02 | * | bjz joined #nim |
21:56:24 | * | pie_ quit (Ping timeout: 260 seconds) |
22:00:22 | * | pie_ joined #nim |
22:00:59 | * | elrood quit (Quit: Leaving) |
22:01:35 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:02:24 | * | bjz joined #nim |
22:02:26 | PMunch | Hmm, in many languages you can simply do i+=1 in a for loop to skip an iteration. Nim doesn't declare i as var so that doesn't work. Any other ways to skip? |
22:04:59 | reactormonk | Try `next` |
22:06:06 | * | Jesin joined #nim |
22:06:10 | PMunch | Undefined? |
22:06:34 | PMunch | This is a simple for i in 1..variable: loop by the way |
22:07:19 | BlaXpirit | PMunch, continue ? |
22:07:46 | reactormonk | ah right, wrong language. |
22:08:06 | PMunch | BlaXpirit, continue is drop everything else in this iteration and go to the next |
22:08:16 | PMunch | I want to skip the next iteration |
22:08:27 | PMunch | What i++; continue; would do in other languages |
22:08:34 | BlaXpirit | PMunch, use a while loop |
22:08:56 | BlaXpirit | these "other languages" don't have a for loop, it's a fake while loop. so use a while loop. |
22:09:09 | PMunch | Hmm, I guess |
22:10:07 | * | pie_ quit (Ping timeout: 268 seconds) |
22:10:30 | dom96 | PMunch: maybe there is a different solution, what algorithm is this for? |
22:11:06 | PMunch | A string parser |
22:11:17 | PMunch | I'm parsing a string into a tree |
22:11:24 | dom96 | yeah, use a while loop |
22:13:59 | dom96 | and instead of looking at the length of the string break out of the loop when str[i] == '\0' |
22:14:20 | * | pie_ joined #nim |
22:14:59 | dom96 | Something like this, except use a case statement whenever you can https://github.com/nim-lang/Nim/blob/devel/lib/pure/parsecsv.nim#L122 |
22:22:11 | * | bjz quit (Read error: Connection reset by peer) |
22:27:16 | * | pie_ quit (Ping timeout: 260 seconds) |
22:30:38 | * | pie_ joined #nim |
22:32:58 | * | irrequietus quit () |
22:42:48 | PMunch | dom96, is there a way to do the multicase switch statement possible in languages that needs a break between cases? |
22:43:10 | PMunch | I.e. multiple cases doing the same thing |
22:44:29 | BlaXpirit | PMunch, if the body of two cases are the same then just write them separated by comma |
22:44:38 | PMunch | Ah, nice |
22:49:54 | * | yglukhov quit (Remote host closed the connection) |
22:50:33 | * | desophos joined #nim |
22:50:52 | * | desophos quit (Read error: Connection reset by peer) |
22:51:18 | * | desophos joined #nim |
23:03:45 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:11:48 | * | nsf joined #nim |
23:21:26 | * | gokr quit (Ping timeout: 250 seconds) |
23:30:53 | * | pie_ quit (Changing host) |
23:30:53 | * | pie_ joined #nim |
23:41:02 | * | PMunch quit (Quit: leaving) |
23:50:24 | * | yglukhov joined #nim |
23:52:40 | * | vonh quit (Ping timeout: 260 seconds) |
23:55:45 | * | yglukhov quit (Ping timeout: 260 seconds) |
23:56:36 | * | ftsf joined #nim |