<< 20-07-2020 >>

00:02:02*guelosk[m] joined #nim
00:03:42*ofelas quit (Ping timeout: 260 seconds)
00:10:54*ofelas joined #nim
00:17:32FromDiscord<Varriount> Hm, is there a way to control where Nim places/looks for the nimcache directory?
00:18:35*crinny joined #nim
00:19:14Yardanico--nimcache:
00:19:27Yardanico--nimcache:/my/path or --nimcache:mypath for creating mypath directory in the cwd
00:20:28crinnyhow can i compile library to shared object and simply load function from it in nim, not c or c++?
00:20:40FromDiscord<Rika> --app:lib
00:20:40Yardanicocrinny: the same way really :P
00:20:50Yardanicoyou still need {.exportc.}
00:21:05Yardanicobut if your app wants to have more than 1 nim binary it's better to also use nimrtl
00:21:07Yardanicoso binaries are smaller
00:21:15Yardanicohttps://nim-lang.org/docs/nimc.html#dll-generation
00:22:04ForumUpdaterBotNew thread by HashBackupJim: Choosing between generic and specific fn, see https://forum.nim-lang.org/t/6560
00:22:57crinnyfound this example https://github.com/sdwfrost/nim-shared-object-example, there are examples of dynlib and exportc, both unfortunately don't work
00:24:41Yardanicohttps://github.com/Yardanico/nim-snippets/tree/master/clib
00:24:54Yardanicoit's making a shared lib from nim and loading it from C
00:25:24crinnybut i need to load from nim
00:25:26Yardanicobasically you do {.exportc, dynlib.} to all procs you wish to export
00:25:29Yardanicocrinny: there's no difference
00:25:36Yardanicothen in nim you would do {.importc, dynlib.}
00:26:39*lritter quit (Ping timeout: 258 seconds)
00:27:05*lritter joined #nim
00:31:06crinny.dynlib. will be superfluous
00:31:57crinny{.push exportc, dynlib.}proc hello(x: int): bool = if x == 1: return true elif x == 2: return false
00:32:00crinnyproc hello(x: int): bool {.importc.}echo hello(1)echo hello(2)
00:32:29crinnyso this simple example doesn't work ...
00:32:59Yardanicocrinny: why why it will be superfluous? it won't be
00:33:06Yardanicoit's needed to actually export/import from a dynamic library
00:33:16Yardanicounless you link with .so
00:34:18crinnyoh well
00:34:21crinnythanks!
00:34:35Yardanicocrinny: just tested, it works just fine
00:34:40Yardanicoa.nim
00:34:41Yardanicoproc hello(x: int): bool {.exportc, dynlib.} = result = x == 1
00:34:48Yardanicob.nim: proc hello(x: int): bool {.importc, dynlib: "./liba.so".}
00:34:51Yardanicoand then echo hello(5)
00:35:07Yardanicodynlib like that because you can't load a dynlib from the same directory on linux by default (it's not in PATH)
00:35:25Yardanicoof course you can use push/pop instead to not repeat
00:35:51Yardanicoalso 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:48FromDiscord<Varriount> Yardanico: ARC will make working with COM a lot easier, since COM's memory model is refcount based.
00:37:05Yardanicowell you can use destructors with refc as well
00:37:11Yardanicoso what's stopping you rn ? :P
00:37:14PrestigeIs there a way to iterate over a seq inside of a macro?
00:37:27YardanicoPrestige: you mean literally iterate or create AST to iterate over a seq?
00:37:35Yardanicoif first one, just iterate over it the same way as you would usually do
00:37:36FromDiscord<Varriount> @Avahe Is the sequence static, or an expression of a sequence literal?
00:37:38Prestigeliterally iterate
00:37:44Yardanicojust "for x in myseq: do stuff"
00:37:48Yardanicothere's no difference
00:38:44*deech joined #nim
00:39:31Prestigehmm maybe just a typing issue then? I thought it was converted to a NimNode implicitly
00:39:45Yardanicoif you pass a seq to a macro - it is converted to nim node
00:39:50Yardanicounless you do it as "static seq[string]" for example
00:39:56Yardanicothen it'll be available as a normal seq in the macro
00:40:04Prestigeoh okay, thanks
00:41:05deechWhen 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:39YardanicoGC_unref maybe? not sure if it'll work
00:41:55Yardanicoand why "the closure environment is no longer needed"?
00:42:01Yardanicoif you pass it to C, you still need it to be allocated, no?
00:43:10deechYes, 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:42deechDoesn'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:57Yardanicoi don't honestly know :P
00:46:23FromDiscord<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:46Yardanicowell, you can always export some free proc from nim side which will destroy a given closure :P
00:47:27Yardanicoanyway, at least this time i have a smaller reproducable for (probably) a cursorifier bug
00:47:36Yardanicofrom RBTreeNim, it's at 380 lines right now
00:49:12*laqq3_ joined #nim
00:49:52FromDiscord<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:40shashlick@leorize - any chance of continuing work on https://github.com/nim-lang/nimble/pull/768?
00:53:41disbotnimscript{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:21shashlickScrubbing 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:37mbuchel!repo xmpp
01:14:37disbothttps://github.com/benumbed/nimstrophe -- 9nimstrophe: 11Wrapper over the libstrophe C XMPP library 15 0⭐ 0🍴
01:15:17disruptekdoes it work?
01:15:26mbuchelno clue
01:15:43mbuchelanother project i am working on requires xmpp, so i have to find a nim library for that
01:15:58mbuchelif anyone has a better suggestion let me know
01:16:10disruptekthat one looks fairly complete.
01:16:19mbuchelgreat thanks
01:17:22disrupteknot terribly idiomatic, but eh.
01:18:24mbucheldoes dnylib pragma allow you to forget the linker in the linker script?
01:18:32mbucheli mean inside the nim.cfg
01:18:42disrupteksure.
01:18:53disruptek.passL.
01:23:25FromDiscord<Zachary Carter> Does anyone understand this wiki entry? https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim
01:24:37FromDiscord<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:16mbuchelthank you
01:31:51*crinny quit (Remote host closed the connection)
01:36:08*rockcavera joined #nim
01:54:16FromDiscord<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:42Yardanicocan you paste full errors?
01:55:49FromDiscord<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:51FromDiscord<Zed> yeah
01:56:14FromDiscord<Zed> sent a long message, see http://ix.io/2s7i
01:56:47Yardanicoare you using arc by any chance?
01:56:55FromDiscord<Zed> no
01:57:13FromDiscord<Zed> unless flippy uses it?
01:57:19Yardaniconono, it can't use arc unless you enable it :)
01:57:31FromDiscord<Zed> ah, well then no im not
01:57:37*waleee-cl quit (Quit: Connection closed for inactivity)
01:57:55Yardanicoand generally you can open an issue in flippy tracker because treeform might not see your message here :P
01:58:55FromDiscord<Zed> will do
01:59:26FromDiscord<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:11Yardanicowell you can always benchmark it :P
02:00:27Yardanicoand just FYI - nim will automatically use pass-by-reference for larger objects
02:01:39Yardanicohttp://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:19leorize[m]shashlick: not anytime soon :P feel free to take over if you have time :)
02:23:16shashlickok cool
02:23:35shashlickhow about the important packages CI for nimble - are you able to maintain that?
02:30:27FromDiscord<Anuke> anything wrong with this benchmark? https://play.nim-lang.org/#ix=2s7o
02:31:13disruptekanuke: is it fast or slow?
02:31:26FromDiscord<Anuke> `nim r -d:danger bench.nim` gives me↵Time spent: 3.586466279↵Time spent: 3.696318255
02:31:54FromDiscord<Anuke> I'm just wondering if the compiler could potentially be optimizing something away (at a glance)
02:31:55disrupteki'd recommend my criterion package (lemonboy wrote it).
02:32:58disruptekdoubt it can optimize much away due to the counters.
02:34:00FromDiscord<Anuke> alright
02:34:10FromDiscord<Anuke> I'll take a look at criterion next time I need to do a microbenchmark
02:34:58disruptekwhat does it do on arc?
02:36:19Yardanicodisruptek: same speeds roughly
02:36:34YardanicoI mean I wouldn't expect it to behave otherwise
02:36:36Yardanicoarray isn't GC'd
02:36:43FromDiscord<Anuke> The first one gets slightly faster, while the second one gets slightly slower
02:36:45FromDiscord<Anuke> Time spent: 3.435974582↵Time spent: 3.945454443
02:37:04Yardanico(i'm on latest devel)
02:37:16disruptekthat makes a little more sense.
02:37:47FromDiscord<Anuke> I'm on devel from a few days ago
02:47:19Yardanicojesus I minimized (mostly) this rbtreenim (probably) arc cursorifier bug
02:47:24Yardanicoand I don't understand wtf it's doing
02:47:31Yardanicobut it's doing something which makes cursorifier not happy :P
02:47:54Yardanicosince it works on nim compiler with arc before the optimizer/cursorifier pr
02:48:07shashlickast.repr removes all comments and newlines 😞
02:48:19Yardanicowell, it'll remove all non-doc comments of course
02:48:26Yardanicoand newlines are useless for the compiler really
02:48:27shashlickwish there was a way to load a nim file, get its AST, do some modifications and write it out
02:48:48YardanicoI'm pretty sure the lexer just ignores non-doc comments
02:49:09Yardanicoyeah, it does
02:49:27shashlickstill wondering what nimpretty does then
02:49:27leorizeshashlick: study nimpretty for that :P
02:49:43shashlickbasically looking at https://github.com/nim-lang/nimble/issues/612
02:49:44disbotCommand to add dependencies into .nimble file
02:49:57FromDiscord<treeform> @Zed I need to make width read only.
02:50:00shashlickif we could load the nimble file as an ast, we can do all these things
02:50:16FromDiscord<treeform> @Zed you should not be able to assignee it, what are you trying to do?
02:54:29shashlicklexer does different stuff with -d:nimpretty
02:55:01shashlickso the code is there, I don't see why it shouldn't always be available - at least with a runtime flag
02:56:08leorize[m]@Anuke they should be the same: https://godbolt.org/z/qETbM4
02:56:23leorize[m]godbolt shows that the generated assembly are more or less equivalent
02:57:39leorizeoh I was only looking at the proc body :P
02:58:18leorizewait what is this benchmark trying to bench? :P
02:58:37FromDiscord<Zed> @treeform get the image width and then divide it and assign result to variable
02:59:05FromDiscord<Zed> But that's not the issue, the image won't even load in
02:59:13Yardanicoleorize: performance overhead of copy vs pass-by-reference for array[32, float32]
02:59:32leorizethere aren't any difference
02:59:33Yardanicopassing array[32, float32] vs having a global variable and passing var array[32, float32]
03:00:10leorizethe benchmark code is different for the two calls, so it came up as invalid
03:00:58leorizeasm for the two procedures are the same, since arrays will always be passed by reference (afaik)
03:01:15leorizeto actually account for the differences, put the array in an object
03:02:45Yardanicoi 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:48Yardanicohttps://gist.github.com/Yardanico/6ea113d40d8453201fbe812400ad2006
03:03:42YardanicoI don't understand what it really does, but all I know is that it crashes when it (probably) shouldn't :D
03:04:16FromDiscord<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:58leorizeyes
03:05:22leorizethe array would then be in the cpu cache by the time you reuse it
03:05:45leorizebut that actually applies to both cases
03:06:33leorizethis is why you need to test ~100 rounds for a conclusive average
03:07:19FromDiscord<treeform> @Zed code example?
03:07:52FromDiscord<Zed> I made an issue on github with some more info
03:08:15FromDiscord<Zed> But ` var image = loadImage(path)`
03:08:24FromDiscord<Zed> Won't even work
03:08:29leorize@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:13FromDiscord<Anuke> noted.
03:11:17FromDiscord<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:13leorizedon'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:49leorizeYardanico: the bridge seems to be crashing every once in a while :p
03:15:57Yardanicoleorize: well, not that often really :)
03:15:59Yardanicoand yes, I know
03:16:07leorizeoom?
03:16:30Yardanicorarely yes, but usually dimscord bugs :P
03:17:16Yardanicowell, I didn't update it to latest dimscord version yet
03:17:39*rockcavera joined #nim
03:18:14FromDiscord<Rika> Yardanico what was that gui library you were working on a few days (?) ago
03:18:22YardanicoSciter
03:18:43FromDiscord<Rika> Nice thanks
03:18:53FromDiscord<Rika> You were working on bindings no?
03:21:34Yardanicoa bit
03:21:48Yardanicohttps://github.com/Yardanico/nsciter
03:22:07Yardanicoadded two examples in the last commit a week ago
03:22:31Yardanicoits still very low level
03:38:50FromDiscord<XeroOl> is there a way to read files at compile time?
03:39:13disruptekstaticRead()
03:39:23FromDiscord<Zed> read files at compile time?
03:39:34FromDiscord<XeroOl> the use case would be: this
03:39:37FromDiscord<XeroOl> ` let frag = static: "my_frag_shader.glsl".open.readAll `
03:39:44FromDiscord<XeroOl> (edit) 'be: this' => 'be this:'
03:40:07FromDiscord<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:36ForumUpdaterBotNew 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:28mdubshow 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:38Yardanicomdubs: db_sqlite is for sure
04:11:59Yardanicobut really they're mostly wrappers
04:12:44leorize!repo ndb
04:12:45disbothttps://github.com/xzfc/ndb.nim -- 9ndb.nim: 11A db_sqlite fork with a proper typing 15 25⭐ 5🍴
04:20:16FromDiscord<tomck> How can i add to a `ref seq[T]`?
04:20:41leorize`s[].add`
04:20:42FromDiscord<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:45leorizedereference it
04:20:48FromDiscord<tomck> ahhh
04:21:20*nsf joined #nim
04:23:56FromDiscord<flywind> Why does `travis-ci` always fail in windows?
04:23:58FromDiscord<flywind> https://travis-ci.org/github/iocrate/netkit/jobs/709860525
04:25:01PrestigeError: Unable to extract. Error was 'Cannot create a file when that file already exists.
04:25:49shashlickthis is an open bug - i have a fix in a PR
04:26:21shashlickhttps://github.com/dom96/choosenim/pull/201
04:26:22disbotFix #199 - missing dlls
04:26:37FromDiscord<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:57FromDiscord<Doof Doof> wow this is pretty great
05:12:09*rockcavera quit (Remote host closed the connection)
05:12:15FromDiscord<Elegant Beef> This being?
05:18:45FromDiscord<Yardanico> That
05:19:56FromDiscord<Elegant Beef> Ah thanks yard, i was so lost
05:20:44FromDiscord<Yardanico> Np, yw
05:28:27*mdubs quit (Remote host closed the connection)
05:31:42FromDiscord<Doof Doof> Nim lol
05:32:42FromDiscord<Elegant Beef> Ah
05:32:44FromDiscord<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:50bunghow to get variable memory size, if I dont want loop the seq of seq
05:59:49FromDiscord<Rika> ?
05:59:52FromDiscord<Rika> what do you mean>
06:00:50*hoijui joined #nim
06:01:22bungeg a variable is aSeq[bSeq[T]] I dont want check aSeq.len and bSeq.len
06:03:32FromDiscord<Rika> well from what i know seqs dont loop through their contents to get the length
06:04:45bungI want compare size to another aSeq[bSeq[T]]
06:11:11FromDiscord<Elegant Beef> well in this case you'd have to loop aSeq to get element count then multiply by sizeOf(T)
06:13:22bungyeah, I need loop
06:15:47FromDiscord<Rika> @Elegant Beef why? seq.len doesnt need to loop afaik?
06:16:02FromDiscord<Elegant Beef> no it doesnt but you need to get the inner seq elements
06:16:13FromDiscord<Elegant Beef> they arent uniform size
06:17:02FromDiscord<Rika> ok
06:17:12FromDiscord<Rika> its unsafe casting time
06:17:16FromDiscord<Elegant Beef> Lol
06:17:46FromDiscord<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:01voltistOoo 5 year old Nim code
07:03:08voltist`expr` causes lots of problems
07:03:53*Vladar joined #nim
07:04:00bungany reason open and save png larger than original png file while using nimPNG ?
07:04:55voltistCompression options?
07:07:00bungI check makePNGEncoder the defualt settings seems good
07:21:54Araqvoltist, 'expr' is now 'untyped'
07:22:05Araqand '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:47voltistAraq: 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:41Araqping @mratsim
09:11:37*marnix quit (Ping timeout: 264 seconds)
09:11:45*marnix joined #nim
09:27:37*abm joined #nim
09:27:51bung@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:49bung@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:43alehander92ojj
10:45:47alehander92morning from pomorie
10:46:17alehander92lunch 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:37Araqshashlick, nimble update wNim
11:47:37Araq Tip: 1 messages have been suppressed, use --verbose to show them.
11:47:37Araq Error: C:\Users\rumpf\projects\nimble\src\nimble.nim(1201) nimble
11:47:37Araq ... C:\Users\rumpf\projects\nimble\src\nimble.nim(1132) doAction
11:47:38Araq ... C:\Users\rumpf\projects\nimble\src\nimble.nim(38) refresh
11:47:39Araq ... Package list with the specified name not found.
11:48:01Araq(yes, I know this is not how 'nimble update' works.)
11:48:43AraqBut how come Nimble doesn't know stack traces are for bugs and not for Nimble's users.
11:56:04Araqwow 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:00FromDiscord<dom96> Araq: because you've got a nimble built in debug mode?
12:14:38Araqdo I? maybe, I thought I had a release build :P
12:15:25FromDiscord<dom96> with stack traces? lol
12:15:53Araqyou never know, --stackTrace:on can be enabled with -d:release
12:17:40*hoijui joined #nim
12:19:28FromGitter<sheerluck> https://play.nim-lang.org/#ix=2s8N
12:32:49*fanta1 joined #nim
12:33:40FromDiscord<Clyybber> @Yardanico Didn't you encounter this crash https://github.com/nim-lang/Nim/issues/15005 too?
12:33:43disbot[ARC] Last optimizer crash the autolayout in wNim. ; snippet at 12https://play.nim-lang.org/#ix=2s8Q
12:44:08shashlickI have stack taxes on with nimterop - super useful when users report bugs
12:45:01shashlickWas 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:40FromDiscord<mratsim> taxes? :p
13:20:18FromDiscord<mratsim> @Araq, you pinged me?
13:20:44Araqyeah, any experience / opinion on the "disruptor"?
13:20:56FromDiscord<mratsim> The MPSC queue?
13:21:51Araqyes
13:22:14Araqwell it's multi producer, multi consumer afaik
13:22:45FromDiscord<mratsim> The issue with Java queues is that they can assume a multithreaded GC
13:23:43*vicfred joined #nim
13:24:17Araqwell we got Isolated[T] which you can put into queues without copying
13:24:52*hoijui quit (Ping timeout: 260 seconds)
13:26:28FromDiscord<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:08FromDiscord<mratsim> basically based on the 2 lock based channel from Michael and Scott paper
13:28:23Araqwell the disruptor's design is inspiring
13:28:56Araqthere is beauty in a bounded-size queue so that producers are throttled automatically etc
13:29:14FromDiscord<mratsim> my old MPMC queue is bounded
13:29:27FromDiscord<mratsim> that's called backpressure btw
13:29:54Araqyes, "backpressure", I know
13:30:10FromDiscord<mratsim> https://github.com/mratsim/blocksmith/blob/7009e094bff6b322a8a8547b121c3ffa0cddbe2b/architecture_phase0.md#backpressure
13:31:41Araqand it offers batch processing. what's not to like?
13:38:45*Vladar joined #nim
13:40:04*hoijui joined #nim
13:40:58FromDiscord<mratsim> AFAIK, I've seen a lot of hype around disruptor but no figures against Facebook Folly or MoodyCamel's queue
13:41:13FromDiscord<mratsim> something like this: https://moodycamel.com/blog/2014/a-fast-general-purpose-lock-free-queue-for-c++
13:54:06FromDiscord<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:20FromDiscord<xsouxsou29> (edit) 'git' => 'github'
13:54:32FromDiscord<mratsim> nimtorch was a startup project but funding issues
13:55:10FromDiscord<mratsim> minitorch is a wrapper project but I can't automate easily recursive bindings from the C++ headers
13:55:29FromDiscord<mratsim> I can do it manually but well, it's a bit tedious
13:56:23FromDiscord<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:17FromDiscord<mratsim> https://github.com/mratsim/Arraymancer/blob/master/src/linear_algebra/linear_systems.nim#L20
13:58:41FromDiscord<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:55FromDiscord<xsouxsou29> I might go into arraymancer way sooner than I expected 🙂
14:00:00FromDiscord<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:32FromDiscord<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:37FromDiscord<mratsim> what were you thinking of?
14:01:08FromDiscord<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:14FromDiscord<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:46FromDiscord<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:51FromDiscord<Yardanico> It's from RBTreeNim package, minimised as far as I could
14:36:20FromDiscord<Yardanico> Although I'm not sure if I retained the original problem or not
14:37:10FromDiscord<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:11FromGitter<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:19disruptekturn off sink inference.
14:57:07*maier quit (Ping timeout: 240 seconds)
14:59:13*NimBot joined #nim
15:01:09FromDiscord<Yardanico> @gogolxdong this is easily fixable if you add nosinks pragma to needed closures
15:01:57disruptekdelete should be used for O(n) operations because it's longer and more expicit, while del should be O(1).
15:06:25FromGitter<gogolxdong> how to turn off sink
15:10:59*marnix quit (Ping timeout: 240 seconds)
15:11:17shashlick`--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:36FromDiscord<kodkuce> https://media.discordapp.net/attachments/371759389889003532/734793133157646376/2020-07-20_172301.png
15:25:56Yardanicodoes it compile or not?
15:25:57FromDiscord<kodkuce> hmm this heppends when i import pg (treeforms postgresql)
15:26:20FromDiscord<kodkuce> yep ofc, am just asking should i take care about this or just ignore
15:26:33FromDiscord<kodkuce> duno what locks its asking for
15:26:35Yardanicoif it compiles - ignore, it's just a nimsuggest bug then :P
15:26:47FromDiscord<kodkuce> ok 🙂
15:29:17FromDiscord<Shucks> nim needs advertising
15:29:37Yardanicowell, everyone can do it :)
15:29:38FromDiscord<kodkuce> when i finish my game i will post it evrywhere 🙂
15:29:41Yardanicojust make nim projects
15:30:10FromDiscord<kodkuce> just sux atm for client am using godot, but will try to port to some pure nim too
15:31:41FromDiscord<Shucks> I mean srsly, nim is beautiful, easy and performant. I don't get why this community is that small.
15:31:56Yardanicobecause a lot of people are lazy
15:32:04Yardanicothey just want to use existing libraries for everything :)
15:32:06YardanicoAraq: https://github.com/nim-lang/Nim/issues/15024
15:32:07FromDiscord<lqdev> a lot of people criticise it for stupid shit
15:32:08disbot[ARC] Weird crash after the optimizer PR ; snippet at 12https://play.nim-lang.org/#ix=2s9m
15:32:13FromDiscord<kodkuce> me=lazy 100%
15:32:15FromDiscord<lqdev> like case insensitivity
15:32:21Yardanico@lqdev well I don't think it's the majority, it's just the "loud 1%"
15:32:33FromDiscord<lqdev> well, maybe
15:32:38FromDiscord<lqdev> i'm not good at statistics
15:33:01FromDiscord<Vindaar> > because a lot of people are lazy↵could also be interpreted as us being lazy not advertising nim enough 😉
15:33:04FromDiscord<kodkuce> i dident like whitespaces hated it even in python, now i got used to it so now i hate breakets
15:33:06FromDiscord<lqdev> but we have 1000 people on this server, maybe 15 of which are active
15:33:07FromGitter<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:14Yardanico@lqdev exactly
15:33:27FromDiscord<lqdev> @kodkuce haha same
15:33:33Yardanico@brentp well, must be a compiler bug then :P
15:33:47FromDiscord<lqdev> well i wouldn't go as far as to say "i hated whitespace", i just prefered good ol' braces
15:33:56FromDiscord<lqdev> but still
15:34:03FromDiscord<lqdev> nim made me love 2 spaces for indentation
15:34:44FromDiscord<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:59FromDiscord<lqdev> case insensitivity good
15:35:30FromDiscord<Shucks> auto completion just does that for me anyway lol
15:35:35FromDiscord<lqdev> yeah
15:36:31FromDiscord<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:41FromGitter<brentp> here's a reproducer: https://pastebin.com/raw/wyqL5KTi
15:36:48Yardanico@lqdev what about using PascalCase for constants?
15:36:57FromDiscord<lqdev> Yardanico: yeah that's fine too
15:37:05Yardanico@brentp it's better for you to submit an issue report :)
15:37:14FromDiscord<lqdev> i'm talking about methods and *god no* variables
15:37:18FromGitter<brentp> aye. doing that now
15:37:19Yardanicooh lol no
15:37:25YardanicoI only use PascalCase for types and constants (sometimes)
15:37:30FromDiscord<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:00FromDiscord<lqdev> @Shucks don't want to dissapoint ya but leorize's plugin doesn't run that much better
15:38:09FromDiscord<lqdev> they both use nimsuggest
15:38:34FromDiscord<Shucks> Yea I guess. I felt like it was better on my linux machine
15:38:43FromDiscord<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:56FromDiscord<Shucks> Alright. Never had any success with nimlsp aswell. Either on vim or vscode
15:40:16FromDiscord<Shucks> I guess nimlsp also doesn't gives code highlighting huh
15:41:01Yardanicowell it wouldn't be able to
15:41:08YardanicoLSP didn't standartise semantic syntax highlighting yet
15:41:15FromDiscord<Shucks> oh
15:41:27Yardanicoalthough there's a pending issue for that
15:41:35Yardanicoand PMunch even started implementing it a bit I think
15:41:43Yardanicoand I actually use vscode-nim-lsp
15:41:56FromDiscord<Shucks> without a nim plugin at all?
15:42:06FromDiscord<Shucks> nvm
15:42:54FromDiscord<Shucks> Gonna try that
15:43:09Yardanicowith nimlsp
15:43:43FromDiscord<Shucks> Yes.. who knows maybe it doesn't lags that ugly then anymore ;D
15:43:45FromDiscord<kodkuce> that AI autocomple one is not bad too
15:43:50Yardanicoit's very heavy
15:43:59Yardanicoeven though I have 16gb ram it's still heavy
15:44:07Yardanicoit's not okay for autocompletion to use 1-2GB ram
15:44:35FromDiscord<Shucks> holy. Thats even more worst then
15:46:32Araqbrentp: pushed a hotfix but no idea if it's correct
15:48:02FromDiscord<Shucks> Well don't get any suggestions with vscode-nim-lsp aswell
15:48:15Yardanicowell did you install nimlsp? did vscode-nim-lsp pick it up?
15:48:18Yardanicois nimlsp in your PATH? :D
15:51:01FromDiscord<Shucks> It's actually saying no nimlsp found in path. But it is?
15:51:21Yardanicowdym "it is"?
15:51:26Yardanicoyou have ~/.nimble/bin in PATH ?
15:51:39Yardanicoand if you just added something to PATH you might have to relogin
15:52:00FromDiscord<Shucks> nimble/bin is in path yes
15:52:06FromDiscord<Shucks> since I got nim actually lol
15:52:09Yardanicoand did you install nimlsp?
15:52:16FromDiscord<Shucks> yes
15:52:22Yardanicoand did you relogin just in case? :D
15:52:28FromDiscord<Shucks> lets try
15:54:44FromDiscord<Shucks> No error but no suggestions ;p
15:54:51FromDiscord<Shucks> could I test nimlsp somehow?
15:55:07Yardaniconimlsp --version
15:55:32FromDiscord<Shucks> ```nimlsp --version↵nimlsp v0.2.4```
15:56:01*sagax quit (Read error: Connection reset by peer)
15:56:20Yardanicowell i don't know then really
15:56:29Yardanicoworks for me :tm: :)
15:57:16FromDiscord<Shucks> some day, someone will finally add some good editor support for nim
15:57:25Yardanicoehm?
15:57:31Yardaniconeovim with leorize's plugin is very good
15:57:37Yardanicoit even has semantic syntax highlighting
15:57:42Yardanicoand vscode + nimlsp is pretty good too
15:58:55FromDiscord<Shucks> Agree, I actually love leorize's plugin. If anyone ever gets that running on linux let me know ;p
15:59:02FromDiscord<Shucks> windows*
16:07:18Yardanicois this a bug or expected arc behaviour? https://github.com/nim-lang/Nim/issues/15026
16:07:20disbot[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:40FromDiscord<Clyybber> Thats a bug
16:16:20Yardaniconice :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:54Yardanicoalso arc crash with one of tests in nimly - with -d:useMalloc the error messages are very interesting
16:32:58Yardanicohttps://i.imgur.com/jCOCneF.png never saw that before in my life
16:39:18AraqYardanico: as I keep saying, use valgrind to find the cause rather than an effect
16:39:25Yardanicoit doesn't really help
16:39:35FromDiscord<Clyybber> Try with Araqs bugfix
16:39:56Yardanicooh I will
16:43:24*zhpixel517 joined #nim
16:43:47Yardanicowell seems like this didn't fully fix the issues
16:43:59*zhpixel517 is now known as zhpixel
16:44:10Yardanicosome 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:58Yardanicoyou can check by running tests of https://github.com/Nycto/RBTreeNim with arc
16:45:10Araqwell go fix it, it's only the hardest thing I ever wrote
16:45:24Yardanicowell yeah, I'm not saying it's easy :P
16:45:43FromDiscord<Avatarfighter> lmao Araq is a savage 😛
16:47:33AraqI just hope the optimization can be saved, it's so nice when it works
16:49:12Yardanicoby 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:22Araqyes
16:49:41Araqyou can also add a switch for it but switches suck
16:51:05Yardanicowell seems like nim-markdown and rbtreenim crashes are due to cursorifier, but nimly - not
16:53:04Zevvsooo. what will my next half baked project be. Lets implement TLS1.3 from scratch in Nim!
16:54:52FromDiscord<Avatarfighter> Thats super cool Zevv
16:55:10FromDiscord<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:11Yardanicohuh apparently markdown's cursor inference bug isn't triggered in markdown itself
17:06:19Yardanicobut rather in some of the modules it uses
17:10:00Zevvdom96: let me check again. Had to leave yesterday, sorry
17:11:40Zevvhmm works for me now, but that's on another machine
17:12:15Yardanicook now I know with 100% certainty which proc triggers that cursor inference bug
17:12:21Yardanicogod bless owner.name.s
17:12:24YardanicoXD
17:12:31FromDiscord<dom96> Zevv: Interesting. What are the differences between the two machines?
17:15:32Zevvdon't know yet, but i don't have access to the first one now :/
17:15:51Zevvprobably older firefox, I think they run the same add ons
17:16:03FromDiscord<dom96> same OS'?
17:16:08Zevvhm lacking ghostery here, lemme try
17:16:10Zevvdom96: more or less
17:16:52Zevvnope, it's not ghostery
17:17:15FromDiscord<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:21Zevvsure
17:17:29FromDiscord<dom96> Thanks! 🙂
17:18:31YardanicoAraq: 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:48Yardanicowithout_cursor works, with_cursor crashes
17:19:51Yardanicothe 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:17YardanicoI mean that exact data of it with which doStuff results in a crash later
17:20:54FromDiscord<dom96> lol why is the jester tested in the Nim repo not using httpbeast?
17:22:28Araqdom96: because we test the Nim compiler, not jester
17:23:06FromDiscord<dom96> meh, I suppose. HttpBeast might be worth testing too.
17:23:14FromDiscord<dom96> or I should say, testing that it compiles
17:24:36disruptekdom96: did you run out of passwords to try? only 157 attempts. pffbt.
17:24:53Yardanicodisruptek: wat
17:24:54FromDiscord<dom96> I'm trying to get to 9696 attempts
17:25:14disruptekmy phone number is 9996669.
17:26:05disrupteki 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:02FromDiscord<Avatarfighter> disruptek: you never cease to put a smile on my face
17:29:46AraqI myself have begun replacing all of my furniture with Hero Quest furniture. https://youtu.be/Cx8sl2uC46A?t=50
17:35:40ForumUpdaterBotNew thread by Snej: More readable C name-mangling?, see https://forum.nim-lang.org/t/6562
17:35:49Yardanicodisruptek: ^ :D
17:37:17disruptekthis guy puts my beard to shame.
17:37:37Yardanicodo 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:38disbot[WIP] porting name mangling from ic effort
17:39:35disruptekthe what?
17:40:01Yardanicothe resulting C code of this PR
17:40:12disruptekwait, you got it to compile?
17:40:14Yardanicoyou shown it on stream but do you have it in any gists or similar?
17:40:22Yardanicodisruptek: nonono, I'm just asking :D
17:40:43disrupteksure.
17:41:15FromGitter<ynfle> Is there a simple way to switch the keys and values a tables
17:41:32Yardanicowell, by creating a new table and populating it :P
17:41:36Yardanicoor using something like a bitable
17:41:49Yardanicoif you want both key->value and value->key mapping at the same time
17:42:07disruptekonly a fool would do such a thing.
17:42:27FromGitter<ynfle> Nope just want to switch it when I'm done with it
17:42:36Yardanicowell, you can just iterate and create it manually then
17:44:03disruptekYardanico: http://ix.io/2s9S/c
17:44:52Yardanicodisruptek: thanks a lot your highness
17:45:06disruptekdo you think i cannot get to you from here?
17:45:13disruptekryan air is still flying americans.
17:45:17*solitudesf- joined #nim
17:47:09Yardanicoi will hide in siberia
17:47:24*theelous3 quit (Ping timeout: 258 seconds)
17:47:28FromDiscord<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:58Yardanicoyourvar[] = T(kind: newKind, data: 1)
17:48:10Yardanicojust dereference it and set it to new variant
17:48:15FromDiscord<tomck> ahhh ok brill ta
17:48:28*Trustable joined #nim
17:48:32FromDiscord<tomck> I think I see 'ref' and think & in c++, keep forgetting you can just deref it to get the value
17:48:58FromDiscord<tomck> (edit) '&' => '`&`'
17:58:31FromDiscord<kodkuce> sent a long message, see http://ix.io/2sa1
17:58:59YardanicoPython is 4-space by the way (the convention I mean)
17:59:53FromDiscord<Recruit_main707> Javascript jobs do pop up i think
18:00:03Yardanicoof course
18:00:04FromDiscord<kodkuce> i hate js
18:00:07Yardanicowho doesn't :P
18:00:13FromDiscord<kodkuce> (edit) 'hate' => 'HATE'
18:00:19FromDiscord<Recruit_main707> But you have nim😏
18:00:26FromDiscord<tomck> if you get a frontend modern web dev job, js isn't too bad
18:00:35FromDiscord<tomck> spend all your time writing html&css instead!
18:01:13FromDiscord<kodkuce> i prefere backend cuz frontend bosses change their mind evry other day
18:01:16disrupteki'd rather be responsible for all the defects in my software.
18:02:04FromDiscord<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:10FromDiscord<kodkuce> wanted to kill her
18:02:14YardanicoD:
18:03:06FromDiscord<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:54FromDiscord<kodkuce> anyone selling nim skills as freelancer
18:05:36FromDiscord<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:31FromDiscord<kodkuce> guess i should go chill eat some icecube 🙂
18:09:02*Senketsu joined #nim
18:14:47FromDiscord<tomck> s'fun, gotta min-max for dev speed
18:15:02disruptekpass.
18:15:04FromDiscord<tomck> doesn't matter if you throw away 50% of the app when it only took you a week
18:21:45bungtomck I said simlar words in this channel, go find some interesting project.
18:26:59bunggot sleep
18:27:08*bung quit (Quit: Lost terminal)
18:28:13FromDiscord<tomck> ?
18:28:23disruptekesl
18:29:12FromDiscord<tomck> ?
18:29:15Yardanico?
18:29:44FromDiscord<tomck> wtf is going on lol, is my brain broken
18:34:20*abm quit (Quit: Leaving)
18:35:49disruptekenglish as a second language.
18:37:22Yardanicodisruptek: you're a native english speaker aren't you
18:37:25Yardanicowhy are u lyin :D
18:46:23disrupteki'm refering to bung's confusing comment.
18:51:53Zevvhey my destructor is called end of scope and not end of function \o/
18:52:05YardanicoZevv: yes :P
18:52:22Zevvso much stuff I missed
18:52:27YardanicoZevv: https://github.com/nim-lang/Nim/pull/14790
18:52:27disbotscoped memory management
18:52:35Yardanicohttps://github.com/nim-lang/Nim/pull/14962
18:52:36disbotAn optimizer for ARC
18:53:08Zevvdude
18:53:17Zevvthis might even become usable and all
18:53:37Zevvso much arc
18:54:19YardanicoZevv: ikr
19:03:41Zevvtrying to understand the Isolate[] stuff
19:03:48Zevvmust... keep... up...
19:04:49YardanicoZevv: it's simple :P
19:05:04Zevvit's about .magic.
19:05:28Zevvand non-trivial
19:12:26*narimiran joined #nim
19:23:25Zevvwould arc allow for non-global channels?
19:23:35Zevvor does that question not even make sense
19:27:10FromGitter<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:32Yardanico@Knaque https://nim-lang.org/docs/browsers.html
19:34:20FromGitter<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:11FromDiscord<Shucks> How could I tell my linter that I'm using --threads:on ?
19:53:04disruptekput such options in a appname.nim.cfg
19:55:29*endragor quit (Ping timeout: 265 seconds)
19:56:51Yardanicoor just nim.cfg or config.nims
19:56:56Yardanicoin the same folder with your main .nim file
19:57:27disrupteknah, nim.cfg and config.nims will be clobbered by package managers.
19:57:34Yardanicowat
19:58:48shashlickagain, scrubbing nimble issues - if you have any priorities, please let me know
19:58:49disruptekpackage managers will shortly write nim.cfg from scratch, blowing away whatever exists.
19:58:56Yardanicowhy would they?
20:00:56disruptekbecause it's the best way to assert an environment that will work.
20:01:01Yardanicois it?
20:01:05Yardanicoi don't think it's needed
20:01:14disruptekfeel free to propose an alternative.
20:01:24*marnix joined #nim
20:01:57Yardanicowell we're surviving without it right now somehow :P
20:02:10disruptekyou can stay on nim 1.2.
20:02:25disruptekyou're surviving with it right now somehow.
20:02:32Yardanicoi'm on nim devel
20:02:36disruptekwhatever.
20:02:46shashlick@Yardanico - the problem is that nim knows too much about nimble
20:02:54shashlickand nimble controls nim by directly calling it
20:03:24shashlickinstead, the idea is for nimble as a package manager to setup the environment where appropriate
20:03:39shashlickafter that the user can opt to use nim or nimble
20:04:38shashlickand 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:31Yardanicowell but can't that be done by a global user nim.cfg?
20:06:03shashlicknot everyone wants to use a global package cache
20:06:05disruptekshashlick'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:48shashlickdisruptek: did we decide to use nim.cfg or project.nim.cfg
20:07:05disruptekwe blow away nim.cfg because it's the only way to capture hierarchial config.
20:07:22disruptekproject.nim.cfg holds things like, --threads:on
20:07:48*marnix joined #nim
20:08:10shashlickproblem 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:25shashlickand with this design user needs a project2.nim.cfg and so forth with the same or similar stuff
20:08:39shashlickbut putting paths in project.nim.cfg doesn't help either
20:09:05disruptekyou can still put threads in nim.cfg if you want.
20:09:18shashlickwe may not be able to get away from having pkg manager specific and user specific areas in nim.cfg
20:09:20disruptekit's just that it may be read/written by pm.
20:09:40disruptekdude, we aren't even going to have config files.
20:09:56disruptekthis is a stopgap measure.
20:10:04shashlickwhat's the new way
20:10:08disruptekpragmas.
20:11:09disrupteki made this little fan setup for my rv.
20:11:19shashlickusing pragmas I presume
20:11:23disruptekyeah.
20:11:33disruptekit's like, a 4" bilge fan or something.
20:11:34shashlickvery pragma tic of you
20:12:06shashlickdo you think pragmas would solve the problem where you cannot set --os and --arch in nim.cfg
20:12:27disrupteki guess.
20:12:40disruptekthis fan works great, but the headroom is unreal.
20:12:54disruptekit's fine at like 5% power. kick it up over 4amp and it's nuts.
20:12:59disruptekit runs across my desk.
20:13:03shashlickI installed a fan in my study so I appreciate the value
20:13:28shashlickit is 97F here after all
20:13:49shashlickwhat's 4raq's take on all this
20:13:57shashlickif we are moving to pragmas, what's the point fiddling with cfg files
20:13:57disruptekhttps://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:10FromDiscord<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:17disruptekthen i wired up a controller to my 12v dc.
20:14:21*marnix joined #nim
20:14:35disruptekshashlick: araq is the one that is championing pragmas.
20:15:27Yardanicoshashlick: 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:06shashlickyep
20:23:37shashlickpragmas don't make it possible to set paths
20:24:15disruptekpaths shouldn't need to be set.
20:24:28shashlickthey can solve the threads or other such settings
20:24:29shashlickbut 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:43FromDiscord<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:58FromDiscord<demotomohiro> copy it or declare it somewhere else
21:15:20FromDiscord<demotomohiro> or use std::shared_ptr?
21:17:25FromDiscord<demotomohiro> Do you want to free memory without call destructor?
21:20:38FromDiscord<Zachary Carter> no right now I just want to keep a reference of it around to prevent destruction
21:20:48FromDiscord<Zachary Carter> I'll give `std::shared_ptr` a try
21:21:39FromDiscord<Zachary Carter> thanks
21:40:09leorize[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:04PrestigeI 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:56FromGitter<ynfle> What do you need/want to do?
21:54:48PrestigeHere'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:17PrestigeI'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:02PrestigeI've created a seq that contains each value, but am having trouble piecing together the callback invocation
21:59:05FromGitter<ynfle> https://nim-lang.org/docs/system.html#typeof%2Cuntyped?
22:00:44PrestigeI have the types and all, just need to invoke the callback with e.g. callback(arr[0], arr[1], ...arr[n])
22:05:38Prestigearr in this example is a sequence, just wanted something short to type
22:10:43FromDiscord<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:57leorize[m]use `new` to create the object on the heap
22:27:20leorize[m]then you may use `C++ <shared/unique>_ptr` if you want automatic free
22:27:52FromDiscord<Zachary Carter> alright thanks I'll try that
22:29:10leorizeif you're doing this from Nim it's trivial to wrap c++ new, I think the manual have an example
22:29:37FromDiscord<Recruit_main707> It does, yes
22:30:17FromDiscord<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:12leorize[m]if you want to keep the variable alive, then it has to outlive its stack frame :P
22:31:24FromDiscord<Zachary Carter> yeah, makes sense
22:50:49ForumUpdaterBotNew thread by JPLRouge: GTK3 vte error 0.7.9 compile, see https://forum.nim-lang.org/t/6564
22:51:11FromGitter<gogolxdong> @shashlick what's the purpose of turing on sink inference, simply turn off sink inference doesn't solve my issue.
23:07:13FromGitter<ynfle> @prestige, you mean something like sequtils.mapIt ?
23:09:30FromGitter<gogolxdong> /root/.nimble/pkgs/jester-0.4.3/jester.nim(704, 26) Error: undeclared identifier: 'initInterval'
23:09:30Prestigenah I don't think so. Just trying to invoke a callback once, where each param is an element in the array
23:11:34leorize[m]use newCall to generate a call
23:12:00Yardanico@gogolxdong that's a jester problem
23:12:08Yardanicoit still didn't have a new release after fix for deprecated-removed stuff
23:12:15Yardanicoyou can fix it manually by replacing initInterval with initDuration
23:12:47leorize[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:22leorize[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:38Prestigeleorize[m]: an example https://play.nim-lang.org/#ix=1M5Q
23:16:33leorizePrestige: so what happens if foo is shorter?
23:16:35leorizeor longer?
23:17:01PrestigeI'd want it to invoke the callback with every element in foo
23:17:33leorize[m]https://play.nim-lang.org/#ix=1M5U
23:17:50*krux02 quit (Ping timeout: 256 seconds)
23:18:26Prestigeso the callback actually has typed arguments in the real case, I'll update it
23:20:33Prestigehttps://play.nim-lang.org/#ix=1PJx
23:21:22FromDiscord<Zachary Carter> hrm - nothing I'm trying is working... https://gist.github.com/zacharycarter/f2fcf1e742765df3a9a548c705e5ac6b
23:22:28FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=1QjD
23:22:50FromDiscord<Zachary Carter> the destructor on the buffer object keeps getting called after I call `setIndexBuffer` on the `Mesh` object
23:27:57FromDiscord<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:22bungshashlick I want have https://github.com/mozilla/mozjpeg in nim , using nimgen or niminterop ?
23:30:12FromDiscord<reilly> I cannot for the life of me understand the incredibly overcomplicated `SendInput()` proc in WinAPI/Winim.
23:34:24FromDiscord<dom96> > you can fix it manually by replacing initInterval with initDuration↵@Yardanico[IRC]#0000 or just grabbing Jester@#head
23:34:29Yardanicoyes
23:34:37Yardanicowhy there wasn't a release after that deprecation fix? :P
23:36:35*lritter quit (Quit: Leaving)
23:38:33shashlick@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:51FromDiscord<dom96> because I don't have time for making releases
23:40:38shashlick@bung - nimterop should be able to do it quickly
23:41:40FromGitter<bung87> ok, I'll try it .
23:41:59FromGitter<gogolxdong> @Yardanico got it ,thanks!
23:42:12shashlick@gogolxdong sorry no idea, I just know the flag 😊
23:42:22*bung quit (Quit: Lost terminal)
23:42:32shashlick@bung ok let me know how it goes
23:43:28leorize[m]Prestige: https://play.nim-lang.org/#ix=1QsL
23:44:44PrestigeYo thanks, this is awesome
23:45:29leorize[m]np
23:45:58FromGitter<gogolxdong> @shashlick np
23:46:10FromGitter<gogolxdong> Doesn't new github UI show releases?
23:46:39Yardanicoit does
23:47:56FromGitter<gogolxdong> ok, found it