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:49 | ftsf_ | 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:26 | def-pri-pub | ftsf_: 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:01 | subsetpark | How is it recommended to upgrade nimble? `nimble install nimble` fails on symlinking ~/.nimble/bin/nimble with "File exists" |
02:53:50 | def-pri-pub | Ugh, 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:34 | subsetpark | uh... 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:35 | ftsf_ | 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:46 | def-pri-pub | I'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:33 | FromGitter | <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:55 | FromGitter | <rivasiv> Hi guys, |
13:13:50 | FromGitter | <rivasiv> the issue here is - It works in c , but nim gives me an error - Error: undeclared identifier: 'lib_event' |
13:16:38 | Araq | merge the two type sections |
13:17:23 | Araq | and don't use C event libraries, use Nim's async event loop |
13:19:00 | FromGitter | <rivasiv> actually that;s part of the library I am wrapping. |
13:19:48 | FromGitter | <rivasiv> And at the moment I do not have a clear vision how to replace it with Nim's async event loop |
13:20:27 | FromGitter | <rivasiv> are there any good corresponding article ? |
13:23:51 | * | odc_ quit (Remote host closed the connection) |
13:24:38 | Araq | what library are you wrapping? |
13:24:49 | FromGitter | <rivasiv> spdk |
13:25:33 | FromGitter | <rivasiv> that's lib for speedup interacting with ssds |
13:25:49 | * | subsetpark joined #nim |
13:26:57 | subsetpark | dom96: 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:54 | Araq | ok, you have my consent, go on :-) |
13:27:59 | FromGitter | <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:57 | FromGitter | <rivasiv> @Araq Yeah I got you, -- added your comment to my todo |
13:31:02 | FromGitter | <rivasiv> thanks |
13:34:49 | * | Vladar quit (Quit: Leaving) |
13:46:29 | dom96 | subsetpark: def-'s? Oh you mean def-pri-pub (two different people) |
13:47:22 | dom96 | subsetpark: the version of nimble you have installed currently has a bug |
13:47:29 | dom96 | Best thing to do is to reinstall it from scratch |
13:50:59 | dom96 | rivasiv: no corresponding articles, for now if you want to pursue this: just ask questions here :) |
13:56:43 | subsetpark | dom96: can do. just delete ~/.nimble? |
13:56:48 | * | yglukhov quit (Remote host closed the connection) |
13:57:58 | dom96 | subsetpark: well, yes, but then you will need to install Nimble from scratch (recommended way is to run ``koch nimble``) |
13:58:23 | subsetpark | from nim-lang, right? |
13:58:35 | dom96 | hrm? |
13:58:49 | subsetpark | Like, clone the nim-lang repo? |
14:00:26 | dom96 | subsetpark: which version of Nim do you have? |
14:00:56 | subsetpark | 0.15.2 |
14:01:29 | dom96 | In that case it might be better for you to wait until we release 0.16.0 (which should happen today). |
14:01:53 | subsetpark | hey! happy news! |
14:02:06 | subsetpark | I 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:12 | subsetpark | I 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:56 | subsetpark | (or for that matter useLineNoise) |
14:33:00 | dom96 | build.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:41 | dom96 | You can run build.sh then koch, you only need to pass the parameters you want to koch |
14:33:58 | dom96 | In most cases at least. |
14:34:10 | dom96 | You can customise the C compiler that build.sh uses for example |
14:35:30 | subsetpark | oh, 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:21 | dom96 | it's all relative :) |
14:36:40 | subsetpark | :/ |
14:36:40 | dom96 | If the C sources you get are the newest Nim version then you get the same version |
14:37:06 | dom96 | For our releases you can just build the C sources |
14:37:20 | dom96 | because the compiler sources included in the archive are the same version |
14:37:30 | dom96 | so there is no point in using koch |
14:37:59 | dom96 | but if you want -d:useGnuReadline then you need to use koch (I think) |
14:38:59 | subsetpark | yes i think that's right |
14:39:51 | subsetpark | though 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:06 | dom96 | why 'csource'? |
14:41:15 | dom96 | Just use 'boot' |
14:41:28 | dom96 | ./koch boot -d:release -d:useLinenoise |
14:45:12 | * | Gilga quit (Ping timeout: 245 seconds) |
14:46:13 | subsetpark | hm 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:15 | dom96 | nope |
14:48:07 | subsetpark | Computers, 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:09 | FromGitter | <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:47 | krux02 | Araq: 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:26 | krux02 | but I don't know how to pass an ast from the outer macro to the inner macro, without alternating it. |
17:01:59 | krux02 | I 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:17 | krux02 | Araq: is it possible to use a static block, that evaluates into a code? |
17:07:31 | * | Gilga quit (Ping timeout: 260 seconds) |
17:11:30 | FromGitter | <konqoro> Hey, I am experimenting with asyncdispatch but it seems it runs synchronously: https://gist.github.com/konqoro/7c15dba45f61a2da51708bfc95bd4fc3 |
17:12:09 | FromGitter | <konqoro> What am I doing wrong? |
17:17:57 | dom96 | konqoro: use asyncSleep instead of sleep |
17:18:18 | dom96 | os.sleep blocks the thread |
17:20:07 | FromGitter | <konqoro> thanks will try that |
17:23:01 | FromGitter | <konqoro> @dom96 In which module is asyncSleep defined? |
17:23:09 | dom96 | asyncdispatch |
17:23:35 | dom96 | sorry, it's sleepAsync |
17:23:54 | * | Gilga joined #nim |
17:39:38 | * | Matthias247 joined #nim |
17:44:37 | FromGitter | <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:00 | dom96 | For which case? |
17:46:34 | dom96 | You should use 'await' when you want the following code to execute after the awaited future finishes. |
17:47:40 | FromGitter | <konqoro> yes right |
17:48:13 | FromGitter | <konqoro> still though it runs synchronously |
17:50:47 | dom96 | oh, another problem is that infinite loop you have in there |
17:50:52 | dom96 | that's blocking the thread too |
17:51:11 | dom96 | Async doesn't offer parallelism |
17:58:57 | FromGitter | <konqoro> yeah the example I found was bad to begin with |
18:00:59 | FromGitter | <konqoro> luckily I finished another that works :) https://gist.github.com/konqoro/330939f5ff5c259c4604dd51cffda470 |
18:02:15 | cheatfate | dom96, threads also doesn't offer parallelism |
18:02:52 | cheatfate | until you have only 1 cpu you always have pseudo parallelism |
18:13:20 | dom96 | cheatfate: what would you say they offer then? |
18:14:51 | cheatfate | dom96, they = threads? |
18:15:45 | dom96 | yes |
18:17:37 | * | def-pri-pub joined #nim |
18:19:21 | def-pri-pub | I'm working on a HTML5 Canvas Drawing package for the JavaScript target and I'm running into a bit of an issue. |
18:19:45 | def-pri-pub | I'm looking at this property of `CanvasRenderingContext2D` |
18:19:47 | def-pri-pub | https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle |
18:20:00 | def-pri-pub | It can accept a String, CanvasGradient, or CanvasPattern type. |
18:20:19 | def-pri-pub | But looking at my current implement of CanvasRenderingContext2D: |
18:20:20 | def-pri-pub | https://gitlab.com/define-private-public/HTML5-Canvas-Nim/blob/381a8af6780177f7e1bbb2b30dea83b1b97bc4c6/lib/CanvasRenderingContext2D.nim#L8 |
18:20:41 | def-pri-pub | I can only have it accept the string, or in this case, only solid rgb() colors. |
18:21:31 | def-pri-pub | I'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:45 | def-pri-pub | Or... Am I shit out of luck right now? |
18:21:50 | cheatfate | dom96, they offer parallelism only when you have more then one cpu, otherwise they almost equal to async code |
18:23:02 | dom96 | def-pri-pub: Something like: proc `fillStyle=`*(ctx: Context, value: string) = ... might work |
18:23:12 | dom96 | Not sure if you can overload it |
18:23:27 | def-pri-pub | I'll try it. |
18:24:06 | cheatfate | dom96, 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:24 | FromGitter | <rivasiv> @@rivasiv Have you tried using C2Nim in order to wrap SPDK? >>> sure, but it doesn.t cover all the things |
19:05:35 | federico3 | cheatfate: you mean "core" with "cpu"? |
19:05:58 | Araq | def-pri-pub: proc fillStyle(c: Context; value string|RGB) |
19:06:06 | cheatfate | nope i mean cpu, |
19:10:21 | def-pri-pub | dome96: thanks, that actually works |
19:10:26 | def-pri-pub | dom96* |
19:28:59 | * | Gilga joined #nim |
19:29:53 | def-pri-pub | So 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:29 | def-pri-pub | So I don't think that I can add three overloaded procs that have the same identifier but different return types... |
19:30:41 | dom96 | indeed, you cannot |
19:31:12 | def-pri-pub | Welcome to JavaScript, where to the syntax is made up and the types don't matter. |
19:31:21 | def-pri-pub | T_T |
19:31:42 | dom96 | Maybe what you could do is use inheritance to your advantage. |
19:31:57 | dom96 | Not sure how the JS backend handles that but it might be worth a shot |
19:32:14 | def-pri-pub | Do you mean create some sort of `CanvasFillStyle` base type? |
19:32:41 | Araq | that doesn't fix the "no overloading by only return type" restriction |
19:33:20 | def-pri-pub | Yeah, I do see that. Maybe going with three separate procs with similar names might be my best bet than. |
19:33:57 | def-pri-pub | then* |
19:34:27 | dom96 | yeah, usually best not to over-engineer this stuff. |
19:43:21 | def-pri-pub | What would a Uint8ClampedArray correspond to in NIm? |
19:43:34 | def-pri-pub | seq[uint8]? |
19:43:45 | Araq | yeah |
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:53 | FromGitter | <rivasiv> @Araq @dom96 Are there any macro for c's offsetof ?? I googled , but did not found |
20:43:23 | dom96 | First link on Google: http://forum.nim-lang.org/t/1588 |
20:43:32 | dom96 | a template, but close enough |
20:44:59 | FromGitter | <rivasiv> emm, I belive I have found some discussion where was said it will be moved into the lang ... |
20:48:15 | Araq | yeah, well. it wasn't. |
20:48:43 | Xe | yay new nim release |
20:50:21 | FromGitter | <rivasiv> got it |
20:53:19 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:56:28 | dom96 | http://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:56 | FromGitter | <rivasiv> nice |
21:04:30 | def-pri-pub | i'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:46 | Araq | that got removed. |
21:05:06 | def-pri-pub | but: http://nim-lang.org/docs/koch.html#commands-update-command |
21:05:14 | def-pri-pub | top of page "v0.16.0" |
21:05:50 | def-pri-pub | So do I need to pull the csources and nim directory, and run `koch boot -d:release` again to update? |
21:06:37 | dom96 | docs become outdated |
21:06:45 | dom96 | and yes |
21:06:59 | dom96 | you might not have to pull the c sources |
21:07:24 | Araq | in fact, I need to push the csources :-) |
21:08:21 | def-pri-pub | Araq pls |
21:17:16 | dom96 | 'night |
21:24:47 | Araq | def-pri-pub: what? |
21:26:48 | * | Mat4 joined #nim |
21:28:24 | def-pri-pub | nevermind |
21:30:50 | def-pri-pub | I tried pulling down a fresh copy of csources and I'm getting this error when running `build.sh`: |
21:30:56 | def-pri-pub | gcc: error: c_code/2_2/compiler_modulegraphs.c: No such file or directory |
21:30:57 | def-pri-pub | gcc: fatal error: no input files |
21:31:30 | def-pri-pub | I think you forgot to push a file |
21:32:52 | Araq | let'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:12 | Araq | def-pri-pub: please try again |
21:44:27 | Araq | (why did this happen? it's all automated ... oh well) |
21:47:20 | * | bjz joined #nim |
21:49:49 | def-pri-pub | Araq, now I'm getting linking errors |
21:50:03 | def-pri-pub | http://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:37 | Mat4 | def-pri-pub: Looks like a library or prior compiled source file is not linked |
21:55:14 | * | Ven joined #nim |
21:56:05 | Araq | def-pri-pub: dunno, can reproduce though |
21:56:17 | Araq | try the tar.xz for now, that's known to work |
21:57:14 | Mat4 | by the way, |
21:58:17 | Mat4 | Araq: What is required to temporary disable GC ? |
21:58:28 | Araq | GC_disable() |
21:58:36 | Mat4 | thanks |
22:03:54 | def-pri-pub | Araq: Nope, not even the .tar.gz release works. I |
22:04:00 | def-pri-pub | Looks like the same linking error |
22:09:48 | Araq | ./build.sh works for me for the tar.xz |
22:09:56 | Araq | but csources indeed fails |
22:10:17 | def-pri-pub | Hold on, I'm testing a fresh install in a GCE VM |
22:14:17 | def-pri-pub | Yeah, linking fails too |
22:14:54 | def-pri-pub | Something in csources is bunk. I'm not sure what though. |
22:15:21 | Araq | I do know |
22:15:24 | Araq | I diffed it |
22:15:34 | Araq | it's full of old cruft |
22:16:21 | def-pri-pub | I'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:48 | Araq | ok, turns out os.copyDir doesn't work -.- |
22:37:04 | Araq | at least not in the way koch.nim uses it |
22:37:12 | Araq | causing my csources push to fail |
22:41:16 | Araq | def-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) |