00:02:02 | * | guelosk[m] joined #nim |
00:03:42 | * | ofelas quit (Ping timeout: 260 seconds) |
00:10:54 | * | ofelas joined #nim |
00:17:32 | FromDiscord | <Varriount> Hm, is there a way to control where Nim places/looks for the nimcache directory? |
00:18:35 | * | crinny joined #nim |
00:19:14 | Yardanico | --nimcache: |
00:19:27 | Yardanico | --nimcache:/my/path or --nimcache:mypath for creating mypath directory in the cwd |
00:20:28 | crinny | how can i compile library to shared object and simply load function from it in nim, not c or c++? |
00:20:40 | FromDiscord | <Rika> --app:lib |
00:20:40 | Yardanico | crinny: the same way really :P |
00:20:50 | Yardanico | you still need {.exportc.} |
00:21:05 | Yardanico | but if your app wants to have more than 1 nim binary it's better to also use nimrtl |
00:21:07 | Yardanico | so binaries are smaller |
00:21:15 | Yardanico | https://nim-lang.org/docs/nimc.html#dll-generation |
00:22:04 | ForumUpdaterBot | New thread by HashBackupJim: Choosing between generic and specific fn, see https://forum.nim-lang.org/t/6560 |
00:22:57 | crinny | found this example https://github.com/sdwfrost/nim-shared-object-example, there are examples of dynlib and exportc, both unfortunately don't work |
00:24:41 | Yardanico | https://github.com/Yardanico/nim-snippets/tree/master/clib |
00:24:54 | Yardanico | it's making a shared lib from nim and loading it from C |
00:25:24 | crinny | but i need to load from nim |
00:25:26 | Yardanico | basically you do {.exportc, dynlib.} to all procs you wish to export |
00:25:29 | Yardanico | crinny: there's no difference |
00:25:36 | Yardanico | then in nim you would do {.importc, dynlib.} |
00:26:39 | * | lritter quit (Ping timeout: 258 seconds) |
00:27:05 | * | lritter joined #nim |
00:31:06 | crinny | .dynlib. will be superfluous |
00:31:57 | crinny | {.push exportc, dynlib.}proc hello(x: int): bool = if x == 1: return true elif x == 2: return false |
00:32:00 | crinny | proc hello(x: int): bool {.importc.}echo hello(1)echo hello(2) |
00:32:29 | crinny | so this simple example doesn't work ... |
00:32:59 | Yardanico | crinny: why why it will be superfluous? it won't be |
00:33:06 | Yardanico | it's needed to actually export/import from a dynamic library |
00:33:16 | Yardanico | unless you link with .so |
00:34:18 | crinny | oh well |
00:34:21 | crinny | thanks! |
00:34:35 | Yardanico | crinny: just tested, it works just fine |
00:34:40 | Yardanico | a.nim |
00:34:41 | Yardanico | proc hello(x: int): bool {.exportc, dynlib.} = result = x == 1 |
00:34:48 | Yardanico | b.nim: proc hello(x: int): bool {.importc, dynlib: "./liba.so".} |
00:34:51 | Yardanico | and then echo hello(5) |
00:35:07 | Yardanico | dynlib like that because you can't load a dynlib from the same directory on linux by default (it's not in PATH) |
00:35:25 | Yardanico | of course you can use push/pop instead to not repeat |
00:35:51 | Yardanico | also be careful when working with GC'd types - it's better if you use ARC, but then you'll still need to GC_ref your GC'd types before passing them from one nim app/lib to other nim app/lib |
00:36:48 | FromDiscord | <Varriount> Yardanico: ARC will make working with COM a lot easier, since COM's memory model is refcount based. |
00:37:05 | Yardanico | well you can use destructors with refc as well |
00:37:11 | Yardanico | so what's stopping you rn ? :P |
00:37:14 | Prestige | Is there a way to iterate over a seq inside of a macro? |
00:37:27 | Yardanico | Prestige: you mean literally iterate or create AST to iterate over a seq? |
00:37:35 | Yardanico | if first one, just iterate over it the same way as you would usually do |
00:37:36 | FromDiscord | <Varriount> @Avahe Is the sequence static, or an expression of a sequence literal? |
00:37:38 | Prestige | literally iterate |
00:37:44 | Yardanico | just "for x in myseq: do stuff" |
00:37:48 | Yardanico | there's no difference |
00:38:44 | * | deech joined #nim |
00:39:31 | Prestige | hmm maybe just a typing issue then? I thought it was converted to a NimNode implicitly |
00:39:45 | Yardanico | if you pass a seq to a macro - it is converted to nim node |
00:39:50 | Yardanico | unless you do it as "static seq[string]" for example |
00:39:56 | Yardanico | then it'll be available as a normal seq in the macro |
00:40:04 | Prestige | oh okay, thanks |
00:41:05 | deech | When passing the `rawProc` and `rawEnv` of a closure to a C function how do I inform the Nim `arc` system the closure environment is no longer needed? Freeing it on the C side seems like it may cause memory corruption. |
00:41:39 | Yardanico | GC_unref maybe? not sure if it'll work |
00:41:55 | Yardanico | and why "the closure environment is no longer needed"? |
00:42:01 | Yardanico | if you pass it to C, you still need it to be allocated, no? |
00:43:10 | deech | Yes, the C/C++ side adds it to an array of callbacks and runs them. At a certain point they are no longer needed. |
00:45:42 | deech | Doesn't seem like `GC_unref` will work. It seems to only work on `string`, `seq[T]` and `ref T`. How does arc track closures? |
00:45:57 | Yardanico | i don't honestly know :P |
00:46:23 | FromDiscord | <Varriount> deech: Even if you pass the rawProc/rawEnv pair, you can't deallocate them until the C++ side is finished calling them. |
00:46:46 | Yardanico | well, you can always export some free proc from nim side which will destroy a given closure :P |
00:47:27 | Yardanico | anyway, at least this time i have a smaller reproducable for (probably) a cursorifier bug |
00:47:36 | Yardanico | from RBTreeNim, it's at 380 lines right now |
00:49:12 | * | laqq3_ joined #nim |
00:49:52 | FromDiscord | <Varriount> deech: If you can't get the C++ side to tell you when it's done with the callbacks, then it's going to be quite complicated to perform any sort of cleanup (files, sockets, etc.), |
00:53:40 | shashlick | @leorize - any chance of continuing work on https://github.com/nim-lang/nimble/pull/768? |
00:53:41 | disbot | ➥ nimscript{wrapper,api}: don't copy generated script to package directory |
00:55:27 | * | theelous3 quit (Read error: Connection reset by peer) |
00:58:18 | * | laqq3_ quit (Ping timeout: 256 seconds) |
01:04:11 | * | krux02_ quit (Remote host closed the connection) |
01:13:21 | shashlick | Scrubbing nimble issues - anyone with big complaints please step forward and provide your feedback on what should be prioritized |
01:14:22 | * | mbuchel joined #nim |
01:14:37 | mbuchel | !repo xmpp |
01:14:37 | disbot | https://github.com/benumbed/nimstrophe -- 9nimstrophe: 11Wrapper over the libstrophe C XMPP library 15 0⭐ 0🍴 |
01:15:17 | disruptek | does it work? |
01:15:26 | mbuchel | no clue |
01:15:43 | mbuchel | another project i am working on requires xmpp, so i have to find a nim library for that |
01:15:58 | mbuchel | if anyone has a better suggestion let me know |
01:16:10 | disruptek | that one looks fairly complete. |
01:16:19 | mbuchel | great thanks |
01:17:22 | disruptek | not terribly idiomatic, but eh. |
01:18:24 | mbuchel | does dnylib pragma allow you to forget the linker in the linker script? |
01:18:32 | mbuchel | i mean inside the nim.cfg |
01:18:42 | disruptek | sure. |
01:18:53 | disruptek | .passL. |
01:23:25 | FromDiscord | <Zachary Carter> Does anyone understand this wiki entry? https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim |
01:24:37 | FromDiscord | <Zachary Carter> I have a rough understanding of vtables and how virtual functions work in C++ but I'm not really understanding how this works - I have some example code that is failing |
01:26:21 | * | apahl quit (Ping timeout: 272 seconds) |
01:28:02 | * | apahl joined #nim |
01:29:16 | mbuchel | thank you |
01:31:51 | * | crinny quit (Remote host closed the connection) |
01:36:08 | * | rockcavera joined #nim |
01:54:16 | FromDiscord | <Zed> hey @treeform is flippy 0.4.5 stable? When loading an image with loadImage() i'm getting a `signature mismatch` and then an `illegal storage access` error. |
01:55:42 | Yardanico | can you paste full errors? |
01:55:49 | FromDiscord | <Zed> looking further into the error it seems to be a problem at line 106 in flippy, when it's assigning the png.width to the image object. |
01:55:51 | FromDiscord | <Zed> yeah |
01:56:14 | FromDiscord | <Zed> sent a long message, see http://ix.io/2s7i |
01:56:47 | Yardanico | are you using arc by any chance? |
01:56:55 | FromDiscord | <Zed> no |
01:57:13 | FromDiscord | <Zed> unless flippy uses it? |
01:57:19 | Yardanico | nono, it can't use arc unless you enable it :) |
01:57:31 | FromDiscord | <Zed> ah, well then no im not |
01:57:37 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
01:57:55 | Yardanico | and generally you can open an issue in flippy tracker because treeform might not see your message here :P |
01:58:55 | FromDiscord | <Zed> will do |
01:59:26 | FromDiscord | <Anuke> Would it be faster to pass an `array[32]` into a proc directly with `[1, 2, 3, ...]`, or use a global `array[32]` variable, change its contents and pass it into a proc that accepts `var array[32]`? |
01:59:37 | * | lritter quit (Ping timeout: 264 seconds) |
02:00:11 | Yardanico | well you can always benchmark it :P |
02:00:27 | Yardanico | and just FYI - nim will automatically use pass-by-reference for larger objects |
02:01:39 | Yardanico | http://zevv.nl/nim-memory/ is a good read |
02:16:03 | * | Tlongir joined #nim |
02:17:20 | * | muffindrake quit (Ping timeout: 256 seconds) |
02:19:33 | * | muffindrake joined #nim |
02:22:19 | leorize[m] | shashlick: not anytime soon :P feel free to take over if you have time :) |
02:23:16 | shashlick | ok cool |
02:23:35 | shashlick | how about the important packages CI for nimble - are you able to maintain that? |
02:30:27 | FromDiscord | <Anuke> anything wrong with this benchmark? https://play.nim-lang.org/#ix=2s7o |
02:31:13 | disruptek | anuke: is it fast or slow? |
02:31:26 | FromDiscord | <Anuke> `nim r -d:danger bench.nim` gives me↵Time spent: 3.586466279↵Time spent: 3.696318255 |
02:31:54 | FromDiscord | <Anuke> I'm just wondering if the compiler could potentially be optimizing something away (at a glance) |
02:31:55 | disruptek | i'd recommend my criterion package (lemonboy wrote it). |
02:32:58 | disruptek | doubt it can optimize much away due to the counters. |
02:34:00 | FromDiscord | <Anuke> alright |
02:34:10 | FromDiscord | <Anuke> I'll take a look at criterion next time I need to do a microbenchmark |
02:34:58 | disruptek | what does it do on arc? |
02:36:19 | Yardanico | disruptek: same speeds roughly |
02:36:34 | Yardanico | I mean I wouldn't expect it to behave otherwise |
02:36:36 | Yardanico | array isn't GC'd |
02:36:43 | FromDiscord | <Anuke> The first one gets slightly faster, while the second one gets slightly slower |
02:36:45 | FromDiscord | <Anuke> Time spent: 3.435974582↵Time spent: 3.945454443 |
02:37:04 | Yardanico | (i'm on latest devel) |
02:37:16 | disruptek | that makes a little more sense. |
02:37:47 | FromDiscord | <Anuke> I'm on devel from a few days ago |
02:47:19 | Yardanico | jesus I minimized (mostly) this rbtreenim (probably) arc cursorifier bug |
02:47:24 | Yardanico | and I don't understand wtf it's doing |
02:47:31 | Yardanico | but it's doing something which makes cursorifier not happy :P |
02:47:54 | Yardanico | since it works on nim compiler with arc before the optimizer/cursorifier pr |
02:48:07 | shashlick | ast.repr removes all comments and newlines 😞 |
02:48:19 | Yardanico | well, it'll remove all non-doc comments of course |
02:48:26 | Yardanico | and newlines are useless for the compiler really |
02:48:27 | shashlick | wish there was a way to load a nim file, get its AST, do some modifications and write it out |
02:48:48 | Yardanico | I'm pretty sure the lexer just ignores non-doc comments |
02:49:09 | Yardanico | yeah, it does |
02:49:27 | shashlick | still wondering what nimpretty does then |
02:49:27 | leorize | shashlick: study nimpretty for that :P |
02:49:43 | shashlick | basically looking at https://github.com/nim-lang/nimble/issues/612 |
02:49:44 | disbot | ➥ Command to add dependencies into .nimble file |
02:49:57 | FromDiscord | <treeform> @Zed I need to make width read only. |
02:50:00 | shashlick | if we could load the nimble file as an ast, we can do all these things |
02:50:16 | FromDiscord | <treeform> @Zed you should not be able to assignee it, what are you trying to do? |
02:54:29 | shashlick | lexer does different stuff with -d:nimpretty |
02:55:01 | shashlick | so the code is there, I don't see why it shouldn't always be available - at least with a runtime flag |
02:56:08 | leorize[m] | @Anuke they should be the same: https://godbolt.org/z/qETbM4 |
02:56:23 | leorize[m] | godbolt shows that the generated assembly are more or less equivalent |
02:57:39 | leorize | oh I was only looking at the proc body :P |
02:58:18 | leorize | wait what is this benchmark trying to bench? :P |
02:58:37 | FromDiscord | <Zed> @treeform get the image width and then divide it and assign result to variable |
02:59:05 | FromDiscord | <Zed> But that's not the issue, the image won't even load in |
02:59:13 | Yardanico | leorize: performance overhead of copy vs pass-by-reference for array[32, float32] |
02:59:32 | leorize | there aren't any difference |
02:59:33 | Yardanico | passing array[32, float32] vs having a global variable and passing var array[32, float32] |
03:00:10 | leorize | the benchmark code is different for the two calls, so it came up as invalid |
03:00:58 | leorize | asm for the two procedures are the same, since arrays will always be passed by reference (afaik) |
03:01:15 | leorize | to actually account for the differences, put the array in an object |
03:02:45 | Yardanico | i don't get it at all, but this triggers a crash with arc/orc on latest devel, took like 2 hours to minimize lol (because I don't really understand all the algorithms in the RBTreeNim lib) |
03:02:48 | Yardanico | https://gist.github.com/Yardanico/6ea113d40d8453201fbe812400ad2006 |
03:03:42 | Yardanico | I don't understand what it really does, but all I know is that it crashes when it (probably) shouldn't :D |
03:04:16 | FromDiscord | <Anuke> > arrays will always be passed by reference↵hmmm, but could there be slightly less overhead caused by the fact that I'm reusing an array instead of allocating a new one on the stack? |
03:04:58 | leorize | yes |
03:05:22 | leorize | the array would then be in the cpu cache by the time you reuse it |
03:05:45 | leorize | but that actually applies to both cases |
03:06:33 | leorize | this is why you need to test ~100 rounds for a conclusive average |
03:07:19 | FromDiscord | <treeform> @Zed code example? |
03:07:52 | FromDiscord | <Zed> I made an issue on github with some more info |
03:08:15 | FromDiscord | <Zed> But ` var image = loadImage(path)` |
03:08:24 | FromDiscord | <Zed> Won't even work |
03:08:29 | leorize | @Anuke usually for this case just read the generated C/ASM, you will see the difference there first, then do runtime testing to confirm it affects performance |
03:10:17 | * | rockcavera quit (Remote host closed the connection) |
03:11:13 | FromDiscord | <Anuke> noted. |
03:11:17 | FromDiscord | <Anuke> (honestly this is all probably micro-optimization on my part, I don't think it will be my bottleneck by a long shot) |
03:13:13 | leorize | don't micro optimize until it's the only thing left you can optimize :P |
03:15:15 | * | FromDiscord quit (Remote host closed the connection) |
03:15:29 | * | FromDiscord joined #nim |
03:15:49 | leorize | Yardanico: the bridge seems to be crashing every once in a while :p |
03:15:57 | Yardanico | leorize: well, not that often really :) |
03:15:59 | Yardanico | and yes, I know |
03:16:07 | leorize | oom? |
03:16:30 | Yardanico | rarely yes, but usually dimscord bugs :P |
03:17:16 | Yardanico | well, I didn't update it to latest dimscord version yet |
03:17:39 | * | rockcavera joined #nim |
03:18:14 | FromDiscord | <Rika> Yardanico what was that gui library you were working on a few days (?) ago |
03:18:22 | Yardanico | Sciter |
03:18:43 | FromDiscord | <Rika> Nice thanks |
03:18:53 | FromDiscord | <Rika> You were working on bindings no? |
03:21:34 | Yardanico | a bit |
03:21:48 | Yardanico | https://github.com/Yardanico/nsciter |
03:22:07 | Yardanico | added two examples in the last commit a week ago |
03:22:31 | Yardanico | its still very low level |
03:38:50 | FromDiscord | <XeroOl> is there a way to read files at compile time? |
03:39:13 | disruptek | staticRead() |
03:39:23 | FromDiscord | <Zed> read files at compile time? |
03:39:34 | FromDiscord | <XeroOl> the use case would be: this |
03:39:37 | FromDiscord | <XeroOl> ` let frag = static: "my_frag_shader.glsl".open.readAll ` |
03:39:44 | FromDiscord | <XeroOl> (edit) 'be: this' => 'be this:' |
03:40:07 | FromDiscord | <XeroOl> it looks like staticRead is what I'm looking for |
03:41:15 | * | NimBot joined #nim |
03:43:45 | * | narimiran joined #nim |
03:44:36 | ForumUpdaterBot | New thread by Foldl: Where is the release note for v1.2.4?, see https://forum.nim-lang.org/t/6561 |
03:56:32 | * | vicfred quit (Quit: Leaving) |
04:00:35 | * | mbuchel quit (Quit: WeeChat 2.8) |
04:04:58 | * | mdubs joined #nim |
04:05:28 | mdubs | how mature are the db_ modules. Are they ready for production? |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:39 | * | supakeen joined #nim |
04:11:38 | Yardanico | mdubs: db_sqlite is for sure |
04:11:59 | Yardanico | but really they're mostly wrappers |
04:12:44 | leorize | !repo ndb |
04:12:45 | disbot | https://github.com/xzfc/ndb.nim -- 9ndb.nim: 11A db_sqlite fork with a proper typing 15 25⭐ 5🍴 |
04:20:16 | FromDiscord | <tomck> How can i add to a `ref seq[T]`? |
04:20:41 | leorize | `s[].add` |
04:20:42 | FromDiscord | <tomck> It's complaining about wanting a `var seq[T]` in `proc add` - how can i convert a `ref seq[T]` to a `var seq[T]`? |
04:20:45 | leorize | dereference it |
04:20:48 | FromDiscord | <tomck> ahhh |
04:21:20 | * | nsf joined #nim |
04:23:56 | FromDiscord | <flywind> Why does `travis-ci` always fail in windows? |
04:23:58 | FromDiscord | <flywind> https://travis-ci.org/github/iocrate/netkit/jobs/709860525 |
04:25:01 | Prestige | Error: Unable to extract. Error was 'Cannot create a file when that file already exists. |
04:25:49 | shashlick | this is an open bug - i have a fix in a PR |
04:26:21 | shashlick | https://github.com/dom96/choosenim/pull/201 |
04:26:22 | disbot | ➥ Fix #199 - missing dlls |
04:26:37 | FromDiscord | <flywind> Thanks, shashlick. |
04:41:04 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
04:41:11 | * | njoseph joined #nim |
04:41:13 | * | Tongir joined #nim |
04:44:02 | * | Tlongir quit (Ping timeout: 260 seconds) |
04:51:32 | * | apahl quit (Ping timeout: 260 seconds) |
04:52:19 | * | apahl joined #nim |
05:05:57 | FromDiscord | <Doof Doof> wow this is pretty great |
05:12:09 | * | rockcavera quit (Remote host closed the connection) |
05:12:15 | FromDiscord | <Elegant Beef> This being? |
05:18:45 | FromDiscord | <Yardanico> That |
05:19:56 | FromDiscord | <Elegant Beef> Ah thanks yard, i was so lost |
05:20:44 | FromDiscord | <Yardanico> Np, yw |
05:28:27 | * | mdubs quit (Remote host closed the connection) |
05:31:42 | FromDiscord | <Doof Doof> Nim lol |
05:32:42 | FromDiscord | <Elegant Beef> Ah |
05:32:44 | FromDiscord | <Elegant Beef> Yes it is |
05:35:27 | * | aenesidemus_ joined #nim |
05:38:48 | * | aenesidemus quit (Ping timeout: 256 seconds) |
05:44:43 | * | maier joined #nim |
05:56:50 | bung | how to get variable memory size, if I dont want loop the seq of seq |
05:59:49 | FromDiscord | <Rika> ? |
05:59:52 | FromDiscord | <Rika> what do you mean> |
06:00:50 | * | hoijui joined #nim |
06:01:22 | bung | eg a variable is aSeq[bSeq[T]] I dont want check aSeq.len and bSeq.len |
06:03:32 | FromDiscord | <Rika> well from what i know seqs dont loop through their contents to get the length |
06:04:45 | bung | I want compare size to another aSeq[bSeq[T]] |
06:11:11 | FromDiscord | <Elegant Beef> well in this case you'd have to loop aSeq to get element count then multiply by sizeOf(T) |
06:13:22 | bung | yeah, I need loop |
06:15:47 | FromDiscord | <Rika> @Elegant Beef why? seq.len doesnt need to loop afaik? |
06:16:02 | FromDiscord | <Elegant Beef> no it doesnt but you need to get the inner seq elements |
06:16:13 | FromDiscord | <Elegant Beef> they arent uniform size |
06:17:02 | FromDiscord | <Rika> ok |
06:17:12 | FromDiscord | <Rika> its unsafe casting time |
06:17:16 | FromDiscord | <Elegant Beef> Lol |
06:17:46 | FromDiscord | <Elegant Beef> if it was a seq of arrays it'd be pretty simple to do array length * seq length * size of T |
06:23:27 | * | letto_ quit (Quit: Konversation terminated!) |
06:25:22 | * | letto joined #nim |
06:26:53 | * | pietroppeter joined #nim |
06:29:34 | * | _ofelas joined #nim |
06:31:46 | * | ofelas quit (Ping timeout: 256 seconds) |
06:42:26 | * | sentreen_ joined #nim |
06:44:05 | * | solitudesf joined #nim |
06:44:11 | * | sentreen quit (Ping timeout: 240 seconds) |
06:44:11 | * | arecacea1 quit (Remote host closed the connection) |
06:44:16 | * | fanta1 joined #nim |
06:44:57 | * | arecacea1 joined #nim |
06:49:22 | * | marnix joined #nim |
06:51:24 | * | marnix quit (Read error: Connection reset by peer) |
06:54:35 | * | marnix joined #nim |
07:01:42 | * | marnix quit (Ping timeout: 260 seconds) |
07:02:27 | * | marnix joined #nim |
07:03:01 | voltist | Ooo 5 year old Nim code |
07:03:08 | voltist | `expr` causes lots of problems |
07:03:53 | * | Vladar joined #nim |
07:04:00 | bung | any reason open and save png larger than original png file while using nimPNG ? |
07:04:55 | voltist | Compression options? |
07:07:00 | bung | I check makePNGEncoder the defualt settings seems good |
07:21:54 | Araq | voltist, 'expr' is now 'untyped' |
07:22:05 | Araq | and 'stmt' is 'untyped' too |
07:23:35 | * | Zectbumo quit (Remote host closed the connection) |
07:26:53 | * | marnix quit (Read error: Connection reset by peer) |
07:27:49 | * | marnix joined #nim |
07:32:09 | * | marnix quit (Read error: Connection reset by peer) |
07:32:39 | * | marnix joined #nim |
07:35:05 | * | marnix quit (Read error: Connection reset by peer) |
07:35:24 | * | marnix joined #nim |
07:42:47 | voltist | Araq: Thanks |
07:47:12 | * | fanta1 quit (Quit: fanta1) |
07:56:08 | * | Senketsu joined #nim |
08:04:40 | * | Senketsu quit (Read error: Connection reset by peer) |
08:19:32 | * | oddp joined #nim |
08:23:12 | * | fredrikhr joined #nim |
08:26:36 | * | marnix quit (Read error: Connection reset by peer) |
08:26:56 | * | marnix joined #nim |
08:29:19 | * | marnix quit (Read error: Connection reset by peer) |
08:29:44 | * | marnix joined #nim |
08:36:37 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
08:42:49 | * | endragor quit (Ping timeout: 264 seconds) |
09:02:39 | * | sentreen joined #nim |
09:05:53 | * | sentreen_ quit (Ping timeout: 265 seconds) |
09:09:41 | Araq | ping @mratsim |
09:11:37 | * | marnix quit (Ping timeout: 264 seconds) |
09:11:45 | * | marnix joined #nim |
09:27:37 | * | abm joined #nim |
09:27:51 | bung | @jangko you there? I try to implement zopflipng with nimPNG , the best filter strategy results 2725 bytes, the original is 2511 bytes, any idea? |
09:30:07 | * | nikita` joined #nim |
09:37:30 | * | arecacea1 quit (Remote host closed the connection) |
09:38:22 | * | arecacea1 joined #nim |
09:51:07 | * | marnix quit (Read error: Connection reset by peer) |
09:51:49 | bung | @Araq done |
09:52:56 | * | marnix joined #nim |
09:59:48 | * | marnix quit (Read error: Connection reset by peer) |
10:00:47 | * | marnix joined #nim |
10:02:11 | * | opDispatch quit (Quit: Konversation terminated!) |
10:08:59 | * | arecacea1 quit (*.net *.split) |
10:08:59 | * | nikita` quit (*.net *.split) |
10:09:00 | * | oddp quit (*.net *.split) |
10:09:01 | * | letto quit (*.net *.split) |
10:09:06 | * | zedeus_ quit (*.net *.split) |
10:09:11 | * | xet7 quit (*.net *.split) |
10:09:12 | * | vesper11 quit (*.net *.split) |
10:09:18 | * | clemens3 quit (*.net *.split) |
10:09:52 | * | arecacea1 joined #nim |
10:09:52 | * | nikita` joined #nim |
10:09:52 | * | oddp joined #nim |
10:09:52 | * | letto joined #nim |
10:09:52 | * | zedeus_ joined #nim |
10:09:52 | * | xet7 joined #nim |
10:09:52 | * | vesper11 joined #nim |
10:09:52 | * | clemens3 joined #nim |
10:10:35 | * | clemens3 quit (Max SendQ exceeded) |
10:11:37 | * | jken quit (Ping timeout: 264 seconds) |
10:11:49 | * | clemens3 joined #nim |
10:13:32 | * | mwbrown quit (Ping timeout: 244 seconds) |
10:14:10 | * | jken joined #nim |
10:15:47 | * | mwbrown joined #nim |
10:17:46 | * | Tlanger joined #nim |
10:19:28 | * | arecacea1 quit (Read error: Connection reset by peer) |
10:19:51 | * | arecacea1 joined #nim |
10:20:30 | * | Tongir quit (Ping timeout: 260 seconds) |
10:33:46 | * | marnix quit (Ping timeout: 246 seconds) |
10:34:38 | * | marnix joined #nim |
10:36:35 | * | marnix quit (Read error: Connection reset by peer) |
10:37:06 | * | marnix joined #nim |
10:45:43 | alehander92 | ojj |
10:45:47 | alehander92 | morning from pomorie |
10:46:17 | alehander92 | lunch time* |
10:48:49 | * | marnix quit (Ping timeout: 246 seconds) |
10:49:35 | * | marnix joined #nim |
10:54:02 | * | marnix quit (Read error: Connection reset by peer) |
10:54:51 | * | marnix joined #nim |
10:58:27 | * | oculuxe joined #nim |
10:58:46 | * | oculux quit (Ping timeout: 258 seconds) |
11:37:25 | * | rockcavera joined #nim |
11:47:37 | Araq | shashlick, nimble update wNim |
11:47:37 | Araq | Tip: 1 messages have been suppressed, use --verbose to show them. |
11:47:37 | Araq | Error: C:\Users\rumpf\projects\nimble\src\nimble.nim(1201) nimble |
11:47:37 | Araq | ... C:\Users\rumpf\projects\nimble\src\nimble.nim(1132) doAction |
11:47:38 | Araq | ... C:\Users\rumpf\projects\nimble\src\nimble.nim(38) refresh |
11:47:39 | Araq | ... Package list with the specified name not found. |
11:48:01 | Araq | (yes, I know this is not how 'nimble update' works.) |
11:48:43 | Araq | But how come Nimble doesn't know stack traces are for bugs and not for Nimble's users. |
11:56:04 | Araq | wow I had no idea how effective cursor inference really is for wNim |
11:58:27 | * | letto quit (Quit: Konversation terminated!) |
12:00:15 | * | letto joined #nim |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:43 | * | supakeen joined #nim |
12:12:54 | * | hoijui quit (Ping timeout: 256 seconds) |
12:14:00 | FromDiscord | <dom96> Araq: because you've got a nimble built in debug mode? |
12:14:38 | Araq | do I? maybe, I thought I had a release build :P |
12:15:25 | FromDiscord | <dom96> with stack traces? lol |
12:15:53 | Araq | you never know, --stackTrace:on can be enabled with -d:release |
12:17:40 | * | hoijui joined #nim |
12:19:28 | FromGitter | <sheerluck> https://play.nim-lang.org/#ix=2s8N |
12:32:49 | * | fanta1 joined #nim |
12:33:40 | FromDiscord | <Clyybber> @Yardanico Didn't you encounter this crash https://github.com/nim-lang/Nim/issues/15005 too? |
12:33:43 | disbot | ➥ [ARC] Last optimizer crash the autolayout in wNim. ; snippet at 12https://play.nim-lang.org/#ix=2s8Q |
12:44:08 | shashlick | I have stack taxes on with nimterop - super useful when users report bugs |
12:45:01 | shashlick | Was debugging a nimble issue yesterday me had to reproduce the issue with doAssert to know what was happening |
12:46:25 | * | Tlanger quit (Ping timeout: 264 seconds) |
12:51:20 | * | marnix quit (Ping timeout: 246 seconds) |
12:52:01 | * | Vladar quit (Quit: Leaving) |
12:52:13 | * | marnix joined #nim |
13:02:54 | * | narimiran quit (Ping timeout: 260 seconds) |
13:06:13 | * | marnix quit (Read error: Connection reset by peer) |
13:07:09 | * | marnix joined #nim |
13:16:19 | * | krux02 joined #nim |
13:19:40 | FromDiscord | <mratsim> taxes? :p |
13:20:18 | FromDiscord | <mratsim> @Araq, you pinged me? |
13:20:44 | Araq | yeah, any experience / opinion on the "disruptor"? |
13:20:56 | FromDiscord | <mratsim> The MPSC queue? |
13:21:51 | Araq | yes |
13:22:14 | Araq | well it's multi producer, multi consumer afaik |
13:22:45 | FromDiscord | <mratsim> The issue with Java queues is that they can assume a multithreaded GC |
13:23:43 | * | vicfred joined #nim |
13:24:17 | Araq | well we got Isolated[T] which you can put into queues without copying |
13:24:52 | * | hoijui quit (Ping timeout: 260 seconds) |
13:26:28 | FromDiscord | <mratsim> My old MPMC lock-based channels makes a good base that doesn't burden maintenance/debugging with atomics concerns: https://github.com/mratsim/weave/blob/v0.1.0/unused/channels/channels_legacy.nim |
13:27:08 | FromDiscord | <mratsim> basically based on the 2 lock based channel from Michael and Scott paper |
13:28:23 | Araq | well the disruptor's design is inspiring |
13:28:56 | Araq | there is beauty in a bounded-size queue so that producers are throttled automatically etc |
13:29:14 | FromDiscord | <mratsim> my old MPMC queue is bounded |
13:29:27 | FromDiscord | <mratsim> that's called backpressure btw |
13:29:54 | Araq | yes, "backpressure", I know |
13:30:10 | FromDiscord | <mratsim> https://github.com/mratsim/blocksmith/blob/7009e094bff6b322a8a8547b121c3ffa0cddbe2b/architecture_phase0.md#backpressure |
13:31:41 | Araq | and it offers batch processing. what's not to like? |
13:38:45 | * | Vladar joined #nim |
13:40:04 | * | hoijui joined #nim |
13:40:58 | FromDiscord | <mratsim> AFAIK, I've seen a lot of hype around disruptor but no figures against Facebook Folly or MoodyCamel's queue |
13:41:13 | FromDiscord | <mratsim> something like this: https://moodycamel.com/blog/2014/a-fast-general-purpose-lock-free-queue-for-c++ |
13:54:06 | FromDiscord | <xsouxsou29> Hello guys,↵I have heard of a project that binds torch in nim to do machine learning. I could find several repo on git but none of them seems maintained. do you know why ? Is there a step where they decided to quit because it is a bad approach ? |
13:54:20 | FromDiscord | <xsouxsou29> (edit) 'git' => 'github' |
13:54:32 | FromDiscord | <mratsim> nimtorch was a startup project but funding issues |
13:55:10 | FromDiscord | <mratsim> minitorch is a wrapper project but I can't automate easily recursive bindings from the C++ headers |
13:55:29 | FromDiscord | <mratsim> I can do it manually but well, it's a bit tedious |
13:56:23 | FromDiscord | <xsouxsou29> I would love to use your lib @mratsim (arraymancer), but if I get it correctly there is some math tools that are missing so far (invert matrices ... ). I feel confident to implement ML once this is done, but I have no idea how to efficiently inverse a matrix :p |
13:57:17 | FromDiscord | <mratsim> https://github.com/mratsim/Arraymancer/blob/master/src/linear_algebra/linear_systems.nim#L20 |
13:58:41 | FromDiscord | <xsouxsou29> Waouh it is really how people do it ? I was expecting some particular function just for that because of some obscur optim) ! Dude that is great 😄 |
13:58:55 | FromDiscord | <xsouxsou29> I might go into arraymancer way sooner than I expected 🙂 |
14:00:00 | FromDiscord | <mratsim> I can provide a specific matrix inverse function as well, and I have the LU decomposition primitive that can be used to do matrix inversion: https://github.com/mratsim/Arraymancer/blob/master/src/linear_algebra/decomposition.nim#L93-L122 |
14:00:32 | FromDiscord | <mratsim> but I'm not aware of an algorithm that directly uses matrix inversion for ML rather than just QR, LU or SVD decomposition |
14:00:37 | FromDiscord | <mratsim> what were you thinking of? |
14:01:08 | FromDiscord | <xsouxsou29> No idea :p That is why I wanted to take a lib with it already implemented and build on top of that 🙂 |
14:13:54 | * | waleee-cl joined #nim |
14:15:25 | * | Shucks joined #nim |
14:23:14 | FromDiscord | <xsouxsou29> thanks for your answer @mratsim 🙂 |
14:27:30 | * | hoijui quit (Remote host closed the connection) |
14:29:46 | * | maier quit (Ping timeout: 256 seconds) |
14:30:39 | * | Shucks quit (Quit: Leaving) |
14:33:46 | FromDiscord | <Yardanico> @Araq by the way, about crashes - I made https://gist.github.com/Yardanico/6ea113d40d8453201fbe812400ad2006 which crashes on arc/orc and doesn't crash on arc/orc before the optimizer pr |
14:35:51 | FromDiscord | <Yardanico> It's from RBTreeNim package, minimised as far as I could |
14:36:20 | FromDiscord | <Yardanico> Although I'm not sure if I retained the original problem or not |
14:37:10 | FromDiscord | <Yardanico> It also works with -d:useMalloc, but crashes somewhere in the allocator without it |
14:38:53 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
14:39:13 | * | pbb joined #nim |
14:40:13 | * | fanta1 quit (Quit: fanta1) |
14:46:11 | FromGitter | <gogolxdong> I've met this many times ,``` ⏎ /root/.nimble/pkgs/jester-0.4.3/jester.nim(482, 8) Error: type mismatch: got <proc (req: sink Request): Future[system.void]{.closure, gcsafe, locks: <unknown>.}, ⏎ Settings> ⏎ but expected one of: ⏎ proc run(onRequest: OnRequest) ... [https://gitter.im/nim-lang/Nim?at=5f15ae328e9a3a6ef0a3cff7] |
14:49:35 | * | lritter joined #nim |
14:51:21 | * | theelous3 joined #nim |
14:52:58 | * | maier joined #nim |
14:54:19 | disruptek | turn off sink inference. |
14:57:07 | * | maier quit (Ping timeout: 240 seconds) |
14:59:13 | * | NimBot joined #nim |
15:01:09 | FromDiscord | <Yardanico> @gogolxdong this is easily fixable if you add nosinks pragma to needed closures |
15:01:57 | disruptek | delete should be used for O(n) operations because it's longer and more expicit, while del should be O(1). |
15:06:25 | FromGitter | <gogolxdong> how to turn off sink |
15:10:59 | * | marnix quit (Ping timeout: 240 seconds) |
15:11:17 | shashlick | `--sinkInference:on|off` |
15:12:53 | * | marnix joined #nim |
15:16:59 | * | marnix quit (Ping timeout: 240 seconds) |
15:17:18 | * | marnix joined #nim |
15:25:36 | FromDiscord | <kodkuce> https://media.discordapp.net/attachments/371759389889003532/734793133157646376/2020-07-20_172301.png |
15:25:56 | Yardanico | does it compile or not? |
15:25:57 | FromDiscord | <kodkuce> hmm this heppends when i import pg (treeforms postgresql) |
15:26:20 | FromDiscord | <kodkuce> yep ofc, am just asking should i take care about this or just ignore |
15:26:33 | FromDiscord | <kodkuce> duno what locks its asking for |
15:26:35 | Yardanico | if it compiles - ignore, it's just a nimsuggest bug then :P |
15:26:47 | FromDiscord | <kodkuce> ok 🙂 |
15:29:17 | FromDiscord | <Shucks> nim needs advertising |
15:29:37 | Yardanico | well, everyone can do it :) |
15:29:38 | FromDiscord | <kodkuce> when i finish my game i will post it evrywhere 🙂 |
15:29:41 | Yardanico | just make nim projects |
15:30:10 | FromDiscord | <kodkuce> just sux atm for client am using godot, but will try to port to some pure nim too |
15:31:41 | FromDiscord | <Shucks> I mean srsly, nim is beautiful, easy and performant. I don't get why this community is that small. |
15:31:56 | Yardanico | because a lot of people are lazy |
15:32:04 | Yardanico | they just want to use existing libraries for everything :) |
15:32:06 | Yardanico | Araq: https://github.com/nim-lang/Nim/issues/15024 |
15:32:07 | FromDiscord | <lqdev> a lot of people criticise it for stupid shit |
15:32:08 | disbot | ➥ [ARC] Weird crash after the optimizer PR ; snippet at 12https://play.nim-lang.org/#ix=2s9m |
15:32:13 | FromDiscord | <kodkuce> me=lazy 100% |
15:32:15 | FromDiscord | <lqdev> like case insensitivity |
15:32:21 | Yardanico | @lqdev well I don't think it's the majority, it's just the "loud 1%" |
15:32:33 | FromDiscord | <lqdev> well, maybe |
15:32:38 | FromDiscord | <lqdev> i'm not good at statistics |
15:33:01 | FromDiscord | <Vindaar> > because a lot of people are lazy↵could also be interpreted as us being lazy not advertising nim enough 😉 |
15:33:04 | FromDiscord | <kodkuce> i dident like whitespaces hated it even in python, now i got used to it so now i hate breakets |
15:33:06 | FromDiscord | <lqdev> but we have 1000 people on this server, maybe 15 of which are active |
15:33:07 | FromGitter | <brentp> I am seeing compiler error `Error: internal error: invalid kind for lastOrd(tyLent)` when I run under koch temp c, I see this: https://pastebin.com/raw/zJt2FSfr ⏎ how can i get around this? |
15:33:14 | Yardanico | @lqdev exactly |
15:33:27 | FromDiscord | <lqdev> @kodkuce haha same |
15:33:33 | Yardanico | @brentp well, must be a compiler bug then :P |
15:33:47 | FromDiscord | <lqdev> well i wouldn't go as far as to say "i hated whitespace", i just prefered good ol' braces |
15:33:56 | FromDiscord | <lqdev> but still |
15:34:03 | FromDiscord | <lqdev> nim made me love 2 spaces for indentation |
15:34:44 | FromDiscord | <Shucks> std libs are great, macros, templates, inline asm. Whats actually missing. Case insensitive is something I wouldn't recommend aswell but I also never had issues with it so far. |
15:34:59 | FromDiscord | <lqdev> case insensitivity good |
15:35:30 | FromDiscord | <Shucks> auto completion just does that for me anyway lol |
15:35:35 | FromDiscord | <lqdev> yeah |
15:36:31 | FromDiscord | <lqdev> but for people like me who *absolutely despise using PascalCase for anything other than types* nim's case insensitivity rules actually scare off people that'd commit crimes like this |
15:36:41 | FromGitter | <brentp> here's a reproducer: https://pastebin.com/raw/wyqL5KTi |
15:36:48 | Yardanico | @lqdev what about using PascalCase for constants? |
15:36:57 | FromDiscord | <lqdev> Yardanico: yeah that's fine too |
15:37:05 | Yardanico | @brentp it's better for you to submit an issue report :) |
15:37:14 | FromDiscord | <lqdev> i'm talking about methods and *god no* variables |
15:37:18 | FromGitter | <brentp> aye. doing that now |
15:37:19 | Yardanico | oh lol no |
15:37:25 | Yardanico | I only use PascalCase for types and constants (sometimes) |
15:37:30 | FromDiscord | <Shucks> If I would get leorize's plugin running on windows it would be perfect. VSCode's plugin is just unacceptable slow for me |
15:38:00 | FromDiscord | <lqdev> @Shucks don't want to dissapoint ya but leorize's plugin doesn't run that much better |
15:38:09 | FromDiscord | <lqdev> they both use nimsuggest |
15:38:34 | FromDiscord | <Shucks> Yea I guess. I felt like it was better on my linux machine |
15:38:43 | FromDiscord | <lqdev> but leorize's plugin has some architectural advantages, like *actually knowing how to use nimsuggest and not eat 10GB of ram with 10 files open* |
15:39:56 | FromDiscord | <Shucks> Alright. Never had any success with nimlsp aswell. Either on vim or vscode |
15:40:16 | FromDiscord | <Shucks> I guess nimlsp also doesn't gives code highlighting huh |
15:41:01 | Yardanico | well it wouldn't be able to |
15:41:08 | Yardanico | LSP didn't standartise semantic syntax highlighting yet |
15:41:15 | FromDiscord | <Shucks> oh |
15:41:27 | Yardanico | although there's a pending issue for that |
15:41:35 | Yardanico | and PMunch even started implementing it a bit I think |
15:41:43 | Yardanico | and I actually use vscode-nim-lsp |
15:41:56 | FromDiscord | <Shucks> without a nim plugin at all? |
15:42:06 | FromDiscord | <Shucks> nvm |
15:42:54 | FromDiscord | <Shucks> Gonna try that |
15:43:09 | Yardanico | with nimlsp |
15:43:43 | FromDiscord | <Shucks> Yes.. who knows maybe it doesn't lags that ugly then anymore ;D |
15:43:45 | FromDiscord | <kodkuce> that AI autocomple one is not bad too |
15:43:50 | Yardanico | it's very heavy |
15:43:59 | Yardanico | even though I have 16gb ram it's still heavy |
15:44:07 | Yardanico | it's not okay for autocompletion to use 1-2GB ram |
15:44:35 | FromDiscord | <Shucks> holy. Thats even more worst then |
15:46:32 | Araq | brentp: pushed a hotfix but no idea if it's correct |
15:48:02 | FromDiscord | <Shucks> Well don't get any suggestions with vscode-nim-lsp aswell |
15:48:15 | Yardanico | well did you install nimlsp? did vscode-nim-lsp pick it up? |
15:48:18 | Yardanico | is nimlsp in your PATH? :D |
15:51:01 | FromDiscord | <Shucks> It's actually saying no nimlsp found in path. But it is? |
15:51:21 | Yardanico | wdym "it is"? |
15:51:26 | Yardanico | you have ~/.nimble/bin in PATH ? |
15:51:39 | Yardanico | and if you just added something to PATH you might have to relogin |
15:52:00 | FromDiscord | <Shucks> nimble/bin is in path yes |
15:52:06 | FromDiscord | <Shucks> since I got nim actually lol |
15:52:09 | Yardanico | and did you install nimlsp? |
15:52:16 | FromDiscord | <Shucks> yes |
15:52:22 | Yardanico | and did you relogin just in case? :D |
15:52:28 | FromDiscord | <Shucks> lets try |
15:54:44 | FromDiscord | <Shucks> No error but no suggestions ;p |
15:54:51 | FromDiscord | <Shucks> could I test nimlsp somehow? |
15:55:07 | Yardanico | nimlsp --version |
15:55:32 | FromDiscord | <Shucks> ```nimlsp --version↵nimlsp v0.2.4``` |
15:56:01 | * | sagax quit (Read error: Connection reset by peer) |
15:56:20 | Yardanico | well i don't know then really |
15:56:29 | Yardanico | works for me :tm: :) |
15:57:16 | FromDiscord | <Shucks> some day, someone will finally add some good editor support for nim |
15:57:25 | Yardanico | ehm? |
15:57:31 | Yardanico | neovim with leorize's plugin is very good |
15:57:37 | Yardanico | it even has semantic syntax highlighting |
15:57:42 | Yardanico | and vscode + nimlsp is pretty good too |
15:58:55 | FromDiscord | <Shucks> Agree, I actually love leorize's plugin. If anyone ever gets that running on linux let me know ;p |
15:59:02 | FromDiscord | <Shucks> windows* |
16:07:18 | Yardanico | is this a bug or expected arc behaviour? https://github.com/nim-lang/Nim/issues/15026 |
16:07:20 | disbot | ➥ [ARC] Weird exception behaviour from doAssertRaises ; snippet at 12https://play.nim-lang.org/#ix=2s9x |
16:11:14 | * | abm quit (Read error: Connection reset by peer) |
16:11:40 | * | abm joined #nim |
16:15:40 | FromDiscord | <Clyybber> Thats a bug |
16:16:20 | Yardanico | nice :P |
16:25:30 | * | Kaivo quit (Quit: WeeChat 2.8) |
16:26:11 | * | marnix quit (Ping timeout: 240 seconds) |
16:30:41 | * | sagax joined #nim |
16:31:14 | * | pangey quit (Quit: bye) |
16:31:36 | * | pangey joined #nim |
16:32:15 | * | marnix joined #nim |
16:32:54 | Yardanico | also arc crash with one of tests in nimly - with -d:useMalloc the error messages are very interesting |
16:32:58 | Yardanico | https://i.imgur.com/jCOCneF.png never saw that before in my life |
16:39:18 | Araq | Yardanico: as I keep saying, use valgrind to find the cause rather than an effect |
16:39:25 | Yardanico | it doesn't really help |
16:39:35 | FromDiscord | <Clyybber> Try with Araqs bugfix |
16:39:56 | Yardanico | oh I will |
16:43:24 | * | zhpixel517 joined #nim |
16:43:47 | Yardanico | well seems like this didn't fully fix the issues |
16:43:59 | * | zhpixel517 is now known as zhpixel |
16:44:10 | Yardanico | some other tests in rbtree fail too, and nim-markdown and nimly still fail |
16:44:17 | * | zhpixel quit (Client Quit) |
16:44:54 | * | dmi0 joined #nim |
16:44:58 | Yardanico | you can check by running tests of https://github.com/Nycto/RBTreeNim with arc |
16:45:10 | Araq | well go fix it, it's only the hardest thing I ever wrote |
16:45:24 | Yardanico | well yeah, I'm not saying it's easy :P |
16:45:43 | FromDiscord | <Avatarfighter> lmao Araq is a savage 😛 |
16:47:33 | Araq | I just hope the optimization can be saved, it's so nice when it works |
16:49:12 | Yardanico | by the way Araq, is it enough to just remove "computeCursors" from injectdestructors to disable cursorifier (to check if it's a cursorifier bug or not)? |
16:49:22 | Araq | yes |
16:49:41 | Araq | you can also add a switch for it but switches suck |
16:51:05 | Yardanico | well seems like nim-markdown and rbtreenim crashes are due to cursorifier, but nimly - not |
16:53:04 | Zevv | sooo. what will my next half baked project be. Lets implement TLS1.3 from scratch in Nim! |
16:54:52 | FromDiscord | <Avatarfighter> Thats super cool Zevv |
16:55:10 | FromDiscord | <dom96> Zevv: hey, I wonder if I can get any more info about the problem you've had with Stardust. Any chance you could show me the Network requests you saw when trying to play? |
17:05:49 | * | Kaivo joined #nim |
17:06:11 | Yardanico | huh apparently markdown's cursor inference bug isn't triggered in markdown itself |
17:06:19 | Yardanico | but rather in some of the modules it uses |
17:10:00 | Zevv | dom96: let me check again. Had to leave yesterday, sorry |
17:11:40 | Zevv | hmm works for me now, but that's on another machine |
17:12:15 | Yardanico | ok now I know with 100% certainty which proc triggers that cursor inference bug |
17:12:21 | Yardanico | god bless owner.name.s |
17:12:24 | Yardanico | XD |
17:12:31 | FromDiscord | <dom96> Zevv: Interesting. What are the differences between the two machines? |
17:15:32 | Zevv | don't know yet, but i don't have access to the first one now :/ |
17:15:51 | Zevv | probably older firefox, I think they run the same add ons |
17:16:03 | FromDiscord | <dom96> same OS'? |
17:16:08 | Zevv | hm lacking ghostery here, lemme try |
17:16:10 | Zevv | dom96: more or less |
17:16:52 | Zevv | nope, it's not ghostery |
17:17:15 | FromDiscord | <dom96> hm, possible it is some add-on though. If you get access to your other machine can you run without add-ons and see if that helps? |
17:17:21 | Zevv | sure |
17:17:29 | FromDiscord | <dom96> Thanks! 🙂 |
17:18:31 | Yardanico | Araq: I know it's stupid to ask since I don't have a small example to reproduce, but anyway - https://gist.github.com/Yardanico/b641bc8d02935557179055d4bc21672d here's the doStuff proc which triggers that bug, and two cursorifier outputs (without_cursor_for_doStuff is where I disabled computing cursors for owner.name.s == "doStuff") |
17:18:48 | Yardanico | without_cursor works, with_cursor crashes |
17:19:51 | Yardanico | the biggest problem is that I can't really replicate Token structure myself manually, since it seems to be cyclic (repr goes into infinite recursion wieh it) |
17:20:17 | Yardanico | I mean that exact data of it with which doStuff results in a crash later |
17:20:54 | FromDiscord | <dom96> lol why is the jester tested in the Nim repo not using httpbeast? |
17:22:28 | Araq | dom96: because we test the Nim compiler, not jester |
17:23:06 | FromDiscord | <dom96> meh, I suppose. HttpBeast might be worth testing too. |
17:23:14 | FromDiscord | <dom96> or I should say, testing that it compiles |
17:24:36 | disruptek | dom96: did you run out of passwords to try? only 157 attempts. pffbt. |
17:24:53 | Yardanico | disruptek: wat |
17:24:54 | FromDiscord | <dom96> I'm trying to get to 9696 attempts |
17:25:14 | disruptek | my phone number is 9996669. |
17:26:05 | disruptek | i tell myself that people don't answer the phone because they think the devil is calling. actually, that's probably close to the truth. |
17:28:02 | FromDiscord | <Avatarfighter> disruptek: you never cease to put a smile on my face |
17:29:46 | Araq | I myself have begun replacing all of my furniture with Hero Quest furniture. https://youtu.be/Cx8sl2uC46A?t=50 |
17:35:40 | ForumUpdaterBot | New thread by Snej: More readable C name-mangling?, see https://forum.nim-lang.org/t/6562 |
17:35:49 | Yardanico | disruptek: ^ :D |
17:37:17 | disruptek | this guy puts my beard to shame. |
17:37:37 | Yardanico | do you have an example of https://github.com/nim-lang/Nim/pull/14632 so I can show that person the resulting C code in your PR? :D |
17:37:38 | disbot | ➥ [WIP] porting name mangling from ic effort |
17:39:35 | disruptek | the what? |
17:40:01 | Yardanico | the resulting C code of this PR |
17:40:12 | disruptek | wait, you got it to compile? |
17:40:14 | Yardanico | you shown it on stream but do you have it in any gists or similar? |
17:40:22 | Yardanico | disruptek: nonono, I'm just asking :D |
17:40:43 | disruptek | sure. |
17:41:15 | FromGitter | <ynfle> Is there a simple way to switch the keys and values a tables |
17:41:32 | Yardanico | well, by creating a new table and populating it :P |
17:41:36 | Yardanico | or using something like a bitable |
17:41:49 | Yardanico | if you want both key->value and value->key mapping at the same time |
17:42:07 | disruptek | only a fool would do such a thing. |
17:42:27 | FromGitter | <ynfle> Nope just want to switch it when I'm done with it |
17:42:36 | Yardanico | well, you can just iterate and create it manually then |
17:44:03 | disruptek | Yardanico: http://ix.io/2s9S/c |
17:44:52 | Yardanico | disruptek: thanks a lot your highness |
17:45:06 | disruptek | do you think i cannot get to you from here? |
17:45:13 | disruptek | ryan air is still flying americans. |
17:45:17 | * | solitudesf- joined #nim |
17:47:09 | Yardanico | i will hide in siberia |
17:47:24 | * | theelous3 quit (Ping timeout: 258 seconds) |
17:47:28 | FromDiscord | <tomck> Hello again!↵I have a `ref T`, where `T` is a variant object↵How can i re-initialise `T` to a different variant, but at the same address? |
17:47:53 | * | solitudesf quit (Ping timeout: 265 seconds) |
17:47:58 | Yardanico | yourvar[] = T(kind: newKind, data: 1) |
17:48:10 | Yardanico | just dereference it and set it to new variant |
17:48:15 | FromDiscord | <tomck> ahhh ok brill ta |
17:48:28 | * | Trustable joined #nim |
17:48:32 | FromDiscord | <tomck> I think I see 'ref' and think & in c++, keep forgetting you can just deref it to get the value |
17:48:58 | FromDiscord | <tomck> (edit) '&' => '`&`' |
17:58:31 | FromDiscord | <kodkuce> sent a long message, see http://ix.io/2sa1 |
17:58:59 | Yardanico | Python is 4-space by the way (the convention I mean) |
17:59:53 | FromDiscord | <Recruit_main707> Javascript jobs do pop up i think |
18:00:03 | Yardanico | of course |
18:00:04 | FromDiscord | <kodkuce> i hate js |
18:00:07 | Yardanico | who doesn't :P |
18:00:13 | FromDiscord | <kodkuce> (edit) 'hate' => 'HATE' |
18:00:19 | FromDiscord | <Recruit_main707> But you have nim😏 |
18:00:26 | FromDiscord | <tomck> if you get a frontend modern web dev job, js isn't too bad |
18:00:35 | FromDiscord | <tomck> spend all your time writing html&css instead! |
18:01:13 | FromDiscord | <kodkuce> i prefere backend cuz frontend bosses change their mind evry other day |
18:01:16 | disruptek | i'd rather be responsible for all the defects in my software. |
18:02:04 | FromDiscord | <kodkuce> i did a website just some wordpress and css for firend and i got like evry week call can you add something can you fix this addd this bla bla |
18:02:10 | FromDiscord | <kodkuce> wanted to kill her |
18:02:14 | Yardanico | D: |
18:03:06 | FromDiscord | <kodkuce> like frontend is not bad if you have desing planed but sux if you have to change stuff all time cuz crazy people duno what they want |
18:03:54 | FromDiscord | <kodkuce> anyone selling nim skills as freelancer |
18:05:36 | FromDiscord | <kodkuce> i guess i can use nim on project where people duno anything about PC, cuz moste just copy paste MEAN, MERN, LAMP, NET and i guess 90% duno why they even using them |
18:06:31 | FromDiscord | <kodkuce> guess i should go chill eat some icecube 🙂 |
18:09:02 | * | Senketsu joined #nim |
18:14:47 | FromDiscord | <tomck> s'fun, gotta min-max for dev speed |
18:15:02 | disruptek | pass. |
18:15:04 | FromDiscord | <tomck> doesn't matter if you throw away 50% of the app when it only took you a week |
18:21:45 | bung | tomck I said simlar words in this channel, go find some interesting project. |
18:26:59 | bung | got sleep |
18:27:08 | * | bung quit (Quit: Lost terminal) |
18:28:13 | FromDiscord | <tomck> ? |
18:28:23 | disruptek | esl |
18:29:12 | FromDiscord | <tomck> ? |
18:29:15 | Yardanico | ? |
18:29:44 | FromDiscord | <tomck> wtf is going on lol, is my brain broken |
18:34:20 | * | abm quit (Quit: Leaving) |
18:35:49 | disruptek | english as a second language. |
18:37:22 | Yardanico | disruptek: you're a native english speaker aren't you |
18:37:25 | Yardanico | why are u lyin :D |
18:46:23 | disruptek | i'm refering to bung's confusing comment. |
18:51:53 | Zevv | hey my destructor is called end of scope and not end of function \o/ |
18:52:05 | Yardanico | Zevv: yes :P |
18:52:22 | Zevv | so much stuff I missed |
18:52:27 | Yardanico | Zevv: https://github.com/nim-lang/Nim/pull/14790 |
18:52:27 | disbot | ➥ scoped memory management |
18:52:35 | Yardanico | https://github.com/nim-lang/Nim/pull/14962 |
18:52:36 | disbot | ➥ An optimizer for ARC |
18:53:08 | Zevv | dude |
18:53:17 | Zevv | this might even become usable and all |
18:53:37 | Zevv | so much arc |
18:54:19 | Yardanico | Zevv: ikr |
19:03:41 | Zevv | trying to understand the Isolate[] stuff |
19:03:48 | Zevv | must... keep... up... |
19:04:49 | Yardanico | Zevv: it's simple :P |
19:05:04 | Zevv | it's about .magic. |
19:05:28 | Zevv | and non-trivial |
19:12:26 | * | narimiran joined #nim |
19:23:25 | Zevv | would arc allow for non-global channels? |
19:23:35 | Zevv | or does that question not even make sense |
19:27:10 | FromGitter | <Knaque> How does one open a URL in the default browser? I swear I've seen a proc for it before but I can't remember what it was called. |
19:27:32 | Yardanico | @Knaque https://nim-lang.org/docs/browsers.html |
19:34:20 | FromGitter | <Knaque> That's the one, thank you! |
19:39:05 | * | marnix quit (Ping timeout: 246 seconds) |
19:43:41 | * | Trustable quit (Remote host closed the connection) |
19:44:16 | * | nsf quit (Quit: WeeChat 2.8) |
19:44:38 | * | Trustable joined #nim |
19:48:59 | * | endragor joined #nim |
19:52:11 | FromDiscord | <Shucks> How could I tell my linter that I'm using --threads:on ? |
19:53:04 | disruptek | put such options in a appname.nim.cfg |
19:55:29 | * | endragor quit (Ping timeout: 265 seconds) |
19:56:51 | Yardanico | or just nim.cfg or config.nims |
19:56:56 | Yardanico | in the same folder with your main .nim file |
19:57:27 | disruptek | nah, nim.cfg and config.nims will be clobbered by package managers. |
19:57:34 | Yardanico | wat |
19:58:48 | shashlick | again, scrubbing nimble issues - if you have any priorities, please let me know |
19:58:49 | disruptek | package managers will shortly write nim.cfg from scratch, blowing away whatever exists. |
19:58:56 | Yardanico | why would they? |
20:00:56 | disruptek | because it's the best way to assert an environment that will work. |
20:01:01 | Yardanico | is it? |
20:01:05 | Yardanico | i don't think it's needed |
20:01:14 | disruptek | feel free to propose an alternative. |
20:01:24 | * | marnix joined #nim |
20:01:57 | Yardanico | well we're surviving without it right now somehow :P |
20:02:10 | disruptek | you can stay on nim 1.2. |
20:02:25 | disruptek | you're surviving with it right now somehow. |
20:02:32 | Yardanico | i'm on nim devel |
20:02:36 | disruptek | whatever. |
20:02:46 | shashlick | @Yardanico - the problem is that nim knows too much about nimble |
20:02:54 | shashlick | and nimble controls nim by directly calling it |
20:03:24 | shashlick | instead, the idea is for nimble as a package manager to setup the environment where appropriate |
20:03:39 | shashlick | after that the user can opt to use nim or nimble |
20:04:38 | shashlick | and if someone prefers another way of setting up packages and the environment like nimph, they can and the compiler can be told what it needs with a cfg file |
20:05:31 | Yardanico | well but can't that be done by a global user nim.cfg? |
20:06:03 | shashlick | not everyone wants to use a global package cache |
20:06:05 | disruptek | shashlick's key realization is that the build can flow in one direction so that you don't have to maintain configuration for pm, compiler, project. tooling doesn't need to edit with hand-written config files. |
20:06:41 | * | marnix quit (Read error: Connection reset by peer) |
20:06:48 | shashlick | disruptek: did we decide to use nim.cfg or project.nim.cfg |
20:07:05 | disruptek | we blow away nim.cfg because it's the only way to capture hierarchial config. |
20:07:22 | disruptek | project.nim.cfg holds things like, --threads:on |
20:07:48 | * | marnix joined #nim |
20:08:10 | shashlick | problem is that --threads:on might be needed by the project, tests, other binaries, etc |
20:08:11 | * | marnix quit (Read error: Connection reset by peer) |
20:08:25 | shashlick | and with this design user needs a project2.nim.cfg and so forth with the same or similar stuff |
20:08:39 | shashlick | but putting paths in project.nim.cfg doesn't help either |
20:09:05 | disruptek | you can still put threads in nim.cfg if you want. |
20:09:18 | shashlick | we may not be able to get away from having pkg manager specific and user specific areas in nim.cfg |
20:09:20 | disruptek | it's just that it may be read/written by pm. |
20:09:40 | disruptek | dude, we aren't even going to have config files. |
20:09:56 | disruptek | this is a stopgap measure. |
20:10:04 | shashlick | what's the new way |
20:10:08 | disruptek | pragmas. |
20:11:09 | disruptek | i made this little fan setup for my rv. |
20:11:19 | shashlick | using pragmas I presume |
20:11:23 | disruptek | yeah. |
20:11:33 | disruptek | it's like, a 4" bilge fan or something. |
20:11:34 | shashlick | very pragma tic of you |
20:12:06 | shashlick | do you think pragmas would solve the problem where you cannot set --os and --arch in nim.cfg |
20:12:27 | disruptek | i guess. |
20:12:40 | disruptek | this fan works great, but the headroom is unreal. |
20:12:54 | disruptek | it's fine at like 5% power. kick it up over 4amp and it's nuts. |
20:12:59 | disruptek | it runs across my desk. |
20:13:03 | shashlick | I installed a fan in my study so I appreciate the value |
20:13:28 | shashlick | it is 97F here after all |
20:13:49 | shashlick | what's 4raq's take on all this |
20:13:57 | shashlick | if we are moving to pragmas, what's the point fiddling with cfg files |
20:13:57 | disruptek | https://www.amazon.com/Rule-240-Line-Blower-Connections/dp/B000O8D0IC/ref=sr_1_4?dchild=1&keywords=inline+blower+4%22&qid=1595276011&sr=8-4 |
20:14:10 | FromDiscord | <Shucks> I'm injecting a dll into a process and im currently wondering what kind of issues I could get if im spawning nim code into a windows thread. That code runs but is the GC still running on my thread? Not sure how I could explain it better: https://play.nim-lang.org/#ix=2san |
20:14:17 | disruptek | then i wired up a controller to my 12v dc. |
20:14:21 | * | marnix joined #nim |
20:14:35 | disruptek | shashlick: araq is the one that is championing pragmas. |
20:15:27 | Yardanico | shashlick: same for -d:release and -d:danger btw |
20:15:31 | * | marnix quit (Read error: Connection reset by peer) |
20:19:46 | * | marnix joined #nim |
20:22:06 | shashlick | yep |
20:23:37 | shashlick | pragmas don't make it possible to set paths |
20:24:15 | disruptek | paths shouldn't need to be set. |
20:24:28 | shashlick | they can solve the threads or other such settings |
20:24:29 | shashlick | but nimble and co will still need to create a file of sorts |
20:26:38 | * | bung joined #nim |
20:28:02 | * | marnix quit (Read error: Connection reset by peer) |
20:34:31 | * | marnix joined #nim |
20:37:42 | * | marnix quit (Read error: Connection reset by peer) |
20:38:17 | * | marnix joined #nim |
20:44:45 | * | marnix quit (Ping timeout: 240 seconds) |
20:53:06 | * | nikita` quit (Quit: leaving) |
20:56:16 | * | endragor joined #nim |
20:56:43 | FromDiscord | <Zachary Carter> anyone have any idea how I can keep a reference to a c++ object to prevent it from being destructed? I think python has some crazy funky `reinterpret_borrow` crap like - https://pybind11.readthedocs.io/en/stable/reference.html#_CPPv418reinterpret_borrow6handle - but I'm not sure how to do this with Nim |
21:01:55 | * | narimiran quit (Ping timeout: 256 seconds) |
21:03:23 | * | Vladar quit (Quit: Leaving) |
21:07:35 | * | endragor quit (Ping timeout: 256 seconds) |
21:14:58 | FromDiscord | <demotomohiro> copy it or declare it somewhere else |
21:15:20 | FromDiscord | <demotomohiro> or use std::shared_ptr? |
21:17:25 | FromDiscord | <demotomohiro> Do you want to free memory without call destructor? |
21:20:38 | FromDiscord | <Zachary Carter> no right now I just want to keep a reference of it around to prevent destruction |
21:20:48 | FromDiscord | <Zachary Carter> I'll give `std::shared_ptr` a try |
21:21:39 | FromDiscord | <Zachary Carter> thanks |
21:40:09 | leorize[m] | just use a pointer :P |
21:44:19 | * | Kaivo quit (Quit: WeeChat 2.8) |
21:44:44 | * | Kaivo joined #nim |
21:50:14 | * | solitudesf- quit (Ping timeout: 260 seconds) |
21:52:04 | Prestige | I need to have a conversation with a macro guru at some point. Trying to replicate something I've seen done in another ecs framework that seems complicated |
21:52:56 | FromGitter | <ynfle> What do you need/want to do? |
21:54:48 | Prestige | Here's an example: https://github.com/yglukhov/ecs#usage the `w.forEveryMatchingEntity(process)` part - I'll write a short description in a sec |
21:57:17 | Prestige | I'm writing a proc/macro that accepts a callback with any params. I need to get the types of those params, hash them with a func I already have, and access a value from a map for each type provided in the callback. I have that working so far; now, I'm attempting to invoke that callback with each value taken from that map |
21:58:02 | Prestige | I've created a seq that contains each value, but am having trouble piecing together the callback invocation |
21:59:05 | FromGitter | <ynfle> https://nim-lang.org/docs/system.html#typeof%2Cuntyped? |
22:00:44 | Prestige | I have the types and all, just need to invoke the callback with e.g. callback(arr[0], arr[1], ...arr[n]) |
22:05:38 | Prestige | arr in this example is a sequence, just wanted something short to type |
22:10:43 | FromDiscord | <Zachary Carter> leorize: do you mean just store a pointer to the cpp object in global scope? |
22:15:04 | * | Senketsu quit (Read error: Connection reset by peer) |
22:17:46 | * | sagax quit (Ping timeout: 260 seconds) |
22:25:57 | leorize[m] | use `new` to create the object on the heap |
22:27:20 | leorize[m] | then you may use `C++ <shared/unique>_ptr` if you want automatic free |
22:27:52 | FromDiscord | <Zachary Carter> alright thanks I'll try that |
22:29:10 | leorize | if you're doing this from Nim it's trivial to wrap c++ new, I think the manual have an example |
22:29:37 | FromDiscord | <Recruit_main707> It does, yes |
22:30:17 | FromDiscord | <Zachary Carter> yeah - the C++ code I was looking at wasn't allocating on the heap with new as far as I could tell - so I was trying to avoid doing that but I guess I wont' be able to |
22:30:42 | * | sz0 quit (Quit: Connection closed for inactivity) |
22:31:12 | leorize[m] | if you want to keep the variable alive, then it has to outlive its stack frame :P |
22:31:24 | FromDiscord | <Zachary Carter> yeah, makes sense |
22:50:49 | ForumUpdaterBot | New thread by JPLRouge: GTK3 vte error 0.7.9 compile, see https://forum.nim-lang.org/t/6564 |
22:51:11 | FromGitter | <gogolxdong> @shashlick what's the purpose of turing on sink inference, simply turn off sink inference doesn't solve my issue. |
23:07:13 | FromGitter | <ynfle> @prestige, you mean something like sequtils.mapIt ? |
23:09:30 | FromGitter | <gogolxdong> /root/.nimble/pkgs/jester-0.4.3/jester.nim(704, 26) Error: undeclared identifier: 'initInterval' |
23:09:30 | Prestige | nah I don't think so. Just trying to invoke a callback once, where each param is an element in the array |
23:11:34 | leorize[m] | use newCall to generate a call |
23:12:00 | Yardanico | @gogolxdong that's a jester problem |
23:12:08 | Yardanico | it still didn't have a new release after fix for deprecated-removed stuff |
23:12:15 | Yardanico | you can fix it manually by replacing initInterval with initDuration |
23:12:47 | leorize[m] | shashlick: re: important packages test for nimble. I can fix it up but dom doesn't seem to be too enthusiastic about it |
23:13:22 | leorize[m] | and it depends on magical nimble categories which have actually changed on devel so maybe it shouldn't be done |
23:14:01 | * | krux02_ joined #nim |
23:15:38 | Prestige | leorize[m]: an example https://play.nim-lang.org/#ix=1M5Q |
23:16:33 | leorize | Prestige: so what happens if foo is shorter? |
23:16:35 | leorize | or longer? |
23:17:01 | Prestige | I'd want it to invoke the callback with every element in foo |
23:17:33 | leorize[m] | https://play.nim-lang.org/#ix=1M5U |
23:17:50 | * | krux02 quit (Ping timeout: 256 seconds) |
23:18:26 | Prestige | so the callback actually has typed arguments in the real case, I'll update it |
23:20:33 | Prestige | https://play.nim-lang.org/#ix=1PJx |
23:21:22 | FromDiscord | <Zachary Carter> hrm - nothing I'm trying is working... https://gist.github.com/zacharycarter/f2fcf1e742765df3a9a548c705e5ac6b |
23:22:28 | FromDiscord | <Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=1QjD |
23:22:50 | FromDiscord | <Zachary Carter> the destructor on the buffer object keeps getting called after I call `setIndexBuffer` on the `Mesh` object |
23:27:57 | FromDiscord | <Zachary Carter> This appears to be how it's handled in the python bindings - ↵https://github.com/mosra/magnum-bindings/blob/3d519d6c1992955979e31feb05a184430980a0bd/src/Magnum/GL/Python.h & https://github.com/mosra/magnum-bindings/blob/3d519d6c1992955979e31feb05a184430980a0bd/src/python/magnum/gl.cpp |
23:28:02 | * | Trustable quit (Remote host closed the connection) |
23:29:22 | bung | shashlick I want have https://github.com/mozilla/mozjpeg in nim , using nimgen or niminterop ? |
23:30:12 | FromDiscord | <reilly> I cannot for the life of me understand the incredibly overcomplicated `SendInput()` proc in WinAPI/Winim. |
23:34:24 | FromDiscord | <dom96> > you can fix it manually by replacing initInterval with initDuration↵@Yardanico[IRC]#0000 or just grabbing Jester@#head |
23:34:29 | Yardanico | yes |
23:34:37 | Yardanico | why there wasn't a release after that deprecation fix? :P |
23:36:35 | * | lritter quit (Quit: Leaving) |
23:38:33 | shashlick | @leorize I'm a fan of CI telling me when stuff breaks - just like I test nimterop changes with existing wrappers, I think nimble changes should be tested with important packages |
23:38:51 | FromDiscord | <dom96> because I don't have time for making releases |
23:40:38 | shashlick | @bung - nimterop should be able to do it quickly |
23:41:40 | FromGitter | <bung87> ok, I'll try it . |
23:41:59 | FromGitter | <gogolxdong> @Yardanico got it ,thanks! |
23:42:12 | shashlick | @gogolxdong sorry no idea, I just know the flag 😊 |
23:42:22 | * | bung quit (Quit: Lost terminal) |
23:42:32 | shashlick | @bung ok let me know how it goes |
23:43:28 | leorize[m] | Prestige: https://play.nim-lang.org/#ix=1QsL |
23:44:44 | Prestige | Yo thanks, this is awesome |
23:45:29 | leorize[m] | np |
23:45:58 | FromGitter | <gogolxdong> @shashlick np |
23:46:10 | FromGitter | <gogolxdong> Doesn't new github UI show releases? |
23:46:39 | Yardanico | it does |
23:47:56 | FromGitter | <gogolxdong> ok, found it |