00:08:30 | * | FromGitter quit (Remote host closed the connection) |
00:08:48 | * | FromGitter joined #nim |
00:40:17 | * | ng0 quit (Remote host closed the connection) |
00:44:34 | * | abm joined #nim |
00:46:24 | * | ng0 joined #nim |
00:54:58 | * | ng0_ joined #nim |
00:56:23 | * | ng0 quit (Ping timeout: 256 seconds) |
01:07:39 | * | ng0_ quit (Quit: Alexa, when is the end of world?) |
01:23:16 | * | ftsf joined #nim |
01:39:41 | * | zachk quit (Quit: Leaving) |
01:40:09 | * | ftsf quit (Ping timeout: 250 seconds) |
02:10:18 | * | gangstacat quit (Quit: Δis!) |
02:12:17 | * | rockcavera joined #nim |
02:20:39 | * | steshaw joined #nim |
02:21:09 | * | MyMind joined #nim |
02:21:20 | FromGitter | <jivank> i have been testing mofuw and jester to serve an ubuntu ISO around 2gb, both seem to be trying to read the ISO into memory first |
02:23:04 | * | gangstacat joined #nim |
02:23:27 | * | msmorgan quit (Ping timeout: 252 seconds) |
02:24:02 | * | Sembei quit (Ping timeout: 272 seconds) |
02:25:12 | * | Tyresc quit (Quit: WeeChat 2.3-dev) |
02:26:38 | * | msmorgan joined #nim |
02:57:10 | * | abm quit (Quit: Leaving) |
03:08:48 | * | banc quit (Quit: Bye) |
03:15:34 | * | dddddd quit (Remote host closed the connection) |
03:24:15 | * | banc joined #nim |
03:33:43 | * | PaddyF quit (Remote host closed the connection) |
04:00:42 | * | nc-x joined #nim |
04:02:28 | nc-x | Araq: i was thinking of adding some tests for the nimscript bugs that have recently been fixed. IMO the best test is to have an empty config.nims present in nim/config folder so it will also detect issues like https://github.com/nim-lang/Nim/issues/9986. What do you think? Do you want individual tests for each closed bug or a global empty config.nim? |
04:02:55 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:05:05 | FromGitter | <kaushalmodi> nc-x: +1 |
04:05:05 | leorize | shouldn't a new category in tests/ work? |
04:05:27 | FromGitter | <kaushalmodi> and Araq and all Nim devs should start moving to config.nims if not :) |
04:05:30 | leorize | or maybe it's time to migrate everything to .nims :P |
04:06:23 | nc-x | leorize: that would work for the bugs that have been fixed but they wont work for finding the new ones like the nimsuggest one |
04:06:55 | nc-x | and when these new issues would be fixed someone would have to get a reduced test case that can be put into the tests/ folder |
04:07:21 | nc-x | IMO a global empty config.nims would find bugs faster and is the easy way out. |
04:07:35 | nc-x | Let's wait for Araq's opinion though. |
04:08:07 | * | whaletechho joined #nim |
04:10:47 | * | whaletechno quit (Ping timeout: 240 seconds) |
04:12:42 | nc-x | So... There is another regression due to config.nims I think https://ci.appveyor.com/project/nc-x/nim/builds/21028409#L1532 |
04:14:08 | FromGitter | <kaushalmodi> nc-x: yeah, I faced that recently |
04:14:26 | FromGitter | <kaushalmodi> the workaround is to remove config.nims from path when compiling Nim .. https://github.com/kaushalmodi/hello_musl/commit/03ce6418c6a7b749ba8bfd3a36bd99f3f487285b |
04:15:31 | FromGitter | <kaushalmodi> notice the long streak of fails: https://travis-ci.org/kaushalmodi/hello_musl/builds |
04:15:52 | FromGitter | <kaushalmodi> with the same "Stat not found" fails |
04:16:01 | FromGitter | <kaushalmodi> the last pass is after that hack commit |
04:16:06 | FromGitter | <arnetheduck> nim.cfg ftw :) |
04:16:19 | nc-x | Can you echo out the used nim command? For eg. I think here it fails because it thinks it is running on --os:genode https://ci.appveyor.com/project/nc-x/nim/builds/21028409#L1508 |
04:17:32 | nc-x | Nope. |
04:17:36 | FromGitter | <kaushalmodi> nc-x: I am not at my devel PC |
04:17:41 | FromGitter | <kaushalmodi> the root cause is here: https://travis-ci.org/kaushalmodi/hello_musl/builds/467184211#L670-L675 |
04:17:50 | FromGitter | <kaushalmodi> koch fails to build with config.nims in path |
04:18:02 | FromGitter | <kaushalmodi> so the nim binary remains the pre-koch-build version |
04:18:26 | nc-x | Yeah. I am wrong. --os:genode is for testing genode and is that is what is written in appyevor.yml |
04:18:51 | * | kapil____ joined #nim |
04:19:26 | nc-x | But only windows is failing. Linux builds are running fine |
04:19:49 | FromGitter | <kaushalmodi> hmm.. that's a different case then |
04:20:12 | FromGitter | <kaushalmodi> that failure I linked above was before the config.nims fixes by you |
04:21:05 | FromGitter | <kaushalmodi> I need to revert the hack commit to see if it's still needed.. hope to get some time to do that next week |
04:32:59 | nc-x | π |
04:57:35 | * | nc-x quit (Quit: Page closed) |
05:50:37 | * | leorize quit (Ping timeout: 250 seconds) |
06:06:33 | * | wildlander quit (Quit: Konversation terminated!) |
06:17:44 | * | leorize joined #nim |
06:33:49 | * | endragor joined #nim |
06:40:06 | * | leorize quit (Quit: WeeChat 2.2) |
06:41:08 | * | narimiran joined #nim |
06:50:23 | * | endragor quit (Remote host closed the connection) |
06:55:49 | * | endragor joined #nim |
06:57:17 | * | kapil____ quit (Quit: Connection closed for inactivity) |
07:08:29 | * | endragor quit (Remote host closed the connection) |
08:00:19 | Araq | kaushalmodi: nightlies need your help |
08:22:50 | * | NimBot joined #nim |
08:51:05 | * | nc-x joined #nim |
08:52:35 | nc-x | Araq: What is a good deprecation message for https://github.com/nim-lang/Nim/issues/8514? Also for the acyclic case, is it enough to remove https://github.com/nim-lang/Nim/blob/devel/compiler/semtypinst.nim#L19-L20 or something else needs to be done? |
08:53:01 | narimiran | Araq: i'm backporting fixes to 0.19 branch, and i would like to check something with you. there is this fix: https://github.com/nim-lang/Nim/commit/e3e5ae287f9a10ab9ee350e64982f21c44238594#diff-255aac99e5eed78cd98b01e25c647f86L1762 |
08:53:24 | narimiran | and this is the current version of the file in 0.19: https://github.com/nim-lang/Nim/blob/version-0-19/compiler/jsgen.nim#L1699 |
08:53:56 | Araq | narimiran: don't backport the jsgen changes please |
08:54:04 | Araq | they turned out to be problematic |
08:54:10 | Araq | same for the nimscript fixes |
08:54:14 | narimiran | Araq: oh, ok, problem solved :) |
08:55:13 | Araq | nc-x: "type pragmas follow the type name" ? |
09:12:41 | nc-x | Okay |
09:12:56 | nc-x | And what about -> Also for the acyclic case, is it enough to remove https://github.com/nim-lang/Nim/blob/devel/compiler/semtypinst.nim#L19-L20 or something else needs to be done? |
09:14:43 | narimiran | Araq: does this in the brackets mean 'backport': https://github.com/nim-lang/Nim/commit/d6dbc50793d95e5ad974ae979803775c4c6d2fae ? :) |
09:23:06 | * | whaletechho quit (Quit: ha det bra) |
09:40:22 | Araq | narimiran: indeed :-) |
09:40:50 | Araq | nc-x: this pragma has no meaning anymore |
09:41:11 | narimiran | i knew that 5 years of learning german will pay out :D |
09:41:22 | nc-x | Okay - so I need not do anything about it? |
09:43:11 | Araq | no |
09:46:58 | nc-x | π |
10:21:11 | FromGitter | <alehander42> Araq, if I only have the sym id, is there an easy way to get back an ident/string repr for it |
10:26:50 | FromGitter | <alehander42> and overally is there a good way to map a unique int to a combo of id-s |
10:59:14 | * | ng0 joined #nim |
11:26:51 | Araq | nc-x: why did I break Nimble? The nimscript related changes are not used by Nimble... |
11:29:21 | nc-x | No idea. But it doesn't work on devel. And there has not been any major change in nimble repo from days. I might take a look once I finish https://github.com/nim-lang/Nim/pull/9993 |
11:32:35 | Araq | ok ty |
11:45:58 | * | anamok joined #nim |
11:45:59 | anamok | hi |
11:47:49 | anamok | I get this error: Error: type mismatch: got <int64> but expected 'int' . I have an object with an int field and I want to assign a value to this field. |
11:48:18 | anamok | int.high and int64.high are the same |
11:48:52 | anamok | The value that I want to assign is large but less than int.high . If I try with a small value, it works. |
11:49:05 | Araq | read the manual |
11:49:52 | anamok | <big_value>.int solved the issue |
11:50:01 | anamok | thanks |
11:52:15 | * | Cthalupa quit (Ping timeout: 246 seconds) |
11:54:45 | * | Cthalupa joined #nim |
12:04:04 | * | theelous3 joined #nim |
12:09:07 | * | dddddd joined #nim |
12:13:33 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
12:15:19 | * | Perkol joined #nim |
12:16:58 | * | Snircle joined #nim |
12:19:29 | Perkol | I've got two variants for copy file function which ignores errors https://bpaste.net/show/a054d267bdcf |
12:20:17 | Perkol | First variant releases resources on io error but panics if error is during filesream creation |
12:20:40 | Perkol | Second don't panic, but don't release resources |
12:21:05 | Perkol | Is there way to combine both approaches? |
12:29:16 | anamok | bye |
12:29:20 | * | anamok quit (Remote host closed the connection) |
12:30:54 | narimiran | now this is strange: |
12:30:59 | narimiran | i have a `filename.nim` which i compile wich `nim c -d:release --gc:regions filename` |
12:31:23 | narimiran | when i run it, it runs in 0.25 seconds, taking ~130 MB of RAM |
12:31:38 | enthus1ast | hey guys i've just compiled a nim hello world with https://github.com/rui314/9cc |
12:31:52 | narimiran | now, i create `filename.nims` and i put `--gc:regions` as the only line in it |
12:32:44 | narimiran | ...and compile the file with either the same command as before, or i remove the `--gc:regions` flag |
12:33:03 | narimiran | and now it runs in twice the time and twice the memory consumption!?! |
12:36:45 | narimiran | this is on the latest devel. i cannot reproduce it on 0.19 stable |
12:36:57 | nc-x | Hah! With all the nimscript regressions at the moment, you are pretty lucky that atleast it is working ;) |
12:37:48 | nc-x | Araq: Regarding nimble bug https://github.com/nim-lang/Nim/issues/9991#issuecomment-447565498 |
12:38:46 | narimiran | nc-x: do you want me to open an issue or will this be enough for you? :) (from what i've seen, you're been dealing with these lately) |
12:39:43 | nc-x | Please open an issue. (in case the bug is forgotten) |
12:43:49 | Araq | nc-x: glob.nimble uses the NimScript syntax, the parsecfg stuff seems irrelevant |
12:44:14 | nc-x | I |
12:44:20 | nc-x | I'll have another look |
12:44:46 | nc-x | Do you have any idea why https://ci.appveyor.com/project/dom96/nim/builds/21031520/tests is failing. |
12:47:10 | Araq | no |
12:50:28 | nc-x | okay |
12:52:27 | * | Snircle quit (Ping timeout: 240 seconds) |
12:52:48 | narimiran | nc-x: reported: https://github.com/nim-lang/Nim/issues/9995 |
12:54:00 | * | Snircle joined #nim |
12:54:30 | * | tdc quit (Quit: Leaving) |
12:55:31 | * | ng0 joined #nim |
13:01:44 | Araq | well this "merge configs" logic is as bad as nc-x's hacks |
13:04:28 | nc-x | ;) |
13:08:59 | * | tdc joined #nim |
13:19:16 | nc-x | Well, the nimble issue is definitely due to mergeconfig logic. Before that commit nimble works fine. |
13:19:56 | Araq | nimble doesn't use cmdlinehelper.nim |
13:20:21 | nc-x | I dropped all commits related to mergeconfig and fixing its regressions. |
13:20:25 | nc-x | Nimble works fine then |
13:21:34 | nc-x | (after recompiling nimble) |
13:21:48 | nc-x | So maybe the changes are affecting how nimble is built |
13:24:42 | nc-x | Araq: |
13:24:46 | narimiran | Araq: your fix didn't fix it, i'm reopening the issue |
13:24:50 | nc-x | Found the commit that caused the issue |
13:24:51 | nc-x | https://github.com/nim-lang/Nim/commit/675b6f07737a0f23b3b052552eeec525136c6960 |
13:25:05 | nc-x | Reverting this makes and recompiling nimble makes it work |
13:27:26 | narimiran | it seems that `filename.nim.cfg` works fine, but `filename.nims` doesn't |
13:29:21 | Araq | narimiran: so fix it |
13:30:38 | Araq | nc-x: that makes sense |
13:30:51 | Araq | it's also tough to fix |
13:31:18 | nc-x | Well... it's all yours ;) |
13:31:50 | Araq | try this please |
13:31:55 | Araq | if graph.config.mainPackageId == module.owner.id |
13:31:59 | Araq | becomes |
13:32:18 | Araq | if module.owner == nil or module.owner.name.s != "stdlib" |
13:33:31 | * | kungtotte quit (Remote host closed the connection) |
13:34:26 | Araq | these implicit imports are terrible, let's deprecate the feature |
13:35:22 | Araq | at this point it's just stupid guesswork, "I think modules don't want to import themselves and it broke for stdlib modules since Timothee added system/helpers2 ..." |
13:35:40 | Araq | it's bullshit. |
13:36:22 | Araq | we have 'include prelude' for that |
13:36:25 | Araq | bbl |
13:40:59 | FromGitter | <kaushalmodi> Araq: Yes, fixing nightlies is the first thing on my list. Lately, work's too busy. I hope to continue with Nim work next week. |
13:44:36 | * | xace quit (Ping timeout: 246 seconds) |
14:03:47 | FromDiscord_ | <magnusi> Howdy guys, hardcore Rustacean here, what are the freshest resources to learn Nim these days? I have already had some success emplyoing Nim in auxiliary positions of my Rust projects and I would like to expand my horizons |
14:14:42 | narimiran | @magnusi see here: https://nim-lang.org/documentation.html |
14:15:16 | narimiran | since you're already experienced with rust, i would probably start with the manual: https://nim-lang.org/docs/manual.html |
14:33:00 | * | xace joined #nim |
14:33:15 | * | azuri5 joined #nim |
14:35:23 | Perkol | My program crashes with no output to console. What can I do to find out reason of malfunction? |
14:49:34 | nc-x | Use a debugger? or printf debugging? or if you are on windows check event viewer? or if the code is small enough, then upload it on gist/pastebin/anywhere else and ask here or in forums. |
14:49:52 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
14:55:23 | * | ng0 joined #nim |
14:56:18 | Perkol | Looks like I found the problem using gdb. https://bpaste.net/show/e801ed0643fe |
14:56:56 | Perkol | I use threadpool module for threads. If one thread crashes it shouldn't crash whole program? |
15:05:47 | FromDiscord_ | <magnusi> @nariman alright, thanks a lot! |
15:06:35 | * | wildlander joined #nim |
15:13:34 | * | azuri5 quit (Quit: azuri5) |
15:26:59 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
15:32:51 | * | Snircle joined #nim |
15:42:20 | * | azuri5 joined #nim |
16:24:33 | FromGitter | <xmonader> new day https://xmonader.github.io/nimdays/day14_nimassets.html |
16:37:27 | Zevv | xmonader: urlshort gives me url.nim(9, 15) Error: type mismatch: got <string, nil, nil, nil> |
16:37:46 | Zevv | @nim 0.19.0 |
16:38:49 | dom96 | Happy 10k Issues/PRs https://github.com/nim-lang/Nim/pull/10000 :D |
16:38:58 | Zevv | \o/ |
16:41:29 | * | Vladar joined #nim |
16:44:35 | Zevv | xmonader: nil is not valid for a string argument in 0.19 |
16:51:51 | * | nc-x quit (Quit: Page closed) |
16:54:48 | * | azuri5 quit (Quit: azuri5) |
16:57:28 | * | tdc quit (Ping timeout: 250 seconds) |
17:01:11 | FromGitter | <xmonader> @zevv ah indeed the code was from 0.17 or 0.18 era i need to go through the previous chapters again |
17:02:43 | FromGitter | <xmonader> @Zevv you can add nilseq:on while compiling |
17:06:15 | * | Perkol quit (Quit: Leaving) |
17:13:31 | * | dddddd quit (Remote host closed the connection) |
17:33:36 | FromDiscord_ | <deech> Is there a reason to not have non-nillable Objects similar to seqs where in the case of objects the user is forced to explicity initialize. |
17:34:30 | narimiran | non-nil seqs are the very recent addition to the language |
17:35:12 | FromDiscord_ | <deech> I'm aware. |
17:35:42 | narimiran | and that might be the reason that other part of the language didn't catch up just yet |
17:36:03 | FromDiscord_ | <deech> That makes sense, so it is on the roadmap? |
17:36:32 | narimiran | i have no idea, sorry |
17:38:03 | FromGitter | <arnetheduck> @Araq - care to implement https://github.com/nim-lang/Nim/issues/9017 any time soon? looks like our CI:s for nimbus are breaking because of recent nimble changes, and there's no *good* way to know which nimble works with which nim so we can lock it down (there are a few bad ways but I'll only do those if this can't be solved upstream) |
17:38:51 | FromGitter | <bigeasy> WebRTC bindings for Nim? |
17:39:02 | FromGitter | <bigeasy> Actually, how does one do package discovery? |
17:39:20 | narimiran | @bigeasy https://nimble.directory/ |
17:42:21 | FromGitter | <bigeasy> Thank you. |
17:42:43 | FromGitter | <bigeasy> No WebRTC. Is it easy to generate C++ bindings? |
17:48:36 | * | nc-x joined #nim |
17:49:17 | nc-x | @arnetheduck which nim version are you guys on? If it is a recent one then - https://github.com/nim-lang/Nim/issues/9991 |
17:50:46 | nc-x | @bigeasy shashlick is the expert for bindings stuff. he might be able to help. |
17:51:02 | nc-x | shashlick / @genotrance ^^^ |
17:52:38 | FromGitter | <arnetheduck> nc-x, we're using 0.19, but we build it from our own fork, in case we need to apply a patch. we'd like to use the nimble that came with 0.19 and not a random version that keeps breaking, so we can trust the CI to fail due to our own changes only. it would make a lot of sense for us if this was recorded in git (with a submodule for example) or a version lock file or whatever. |
17:54:26 | nc-x | π |
17:59:04 | * | azuri5 joined #nim |
18:04:22 | FromGitter | <jivank> dom96, I tested mofuw and it also tries to read the entire file in memory, causing it to get killed |
18:13:21 | * | azuri5 quit (Ping timeout: 250 seconds) |
18:19:27 | * | azuri5 joined #nim |
18:21:31 | * | nc-x quit (Quit: Page closed) |
18:31:59 | * | azuri5 quit (Ping timeout: 250 seconds) |
18:32:31 | shashlick | @jivank: I had a similar issue in px, the python proxy server I made |
18:32:42 | shashlick | Had to make changes to avoid that |
18:41:14 | shashlick | @bigeasy: what are you looking into wrapping? |
18:55:53 | * | Tyresc joined #nim |
19:01:53 | * | Cthalupa quit (Ping timeout: 250 seconds) |
19:02:06 | * | dddddd joined #nim |
19:03:36 | * | Cthalupa joined #nim |
19:45:08 | FromDiscord_ | <citycide> what is the pegs equivalent of the regex `[^n]` to match anything except the given character? |
19:47:56 | FromDiscord_ | <citycide> ah I think it's the same |
20:01:53 | * | abm joined #nim |
20:23:27 | * | zachk joined #nim |
20:24:15 | * | zachk quit (Changing host) |
20:24:15 | * | zachk joined #nim |
20:55:19 | * | Trustable joined #nim |
21:14:26 | * | narimiran quit (Ping timeout: 250 seconds) |
21:25:48 | * | smt joined #nim |
21:33:04 | * | yuken_ quit (Ping timeout: 250 seconds) |
21:54:44 | * | Trustable quit (Ping timeout: 250 seconds) |
21:59:35 | * | Trustable joined #nim |
22:00:59 | * | azuri5 joined #nim |
22:10:32 | FromDiscord_ | <exelotl> hey, I'm trying to do some GBA programming with Nim but I'm struggling to figure out how to read/write registers in a nice way |
22:11:12 | * | abm quit (Ping timeout: 250 seconds) |
22:11:44 | FromDiscord_ | <exelotl> I believe I can do this: |
22:11:47 | FromDiscord_ | <exelotl> const REG_DISPCNT* = cast[ptr uint32](0x04000000) |
22:11:52 | FromDiscord_ | <exelotl> volatileStore(REG_DISPCNT, 0x0100) # enable bg 1 |
22:12:39 | FromDiscord_ | <exelotl> but I'd really like to just be able to do REG_DISPCNT = 0x0100 |
22:17:57 | dom96 | I would use an array + `const REG_DISPCNT = 0x04000000` then you should be able to write: mem[REG_DISPCNT] = 0x0100 |
22:26:08 | FromDiscord_ | <exelotl> doesn't that force me to have different arrays depending on the size of the write? e.g. in that case I would have to do mem32[REG_DISPCNT/4] = 0x0100 |
22:29:36 | FromDiscord_ | <exelotl> I found a 'VolatilePtr' type that somebody had posted but I get a compiler error when I try to use it, e.g. https://gist.github.com/geckojsc/5309151879221e2e80452a7839f93638 |
22:34:18 | * | dorelix joined #nim |
22:34:50 | * | Vladar quit (Remote host closed the connection) |
22:49:55 | * | abm joined #nim |
23:06:10 | * | azuri5 quit (Quit: azuri5) |
23:19:13 | edcragg | hello, is there a way to hold a reference to an arbitrary node in a linked list? |
23:25:06 | FromGitter | <mratsim> if your node is a ject, just assign it to something |
23:25:11 | FromGitter | <mratsim> ref object |
23:33:25 | edcragg | hmm, i've been trying to do that and get a type mismatch http://paste.debian.net/plain/1056052 |
23:37:36 | * | fthe joined #nim |
23:38:35 | fthe | hi. say I have a `ref array`, what would be the standard way of creating a copy of it? |
23:41:40 | FromGitter | <mratsim> deepCopy |
23:42:53 | FromGitter | <mratsim> @alehander42, want to know why iβm avoiding ref like the plague? See here: https://github.com/mratsim/Arraymancer/issues/336. While I have no problem with ref for my tensor type, in my direct acyclic graph the overhead is just insane. |
23:44:01 | fthe | mratsim: thanks. It's what I've been doing, just wondered if it was the "idiomatic" way |
23:44:19 | FromGitter | <mratsim> I would say a for loop would be idiomatic |
23:45:08 | FromGitter | <mratsim> you have a couple more alternatives: using `copyMem` or the dereferencing operator: `myRefArray[] = [1, 2, 3]` |
23:47:23 | fthe | that last one looks the prettiest to me |
23:49:54 | * | kapil____ joined #nim |