00:24:01 | * | yglukhov joined #nim |
00:28:25 | * | yglukhov quit (Ping timeout: 250 seconds) |
00:52:03 | * | xet7 quit (Ping timeout: 240 seconds) |
00:57:45 | mcc | flyx: the next time you are on i would like to ask you a question about nimyaml, i installed it on a windows machine (it runs under msys2) and when run it fails with an error |
01:00:12 | * | yglukhov joined #nim |
01:02:58 | tautologico | @[] is different from nil, right? |
01:05:05 | * | yglukhov quit (Ping timeout: 260 seconds) |
01:09:09 | mcc | @[] is an empty open array and it can be operated on and mutated so it must be different from nil |
01:09:28 | * | chemist69 quit (Ping timeout: 264 seconds) |
01:22:23 | * | chemist69 joined #nim |
01:24:32 | * | yglukhov joined #nim |
01:29:03 | * | yglukhov quit (Ping timeout: 240 seconds) |
01:34:38 | * | arnetheduck joined #nim |
01:48:43 | * | yglukhov joined #nim |
01:53:27 | * | yglukhov quit (Ping timeout: 276 seconds) |
02:12:55 | * | yglukhov joined #nim |
02:17:01 | * | yglukhov quit (Ping timeout: 240 seconds) |
02:48:42 | * | fgimian joined #nim |
02:48:44 | fgimian | hey there guys |
02:48:54 | fgimian | can anyone assist me with iterating over a StringTableRef? |
02:48:56 | fgimian | i can't seem to find any examples of this |
02:49:15 | * | yglukhov joined #nim |
02:53:28 | * | yglukhov quit (Ping timeout: 252 seconds) |
03:21:18 | mcc | What is the "best practices" way in Nim to represent something like an "Option"? Say, I have a value which I know will be either 0, 1, 2, 3 or Nothing. |
03:22:18 | mcc | So like ML I'd represent this as an "int option", and in Python I'd represent it as a variable containing either an int or None, and in C I'd special-case -1 as the "none" value and then feel gross about this |
03:25:31 | * | yglukhov joined #nim |
03:27:22 | * | fgimian quit (Quit: Textual IRC Client: www.textualapp.com) |
03:29:52 | * | yglukhov quit (Ping timeout: 260 seconds) |
03:30:02 | tautologico | an actual option type would be nice |
03:34:48 | * | xet7 joined #nim |
03:37:38 | mcc | You could sort of do it with object variants. |
03:37:49 | mcc | Actually probably you could make a standard option with generics + variants |
03:49:40 | * | RushPL quit (Quit: No Ping reply in 180 seconds.) |
03:52:04 | * | RushPL joined #nim |
04:01:52 | * | yglukhov joined #nim |
04:06:37 | * | yglukhov quit (Ping timeout: 260 seconds) |
04:08:19 | * | RushPL quit (Quit: No Ping reply in 180 seconds.) |
04:11:16 | * | RushPL joined #nim |
04:32:17 | fowl | tautologico, mcc, http://nim-lang.org/docs/options.html |
04:33:03 | mcc | Well, that's straightforward. |
04:38:06 | * | yglukhov joined #nim |
04:42:34 | * | yglukhov quit (Ping timeout: 260 seconds) |
05:14:08 | * | chemist69 quit (Ping timeout: 258 seconds) |
05:14:26 | * | yglukhov joined #nim |
05:14:36 | * | chemist69 joined #nim |
05:16:02 | * | nsf quit (Quit: WeeChat 1.4) |
05:18:57 | * | yglukhov quit (Ping timeout: 260 seconds) |
05:38:40 | * | yglukhov joined #nim |
05:43:27 | * | yglukhov quit (Ping timeout: 260 seconds) |
06:14:04 | * | fgimian joined #nim |
06:14:59 | * | yglukhov joined #nim |
06:19:10 | * | yglukhov quit (Ping timeout: 244 seconds) |
06:25:24 | * | filwit quit (Quit: Konversation terminated!) |
06:31:12 | * | fgimian quit (Quit: Textual IRC Client: www.textualapp.com) |
06:41:51 | * | bjz joined #nim |
06:42:33 | * | bjz_ quit (Ping timeout: 240 seconds) |
06:50:06 | * | yglukhov joined #nim |
06:54:37 | * | yglukhov quit (Ping timeout: 260 seconds) |
07:19:53 | * | endragor joined #nim |
07:28:43 | * | bjz_ joined #nim |
07:28:57 | * | yglukhov joined #nim |
07:29:25 | * | bjz quit (Ping timeout: 244 seconds) |
07:43:24 | * | StarBrilliant joined #nim |
07:54:41 | * | yglukhov quit (Remote host closed the connection) |
07:59:23 | * | Greglefox joined #nim |
08:13:11 | * | Greglefox quit (Quit: Page closed) |
08:23:59 | * | nsf joined #nim |
08:36:28 | * | bjz joined #nim |
08:38:42 | * | bjz_ quit (Ping timeout: 272 seconds) |
08:43:53 | * | yglukhov joined #nim |
08:44:58 | * | Demon_Fox quit (Quit: Leaving) |
08:46:32 | * | mcc quit (Quit: Connection closed for inactivity) |
08:48:50 | * | yglukhov quit (Ping timeout: 272 seconds) |
08:50:14 | * | RushPL quit (Remote host closed the connection) |
08:52:31 | * | RushPL joined #nim |
09:02:38 | * | yglukhov joined #nim |
09:09:02 | flyx | mcc: I'm awake now, tell me about your nimyaml problems |
09:09:18 | flyx | ah well, now he's gone |
09:10:37 | * | yglukhov_ joined #nim |
09:10:37 | * | yglukhov quit (Read error: Connection reset by peer) |
09:12:56 | * | Arrrr joined #nim |
09:12:56 | * | Arrrr quit (Changing host) |
09:12:56 | * | Arrrr joined #nim |
09:35:39 | * | yglukhov_ quit (Remote host closed the connection) |
09:41:29 | * | Ven joined #nim |
09:43:05 | * | chemist69 quit (Ping timeout: 250 seconds) |
09:44:57 | * | yglukhov joined #nim |
09:45:42 | * | Matthias247 joined #nim |
09:47:30 | * | chemist69 joined #nim |
09:49:03 | * | yglukhov quit (Ping timeout: 240 seconds) |
09:50:00 | * | rok joined #nim |
09:53:35 | * | Ven_ joined #nim |
09:54:42 | * | Ven quit (Ping timeout: 272 seconds) |
09:56:55 | cheatfate | looks like somebody breaks something in shared memory alloc/dealloc |
09:58:20 | * | yglukhov joined #nim |
10:03:33 | * | yglukhov quit (Ping timeout: 276 seconds) |
10:07:18 | * | Mat4 joined #nim |
10:09:47 | * | Mat4 quit (Client Quit) |
10:26:10 | * | Ven joined #nim |
10:26:35 | * | nsf quit (Quit: WeeChat 1.4) |
10:27:41 | * | Ven_ quit (Ping timeout: 240 seconds) |
10:40:04 | * | Ven_ joined #nim |
10:41:56 | cheatfate | dom96, are you here |
10:41:57 | cheatfate | ? |
10:42:04 | * | Ven quit (Ping timeout: 252 seconds) |
10:42:06 | dom96 | yes |
10:42:11 | cheatfate | I found one bug in my `callSoon` and want to discuss it |
10:42:44 | cheatfate | i though it was allocShared/deallocShared |
10:42:48 | cheatfate | but it is not |
10:42:57 | cheatfate | https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L1668 |
10:43:22 | cheatfate | what do you think about this line and its modification to `proc callSoon*(cbproc: proc () {.closure,gcsafe.}) =` |
10:45:06 | dom96 | sounds good I guess |
10:51:34 | * | desophos quit (Read error: Connection reset by peer) |
10:52:04 | cheatfate | ok i will do some tests |
10:52:08 | cheatfate | and then i will make pr |
10:52:28 | * | Rush__ joined #nim |
10:53:28 | * | vqrs_ joined #nim |
10:53:34 | * | pigmej quit (Ping timeout: 260 seconds) |
10:53:34 | * | JStoker quit (Ping timeout: 260 seconds) |
10:53:34 | * | RushPL quit (Ping timeout: 260 seconds) |
10:53:35 | * | Xe quit (Ping timeout: 260 seconds) |
10:53:36 | * | heinrich5991 quit (Ping timeout: 260 seconds) |
10:53:36 | * | Sergio965 quit (Ping timeout: 260 seconds) |
10:53:36 | * | vqrs quit (Ping timeout: 260 seconds) |
10:53:37 | * | def- quit (Ping timeout: 260 seconds) |
10:53:37 | * | Jesin quit (Ping timeout: 260 seconds) |
10:53:37 | * | BitToAtom quit (Ping timeout: 260 seconds) |
10:53:46 | * | MonsterAbyss joined #nim |
10:54:03 | * | def- joined #nim |
10:54:53 | * | Sergio965 joined #nim |
10:55:42 | * | pigmej joined #nim |
10:56:15 | * | Xe joined #nim |
10:56:38 | * | heinrich5991 joined #nim |
10:58:24 | * | JStoker joined #nim |
11:00:01 | * | jivank quit (Ping timeout: 260 seconds) |
11:00:46 | * | Jesin joined #nim |
11:01:41 | * | jivank joined #nim |
11:19:04 | * | rok quit (Ping timeout: 258 seconds) |
11:20:20 | * | yglukhov joined #nim |
11:20:20 | * | TheLemonMan joined #nim |
11:24:55 | * | yglukhov quit (Ping timeout: 250 seconds) |
11:26:54 | * | yglukhov joined #nim |
11:35:22 | * | |meta joined #nim |
11:37:27 | * | jjido joined #nim |
11:38:17 | * | nsf joined #nim |
11:39:14 | * | jjido quit (Read error: Connection reset by peer) |
11:40:36 | * | |meta is now known as |sir |
11:46:45 | * | chemist69 quit (Ping timeout: 260 seconds) |
11:49:49 | * | chemist69 joined #nim |
12:09:41 | cheatfate | Araq, ahoy |
12:09:57 | Araq | servus |
12:10:08 | * | Ven_ quit (Read error: Connection reset by peer) |
12:10:26 | cheatfate | Araq, just one more question, if i use lwan tactic to build threaded server, then looks i dont need threadsafe selectors |
12:10:41 | cheatfate | because every thread will use it own poll() |
12:11:32 | cheatfate | and there no interaction between threads except for queue with sockets from acceptor thread |
12:11:47 | * | Ven joined #nim |
12:11:52 | Araq | possible |
12:13:14 | * | yglukhov quit (Remote host closed the connection) |
12:15:01 | cheatfate | because this shared memory just hurts me |
12:15:35 | Araq | performance-wise or what do you mean? |
12:16:21 | cheatfate | ok i have on experiment, in windows part of asyncdispatch.nim i have replaced CustomOverlapped to use `shared memory` not `gc memory` |
12:16:33 | cheatfate | i mean PCustomOverlapped to be sure |
12:17:23 | cheatfate | and tasyncawait.nim test failed with SIGSEGV |
12:17:56 | cheatfate | gc.nim(589) growObj |
12:17:56 | cheatfate | system.nim(343) growObj |
12:17:56 | cheatfate | SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
12:18:16 | Araq | that only means you screwed it up :P |
12:18:32 | cheatfate | Yeah i know :) |
12:18:35 | cheatfate | looks like |
12:18:39 | Araq | with -d:useSysAssert -d:useGcAssert |
12:18:47 | Araq | it should tell you what's wrong |
12:21:01 | cheatfate | not really :( https://gist.github.com/cheatfate/9374002073d930b365ce8d59ce85b43b |
12:23:05 | * | chemist69 quit (Ping timeout: 258 seconds) |
12:23:24 | * | chemist69 joined #nim |
12:23:28 | cheatfate | so i think to remove all shared memory staff from my project and skip threadsafe feature... |
12:23:57 | cheatfate | because after all this bugs i dont think somebody will ever use it |
12:23:58 | Araq | tasyncawait.nim(34) readMessagesIter |
12:24:09 | Araq | is the problem |
12:24:34 | cheatfate | var line = await recvLine(client) |
12:24:44 | cheatfate | it becomes problem only when i start to use shared memory |
12:25:14 | * | yglukhov joined #nim |
12:25:47 | cheatfate | i think i'm smashing gc memory |
12:25:49 | * | Ven quit (Read error: Connection reset by peer) |
12:25:53 | cheatfate | but i dont know how |
12:26:16 | * | GangstaCat quit (Ping timeout: 264 seconds) |
12:26:19 | cheatfate | i will start from the beginning |
12:26:36 | cheatfate | this will be i think 10th start from the beginning |
12:27:22 | Araq | omg, no. |
12:27:36 | Araq | keep this version around but disable it. |
12:27:50 | Araq | one day I will look into it and fix it. |
12:28:48 | * | Ven joined #nim |
12:29:26 | * | yglukhov quit (Ping timeout: 244 seconds) |
12:31:26 | * | yglukhov joined #nim |
12:35:52 | * | yglukhov quit (Ping timeout: 260 seconds) |
12:36:08 | cheatfate | Araq, main problem that this bug affected all OSes |
12:37:36 | cheatfate | I think when i pushed `callSoon` PR i have made something wrong with this `{.closure,gcsafe.}` pragmas |
12:38:14 | cheatfate | its ok when callback data all stored in `gc memory` |
12:38:37 | cheatfate | but when i move it to `shared memory` and then move back to `gc memory` something becomes wrong |
12:39:14 | cheatfate | maybe it loosing it environment parameter |
12:40:18 | * | Ven quit (Read error: Connection reset by peer) |
12:43:53 | * | bjz_ joined #nim |
12:45:01 | * | bjz quit (Ping timeout: 240 seconds) |
12:45:55 | * | Ven joined #nim |
12:48:11 | * | GangstaCat joined #nim |
12:52:05 | * | xet7 quit (Ping timeout: 260 seconds) |
12:56:04 | * | Ven quit (Read error: Connection reset by peer) |
13:03:39 | * | Arrrr quit (Quit: WeeChat 1.4) |
13:05:49 | * | Ven joined #nim |
13:06:06 | * | endragor_ joined #nim |
13:07:23 | * | fredrik92 joined #nim |
13:14:23 | * | fastrom quit (Quit: Leaving.) |
13:15:03 | * | endragor_ quit (Remote host closed the connection) |
13:20:21 | * | rok joined #nim |
13:26:29 | flyx | seems like fieldPairs correctly iterates only over current fields of a variant object. is this correct for all cases? |
13:26:46 | cheatfate | ok i have made this thing again on current devel version of asyncdispatch.nim |
13:26:56 | cheatfate | and i got sigsegv again |
13:31:10 | * | endragor quit (Ping timeout: 260 seconds) |
13:33:32 | Araq | flyx: I don't think fieldPairs works with case objects at all |
13:33:42 | Araq | but maybe I've implemented that :P |
13:41:52 | flyx | the output of my code implies that it does |
13:47:27 | * | Gonzih quit (Read error: Connection reset by peer) |
13:49:35 | cheatfate | Looking for help :) https://gist.github.com/cheatfate/65e3b11ba492fe44fd721ab0cc272c62/revisions |
13:50:10 | cheatfate | this works fine on windows when compiled with `nim c tests/async/tasyncawait.nim" |
13:50:34 | cheatfate | and makes SIGSEGV when compiled with `nim c --threads:on tests/async/tasyncawait.nim` |
13:53:17 | cheatfate | but ^^^ this is not compiler bug... its tasyncawait.exe's SIGSEGV |
14:13:30 | * | yglukhov joined #nim |
14:17:57 | * | yglukhov quit (Ping timeout: 260 seconds) |
14:19:54 | * | jjido joined #nim |
14:22:14 | * | _stowa joined #nim |
14:22:20 | Araq | cheatfate: already busy with your template bug |
14:22:59 | cheatfate | Araq, lol |
14:30:04 | * | _stowa quit (K-Lined) |
14:36:27 | Araq | cheatfate: but I found that. sooooo .... |
14:42:16 | flyx | how can I get the name of a type from an nnkSym NimNode? |
14:43:03 | flyx | typetraits.name only works on typedesc, but not on a NimNode, and getType does not return the name |
14:43:52 | Araq | getType does return the name |
14:44:50 | flyx | treeRepr on getType yields: |
14:44:53 | flyx | EnumTy |
14:44:53 | flyx | EnumTy |
14:44:53 | flyx | Sym "fooInt" |
14:44:54 | flyx | Sym "fooBool" |
14:44:55 | flyx | Sym "fooNone" |
14:45:07 | flyx | there's no name in there |
14:46:15 | * | yglukhov joined #nim |
14:51:22 | Araq | flyx: https://github.com/nim-lang/Nim/blob/devel/tests/macros/tgettypeinst.nim |
14:53:11 | Araq | cheatfate: for data*: CompletionData # you need to protect the callback |
14:54:14 | Araq | via system.protect and then you need to free it via system.dispose |
14:59:20 | flyx | Araq: not sure how that helps me, but I found a better way of doing stuff, so I don't need it anymore |
14:59:26 | * | |sir is now known as |2701 |
15:26:08 | * | Gonzih joined #nim |
15:27:53 | * | xet7 joined #nim |
15:30:44 | * | abruanese joined #nim |
15:36:42 | * | yglukhov quit (Remote host closed the connection) |
15:37:14 | * | yglukhov joined #nim |
15:38:23 | * | yglukhov quit (Remote host closed the connection) |
15:39:12 | * | yglukhov joined #nim |
15:43:40 | * | yglukhov quit (Ping timeout: 264 seconds) |
15:49:54 | * | Arrrr joined #nim |
15:53:33 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
16:01:23 | * | yglukhov joined #nim |
16:01:51 | * | yglukhov quit (Remote host closed the connection) |
16:04:42 | * | jjido quit (Ping timeout: 260 seconds) |
16:10:30 | * | Ven quit (Read error: Connection reset by peer) |
16:17:36 | * | Trustable joined #nim |
16:26:20 | * | rok quit (Quit: rok) |
16:34:03 | * | Ven joined #nim |
16:40:43 | * | Ven quit (Read error: Connection reset by peer) |
16:41:00 | cheatfate | Araq, i suspect callbacks, but i can't find system.protect and system.dispose functions |
16:42:09 | * | nsf quit (Quit: WeeChat 1.4) |
16:43:37 | * | Ven joined #nim |
16:53:59 | * | zahary joined #nim |
16:55:10 | * | fastrom joined #nim |
16:55:31 | cheatfate | Araq, it looks like you send me to something not implemented yet :( |
16:55:57 | * | Ven quit (Read error: Connection reset by peer) |
17:03:22 | * | Ven joined #nim |
17:10:51 | * | Ven quit (Read error: Connection reset by peer) |
17:20:10 | * | endragor joined #nim |
17:21:52 | * | vendethiel joined #nim |
17:22:51 | * | Ven joined #nim |
17:25:05 | * | endragor_ joined #nim |
17:26:11 | * | Ven quit (Read error: Connection reset by peer) |
17:26:30 | cheatfate | ahhh, i have found it in gc.nim |
17:27:44 | * | endragor quit (Ping timeout: 244 seconds) |
17:34:47 | cheatfate | Araq, i need to protect CompletionData because of callback stored in it? because i dont understand why i need to protect object which stored in `shared` memory |
17:35:15 | Araq | completiondata contains a .closure proc |
17:35:32 | Araq | a closure proc consists of (fn, env) pair |
17:35:49 | Araq | that 'env' points to gc'ed memory and is what needs to be protected |
17:40:23 | * | endragorr joined #nim |
17:41:24 | cheatfate | so i need to protect callback not whole object? |
17:42:49 | * | Ven joined #nim |
17:43:45 | * | endragor_ quit (Ping timeout: 276 seconds) |
17:46:41 | Araq | the 'env' pointer which can be accessed via system.rawEnv() |
17:46:53 | Araq | that's what you need to protect. |
17:48:40 | flyx | dom96: I wonder, does this dual-naming in nimble even work for nimyaml? I just renamed nimyaml.nimble to yaml.nimble in my repo. does nimble still find the file if the package is accessed as `nimyaml` instead of `yaml`? |
17:50:34 | flyx | well it seems like it works |
17:53:22 | * | |2701 quit (Quit: Connection closed for inactivity) |
17:56:38 | * | yglukhov joined #nim |
17:59:10 | flyx | on Windows, does Nim bootstrap with Visual Studio or with MinGW? or with whatever it finds? |
17:59:34 | cheatfate | cc = "vcc" will use visual studio, but by default it uses "gcc" - mingw |
17:59:50 | cheatfate | you need to have visual studio compiler in path for proper working |
18:01:16 | flyx | the instructions on the homepage just yield „unknown operating system: cygwin_nt-10.0-wow“ |
18:01:32 | Araq | mingw is not cygwin. |
18:01:36 | flyx | I know, I know |
18:02:01 | Araq | we support cygwin, but not building from source for it. |
18:02:28 | Araq | somebody should read about cross compiling. |
18:02:28 | * | yglukhov quit (Remote host closed the connection) |
18:03:02 | Araq | and I'm as usual open for suggestions about this constant "nobody reads the docs" problem. |
18:04:45 | flyx | well I tried cc="vcc" like cheatfate told me, but this doesn't seem to work with the bootstrap script |
18:04:58 | flyx | do I need MinGW for bootstrapping? |
18:05:36 | cheatfate | you need to use mingw for building nim from source |
18:05:46 | cheatfate | but after that you can use vcc |
18:06:39 | flyx | okay, then I'll try getting MinGW |
18:06:48 | cheatfate | Araq, i think it would be bad idea to store ForeignCell in CompletionData? |
18:08:50 | Araq | cheatfate: no, that's exactly what you need to do |
18:09:00 | cheatfate | Araq, thanks ok |
18:10:54 | * | Ven quit (Read error: Connection reset by peer) |
18:11:57 | flyx | with mingw, I get „unknown operating system: msys_nt-10.0“ |
18:12:54 | * | Ven joined #nim |
18:13:57 | Araq | la la la |
18:14:35 | Araq | why not use the .bat files like we say you should? |
18:14:43 | dom96 | flyx: even if it doesn't work right now I am planning on adding a special syntax for package renames, so that Nimble is aware of it. |
18:15:29 | dom96 | Araq: Likely because the bootstrap.sh script isn't aware of it |
18:17:18 | * | nsf joined #nim |
18:17:21 | Araq | dom96: we don't say to use bootstrap.sh on windows either. |
18:17:27 | flyx | Araq: nobody said anything about a .bat file. anyway, the mingw shell does not know how to run a .bat file |
18:18:38 | dom96 | Araq: These little files seem to create quite a bit of problems. |
18:18:48 | dom96 | But I guess they are still nice for CI |
18:18:59 | dom96 | flyx: just use cmd.exe |
18:19:10 | flyx | I can try to add all necessary mingw binaries to my cmd PATH, but that does seem to be a lot of wrok |
18:20:06 | dom96 | flyx: is it not just a case of adding "C:\Program Files\MINGW\bin" or something like that? |
18:20:11 | Araq | flyx: use the official installer to get a working mingw + Nim. |
18:20:20 | flyx | I am trying |
18:20:21 | cheatfate | flyx, you only need to put path to gcc to your windows path |
18:20:23 | Araq | and then cross compile like documented. |
18:20:30 | dom96 | in fact, when you install MINGW it adds itself to PATH IIRC |
18:20:40 | Araq | and *THEN* if it causes problems, report them as bugs :P |
18:21:00 | Araq | dom96: what little fixes do you mean? |
18:21:17 | flyx | dom96: well it did not for me, but that mingw_64w which is suggested on the download page has multiple installers, not sure I downloaded the one with which it works |
18:21:53 | dom96 | Araq: You mean little files? bootstrap.sh, install.txt, install_nimble.nims, start.bat (what even is this?) |
18:22:03 | flyx | okay, I'll try to download the release and then compile devel |
18:22:37 | dom96 | I added some improvements to the download page already: https://github.com/nim-lang/Nim/blob/devel/web/download.rst |
18:22:49 | dom96 | but I guess we need more for people who want to bootstrap on Windows |
18:23:26 | dom96 | (Feedback welcome) |
18:24:01 | dom96 | oh, and we are planning on releasing today btw |
18:24:13 | dom96 | so if there is something that needs to be desperately merged/fixed let us know |
18:26:16 | * | Ven quit (Read error: Connection reset by peer) |
18:29:14 | * | ics joined #nim |
18:29:36 | * | xet7 quit (Ping timeout: 246 seconds) |
18:32:26 | * | Ven joined #nim |
18:33:40 | Arrrr | 0.14 ? |
18:33:54 | * | fowl wouldn't mess with path on Windows, just use the cmd link provided or bash shell or whatever you get |
18:33:55 | dom96 | It appears so |
18:34:23 | fowl | But idk on my last Windows I ended up with 6 or 8 different c compilers installed |
18:34:33 | Arrrr | The number of showstoppers has been reduced a lot |
18:35:56 | * | yglukhov joined #nim |
18:40:57 | * | yglukhov quit (Ping timeout: 276 seconds) |
18:44:36 | * | TheLemonMan joined #nim |
18:45:54 | flyx | hum, I updated devel and now my code is broken. has something changed to nnkObjectTy? |
18:46:32 | cheatfate | Araq, `ol.data.cell = system.protect(cast[pointer](rawEnv(ol.data.cb)))` now problem is here |
18:48:15 | cheatfate | ouch i understand |
18:48:23 | cheatfate | Araq, forget it |
19:01:10 | * | tautologico quit (Quit: Connection closed for inactivity) |
19:03:21 | * | abruanese quit (Quit: ZNC 1.7.x-nightly-20160225-9b31a077 - http://znc.in) |
19:06:23 | Araq | flyx: no, but getType() changed |
19:06:52 | flyx | Araq: thought so. I already fixed it |
19:07:06 | * | elrood joined #nim |
19:07:40 | flyx | I guess that could have been the error mcc got earlier |
19:08:20 | flyx | well, this concludes my Windows adventure |
19:09:40 | Araq | flyx: what does the change look like? |
19:09:48 | Araq | we need to document the changed behaviour |
19:10:16 | flyx | the result of getType now has three children instead of two, the last one being the recList |
19:10:53 | flyx | the first two are empty in my case, I am not sure what goes in there. a parent type probably, and something else |
19:11:41 | flyx | so my code crashed when I accessed tDesc[1] and assumed it was the reclist |
19:12:46 | Arrrr | Good luck with the release, Team Nim |
19:12:47 | * | Arrrr quit (Quit: WeeChat 1.4) |
19:15:48 | * | askatasuna quit (Ping timeout: 246 seconds) |
19:18:01 | * | Mat4 joined #nim |
19:18:09 | Mat4 | hello |
19:19:25 | Araq | hi Mat4. we're busy preparing 0.14 |
19:19:44 | cheatfate | Araq, thanks for your help, it really helps... |
19:19:54 | Mat4 | ok, good to know |
19:24:16 | * | askatasuna joined #nim |
19:28:22 | cheatfate | Araq, is there any progress in my templates issue? |
19:28:35 | Araq | I fixed it and pushed the fix |
19:28:49 | Araq | I thought you were aware, sorry. |
19:29:03 | Araq | actually ... I did tell you. see the logs of today. |
19:29:13 | * | tautologico joined #nim |
19:29:34 | cheatfate | `cheatfate: but I found that. sooooo ....` ? |
19:30:08 | Araq | yes. |
19:30:40 | cheatfate | i even don't understand it :) TTTHanks |
19:35:15 | * | Jesin quit (Quit: Leaving) |
19:37:31 | * | Jesin joined #nim |
19:56:40 | * | PMunch joined #nim |
20:04:01 | dom96 | Didn't we get rid of this error? https://gist.github.com/dom96/6df15671924ed52cc3bf5c2140f74c74 |
20:04:10 | dom96 | (`File exists` when doing copyFile()) |
20:06:14 | Araq | we cannot. windows locks the exe file |
20:07:55 | dom96 | huh, I'm not on Windows nor am I copying any exes |
20:08:18 | Araq | well then I don't know about this error |
20:08:34 | dom96 | hrm |
20:08:48 | dom96 | actually, it might be because it's trying to copy a directory |
20:09:04 | * | mcc joined #nim |
20:10:32 | dom96 | yeah, that's a pretty confusing error for that |
20:10:50 | mcc | Hello in this little sample program both breakList and breakList2 fail on the line li.head = nil, the first one fails because it says li.head cannot be assigned to, the second one fails because it says "li" is an "illegal capture". I don't understand either of these errors (rather i don't understand why li is immutable in the first case and i don't |
20:10:50 | mcc | understand why li is an "illegal capture" in the second case) |
20:11:00 | mcc | https://gist.github.com/mcclure/1c3e12cee16bd748c3499603d2479c5c |
20:11:03 | mcc | What am I missing? |
20:12:28 | mcc | like i get that parameters are immutable in nim but i am confused why that also applies to members of parameters |
20:14:31 | mcc | I guess.. SinglyLinkedList[T] is an object and not a ref object and that means it gets passed by value not reference? |
20:17:10 | * | yglukhov joined #nim |
20:18:26 | mcc | If that's the case then it seems like I ought to be typing breakList[T]() as breakList[T](li: ref SinglyLinkedList[T]) but in the expanded version of that gist it then gets upset when I pass a particular SinglyLinkedList var in (I'm having trouble making a test case) |
20:23:34 | Araq | mcc: breakList2 captures a 'var T' which is illegal |
20:23:54 | Araq | breakList fails because the object param is immutable |
20:24:48 | * | yglukhov_ joined #nim |
20:25:27 | * | yglukhov quit (Ping timeout: 246 seconds) |
20:26:53 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:29:41 | flyx | mcc: you might want to try NimYAML again, I fixed a problem with current Nim devel earlier |
20:29:51 | * | yglukhov joined #nim |
20:31:21 | Araq | don't use an anon proc for trivial stuff and the problem disappears. |
20:31:40 | * | yglukhov_ quit (Ping timeout: 264 seconds) |
20:33:02 | dom96 | mcc: in your `istail` proc just use the argument you pass into it: `n` instead of capturing the `li` argument from the outer proc. |
20:33:25 | dom96 | (you should be able to make the `istail` proc's argument a 'var') |
20:35:48 | * | yglukhov quit (Read error: Connection reset by peer) |
20:37:25 | * | fowl quit (Ping timeout: 250 seconds) |
20:39:53 | * | yglukhov joined #nim |
20:41:57 | * | yglukhov quit (Read error: Connection reset by peer) |
20:42:09 | * | yglukhov joined #nim |
20:44:14 | * | yglukhov quit (Read error: Connection reset by peer) |
20:44:45 | * | yglukhov joined #nim |
20:47:21 | * | yglukhov quit (Read error: Connection reset by peer) |
20:49:57 | * | endragorr quit (Ping timeout: 246 seconds) |
20:50:08 | * | yglukhov joined #nim |
20:50:43 | cheatfate | and when can we wait 0.14.0? |
20:50:46 | cheatfate | tomorrow? |
20:51:13 | dom96 | today, hopefully |
20:53:50 | * | yglukhov quit (Read error: Connection reset by peer) |
20:53:52 | mcc | Okay-- so let's say I take out the inner proc. I now wind up with : https://gist.github.com/mcclure/dc60d39040ea85f814986e7ecf6f32a4 I find if I declare the variable as "var" it works fine, but if I declare it as "ref" it gets upset that I am not passing in a ref at the call site (incompatible type). I would like to be able to pass objects to functions and |
20:53:52 | mcc | allow the function to modify the object without modifying which object is pointed to. Is this misunderstanding something about nim's model? |
20:54:22 | mcc | I get that initSinglyLinkedList is returning an object and not a ref object, but I'm not sure how to turn "stack" into a ref to stack. |
20:54:53 | * | Mat4 quit (Quit: Leaving) |
20:54:54 | dom96 | you shouldn't, you should use a 'var' |
20:56:31 | cheatfate | dom96, there is a problem in nim-0.13.0 x64 distro |
20:56:42 | cheatfate | dom96, for some reason it has 32bit gdb |
20:56:57 | cheatfate | i mean windows version |
20:57:45 | mcc | dom96: Okay. Granting that "var" is the preferred way to do this in nim and I should not try to fight the language-- let's say at some point in the future I *do* need to turn a T into a ref T. How does one do this? I see there's "addr" but that's for ptrs not refs. |
20:58:25 | mcc | Also, I'm still a little confused what the difference is between a T and a ref T-- would it be correct to say that T is allocated "on the stack" and is passed around as a whole structure by value, whereas "ref" is an allocated object managed by the garbage collector? |
20:58:33 | dom96 | mcc: You can't. At least not in the traditional sense. |
20:58:49 | mcc | Ie, "T" is like a struct in C# and "ref T" is like an object in C#? |
20:58:50 | dom96 | For example, in Java, how do you turn an primitive type into an object? |
20:59:06 | cheatfate | ^^^ somebody needs to write issue about Nim's memory model |
20:59:31 | * | dom96 hopes his book explains it fairly well |
21:00:28 | * | yglukhov joined #nim |
21:00:48 | * | fowl joined #nim |
21:00:57 | mcc | Well, in Java, you would not because last I checked it does not have value record/product types. In C# however if you had an object-type record and wanted a value-type record you would create a new value-type record by copying all the values out of the object-type record. |
21:01:33 | mcc | So I guess I'm trying to figure out what the Nim equivalent of X x; X *x2 = new x; memcpy(x2, &x, sizeof(X)); would be. |
21:01:35 | cheatfate | dom96, i dont think book helps, just because its not free... |
21:01:35 | * | Demon_Fox joined #nim |
21:02:02 | mcc | Is the book available currently? :O |
21:02:18 | tautologico | yes, as a MEAP |
21:02:22 | * | couven92 joined #nim |
21:02:36 | tautologico | look at the nim-lang.org site, there is a link to the book |
21:02:41 | mcc | Thanks |
21:03:02 | Araq | cheatfate: that's because I only got 32 bit GDB to work at all. |
21:03:43 | dom96 | mcc: you could wrap it in a 'ref' type: type FooRef = ref object; foo: Foo |
21:03:57 | dom96 | And yes, in Java you can't define your own value types. |
21:04:01 | dom96 | But value types do exist |
21:04:12 | cheatfate | Araq, we can get it from http://mingw-w64.org/doku.php/download |
21:04:44 | dom96 | Java provides "wrapped" versions of each of them though AFAIK |
21:04:47 | Araq | well I wanted to have a GDB that doesn't include a whole fucking Python distro |
21:04:55 | dom96 | So 'int' exists as an 'Integer' |
21:05:01 | dom96 | so that you can use it in generics |
21:05:29 | dom96 | I wonder if lldb works on Windows yet |
21:05:31 | Araq | mcc: new(x); x[] = y |
21:05:46 | mcc | Araq: Ohh, I see. |
21:06:02 | cheatfate | dom96, not works |
21:06:13 | Araq | cheatfate: we can however decide to not ship GDB at all then. |
21:06:25 | dom96 | cheatfate: what doesn't? |
21:06:37 | cheatfate | dom96, lldb still not working on windows |
21:06:54 | dom96 | ahh |
21:07:10 | cheatfate | Araq, but why? |
21:07:18 | * | fowl quit (Ping timeout: 272 seconds) |
21:07:43 | dom96 | Araq: Let's just tell people they need to use Visual Studio :P |
21:09:05 | cheatfate | dom96, Its very hard to debug in Visual Studio... just because you debugging not nim files but C files |
21:09:43 | * | fowl joined #nim |
21:10:32 | TheLemonMan | one could produce sourcemaps along with the c file... |
21:10:47 | mcc | flyx: Hello, thanks, I just did `nimble refresh && nimble install nimyaml` (is there a better way to update an existing package?), it says I now have yaml-0.5.1, I still see the `c:\users\andi\.nimble\pkgs\nimyaml-0.4.0\yaml.nim(542, 45) Error: undeclared identifier: 'JsonNode'` error however. A thing that is interesting to me is that I can check out nimyaml |
21:10:47 | mcc | from github and when I run the tests they run fine, so maybe I have just misconfigured something :( |
21:11:30 | cheatfate | TheLemonMan, you can but it not very useful, because you watching not nim variables but c variables |
21:11:40 | dom96 | mcc: you might need to install the HEAD: nimble install yaml@#head |
21:11:50 | dom96 | by default nimble installs the latest tagged version |
21:11:55 | TheLemonMan | well it's still better than nothing heh |
21:12:23 | cheatfate | TheLemonMan, mostly unusable.... as gdb... |
21:12:30 | dom96 | I wasn't really serious about Visual Studio, but to be fair I doubt GDB is much better. |
21:12:43 | dom96 | somebody should step up and maintain ENDB ;D |
21:12:48 | TheLemonMan | don't be so negative |
21:13:37 | mcc | dom96: hm. when i enter that command it says "yaml-0.5.1 already exists. Overwrite? [y/N]". which implies 0.5.1 is head? |
21:14:24 | dom96 | mcc: hrm, you're right it does imply it. They likely share the same version, but they're not the same. |
21:14:31 | dom96 | I guess Nimble needs to be smarter here |
21:14:44 | mcc | at any rate saying "yes" and installing over 0.5.1 left the problem the same. |
21:15:14 | mcc | Here is a question. When I say "import yaml", how is it performing the search by which it eventually finds nimyaml? It just sorta somehow... finds anything nim installs, but I don't know how to tell it where to find my own packages. |
21:15:31 | mcc | i mean anything nimble installs |
21:15:33 | dom96 | I bet it's because nimyaml was renamed to yaml recently. |
21:15:49 | dom96 | The way it works is that Nimble installs packages to ~/.nimble/pkgs |
21:15:59 | mcc | i did not have this problem with the other package i have so far installed via nimble (sdl2) |
21:16:05 | dom96 | C:/Users/name/.nimble or something on Windows |
21:16:28 | dom96 | you might find that there are now both `nimyaml` and `yaml` in there |
21:17:20 | dom96 | As for how Nim finds those: its configuration file contains "--nimblePath:~/.nimble/pkgs", which instructs it to scan that directory for packages. |
21:17:23 | mcc | I ls /c/Users/Andi/.nimble/pkgs/ and get "nimble-0.7.0 nimPNG-0.1.5 nimyaml-0.4.0 sdl2-1.1 yaml-0.5.1" |
21:17:44 | dom96 | try removing nimyaml-0.4.0 |
21:17:52 | * | fowl quit (Ping timeout: 250 seconds) |
21:17:56 | mcc | ok |
21:19:15 | mcc | hah! `c:\users\andi\.nimble\pkgs\yaml-0.5.1\yaml.nim(555, 45) Error: undeclared identifier: 'JsonNode' ` So, progress, the error is now occurring on a different line. |
21:19:50 | dom96 | At least now you can be sure that it's using the right package :) |
21:20:14 | dom96 | In the future Nimble will prevent this from happening. |
21:20:29 | dom96 | In your case both `nimyaml` and `yaml` export a `yaml` module. |
21:20:51 | dom96 | This obviously leads to a problem as you saw, too bad your error still isn't fixed :\ |
21:21:03 | mcc | i see! :O |
21:22:48 | mcc | the thing that puzzles me here is that if I grep the yaml-0.5.1 directory, there is in fact no "JsonNode" type declared anywhere that I can see. unless i'm getting tripped up by nim's case insensitivity thing. |
21:23:05 | mcc | so this implies to me that JsonNode is vended by some other module which perhaps nimble should have installed but did not get installed? |
21:23:45 | dom96 | JsonNode is defined in the standard library module `json` |
21:24:34 | dom96 | maybe you need to `import json`? |
21:24:52 | dom96 | do you see a "instantiation from here" above the error message? |
21:25:21 | mcc | ...oh, WOW |
21:25:25 | mcc | i found the problem and it's WEIRD |
21:25:45 | mcc | so, i added to the top of *my* program "import json" |
21:25:49 | mcc | I got the error "a module cannot import itself" |
21:25:59 | dom96 | ahhh |
21:26:02 | mcc | The file containing the source of the program I was trying to run was "json.nim" |
21:26:05 | dom96 | you named your module 'json'? |
21:26:08 | dom96 | yeah... |
21:26:13 | mcc | I renamed it to "unjson.nim" and everything worked fine |
21:26:26 | dom96 | the compiler needs to handle these cases better |
21:26:34 | mcc | Apparently, I was trying to import yaml, which imported another module of which I was unaware, but which namespace collided with one of my own modules |
21:27:08 | dom96 | mcc: which version of Nim are you using? |
21:27:56 | flyx | mcc: you need to run at latest Nim devel, otherwise nimyaml does not work. |
21:28:06 | mcc | uhh, i built it myself from source because i needed some sort of thread-related fix that isn't in a released version. git commit 0ef391b4ccda5d9 ? |
21:28:13 | flyx | mcc: JsonNode is from Nim's json package which saw some changes since the last Nim release |
21:28:44 | mcc | flyx it looks like the problem was i named my source file json.nim. if i rename my source file it works. |
21:29:04 | flyx | ah, that's unfortunate |
21:29:12 | mcc | i think i am going to file this as an issue on Nim |
21:29:16 | dom96 | mcc: There were some recent changes to path handling of modules |
21:29:40 | mcc | i think i might have also seen this problem with the nim i installed from the website however |
21:29:45 | dom96 | Could you revert the name, update Nim to the latest from devel, bootstrap the compiler and try again? |
21:29:52 | dom96 | It's possible that this was fixed |
21:30:04 | mcc | okay. does "recent" mean "more recent than may 30"? |
21:30:08 | dom96 | yeah |
21:30:10 | mcc | ok |
21:31:40 | mcc | `git clean -xffd && ./koch.exe boot -d:release` should do it right? |
21:31:45 | flyx | I'm off to bed, but if you encounter more yaml errors, just post them here, I'll see them tomorrow |
21:31:52 | mcc | thank you very much flyx |
21:32:15 | * | yglukhov quit (Remote host closed the connection) |
21:32:21 | dom96 | hrm, not sure what 'clean' does exactly. I would just do: `git pull origin devel' |
21:32:29 | dom96 | then: ./koch boot -d:release |
21:32:37 | fredrik92 | no, mcc you're right! |
21:32:55 | mcc | no, sorry. i mean, the git clean will delete the compiler i already built |
21:33:00 | fredrik92 | put on -n |
21:33:05 | mcc | (assuming pull already done) |
21:33:13 | fredrik92 | but yes, it will! :) |
21:33:18 | dom96 | you don't need to do that |
21:33:29 | dom96 | ./koch boot will overwrite the compiler anyway |
21:35:16 | mcc | ok good to know |
21:35:38 | Araq | yup, that bug mcc experienced was finally fixed. |
21:35:40 | mcc | maybe I'm a little overly paranoid about building compilers without cleaning them D: |
21:36:07 | Araq | though originally it was a feature that you could override the stdlib's modules. |
21:36:51 | fredrik92 | mcc, know what you mean... I do that all the time as well! :-D |
21:36:57 | dom96 | Araq: does this mean that I can finally create a module called 'system.nim'? :P |
21:37:08 | Araq | possibly. |
21:37:12 | * | |2701 joined #nim |
21:37:18 | Araq | yeah, I think so. |
21:37:20 | mcc | that sounds like a potentially nice feature but probably one that needs protection to make sure it is not triggered by accident. |
21:37:21 | fredrik92 | (and always with -n first to see if I don't delete sth important... :D ) |
21:37:55 | dom96 | For the past 5 years Nim has been bootstrapping fine without the need to clean for me ;) |
21:38:08 | mcc | ...yeah... the git clean was not a super good idea... it deleted koch :P |
21:38:12 | dom96 | But I can imagine that some projects may have problems with that... |
21:39:30 | mcc | okay! building with a june 5 nim checkout it works now. thanks :O |
21:39:30 | fredrik92 | Well... It's a trick I picked up at university, the CS TAs generally want their hand-ins with source code only and no binaries... git clean before handin usually does the trick |
21:40:00 | mcc | here is a question though. *why* did that work? Like, are the stdlib modules just special cased now? |
21:41:08 | mcc | In other words, let's say I install a package from nimble "fizz" which happens to export a module "buzz", but I do not know this, and I name my program "buzz.json" and buzz.json does import fizz. Will the compiler get confused about buzz.nim in my local directory and buzz.nim in ~/.nimble/pkg? |
21:41:30 | dom96 | fredrik92: just make sure not to `git add` the binaries? better yet, ensure they are in your .gitignore? :P |
21:42:29 | dom96 | mcc: it shouldn't anymore, I think the bug fix that Araq did solved this problem. |
21:43:02 | fredrik92 | dom96, of course, but we hand in via some god-awful thing called Fronter where we upload a .zip (or .tar.gz if you'd favor that) |
21:43:19 | dom96 | mcc: this seems to be the line in the news for it: https://github.com/nim-lang/Nim/blob/devel/web/news/version_0_14_released.rst.todo#L41 |
21:43:22 | mcc | ok cool thanks |
21:43:29 | dom96 | We need to add more info to that I think, or at least a link... |
21:43:53 | mcc | fredrik92 / dom96 I am pretty sure there is a git command that exports the repository (but only checked in files) as a .zip. I forget what it is because I use hg mostly. |
21:43:59 | mcc | in hg it's hg archive... |
21:44:05 | dom96 | Maybe if you search around for those keywords on github you will find something, please give me a link if you do :) |
21:45:16 | mcc | thank you for the help dom96 |
21:45:23 | dom96 | np |
21:45:27 | cheatfate | Araq, currently we have {.passC.} {.passL.} to pass options to C compiler, could we have something for Nim itself too? |
21:45:31 | mcc | also looks like after upgrading math.round now returns a float64 and not an int *_* ok |
21:45:32 | dom96 | It was fun :) |
21:45:47 | dom96 | yeah, that's one of the breaking changes I'm afraid |
21:45:52 | mcc | ok |
21:46:06 | mcc | are breaking changes between nim releases common? |
21:46:24 | mcc | maybe i should start documenting in my projects which version of nim i compiled with. |
21:46:48 | cheatfate | Araq, so i can use in my source something like {.passNim: "--path:"$projectdir".} |
21:47:00 | fredrik92 | mcc, you could of course always use `git ls-files` to call the respective tar command... |
21:47:09 | dom96 | not really, definitely less than with other projects. But sometimes it's just easier to break something rather than spending time cluttering up the stdlib with more deprecated things. |
21:47:40 | dom96 | In general we do try to deprecate things though, even though we're still not at 1.0 |
21:47:57 | mcc | nodnod |
21:48:16 | dom96 | cheatfate: we do have something, but not in the source, create a file.nim.cfg file and place the options in there. |
21:48:51 | cheatfate | dom96, i know about .nim.cfg... the problem is i need to create many .nim.cfg files for every file i'm trying to use |
21:49:11 | cheatfate | so it will be very nice to have {.passNim.} macro |
21:49:27 | dom96 | cheatfate: but you'll end up putting it in every file anyway |
21:49:36 | dom96 | the nim.cfg files are project-wide |
21:49:42 | * | yglukhov joined #nim |
21:51:11 | Araq | cheatfate: no you don't, you only need a single nim.cfg |
21:51:23 | Araq | that's used for every *.nim file in the same dir |
21:52:22 | cheatfate | Araq, ^^^^ its something better than filename.nim.cfg, but {.passNim.} would be better just because you dont need to switch from editor to something else |
21:52:47 | Araq | agreed and it would be very useful for Nimble builds |
21:53:11 | Araq | so that a Nimble package can influence compilation more rather than relying on the importer to fixup his config |
21:54:48 | * | yglukhov quit (Ping timeout: 272 seconds) |
21:55:55 | dom96 | that's true, that would be a good use case for it |
22:03:26 | * | akaisora_ joined #nim |
22:03:29 | akaisora_ | hello |
22:04:51 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
22:05:09 | dom96 | hi akaisora_ |
22:08:39 | * | elrood quit (Quit: Leaving) |
22:12:32 | akaisora_ | dom96: hi! |
22:12:59 | Araq | dom96: so ... do I need to ensure 2 nimble paths work? |
22:13:05 | Araq | for the upcoming release? |
22:13:15 | * | PMunch quit (Ping timeout: 260 seconds) |
22:13:34 | dom96 | Araq: I think I just did, they seem to be working |
22:13:38 | dom96 | you can double check if you want |
22:13:44 | dom96 | I'm a tad stuck |
22:14:00 | dom96 | I'm not entirely sure how the AUR script works |
22:14:10 | akaisora_ | do you use tcc? |
22:14:20 | akaisora_ | i'm having a general look at nim's source |
22:14:44 | Araq | dom96: ah cool, I now see clearly that my code should work. great, nothing to change. |
22:15:44 | mcc | ... so... here is a question. I am using "nimlime" in sublime text. at the moment, when i save something in sublime text, i get about 10 warnings. when i run nim at the command line, i get 0 warnings. if i intentionally add warn-worthy code i start getting warnings at the command line, so i think this is because nimlime is using an older version of nim and |
22:15:44 | mcc | the newer version has stopped considering these 10 warnings warnings. |
22:15:48 | mcc | (they do seem a little spurious.) |
22:16:28 | * | fowl joined #nim |
22:16:43 | mcc | Any idea how nimlime finds its nim executable? |
22:17:54 | * | yglukhov joined #nim |
22:18:00 | cheatfate | mcc, NimLime uses "nim c --verbosity:2 yourfile.nim" |
22:18:18 | cheatfate | mcc, you can check "check.on_save.verbosity" parameter in NimLime.sublime-settings |
22:18:55 | cheatfate | so you can run nim c --verbosity:2 yourfile.nim to get same list of warnings |
22:19:06 | mcc | cool. |
22:19:21 | cheatfate | what happens with Varriount, i miss him |
22:20:03 | mcc | that did it yeah |
22:20:41 | mcc | ...also i am more than a little confused how it found nim since it is not in the Windows system %PATH%, only in my msys2 $PATH. maybe since i launched sublime from msys it inherited the env vars D: |
22:20:50 | * | couven92 quit (Ping timeout: 260 seconds) |
22:21:58 | cheatfate | mcc, just add nim\bin path to your system path |
22:22:06 | cheatfate | system PATH variable |
22:22:12 | cheatfate | or user PATH variable |
22:22:13 | mcc | oh! it's not bad, it's just mysterious :) |
22:22:16 | * | yglukhov quit (Ping timeout: 250 seconds) |
22:22:23 | dom96 | akaisora_: we don't really use it nowadays |
22:22:55 | * | Trustable quit (Remote host closed the connection) |
22:23:03 | * | fredrik92 quit (Ping timeout: 240 seconds) |
22:23:33 | mcc | so-- i have many warnings at verbosity:2 warning various function call sites are "not GC safe". all the call sites seem to be at the nim toplevel (ie just sitting out there in the .nim file). Is that bad for some reason? :O |
22:24:42 | mcc | I mean, the warnings I need are the ones that tell me that I called a GC-unsafe function from a thread other than the main thread. But it seems like the top level must be the main thread...? |
22:25:06 | Araq | well these are procs that won't compose later on |
22:25:19 | Araq | so it's a warning for --verbosity:2 |
22:25:34 | mcc | okay, i see |
22:25:38 | Araq | there is a reason --verbosity:1 is the default. |
22:25:47 | mcc | understood |
22:27:35 | mcc | ...okay and i see calling a gc-unsafe function from a gcsafe function *is* a verbosity-1 warning. cool. |
22:37:28 | * | fastrom quit (Quit: Leaving.) |
22:42:27 | * | yglukhov joined #nim |
22:44:22 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:46:41 | * | yglukhov quit (Ping timeout: 240 seconds) |
22:52:36 | cheatfate | So, we get {.passNim.} someday? |
22:52:45 | cheatfate | Or i need to create issue future request? |
22:54:24 | Araq | we to think it through |
22:57:06 | mcc | I wonder how hard it would be to get NimLime to where if you cursor over a symbol, it tells you the type in the status bar. |
22:57:19 | mcc | The TypeScript plugin (and I think the ocaml plugin?) has that feature and it's super nice. |
22:59:33 | dom96 | sounds cool |
22:59:39 | * | dom96 might attempt to add that into Aporia |
22:59:57 | mcc | what is aporia? |
23:00:17 | dom96 | The Nim "IDE": http://github.com/nim-lang/Aporia |
23:00:21 | mcc | ah |
23:02:38 | cheatfate | mcc, you can ask Varriount on forum, he is still active there |
23:02:49 | mcc | cool |
23:03:29 | mcc | do you think poking on forum or filing a github issue would be more likely to reach him? |
23:04:16 | cheatfate | mcc, i think its better to try both :) |
23:06:53 | mcc | 'k |
23:06:59 | * | bjz joined #nim |
23:08:42 | * | bjz quit (Max SendQ exceeded) |
23:09:24 | * | bjz joined #nim |
23:17:04 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:18:44 | * | yglukhov joined #nim |
23:21:59 | * | |2701 quit (K-Lined) |
23:23:11 | * | yglukhov quit (Ping timeout: 258 seconds) |
23:28:34 | cheatfate | i dont know why everybody so like this `clang`... compiled executables becomes much slower, than `gcc` with same code |
23:29:40 | * | xet7 joined #nim |
23:30:35 | cheatfate | BSD's kqueue is faster, than linux's epoll by design, but `clang` usage make it even slower than epoll |
23:33:40 | dom96 | def-: why not post your Nim articles here? :) |
23:34:59 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:35:55 | def- | dom96: I'm not sure if it's good. I wrote most of it 1.5 years ago and found it again today and finished it up |
23:36:42 | dom96 | def-: looks good, although i'm too tired to read it all now. I posted it to HN btw. |
23:36:50 | def- | ah, thanks |
23:37:18 | dom96 | and tweeted about it :) |
23:42:39 | cheatfate | def-, its a nice article, but for some reason everybody just omit to show power of simple templates |
23:43:32 | cheatfate | def-, i think, it would be good to show how to use and make templates like `withLock`... |
23:44:10 | def- | cheatfate: sounds like a 3-liner |
23:44:22 | cheatfate | 3-liner? |
23:44:33 | def- | implementing withLock |
23:45:47 | def- | but it's a good idea, i'll see if I can come up with something nice |
23:45:55 | cheatfate | yeah, i know but it shows some power of templates, and you not find any information about this |
23:48:15 | cheatfate | def-, https://github.com/nim-lang/Nim/blob/devel/lib/pure/collections/sharedtables.nim#L48-L99 this is not 3-liner |
23:48:36 | def- | hah, looks exactly like what I just wrote :) |
23:52:21 | cheatfate | i think `macros` is like surgical scalpel, you can do with them almost everything but it takes time, `templates` are like simple knife, so you can cut your `bread` much easily |
23:54:08 | cheatfate | also i think we need an issue about interaction between `shared` and `gc` memory... because this `protect & dispose` functions never covered even in manual... |
23:55:04 | * | yglukhov joined #nim |