00:01:59 | * | BitPuffin quit (Remote host closed the connection) |
00:04:00 | * | endragor joined #nim |
00:05:13 | * | endragor quit (Remote host closed the connection) |
00:05:36 | * | endragor joined #nim |
00:07:06 | * | endragor quit (Remote host closed the connection) |
00:09:36 | FromGitter | <mratsim> @miran try this, it should be much faster: https://github.com/mratsim/Arraymancer/blob/master/benchmarks/euler_tensor_optim.nim. ⏎ I think the main bottlenecks were the 3 ~ 4 temporary tensors created in each functions. That is quite costly. So solution: I have to work on my loop fusion macro |
00:20:31 | * | endragor joined #nim |
00:24:09 | * | RushPL joined #nim |
00:24:57 | * | endragor quit (Ping timeout: 240 seconds) |
00:35:53 | * | PMunch quit (Quit: leaving) |
00:42:03 | FromGitter | <polypus74> anyone know any good libs for binary protocol packing/unpacking? |
00:42:25 | FromGitter | <mratsim> Maybe NESM? https://github.com/xomachine/NESM |
00:43:12 | FromGitter | <polypus74> v/ cool thanks. looks like it might be of use |
00:43:43 | FromGitter | <mratsim> doc is extensive: https://xomachine.github.io/NESM/ |
00:58:30 | leorize | Does anyone know any alternative methods to implement this? https://play.nim-lang.org/?gist=36940b8cfd10a29659ae87d5e05f8879 |
01:00:32 | leorize | While it appears to be a nice way to reduce duplication, the compiler crashes with it (issue filed), so I would like to know if there's any alternative instead of copying code all over. |
01:06:40 | dom96 | Link to issue? |
01:06:50 | dom96 | Your code is missing the definition for 'Context' |
01:13:16 | GitDisc | <2vg> hi, Michael-Scott queue implemented in Nim but this is very unsafe so... Can anyone securely implement using ref object ? I want to leave memory management to GC ;) |
01:13:17 | GitDisc | <2vg> |
01:13:17 | GitDisc | <2vg> https://github.com/2vg/MSQueue |
01:16:47 | dom96 | Nimgen sure is cool |
01:17:20 | dom96 | Wish Nimble could support installation of packages that depend on it when nimgen hasn't already been installed |
01:18:26 | federico3 | dom96: isn't the dependency system doing that? |
01:18:51 | leorize | dom96: https://github.com/nim-lang/Nim/issues/7355 |
01:18:52 | dom96 | not when you use a 'before install' hook which all of these packages are using |
01:19:54 | leorize | the gist was only an demonstration of what I would like to achieve, so I didn't copy all the contents over. |
01:21:25 | * | arcmass joined #nim |
01:22:42 | dom96 | arcmass: Sorry about this but webchat is currently muted here so I'm the only one who can see your messages. |
01:23:31 | dom96 | Gitter is another alternative which is relayed to IRC |
01:24:28 | dom96 | As for your question, I guess you want: https://nim-lang.org/docs/terminal.html#getch, |
01:27:50 | dom96 | leorize: I replied to your issue |
01:28:01 | dom96 | arcmass: Here is a handy link: https://gitter.im/nim-lang/Nim :) |
01:30:14 | * | dom96 really needs to unmute webchat or get NimBot to notify people that they are muted |
01:30:31 | dom96 | In any case. Time for sleep, good night! |
01:31:20 | FromGitter | <2vg> good night, dom96 ;) |
01:39:11 | FromGitter | <polypus74> concepts: how ready are they? |
01:45:57 | * | arnetheduck quit (Ping timeout: 264 seconds) |
02:05:34 | * | xet7 quit (Quit: Leaving) |
02:45:48 | FromGitter | <AjBreidenbach> conceptually? |
02:54:11 | * | S1tiSchu joined #nim |
02:57:57 | * | S1t1Schu quit (Ping timeout: 264 seconds) |
03:13:14 | * | dddddd quit (Remote host closed the connection) |
03:26:52 | * | vlad1777d_ quit (Ping timeout: 246 seconds) |
03:58:09 | * | yglukhov joined #nim |
04:02:31 | * | yglukhov quit (Ping timeout: 256 seconds) |
04:22:43 | * | NimBot joined #nim |
04:26:17 | * | SenasOzys quit (Remote host closed the connection) |
05:10:43 | * | NimBot joined #nim |
05:44:34 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:48:59 | * | arcmass quit (Ping timeout: 260 seconds) |
06:16:01 | * | nsf joined #nim |
06:42:40 | * | miran joined #nim |
06:48:41 | * | arthurz quit (Read error: Connection reset by peer) |
07:16:17 | * | byte512 quit (Ping timeout: 240 seconds) |
07:16:28 | * | littleli quit (Quit: Ping timeout (120 seconds)) |
07:16:55 | * | r4vi_ joined #nim |
07:16:56 | * | littleli joined #nim |
07:18:29 | * | thor77_ joined #nim |
07:18:46 | * | r4vi quit (Read error: Connection reset by peer) |
07:18:47 | * | Araq quit (Ping timeout: 240 seconds) |
07:18:48 | * | thor77 quit (Ping timeout: 240 seconds) |
07:18:48 | * | Cthalupa quit (Ping timeout: 240 seconds) |
07:18:49 | * | r4vi_ is now known as r4vi |
07:18:56 | * | byte512 joined #nim |
07:18:56 | * | Araq joined #nim |
07:19:07 | * | Cthalupa joined #nim |
07:37:11 | * | yglukhov joined #nim |
07:39:42 | * | yglukhov quit (Remote host closed the connection) |
08:20:30 | * | yglukhov joined #nim |
08:20:38 | * | yglukhov quit (Remote host closed the connection) |
08:35:12 | * | miran quit (Quit: Konversation terminated!) |
08:43:37 | * | yglukhov joined #nim |
08:48:22 | * | rokups joined #nim |
08:52:14 | * | jaco60 joined #nim |
09:01:33 | * | rauss quit (Read error: Connection reset by peer) |
09:03:06 | * | rauss joined #nim |
09:15:18 | FromGitter | <mratsim> Did someone already implement a varargs zip? I suppose that would be quite useful in sequtils. |
09:15:50 | * | yglukhov quit (Remote host closed the connection) |
09:17:55 | FromGitter | <mratsim> but the varargs need to be known at compile-time so only arrays and “tuple-like" zip(seq1, seq2, seq3), mmmh. |
09:20:40 | Araq | for+if vs zip, filter, foldl, foldr, map. Still don't see the elegance in FP. ;-) |
09:21:27 | Araq | it's like Kepler vs epicycles. |
09:22:36 | FromGitter | <mratsim> This is part of a larger problem, I want to implement loop-fusion in Arraymancer: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aae2fdc26a769820b2ad626] |
09:23:25 | FromGitter | <mratsim> basically I want to be able to have a variadic number of t[_, 0..^3], t[_, 1..^2], t[_, 2..^1] ... |
09:24:15 | FromGitter | <mratsim> this is implemented with `for x{.inject.}, y{.inject.}, z{.inject} in zip(t1, t2, t3)` currently |
09:24:20 | Araq | where is the problem? loopFusion has enough context to do that |
09:25:29 | FromGitter | <mratsim> there is no problem, it’s just to check if there was a varargs zip I could use as reference |
09:29:01 | FromGitter | <mratsim> The only foggy thing is how to ensure that if I do `macro zip(v: varargs[Tensor]): untyped` how to ensure that the arity of v is known at compile-time. |
09:29:39 | FromGitter | <mratsim> `macro zip(v: varargs[Tensor] not seq)` ? |
09:37:34 | FromGitter | <mratsim> Actually my need seems similar to the “curry” needs: https://github.com/nim-lang/Nim/issues/402 |
10:03:16 | Araq | oh please leave 'void' out of this. 'void' is horrible. |
10:06:04 | FromGitter | <data-man> @mratsim: zero-functional library supports zip with 4 parameters. Can be increased. :) |
10:06:39 | FromGitter | <mratsim> I really need varargs! |
10:07:04 | FromGitter | <mratsim> But it’s fine, I’m building the macro right now |
10:07:21 | Araq | the macro can produce code that doesn't depend on a zip, no? |
10:15:26 | FromGitter | <mratsim> Probably, basically the `loop-fusion` should generalize the following: https://github.com/mratsim/Arraymancer/blob/e801b78169b59f1213a2e046997cfecf99ed4feb/src/tensor/higher_order_applymap.nim#L24-L114 |
10:16:28 | FromGitter | <mratsim> This template `omp_parallel_blocks(block_offset, block_size, t.size)`splits the work for OpenMP parallelization. |
10:16:36 | * | xkapastel quit (Quit: Connection closed for inactivity) |
10:17:27 | * | tefter joined #nim |
10:17:45 | leorize | hi, does the compiler automatically inline procs across modules? I don't really want to add {.inline.} to everything |
10:18:20 | FromGitter | <mratsim> in that case you need to compile with `-lto` |
10:18:36 | Araq | leorize, it doesn't :-) but -lto helps |
10:18:45 | FromGitter | <mratsim> it’s not done in C so it’s not done in Nim ;) |
10:19:04 | Araq | well actually .inline is replicated to make it easier for C |
10:20:35 | Araq | but we don't infer .inline automatically |
10:24:13 | FromGitter | <data-man> @Araq: How about new compiler parameter? --inline or --opt:inline |
10:24:34 | Araq | based on what principle? |
10:24:57 | FromGitter | <data-man> Alaways proc inline |
10:25:09 | Araq | for every proc or what? |
10:25:21 | FromGitter | <data-man> Yes, for every proc |
10:25:41 | Araq | that's crazy talk |
10:25:59 | FromGitter | <data-man> or smart inline, for short procs |
10:28:15 | leorize | Araq: is core/seqs.nim currently used by anything? |
10:28:40 | Araq | leorize, sadly, no. |
10:28:44 | FromGitter | <mratsim> Don’t inline every proc, that’s a recipe for code size explosion |
10:29:13 | leorize | I found that it solves a few issues I have with seq for --newruntime. Is there any plans to move it to system.nim? |
10:29:29 | Araq | data-man, meh just use link time optimization instead. |
10:29:31 | FromGitter | <mratsim> the compiler detects and inline short proc already within the same module. |
10:29:59 | FromGitter | <mratsim> I actually have to put {.noinline.} sometimes for benchmarking ;) |
10:29:59 | Araq | leorize, yup. it's the next generation of Nim's seq :-) |
10:32:08 | * | yglukhov joined #nim |
10:36:06 | FromGitter | <data-man> @Araq: In some libs I saw unroll pragma. But docs says that "Note: Currently the compiler recognizes but ignores this pragma." Who is wrong? :) |
10:36:29 | Araq | the libs :-) |
10:37:19 | FromGitter | <data-man> I thought so. :-) |
10:39:50 | leorize | Araq: do we have anything capable of being the Allocator in stdlib? alloc() exists but doesn't have the alignment param |
10:40:08 | * | dddddd joined #nim |
10:41:16 | Araq | leorize, PRs are welcome, we need to add alignment to alloc() I think |
10:44:30 | leorize | I think I could create the missing procs for seqs, but I know nothing about memory allocation |
10:45:39 | FromGitter | <mratsim> Oh please that would be awesome =), @data-man yeah I use the unroll pragma as a reminder ;) but usually it’s not performance critical, if it is I write my own unroll macro like so: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/fallback/blas_l3_gemm_micro_kernel.nim#L18 or for an unknown at compile time this can be made into a macro: https://gist.github.com/mratsim |
10:45:39 | FromGitter | ... /cc49df81f5050550b83c73b616c142a1#file-strided-nim-L9-L29 |
10:53:34 | FromGitter | <data-man> @mratsim: Can you adapt this for seqs? |
10:54:19 | FromGitter | <data-man> BTW Today I downloaded all the IRC logs. A lot of interesting. :) ⏎ A bit of statistics: ⏎ 2063 files ⏎ largest log on 21-01-2015 ⏎ smallest log on 30-03-2013 ... [https://gitter.im/nim-lang/Nim?at=5aae455b35dd17022e716a92] |
10:58:26 | Araq | is an error message |
10:58:27 | Araq | "Nim is not Pascal; the syntax is 'parameter: var T', not 'var parameter: T'" |
10:58:30 | Araq | acceptable? |
10:59:29 | FromGitter | <data-man> @Araq: No, I love Pascal! :) |
10:59:42 | * | Vladar joined #nim |
11:00:23 | * | SenasOzys joined #nim |
11:00:51 | Araq | ok, then without the remark |
11:00:53 | * | SenasOzys quit (Remote host closed the connection) |
11:01:00 | Araq | "the syntax is 'parameter: var T', not 'var parameter: T'" |
11:01:22 | * | SenasOzys joined #nim |
11:01:37 | FromGitter | <dom96> @data-man in case you want to run more analysis, you can grab a JSON of the logs of most days. Just change the extension to .json |
11:02:52 | * | Snircle joined #nim |
11:03:33 | Araq | maybe produce a graph "number of days Araq is a dick" vs "number of days Araq was helpful" :P |
11:05:21 | FromGitter | <data-man> @dom96: Thanks! Just for offline reading. boilerplate.css is missing? |
11:06:30 | FromGitter | <mratsim> @data-man, I could but I’m lacking the time. |
11:07:41 | * | yglukhov quit (Remote host closed the connection) |
11:08:39 | FromGitter | <data-man> @mratsim: Ok. ⏎ @Araq: And for those who do not know Pascal such a message is unclear. |
11:08:47 | leorize | Araq: What makes something qualify as an openArray? I'm fiddling with core/seqs but it seems that the new seq is not qualified as an openArray |
11:09:24 | Araq | data-man: those who do not know Pascal do not make this syntax error |
11:10:36 | * | yglukhov joined #nim |
11:11:17 | Araq | speaking about 'void'. it is too late to remove 'void' from Nim? |
11:11:26 | FromGitter | <alehander42> what's bad about it? |
11:12:05 | Araq | it's a PITA to support properly in the compiler |
11:12:26 | FromGitter | <alehander42> well how would one signify the return type of a void procedure :D |
11:12:46 | Araq | for return type it's ok. |
11:12:54 | Araq | but for everything else it's messy |
11:13:03 | FromGitter | <alehander42> what else can it be used for :O |
11:13:24 | Araq | Table[string, void] # a set of strings |
11:14:01 | FromGitter | <alehander42> ahh, I've used Table[string, bool] for that |
11:14:29 | FromGitter | <alehander42> I didn't realize void can be used like this, can one do seq[void] ? |
11:14:36 | Araq | createThread[void](thing) |
11:19:29 | yglukhov | Future[void]? |
11:20:02 | * | vlad1777d joined #nim |
11:22:08 | FromGitter | <alehander42> @PMunch I will start a simple lang parser dsl for one side project, I will probably ask you stuff as the parser lib guru around :D |
11:22:27 | FromGitter | <alehander42> yeah, Future[void] is ok, as a return type too I guess |
11:23:55 | FromGitter | <mratsim> I think this needs an example: https://nim-lang.org/docs/macros.html#params=,NimNode,NimNode `proc params=(someProc: NimNode; params: NimNode)` I can’t pass an `nnkFormalParams.newTree(…)` or a seq\[NimNode\] to it. (assertion error) |
11:29:40 | * | yglukhov quit (Remote host closed the connection) |
11:29:47 | FromGitter | <alehander42> wow I'll manage to use `*rule` in the dsl |
11:29:56 | FromGitter | <alehander42> I wonder if that would be too confusing instead of `rule*` |
11:45:22 | * | Trustable joined #nim |
12:14:27 | * | yglukhov joined #nim |
12:16:35 | Araq | alenader42: thats what I use too |
12:21:25 | Araq | yglukhov, well Future[void] is fine too. what is hard is that 'void' parameters can be "empty" |
12:21:31 | Araq | proc foo(a, b: void) |
12:21:35 | Araq | foo() # valid |
12:21:57 | Araq | that's what makes things hard. If we map 'void' to the empty tuple this would become |
12:22:03 | Araq | foo((), ()) |
12:22:43 | Araq | and lots of bugs would disappear :-) |
12:23:22 | Araq | Scala uses 'Unit' instead of void for these reasons |
12:23:55 | yglukhov | hm, i did not know nim supports void arguments =). so i will not miss this functionality probably... |
12:41:49 | yglukhov | mapping void to () is even better i think |
12:47:32 | dom96 | it seems to me that 'void' arguments can be replaced by simply overloading |
12:47:33 | dom96 | No? |
12:51:03 | Araq | yeah, they can. |
12:55:05 | * | yglukhov quit (Remote host closed the connection) |
13:04:13 | * | r3d9u11 joined #nim |
13:14:18 | dom96 | yay, journalctl has all the timestamped logs for my Snake game |
13:14:52 | dom96 | So I should be able to get a nice graph showing a spike during my talk |
13:18:32 | * | hyp3rbor3a joined #nim |
13:19:44 | dom96 | Araq: Still not sure how to fix this Aporia problem |
13:20:04 | dom96 | Smells like a regression |
13:20:13 | dom96 | I get the same error even if I don't use the template |
13:21:58 | Araq | I wanted to improve the error messgae for "illegal capture" |
13:50:58 | FromGitter | <mratsim> I’m stuck at this point for my variadic zip: `Error: invalid type: 'typed' in this context: 'iterator (s0: seq[typed], s1: seq[typed], s2: seq[typed], s3: seq[typed]): tuple of (typed, typed, typed, typed){.inline.}' for proc` It doesn’t seem like getType, getTypeinst or getTypeImpl would work instead: https://gist.github.com/mratsim/b153b7df89db3730a97143c39b19cf41#file-varargs_zip-nim-L117 |
14:05:37 | FromGitter | <mratsim> made progress, seems like I can’t use `args: varargs[seq[typed]]` but I must use `args: varargs[typed]` |
14:16:01 | * | leorize quit (Ping timeout: 245 seconds) |
14:20:04 | FromGitter | <mratsim> bummer, I can’t generate my own iterator inside a for loop and then call it, so I must create my own “forN” / “forN” macro that wraps everything. |
14:27:08 | dom96 | why not? |
14:29:53 | Trustable | dom96: Please have a look at https://github.com/nim-lang/Nim/pull/7326 . It should be a no-brainer to merge. |
14:36:13 | FromGitter | <zacharycarter> yeah I don't see why that shouldn't be possible @mratsim - can you share some code? |
14:40:14 | dom96 | Trustable: thanks |
14:43:09 | Trustable | dom96: thank you :) |
14:48:18 | * | nsf quit (Quit: WeeChat 2.0.1) |
15:06:05 | * | Sentreen quit (Quit: WeeChat 1.6) |
15:08:08 | * | miran joined #nim |
15:08:56 | * | Sentreen joined #nim |
15:09:55 | * | yglukhov joined #nim |
15:13:06 | * | s7rfq joined #nim |
15:13:07 | * | s7rfq quit (Client Quit) |
15:14:13 | * | yglukhov quit (Ping timeout: 240 seconds) |
15:20:33 | * | SenasOzys quit (Ping timeout: 240 seconds) |
15:25:31 | * | PMunch joined #nim |
15:26:03 | * | SenasOzys joined #nim |
15:31:45 | FromGitter | <alehander42> I think I just had special cases for 2, 3 and 4 zip cases |
15:31:51 | FromGitter | <alehander42> we had* in zero_functional |
15:32:07 | FromGitter | <alehander42> do you want a more general zip? |
15:35:14 | PMunch | dom96, does Jester/AsyncHttpServer start new threads at any point? Or is it all just in a separate thread from the main thread? |
15:35:38 | * | _alexr_ joined #nim |
15:36:01 | dom96 | PMunch: Neither |
15:36:05 | PMunch | Neither? |
15:36:11 | dom96 | It's single threaded |
15:36:39 | * | _alexr_ quit (Remote host closed the connection) |
15:36:40 | PMunch | But Nim was complaining when I tried to use a global variable |
15:37:00 | FromGitter | <mratsim> @zacharycarter @alehander42: https://gist.github.com/mratsim/b153b7df89db3730a97143c39b19cf41 |
15:37:02 | PMunch | Had to mark it as {.threadvar.} to be able to use it in a route |
15:37:29 | Araq | PMunch, the compiler enforces 'gcsafe' independently of whether you use threading or not |
15:38:17 | dom96 | federico3: Can confirm, peak number of users on Snake was 28 |
15:38:33 | dom96 | The IPs are different too |
15:38:48 | federico3 | world domination [✔] |
15:39:07 | dom96 | I'm surprised so many people joined |
15:39:10 | PMunch | Araq, ah so because the matcher is marked as gcsafe it checks it. Is that to make it possible to run Jester in a thread if you want to, or is there some other reason for it? |
15:39:18 | PMunch | dom96, you had a snake-off? |
15:39:30 | federico3 | indeed - but aren't the client NATted? |
15:39:38 | dom96 | PMunch: I embedded my Multiplayer Snake game in my presentation |
15:39:45 | dom96 | PMunch: And asked people to join |
15:40:01 | * | edcragg quit (Quit: ZNC - http://znc.in) |
15:40:06 | PMunch | Presentation? |
15:40:11 | FromGitter | <alehander42> @mratsim I don't know how hard would that be with typed args, I usually used untyped ones and try to delay the type checking after expansion |
15:40:14 | * | edcragg joined #nim |
15:40:38 | dom96 | federico3: No idea. My knowledge of NAT is embarresingly bad :) |
15:40:49 | dom96 | PMunch: Local event at my Uni |
15:41:15 | dom96 | PMunch: Also, regarding your Jester question: yes |
15:41:23 | PMunch | Ah right, maybe that would be a good idea for the Nim talk me and couven are giving at our university :) |
15:41:27 | federico3 | dom96: don't tell insomniac! |
15:42:04 | FromGitter | <mratsim> @alehander42 Actually it works here, my macro with 4 args would produce something similar to this: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ But in a `for`context I cannot define a new iterator and then call it. [https://gitter.im/nim-lang/Nim?at=5aae88cc2dfcfffd2b2b925e] |
15:42:25 | miran | dom96: don't forget to post the slides online :) |
15:42:28 | federico3 | dom96: do you see multiple connections from the same IPaddrs? |
15:42:28 | dom96 | federico3: I was expecting lots of similar IPs, most people were surely connected to the Uni wifi |
15:42:38 | dom96 | federico3: or maybe most people just used their mobile internet |
15:42:51 | Araq | mratsim: what's the connection of loop fusion and 'zip'? |
15:42:55 | * | yglukhov joined #nim |
15:43:14 | federico3 | virtually all phone provider NAT very heavily |
15:43:47 | dom96 | federico3: Does that mean that people connected to the same mobile tower will get the same IP? |
15:43:48 | PMunch | dom96, so I only need to mark it as a threadvar in case I want to run the matching in a thread. Wish there was some way around that, makes it look a bit messy.. |
15:44:04 | federico3 | no way :) |
15:44:08 | * | leorize joined #nim |
15:44:10 | dom96 | federico3: Interestingly, there is one Irish and one US IP |
15:44:13 | Araq | PMunch, workaround is easy: |
15:44:20 | Araq | {.gcsafe.}: |
15:44:26 | Araq | code that accesses the global here |
15:44:59 | FromGitter | <mratsim> @Araq, if I get a generalized zip on seq, I can port it to Tensors, if I have a zip on Tensors, I can create use it as a base for loop fusion |
15:45:28 | dom96 | Araq: But that's just a hack, no? |
15:45:33 | dom96 | it'll fail as soon as you use threads |
15:45:50 | dom96 | federico3: TL;DR about NAT? :) |
15:46:04 | federico3 | incoming |
15:46:09 | Araq | dom96, yup, it's a hack |
15:47:13 | * | yglukhov quit (Ping timeout: 240 seconds) |
15:47:40 | FromGitter | <mratsim> The main issue on tensors is that one could be in row Major order, the second in column major, and the third is in something random, so iteration is not trivial. |
15:47:46 | * | nsf joined #nim |
15:48:54 | FromGitter | <mratsim> So I have helper template `initStridediterations`and `advanceStridedIterations` that take that into account properly. |
15:49:24 | FromGitter | <mratsim> My current zip proc are built on top of that (to zip, 2 or 3 tensors) |
15:49:43 | PMunch | Well, tagging one variable with threadvar vs. tagging all the routes with gcsafe it would look worse than what I'm doing now :P |
15:50:14 | FromGitter | <mratsim> and on top of that I have map2, map3 templates, that supports OpenMP. (the zip supports splitting work) |
15:51:07 | FromGitter | <mratsim> loopfusion means generalizing map2/map3, so ideally I generalize the zip iterators* |
15:51:31 | * | PMunch quit (Quit: leaving) |
15:53:11 | * | rauss quit (Quit: WeeChat 2.0.1) |
15:57:17 | * | S1tiSchu is now known as SitiSchu |
15:58:19 | dom96 | omg, why is it so difficult for Excel to pick up my date strings |
16:01:53 | dom96 | of course, it can't handle ISO dates |
16:05:55 | * | hyp3rbor3a quit (Quit: Leaving) |
16:10:02 | shashlick | Araq: if you remove void, what can we map to for C functions or data types that use void or void* |
16:11:40 | Araq | shashlick, my bad, I'm not removing 'void', but I remove some weird behaviour of it |
16:12:01 | shashlick | Ok cool |
16:12:25 | Araq | btw 'void*' is just 'pointer' |
16:25:31 | * | xkapastel joined #nim |
16:41:53 | FromGitter | <mratsim> Is it possible to not get `undeclared identifier` in this situation? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aae96d1012ff2bf681da12e] |
16:46:03 | * | dddddd quit (Remote host closed the connection) |
16:46:23 | planetis[m] | can I add get{Int, Str, Bool} procs with a field parameter i.e: `data["sets"].getInt("size", 2)` or that will complicate the json module Api? |
16:46:52 | planetis[m] | in order to be used without the weird `{}` thing |
16:52:39 | federico3 | si |
16:58:26 | Araq | please don't. the json module is aready getting bloated |
16:59:19 | planetis[m] | thought so |
17:42:20 | * | PMunch joined #nim |
17:43:03 | * | smt quit (Ping timeout: 256 seconds) |
17:43:42 | FromGitter | <mratsim> Success: I have a variadic forEach that you can use like so `ForEach [i,j,k], [a,b,c]: (i + j) * k`: https://gist.github.com/mratsim/e71b16354f146f3253a76cb0eff8a908 |
17:43:59 | * | nsf quit (Quit: WeeChat 2.0.1) |
17:44:03 | * | enthus1ast joined #nim |
17:44:40 | FromGitter | <mratsim> Now I only need to have an unique identifier for the autogenerated `zip` proc |
17:45:57 | * | enthus1a1t quit (Ping timeout: 240 seconds) |
17:49:52 | shashlick | What's a good module to get working in the VM? One that doesn't use importc of course 🙂 |
17:50:22 | shashlick | And is there any plan to get importc working in the vm or no plans, too much work? |
17:51:23 | * | MJCaley joined #nim |
18:05:51 | dom96 | https://twitter.com/d0m96/status/975433038590078976 |
18:06:18 | * | SitiSchu quit (Read error: Connection reset by peer) |
18:18:55 | FromGitter | <AjBreidenbach> that game is surprisingly cpu intensive |
18:19:54 | dom96 | really? What browser? |
18:20:54 | FromGitter | <AjBreidenbach> chrome |
18:21:28 | FromGitter | <AjBreidenbach> the GPU process task went up to 35% |
18:22:18 | dom96 | Interesting |
18:22:54 | * | cspar_ quit (Ping timeout: 268 seconds) |
18:24:03 | * | cspar joined #nim |
18:26:21 | dom96 | Perhaps I am doing something wrong |
18:26:30 | dom96 | I did try to follow the modern best practices for JS games though |
18:26:40 | FromGitter | <AjBreidenbach> could be a chrome bug |
18:30:55 | FromGitter | <AjBreidenbach> I tried it without hardware acceleration and I think it was a little better |
18:32:39 | * | cspar_ joined #nim |
18:33:38 | * | yglukhov joined #nim |
18:33:51 | FromGitter | <AjBreidenbach> any idea why this would cause the compiler to crash? ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5aaeb10ef3f6d24c688bb560] |
18:34:04 | FromGitter | <AjBreidenbach> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aaeb11c5f188ccc15cd25e3] |
18:34:41 | FromGitter | <AjBreidenbach> I'm need to compile with `--noMain` and I want to add an init hook |
18:34:57 | * | cspar quit (Ping timeout: 240 seconds) |
18:35:14 | * | cspar joined #nim |
18:35:49 | FromGitter | <AjBreidenbach> I get `Error: internal error: expr: param not init exports_124450` |
18:37:27 | * | cspar_ quit (Ping timeout: 240 seconds) |
18:38:57 | PMunch | Hmm, I'm playing around a bit more with gcsafe and with a more trivial example it only throws a warning. Does Jester push some options that turns this into an error? |
18:40:46 | * | yglukhov quit (Remote host closed the connection) |
18:41:14 | FromGitter | <AjBreidenbach> you get a warning for that? |
18:41:45 | FromGitter | <AjBreidenbach> it doesn't do anything if the hook doesn't call `register` on `exports` |
18:44:11 | Araq | AjBreidenbach: rename one of your 'exports' parameters |
18:45:59 | FromGitter | <AjBreidenbach> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aaeb3e7a60157d62fffcd42] |
18:46:18 | FromGitter | <AjBreidenbach> like this? |
18:47:36 | Araq | yes |
18:48:06 | FromGitter | <AjBreidenbach> it still doesn't like it |
18:49:29 | FromGitter | <AjBreidenbach> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aaeb4b9f3f6d24c688bc8ac] |
18:49:38 | FromGitter | <AjBreidenbach> I think this is where it's happening |
18:51:02 | Araq | make your template .dirty |
18:52:44 | FromGitter | <AjBreidenbach> that didn't work |
18:54:33 | Araq | what imports are required? |
18:57:36 | Araq | well give me something I theoretically should be able to compile please |
18:58:00 | Araq | and probably you want to return exportsObj, not exports |
18:58:21 | FromGitter | <AjBreidenbach> exports is a pointer that I need to return |
18:58:39 | FromGitter | <AjBreidenbach> the file should compile standalone, I'll try to link it |
18:58:55 | Araq | Error: undeclared identifier: 'JsObject' |
18:59:30 | FromGitter | <AjBreidenbach> test.nim (https://files.gitter.im/nim-lang/Nim/uL3K/test.nim) |
18:59:47 | FromGitter | <AjBreidenbach> I defined it |
19:01:23 | FromGitter | <AjBreidenbach> I need to compile it with `--noMain` if that makes a difference |
19:05:24 | FromGitter | <Araq> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aaeb87427c509a7747892eb] |
19:05:30 | FromGitter | <Araq> workaround |
19:05:42 | FromGitter | <AjBreidenbach> works for me! thanks |
19:06:47 | Araq | but please create an issue for this |
19:06:56 | Araq | it's a new bug :-) |
19:07:07 | FromGitter | <AjBreidenbach> Idk even know what to label it |
19:07:38 | Araq | "Codegen does not like shadowed parameter" |
19:08:31 | FromGitter | <AjBreidenbach> got it ;) |
19:08:51 | PMunch | Hmm, can you detect if threads are on or off? |
19:10:06 | Araq | when compileOption("threads") I think |
19:11:06 | PMunch | Thanks :) |
19:13:40 | PMunch | dom96, would something like this be an option for Jester http://ix.io/Z9N/Nim |
19:14:24 | dom96 | That hacks around the language, so no |
19:14:41 | dom96 | If you want to disable these checks just compile with --threadAnalysis:off |
19:16:26 | * | nsf joined #nim |
19:19:03 | GitDisc | <AnimalSpirits> Can someone help me with my helloworld compiler error? |
19:19:47 | PMunch | dom96, well the reason why they are marked as gcsafe is to be used with threads. Without threads it doesn't really make sense. It's just making up for strange behaviour.. |
19:20:10 | * | noonien joined #nim |
19:23:53 | FromGitter | <zetashift> @AnimalSpirits post the code1 |
19:23:55 | miran | AnimalSpirits: show us the code :) |
19:23:57 | * | r3d9u11 quit (Remote host closed the connection) |
19:25:03 | GitDisc | <AnimalSpirits> https://pastebin.com/cxrmV2rw |
19:25:37 | * | yglukhov joined #nim |
19:25:47 | GitDisc | <AnimalSpirits> I know for a fact the file is actually there in Projects and is named "greetings.nim" |
19:26:17 | miran | have you just installed nim? |
19:26:50 | * | SenasOzys quit (Remote host closed the connection) |
19:26:55 | GitDisc | <AnimalSpirits> Yes |
19:27:14 | miran | try restarting your machine and try it again :) |
19:27:34 | Araq | run finish.exe from the zip |
19:27:46 | miran | windows need restarting to refresh what is it in the PATH |
19:30:08 | Araq | that's not true |
19:30:33 | Araq | you might need to restart the terminal/shell/cmd.exe though |
19:30:33 | miran | happened to me several times |
19:30:56 | Araq | then stop using Windows 95 :P |
19:31:18 | Araq | it's not true, it's an entry in the registry |
19:31:29 | Araq | you don't need to restart windows when the registry changed |
19:32:08 | miran | let's just wait and see if that will solve AnimalSpirit's problem ;) |
19:36:36 | GitDisc | <AnimalSpirits> What do you mean run finish.exe from zip? I tried restarting and nothing changed sadly. |
19:37:06 | GitDisc | <AnimalSpirits> Reinstall Nim but unzipped? |
19:37:42 | * | hyp3rbor3a joined #nim |
19:37:44 | GitDisc | <AnimalSpirits> Or reinstall Nim but still zipped? |
19:38:44 | * | hyp3rbor3a quit (Client Quit) |
19:38:58 | * | dddddd joined #nim |
19:40:45 | Araq | https://nim-lang.org/install_windows.html |
19:41:40 | GitDisc | <AnimalSpirits> Is there something there I need to read |
19:41:50 | GitDisc | <AnimalSpirits> I downloaded the x64 one from here |
19:42:51 | * | yglukhov quit (Remote host closed the connection) |
19:50:25 | FromGitter | <zetashift> Yeah it can't find your C compiler, you could also download the mingw x64 from that link and it's bin directory to the path |
19:50:45 | FromGitter | <zetashift> Also as windows user I can tell you no windows restart required, but a cmd restart could be needed |
19:52:05 | FromGitter | <zetashift> @AnimalSpirits, choosenim automates this for you(except you need to add one directory to the path manually) https://github.com/dom96/choosenim/releases |
19:53:16 | Araq | unzip the x64 from there into your HOME_DIR and run finish.exe |
19:53:44 | GitDisc | <AnimalSpirits> I don't know why clicking finish worked... I feel like I did that multiple times before coming on here and it never worked but it just did now... Thanks I guess |
19:53:51 | GitDisc | <AnimalSpirits> What's choosenim? |
19:55:07 | Araq | the alternative installer |
19:56:33 | GitDisc | <AnimalSpirits> Does it do anything special |
19:59:34 | Araq | it lets you pick the Nim version but it doesn't work well on Windows yet IMO |
20:02:46 | * | arecaceae quit (Remote host closed the connection) |
20:03:08 | * | arecaceae joined #nim |
20:11:23 | FromGitter | <mratsim> The loopfusion package is out: https://github.com/numforge/loopfusion (without loopfusion but it will be syntactic sugar over the `forEach` macro) |
20:21:53 | PMunch | Huh, didn't know Ormin could create it's own server |
20:23:18 | PMunch | Oooh, cool stuff mratsim |
20:24:54 | PMunch | But what is the loopfusion macro going to do? |
20:26:36 | FromGitter | <mratsim> `loopfusion: a + b * c` a,b,c being sequences (i.e. you don’t need to fiddle with the indices) |
20:27:03 | FromGitter | <mratsim> `loopfusion: echo a + b * c` sorry |
20:27:14 | PMunch | Aah, that's pretty neat |
20:32:15 | Araq | mratsim: sounds really cool. but wouldn't 'lift' be a more appropriate name? |
20:32:33 | Araq | or maybe 'loopover' |
20:32:53 | Araq | the 'fusion' is more an implementation detail, no? |
20:33:19 | Araq | loopfusion would 'fuse' the loops but they are not any |
20:33:34 | Araq | the macro creates the loops |
20:33:50 | FromGitter | <mratsim> It’s similar to this https://julialang.org/blog/2017/01/moredots |
20:34:23 | FromGitter | <mratsim> loopover, no. lift mmh, for me you lift a proc to apply to a container |
20:34:42 | FromGitter | <mratsim> but it seems like the opposite is going here. |
20:34:46 | FromGitter | <zetashift> Offtopic but Julia seems really nice and maybe even a contender for Nim |
20:37:17 | FromGitter | <mratsim> Actually I have an issue, it seems like when you use `containers: array[N, typed]` all the typed must be the same |
20:38:30 | * | zama quit (Read error: Connection reset by peer) |
20:41:14 | Araq | only 'varargs' is special for 'typed', yes |
20:42:02 | * | SenasOzys joined #nim |
20:44:12 | * | thor77_ is now known as thor77 |
20:46:45 | * | zama joined #nim |
20:49:18 | * | MJCaley quit (Quit: MJCaley) |
20:57:03 | * | Trustable quit (Remote host closed the connection) |
20:58:55 | * | rokups quit (Quit: Connection closed for inactivity) |
21:06:47 | * | athenot joined #nim |
21:14:56 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:15:44 | * | smt joined #nim |
21:17:11 | shashlick | I'm pretty happy with choosenim on Windows 10, what issues have you seen araq |
21:25:17 | Araq | shashlick, they are all issues on github |
21:28:39 | dom96 | Main problem is that choosenim only support 32bit |
21:28:41 | dom96 | *supports |
21:29:06 | dom96 | There is a "Araq's wishlist" milestone that contains all the issues that Araq wants fixed on GitHub :) |
21:31:26 | PMunch | Hmm, doesn't Ormin work properly with Jester? |
21:32:22 | PMunch | A query that works outside of a route works fine, but not one within a route |
21:36:10 | PMunch | Oh wait |
21:36:25 | PMunch | It was just me doing something wrong :P |
21:37:51 | dom96 | PMunch: What were you doing wrong? We might learn from your mistakes :) |
21:38:01 | * | Vladar quit (Quit: Leaving) |
21:38:16 | PMunch | I was just trying to access the id from Jester by doing @id and not @"id" |
21:38:22 | PMunch | Silly mistake |
21:38:59 | PMunch | It would be nice if Jester could check those at compile-time by the way |
21:39:28 | dom96 | well... what if `id` is a string variable? :) |
21:40:00 | * | riidom joined #nim |
21:40:13 | * | riidom quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
21:40:36 | * | riidom joined #nim |
21:41:55 | PMunch | What do you mean? |
21:42:38 | dom96 | var x = "id"; @x is valid |
21:43:27 | PMunch | Oooh |
21:43:33 | PMunch | That's, interesting.. |
21:52:05 | * | miran quit (Quit: Konversation terminated!) |
21:56:29 | * | SitiSchu joined #nim |
21:57:35 | PMunch | Uhm, really strange thing |
21:57:54 | PMunch | I tried to wrap both an integer conversion and the query in a try catch block |
21:58:25 | PMunch | If I have a single except it works fine, but if I have two I get an error saying: Error: type mismatch: got <bool> but expected 'FutureBase = ref FutureBase:ObjectType' |
21:58:31 | PMunch | This is within a Jester route |
21:59:35 | PMunch | Outside the route it works fine |
21:59:44 | dom96 | probably the async try transformation is failing |
22:00:39 | PMunch | Should I create a GitHub issue for it? |
22:01:43 | dom96 | sure |
22:02:00 | PMunch | Hmm, wrapping the whole thing in a template outside the route works fine |
22:02:13 | dom96 | you can do 'if fut.failed:' and check 'fut.error' as a workaround |
22:02:42 | PMunch | Eh, this is example code. I want it to be as little hacky as possible |
22:03:35 | PMunch | GitHub issue for Jester or Nim? |
22:07:48 | * | nsf quit (Quit: WeeChat 2.0.1) |
22:09:35 | dom96 | Nim |
22:09:47 | dom96 | That's not hacky, it's the recommended way |
22:10:26 | dom96 | I will likely change the 'async' macro to tell you to do this if it cannot transform your try statement |
22:10:53 | dom96 | please show your code in your issue btw |
22:15:45 | PMunch | Yeah I'll add it |
22:39:38 | * | SenasOzys quit (Remote host closed the connection) |
22:40:04 | PMunch | Hmm |
22:40:10 | PMunch | This is even stranger |
22:40:17 | PMunch | I can't seem to trigger it without ormin |
22:40:56 | * | SenasOzys joined #nim |
22:41:40 | * | SenasOzys quit (Remote host closed the connection) |
22:42:06 | * | SenasOzys joined #nim |
22:44:34 | PMunch | Updated the issue with a code snippet |
22:56:35 | * | arthurz joined #nim |
22:58:47 | * | leorize quit (Ping timeout: 265 seconds) |
23:06:46 | * | PMunch quit (Quit: leaving) |
23:14:23 | * | jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:31:13 | FromGitter | <mratsim> @PMunch: loopfusion added: https://github.com/numforge/loopfusion |
23:43:27 | FromGitter | <data-man> @mratsim: macro loopfusion -> loopFusion? |
23:49:11 | FromGitter | <mratsim> You can iterate over a variadic number of containers at the same time and so do elementwise operation without temporary allocation |
23:52:51 | FromGitter | <data-man> I about renaming :) |
23:58:17 | FromGitter | <mratsim> oh, yeah why not, in anycase with Nim special casing you can choose the one you want |