<< 08-01-2017 >>

00:00:59*Trustable quit (Remote host closed the connection)
00:12:12*chemist69 quit (Ping timeout: 240 seconds)
00:12:36*yglukhov joined #nim
00:14:44*chemist69 joined #nim
00:14:49ftsf_aww, no support for getting week number in times module
00:16:39*yglukhov quit (Ping timeout: 240 seconds)
00:40:22*bjz joined #nim
00:59:05*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:03:32*space-wizard joined #nim
01:07:30*space-wizard quit (Client Quit)
01:14:36*yglukhov joined #nim
01:19:02*yglukhov quit (Ping timeout: 260 seconds)
01:35:14*dddddd quit (Remote host closed the connection)
01:54:39*Gilga joined #nim
01:59:36*Gilga quit (Ping timeout: 240 seconds)
02:09:26def-pri-pubftsf_: is there a way to get how many days have passed? Should just be a simple `<num_days> mod 7`. Would be nice to have those helpers in the standard library by default though.
02:26:59*Gilga joined #nim
02:41:11*jinshil joined #nim
02:42:15*chemist69 quit (Ping timeout: 255 seconds)
02:49:01subsetparkHow is it recommended to upgrade nimble? `nimble install nimble` fails on symlinking ~/.nimble/bin/nimble with "File exists"
02:53:50def-pri-pubUgh, dom96 says it depends on how you installed it.
02:54:29*chemist69 joined #nim
02:56:11*Gilga quit (Ping timeout: 240 seconds)
03:03:34subsetparkuh... I dunno. It was a while ago :/
04:16:27*yglukhov joined #nim
04:20:37*yglukhov quit (Ping timeout: 245 seconds)
04:35:28*devted quit (Quit: Sleeping.)
04:39:35ftsf_def-pri-pub, there's ways to calculate it, unfortunately ISO week numbers are kind of complicated
04:50:07*space-wizard joined #nim
05:36:27*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:37:46def-pri-pubI'm checking in for the night. Cya
05:38:04*def-pri-pub quit (Quit: leaving)
05:38:04*pie_ joined #nim
05:38:18*pie_ quit (Changing host)
05:38:18*pie_ joined #nim
06:18:29*yglukhov joined #nim
06:22:45*yglukhov quit (Ping timeout: 255 seconds)
06:45:59*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:46:06*bjz joined #nim
06:53:40*space-wizard joined #nim
06:58:39*nsf joined #nim
07:32:41*rokups joined #nim
07:51:53*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:56:00*Vladar joined #nim
07:56:46*subsetpark quit (Quit: Connection closed for inactivity)
08:16:22*Parashurama joined #nim
08:20:13*yglukhov joined #nim
08:24:41*yglukhov quit (Ping timeout: 255 seconds)
09:03:55*adeohluwa joined #nim
09:05:43*adeohluwa quit (Remote host closed the connection)
09:41:03*Mat4 joined #nim
09:41:47*Mat4 quit (Client Quit)
10:16:22*bjz_ joined #nim
10:17:18*bjz quit (Ping timeout: 258 seconds)
10:19:50*xet7 quit (Quit: Leaving)
10:28:18*vlad1777d joined #nim
10:54:50*couven92 joined #nim
11:03:25*benoliver999 joined #nim
11:13:37*bjz joined #nim
11:13:39*bjz_ quit (Ping timeout: 240 seconds)
11:48:17*yglukhov joined #nim
12:07:56*yglukhov quit (Remote host closed the connection)
12:08:45*Snircle joined #nim
12:10:50*yglukhov joined #nim
12:23:03*odc_ quit (Remote host closed the connection)
12:23:21*odc_ joined #nim
12:29:55*yglukhov quit (Remote host closed the connection)
12:32:42*yglukhov joined #nim
12:33:46*gangstacat joined #nim
12:40:55*nsf quit (Quit: WeeChat 1.6)
13:09:05*Gilga joined #nim
13:09:33FromGitter<rivasiv> type ⏎ spdk_event_t* = ptr spdk_event {.cdecl, importc: "spdk_event_fn", dynlib: libspdk.} ⏎ spdk_event_fn* = proc (a2: spdk_event_t) {.cdecl.} ⏎ ⏎ type ... [https://gitter.im/nim-lang/Nim?at=58723a0cc02c1a3959fe8825]
13:10:55FromGitter<rivasiv> Hi guys,
13:13:50FromGitter<rivasiv> the issue here is - It works in c , but nim gives me an error - Error: undeclared identifier: 'lib_event'
13:16:38Araqmerge the two type sections
13:17:23Araqand don't use C event libraries, use Nim's async event loop
13:19:00FromGitter<rivasiv> actually that;s part of the library I am wrapping.
13:19:48FromGitter<rivasiv> And at the moment I do not have a clear vision how to replace it with Nim's async event loop
13:20:27FromGitter<rivasiv> are there any good corresponding article ?
13:23:51*odc_ quit (Remote host closed the connection)
13:24:38Araqwhat library are you wrapping?
13:24:49FromGitter<rivasiv> spdk
13:25:33FromGitter<rivasiv> that's lib for speedup interacting with ssds
13:25:49*subsetpark joined #nim
13:26:57subsetparkdom96: any clarification on def-'s comment about upgrading nimble?
13:27:32*odc_ joined #nim
13:27:52*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:27:54Araqok, you have my consent, go on :-)
13:27:59FromGitter<rivasiv> @Araq , merge - works - Thanks -- about Nim's async event loop -- I am not sure I'll be able to do so ~ I'll need to dive into it more deeply ...
13:30:22*benoliver999 quit (Ping timeout: 258 seconds)
13:30:57FromGitter<rivasiv> @Araq Yeah I got you, -- added your comment to my todo
13:31:02FromGitter<rivasiv> thanks
13:34:49*Vladar quit (Quit: Leaving)
13:46:29dom96subsetpark: def-'s? Oh you mean def-pri-pub (two different people)
13:47:22dom96subsetpark: the version of nimble you have installed currently has a bug
13:47:29dom96Best thing to do is to reinstall it from scratch
13:50:59dom96rivasiv: no corresponding articles, for now if you want to pursue this: just ask questions here :)
13:56:43subsetparkdom96: can do. just delete ~/.nimble?
13:56:48*yglukhov quit (Remote host closed the connection)
13:57:58dom96subsetpark: well, yes, but then you will need to install Nimble from scratch (recommended way is to run ``koch nimble``)
13:58:23subsetparkfrom nim-lang, right?
13:58:35dom96hrm?
13:58:49subsetparkLike, clone the nim-lang repo?
14:00:26dom96subsetpark: which version of Nim do you have?
14:00:56subsetpark0.15.2
14:01:29dom96In that case it might be better for you to wait until we release 0.16.0 (which should happen today).
14:01:53subsetparkhey! happy news!
14:02:06subsetparkI mean, I already rm -rfed ~/.nimble, but I can probably wait a few hours...
14:06:48*yglukhov joined #nim
14:13:08*yglukhov quit (Remote host closed the connection)
14:26:12subsetparkI have a different question - what's the relationship between koch and build.sh? I want to add a --with-readline option to the homebrew recipe, to build with -d:useGnuReadline, to enable readline in `nim secret`. But the useGnuReadline flag is accepted by koch, whereas homebrew calls build.sh, which doesn't invoke koch.
14:31:56subsetpark(or for that matter useLineNoise)
14:33:00dom96build.sh compiles Nim C sources. Koch bootstraps the compiler using an older version of the compiler (which was compiled using the C sources)
14:33:41dom96You can run build.sh then koch, you only need to pass the parameters you want to koch
14:33:58dom96In most cases at least.
14:34:10dom96You can customise the C compiler that build.sh uses for example
14:35:30subsetparkoh, interesting... but that doesn't mean that if I download the tarball and run build.sh, that what shows up in bin/nim is actually an older version of the compiler, does it?
14:36:02*Trustable joined #nim
14:36:21dom96it's all relative :)
14:36:40subsetpark:/
14:36:40dom96If the C sources you get are the newest Nim version then you get the same version
14:37:06dom96For our releases you can just build the C sources
14:37:20dom96because the compiler sources included in the archive are the same version
14:37:30dom96so there is no point in using koch
14:37:59dom96but if you want -d:useGnuReadline then you need to use koch (I think)
14:38:59subsetparkyes i think that's right
14:39:51subsetparkthough actually running ./koch csource -d:useLinenoise && ./build.sh gives me an error: clang-3.9: error: no such file or directory: 'c_code/3_2/stdlib_parseutils.c'
14:41:06dom96why 'csource'?
14:41:15dom96Just use 'boot'
14:41:28dom96./koch boot -d:release -d:useLinenoise
14:45:12*Gilga quit (Ping timeout: 245 seconds)
14:46:13subsetparkhm yeah. I was defaulting to build.sh because that's what existing in homebrew. But I guess if I've already gotten into koch then no need to rely on it anymore. What's the quickest way to bootstrap koch itself, without an existing nim install? Anything quicker than ./build.sh && bin/nim c -d:release koch && ./koch boot -d:release -d:useLinenoise ?
14:47:15dom96nope
14:48:07subsetparkComputers, man.
14:48:17*abeaumont quit (Ping timeout: 248 seconds)
14:55:53*yglukhov joined #nim
15:13:02*jinshil quit (Quit: client terminated!)
15:31:02*Jesin quit (Quit: Leaving)
15:39:09FromGitter<Varriount> @rivasiv Have you tried using C2Nim in order to wrap SPDK?
15:43:03*Gilga joined #nim
15:50:31*Gilga quit (Ping timeout: 260 seconds)
15:56:54*Gilga joined #nim
16:01:01*yglukhov quit (Remote host closed the connection)
16:03:06*yglukhov joined #nim
16:13:59*nsf joined #nim
16:35:26*krux02 joined #nim
16:40:39*abeaumont joined #nim
17:00:47krux02Araq: I currently try to implement a more powerful quote, and I don't know how to do it differently than writing a macro that writes a macro that then generates the ast
17:01:26krux02but I don't know how to pass an ast from the outer macro to the inner macro, without alternating it.
17:01:59krux02I am even 100% sure if my approach works the way I think, or if an internal compiler error will stop me from doing what I want to do
17:06:17krux02Araq: is it possible to use a static block, that evaluates into a code?
17:07:31*Gilga quit (Ping timeout: 260 seconds)
17:11:30FromGitter<konqoro> Hey, I am experimenting with asyncdispatch but it seems it runs synchronously: https://gist.github.com/konqoro/7c15dba45f61a2da51708bfc95bd4fc3
17:12:09FromGitter<konqoro> What am I doing wrong?
17:17:57dom96konqoro: use asyncSleep instead of sleep
17:18:18dom96os.sleep blocks the thread
17:20:07FromGitter<konqoro> thanks will try that
17:23:01FromGitter<konqoro> @dom96 In which module is asyncSleep defined?
17:23:09dom96asyncdispatch
17:23:35dom96sorry, it's sleepAsync
17:23:54*Gilga joined #nim
17:39:38*Matthias247 joined #nim
17:44:37FromGitter<konqoro> So should I use await or asyncCheck in this case, because I read your book and this still isn't clear for me
17:46:00dom96For which case?
17:46:34dom96You should use 'await' when you want the following code to execute after the awaited future finishes.
17:47:40FromGitter<konqoro> yes right
17:48:13FromGitter<konqoro> still though it runs synchronously
17:50:47dom96oh, another problem is that infinite loop you have in there
17:50:52dom96that's blocking the thread too
17:51:11dom96Async doesn't offer parallelism
17:58:57FromGitter<konqoro> yeah the example I found was bad to begin with
18:00:59FromGitter<konqoro> luckily I finished another that works :) https://gist.github.com/konqoro/330939f5ff5c259c4604dd51cffda470
18:02:15cheatfatedom96, threads also doesn't offer parallelism
18:02:52cheatfateuntil you have only 1 cpu you always have pseudo parallelism
18:13:20dom96cheatfate: what would you say they offer then?
18:14:51cheatfatedom96, they = threads?
18:15:45dom96yes
18:17:37*def-pri-pub joined #nim
18:19:21def-pri-pubI'm working on a HTML5 Canvas Drawing package for the JavaScript target and I'm running into a bit of an issue.
18:19:45def-pri-pubI'm looking at this property of `CanvasRenderingContext2D`
18:19:47def-pri-pubhttps://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle
18:20:00def-pri-pubIt can accept a String, CanvasGradient, or CanvasPattern type.
18:20:19def-pri-pubBut looking at my current implement of CanvasRenderingContext2D:
18:20:20def-pri-pubhttps://gitlab.com/define-private-public/HTML5-Canvas-Nim/blob/381a8af6780177f7e1bbb2b30dea83b1b97bc4c6/lib/CanvasRenderingContext2D.nim#L8
18:20:41def-pri-pubI can only have it accept the string, or in this case, only solid rgb() colors.
18:21:31def-pri-pubI'd like to keep the api where someone can write `ctx.fillStyle = <WHATEVER>`, instead of having to write three overloads like `ctx.setFillStyle()` for each different type. Is there a way to do this?
18:21:45def-pri-pubOr... Am I shit out of luck right now?
18:21:50cheatfatedom96, they offer parallelism only when you have more then one cpu, otherwise they almost equal to async code
18:23:02dom96def-pri-pub: Something like: proc `fillStyle=`*(ctx: Context, value: string) = ... might work
18:23:12dom96Not sure if you can overload it
18:23:27def-pri-pubI'll try it.
18:24:06cheatfatedom96, context switching between threads and execution only 1 instruction per time, and also you got `virtual control` on context switches... in async you are switching by yourself
18:46:06*Gilga quit (Ping timeout: 240 seconds)
18:46:57*space-wizard joined #nim
19:03:24FromGitter<rivasiv> @@rivasiv Have you tried using C2Nim in order to wrap SPDK? >>> sure, but it doesn.t cover all the things
19:05:35federico3cheatfate: you mean "core" with "cpu"?
19:05:58Araqdef-pri-pub: proc fillStyle(c: Context; value string|RGB)
19:06:06cheatfatenope i mean cpu,
19:10:21def-pri-pubdome96: thanks, that actually works
19:10:26def-pri-pubdom96*
19:28:59*Gilga joined #nim
19:29:53def-pri-pubSo that works for setting values, but what about if I need to get the fillStyle andd keep the API similar (e.g. `var grad = ctx.fillStyle`). There's unfortunatley ambiguity there if it would return a string, CanvasGradient, or CanvasPattern.
19:30:29def-pri-pubSo I don't think that I can add three overloaded procs that have the same identifier but different return types...
19:30:41dom96indeed, you cannot
19:31:12def-pri-pubWelcome to JavaScript, where to the syntax is made up and the types don't matter.
19:31:21def-pri-pubT_T
19:31:42dom96Maybe what you could do is use inheritance to your advantage.
19:31:57dom96Not sure how the JS backend handles that but it might be worth a shot
19:32:14def-pri-pubDo you mean create some sort of `CanvasFillStyle` base type?
19:32:41Araqthat doesn't fix the "no overloading by only return type" restriction
19:33:20def-pri-pubYeah, I do see that. Maybe going with three separate procs with similar names might be my best bet than.
19:33:57def-pri-pubthen*
19:34:27dom96yeah, usually best not to over-engineer this stuff.
19:43:21def-pri-pubWhat would a Uint8ClampedArray correspond to in NIm?
19:43:34def-pri-pubseq[uint8]?
19:43:45Araqyeah
19:49:50*bjz joined #nim
19:56:30*yglukhov quit (Remote host closed the connection)
20:02:02*yglukhov joined #nim
20:18:09*Gilga quit (Quit: WeeChat 1.5)
20:21:26*jh32 joined #nim
20:24:54*Jesin joined #nim
20:26:19*yglukhov quit (Remote host closed the connection)
20:27:18*yglukhov joined #nim
20:31:47*yglukhov quit (Ping timeout: 248 seconds)
20:32:01*rokups quit (Quit: Connection closed for inactivity)
20:41:53FromGitter<rivasiv> @Araq @dom96 Are there any macro for c's offsetof ?? I googled , but did not found
20:43:23dom96First link on Google: http://forum.nim-lang.org/t/1588
20:43:32dom96a template, but close enough
20:44:59FromGitter<rivasiv> emm, I belive I have found some discussion where was said it will be moved into the lang ...
20:48:15Araqyeah, well. it wasn't.
20:48:43Xeyay new nim release
20:50:21FromGitter<rivasiv> got it
20:53:19*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:56:28dom96http://nim-lang.org/news/e029_version_0_16_0.html
20:56:54*dom96 quit (Changing host)
20:56:54*dom96 joined #nim
21:00:56FromGitter<rivasiv> nice
21:04:30def-pri-pubi'm trying to run `./koch update` It's not detecting the command. I tried running `./koch boot -d:release -d:withUpdate` but that didn't help it.
21:04:46Araqthat got removed.
21:05:06def-pri-pubbut: http://nim-lang.org/docs/koch.html#commands-update-command
21:05:14def-pri-pubtop of page "v0.16.0"
21:05:50def-pri-pubSo do I need to pull the csources and nim directory, and run `koch boot -d:release` again to update?
21:06:37dom96docs become outdated
21:06:45dom96and yes
21:06:59dom96you might not have to pull the c sources
21:07:24Araqin fact, I need to push the csources :-)
21:08:21def-pri-pubAraq pls
21:17:16dom96'night
21:24:47Araqdef-pri-pub: what?
21:26:48*Mat4 joined #nim
21:28:24def-pri-pubnevermind
21:30:50def-pri-pubI tried pulling down a fresh copy of csources and I'm getting this error when running `build.sh`:
21:30:56def-pri-pubgcc: error: c_code/2_2/compiler_modulegraphs.c: No such file or directory
21:30:57def-pri-pubgcc: fatal error: no input files
21:31:30def-pri-pubI think you forgot to push a file
21:32:52Araqlet's see
21:33:51*bjz joined #nim
21:36:12*devted joined #nim
21:37:00*Ven joined #nim
21:40:12*bjz quit (Ping timeout: 245 seconds)
21:42:36*odc_ quit (Remote host closed the connection)
21:44:12Araqdef-pri-pub: please try again
21:44:27Araq(why did this happen? it's all automated ... oh well)
21:47:20*bjz joined #nim
21:49:49def-pri-pubAraq, now I'm getting linking errors
21:50:03def-pri-pubhttp://pastebin.com/Dq7J24vK
21:50:47*jinshil joined #nim
21:51:11*bjz quit (Client Quit)
21:51:38*Ven quit (Ping timeout: 240 seconds)
21:54:37Mat4def-pri-pub: Looks like a library or prior compiled source file is not linked
21:55:14*Ven joined #nim
21:56:05Araqdef-pri-pub: dunno, can reproduce though
21:56:17Araqtry the tar.xz for now, that's known to work
21:57:14Mat4by the way,
21:58:17Mat4Araq: What is required to temporary disable GC ?
21:58:28AraqGC_disable()
21:58:36Mat4thanks
22:03:54def-pri-pubAraq: Nope, not even the .tar.gz release works. I
22:04:00def-pri-pubLooks like the same linking error
22:09:48Araq./build.sh works for me for the tar.xz
22:09:56Araqbut csources indeed fails
22:10:17def-pri-pubHold on, I'm testing a fresh install in a GCE VM
22:14:17def-pri-pubYeah, linking fails too
22:14:54def-pri-pubSomething in csources is bunk. I'm not sure what though.
22:15:21AraqI do know
22:15:24AraqI diffed it
22:15:34Araqit's full of old cruft
22:16:21def-pri-pubI'm taking a nap, I'll be back later
22:16:27*def-pri-pub is now known as def-pri-pub|afk
22:19:21*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:22:48*Mat4 left #nim ("Leaving")
22:28:59*yglukhov joined #nim
22:32:00*Matthias247 quit (Read error: Connection reset by peer)
22:33:23*yglukhov quit (Ping timeout: 248 seconds)
22:36:48Araqok, turns out os.copyDir doesn't work -.-
22:37:04Araqat least not in the way koch.nim uses it
22:37:12Araqcausing my csources push to fail
22:41:16Araqdef-pri-pub|afk: csources now work for me. good night.
22:54:38*PMunch joined #nim
23:05:12*Jessin joined #nim
23:05:59*Jesin quit (Read error: Connection reset by peer)
23:08:10*Trustable quit (Remote host closed the connection)
23:11:26*Jessin is now known as Jesin
23:14:15*vlad1777d quit (Remote host closed the connection)
23:18:27*jinshil quit (Quit: client terminated!)
23:30:41*yglukhov joined #nim
23:30:46*ftsf joined #nim
23:32:13*couven92 quit (Quit: Good Night!)
23:35:01*yglukhov quit (Ping timeout: 255 seconds)
23:36:05*nsf quit (Quit: WeeChat 1.6)
23:40:00*jinshil joined #nim
23:48:57*odc quit (Quit: Connection closed for inactivity)