<< 15-12-2018 >>

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:20FromGitter<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:28nc-xAraq: 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:05FromGitter<kaushalmodi> nc-x: +1
04:05:05leorizeshouldn't a new category in tests/ work?
04:05:27FromGitter<kaushalmodi> and Araq and all Nim devs should start moving to config.nims if not :)
04:05:30leorizeor maybe it's time to migrate everything to .nims :P
04:06:23nc-xleorize: 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:55nc-xand 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:21nc-xIMO a global empty config.nims would find bugs faster and is the easy way out.
04:07:35nc-xLet's wait for Araq's opinion though.
04:08:07*whaletechho joined #nim
04:10:47*whaletechno quit (Ping timeout: 240 seconds)
04:12:42nc-xSo... There is another regression due to config.nims I think https://ci.appveyor.com/project/nc-x/nim/builds/21028409#L1532
04:14:08FromGitter<kaushalmodi> nc-x: yeah, I faced that recently
04:14:26FromGitter<kaushalmodi> the workaround is to remove config.nims from path when compiling Nim .. https://github.com/kaushalmodi/hello_musl/commit/03ce6418c6a7b749ba8bfd3a36bd99f3f487285b
04:15:31FromGitter<kaushalmodi> notice the long streak of fails: https://travis-ci.org/kaushalmodi/hello_musl/builds
04:15:52FromGitter<kaushalmodi> with the same "Stat not found" fails
04:16:01FromGitter<kaushalmodi> the last pass is after that hack commit
04:16:06FromGitter<arnetheduck> nim.cfg ftw :)
04:16:19nc-xCan 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:32nc-xNope.
04:17:36FromGitter<kaushalmodi> nc-x: I am not at my devel PC
04:17:41FromGitter<kaushalmodi> the root cause is here: https://travis-ci.org/kaushalmodi/hello_musl/builds/467184211#L670-L675
04:17:50FromGitter<kaushalmodi> koch fails to build with config.nims in path
04:18:02FromGitter<kaushalmodi> so the nim binary remains the pre-koch-build version
04:18:26nc-xYeah. 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:26nc-xBut only windows is failing. Linux builds are running fine
04:19:49FromGitter<kaushalmodi> hmm.. that's a different case then
04:20:12FromGitter<kaushalmodi> that failure I linked above was before the config.nims fixes by you
04:21:05FromGitter<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:59nc-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:19Araqkaushalmodi: nightlies need your help
08:22:50*NimBot joined #nim
08:51:05*nc-x joined #nim
08:52:35nc-xAraq: 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:01narimiranAraq: 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:24narimiranand 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:56Araqnarimiran: don't backport the jsgen changes please
08:54:04Araqthey turned out to be problematic
08:54:10Araqsame for the nimscript fixes
08:54:14narimiranAraq: oh, ok, problem solved :)
08:55:13Araqnc-x: "type pragmas follow the type name" ?
09:12:41nc-xOkay
09:12:56nc-xAnd 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:43narimiranAraq: 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:22Araqnarimiran: indeed :-)
09:40:50Araqnc-x: this pragma has no meaning anymore
09:41:11narimirani knew that 5 years of learning german will pay out :D
09:41:22nc-xOkay - so I need not do anything about it?
09:43:11Araqno
09:46:58nc-xπŸ‘
10:21:11FromGitter<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:50FromGitter<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:51Araqnc-x: why did I break Nimble? The nimscript related changes are not used by Nimble...
11:29:21nc-xNo 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:35Araqok ty
11:45:58*anamok joined #nim
11:45:59anamokhi
11:47:49anamokI 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:18anamokint.high and int64.high are the same
11:48:52anamokThe value that I want to assign is large but less than int.high . If I try with a small value, it works.
11:49:05Araqread the manual
11:49:52anamok<big_value>.int solved the issue
11:50:01anamokthanks
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:29PerkolI've got two variants for copy file function which ignores errors https://bpaste.net/show/a054d267bdcf
12:20:17PerkolFirst variant releases resources on io error but panics if error is during filesream creation
12:20:40PerkolSecond don't panic, but don't release resources
12:21:05PerkolIs there way to combine both approaches?
12:29:16anamokbye
12:29:20*anamok quit (Remote host closed the connection)
12:30:54narimirannow this is strange:
12:30:59narimirani have a `filename.nim` which i compile wich `nim c -d:release --gc:regions filename`
12:31:23narimiranwhen i run it, it runs in 0.25 seconds, taking ~130 MB of RAM
12:31:38enthus1asthey guys i've just compiled a nim hello world with https://github.com/rui314/9cc
12:31:52narimirannow, i create `filename.nims` and i put `--gc:regions` as the only line in it
12:32:44narimiran...and compile the file with either the same command as before, or i remove the `--gc:regions` flag
12:33:03narimiranand now it runs in twice the time and twice the memory consumption!?!
12:36:45narimiranthis is on the latest devel. i cannot reproduce it on 0.19 stable
12:36:57nc-xHah! With all the nimscript regressions at the moment, you are pretty lucky that atleast it is working ;)
12:37:48nc-xAraq: Regarding nimble bug https://github.com/nim-lang/Nim/issues/9991#issuecomment-447565498
12:38:46narimirannc-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:43nc-xPlease open an issue. (in case the bug is forgotten)
12:43:49Araqnc-x: glob.nimble uses the NimScript syntax, the parsecfg stuff seems irrelevant
12:44:14nc-xI
12:44:20nc-xI'll have another look
12:44:46nc-xDo you have any idea why https://ci.appveyor.com/project/dom96/nim/builds/21031520/tests is failing.
12:47:10Araqno
12:50:28nc-xokay
12:52:27*Snircle quit (Ping timeout: 240 seconds)
12:52:48narimirannc-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:44Araqwell this "merge configs" logic is as bad as nc-x's hacks
13:04:28nc-x;)
13:08:59*tdc joined #nim
13:19:16nc-xWell, the nimble issue is definitely due to mergeconfig logic. Before that commit nimble works fine.
13:19:56Araqnimble doesn't use cmdlinehelper.nim
13:20:21nc-xI dropped all commits related to mergeconfig and fixing its regressions.
13:20:25nc-xNimble works fine then
13:21:34nc-x(after recompiling nimble)
13:21:48nc-xSo maybe the changes are affecting how nimble is built
13:24:42nc-xAraq:
13:24:46narimiranAraq: your fix didn't fix it, i'm reopening the issue
13:24:50nc-xFound the commit that caused the issue
13:24:51nc-xhttps://github.com/nim-lang/Nim/commit/675b6f07737a0f23b3b052552eeec525136c6960
13:25:05nc-xReverting this makes and recompiling nimble makes it work
13:27:26narimiranit seems that `filename.nim.cfg` works fine, but `filename.nims` doesn't
13:29:21Araqnarimiran: so fix it
13:30:38Araqnc-x: that makes sense
13:30:51Araqit's also tough to fix
13:31:18nc-xWell... it's all yours ;)
13:31:50Araqtry this please
13:31:55Araqif graph.config.mainPackageId == module.owner.id
13:31:59Araqbecomes
13:32:18Araqif module.owner == nil or module.owner.name.s != "stdlib"
13:33:31*kungtotte quit (Remote host closed the connection)
13:34:26Araqthese implicit imports are terrible, let's deprecate the feature
13:35:22Araqat 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:40Araqit's bullshit.
13:36:22Araqwe have 'include prelude' for that
13:36:25Araqbbl
13:40:59FromGitter<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:47FromDiscord_<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:42narimiran@magnusi see here: https://nim-lang.org/documentation.html
14:15:16narimiransince 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:23PerkolMy program crashes with no output to console. What can I do to find out reason of malfunction?
14:49:34nc-xUse 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:18PerkolLooks like I found the problem using gdb. https://bpaste.net/show/e801ed0643fe
14:56:56PerkolI use threadpool module for threads. If one thread crashes it shouldn't crash whole program?
15:05:47FromDiscord_<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:33FromGitter<xmonader> new day https://xmonader.github.io/nimdays/day14_nimassets.html
16:37:27Zevvxmonader: urlshort gives me url.nim(9, 15) Error: type mismatch: got <string, nil, nil, nil>
16:37:46Zevv@nim 0.19.0
16:38:49dom96Happy 10k Issues/PRs https://github.com/nim-lang/Nim/pull/10000 :D
16:38:58Zevv\o/
16:41:29*Vladar joined #nim
16:44:35Zevvxmonader: 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:11FromGitter<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:43FromGitter<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:36FromDiscord_<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:30narimirannon-nil seqs are the very recent addition to the language
17:35:12FromDiscord_<deech> I'm aware.
17:35:42narimiranand that might be the reason that other part of the language didn't catch up just yet
17:36:03FromDiscord_<deech> That makes sense, so it is on the roadmap?
17:36:32narimirani have no idea, sorry
17:38:03FromGitter<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:51FromGitter<bigeasy> WebRTC bindings for Nim?
17:39:02FromGitter<bigeasy> Actually, how does one do package discovery?
17:39:20narimiran@bigeasy https://nimble.directory/
17:42:21FromGitter<bigeasy> Thank you.
17:42:43FromGitter<bigeasy> No WebRTC. Is it easy to generate C++ bindings?
17:48:36*nc-x joined #nim
17:49:17nc-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:46nc-x@bigeasy shashlick is the expert for bindings stuff. he might be able to help.
17:51:02nc-xshashlick / @genotrance ^^^
17:52:38FromGitter<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:26nc-xπŸ‘
17:59:04*azuri5 joined #nim
18:04:22FromGitter<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:31shashlick@jivank: I had a similar issue in px, the python proxy server I made
18:32:42shashlickHad to make changes to avoid that
18:41:14shashlick@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:08FromDiscord_<citycide> what is the pegs equivalent of the regex `[^n]` to match anything except the given character?
19:47:56FromDiscord_<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:32FromDiscord_<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:44FromDiscord_<exelotl> I believe I can do this:
22:11:47FromDiscord_<exelotl> const REG_DISPCNT* = cast[ptr uint32](0x04000000)
22:11:52FromDiscord_<exelotl> volatileStore(REG_DISPCNT, 0x0100) # enable bg 1
22:12:39FromDiscord_<exelotl> but I'd really like to just be able to do REG_DISPCNT = 0x0100
22:17:57dom96I would use an array + `const REG_DISPCNT = 0x04000000` then you should be able to write: mem[REG_DISPCNT] = 0x0100
22:26:08FromDiscord_<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:36FromDiscord_<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:13edcragghello, is there a way to hold a reference to an arbitrary node in a linked list?
23:25:06FromGitter<mratsim> if your node is a ject, just assign it to something
23:25:11FromGitter<mratsim> ref object
23:33:25edcragghmm, 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:35fthehi. say I have a `ref array`, what would be the standard way of creating a copy of it?
23:41:40FromGitter<mratsim> deepCopy
23:42:53FromGitter<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:01fthemratsim: thanks. It's what I've been doing, just wondered if it was the "idiomatic" way
23:44:19FromGitter<mratsim> I would say a for loop would be idiomatic
23:45:08FromGitter<mratsim> you have a couple more alternatives: using `copyMem` or the dereferencing operator: `myRefArray[] = [1, 2, 3]`
23:47:23fthethat last one looks the prettiest to me
23:49:54*kapil____ joined #nim