<< 20-08-2018 >>

00:10:16FromDiscord<exelotl> I was hoping to make a table that stores default identifier names for any type at compile time
00:10:29FromDiscord<exelotl> something like var defaultIdents {.compileTime.}: Table[typedesc, NimNode]
00:11:32FromGitter<data-man> https://github.com/nim-lang/Nim/pull/8687
00:13:42*benny17 joined #nim
00:14:04*benny17 quit (Remote host closed the connection)
00:21:44*pwntus quit (Ping timeout: 272 seconds)
00:22:48*nyuszika7h4 joined #nim
00:23:37*nyuszika7h4 quit (Remote host closed the connection)
00:27:44*high_fiver joined #nim
00:32:36*rayman22201 joined #nim
00:35:35*high_fiver quit (Ping timeout: 276 seconds)
00:36:08*rayman267 quit (Ping timeout: 260 seconds)
01:01:28*of joined #nim
01:02:05*of quit (Killed (Sigyn (Spam is off topic on freenode.)))
01:06:38*pwntus joined #nim
01:08:54*m1st` joined #nim
01:13:50*m1st` quit (Quit: rcirc on GNU Emacs 26.1)
01:22:23*Tanger joined #nim
01:27:20*rayman241 joined #nim
01:29:17*precise23 joined #nim
01:31:36*rayman22201 quit (Ping timeout: 268 seconds)
01:36:34*precise23 quit (Ping timeout: 256 seconds)
01:47:32*alchem1st joined #nim
02:05:08FromGitter<gogolxdong> How to store and retrieve special characters on mysql database in Nim ? like escaping character.
02:13:58*dddddd quit (Remote host closed the connection)
02:15:47*endragor joined #nim
02:56:35*druonysus joined #nim
03:18:06*mal`` quit (Quit: Leaving)
03:19:25*nope__ joined #nim
03:19:48*nope__ quit (K-Lined)
03:27:50*PrimHelios quit (Ping timeout: 260 seconds)
03:30:07*mal`` joined #nim
03:47:01*NimBot joined #nim
04:10:21FromGitter<kaushalmodi> A brief history about "it" for folks wondering "Why 'it' in `mapIt`??" :)
04:10:22FromGitter<kaushalmodi> https://github.com/nim-lang/Nim/pull/8679#issuecomment-414192084
04:16:46*Matrixiumn joined #nim
04:20:37TangerOooh, interesting
04:21:08*Matrixiumn quit (Remote host closed the connection)
04:22:31*alchem1st quit (Quit: Using Circe, the loveliest of all IRC clients)
04:24:21ldleworkdash.el is my best friend
04:25:42FromGitter<kaushalmodi> ldlework: I still need to start using it.
04:26:12FromGitter<kaushalmodi> The inbuilt elisp works just fine so far. It's really well documented, and the documentation is daunting.
04:26:18FromGitter<kaushalmodi> So I never get to start using it.
04:26:54ldleworkdash.el, anaphora.el, s.el, f.el, ht.el are my core toolkit
04:27:01ldleworknever leave home without em
04:28:36FromGitter<kaushalmodi> very cool! Did not know about anaphora ( https://github.com/rolandwalker/anaphora )
04:39:20*gangstacat quit (Quit: Ĝis!)
04:44:52*gangstacat joined #nim
05:07:34*Tyrantelf25 joined #nim
05:08:53*noonien quit (Quit: Connection closed for inactivity)
05:11:51*Tyrantelf25 quit (Remote host closed the connection)
05:23:32*leorize quit (Ping timeout: 276 seconds)
05:27:40*nsf joined #nim
05:29:36*sirnaysayer6 joined #nim
05:30:00*sirnaysayer6 quit (Remote host closed the connection)
05:31:57*pwntus quit (Ping timeout: 240 seconds)
05:36:37*Liara- joined #nim
05:37:29*Liara- quit (Remote host closed the connection)
05:43:08*pwntus joined #nim
05:50:59*qenthus1ast joined #nim
05:51:29*enthus1ast quit (Ping timeout: 276 seconds)
05:56:20*leorize joined #nim
06:24:08*Vladar joined #nim
06:33:27*captainkraft quit (Ping timeout: 240 seconds)
06:35:44*captainkraft joined #nim
06:38:32*rockcavera joined #nim
07:00:40*stefanos82 joined #nim
07:04:57*druonysus quit (Ping timeout: 240 seconds)
07:05:40*couven92 joined #nim
07:07:30*fredrik92 quit (Ping timeout: 256 seconds)
07:37:57norok2anybody here has experience using nim for android (possibly ios cross-platform) development of a library to be used by a native ui?
07:48:54FromGitter<mratsim> yglukhov one of the devs of Reel valley and Nimx, has experience doing a cross-platform Android + IOS + Facebook game
07:49:22FromGitter<mratsim> @norok2 https://yglukhov.github.io/Making-ReelValley-Overview/ ^
07:50:07*floppydh joined #nim
08:00:03*cornfeedhobo quit (Quit: ZNC - https://znc.in)
08:03:37*gmpreussner_ joined #nim
08:04:35*gmpreussner quit (Ping timeout: 240 seconds)
08:07:45*pwntus quit (Ping timeout: 244 seconds)
08:08:08*PMunch joined #nim
08:09:33*pwntus joined #nim
08:14:09*cornfeedhobo joined #nim
08:21:47stefanos82dom96: how does nim-lang.org/docs/ gets updated, via Jekyll?
08:30:51*cornfeedhobo quit (Quit: ZNC - https://znc.in)
08:46:22*cornfeedhobo joined #nim
08:50:13PMunchHmm, is there any changes from 0.18.0 to devel that does something with ambiguous calls?
08:50:23PMunchTrying to update wxnim to work on devel
08:50:52PMunchBut I get "Error: overloaded 'getMode' leads to ambiguous calls"
08:51:31livcdthere were this issues inside winim itself
08:51:36livcdwhat nim version do you have ?
08:52:07PMunchIt's working on 0.18.0, but not on devel
08:54:10livcdI am on 0.18.1 and it's working
08:54:20PMunchYeah 0.18.1 is devel
08:54:25PMunchWhen did you last update?
08:54:45livcdsome time ago
08:54:47livcd2-3 weeks ago ?
08:54:55livcdi am on 674bd7bfad100a07e051e0a310bcf0a64c355a79
08:55:50PMunchI'm updating now
08:57:48norok2@mratsim thanks!
08:58:09livcdyeah 18 days ago
08:58:34*leorize quit (Ping timeout: 256 seconds)
09:00:11PMunchHmm, just grabbed a new devel with "choosenim update devel" and I get the same error
09:00:20PMunchSo it's something in the past 18 days that has changed
09:00:45PMunchOr wait, did you try to compile wxnim?
09:00:49PMunchNot winim
09:01:12PMunchThis thing: https://github.com/PMunch/wxnim
09:06:27PMunchThis is what it's complaining about: https://github.com/PMunch/wxnim/blob/master/private/event.nim#L1047
09:07:07livcdaha
09:07:12livcdsorry
09:10:08livcdI cloned the repo what do you want me to do ?
09:12:10PMunchTry to run "nim cpp -r example1.nim" in the examples/purewx folder
09:12:26PMunchWell, I guess all the examples should give the same error
09:12:30PMunchBut that's the one I've tried
09:12:59livcdyup the same
09:13:35PMunchHmm, so it's older than 18 days then
09:13:49PMunchSo anywhere between 0.18.0 and 18 days ago :P
09:19:09PMunchI'm surprised this worked to begin with..
09:20:04*ven473 joined #nim
09:35:16*cspar quit (Ping timeout: 272 seconds)
09:42:49*ftsf quit (Ping timeout: 244 seconds)
09:46:27*ftsf joined #nim
09:50:45*GustavoLapasta joined #nim
09:56:27*cspar joined #nim
09:56:45FromGitter<bung87> if blk.match(re_han) == true: I follow the document but it results type mismatch ,any one can help?
09:57:11FromGitter<bung87> let re_han = re(r"([\u4E00-\u9FD5]+)") I using the nre module
10:01:23PMunchWhat is the error message?
10:02:15FromGitter<bung87> proc `==`(a, b: RegexMatch): bool ⏎ first type mismatch at position: 1 ⏎ required type: RegexMatch ⏎ but expression 'match(blk, re_han, 0, high(int))' is of type: Option[nre.RegexMatch] [https://gitter.im/nim-lang/Nim?at=5b7a91a67a17864125503448]
10:02:49PMunchAh, so == doesn't return a boolean in this case
10:02:55PMunchIt returns an option with the result
10:03:14PMunchYou can use the isSome procedure in the options module to get a boolean
10:04:21FromGitter<bung87> thanks! works
10:05:42PMunchNo problem :)
10:08:12*couven92 quit (Ping timeout: 272 seconds)
10:10:27*pwntus quit (Ping timeout: 240 seconds)
10:29:12FromGitter<bung87> let re_han = re(r"([\x{4E00}/u-\x{9FD5}/u]+)(*UTF)")Error: unhandled exception: character value in \x{} or \o{} is too large
10:30:24FromGitter<bung87> re_han = re.compile("([\u4E00-\u9FD5]+)") the python version,how do I port it to nim?
10:32:38*cspar quit (Ping timeout: 256 seconds)
10:41:27*echotangoecho joined #nim
10:47:14*qenthus1ast quit (Ping timeout: 276 seconds)
10:49:39*qenthus1ast joined #nim
10:50:41*data-man joined #nim
10:51:56*noonien joined #nim
10:52:00FromGitter<tim-st> Should non default parameters after default parameters be allowed in nims procs?
10:53:21*krux02 joined #nim
10:54:44*qenthus1ast quit (Ping timeout: 256 seconds)
11:03:55dom96Are they in Python?
11:04:52FromGitter<tim-st> no
11:05:22FromGitter<tim-st> in nim currently it's allowed sometimes
11:05:34FromGitter<tim-st> https://github.com/nim-lang/Nim/issues/8683
11:07:59*qenthus1ast joined #nim
11:10:42*qenthus1ast quit (Read error: Connection reset by peer)
11:18:54*echotangoecho quit (Quit: Lost terminal)
11:25:18*dddddd joined #nim
11:26:19*pwntus joined #nim
11:33:47*SenasOzys joined #nim
11:35:08*SenasOzys quit (Remote host closed the connection)
11:36:03*SenasOzys joined #nim
11:54:26*data-man quit (Quit: Konversation terminated!)
11:56:36*leorize joined #nim
12:06:38*pwntus quit (Ping timeout: 272 seconds)
12:07:49*pwntus joined #nim
12:11:05*ftsf quit (Ping timeout: 276 seconds)
12:15:20*GustavoLapasta quit (Read error: Connection reset by peer)
12:23:25*pwntus quit (Ping timeout: 268 seconds)
12:31:38*pwntus joined #nim
12:36:32*Paul_ joined #nim
12:37:52*nsf quit (Quit: WeeChat 2.2)
12:41:11FromGitter<retsyo> what a coincidence! I am testing PMunch's wxnim fork. after I change many `expr` to `untyped`, many `nil` to `@[]` or `seq == nil` to `seq.len == 0` and comment out ` proc getMode` in `private\event.nim`, there is no error during compilation
12:41:12FromGitter<retsyo> what a coincidence! I am testing PMunch's wxnim fork. after I change many `expr` to `untyped`, many `nil` to `@[]` or `seq == nil` to `seq.len == 0` and comment out ` proc getMode` in `private\event.nim`, there is no error during compilation
12:42:12FromGitter<retsyo> but I am lying. nim hangs here for hours
12:45:49FromGitter<retsyo> nim can not go forward, it is stucked on `CC: stdlib_dynlib` everytime
12:46:18PMunchHmm, that's strange
12:46:24PMunchIs this on devel?
12:46:26Araqtry the MingW that finish.exe installs
12:46:51FromGitter<retsyo> I forget to say I changed `wxCompile.nim` too because I use msys2+mingw on windows7
12:47:45FromGitter<retsyo> my msys2+mingw+nim can compile other source without problem
12:50:04FromGitter<retsyo> I really hope wxWindows can be used in nim, so that I can port my wxpython application easily. I am too lazy to learn yet another GUI lib
12:53:33PMunchIt should work fine on the current stable release of Nim if you pull my latest commits
12:53:41PMunchBut there are still some issues with devel
12:54:15FromGitter<retsyo> btw, what has replaced the old `nil` in nim?
12:54:16PMunchAs you mention there's the non-nillable seqs that needs to be fixed. And getMode which I'm not 100% sure how worked to begin with
12:54:48PMunchWell, nil is still there
12:54:56PMunchBut seqs and strings can't be nil any longer
12:55:30dom96If you want a nillable string/seq use Option[string]/Option[seq[T]] (you need to import options for that)
12:56:06FromGitter<retsyo> what a pity for lazy user from python
12:57:11FromGitter<mratsim> you could just use Nim stable/0.18.0 until the end of the week ;)
12:57:22FromGitter<mratsim> though 0.19.0 is coming soon.
12:57:35PMunchretsyo, after commenting out getMode in the latest commit of wxnim I was able to compile and run it on Linux
12:57:40PMunchUsing the latest devel version
12:58:50dom96huh, number of new issues/PRs has slown down significantly over the past few days
12:58:58dom96Wonder what's going on
13:03:45FromGitter<retsyo> $ nim --version ⏎ Nim Compiler Version 0.18.1 [Windows: amd64] ⏎ Compiled at 2018-08-18 ⏎ ⏎ $ nim cpp --define:wxWidgetsPath=/E/msys64/home/LOVLJIDY/wxWidgets --define:gcc example1.nim ... [https://gitter.im/nim-lang/Nim?at=5b7abc307a17864125513bed]
13:04:35*endragor quit (Remote host closed the connection)
13:05:01FromGitter<retsyo> `string = nil` should be `string = ""`
13:05:04*TheLemonMan joined #nim
13:07:16PMunchif infix[0].ident == !"%":
13:07:25PMunchShould that become: if $infix[0] == "%":
13:10:01*couven92 joined #nim
13:10:13FromGitter<retsyo> I changed line 67 in wxCompile.nim to `{.passC: "-I\"" & (wxWidgetsLibPath / "mswu") & "\"".}`, the original is {.passC: "/I\"" & (wxWidgetsLibPath / "mswu") & "\"".}
13:10:40TheLemonManhmm, what's the right ™
13:10:54TheLemonManway to count the arguments of a FormalParams node?
13:11:04FromGitter<retsyo> nim stucks at `CC: stdlib_dynlib` again
13:11:29PMunchretsyo, sure that it's stuck?
13:13:43FromGitter<retsyo> during the day, I begin to compile at about 13:00, it does not go further on `CC: stdlib_dynlib` even 20:00
13:15:21FromGitter<retsyo> now it display the same `CC: stdlib_dynlib` and does not go
13:16:51FromGitter<retsyo> let me recompile wxwindows
13:18:27TheLemonMancool, lib/pure/collections is not covered by testament and has some failing bits
13:19:04*data-man joined #nim
13:23:02FromGitter<tim-st> Anyone knows Ruby and can confirm that a non-default parameter can follow a default one in Ruby, like: `proc test(a: int, b = 2, c: string): int` as ruby syntax works?
13:27:41*endragor joined #nim
13:27:42PMunchtim-st, I think so, but once you have one default parameter you need to qualify all parameters every time you call it IIRC
13:28:08FromGitter<tim-st> I just tried it, and it works in Ruby
13:28:18stefanos82@tim-st: from what I can see online, it's the same as Python's
13:28:27FromGitter<tim-st> No, Python doesnt allows it
13:28:34stefanos82are you sure?
13:28:50FromGitter<tim-st> ```def test(a, b=2, c) ⏎ puts "The programming language is #{a}" ⏎ end``` [https://gitter.im/nim-lang/Nim?at=5b7ac212dd0b74601e332fa9]
13:29:27stefanos82@tim-st: the order matters
13:29:44FromGitter<tim-st> ```def test(a,b=1, c): pass``` ⏎ ⏎ SyntaxError: non-default argument follows default argument [https://gitter.im/nim-lang/Nim?at=5b7ac248802bc42c5f45f92d]
13:30:17stefanos82@tim-st: try def test(a, c, b=1): pass
13:30:51FromGitter<tim-st> yes, that works, but the question was, which languages allow a nondefault after a default
13:32:29*endragor quit (Ping timeout: 268 seconds)
13:32:33FromGitter<retsyo> https://ruby.github.io/TryRuby/ says ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7ac2f1a158fd0ea3842f86]
13:33:52FromGitter<tim-st> ruby needs `end`?
13:34:04FromGitter<mratsim> yeah, the horror
13:34:23FromGitter<retsyo> ```def test(a, b=1, c) ⏎ puts "The programming language is #{a}" ⏎ end ⏎ ⏎ print test(1)``` [https://gitter.im/nim-lang/Nim?at=5b7ac35fe026575f0f9c3107]
13:35:30FromGitter<tim-st> maybe your website is a javascript ruby interpreter with incorrect implementation instead of the real ruby
13:37:15FromGitter<retsyo> I don't know. the url is on the main page of https://www.ruby-lang.org/en/
13:40:15*Paul_ quit (Ping timeout: 252 seconds)
13:41:31*data-man quit (Quit: Konversation terminated!)
14:03:39PMunch@retsyo, just pushed a fix that makes it work on devel (at least on Linux)
14:38:52AraqPMunch: I'll make you an owner of wxnim
14:39:15AraqI can't review your PRs, there is too much going on.
14:39:27FromGitter<alehander42> i think normal arg after keyword arg is confusing
14:40:26FromGitter<alehander42> even if it exists in another lang
14:40:56TheLemonManI'm quite happy with this microbenchmark thingie, I now need some guinea pig..err users
14:42:01TheLemonManthe output format is a bit messy, I'll probably tabulate everything and call it a day
14:43:51PMunchAraq, my wxnim fork is 49 commits ahead of yours
14:44:02PMunchI thought it was just accepted that I was now maintaining it :P
14:44:48TheLemonManmiran, if you're still interested in some more numpy-in-nim stuff I also wrote a small arraymancer-to-numpy wrapper
14:47:54PMunchTheLemonMan, maybe take a page from chronicles book?
14:48:16TheLemonManPMunch, chronicles book? what's that?
14:48:56PMunchhttps://github.com/status-im/nim-chronicles
14:49:15PMunch"take a page from x's book" is a saying
14:49:30PMunchLike borrowing a feature from something
14:50:00PMunchBasically have a structured format you output thing in, and then a pretty printer as an option
14:50:10PMunchMakes it super easy to integrate into tools
14:50:11*PMunch quit (Quit: Leaving)
14:58:40*SenasOzys__ joined #nim
14:59:26AraqPMunch: then why do I get to review PRs from you?
15:01:55FromGitter<retsyo> I think I'd better keep my nim run over the whole night. I will report whether the examples from wxnim can be compiled tommorow
15:05:45Araqhuh? if it got stuck, you know after a couple of minutes
15:05:52Araqyou don't have to keep running it
15:05:57Araqkill it.
15:06:23Araqit's probably bug https://github.com/nim-lang/Nim/issues/8648
15:10:31FromGitter<retsyo> yes, I think it got stuck. and the `--passC:-w` does not works too
15:12:22FromDiscord<treeform> I am having this issue as well. But second recompile usually works. I though it was some sort of file is "locked" on windows thing.
15:14:37shashlick@retsyo: check to see if 0.17.2 works
15:15:10shashlickif you check process explorer and kill the cc1 process, it will print out the error
15:15:57*SenasOzys__ quit (Ping timeout: 240 seconds)
15:16:38*SenasOzys quit (Ping timeout: 272 seconds)
15:18:10FromDiscord<treeform> ill try next time it looks up
15:18:17FromDiscord<treeform> its only happens about 5% of the time
15:19:35FromDiscord<treeform> Do you guys know if there is a way to get the git hash during compile?
15:19:50FromDiscord<treeform> some sort of readStaticExecute ?
15:20:41dom96staticExec
15:20:54Araq const gitHash = gorge("git log -n 1 --format=%H").strip
15:21:01Araqis what the compiler itself uses
15:21:42TheLemonManwhat does it take to be "unmoderated" on the forums?
15:25:49Araqan admin reading the post and unmoderate the user
15:26:47FromDiscord<treeform> wow thanks!
15:27:26*data-man joined #nim
15:33:08FromGitter<retsyo> when I kill `cc1plus.exe`, `g++.exe`, I get `E:/msys64/home/LOVLJIDY/wxWidgets\include/wx/chkconf.h:88:9: error: #error "wxUSE_ANY must be defined, please read comment near the top of this file."`. Does this effect? how can I pass a valid wxUSE_ANY to nim command-line?
15:38:09shashlick`--passC:-DwxUSE_ANY` or `{.passC: "-DwxUSE_ANY".}`
15:38:23shashlickcommand line or in file pragma
15:39:07FromGitter<mratsim> probably in file pragma, cli parameters are annoying because all users of the lib must not forget to use them
15:39:35TheLemonManshashlick, #8692 for you
15:41:12shashlickbrilliant
15:43:06*Trustable joined #nim
15:45:28*nsf joined #nim
15:48:55FromDiscord<treeform> Has any one tried three way merge with generated code? Have old generated, new generated and user edited file.
15:49:38FromDiscord<treeform> When new changes happen in new generated file, diff it against old generated file to find things that changed, and spice user edited stuff in automatically?
15:51:04shashlick@TheLemonMan: https://github.com/genotrance/nimgen/issues/36
15:52:28TheLemonManif you're really keen on supporting old versions you could try sorting the declarations by performing a topological sort
15:55:54*captainkraft quit (Ping timeout: 272 seconds)
15:59:03shashlickThat would have to happen within c2nim since nimgen is not parsing anything
16:05:30dom96shashlick: hey. So I'm finally working on nimble and reviewing your PR properly.
16:06:21*NimBot joined #nim
16:06:28dom96I think running `before install` after dependencies are installed might be surprising
16:06:48dom96Wouldn't a good workaround be to simply run `nimble install nimgen` in `before install`?
16:09:39shashlickwould that be in the nimble file?
16:10:14FromGitter<mratsim> @treeform I didn’t adventure into that minefield I’m monkey-patching using nimgen pattern matching: https://github.com/numforge/nim-clblast/blob/master/clblast_nimgen.cfg#L44-L96
16:10:25dom96before install: exec "nimble install nimgen"; exec "nimgen ..."
16:10:38dom96well, `nimble install -y nimgen`
16:10:41*wildlander joined #nim
16:11:08shashlickso then the wrapper would no longer have to state the nimgen dependency, just run the install before execution
16:11:23shashlickare we good with running multiple nimble installs in parallel?
16:11:32dom96it should still specify it
16:11:49*SenasOzys joined #nim
16:11:57*SenasOzys__ joined #nim
16:12:09shashlickdo why do you feel that dependencies should happen after `before install`?
16:12:40dom96because it's "before install", not "before install-but-after-dependency-install"
16:12:50dom96It's simpler this way
16:13:27shashlickwell, in my mind you declare dependencies first and then your tasks so i'd think dependencies should be done before any tasks are considered
16:14:29shashlickit may be simpler but what you are proposing is a workaround
16:14:31dom96I don't follow. That's just a specification detail. The fact is that `before` means "before this task runs"
16:14:39dom96The "install" task includes dependency resolution
16:15:00shashlickright and a task is a part of a package and a package has dependencies, not the task
16:15:07FromGitter<mratsim> nimble install -dy will pull dependencies
16:16:06shashlickso nimgen is just one example, if we have other dependencies on tools for nimble packages, they would have to do this same thing
16:16:13FromGitter<mratsim> I’d like “build dependencies” in nimble though
16:16:46shashlicka dependency should be taken care of before anything in the package is handled
16:18:05dom96I can see what you're saying
16:18:10FromGitter<mratsim> For example I’d like to specify quicktest as a build dependency https://github.com/alehander42/nim-quicktest to ensure I test as much as possible during CI, but I don’t want to have it as a hard dependency otherwise
16:18:21dom96Implementation-wise it makes things more complicated
16:18:27dom96It's also invisible to the user
16:18:58shashlickyes but it is a workaround for package creators who are also users
16:19:53dom96I would be more inclined to implement a special "DependencyResolution" task, and allow `after DependencyResolution`
16:20:49dom96What do you think about that?
16:21:22shashlickwhere would it plug in in the code? will it be simpler?
16:21:57*Perkol joined #nim
16:23:50shashlickI don't know how much easier that would be since this would still have to happen after `before install` but before the `install` task and `before install` is a hook itself
16:24:01shashlickbasically an `after before install`
16:24:24dom96yes, but that would have the advantage that it would be clearer to the user
16:25:20dom96Plus, `install` isn't the only task that performs dependency resolution
16:25:30dom96`develop` is there too
16:25:41dom96so you'd need to add a `before develop` for nimgen users too
16:25:55dom96It makes sense to have a single task for this
16:26:14shashlickthat's why I feel dependencies should happen before anything in the package
16:26:26dom96And the code that nimgen generates can be considered a dependency, so it's like an additional dependency that just happens to be generated instead of downloaded.
16:27:21dom96No. I don't think that should be the case. There are plenty of things that can be done with no need for dependency resolution
16:28:11shashlickcan you give me some examples?
16:28:49dom96`nimble tasks`
16:28:53dom96`nimble dump`
16:30:59shashlickshouldn't the flow look something like this: https://pastebin.com/YKnL6bmw
16:31:23*PrimHelios joined #nim
16:31:34dom96What if my task needs to modify the dependencies?
16:31:49*druonysus joined #nim
16:31:50*druonysus quit (Changing host)
16:31:50*druonysus joined #nim
16:33:26dom96Perhaps tasks should support dependencies of their own
16:33:46dom96before install: requires "nimgen"; exec "nimgen ..."
16:33:51dom96And then it's really clear what is happening
16:34:14shashlickwhat do you mean by "modify dependencies"?
16:34:41shashlickthey are declared at the top, why would the task influence it?
16:37:42shashlickanother question around foreign dependencies - does that happen before `before install` or as part of standard dependencies? https://github.com/nim-lang/nimble#external-dependencies
16:38:35dom96Yeah, I think you're right. I can't think of a case where a task will need to remove dependencies before they are installed
16:39:06*Jesin joined #nim
16:39:11shashlickso dependencies can be treated as "package dependencies" and not "task dependencies" - a global requirement before you do anything with the package
16:39:14*captainkraft joined #nim
16:40:04dom96Yes, but then we should be installing dependencies before any task is run
16:40:24dom96I worry that might be annoying
16:40:44shashlickyes that's where I'm going with this - i think part of the challenge is that the package needs to be downloaded before you even know the dependencies
16:41:15shashlickevery package manager first installs dependencies before installing the final package
16:41:47shashlickbut ya I agree that the definition of `before install` is open to either interpretation
16:42:11dom96I think performing dependency resolution before every task will cause serious performance problems
16:42:27dom96For example, let's say you have a `test` task which runs `nimble c -r tester`
16:42:39dom96Nimble will perform dependency resolution twice
16:42:42shashlickit shouldn't be before every task, it should be once for a package
16:43:02*Perkol quit (Quit: Leaving)
16:43:07dom96nimble has no way of knowing whether dependency resolution already took place in that use case
16:43:32shashlickwe cannot save a state?
16:43:43dom96I bet there are plenty of tasks written by users which do not care about dependencies
16:44:00dom96We can but that would make things really complex
16:44:05dom96Where would we save it?
16:44:24dom96How do invalidate it?
16:44:27shashlickbut that's the first if-condition - if a task doesn't require dependencies, you don't need to process them
16:44:28dom96*do we
16:44:47shashlickwe know which tasks require dependencies installed - that's only done when you are first installing a package
16:45:00dom96no, when you are installing a package
16:45:05dom96there is no "first"
16:45:58shashlickwhy does `nimble c` need to check dependencies?
16:46:14dom96because dependencies could have been removed
16:46:22dom96because `install` might have never been executed
16:46:55shashlickthen we have to check dependencies every time - I don't understand
16:47:04shashlickdependencies cannot be removed since nimble complains
16:47:09shashlickthat something depends on it
16:47:14dom96I'm liking the idea of task-specific dependencies more and more. Mainly because it naturally follows for the `test` task (which is what mratsim was asking for with "build dependencies", I think that's a bad name btw)
16:47:17shashlickbut ya, someone could go and delete a directory from ~/.nimble
16:47:35shashlickwhen you say install might not be executed, I presume you mean a local git repo that's being worked on
16:47:58dom96.nimble files evolve
16:48:08dom96a dependency could have been added
16:48:09dom96or removed
16:48:21dom96That's why dependencies should always be checked
16:48:50dom96It's impractical for Nimble to keep track of modification times and to assume that a user would never manually remove a dependency
16:49:43shashlickokay that's fair - then I'm lost - why is doing dependencies before `before install` not feasible? that's the original question. I don't think I was pushing for not checking dependencies
16:50:59dom96It's feasible, but it's a special rule just for the `install`
16:52:28dom96And like I said, for your use case it's not enough
16:52:55dom96You would need to do the same for `develop` and then introduce a `before develop` task which is just a copy of the `before install` task. That would suck.
16:53:51dom96It would be far handier if Nimble let's you hook into a "after dependencies are processed" task
16:54:10dom96semantically it makes more sense and is future proof
16:54:29FromGitter<mratsim> oh yeah task specific dependencies please
16:54:45Araqcan't the nimble file instead do more of Nimble's job?
16:55:01shashlickaraq: that's what dom96 proposed
16:55:03dom96mratsim: do you have any interesting use cases for those?
16:55:26shashlickdom96: why is this a special case for install and develop only?
16:55:30Araqshashlick: maybe
16:55:35FromGitter<mratsim> Testing ⏎ Testing on OpenCL ⏎ Testing on Cuda
16:55:43FromGitter<mratsim> Fuzzing
16:56:09dom96Araq: You probably mean that Nimble should expose `processDeps`, `copyPackage` etc. and a default "install" task should use these to recreate what the `install` proc currently does in nimble.nim
16:56:45dom96That was the `install` task could be overridden like so: task install: processDeps(); exec "nimgen"; copyPackage()
16:56:59dom96*that way
16:57:09AraqI don't know what I really mean. ideally Nimble would be a library for the Nimble *programs*
16:57:15dom96yep
16:57:25Araqok cool.
16:57:28*Trustable quit (Remote host closed the connection)
16:57:33shashlickhonestly I don't get it - all this is just more complicated
16:57:37dom96That's more work but would be much more flexible
16:57:51*data-man quit (Quit: Konversation terminated!)
16:57:57shashlickyou have dependencies, you first do that, like a depth first
16:58:46shashlickafter deps are installed once, it takes a couple seconds to check
16:59:20shashlickgiving you assurance that someone didn't break/delete something
16:59:46dom96Araq: And now I'm thinking that would make separating Nimble and Nim much more difficult, so many different things to take into consideration :(
17:01:41dom96shashlick: To be honest, in regards to the global "package dependencies" I think it makes sense to think of them as a list of packages that are required to build the package.
17:01:49dom96Not to /install/ the package
17:02:18dom96specifying `requires "nimgen` inside `before install` would make it completely clear that `nimgen` is required to install the package
17:02:30dom96But after the installation is complete, `nimgen` is no longer required
17:02:40dom96Because I can build the package without it
17:05:43dom96Does that make sense?
17:07:51shashlickthey could also be required to install the package - i don't see the harm in lumping all dependencies into one category
17:07:58*Mat4 joined #nim
17:08:39shashlickit's totally fine what you are proposing, even the original workaround will send me on my merry way, but it's just a question of simplifying the architecture
17:09:01Araqdom96: in the end I think 'nake' got this right. build an exe and cache it to do the build. the full power of Nim for your build and dependency management. and Nimble is the library the build program uses
17:09:29*Mat4 quit (Client Quit)
17:09:43shashlick`requires "nimgen"` and `before deps` both are additional work for, in my opinion, limited benefit and not adding more clarity
17:09:59shashlicka dependency is a dependency, why should nimble get into understanding all these nuances
17:10:09dom96Nimble will need to anyway
17:10:15dom96For `test` dependencies at least
17:10:34Araqbut what shashlick says also makes sense, just install the deps
17:11:02shashlickonce it is installed, you are done, where they are used, how they are used, that's the package maintainer's problem
17:11:12dom96And I just realised that mratsim submitted a feature request to have task-level `requires`. Totally forgot about that and managed to get to the same conclusion, so there is surely some merit to this :)
17:12:44shashlicklooks like @mratsim already tried your proposed workaround and it didn't work - https://github.com/nim-lang/nimble/issues/482#issuecomment-386235338
17:12:58dom96yeah, I wonder why
17:13:45dom96oh, I know why. That wouldn't affect nimgen
17:14:22*Jesin quit (Read error: Connection reset by peer)
17:14:42shashlicknope, went into an infinite lop
17:15:08shashlicksince i'm in a folder with a nimble file, it calls the file instead of installing nimgen
17:15:20shashlickwhich calls itself and on and on
17:15:23dom96huh?
17:15:28dom96What's your code?
17:16:23shashlick```
17:16:23shashlickbefore install:
17:16:25shashlick exec "nimble install nimgen -y"
17:16:26shashlick exec "nimgen nimscintilla.cfg"
17:16:27shashlick```
17:16:37shashlicki'm in the git repo directory so local code
17:16:48dom96oh lol
17:17:05dom96So it calls the `install` task even when you're installing a different package
17:17:13shashlickyes
17:17:15dom96I'd say that's another bug
17:17:42dom96Can you report it?
17:18:12shashlickokay
17:21:11dom96I explained why the workaround failed for mratsim here: https://github.com/nim-lang/nimble/issues/482#issuecomment-414395482
17:23:53shashlickjust reported https://github.com/nim-lang/nimble/issues/524
17:24:28shashlicki guess the `requires "nimgen"` is fine with me
17:24:59dom96yay
17:25:19dom96you might be able to cd someplace random and then run `nimble install nimgen -y` as a workaround
17:25:23dom96a double workaround :D
17:26:13shashlickthat's what I'm doing for now - that will work with all versions of nimble
17:26:35shashlick```
17:26:37shashlickbefore install:
17:26:37shashlick withDir "..":
17:26:37shashlick exec "nimble install nimgen -y"
17:26:37shashlick exec "nimgen nimscintilla.cfg"
17:26:38shashlick```
17:27:11dom96great
17:27:14shashlickokay gotta drop, I have something for the nearterm, will try on all wrappers I have
17:27:22dom96see you!
17:27:28shashlickas for the PR, we can close it if you think it's not the best way to implement this
17:27:40shashlickthanks for your patience 😛
17:27:50dom96Thank you for *your* patience :)
17:28:09dom96I'll read up some more about build deps and think about how task-level deps will work with lock files
17:28:17*Jesin joined #nim
17:28:25dom96if it turns out that my plan works then I'll close your PR
17:34:25*stefanos82 quit (Quit: Quitting for now...)
17:36:22*PMunch joined #nim
17:39:35*SenasOzys__ quit (Ping timeout: 240 seconds)
17:39:35*SenasOzys quit (Ping timeout: 240 seconds)
17:41:09shashlickcool
17:41:32shashlickhow long is your focus on nimble?
17:46:38*SenasOzys joined #nim
17:46:53*SenasOzys__ joined #nim
17:50:41*Jesin quit (Remote host closed the connection)
17:52:17FromGitter<dom96> Maybe a week or so. Not sure how much time I'll get though.
17:57:07*Jesin joined #nim
18:03:12*Jesin quit (Read error: Connection reset by peer)
18:10:55krux02what does it mean that a package in ``list-packages`` is in status "obsolete"?
18:14:16FromDiscord<exelotl> oh yeah would anyone be able to help me with the thing I was wondering about yesterday? I'm not sure how to associate additional information with a type at compile time
18:14:36*TheLemonMan quit (Ping timeout: 272 seconds)
18:15:46*Jesin joined #nim
18:16:22*cornfeedhobo quit (Quit: ZNC - https://znc.in)
18:16:55FromDiscord<exelotl> e.g. var defaultNames {.compileTime.}: Table[typedesc, string]
18:18:55krux02I thought I could delete all obsolete packages, but now emacs wants to automatically delete packages I installed manually
18:19:47FromGitter<tim-st> @data-man what do you mean? https://github.com/nim-lang/Nim/pull/8690#issuecomment-414393228
18:20:38*TheLemonMan joined #nim
18:20:59FromGitter<data-man> @tim-st: download specs, parse them, generate Nim's sources.
18:21:35*druonysus quit (Ping timeout: 240 seconds)
18:22:41FromGitter<tim-st> ok, I think the current amount of entity names is sufficient though, I parsed them from a document
18:27:24*cornfeedhobo joined #nim
18:32:36*def- quit (Ping timeout: 256 seconds)
18:32:38*fredrik92 joined #nim
18:32:43*def- joined #nim
18:33:10*couven92 quit (Ping timeout: 256 seconds)
18:58:37*TheLemonMan quit (Read error: Connection reset by peer)
18:59:22*TheLemonMan joined #nim
19:01:37*vivus joined #nim
19:05:15*rayman22201 joined #nim
19:05:26*fvs quit (Remote host closed the connection)
19:07:35*rayman241 quit (Ping timeout: 240 seconds)
19:11:01vivuswhat is the preferred way to install nim now? choosenim /
19:11:05vivus*?
19:24:11FromDiscord<exelotl> it seems to be recommended quite a lot so I guess so?
19:24:57*zachk joined #nim
19:24:57FromDiscord<exelotl> (I just downloaded the windows binaries like a scrub lol)
19:25:41*zachk quit (Changing host)
19:25:41*zachk joined #nim
19:30:05*krux02 quit (Read error: Connection reset by peer)
19:31:01*krux02 joined #nim
19:43:33*xet7 quit (Quit: Leaving)
19:47:21*xet7 joined #nim
19:51:04TheLemonMandata-man, thanks for letting me notice the `dip` module was still referenced, I've pushed a fixed version
19:52:02FromGitter<data-man> No problem :)
19:52:43*shashlick_ joined #nim
19:53:38*thor77_ joined #nim
19:53:41*qwertfisch_ joined #nim
19:54:04*vivus_ joined #nim
19:54:16*nsf1 joined #nim
19:55:01TheLemonMancool, I forgot the password to the forum and the password reset form greets me with a 'unknown error occurred'
19:55:29*thor77 quit (Ping timeout: 256 seconds)
19:55:29*qwertfisch quit (Ping timeout: 256 seconds)
19:55:29*shodan45 quit (Ping timeout: 256 seconds)
19:55:29*xet7 quit (Ping timeout: 256 seconds)
19:55:29*vivus quit (Ping timeout: 256 seconds)
19:55:29*nsf quit (Ping timeout: 256 seconds)
19:55:29*shashlick quit (Ping timeout: 256 seconds)
19:56:19*xet7 joined #nim
19:56:50*thor77_ quit (Client Quit)
19:56:54*shodan45 joined #nim
19:58:41*thor77 joined #nim
19:59:03FromGitter<data-man> @TheLemonMan: What do you think about presenting the results in tabular form? As in nimbench.
20:00:29*vivus_ is now known as vivus
20:00:40TheLemonMandata-man, that's in the pipeline, right now the output is a bit hard to read
20:01:35FromGitter<data-man> For professionals :)
20:01:54TheLemonManand lazy programmers heh
20:02:46*nsf1 quit (Quit: WeeChat 2.2)
20:04:04FromGitter<data-man> BTW https://github.com/nim-lang/Nim/pull/6601
20:05:06*qwertfisch_ left #nim (#nim)
20:05:18FromGitter<dom96> TheLemomMan: bug report
20:05:25FromGitter<dom96> *TheLemonMan
20:09:42TheLemonMandom96, I just had to play a bit with Umatrix
20:10:04*noonien quit (Ping timeout: 256 seconds)
20:10:26*Amun_Ra quit (Quit: brb)
20:11:07*noonien joined #nim
20:11:11*Vladar quit (Remote host closed the connection)
20:13:23*qwertfisch joined #nim
20:13:25*Amun_Ra joined #nim
20:43:37FromGitter<dom96> Interesting. Sounds like that would be worth a bug report
20:56:42*couven92 joined #nim
21:15:58FromDiscord<treeform> dom96, do you think you or Araq will ever work on the wasm backend? Or do you think the community should do this work?
21:16:43FromDiscord<treeform> I am looking at this, but progress seems kind of slow? https://github.com/stisa/nwasm/commits/wasm
21:16:54Araqcommunity
21:20:30FromDiscord<treeform> ok
21:20:40PMunchGot the tour of Nim thing working pretty well now
21:20:58PMunchLacks content of course, but the main structure and compilation stuff is up and running
21:22:15*Jesin quit (Remote host closed the connection)
21:23:31FromGitter<zetashift> @PMunch I was actually thinking of combining nim playground and miran's book content to make a quick tour prototype
21:23:50PMunchMiran's book content?
21:24:26PMunchAh, this stuff: https://github.com/narimiran/nim-basics
21:24:34FromGitter<zetashift> YEA
21:24:36FromGitter<zetashift> whoops caps
21:24:41PMunchYeah I thought about that as well, but I'm not sure if that's too basic
21:25:11PMunchAfter all it was written to be verybasic
21:35:08*xet7 quit (Quit: Leaving)
21:37:28*PrimHelios quit (Quit: Leaving)
21:38:26*rayman217 joined #nim
21:41:53*rayman22201 quit (Ping timeout: 265 seconds)
21:42:42*xet7 joined #nim
21:43:47*cspar joined #nim
21:44:03dom96treeform: I would love to work on it if I had the time... but I've got no time, so yeah, someone else has to pick up the work :)
21:44:13dom96Seems like a fun project
21:46:30FromGitter<xmonader> interesting not api to reverse a sequence?
21:47:22*Jesin joined #nim
21:48:51FromGitter<kaushalmodi> @xmonader May be use `reverse` or `reversed`: https://nim-lang.org/docs/algorithm.html#reverse,openArray%5BT%5D ?
21:48:52*couven92 quit (Quit: Client Disconnecting)
21:50:28*PMunch quit (Remote host closed the connection)
21:51:23FromGitter<xmonader> @kaushalmodi requires casting to array correct?
21:55:09TheLemonMandom96, is it possible to get a local copy of nimforum to render the password reset page?
21:55:58dom96Sure, not hard to get it up and running https://github.com/nim-lang/nimforum#development
21:56:05FromGitter<kaushalmodi> @xmonader Honestly, I haven't checked the internal implementation, but this works: ⏎ ⏎ ```@[3, 2, 1] ⏎ @['c', 'b', 'a']``` [https://gitter.im/nim-lang/Nim?at=5b7b38f538a12915e4d16861]
21:57:32TheLemonMandom96, bleh, I didn't notice the password reset link is echoed to stdout
21:57:57dom96:)
21:58:47FromGitter<xmonader> for some reason my editor complained when i tried seen.reversed let me check if it was a glitch
21:58:49TheLemonMangotta implement another textbox so the user inputs the password twice, that's extra useful in order to avoid mistyped characters
21:59:37FromGitter<kaushalmodi> @xmonader I am using the devel version. But I don't think that should make any difference with algorithm/reversed
22:00:02dom96TheLemonMan: I don't think that's necessary
22:00:35*Jesin quit (Quit: Leaving)
22:00:41FromGitter<kaushalmodi> @xmonader Also if you are working with strings, then may be do: ⏎ ⏎ ```import algorithm, strutils ⏎ echo reversed("abc").join("") # echoes "cba"``` [https://gitter.im/nim-lang/Nim?at=5b7b3a0960f9ee7aa46a4b57]
22:00:54TheLemonMandom96, it is, trust me. I mistyped the password at least twice since I first registered :)
22:01:17TheLemonManmaybe it's just me and my (slender) fingers
22:01:47dom96You should get a password manager to type the password for you :)
22:02:37*Jesin joined #nim
22:03:30FromGitter<xmonader> @kaushalmodi thanks it worked, not sure why my editor complained
22:03:42FromGitter<xmonader> I guess i've the next nim day complete!
22:04:10FromGitter<kaushalmodi> Woohoo! :)
22:04:47TheLemonManyeah, that's something in my todo list that I've never managed to tick off
22:07:09TheLemonManthe good news is that nimforum seems to run well with the nil-str patches (with minor adjustments)
22:18:28zachkwhats the preferred or best way to use nim on windows 10?
22:21:19FromGitter<zetashift> @zachk by installing it and having fun :D
22:21:57FromGitter<zetashift> anyhow just installing the mingw zip that's listed on the website, add it's bin to the path and install nim
22:23:02zachkim using msys2, and I am having problems using either sdl2_gfx or csfml, can't find the dll's I have tried quite a few things and they don't work.
22:24:00FromGitter<zetashift> is it the correct arch?
22:24:02AlexMaxso uh
22:24:03FromGitter<zetashift> 32bit vs 64bit?
22:24:15AlexMaxI'm trying to use nim with clang on windows, and lldb ain't cooperating
22:24:52AlexMax`(lldb) b rocked.nim:100` gives me WARNING: Unable to resolve breakpoint to any actual locations.
22:25:10*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
22:27:22FromDiscord<treeform> zetashift, I could not get zip working on windows. I ended-up wrapping another library "minizip" to get zip support. I will publish it soon.
22:28:05AlexMaxHave you looked at libarchive?
22:28:34shashlick_nimarchive
22:28:41shashlick_Or nim7z
22:29:19FromDiscord<treeform> no, I was using this for networking so I need to zip small strings and send them back and forth
22:29:27FromDiscord<treeform> those seems to be for .zip and .7z files
22:29:34FromDiscord<treeform> Can I use it for small strings?
22:30:05FromDiscord<treeform> I think I ended up going with nimsnappy
22:30:17FromDiscord<treeform> but I had the zlib thing working
22:30:26FromDiscord<treeform> but I had the (mini)zlib thing working
22:30:46AlexMaxfair enough
22:31:05AlexMaxlibarchive is designed for actual archives
22:31:08FromDiscord<treeform> I recommend nimsnappy for small things to send back and forth
22:31:51AlexMaxAnd you probably don't want to "zip" small strings, you probably should be using libz itself instead
22:32:11AlexMaxerm zlib
22:32:41AlexMaxzip has a ton of headers and the concept of a directory and a lot of other stuff that you probably don't need
22:32:54AlexMaxzlib has a stream of data and that's it
22:37:14*rockcavera quit (Remote host closed the connection)
22:47:15FromDiscord<treeform> yes, but zip wraps zlib, I could not get zlib to work on windows.
22:47:36FromDiscord<treeform> I was using zlib properly I would just always get a runtime error.
22:51:42FromGitter<zetashift> @zachk I just reproduced your error and replacing 32bit sdl2_gfx with 64bit sdl2_gfx fixed it
22:52:16FromGitter<zetashift> If you want I could upload my .dll for you
22:52:40zachkyes plz, also what about the csfml, I could I have swore I installed the 64 bit version using pacman
22:52:45AlexMaxoof, lldb 64-bit is apparently not stable
22:52:51AlexMaxguess I'm installing mingw
22:52:59FromGitter<zetashift> @treeform oh damn I thought you were talking to someone else :P
22:54:25FromGitter<zetashift> @zachk https://files.fm/f/ghm9aqg7 first result on 'file upload' lol
22:57:53zachkzetashift, where do I put it?
22:59:56*rockcavera joined #nim
23:02:06zachkput it in the exe directory and it works, thank you zetashift
23:02:58AlexMaxughhhhhh, the nuklear bindings are being a pain in the neck
23:14:26*wildlander quit (Quit: Konversation terminated!)
23:18:00*krux02 quit (Remote host closed the connection)
23:23:38FromGitter<xmonader> Day 11 tell me what you guys think https://xmonader.github.io/nimdays/#cid35
23:31:07*xet7 quit (Ping timeout: 265 seconds)
23:36:21AlexMaxand I can't get the nuklear example building either
23:36:29AlexMax....and nuklear itself looks largely unmaintained
23:36:39AlexMaxam i going to have to roll my own?
23:41:04*xet7 joined #nim
23:41:19*noonien quit (Quit: Connection closed for inactivity)
23:51:02FromGitter<xmonader> is reddit/gitter down xD ?
23:59:17*zachk quit (Quit: Leaving)