| 00:02:30 | TheManiac | this time the error went away when removing `{closure}` from an iterator, but I think stand little chance of creating a minimal example |
| 00:03:20 | * | ftsf joined #nim |
| 00:05:35 | TheManiac | goodnight to you too - thanks for your help! |
| 00:05:44 | * | fredrik92 joined #nim |
| 00:06:19 | ftsf | morning! o/ |
| 00:07:37 | * | couven92 quit (Disconnected by services) |
| 00:07:42 | * | fredrik92 is now known as couven92 |
| 00:08:50 | * | devted quit (Quit: Sleeping.) |
| 00:14:40 | * | gokr joined #nim |
| 00:15:40 | * | chemist69 joined #nim |
| 00:23:11 | * | yglukhov joined #nim |
| 00:23:36 | * | Ven quit (Ping timeout: 240 seconds) |
| 00:25:49 | * | Ven joined #nim |
| 00:27:43 | * | yglukhov quit (Ping timeout: 255 seconds) |
| 00:37:32 | * | xet7 quit (Quit: Leaving) |
| 00:38:09 | * | Ven quit (Ping timeout: 245 seconds) |
| 00:40:44 | * | Ven joined #nim |
| 00:42:53 | * | synshroud quit (Ping timeout: 248 seconds) |
| 00:43:30 | * | synshroud joined #nim |
| 00:50:09 | * | gokr quit (Ping timeout: 252 seconds) |
| 01:11:07 | * | dddddd quit (Quit: Hasta otra..) |
| 01:25:51 | * | benwbooth joined #nim |
| 01:26:11 | FromGitter | <Varriount> @GrundleTrundle You could also try using converters |
| 01:27:39 | * | huonw quit (*.net *.split) |
| 01:27:39 | * | MyMind quit (*.net *.split) |
| 01:27:39 | * | Guest73656[m] quit (*.net *.split) |
| 01:27:39 | * | M-Quora quit (*.net *.split) |
| 01:27:39 | * | pafmaf quit (*.net *.split) |
| 01:29:14 | * | huonw joined #nim |
| 01:29:14 | * | MyMind joined #nim |
| 01:29:14 | * | Guest73656[m] joined #nim |
| 01:29:14 | * | M-Quora joined #nim |
| 01:29:14 | * | pafmaf joined #nim |
| 01:29:52 | * | MyMind quit (Max SendQ exceeded) |
| 01:31:18 | * | MyMind joined #nim |
| 01:38:06 | * | handlex quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:52:44 | * | chemist69 quit (Ping timeout: 245 seconds) |
| 01:57:32 | * | chemist69 joined #nim |
| 02:14:26 | * | devted joined #nim |
| 02:15:23 | * | devted quit (Client Quit) |
| 02:25:14 | * | yglukhov joined #nim |
| 02:26:50 | * | fredrik92 joined #nim |
| 02:26:51 | * | fredrik92 quit (Client Quit) |
| 02:29:47 | * | yglukhov quit (Ping timeout: 256 seconds) |
| 02:30:39 | * | couven92 quit (Ping timeout: 245 seconds) |
| 02:34:25 | * | vlad1777d quit (Remote host closed the connection) |
| 02:41:49 | * | chemist69 quit (Ping timeout: 255 seconds) |
| 02:49:13 | * | krux02 quit (Quit: Leaving) |
| 02:54:13 | * | chemist69 joined #nim |
| 03:00:21 | * | MyMind quit (Excess Flood) |
| 03:01:29 | * | MyMind joined #nim |
| 03:09:23 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
| 03:25:20 | * | ftsf_ quit (Remote host closed the connection) |
| 04:13:09 | * | Jesin joined #nim |
| 04:27:19 | * | yglukhov joined #nim |
| 04:31:41 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 04:35:00 | * | brson quit (Quit: leaving) |
| 04:39:26 | * | Ven quit (Ping timeout: 258 seconds) |
| 04:40:45 | * | Ven joined #nim |
| 04:42:25 | * | chemist69 quit (Ping timeout: 255 seconds) |
| 04:45:42 | * | chemist69 joined #nim |
| 05:08:15 | * | Ven quit (Ping timeout: 260 seconds) |
| 05:10:28 | * | Ven joined #nim |
| 05:38:30 | * | byte512 quit (Ping timeout: 256 seconds) |
| 06:16:34 | * | nsf joined #nim |
| 06:29:22 | * | yglukhov joined #nim |
| 06:31:19 | * | bjz joined #nim |
| 06:34:02 | * | yglukhov quit (Ping timeout: 258 seconds) |
| 06:49:59 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 07:02:16 | * | ftsf quit (Quit: :q!) |
| 07:02:55 | * | bjz joined #nim |
| 07:12:41 | * | rokups joined #nim |
| 07:19:16 | * | kulelu88 quit (Quit: Leaving) |
| 07:31:34 | * | yglukhov joined #nim |
| 07:35:38 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 08:09:05 | * | Ven quit (Ping timeout: 260 seconds) |
| 08:10:44 | * | irrequietus joined #nim |
| 08:10:46 | * | irrequietus quit (Changing host) |
| 08:10:46 | * | irrequietus joined #nim |
| 08:11:49 | * | Arrrr joined #nim |
| 08:12:11 | * | Ven joined #nim |
| 08:14:57 | * | gokr joined #nim |
| 08:25:49 | * | filcuc joined #nim |
| 08:39:51 | * | Ven quit (Ping timeout: 252 seconds) |
| 08:40:17 | * | Andris_zbx joined #nim |
| 08:42:11 | * | Ven joined #nim |
| 09:01:05 | * | Pisuke joined #nim |
| 09:07:10 | * | Vladar joined #nim |
| 09:10:02 | * | Kingsquee joined #nim |
| 09:19:28 | FromGitter | <dom96> We could really use an implementation of this for Nim: http://langserver.org/ |
| 09:23:58 | federico3 | sound like ctags |
| 09:26:03 | * | PMunch joined #nim |
| 09:31:33 | * | bjz_ joined #nim |
| 09:31:41 | * | bjz quit (Ping timeout: 240 seconds) |
| 09:38:47 | * | chemist69 quit (Ping timeout: 264 seconds) |
| 09:39:46 | * | sz0 quit (Quit: Connection closed for inactivity) |
| 09:42:53 | * | chemist69 joined #nim |
| 09:46:36 | * | vlad1777d joined #nim |
| 09:51:53 | * | stisa joined #nim |
| 09:59:57 | * | gokr quit (Ping timeout: 276 seconds) |
| 10:10:23 | * | gokr joined #nim |
| 10:16:47 | * | yglukhov joined #nim |
| 10:17:47 | * | yglukhov quit (Client Quit) |
| 10:19:08 | * | yglukhov joined #nim |
| 10:34:20 | * | couven92 joined #nim |
| 10:55:11 | * | yglukhov quit (Remote host closed the connection) |
| 10:55:40 | * | yglukhov joined #nim |
| 10:55:57 | * | Ven quit (Ping timeout: 240 seconds) |
| 10:57:16 | * | Ven joined #nim |
| 11:01:05 | * | gokr quit (Read error: Connection reset by peer) |
| 11:15:17 | * | yglukhov quit (Remote host closed the connection) |
| 11:18:11 | FromGitter | <moigagoo> Doesn't the Nim VSCode extension already implement it to provide intellisense? |
| 11:24:40 | * | gokr joined #nim |
| 11:26:02 | * | yglukhov joined #nim |
| 11:27:14 | * | yglukhov quit (Remote host closed the connection) |
| 11:30:47 | * | Gilga quit (Quit: WeeChat 1.5) |
| 11:31:08 | stisa | moigagoo : I think it's similar but the api/protocollo is different |
| 11:33:48 | * | ftsf joined #nim |
| 11:42:35 | PMunch | According to couven92 it sorta works |
| 11:42:39 | * | yglukhov joined #nim |
| 11:42:45 | PMunch | But there are some small issues |
| 11:46:04 | * | chemist69 quit (Ping timeout: 245 seconds) |
| 11:48:44 | * | chemist69 joined #nim |
| 11:51:34 | * | unlaudable joined #nim |
| 11:52:15 | yglukhov | Araq: hi, there's a funny issue. Nim raises exception in debug mode, when compiling nakefile of nimx: https://gist.github.com/yglukhov/d3f860c70ee5944090aeacfb1535626d |
| 11:52:26 | yglukhov | it compiles fine in nim release |
| 11:52:51 | yglukhov | should i file that? |
| 11:53:02 | Araq | that's just a secret corruption in release mode then |
| 11:53:11 | yglukhov | might be |
| 11:53:36 | Araq | surely report it. and rollback the JS field stuff |
| 11:54:04 | yglukhov | and rollback the JS field stuff - what does it mean? |
| 11:54:24 | * | Ven quit (Ping timeout: 245 seconds) |
| 11:55:31 | Araq | that JS produces dots again |
| 11:55:37 | Araq | the JS codegen. |
| 11:55:44 | Araq | that your project minifies etc |
| 11:56:16 | Araq | though it's hilarious how bad the JS ecosystem is if it cannot minify a["field"] |
| 11:56:36 | yglukhov | well its already done in #5240. what should i do exactly? |
| 11:57:48 | * | Ven joined #nim |
| 11:58:46 | Araq | never mind then |
| 12:02:37 | * | Snircle joined #nim |
| 12:03:39 | yglukhov | Araq: regarding the JS ecosystem. as much as i don't like JS, i think minifiers dont do that intentionally. its very unusual to see bracket notation in hand-written code, unless its semantics mean exactly indexing some hash map or json or smth. and in such cases minifiers can't decide to minify string literals. |
| 12:04:52 | Araq | yeah it occured the same to me after I wrote that |
| 12:04:56 | Araq | :P |
| 12:06:33 | FromGitter | <endragor> turns out in JS (ES6) you can make `a["field"]` invoke a function. didn't know that |
| 12:07:27 | flyx | so they had a look at Lua? |
| 12:10:58 | * | Ven quit (Ping timeout: 258 seconds) |
| 12:11:36 | * | bjz joined #nim |
| 12:11:52 | FromGitter | <endragor> but it's the same as doing `a.field` anyway, so I'm still not sure what the problem is with minimizers. i.e. what's the case when `a["field"]` does something different from `a.field`? |
| 12:12:59 | * | Ven joined #nim |
| 12:13:06 | * | bjz_ quit (Ping timeout: 240 seconds) |
| 12:18:32 | * | yglukhov quit (Remote host closed the connection) |
| 12:20:13 | * | yglukhov joined #nim |
| 12:21:50 | * | PMunch quit (Quit: leaving) |
| 12:24:10 | * | PMunch joined #nim |
| 12:24:33 | couven92 | moigagoo, sometime in the future I'm also thinking about writing and completing NimStudio, to get full language support and project system for Visual Studio! :P |
| 12:26:18 | * | Ven quit (Ping timeout: 240 seconds) |
| 12:27:29 | * | Ven joined #nim |
| 12:45:10 | * | Arrrr quit (Quit: WeeChat 1.5) |
| 13:05:01 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 13:21:40 | Vladar | is there a standard procedure to check is two sequences intersect, i.e. have one or more identical elements? |
| 13:21:43 | * | yglukhov quit (Remote host closed the connection) |
| 13:21:55 | Vladar | s/is/if |
| 13:21:56 | * | rupil joined #nim |
| 13:22:37 | * | yglukhov joined #nim |
| 13:26:22 | PMunch | Araq, is wxnim usable? |
| 13:27:17 | * | handlex joined #nim |
| 13:31:09 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
| 13:33:31 | flyx | Vladar: no, but you could use `any` from sequtils: `any(s1, proc (i: int): bool = i in s2)` |
| 13:34:08 | flyx | Vladar: but big O would be smaller if you sort both seqs and then walk them cleverly |
| 13:36:29 | Vladar | thanks |
| 13:38:35 | * | handlex quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:42:50 | * | yglukhov quit (Remote host closed the connection) |
| 13:43:13 | * | krux02 joined #nim |
| 13:48:16 | * | handlex joined #nim |
| 13:54:31 | * | Ven quit (Ping timeout: 240 seconds) |
| 13:57:58 | * | Ven joined #nim |
| 13:58:51 | * | akiradeveloper joined #nim |
| 13:58:54 | * | akiradeveloper left #nim (#nim) |
| 14:00:28 | * | yglukhov joined #nim |
| 14:25:08 | PMunch | Okay, after a bit of frustration I managed to get it to work |
| 14:26:21 | * | gokr quit (Ping timeout: 252 seconds) |
| 14:28:08 | PMunch | Now just to try and see if I can get it to work with the newest version of wxWidgets.. |
| 14:36:12 | * | PMunch quit (Ping timeout: 276 seconds) |
| 14:41:17 | * | beaumonta joined #nim |
| 14:44:35 | * | abeaumont quit (Ping timeout: 260 seconds) |
| 14:58:19 | * | handlex quit (Quit: handlex) |
| 15:00:12 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
| 15:00:15 | * | PMunch joined #nim |
| 15:15:09 | * | devted joined #nim |
| 15:15:41 | PMunch | Hey Araq, I'm having a look at wxnim as I was thinking about porting it to the latest version |
| 15:16:00 | PMunch | I see that you have a subset of all the .h files in the headers folder. Why only a subset? |
| 15:17:22 | Araq | the rest was unnecessary iirc |
| 15:17:22 | Araq | it covers pretty much every widget |
| 15:17:32 | Araq | wxWidgets is a very dirty codebase |
| 15:17:36 | PMunch | Hmm |
| 15:17:47 | * | unlaudable quit (Ping timeout: 255 seconds) |
| 15:17:50 | PMunch | But how did you figure that out? |
| 15:19:22 | * | benoliver999 quit (*.net *.split) |
| 15:19:22 | * | zxtx quit (*.net *.split) |
| 15:19:22 | * | flyx quit (*.net *.split) |
| 15:19:22 | * | askatasuna quit (*.net *.split) |
| 15:19:22 | * | EastByte quit (*.net *.split) |
| 15:19:22 | * | jh32 quit (*.net *.split) |
| 15:19:22 | * | zielmicha_ quit (*.net *.split) |
| 15:19:22 | * | dom96 quit (*.net *.split) |
| 15:19:23 | * | CcxWrk quit (*.net *.split) |
| 15:19:23 | * | JStoker quit (*.net *.split) |
| 15:19:29 | * | askatasuna joined #nim |
| 15:19:35 | * | flyx joined #nim |
| 15:19:37 | * | JStoker joined #nim |
| 15:20:33 | * | benoliver999 joined #nim |
| 15:22:47 | * | zxtx joined #nim |
| 15:22:47 | * | EastByte joined #nim |
| 15:22:47 | * | jh32 joined #nim |
| 15:22:47 | * | dom96 joined #nim |
| 15:23:02 | * | CcxWrk joined #nim |
| 15:23:02 | Araq | PMunch: I read the code. maybe something is missing, but *shrug* |
| 15:23:09 | Araq | you can add this on demand then |
| 15:23:14 | PMunch | Fair enough |
| 15:31:06 | krux02 | Araq: Are you interested to fix some VM ref type bugs? |
| 15:31:39 | * | zielmicha_ joined #nim |
| 15:31:58 | * | irrequietus quit (Remote host closed the connection) |
| 15:32:36 | krux02 | I have two syntex trees that are indistinctable by treeRepr, but they behave differently on assignments |
| 15:33:01 | Araq | "interested to fix", lol |
| 15:33:12 | Araq | I'm interested in teaching you VM internals. |
| 15:33:16 | Araq | good enough? |
| 15:33:25 | * | irrequietus joined #nim |
| 15:33:34 | krux02 | I really want to get it fixed, so yes |
| 15:33:44 | krux02 | but I have no idea how it works |
| 15:34:02 | krux02 | and basically no understanding of the code base |
| 15:34:09 | Araq | compiler/vmdef.nim |
| 15:34:14 | Araq | read this first |
| 15:35:35 | Araq | vm.nim, type TFullReg represents the register contents at runtime |
| 15:36:42 | Araq | a register has a 'node' field that represents a Nim AST |
| 15:37:39 | Araq | unfortunately this node is also used for other things like strings |
| 15:37:57 | * | Jesin quit (Ping timeout: 258 seconds) |
| 15:38:02 | Araq | or seqs or objects ... |
| 15:38:14 | Araq | some of these things need copy semantics, others don't |
| 15:38:21 | * | Jesin joined #nim |
| 15:39:00 | Araq | for example (1, 2) as a tuple would be the nkPar node |
| 15:39:14 | Araq | but tuples need deep copies for correct semantics |
| 15:40:35 | Araq | 'ref T' is also represented as reg.node |
| 15:40:52 | Araq | and so there is a field nfIsRef for nodes which are references |
| 15:41:38 | Araq | what's the bug? |
| 15:42:05 | krux02 | https://gist.github.com/krux02/595417f0fca7ca93eb5f014477708dce |
| 15:42:42 | Araq | that's too long |
| 15:42:48 | Araq | for pair debugging |
| 15:42:54 | Araq | got a shorter bug? |
| 15:43:04 | krux02 | the NimNode has reference type semantics and sometimes copy semantics |
| 15:43:21 | Araq | surprise ;-) |
| 15:43:29 | Araq | that's what I wrote about |
| 15:45:27 | krux02 | static: |
| 15:45:27 | krux02 | stmtList = quote do: |
| 15:45:27 | krux02 | discard |
| 15:45:27 | krux02 | let arr = [stmtList] |
| 15:45:27 | krux02 | stmtList.add newCall(ident"echo", newLit("Hello World")) |
| 15:45:28 | krux02 | assert arr[0].lispRepr == stmtList.lispRepr |
| 15:46:36 | krux02 | In the example I constructed two syntax trees that are identical, at first. But one has copy semantics and the other has reference semantics. |
| 15:47:21 | krux02 | when I look into the source code, NimNode is a ref type, so I would expect reference semantics everywhere |
| 15:48:39 | krux02 | when I need an AST to be copied somewhere, I need to do that manually everything else is a very big surprise |
| 15:49:22 | Araq | NimNode is specialized in the codegen |
| 15:49:38 | Araq | cannot draw any conclusions from its declaration in this case |
| 15:50:27 | krux02 | How do you think, that I wouldn't assume that this is a bug? |
| 15:50:28 | Araq | and yes, NimNodes should have reference semantics |
| 15:51:30 | krux02 | is there any good reason this this behaves sometimes differently? |
| 15:52:34 | Araq | "good reason", it's a pita to implement |
| 15:53:32 | Araq | but yes, these are bugs |
| 15:53:43 | krux02 | so I can fix them? |
| 15:54:09 | Araq | yes |
| 15:54:28 | krux02 | the only thing I am a bit scared of, is the that there might be code that expects NimNode to have copy semantics, when it actually should not. |
| 15:54:40 | Araq | I'm trying to teach you how to fix these |
| 15:54:51 | Araq | but apparently you are misunderstanding me |
| 15:54:54 | krux02 | ok, I am listening, or better said reading |
| 15:55:10 | Araq | well this code needs to be patched then. |
| 15:55:40 | Araq | we could have some switch to mitigate migration costs |
| 15:55:53 | Araq | but code that depends on the copy behaviour is broken |
| 15:56:48 | krux02 | ok |
| 16:09:37 | krux02 | So I am reading the files. |
| 16:11:35 | krux02 | When I read what you told me it all seems so easy. All I need to do is to make sure is that nfIsRef is always true when the field is a NimNode |
| 16:12:27 | * | irrequietus quit (Remote host closed the connection) |
| 16:13:46 | * | gokr joined #nim |
| 16:13:57 | * | handlex joined #nim |
| 16:14:11 | Araq | krux02: brtw ': void' is not idiomatic Nim |
| 16:14:17 | * | irrequietus joined #nim |
| 16:14:18 | Araq | you just leave it out instead |
| 16:15:01 | yglukhov | Araq: import foo / [bar, baz] works, but import foo.[bar, baz] doesnt. is there a reason? |
| 16:15:08 | yglukhov | . vs / |
| 16:15:21 | Araq | I wanna get rid of the dot syntax |
| 16:15:27 | yglukhov | ouch |
| 16:15:42 | yglukhov | why? |
| 16:15:52 | Araq | but the real reason is that foo.[bar, baz] would have been a grammar change |
| 16:16:16 | Araq | it's not valid Nim and I don't want special cases for the import statement |
| 16:16:37 | Araq | and dom96 disagrees so the dot syntax is safe for the time being |
| 16:17:03 | Araq | why? because it gives the illusion of nested namespaces but there is no such thing in Nim. |
| 16:18:17 | krux02 | You want to get rid of the dot syntax? you main proc foo(a: A): void = ... ; a.foo ? |
| 16:18:34 | Araq | only in import path.here.module |
| 16:18:51 | yglukhov | hrm. why would anyone make such an assumption. java doesnt have namespaces. |
| 16:18:55 | krux02 | ah, ok I was scared for a second |
| 16:19:53 | Araq | yglukhov: it should be package.module but the dot is not available for this now -.- |
| 16:20:04 | Araq | and then I can tell Nim where to find package |
| 16:20:35 | Araq | but maybe this package vs path decision is too subtle in practice |
| 16:20:51 | krux02 | btw, I think I keep my explicit void. I like it. I think it is because of too much scala, where the default is auto |
| 16:22:27 | * | PMunch quit (Quit: leaving) |
| 16:22:47 | krux02 | but anyway what do I need to do, to fix the reference type bug |
| 16:23:36 | * | pregressive joined #nim |
| 16:23:52 | krux02 | I made this example where I have these two minimal, visually indistinctable, but different ast values. |
| 16:24:39 | krux02 | Now I would like to see the value when I debug the VM. |
| 16:24:58 | krux02 | I would like to see where the difference is |
| 16:26:46 | Araq | krux02: compiler/vmgen line 1944 |
| 16:26:58 | smt | is "addQuitProc(ref file.close)" the correct way to make sure a file closes before quitting? |
| 16:27:22 | Araq | smt: it's not even valid Nim code |
| 16:27:36 | smt | i thought it was weird, but just doing quitproc for file.close doesn't work either |
| 16:28:04 | Araq | addQuitProc do(): file.close |
| 16:28:38 | Araq | but if file is local this produces a closure and addQuitProc doesn't support closures and at that point you swear and long for Go's defer statement |
| 16:28:52 | Araq | but before swtiching to Go you notice Nim has 'defer' too |
| 16:29:02 | smt | yeah Go's defer is what i was looking for basically |
| 16:30:02 | Araq | krux02: enable these lines like so: |
| 16:30:10 | Araq | if s.name.s == "checkNode": |
| 16:30:11 | * | sz0 joined #nim |
| 16:30:12 | Araq | echo renderTree(body) |
| 16:30:13 | Araq | c.echoCode(result) |
| 16:30:20 | Araq | then do 'koch temp c example.nim' |
| 16:30:28 | Araq | and look at the produced VM instructions |
| 16:31:13 | * | filcuc quit (Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/) |
| 16:31:27 | * | rusua joined #nim |
| 16:33:10 | Araq | 84 LdGlobalAddr r10, 1 #temp3:21 |
| 16:33:11 | Araq | 85 WrDeref r10, r0, r1 #temp3:21 |
| 16:33:21 | Araq | is produced for |
| 16:33:26 | Araq | node = arg |
| 16:33:35 | krux02 | it tells me echoCode is deprecated |
| 16:33:39 | Araq | why? because 'node' is a static variable |
| 16:33:51 | Araq | krux02: that's just to remind you later to remove the debugging code |
| 16:34:00 | Araq | it's not deprecated at all :P |
| 16:34:05 | krux02 | ok |
| 16:34:46 | Araq | r1 has the 'arg' parameter |
| 16:35:31 | Araq | so we load the address of 'node' to register 10 |
| 16:36:27 | Araq | and we write r1 to this location |
| 16:37:32 | Araq | we look at the implementatoin of WrDeref |
| 16:37:42 | Araq | vm.nim line 557 |
| 16:37:50 | Araq | and pretty much see the bug, I think |
| 16:38:04 | Araq | regs[ra] is still rkNode |
| 16:38:09 | Araq | so we do |
| 16:38:18 | Araq | putIntoNode(regs[ra].node, regs[rc]) |
| 16:38:23 | * | Trustable joined #nim |
| 16:38:51 | krux02 | ok, minor notice: neither echoCode node render tree print the """ of the triple string literals, only normal " of normal string literals are printed |
| 16:39:06 | Araq | hmmm no. still looks correct |
| 16:39:20 | * | rusua quit () |
| 16:40:02 | * | yglukhov quit (Remote host closed the connection) |
| 16:41:02 | krux02 | the bug is not in checkNode |
| 16:41:26 | Araq | oh? |
| 16:41:29 | krux02 | the bug is somehow in the value of the argument |
| 16:41:32 | Araq | could have told me earlier :P |
| 16:42:01 | krux02 | check node works for the first two calls |
| 16:42:06 | krux02 | it only fails on the third |
| 16:42:22 | krux02 | even though the argument is virtually the same |
| 16:42:51 | krux02 | and since it is the same function that gets called, the function is implemented correctly |
| 16:44:17 | krux02 | by the way it did take some time for me to realize that this is only printing the implementation of checkNode |
| 16:45:03 | krux02 | I tried to write an example that shows as good as possible what the problem is, when you execute it |
| 16:47:20 | Araq | it's just the 'quote do' |
| 16:47:27 | Araq | that doesn't produce a nfIsRef node |
| 16:47:36 | Araq | vm.nim line 933 |
| 16:47:42 | Araq | incl a.flags, nfIsRef |
| 16:47:46 | * | nsf quit (Quit: WeeChat 1.6) |
| 16:47:47 | Araq | tada, it works. |
| 16:48:49 | niv | dom96: <3 |
| 16:49:15 | dom96 | :) |
| 16:50:09 | krux02 | wow cool |
| 16:50:24 | krux02 | now I also need to test it with getAst |
| 16:50:36 | dom96 | why isn't 'quote do' dead yet? :P |
| 16:50:52 | Araq | krux02: sure but I don't think it's necessary |
| 16:50:57 | krux02 | dom96: I use it heavily, and I do not have a better replacement |
| 16:51:00 | Araq | quote is mapped to template+getAst |
| 16:51:20 | dom96 | we need a better replacement |
| 16:51:23 | krux02 | ah, ok, that is nice to know that it has a shared implementation |
| 16:51:23 | Araq | and getAst gets turned into a strange do nothing opcode |
| 16:51:26 | dom96 | I'm fine with quote |
| 16:51:29 | dom96 | I just dislike the do notation |
| 16:51:50 | krux02 | I also don't really like the do notation, but I can live with it |
| 16:53:02 | krux02 | normally for macros or templates I can bass a stmtList without a _do_, but when I want to assign the result of that call, for some reason I need to do notation |
| 16:54:17 | * | irrequietus quit (Remote host closed the connection) |
| 16:55:09 | * | irrequietus joined #nim |
| 16:56:19 | * | brson joined #nim |
| 16:56:50 | krux02 | Araq: can you push your commit? I am still not 100% sure what you did, I also guess my lines are a bit different. Then you can probably also close this issue from me: https://github.com/nim-lang/Nim/issues/4821 |
| 16:57:15 | * | Ven quit (Ping timeout: 276 seconds) |
| 16:57:28 | krux02 | how do we celebrate the 10.000th commit? |
| 16:58:31 | dom96 | Party at Araq's house |
| 16:59:25 | * | Ven joined #nim |
| 17:11:11 | * | Ven quit (Ping timeout: 264 seconds) |
| 17:13:08 | * | Ven joined #nim |
| 17:18:59 | dom96 | In all seriousness, I might tweet about this "achievement" :) |
| 17:28:40 | * | pregress_ joined #nim |
| 17:29:48 | * | pregressive quit (Read error: Connection reset by peer) |
| 17:37:12 | * | gangstaguy joined #nim |
| 17:37:49 | * | Andris_zbx quit (Remote host closed the connection) |
| 17:38:32 | krux02 | Araq: The bug is not entirely fixed, we celebrated too early. |
| 17:41:01 | * | Ven quit (Ping timeout: 256 seconds) |
| 17:42:15 | Araq | krux02: I'd like you to push the commit as a PR |
| 17:42:21 | Araq | so the tester runs over it etc |
| 17:42:32 | krux02 | ah, ok that is fair |
| 17:43:07 | Araq | and ofc add your example as a test case in your PR |
| 17:43:12 | * | Ven joined #nim |
| 17:43:18 | krux02 | yes I do it |
| 17:46:03 | krux02 | It seem like that I have to set this flag recursively, because when I am not editing on the root node, the ast still has value semantics |
| 17:50:15 | krux02 | is the discard statement in the tests a requirement? |
| 17:56:11 | * | Ven quit (Ping timeout: 255 seconds) |
| 17:59:28 | * | Ven joined #nim |
| 18:02:12 | * | yglukhov joined #nim |
| 18:04:49 | * | Pisuke quit (Ping timeout: 256 seconds) |
| 18:10:23 | krux02 | I created the pull request for now, even though it is not yet finished. I will work on that later this evening after dinner. By for now |
| 18:11:02 | * | krux02 quit (Quit: Leaving) |
| 18:14:23 | * | handlex quit (Quit: handlex) |
| 18:14:30 | * | brson quit (Quit: leaving) |
| 18:14:47 | * | brson joined #nim |
| 18:24:53 | * | Ven quit (Read error: Connection reset by peer) |
| 18:24:54 | * | Ven_ joined #nim |
| 18:24:59 | * | yglukhov quit (Remote host closed the connection) |
| 18:28:48 | euantor | Any idea why this fails? https://www.irccloud.com/pastebin/sYQo4DvS/ -- Error message: https://www.irccloud.com/pastebin/doDQ4U7A/ |
| 18:28:52 | euantor | But this works: https://www.irccloud.com/pastebin/JsPVF5Sn/ |
| 18:34:14 | dom96 | because all macro arguments are actually NimNode's |
| 18:34:21 | * | handlex joined #nim |
| 18:34:26 | dom96 | you should use a compiletime proc in that case |
| 18:34:27 | * | dddddd joined #nim |
| 18:34:43 | dom96 | proc createStringConstNimNode(constName: string, constVal: string): NimNode {.compilerTime.} = |
| 18:35:21 | Araq | dom96: .compiletime is inferred for these since quite some time |
| 18:35:36 | dom96 | I like to be explicit :) |
| 18:35:46 | dom96 | but good to know |
| 18:35:47 | euantor | Ah, that would do it. Thanks! |
| 18:36:21 | euantor | I'm probably going to end up writing some kind of blog post about this given this is my first attempt at using templates or macros and I've had quite a few questions about it |
| 18:36:39 | dom96 | please do |
| 18:41:09 | * | PMunch joined #nim |
| 18:51:27 | * | Trustable quit (Remote host closed the connection) |
| 18:55:57 | * | nsf joined #nim |
| 18:57:47 | * | yglukhov joined #nim |
| 18:59:12 | * | yglukhov quit (Remote host closed the connection) |
| 19:04:21 | FromGitter | <Varriount> euantor: Then submit the post to hacker news and reddit. :3 |
| 19:04:55 | euantor | I'd post here first to catch my dodgy spelling mistakes, then yeah I'd probably submit them there |
| 19:17:48 | * | couven92 quit (Quit: Client disconnecting) |
| 19:21:12 | * | yglukhov joined #nim |
| 19:28:35 | * | kulelu88 joined #nim |
| 19:36:37 | * | brson quit (Ping timeout: 256 seconds) |
| 19:45:51 | * | gangstaguy quit (Quit: Connection closed for inactivity) |
| 19:49:52 | * | GustavoLapasta joined #nim |
| 19:52:17 | * | handlex quit (Quit: handlex) |
| 19:59:09 | * | brson joined #nim |
| 20:00:19 | * | couven92 joined #nim |
| 20:05:10 | * | yglukhov quit (Remote host closed the connection) |
| 20:07:52 | * | bjz joined #nim |
| 20:12:54 | * | yglukhov joined #nim |
| 20:30:32 | stisa | huh, nim is at 9999 commits |
| 20:30:34 | * | handlex joined #nim |
| 20:32:01 | dom96 | yeah, time to tweet :) |
| 20:32:04 | * | rokups quit (Quit: Connection closed for inactivity) |
| 20:36:15 | dom96 | https://twitter.com/nim_lang/status/821818298664943616 |
| 20:36:47 | euantor | Nice! |
| 20:51:05 | PMunch | Is Alexander Rødseth anyone in here? |
| 20:53:39 | * | yglukhov quit (Remote host closed the connection) |
| 20:57:17 | * | handlex quit (Quit: handlex) |
| 21:03:05 | * | yglukhov joined #nim |
| 21:03:14 | PMunch | Hmm, I'm getting an error installing c2nim from nimble |
| 21:03:51 | * | yglukhov quit (Remote host closed the connection) |
| 21:03:53 | PMunch | http://pastebin.com/Rq3T4Bej |
| 21:04:48 | * | Trustable joined #nim |
| 21:04:51 | dom96 | PMunch: --verbose would help :) |
| 21:05:15 | * | yglukhov joined #nim |
| 21:05:53 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 21:13:09 | PMunch | Not really |
| 21:13:46 | PMunch | http://pastebin.com/W3gSXcp1 |
| 21:13:54 | PMunch | It's pretty much exactly the same output.. |
| 21:14:33 | PMunch | Without the hint to turn on verbose of course :P |
| 21:15:23 | * | Matthias247 joined #nim |
| 21:16:53 | PMunch | Any ideas? |
| 21:17:31 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 21:18:31 | Araq | PMunch: I just recently build c2nim with 'nimble install c2nim' without problems |
| 21:18:47 | * | Matthias247 joined #nim |
| 21:19:00 | PMunch | So did I earlier today.. |
| 21:19:07 | PMunch | But somehow it fails now |
| 21:19:48 | PMunch | But as you can see I have both nim 0.16.0 and nimble 0.8.3 |
| 21:19:55 | PMunch | Compiled just minutes ago |
| 21:20:06 | PMunch | From the 0.16.0 tag |
| 21:20:24 | kulelu88 | hey guys, what does the 'T' do: proc lcm[T](x, y: T): T ? specifically, the [T] after lcm |
| 21:20:42 | kulelu88 | is that my own type? |
| 21:21:59 | PMunch | kulelu88, http://nim-lang.org/docs/tut2.html#generics |
| 21:22:12 | Araq | it is a type varaiable |
| 21:22:13 | PMunch | [T] is for generics |
| 21:25:04 | PMunch | So basically where it fails is on the doCmd where it tries to actually build c2nim |
| 21:25:39 | * | dom96 commented here https://news.ycombinator.com/item?id=13430108 |
| 21:26:09 | PMunch | Can I actually get the error from nimble? |
| 21:26:23 | PMunch | Right now it only gives me a traceback which isn't very helpful.. |
| 21:26:57 | rupil | can you add an echo statement before line 308? |
| 21:26:58 | dom96 | oh, sorry. Use --debug |
| 21:27:33 | dom96 | Nimble should be smart enough to show the output if the build fails. |
| 21:27:45 | dom96 | So please also file a bug about this. |
| 21:27:53 | PMunch | Aha |
| 21:27:57 | PMunch | Okay |
| 21:28:13 | PMunch | Hmm, apparently I don't have /usr/lib/nim.. |
| 21:31:07 | dom96 | huh, how did that happen? |
| 21:31:16 | dom96 | And why do you need to have that? |
| 21:31:51 | dom96 | You're just asking for trouble if you're install Nim into /usr/bin. |
| 21:31:53 | PMunch | Error: cannot open '/usr/lib/nim/system.nim' |
| 21:31:55 | kulelu88 | is there a chart that maps each Nim equivalent of Python lists, dictionaries, etc. ? |
| 21:32:18 | dom96 | I wish that wasn't the case, but it is. We mainly keep Nim in ~/projects/nim. |
| 21:32:57 | PMunch | dom96, then where am I supposed to put it? |
| 21:33:10 | PMunch | How am I supposed to install after I compile it? |
| 21:33:22 | dom96 | Add nim/bin to your PATH and you're done |
| 21:33:29 | dom96 | place it wherever you want |
| 21:35:00 | kulelu88 | add the PATH to .profile is what the docs say |
| 21:35:18 | PMunch | Well, the path is currently in /tmp |
| 21:35:26 | PMunch | So that's not a very good idea :P |
| 21:35:47 | stisa | kulelu88 : something like https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers ? |
| 21:37:52 | kulelu88 | stisa: thank you sir |
| 21:39:24 | * | bjz joined #nim |
| 21:39:44 | PMunch | There, finally |
| 21:40:28 | * | Jesin quit (Quit: Leaving) |
| 21:44:51 | * | Jesin joined #nim |
| 21:53:40 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 21:58:34 | * | rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
| 22:00:09 | * | chemist69 quit (Ping timeout: 276 seconds) |
| 22:17:01 | euantor | dom96: "Nimble should be smart enough to show the output if the build fails." - I've noticed this too, but haven't had a chance to create an issue yet. if you have a syntax error or anything, nimble fails to report it at all. It certainly used to, but 0.8.2 doesn't |
| 22:22:53 | * | Snircle joined #nim |
| 22:23:03 | PMunch | https://github.com/nim-lang/nimble/issues/321 |
| 22:23:09 | PMunch | Created an issue for it |
| 22:24:19 | dom96 | Thanks |
| 22:26:26 | * | chemist69 joined #nim |
| 22:26:36 | * | yglukhov quit (Remote host closed the connection) |
| 22:28:06 | * | brson quit (Ping timeout: 258 seconds) |
| 22:32:37 | PMunch | Hmm, Araq it the wxnim wrapper you should replace the nim.cfg file with: |
| 22:33:10 | PMunch | --passC:"`../../wxWidgets-3.0.2/wx-config --cppflags`" |
| 22:33:16 | PMunch | --passL:"`../../wxWidgets-3.0.2/wx-config --libs`" |
| 22:33:27 | PMunch | The current version doesn't work with Linux at all |
| 22:33:34 | kulelu88 | in the math lib, can `sum` accept multiple variables? |
| 22:33:38 | * | cheatfate quit (Ping timeout: 240 seconds) |
| 22:33:45 | PMunch | Since you hardcoded the stuff that Windows needs.. |
| 22:34:21 | * | brson joined #nim |
| 22:35:39 | Araq | possible. :-) |
| 22:35:57 | PMunch | Other than that it works fine |
| 22:36:20 | PMunch | But it should be updated to 3.1.0 at some point.. |
| 22:36:30 | PMunch | But that's probably a pain.. |
| 22:36:42 | Araq | it shouldn't |
| 22:36:45 | Araq | diff the headers |
| 22:36:54 | Araq | and apply the resulting patches again |
| 22:37:05 | PMunch | Wait |
| 22:37:34 | Araq | that was this wrapper's purpose anyway |
| 22:37:36 | PMunch | Diff the 3.0.2 headers to the 3.1.0 headers so you get the patch to go 3.0.2 -> 3.1.0 and then apply that to the modified ones? |
| 22:38:02 | Araq | diff *my* 3.0.2 headers to the 3.1.0 headers |
| 22:38:07 | PMunch | Or diff the 3.0.2 headers to the wrapper headers and apply that to the 3.1.0 headers |
| 22:39:01 | PMunch | Wait, diffing your 3.0.2 headers to the 3.1.0 headers would just make a patch to go from your 3.0.2 headers to the actual 3.1.0 headers. That wouldn't work.. |
| 22:39:38 | Araq | why not? |
| 22:39:59 | PMunch | What would you apply that to? |
| 22:40:02 | PMunch | Oh wait |
| 22:40:09 | PMunch | no.. |
| 22:40:18 | PMunch | How would that work? |
| 22:41:22 | * | Guest99092 joined #nim |
| 22:41:30 | Guest99092 | hey guys |
| 22:41:31 | Araq | I modified the 3.0.2 headers for c2nim. quite heavily. |
| 22:41:35 | Guest99092 | Allah is doing |
| 22:41:39 | PMunch | Yeah, I noticed |
| 22:41:54 | Guest99092 | sun is not doing is doing |
| 22:41:57 | Guest99092 | to accept Islam say that i bear witness that there is no deity worthy of worship except Allah and Muhammad peace be upon him is his slave and messenger |
| 22:42:01 | * | cheatfate joined #nim |
| 22:42:51 | PMunch | Just checking if I'm still op |
| 22:43:11 | PMunch | But dom96 beat me to the kicking :P |
| 22:43:25 | Araq | nice work, both of you |
| 22:43:42 | dom96 | I think I need to add some commands to NimBot |
| 22:43:48 | dom96 | to make it easier to ban people |
| 22:43:59 | dom96 | I can never remember what to send to ChanServ |
| 22:44:07 | Araq | lol |
| 22:44:11 | Araq | I thought it was me |
| 22:44:15 | PMunch | Ditto, when he started I went straight to the IRC guidelines :P |
| 22:44:33 | Araq | yeah these guidelines are lifesavers |
| 22:45:00 | dom96 | Yeah, but they're difficult to find https://github.com/nim-lang/Nim/wiki/IRC-guidelines#ban-using-chanserv |
| 22:45:09 | dom96 | Although now they're in my browser history at least |
| 22:45:30 | PMunch | Yeah, I just type IRC into my search bar and find it from there :P |
| 22:45:33 | PMunch | But back to business |
| 22:45:35 | dom96 | -ChanServ- AKICK on *!*@*ip.138.197.205.71 was successfully added to the AKICK list for #nim. |
| 22:45:38 | dom96 | Done |
| 22:47:48 | Araq | PMunch: I modified the headers for c2nim |
| 22:48:10 | Araq | the same kind of modifications need to be applied to 3.10 headers |
| 22:48:14 | PMunch | Yeah |
| 22:48:36 | Araq | I suppose you can diff the original header against mine |
| 22:48:38 | PMunch | So you need to make a diff from official 3.0.2 to your 3.0.2 and apply that to the official 3.1.0 |
| 22:48:46 | Araq | yeah or that. |
| 22:48:53 | Araq | that sounds more workable |
| 22:49:12 | PMunch | But I'm not sure if that works |
| 22:49:23 | PMunch | Since patch assumes the original file |
| 22:49:37 | PMunch | So I think it just does it by line number |
| 22:52:53 | * | Trustable quit (Remote host closed the connection) |
| 22:53:25 | Araq | you can use git's diff algorithm somehow |
| 22:53:40 | * | nsf quit (Quit: WeeChat 1.6) |
| 22:53:41 | Araq | but the patch tool is also smarter than that iirc |
| 22:55:16 | PMunch | Hmm, I'll try |
| 22:59:32 | * | Kingsquee joined #nim |
| 23:08:36 | * | vlad1777d quit (Ping timeout: 240 seconds) |
| 23:12:49 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 23:16:21 | * | libman joined #nim |
| 23:18:27 | * | devted quit (Quit: Sleeping.) |
| 23:24:36 | * | Snircle quit (*.net *.split) |
| 23:24:36 | * | Jesin quit (*.net *.split) |
| 23:24:36 | * | huonw quit (*.net *.split) |
| 23:24:36 | * | Guest73656[m] quit (*.net *.split) |
| 23:24:36 | * | M-Quora quit (*.net *.split) |
| 23:24:36 | * | pafmaf quit (*.net *.split) |
| 23:24:56 | * | Snircle joined #nim |
| 23:24:56 | * | Jesin joined #nim |
| 23:24:56 | * | huonw joined #nim |
| 23:24:56 | * | Guest73656[m] joined #nim |
| 23:24:56 | * | M-Quora joined #nim |
| 23:24:56 | * | pafmaf joined #nim |
| 23:25:35 | * | vlad1777d joined #nim |
| 23:26:36 | PMunch | It doesn't quite seem to work |
| 23:26:50 | PMunch | I tried it on any.h, a fairly heavily modified file |
| 23:27:06 | PMunch | And patch fails on 10/48 hunks |
| 23:27:33 | * | Vladar quit (Quit: Leaving) |
| 23:27:33 | PMunch | Better than nothing, but still a bit tedious |
| 23:28:56 | kulelu88 | Araq: is compiling Nim without C as efficient as the "with C" option ? |
| 23:31:21 | * | GustavoLapasta quit (Quit: Leaving) |
| 23:34:20 | Araq | what does that mean? |
| 23:35:17 | kulelu88 | Araq: it says you can compile Nim without the C dependencies |
| 23:35:36 | kulelu88 | (or generated C output) |
| 23:36:03 | kulelu88 | Does that mean, it compiles directly from Nim to machine code? |
| 23:36:34 | * | arnetheduck quit (Ping timeout: 260 seconds) |
| 23:37:03 | Araq | there is no such "without C" option |
| 23:37:25 | Araq | there is a variant of the compiler that uses LLVM as the backend |
| 23:37:37 | * | pregress_ quit (Remote host closed the connection) |
| 23:38:03 | Araq | good night |
| 23:38:10 | * | pregressive joined #nim |
| 23:39:16 | kulelu88 | maybe that is it |
| 23:41:35 | * | libman2 joined #nim |
| 23:41:35 | * | libman quit (Read error: Connection reset by peer) |
| 23:42:41 | * | pregressive quit (Ping timeout: 255 seconds) |