<< 03-12-2019 >>

00:15:16*leorize quit (Ping timeout: 260 seconds)
00:17:00*nif quit (Quit: ...)
00:17:09*nif joined #nim
00:17:22*leorize joined #nim
00:18:47FromDiscord_<exelotl> @yewpad wow lookin good
00:19:17FromDiscord_<yewpad> Thanks!
00:23:23FromDiscord_<yewpad> The thing is that the new Dracula style would completely replace the current light themed documentation which some people may want to keep. So I have to build in something that people can switch between light and dark. And this might involve using cookies? idk
00:24:05FromDiscord_<exelotl> oh yeah or localstorage
00:25:09FromDiscord_<yewpad> hm yeah, local storage seems way to be the way to go.
00:25:19FromDiscord_<yewpad> seems to be the way to go*
00:25:23FromDiscord_<yewpad> typing to fast geez
00:30:13clyybbergn8
00:30:15*clyybber quit (Quit: WeeChat 2.6)
00:30:25FromDiscord_<yewpad> gn8
00:32:23*norm joined #nim
00:32:39*norm is now known as Guest135
00:32:50*Hideki_ quit (Remote host closed the connection)
00:36:08Guest135y
00:36:29FromDiscord_<exelotl> y u
00:39:06*Guest135 quit (Remote host closed the connection)
00:53:45rayman22201This just reminds me that one of these days I want to try to fix the search feature of the docs again.... I "fixed" it the first time, and it didn't go as well as I hoped.
00:54:10rayman22201but hey, we have a native nim fuzzy matching algorithm now :-P
00:54:40*dwdv quit (Ping timeout: 252 seconds)
01:02:56disruptekmadprops: yeah, you probably need some dbus stuff.
01:03:58disruptekthat repo is just a collection of little things that don't justify publishing; just figured you might be able to hack the ix tool to do what you want.
01:34:50FromGitter<Obround> How do you run nim code at run time? Like python's `exec` statement
01:35:04FromDiscord_<treeform> I don't think nim search matters, google will beat you no matter what you do.
01:35:46FromDiscord_<Nanjizal> I am curious if anyone has used nim ffi with haxe c++.
01:35:47FromDiscord_<treeform> after trying to make my own search algos I gave up...
01:36:18FromDiscord_<treeform> @Nanjizal sounds too specific probably a forum question.
01:36:38FromDiscord_<treeform> Many have used nim ffi with C++.... but haxe c++?
01:36:40FromDiscord_<Nanjizal> ie code project in haxe compile to c++ and then use Nim for any bottle necks.
01:37:16FromDiscord_<treeform> does haxe produce readable c++ code?
01:37:37FromDiscord_<treeform> isn't haxe a dynamic language similar to action script?
01:37:49FromDiscord_<treeform> it probably makes really crazy c++ code.
01:40:20FromDiscord_<Nanjizal> No it's static for c++ target. It looks like as3 but it's far more functional.
01:41:31FromDiscord_<Simula> what is `seq`, is it a linked list, an array, a vector?
01:45:08*ng0 quit (Quit: Alexa, when is the end of world?)
01:45:58FromDiscord_<Nanjizal> There is this project https://github.com/Aurel300/ammer would it be easy to hook up nim do you think. Haxe has some cool games toolkits but it would be great to be able to write some low level code in Nim and then plug it in. My worry is that Nim and Haxe both have managed memory.
01:46:24FromDiscord_<Nanjizal> I am slowly reading the Nim action book.
01:47:26FromDiscord_<treeform> I think it will be hard but not impossible.
01:49:08FromDiscord_<Simula> just from looking at the generated C code, it *looks* like it's an array?
01:49:22FromDiscord_<exelotl> @Simula it's a vector I guess
01:49:52rayman22201I only know a little about Haxe. Nim is similar in that it also uses C/C++ as a compile target. What makes you think Nim will be faster than just "optimizing" your Haxe code?
01:50:30FromDiscord_<exelotl> like I'm 90% sure it's length + capacity + pointer to data, self-reallocates as you add more stuff
01:50:35FromDiscord_<Simula> it sure is
01:50:51FromDiscord_<Simula> which means it's technically an array which means i can use it for this project lmao
01:50:58FromDiscord_<Simula> real weird requirements from a professor
01:51:25FromDiscord_<exelotl> wow your professor lets you use nim
01:51:25rayman22201lol
01:51:28FromDiscord_<exelotl> that's cool
01:51:43rayman22201your professor lets you use Haxe and Nim?
01:51:47rayman22201that's very cool lol
01:51:51FromDiscord_<Simula> my professor told me to use any language i want and boy howdy am i making my TAs suffer
01:52:58FromDiscord_<Nanjizal> Bit late to think about it tonight but I would be interested to do this since I use Haxe for a long time, but I am not keen to use c++/c, would prefer to be able to use some Nim.
01:52:58FromDiscord_<Nanjizal> http://old.haxe.org/doc/cpp/ffi
01:54:27FromDiscord_<Nanjizal> Haxe c++ is not very fast compared to native c++ so projects like NME use quite a bit of c++ and then connect to it.
01:56:39rayman22201ahh. interesting. This is good for Nim. Nim produces relatively fast C++ You should just use Nim for everything. come to the dark side :-P
01:58:57FromDiscord_<Nanjizal> Haxe is probably better at javascript and also Haxe has abstracts and classes and as I said quite a few very robust cross target toolkits. I think it would be nice to use Nim with Haxe. I am intending to learn Nim but I am not in a coding role currently... must get some sleep up early.
01:59:38FromDiscord_<Nanjizal> So I don't have too much computer time, and am working on my shader vector stuff in haxe.
02:01:20FromDiscord_<Nanjizal> I don't have proffessor, getting us mixed up 🙂
02:03:45FromDiscord_<Nanjizal> I think ffi connection between haxe and nim would be really useful, nim could then hook into haxe libraries and vicer verser.
02:09:59*lritter quit (Ping timeout: 276 seconds)
02:24:33FromDiscord_<yewpad> https://imgur.com/vxwo3xI
02:24:35FromDiscord_<yewpad> Finally done
02:24:57FromDiscord_<yewpad> See the dark mode switch? Works without any flaws
02:25:25disruptekyou should be able to just sniff darkmode. there's browser support now.
02:25:39FromDiscord_<yewpad> Hm good idea
02:40:48FromDiscord_<yewpad> @disruptek: Is now integrated! The page will now check if you prefer the dark theme. Check hierarchy: Dark? -> Light? -> (Not supported) -> Check local storage
02:41:03disruptekcool!
02:41:33FromDiscord_<yewpad> I'm done with the "re-design". Now gonna create a pull request and hope for the best
02:41:46disruptek🤞
02:45:17shashlickdisruptek - #12796
02:45:19disbothttps://github.com/nim-lang/Nim/pull/12796 -- 3Path substitution for --out and --outdir @11genotrance
02:45:39disruptekhah, nice!
02:45:48shashlicklet's see if it passes tests
03:03:43*rockcavera quit (Remote host closed the connection)
03:05:13FromDiscord_<yewpad> Pull request created. Can't wait to use the 'official' dark mode
03:05:30FromDiscord_<yewpad> My eyes will thank me
03:07:18*endragor joined #nim
03:18:13*Hideki_ joined #nim
03:19:00FromDiscord_<Winton> I LOVE NIM!
04:10:14*chemist69 quit (Ping timeout: 276 seconds)
04:11:27*chemist69 joined #nim
04:18:22FromDiscord_<yewpad> what the f
04:18:31FromDiscord_<yewpad> why would you test the output of `nim doc`
04:18:44FromDiscord_<yewpad> One minor style change and the tests go belly up
04:39:29*natrys joined #nim
04:43:10*nsf joined #nim
04:55:55*narimiran joined #nim
05:15:16*njoseph quit (Ping timeout: 240 seconds)
05:19:59*njoseph joined #nim
05:33:13*njoseph quit (Ping timeout: 250 seconds)
05:35:39*njoseph joined #nim
06:31:55FromGitter<zacharycarter> where are the nimdoc tests? just curious - want to see what all is tested
06:34:33FromGitter<zacharycarter> Nanjizal: how is Haxe better at JavaScript? Also, Nim doesn't embrace OOP like Haxe does
06:35:04FromGitter<zacharycarter> that's one thing I find annoying / turns me off of Haxe - is how rigidly OO it is
06:36:25FromGitter<zacharycarter> I don't see a point in supporting Nim in Haxe anyway... You might as well just use Nim
06:41:44FromGitter<zacharycarter> Araq: question for you - I read a message from you recently about LLVM being fully embraced in the future by Nim potentially as a target. I believe you also said that you weren't show how excellent C++ interop would be achieved if this were to happen.
06:41:50FromDiscord_<yewpad> @zacharycarter: in the "nimdoc" dir (root/nimdoc)
06:42:47FromDiscord_<Rika> ??? i cant intersect orderedhashsets?
06:42:52FromGitter<zacharycarter> Will achieving excellent C++ interop still be a priority if Nim move towards fully supporting LLVM - or will it be a sacrifice we have to live with to gain support for LLVM?
06:43:08FromGitter<zacharycarter> and if it's the latter, what kind of C++ interop support can we expect?
06:43:13FromGitter<zacharycarter> yewpad: thanks will check them out
06:45:56FromGitter<zacharycarter> ooph yeah - having styling rules in the expected output is weird
06:46:07FromGitter<zacharycarter> but I guess if you don't expect the styling rules to ever change
06:47:55*solitudesf joined #nim
06:59:25FromDiscord_<Stuffe> Pretty sure I found a simple bug:
06:59:25FromDiscord_<Stuffe> https://play.nim-lang.org/#ix=23qw
07:00:38madpropshow can i send a seq as a mutable reference to a proc for it to get modified?
07:01:17FromDiscord_<Stuffe> proc(myseq: var seq[int]) =
07:01:33FromDiscord_<treeform> I would rather we keep C++ interop...
07:01:35FromDiscord_<Stuffe> you put the "var" in the function declaration before the argument to make it mutable
07:03:04FromDiscord_<Simula> im trying to set a ref object to nil but for some reason it isn't working. is there something im missing?
07:03:37FromDiscord_<treeform> @Stuffe this works: https://play.nim-lang.org/#ix=23qy
07:04:02FromDiscord_<treeform> I think Ordered table has not been converted to the new nil is empty paradigm...
07:04:18FromDiscord_<treeform> procs need to be made work with nil is empty
07:04:26FromDiscord_<treeform> still a bug
07:04:32FromDiscord_<treeform> but that's why it happened
07:04:32FromDiscord_<Stuffe> @treeform ok i see
07:04:53FromDiscord_<Stuffe> Helpful work around, better than my dirty try statement
07:04:55FromDiscord_<treeform> @Simula do you have a simple example?
07:05:00FromDiscord_<Simula> i dont
07:05:04FromDiscord_<Simula> its a hundred lines long
07:05:09FromDiscord_<Simula> let me see what i can do
07:05:17FromDiscord_<treeform> i think its more complex then setting a ref to nil
07:05:35FromDiscord_<Stuffe> @treeform are you actively working on the language?
07:06:03FromDiscord_<Simula> @treeform happens on line 20 https://pastebin.com/8CVjmNq9
07:06:25FromDiscord_<Simula> not a full working example
07:06:25FromDiscord_<treeform> @Simula setting it to nil works: https://play.nim-lang.org/#ix=23qA
07:06:35FromDiscord_<Simula> it absolutely doesnt
07:06:57FromDiscord_<treeform> `proc deleteNode(node: var BstNode, data: int): bool =`
07:07:04FromDiscord_<treeform> var BstNode is wrong
07:07:09FromDiscord_<Simula> line 22 still prints out the child node even though it should be nil
07:07:20FromDiscord_<treeform> you are making the pointer to the BstNode a mutable
07:07:32FromDiscord_<treeform> but BstNode is alreayd a ref object, remove the bar
07:07:38FromDiscord_<treeform> but BstNode is alreayd a ref object, remove the var
07:07:48FromDiscord_<Simula> `https://pastebin.com/8CVjmNq9`
07:07:51FromDiscord_<Simula> whoops
07:08:00FromDiscord_<Simula> ` Error: 'node' cannot be assigned to`
07:08:02FromDiscord_<Simula> `Error: 'node' cannot be assigned to`
07:08:21FromDiscord_<treeform> @Stuffe no, I maybe submitted 5 patches to the language, I am mostly a user.
07:08:46FromDiscord_<Simula> i cant set the node to nil if it isnt mutable
07:09:11FromDiscord_<Simula> but i think i understand the issue now
07:09:14FromDiscord_<treeform> you are setting some thing else to nil
07:09:20FromDiscord_<treeform> the address of the callee
07:09:33FromDiscord_<treeform> it does not change the data structure, just the passed arguments
07:09:46FromDiscord_<Simula> how do i set the actual node to nil then?
07:09:58FromDiscord_<treeform> I think by passing the parent node
07:10:02FromDiscord_<treeform> and setting it to nil
07:10:11FromDiscord_<Simula> im not sure i understand
07:10:55FromDiscord_<Simula> is there a way to delete an object?
07:11:03FromDiscord_<treeform> your deleteNode function can't work because it can't unset the parent node
07:11:08FromDiscord_<treeform> because you don't pass it
07:11:51FromDiscord_<treeform> say you have a list of @[1,2,3]
07:11:58FromDiscord_<treeform> your function says
07:12:03FromDiscord_<treeform> delete(3)
07:12:08FromDiscord_<treeform> but from which list???
07:12:17FromDiscord_<treeform> yeah it can delete everything inside 3 ... all of the bits
07:12:26FromDiscord_<treeform> but it will not remove it from the list of @[1,2,3]
07:12:28FromDiscord_<Simula> im still not following
07:12:33FromDiscord_<treeform> you need some thing like
07:12:36FromDiscord_<treeform> delete(list, 3)
07:12:36FromDiscord_<Simula> im passing the root node, doesnt get more parent than that
07:12:50FromDiscord_<Simula> thats what i have
07:12:50FromDiscord_<treeform> you need some thing like this:
07:13:03FromDiscord_<treeform> `proc deleteNode(root: BstNode, node: BstNode, data: int): bool =`
07:13:12FromDiscord_<treeform> you walk through the root node
07:13:15FromDiscord_<Simula> but what happens when i want to delete the root node?
07:13:16FromDiscord_<treeform> find the node inside it
07:13:31FromDiscord_<treeform> well you can't?
07:13:41FromDiscord_<treeform> not with that api
07:13:43FromDiscord_<Simula> i have to be able to though
07:14:14FromDiscord_<Simula> screw it, i'll just have the function return a whole new bst instead of modifying it in-place
07:14:19FromDiscord_<treeform> lol
07:14:28FromDiscord_<Simula> i mean, what else can i do?
07:14:28FromDiscord_<treeform> yeah that could return a nil yes
07:14:45FromDiscord_<treeform> the thing that points to the root node is some global of a function local
07:15:46FromDiscord_<Simula> i dont unederstand what you mean
07:16:12FromDiscord_<treeform> Sorry I was wrong.
07:16:18FromDiscord_<treeform> I think I confused myself and you.
07:16:27FromDiscord_<treeform> https://play.nim-lang.org/#ix=23qC
07:16:31FromDiscord_<treeform> here it works
07:16:35FromDiscord_<treeform> you pass it as a var
07:16:50FromDiscord_<treeform> which is usually not correct thing to do, in this case you want to modify the address of the thing instead of the thing
07:16:58FromDiscord_<treeform> so you correctly pass var
07:17:06FromDiscord_<Simula> that's what i was already doing
07:17:08FromDiscord_<Simula> and it isnt working
07:17:11Araqhttps://www.geeksforgeeks.org/deletion-binary-tree/ port it over to Nim, how hard can it be
07:17:19Araq* is ref
07:17:22Araq& is var
07:17:28AraqNULL is nil
07:17:35Araq-> is .
07:17:44Araqthat's about it, Nim doesn't innovate anything here
07:18:17FromDiscord_<Simula> i'm trying to modify it in-place though
07:18:24FromGitter<alehander92> such an non-innovative language!
07:18:40FromDiscord_<Simula> i just dont understand why this doesnt work
07:19:17FromGitter<alehander92> `tempnode = nil`?
07:19:25FromDiscord_<Simula> that's what im doing
07:19:30FromDiscord_<treeform> I have shown the setting to nil part works: https://play.nim-lang.org/#ix=23qC the error is in the other code...
07:19:31Araqzacharycarter: ideally LLVM is good with C++ interop as long as you compiled the C++ via clang :-)
07:19:33FromGitter<alehander92> but this cant possibly work
07:19:55FromDiscord_<Simula> okay but it clearly doesn't work
07:19:57FromGitter<alehander92> Simula, so basically `tempnode` is just a local variable, whatever you assign to it , changes only it
07:20:20FromDiscord_<Simula> ohhhhh
07:20:26FromGitter<alehander92> you have to `node = `
07:20:36FromDiscord_<Simula> so im just screwed then :/
07:20:40FromGitter<alehander92> if node is var argument, as treeform showed
07:20:47FromGitter<alehander92> no, you're not
07:21:17FromDiscord_<Simula> so how would i modify this in place then?
07:21:30FromDiscord_<Stuffe> I wonder what the general focus is for development of NIM is now that v1 has been released?
07:21:38FromDiscord_<treeform> don't use the tmp node
07:21:54FromDiscord_<Simula> im not sure how else i would do it without that
07:21:56FromDiscord_<Simula> b
07:22:00AraqStuffe: https://github.com/nim-lang/RFCs/milestone/1
07:22:34FromDiscord_<Stuffe> oh incremental compilation will be cool
07:22:47FromDiscord_<treeform> @Simula I think you just have a small bug some place. You are really close.
07:23:06FromDiscord_<Simula> setting `tempnode.data = -1` changes that node for all references, but setting that node to nil doesnt
07:23:22FromDiscord_<treeform> that's correct
07:23:24FromDiscord_<Simula> i just need to set all references to this object to nil
07:23:35FromGitter<alehander92> Simula you can just restructure
07:23:38FromGitter<alehander92> e.g. do
07:23:39AraqSimula: please look at my linked solution
07:23:51FromDiscord_<Simula> @Araq i did, it doesn't fit my needs
07:23:58FromDiscord_<Simula> it doesn't modify the tree in-place
07:24:05Araqit does do that.
07:24:19FromGitter<alehander92> if `node.left < node.right` : node.left = .. else: node.right = ..
07:24:38FromGitter<alehander92> where you can compare data or just overload `cmp`
07:24:52FromDiscord_<treeform> Araq, that is not a lot of plans for 2020...
07:25:43Araqexcuse me? it's an aweful lot
07:25:45FromGitter<alehander92> treeform it's super much if actually finished
07:25:55FromDiscord_<treeform> only 4 things?
07:26:16FromGitter<alehander92> imagine "nuclear fusion" as "1 thing"
07:26:59FromDiscord_<Simula> araq: no, that example returns a completely new BST
07:28:19FromGitter<alehander92> it really wouldnt
07:28:33Araqhow could it do that? it doesn't even call newNode once
07:28:36FromGitter<alehander92> it returns a pointer to an existing node
07:29:02FromGitter<alehander92> `struct Node* temp; ` might seem like that, but it will be assigned with an existing node
07:29:21FromDiscord_<Simula> it's literally returning pointers in the first few lines
07:29:54FromGitter<alehander92> which are literally NULL or the existing `root`
07:30:00Araqlol
07:30:03FromGitter<alehander92> please, try to read the code more carefully
07:30:38Araqand then read a book about data structures and pointers, you don't have a Nim problem, you have a general programming problem
07:31:06FromDiscord_<Simula> i am. if you're deleting the root node, the root node would be set to NULL, but the function doesn't do that
07:31:57Araqproc inplaceDelete(root: var Node; key: Key) = root = deletion(root, key)
07:32:03*Hideki_ quit (Remote host closed the connection)
07:32:26Araqso that last step wasn't done, not a big deal
07:32:47FromGitter<alehander92> Simula, ah i am sorry, but yeah, thats what you should do
07:32:59FromDiscord_<Rika> anyone made a nim library for TI-84 calculators?
07:33:01FromGitter<alehander92> basically always assign to either the `var argument` or a field of it
07:33:15*Hideki_ joined #nim
07:34:21Araqhttps://www.geeksforgeeks.org/avl-tree-set-2-deletion/ has some good pictures
07:34:34Araqthis stuff is not easy
07:34:36FromDiscord_<Rika> oh man, i need to learn c past beginner stuff
07:35:21*PMunch joined #nim
07:36:30*thomasross_ joined #nim
07:36:30*thomasross is now known as Guest51441
07:36:30*thomasross_ is now known as thomasross
07:36:48FromDiscord_<Simula> araq: following the example you linked me, the c++ code uses `delete (d_node);`, is there a nim equivalent to this?
07:37:14*Guest51441 quit (Ping timeout: 268 seconds)
07:37:35*Hideki_ quit (Ping timeout: 250 seconds)
07:38:20FromGitter<zacharycarter> Araq: makes sense - I guess I won't worry about it until it's a thing :)
07:38:32FromGitter<alehander92> so in your case i'd just not use getMin, but instead something like `if left is smaller than right: callHelper(node.left) else: callhelper(node.right)`
07:38:43FromGitter<alehander92> or whatever the algorithm needs not sure
07:38:45FromGitter<alehander92> like logic
07:38:56FromGitter<alehander92> i am also bad at algos
07:41:46FromDiscord_<Simula> does nim not have queues built in? i can't seem to import it
07:42:17AraqSimula: delete(n) is roughly n[] = default(typeof(n[]))
07:42:41FromDiscord_<Simula> thanks
07:42:43Araqor maybe reset(n[])
07:43:16Araqfor the queue you can use a seq or import deques
07:48:19FromDiscord_<yewpad> @araq: did you have a look on the pull request about the documentation dark mode? i can barely fix any of the broken tests because when I try to generate the doc, the compiler exits and tells me something weird about how "C:\Program" is not a executable etc. and just note: Please don't check against styling rules. That's the reason why all the tests failed.
07:48:38FromDiscord_<yewpad> and just a side note*
07:49:45Araqlin please
07:49:48Araqlink
07:50:11FromDiscord_<yewpad> https://github.com/nim-lang/Nim/pull/12797
07:50:12disbotNim documentation now in gorgeous Dracula theme @11yewpad
07:50:37*xace quit (Ping timeout: 240 seconds)
07:50:53FromDiscord_<Simula> how do i use a dequeue? i cant import it
07:51:24FromGitter<alehander92> they are Deque in nim
07:51:26*thomasross quit (Read error: Connection reset by peer)
07:51:34FromGitter<alehander92> and deques
07:51:49FromDiscord_<yewpad> https://nim-lang.org/docs/deques.html
07:51:52FromDiscord_<Simula> i see that
07:51:55FromDiscord_<Simula> i cant import it
07:52:03FromDiscord_<yewpad> Code?
07:52:03FromDiscord_<Simula> oh im an idiot
07:52:39FromGitter<alehander92> off to work
07:52:41*xace joined #nim
07:53:06FromGitter<alehander92> yeah, typos can be quite the head scratcher
07:53:12FromGitter<alehander92> ah this is my peak in english
07:53:13FromGitter<alehander92> see ya
07:53:24FromDiscord_<yewpad> take care
07:54:36Araqyewpad: FAILURE: files differ: nimdoc/testproject/htmldocs/theindex.html
07:54:43Araqyou didn't patch the tests
07:55:01Araqthere is an easy way to do that. after manual inspection, run this command:
07:55:17FromDiscord_<yewpad> I really would like to do so but whenever I try to test tests, it fails with some weird ass error
07:56:02Araqnim c -r -d:fixup nimdoc/tester
07:56:14FromDiscord_<yewpad> aight
07:56:18FromDiscord_<yewpad> hold the phone for a sec
07:56:23Araqok
07:57:07AraqI replied on your PR
07:57:13Araqso that this command is not lost
07:57:30FromDiscord_<Simula> araq: the tutorial you linked is incorrect
07:58:42AraqI seriously doubt that but the general idea is: find correct snippets in C++ and port it to Nim rather than rolling your own
07:58:51FromDiscord_<yewpad> playground down?
07:58:54FromDiscord_<yewpad> nvm
07:58:55FromDiscord_<Simula> it creates an unbalanced bst
07:59:06FromDiscord_<yewpad> @araq: https://play.nim-lang.org/#ix=23qH
07:59:07FromDiscord_<Simula> i really dont appreciate you linking me incorrect code and then insulting my programming ability when i tell you its wrong
08:00:00*gmpreussner quit (Quit: kthxbye)
08:00:19Araqwrong or not, you clearly didn't read the code correctly
08:00:49FromDiscord_<Simula> i absolutely did
08:01:04FromDiscord_<Simula> and it's garbage code
08:01:24Araqhttps://www.geeksforgeeks.org/avl-tree-set-2-deletion/ for balanced AVL trees
08:02:25Araqbut go pick a different site that is not "garbage code". I'm only trying to help and it certainly looks to me that you don't really understand pointers, no offense.
08:02:57FromDiscord_<Simula> i understand pointers, i just don't understand anything that's happening in nim
08:03:33Araqwell I also told you the basic translation rules, T& is 'var T', T* is 'ref T', etc
08:04:26FromDiscord_<yewpad> @araq: https://play.nim-lang.org/#ix=23qH
08:04:49FromDiscord_<Simula> what would be the equivalent of T**, `ref ref T`?
08:04:57*gmpreussner joined #nim
08:05:35AraqSimula: depends, more likely, 'ptr ref T'
08:06:59Araqyewpad: strange... put Nim inside a directory without a space for the time being
08:07:12FromDiscord_<yewpad> i'll try with wsl
08:10:59*Hideki_ joined #nim
08:12:30FromDiscord_<yewpad> @araq: Well it works but I can't access WSL's storage due to WSL 2 using some different storage mechanism. I'll probably have to painfully patch it using GitHub edit thingy, pull the changes and try test. That's wayyy to painful. I would appreciate it if you just would close the pull request, add the edited nimdoc.cfg yourself and do the patches because it seems to be working on your machine. I can't do jackshit
08:15:27FromDiscord_<yewpad> wait, i got an idea
08:22:38FromDiscord_<yewpad> well moving nim to the c directory broke everything
08:22:41FromDiscord_<yewpad> jesus christ
08:22:53FromDiscord_<yewpad> why can't just something work just for once
08:24:22Araqyewpad, it's fine, we can take over
08:24:42Araqbut I won't close your PR, I'll add to ti
08:24:45Araqit
08:25:43FromDiscord_<yewpad> aight, thank you
08:26:51FromDiscord_<yewpad> appreciate it
08:36:32Araqyewpad: I just saw you contacted my via gitter, I'm available now
08:42:36FromDiscord_<Rika> you can access wsl2's files by opening "explorer.exe" within bash
08:42:42FromDiscord_<Rika> if thats your issue
08:45:52FromDiscord_<yewpad> There was some weird virtual disk file thingy 🤔
08:46:00FromDiscord_<yewpad> Not using WSL 1, I'm using WSL 2
08:46:05FromDiscord_<yewpad> the insider version
08:56:00FromDiscord_<Rika> i was talking about wsl2 yes
08:56:13FromDiscord_<Rika> wsl1 opening explorer.exe opens a regular explorer
08:56:28FromDiscord_<Rika> wsl2 apparently opens explorer.exe for the linux disk
08:57:34FromDiscord_<Rika> https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes#place-your-linux-files-in-your-linux-root-file-system
08:59:18*endragor quit (Remote host closed the connection)
08:59:47*endragor joined #nim
09:00:04*natrys quit (Ping timeout: 265 seconds)
09:00:06Araqping PMunch
09:00:13*endragor quit (Read error: Connection reset by peer)
09:00:32*endragor joined #nim
09:00:37PMunchHi
09:00:47PMunchAraq,
09:00:58Araqdo you have time for a live coding session?
09:01:13PMunchRight now? I'm at work unfortunately..
09:01:38Araqok, well, can you be in the chat?
09:01:45PMunchYeah sure
09:02:20PMunchI can watch the thing as well
09:02:36PMunchBut I think others in the office would wonder what I was doing if I started voice-chatting :P
09:03:06Araqok, let's see if I can get this to setup...
09:03:24PMunchWhat're you doing by the way?
09:04:23FromGitter<alehander92> you can start rapping instead
09:05:46Araqfixing 'let x = []' so that it works with .codegenDecl
09:05:57Araqcan't let C win this one
09:08:35PMunchOh right, that's the thing I had to hack around :)
09:10:00*dwdv joined #nim
09:10:11PMunchBy the way, any plan on making a way to let Nim declare top-level variables for basic types without having to initialise with NimMain?
09:10:37Araqsounds to be the very same patch to the codegen
09:11:08PMunchHmm, might be, I don't know what is needed to fix that.
09:13:30*natrys joined #nim
09:13:50*natrys quit (Client Quit)
09:16:59*Vladar joined #nim
09:18:23Araqhttps://www.twitch.tv/araq4k
09:21:51PMunchWait, is it still possible to join the chat via IRC?
09:24:04Araqdunno
09:41:37*literal quit (Ping timeout: 240 seconds)
09:41:44*literal joined #nim
10:05:12*Hideki_ quit (Remote host closed the connection)
10:10:43*Hideki_ joined #nim
10:17:44*endragor quit (Remote host closed the connection)
10:19:28*endragor joined #nim
10:20:18*ng0 joined #nim
10:38:40*Yardanico_ quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
10:38:54*Yardanico joined #nim
10:39:02*spacepluk quit (Quit: leaving)
10:40:49*spacepluk joined #nim
10:40:59*spacepluk quit (Client Quit)
10:42:35*spacepluk joined #nim
10:43:00*spacepluk quit (Client Quit)
10:43:49*spacepluk joined #nim
10:45:17*spacepluk quit (Client Quit)
10:45:29*spacepluk joined #nim
10:48:10*salewski joined #nim
10:48:18spacepluklist unity
10:48:26spaceplukoops, sorry about that
10:50:18*njoseph quit (Ping timeout: 246 seconds)
10:50:54salewski@admins, seems they start hacking in spam links again into forum posts.
10:51:00salewskihttps://forum.nim-lang.org/t/5623
10:51:21salewskiWas a copy of https://old.reddit.com/r/nim/comments/dpdsh7/nim_is_the_friendliest_language_to_start/
10:53:18*clyybber joined #nim
10:53:21narimirandom96: see ^, that's why we need a much shorter allowed time for edits
10:54:26narimiranand if somebody wants to edit their message with more info after couple of days - it is better that it is a new comment, that way everybody will see it, otherwise it will be ignored by the majority of readers
10:54:29salewskiDom, I like late edits. Sometimes I write nonsense!
10:54:32salewskiBye.
10:54:36Araqsalewski, thanks
10:54:40AraqI edited it out ;-)
10:54:44*salewski quit (Quit: WeeChat 2.6)
10:54:58clyybberAraq: Only got the end of your lifestream, what did you do?
10:55:11clyybberMade let vars work with .codegenDecl.?
10:55:44clyybberWas the isConst param related or just some unrelated refactoring?
10:58:04spaceplukhas anybody tried to wrap AWS' cpp sdk?
11:00:05Araqclyybber, related https://github.com/nim-lang/Nim/pull/12799 PR now here
11:00:06disbotbetter support for PROGMEM like annotations for lets/vars; fixes #12216 👑11Araq
11:00:38Araqnarimiran, do we have an "allowed time limit" already?
11:01:02spaceplukI see there's aws_sdk but it seems unmaintained and it doesn't use the official sdk
11:01:04narimiranAraq: yes and it is one week. waaay too relaxed if you ask me
11:01:46Araqomg, it should be 1 hour
11:03:31narimiranyep
11:06:03clyybberAraq: Btw, made the refactoring #12793 against your PR so you can merge it into arc devel if you want.
11:06:04disbothttps://github.com/nim-lang/Nim/pull/12793 -- 3Refactor injectdestructors @11Clyybber
11:07:10Araqclyybber, noticed, it's great
11:07:37Araqspacepluk, ask disruptek if he's around
11:10:38*nif quit (Quit: ...)
11:10:48*nif joined #nim
11:12:14FromDiscord_<mratsim> Maybe just allow late edits if someone has more than 5 posts
11:12:20FromDiscord_<mratsim> that's what is done in discuss
11:12:42FromDiscord_<mratsim> a spammer won't create more than 5 posts without being spotted
11:16:09FromDiscord_<Clyybber> @exelotl https://github.com/nim-lang/Nim/pull/12799 might be relevant to you
11:16:10disbotbetter support for PROGMEM like annotations for lets/vars; fixes #12216 👑11Araq
11:28:15*rockcavera joined #nim
11:53:04spaceplukAraq: disruptek: probably not the best idea for a newbie but I'm gonna try 🙈
11:55:02*solitudesf quit (Ping timeout: 265 seconds)
12:00:19FromGitter<alehander92> i have a type with like 150 fields
12:10:51FromDiscord_<exelotl> @Clyybber oh snap
12:14:22FromDiscord_<Clyybber> @exelotl What exactly did you need? I kind of forgot.
12:16:03PMunchAraq, looking at your branch with the codegenDecl fix, looks good :)
12:17:16FromDiscord_<exelotl> Basically the code examples in this post: https://forum.nim-lang.org/t/5192#32574
12:19:29clyybberexelotl: I think you can do that with that PR
12:19:43FromDiscord_<exelotl> i.e. let statements producing static initializers where possible, including objects containing pointers to other static data, procedures etc
12:20:04FromDiscord_<exelotl> That's really exciting, I'll try it out when I get home
12:25:11ZevvPMunch: so does it even support the quirky atmel PROGMEM?
12:28:18Araqwell I did the foundation for this feature
12:28:31Araqmaybe it's not good enough, PRs are always welcome
12:30:49*endragor quit (Remote host closed the connection)
12:38:43PMunchHmm, it seems to work well, but I have another bug I think
12:41:28PMunchOh wait
12:42:02PMunchIt converted a compile-time seq[byte] to an array of ints when I did: var `name` {.codegenDecl: "const $# PROGMEM $#".} = `spriteData`
12:42:15PMunch`spriteData` is the sequence of bytes
12:42:42*njoseph joined #nim
12:43:12Araqseqs are hard
12:43:26PMunchWell I want it to generate an array
12:43:31Araqyou can grow them so init via {} is a dangerous thing to do
12:43:35PMunchBut it gathers them in a seq in the macro first
12:44:16PMunchI changed it to: var `name` {.codegenDecl: "const $# PROGMEM $#".}: array[0..`spriteLen`, uint8] = `spriteData`
12:44:32PMunchBut now I get: Error: type mismatch: got <array[0..25, int]> but expected 'array[0..25, uint8]'
12:46:50Araqmake it uint8s
12:46:55PMunchCollected them directly in a nnkBrocket and it works
13:05:37PMunchWorks perfectly!
13:05:59*NimBot joined #nim
13:12:44PMunchHmm, is there a way to push an emit statement into the file that imports a module?
13:13:46PMunchI have some importc, nodecl variables with an emit. But while the types are visible to the importer, the emit isn't. So the C compiler fails
13:31:50clyybberThis doesn't work: https://play.nim-lang.org/#ix=23rJ
13:32:57clyybberAraq: It should, right?
13:33:31*sealmove joined #nim
13:33:36sealmoveGood afternoon!
13:33:46*endragor joined #nim
13:34:44clyybbersealmove: Hello
13:47:34sealmovewhat are you working on today clyybber?
13:51:10*sealmove quit (Quit: WeeChat 2.6)
13:59:10clyybbersealmove: Trying to make this work https://play.nim-lang.org/#ix=23rJ :)
14:00:38clyybberHmm, well it works in brackets, so its not blocking me.
14:03:40FromDiscord_<sealmove> Hmm
14:06:18*Kaivo joined #nim
14:06:56*endragor quit (Remote host closed the connection)
14:10:44*endragor joined #nim
14:13:00*tane joined #nim
14:13:52Araqclybber: yes
14:15:08clyybberI added it to the issue thats the same but with `block:`
14:20:22disruptekspacepluk: i looked at wrapping aws_sdk; it's tough. i think my solution is better:
14:20:25disruptek!repo atoz
14:20:26disbothttps://github.com/disruptek/atoz -- 9atoz: 11Amazon Web Services (AWS) APIs in Nim 15 10⭐ 0🍴
14:29:58*sacredfrog quit (Quit: ZNC 1.7.5 - https://znc.in)
14:30:28PMunchHmm, when using Nim without the GC, is there a way to make Nim handle all string literals as cstrings?
14:30:50PMunchI guess I could possibly write a term rewriting macro..
14:31:03spaceplukdisruptek: oh thanks, I'll take a look
14:32:13spaceplukbasically my nim testing project is downloading a bunch of gzipped jsons from s3 and dumping everything into a postgres db with copy
14:32:45spaceplukthen if I get that working I'll try to parallelize the unziping/copying
14:32:50disruptekwell, http will suffice for that.
14:33:28spaceplukI need to list the files and only import each file once
14:33:55disrupteksure. atoz works well.
14:34:06spaceplukI thought I would try the interop in the process but it's obviously too much for me at this point hehe
14:34:33spaceplukalso, I don't think I understand what nimble is
14:34:45disruptekit's just not worthwhile, as a native nim interface can be far superior.
14:34:50PMunchNimble is Nims package manager
14:35:10PMunchAnd it is also used to build most packages
14:35:45spaceplukI tried to use a few packages that use native graphic libs, but none of them actually include the native libraries when you pull them
14:35:50FromDiscord_<mratsim> not sure parallelizing copying is worth it, you'll be limited by disk IO anyway
14:36:32spaceplukand I'm seeing that the stuff gets installed under ~/.nimble... isn't that a problem when you have multiple versions of a dependency in different projects?
14:36:40disruptekatoz is async-friendly.
14:36:50*solitudesf joined #nim
14:36:57disruptek!repo disruptek/nimph
14:36:58disbothttps://github.com/disruptek/nimph -- 9nimph: 11a nim package hierarchy manager from the future 🧚 15 2⭐ 0🍴
14:37:00FromDiscord_<mratsim> when you have multiple versions they get tagged
14:37:01spaceplukFromDiscord_: it's mostly for the unzipping
14:37:14FromDiscord_<mratsim> but lock files are in progress
14:37:28FromDiscord_<mratsim> to better handle multiversioning
14:37:59disrupteklockfile writes are done; maybe read will be done today. 😎
14:38:01FromDiscord_<mratsim> or I hope they are, anyway that's one of the big issues and priority in nimble at the moment
14:38:05FromDiscord_<mratsim> oh
14:38:44disruptekwell, not nimble. i dunno anything about nimble.
14:39:31spacepluklock files?
14:40:01spaceplukdisruptek: great name! haha
14:40:05spacepluknimph
14:41:13*Hideki_ quit (Remote host closed the connection)
14:41:24*lritter joined #nim
14:41:35spacepluklock files npm-style?
14:41:58disrupteknot really.
14:42:09*Hideki_ joined #nim
14:42:20disrupteki mean, sorta. nim doesn't actually have multi-level deps.
14:42:21spaceplukwhy do you need those because of non-specific transitive deps?
14:43:04disrupteknimph is a tool for a different kind of workflow; one involving git for everything.
14:43:21disruptekso lockfiles in nimph allow you to roll your entire codebase at once.
14:43:51spaceplukI'm interested in that, I'll put it on my to read queue :)
14:44:38spaceplukdo you have a comparison doc with nimble? I haven't even finishd reading nim's manual
14:44:39disruptekit's just another package manager with git/github support built-in.
14:45:02disruptekit uses nimble assets and nimble itself, if you wish.
14:47:14*Hideki_ quit (Ping timeout: 276 seconds)
14:47:19spaceplukgot it
14:47:58disruptekit's kinda like a prototype impl of features that nimble has been expecting to implement for a few years.
14:50:40FromGitter<alehander92> why can't i
14:50:48disruptekyou can!
14:50:59FromGitter<alehander92> $(expression.type.name)[0]
14:51:04FromGitter<alehander92> in a template
14:51:05FromGitter<alehander92> i cannt
14:51:14clyybberwhats the error?
14:51:53FromGitter<alehander92> fatal.nim(39) sysFatal ⏎ Error: unhandled exception: index out of bounds, the container is empty [IndexError]
14:52:00FromGitter<alehander92> but it works with type.name[1..^10]
14:52:18spaceplukdisruptek: looks nice, can you patch the dependencies in place?
14:52:27disruptekthat's the idea, yes.
14:52:48spaceplukgreat!
14:53:21disrupteki'm really happy with it.
14:53:40FromGitter<alehander92> it comes from semExpr .. some stuff .. elemType .. lastSo
14:53:45FromGitter<alehander92> lastSon
14:53:51clyybberalehander92: Hmmm
14:54:16FromGitter<alehander92> and it works
14:54:18FromGitter<alehander92> with [0 .. 0]
14:54:21clyybberIs it parsed as ($(expression.type.name))[0] or the other way around?
14:54:23*endragor quit (Remote host closed the connection)
14:54:36clyybberalehander92: Report it.
14:56:34clyybbers/./?
14:56:58FromGitter<alehander92> ok !
14:57:04*ng0_ joined #nim
14:58:19*EvilKhaosKat joined #nim
14:59:36*ng0 quit (Ping timeout: 260 seconds)
15:01:08*zyklon quit (Ping timeout: 245 seconds)
15:01:54*EvilKhaosKat quit (Client Quit)
15:02:10*EvilKhaosKat joined #nim
15:02:57*ng0_ is now known as ng0
15:06:20spacepluknone of the postgresql wrappers have support for copy, right?
15:09:02*endragor joined #nim
15:09:28spaceplukI can probably pipe the data to psql stdin...
15:11:08*EvilKhaosKat quit ()
15:11:58*rokups joined #nim
15:14:32*endragor quit (Ping timeout: 276 seconds)
15:16:40*PMunch quit (Quit: Leaving)
15:17:13*Hideki_ joined #nim
15:21:42disruptekspacepluk: see if asyncpg works
15:21:49disruptek!package postgres
15:21:49disbothttps://github.com/cheatfate/asyncpg -- 9asyncpg: 11Asynchronous PostgreSQL driver for Nim Language. 7& 4 more...
15:22:12disruptekseems to have copy support.
15:24:24lqdev[m]I figures out what causes the errors to not appear with nim.nvim. it's that `-- INSERT --` overwrites them before I even have a chance to read them
15:26:02disrupteklqdev[m]: try `:cw` to open the quickfix list.
15:27:38disrupteklqdev[m]: http://ix.io/23sa
15:28:39lqdev[m]what's the quickfix list?
15:29:39disrupteka 2nd buffer associating error messages to locations in the 1st buffer.
15:31:34lqdev[m]I don't see it populated on `:w`, though
15:32:18*zyklon joined #nim
15:38:10FromDiscord_<Kurolox> regarding string and sequences, what is the best way to slice them from a certain point until the end?
15:38:54FromDiscord_<Kurolox> doing something like [2..sequence.len() - 1] looks a bit cluttered, so I was hoping that there would be some shortcut for this
15:39:31disrupteksequence.high represents the highest index. ^1 represents the last index as well.
15:40:30FromDiscord_<Kurolox> ^1 seems to be what I was looking for. Thanks!
15:43:03disrupteklqdev[m]: i think maybe that functionality is provided by a plugin called `ale`, in my vim config.
15:45:01*Hideki_ quit (Ping timeout: 268 seconds)
15:45:23*noonien joined #nim
15:49:11spaceplukdisruptek: oh I missed that one, thanks!
15:49:31FromDiscord_<Kurolox> What's the best way to sum two sequences among them? I was hoping for the + operator to work, but it doesn't seem to do so
15:49:47FromGitter<alehander92> https://github.com/nim-lang/Nim/issues/12804
15:49:49FromGitter<alehander92> clyyber
15:49:49disbotCrash when trying to use `type.name[0]` in template @11alehander92; snippet at https://play.nim-lang.org/#ix=23sg
15:50:07FromDiscord_<Kurolox> as in, @[1, 2] + @[3, 4] = @[4, 6]
15:50:20clyybberalehander92: Interesting bug
15:50:24FromDiscord_<Kurolox> I guess that I can use a mapIt but it seems overly complex
15:50:43disruptekkurolox: you want a fold.
15:51:25clyybberalehander92: Works for me :D
15:51:36FromDiscord_<Kurolox> Doesn't fold works for the elements in a single sequence?
15:51:43FromDiscord_<Kurolox> How do you use it to add multiple sequences with each other?
15:52:00FromDiscord_<Kurolox> Apologies if it's a dumb question, I'm getting started with the language
15:52:05clyybbernevermind I'm dumb
15:52:15disruptekkurolox: what's the output you want?
15:52:24FromDiscord_<Kurolox> @[1, 2] + @[3, 4] = @[4, 6]
15:52:53disruptekoh. you wanna zip/+ them.
15:53:07disrupteki think there's a zip macro now.
15:53:12disruptekelse,
15:53:16disruptek!package loopfusion
15:53:17disbothttps://github.com/numforge/loopfusion -- 9loopfusion: 11Loop efficiently over a variadic number of containers
15:56:08*snowolf_ is now known as snowolf
15:58:28clyybberalehander92: It isn't related to templates
15:58:40clyybberSee my comment on github
16:02:21FromDiscord_<Kurolox> Zip doesn't seem to be working for me
16:02:27FromDiscord_<Kurolox> here's a minimal example and the error I'm getting
16:02:29FromDiscord_<Kurolox> https://ghostbin.co/paste/bq5bw
16:02:38FromDiscord_<Kurolox> it's exactly like the documentation example, so I'm not sure why it doesn't work
16:03:24disruptekyou have to do something with the result of the expression, or discard it.
16:03:27FromGitter<alehander92> yep i fixed the title clyybber
16:04:06disruptekif the documentation doesn't discard the result, then that's a bug in the docs. 😉
16:06:25FromDiscord_<mratsim> @Kurolox, either you use a for-loop, or you use zero-functional or you use loopfusion
16:06:33FromDiscord_<mratsim> or you use Arraymancer and tensors
16:07:14FromDiscord_<mratsim> depends if you prefer raw Nim, functional programming, imperative for loops or numerical computing
16:07:30FromDiscord_<Kurolox> I understood some of those words
16:07:31FromDiscord_<mratsim> well actually you could use neo or manu as well for a matrix/vector approach
16:07:48FromDiscord_<mratsim> https://github.com/zero-functional/zero-functional
16:07:50FromDiscord_<Kurolox> I don't really understand the concept of having to use something or discarding it, though
16:08:03FromDiscord_<Kurolox> why does the compiler refuse to execute a floating evaluation?
16:08:35FromDiscord_<mratsim> when you compute something that returns a result, Nim errors if you don't use it (because it's probably a bug)
16:08:49FromDiscord_<Kurolox> wouldn't a warning make more sense?
16:09:02FromDiscord_<mratsim> you need to discard it explicitly
16:09:30FromDiscord_<mratsim> it depends, it's very easy to think that you are doing things right and then you realize that you forgot to assign the result
16:09:37disruptekit's a nice feature.
16:10:01FromDiscord_<mratsim> and if it's a routine that is almost never assigned you can add the {.discardable.} pragma anyway
16:10:07FromDiscord_<mratsim> and you won't have any error
16:10:13disruptekbut, please don't.
16:13:53FromDiscord_<mratsim> Anyway continuing on summing solutions, besides the for loop there is nimfp for a zip + sum approach: https://github.com/vegansk/nimfp, zero functional that I linked and loopfusion https://github.com/numforge/loop-fusion
16:14:54FromDiscord_<mratsim> for a numerical computing approach, assuming you work on a lot of sequences of ints: https://github.com/mratsim/Arraymancer, https://github.com/unicredit/neo, https://github.com/b3liever/manu
16:15:06FromDiscord_<Kurolox> I think I'm going to try to implement my own solution for this one
16:15:23FromDiscord_<Kurolox> it's nice to know that there are so many options and mine is going to be garbage, but this is proving to be a good learning moment
16:15:34FromDiscord_<mratsim> That's like a rite of passage, everyone who starts Nim creates his own functional library 😉
16:15:52FromDiscord_<Kurolox> well, not a whole functional library, just getting this sum done by myself
16:16:41FromDiscord_<mratsim> have fun
16:17:02spaceplukis there a plugin for any irc client that makes FromDiscord look normal?
16:17:14spaceplukit's hard to follow the conversation
16:17:23spaceplukmaybe I'm too old
16:18:12clyybberpipe your irc through `sed 's/FromDiscord_//g'` :p
16:18:44disrupteki'm old, too; that's why i wrote the bot.
16:18:49FromDiscord_<mratsim> If it gives you solace, the output on discord side is awful as well
16:18:52spaceplukhehehe
16:19:20spaceplukmratsim: yeah, I started there and switched to irc
16:19:24FromDiscord_<mratsim> everyone's replies are packed together and it's very hard to see when different people are talking
16:19:43shashlickI initially used weechat to clean things up
16:20:03shashlickBut now just matterbridge which does a good job of cleaning the nicks
16:20:45FromDiscord_<mratsim> Maybe a good IRC/Discord/Gitter/Matrix bot would be a killer app for Nim 😉
16:20:53spacepluklol
16:21:43disruptekthe problem is interleaving the output in a normal client.
16:22:05FromGitter<alehander92> for me in gitter is easiest
16:22:21FromGitter<alehander92> mostly everyone is <some other service/name> stuff
16:22:25FromDiscord_<mratsim> On Status/Nimbus discord it seems to work fine
16:22:56FromDiscord_<mratsim> Gitter is nice when you don't need search, but it's broken on Linux :/
16:23:58FromGitter<alehander92> i use it on linux
16:24:05FromGitter<alehander92> but i use the web version
16:24:06*azed joined #nim
16:24:21FromGitter<alehander92> i prefer having most stuff in terminal or browser
16:24:32FromGitter<alehander92> bit ironic me working on a desktop app
16:25:12FromGitter<mratsim> my browser has 2 many tabs I prefer desktop apps ;)
16:25:17FromGitter<mratsim> too*
16:35:38leorizelqdev[m]: all messages emitted can be viewed via :messages
16:35:53leorizeuse ALE for that "autobuild" feature you're looking for
16:36:19leorizethe plugin does have a basic :make feature that you should try
16:37:35*dddddd joined #nim
17:01:09*azed quit (Quit: WeeChat 2.6)
17:07:26*azed joined #nim
17:12:16*spacepluk quit (Quit: leaving)
17:12:30*spacepluk joined #nim
17:21:08*tiorock joined #nim
17:21:08*tiorock quit (Changing host)
17:21:08*tiorock joined #nim
17:21:08*rockcavera quit (Killed (wolfe.freenode.net (Nickname regained by services)))
17:21:08*tiorock is now known as rockcavera
17:22:38*tiorock joined #nim
17:22:38*tiorock quit (Changing host)
17:22:38*tiorock joined #nim
17:22:38*rockcavera is now known as Guest50916
17:22:38*Guest50916 quit (Killed (cherryh.freenode.net (Nickname regained by services)))
17:22:38*tiorock is now known as rockcavera
17:24:01FromDiscord_<Rika> the discord "bot" would need to be a webhook if it were to look nice
17:25:07FromDiscord_<Rika> anyway, i'm thinking of making a library for programming for a TI-84+ CE, so is it possible to "augment" the stdlib
17:31:08spaceplukit looks like asyncpg is broken
17:31:29spacepluk.nimble/pkgs/asyncpg-0.1.0/asyncpg/apg_array.nim(18, 16) Error: invalid pragma: unchecked
17:31:46FromDiscord_<Rika> unchecked pragma was removed afaik
17:32:51*Trustable joined #nim
17:32:58spaceplukoh well, time to try nimph
17:33:10spaceplukin the end I'm going to write this thing in clojure
17:33:24spacepluks/write/have to write/
17:37:11*nsf quit (Quit: WeeChat 2.6)
17:41:37*rokups quit (Quit: Connection closed for inactivity)
17:43:57*azed quit (Read error: Connection reset by peer)
17:46:08FromDiscord_<Rika> rip
17:46:43FromDiscord_<Rika> afaik for arrays that have unchecked pragma the fix is to remore {.unchecked.} and replace `array` with `uncheckedarray`
17:46:48FromDiscord_<Rika> i dont know for sure
17:48:25spaceplukthanks
17:58:18*spacepluk quit (Quit: leaving)
17:58:34*spacepluk joined #nim
17:59:49FromGitter<Varriount> Gitter is "good enough" in most cases. It's easier than setting up an IRC bouncer
18:01:57AraqRika: correct
18:05:11*leorize quit (Remote host closed the connection)
18:05:49spaceplukI patched the unchecked arrays but there's more stuff that's broken :(
18:06:42Araqlike?
18:07:25disruptek`nimph fork asyncpg` 😉
18:07:28*leorize joined #nim
18:08:01spaceplukhttps://gist.github.com/spacepluk/4e23608f8f172dc0a91eab3f6bea8498
18:08:18spaceplukheheh :D
18:10:13disruptek!repo asyncpg
18:10:13disbothttps://github.com/cheatfate/asyncpg -- 9asyncpg: 11Asynchronous PostgreSQL driver for Nim language 15 44⭐ 6🍴
18:12:01Araqthis is old code, 'nil' used to be valid for strings/seqs
18:14:46*nsf joined #nim
18:16:05spacepluknevermind, I'll hack this quickly in clojure and I'll find another project to try nim
18:16:28Araqpity
18:16:35spaceplukyes :(
18:16:46*leorize quit (Remote host closed the connection)
18:17:10*leorize joined #nim
18:22:02spaceplukthere's no way to do postgresql's copy with db_postgres, right?
18:22:57Araqcopy? who knows
18:23:19Araqdb_postgres wraps the low level stuff and the low leve stuff supports everything, including COPY
18:23:25spaceplukhmm
18:25:25*Vladar quit (Ping timeout: 250 seconds)
18:26:15FromDiscord_<Lantos> lol love the avatar @cheatfate
18:27:19disruptekAraq: can we backport that --outdir fix, please?
18:27:27disruptek!pull is:closed author:genotrance
18:27:28disbothttps://github.com/nim-lang/Nim/pull/12796 -- 5Path substitution for --out and --outdir @11genotrance 7& 29 more...
18:27:37Araqdisruptek, later
18:27:46disruptek👍
18:29:48Araqomg
18:29:57Araq var a: Thing = Cat() where Thing is a concept does compile... bullshit
18:30:20*nif quit (Quit: ...)
18:30:22Araqyou cannot use concepts to declare your vars, you cannot do shit with concepts, it's just a generic constraint
18:30:31*nif_ joined #nim
18:33:59disrupteki knew it.
18:34:02disruptekcats are not things.
18:34:25Araqsure they are not, ask Schrödinger
18:36:29FromDiscord_<treeform> disruptek, I found bugs in https://github.com/cheatfate/asyncpg which author did not fix, https://github.com/treeform/pg fixes it and is much simpler.
18:36:51disrupteksweet.
18:37:00disruptekspacepluk: ^
18:37:12spaceplukreading...
18:37:22FromDiscord_<treeform> This one https://github.com/cheatfate/asyncpg/issues/9
18:37:28FromDiscord_<treeform> I closed it after 2 years I guess...
18:37:50disruptekso impatient.
18:37:51FromDiscord_<treeform> Mine is 100 lines, less lines less bugs: https://github.com/treeform/pg/blob/master/src/pg.nim
18:37:58spaceplukhehe
18:38:51*Vladar joined #nim
18:38:56FromDiscord_<treeform> vs like 1000+ lines in asyncpg
18:39:13*Vladar quit (Client Quit)
18:39:18spaceplukI would still need to patch db_postgress to expose the copy thing
18:39:28FromDiscord_<treeform> what copy thing?
18:39:51spaceplukI need to pipe a lot of data into postgres with copy commands
18:40:20FromDiscord_<treeform> I pipe like a GB of data into PG every day with this lib, why do you need a copy thing?
18:40:48FromDiscord_<treeform> maybe I am doing it wrong
18:40:52spacepluka gb is not a lot
18:41:00spaceplukare you doing separate inserts?
18:41:42FromDiscord_<treeform> yes
18:41:58FromDiscord_<treeform> I am doing looks like ~1000 rows per inserts
18:42:10spaceplukyeah, that's very slow if you have a lot of data
18:42:27FromDiscord_<treeform> yeah I did not think there was a way around it
18:42:56spaceplukit's the db equivalent of memcpy
18:43:11spaceplukif you have indexes or constraints and stuff you have to deal with that yourself
18:43:18spaceplukbut it's as fast as it gets
18:44:07FromDiscord_<treeform> I do have indexes but no constraints
18:44:17FromDiscord_<treeform> with inserts they just get updated
18:45:04spaceplukwith copy you would have to update them after feeding the data, once
18:47:51FromDiscord_<treeform> this command right? https://www.postgresql.org/docs/9.2/sql-copy.html
18:48:21spaceplukyes
18:48:23FromDiscord_<treeform> well https://www.postgresql.org/docs/12/sql-copy.html (modern docs)
18:49:00spaceplukyou know what I'll just use psql with stdin
18:49:46FromDiscord_<treeform> and it should be faster than a million 1000 row inserts?
18:49:49FromDiscord_<treeform> by how much?
18:50:52spaceplukit depends, but probably several orders of magnitude
18:51:15spaceplukyou can do a quick test on a separate table it's very impressive
18:51:16FromDiscord_<treeform> I think you should be able to write stuff to a file
18:51:32FromDiscord_<treeform> then do a `copy from that file` command with regular exec?
18:51:45FromDiscord_<treeform> if you are on the same machines as the server
18:52:11*ntm quit (Quit: Leaving)
18:53:25spaceplukyeah, for example you can: cat yourfile | psql -c "COPY your_table (field) FROM STDIN;"
18:53:58spaceplukthere are several ways
18:54:00FromDiscord_<treeform> I see
18:54:18FromDiscord_<treeform> `COPY tbl FROM STDIN;` you need to send it data some other way
18:54:26FromDiscord_<treeform> you can't pass it in the query like
18:54:32FromDiscord_<treeform> `COPY tbl FROM STDIN "...............";`
18:54:43spaceplukyou can also do it from a query with the path iirc
18:55:26rockcaveraHello people. I noticed that GCC's builtin bitops.countSetBits implementation is 3.3 times slower than VCC's. So I changed the bitops to when compiling with GCC using the Nim implementation. Result was much better. NIM implementation compiled with GCC was 1.3 times slower than the VCC implementation. I am using GCC 8.1. Has anyone else noticed this? Could the results change from processor to
18:55:27rockcaveraprocessor? If the Nim implementation is actually faster than the GCC builtin, would it be prudent to propose a change of bitops?
18:56:18FromDiscord_<treeform> rockcavera, I love over optimizations, did you run it with -d:release ?
18:56:35rockcaveratreeform, yes, with -d:danger -d:release
18:56:36rockcavera=)
18:56:40FromDiscord_<treeform> 🙂
18:56:54FromGitter<dawkot> Is macro overload based on NimNodeKind still supported? I can't find any anything in the manual about it, but I recall someone on the forum showing it
18:57:30FromDiscord_<treeform> rockcavera, this function looks wow: https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/bitops.nim#L273
18:58:04FromDiscord_<treeform> rockcavera, you are saying that GCC branch `useGCC_builtins` is slower then the `useVCC_builtins` branch?
18:58:16FromDiscord_<treeform> Does gcc support vccc builtins?
18:58:20FromDiscord_<treeform> Does gcc support vcc builtins?
18:58:22FromDiscord_<mratsim> compile with -popcount
18:59:00rockcaveratreeform: Yes, GCC implementation is slower than VCC, but there is a Nim implementation that is faster than GCC.
18:59:13FromDiscord_<mratsim> ah no sorry: -mpopcntb
18:59:47FromDiscord_<mratsim> anyway, not all x86_64 CPU supports the POPCNT instructions so GCC is conservative only you pass march=native
19:00:36FromDiscord_<mratsim> or is it mpopcnt? so many confusin results
19:00:47FromDiscord_<treeform> rockcavera the else countSetBitsNim branch?
19:00:52rockcaverais mpopcnt
19:01:06rockcaverawow
19:02:07rockcaverawith -mpopcnt, GCC and VCC run at about the same speed
19:02:17FromDiscord_<treeform> solved 🙂
19:02:25FromDiscord_<treeform> should we always -mpopcnt?
19:02:44*rockcavera quit (Read error: Connection reset by peer)
19:02:47FromDiscord_<treeform> should there be a x86_64 CPU version setting?
19:02:59FromDiscord_<mratsim> now if you want 3x to 4x faster than builtin popcounts (only works on popcounts on arrays) you can check out this: https://github.com/numforge/laser/issues/41
19:03:00*rockcavera joined #nim
19:03:00*rockcavera quit (Changing host)
19:03:00*rockcavera joined #nim
19:03:12FromDiscord_<treeform> Support everything fast on CPU that are 10 years or younger?
19:03:21rockcaverawith -mpopcnt, GCC and VCC run at about the same speed
19:03:22FromDiscord_<mratsim> no popcount is only since 2010/nehalem afaik
19:03:45FromDiscord_<treeform> 2010 is about 10 years ago 🙂
19:03:55FromDiscord_<mratsim> but we can introduce a default mode and a legacy mode yes
19:04:10FromDiscord_<mratsim> some game makers require AVX now 😄
19:04:32FromDiscord_<treeform> on the server I would like to compile to the CPU i have.
19:04:55FromDiscord_<treeform> when shipping games I would like to specify which CPU I want to target
19:05:49FromDiscord_<treeform>
19:05:50FromDiscord_<treeform> https://cdn.discordapp.com/attachments/371759389889003532/651499351419518986/unknown.png
19:05:57FromDiscord_<treeform> from https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam
19:06:14FromDiscord_<treeform> hmm only 90% of player have AVX...
19:06:59FromDiscord_<mratsim> There are people with AVX512VNNI (Vector Neural instructions) the CPU aren't even out ...
19:07:27FromDiscord_<Rika> 0.01% could mean some dude with engineering samples
19:07:27FromDiscord_<mratsim> even the SHA CPU aren't out
19:07:31FromDiscord_<treeform> Probably the people that implemented the check for them 🙂
19:08:10FromDiscord_<treeform> Is popcount part of some spec or it should be by itself?
19:08:48FromDiscord_<mratsim> it's by itself but all CPU that supports AVX supports popcount I think
19:09:04FromDiscord_<treeform> not according to this https://gvansickle.github.io/ucg/articles/PortabilityPointers-POPCNT/
19:09:08FromDiscord_<mratsim> similar to FMA (Fused Multiply Add), it's by itself, but all CPU that supports AVX2 supports FMA
19:10:20FromDiscord_<treeform> neat
19:11:04FromDiscord_<treeform> @mratsim sorry you were right the article does not contradict what you said.
19:11:37FromDiscord_<mratsim> I don't mind
19:11:56FromDiscord_<mratsim> it's like I try to be a walking encyclopedia of intrinsics :p
19:12:00FromDiscord_<mratsim> it's not like*
19:12:02FromDiscord_<treeform> AVX was after SSE4.2 so, it makes sense that all AVX CPUs will also have popcount...
19:12:37FromDiscord_<mratsim> now let's go back to multithreading and cook up some nasty atomics
19:13:08FromDiscord_<treeform> when do we get in the CPU built in GC?
19:13:29FromDiscord_<treeform> 90% of the languages use it, just add it do the CPU spec 🙂
19:14:01FromDiscord_<mratsim> proc alloca(size: csize): pointer {.header: "<alloca.h>".}
19:14:14FromDiscord_<mratsim> no CPU builtin but portable
19:14:25FromDiscord_<mratsim> on Windows:
19:14:26FromDiscord_<mratsim> proc alloca(size: csize): pointer {.header: "<malloc.h>".}
19:14:42FromDiscord_<mratsim> memory is autoreclaimed 😉
19:15:04FromDiscord_<treeform> when you run out you setjump to the start of your main ...
19:15:26FromDiscord_<mratsim> yes, it's a new way of doing exceptions
19:15:40FromDiscord_<treeform> thats how chicken scheme GC works
19:15:49FromDiscord_<treeform> it stack allocates everything
19:16:51FromDiscord_<mratsim> For Flowvars in my multithreading runtime that's what I do as well, they are alloca allocated until the latest possible time if they ever escape their scope/threads
19:17:54FromDiscord_<mratsim> The Manticore ML multithreading runtime does the same: http://manticore.cs.uchicago.edu/ (have to find the PhD thesis, I don't have the link handy)
19:18:52FromDiscord_<treeform> I wish Nim did threading better.
19:19:22Araqif only Araq would work 80 hours a week to make threading better. oh wait, he does, cool
19:19:53FromDiscord_<Rika> make it 90!
19:19:55FromDiscord_<treeform> Araq, thank you!
19:20:14FromDiscord_<Rika> ~~i am joking just to be super explicit i dont want to get murdered here~~
19:20:31FromDiscord_<treeform> Araq, how do you stay motivated with such long hours?
19:20:48FromGitter<Willyboar> Araq you are really doing great job
19:21:24FromDiscord_<Rika> all hail Araq
19:21:32FromDiscord_<exelotl> too late @Rika I've already dispatched the drone to your house
19:21:45FromDiscord_<Rika> > assumed that i have a house
19:22:06FromDiscord_<exelotl> touche
19:29:20*nixfreak44 joined #nim
19:30:07nixfreak44Is there a way to search for a function in a nimble library without having to go through every library in order to find it?
19:31:31nixfreak44NM I think I can just grep through .nimble
19:33:25disruptekshashlick: i'm trying to make sense of an installed nimble lib like `regex`, which you're using in nimterop. it has a srcDir but when it's installed, that directory is absent. is there a set of rules i can rely upon to figure out that the package is "installed"? i don't know if i can lock the packages safely otherwise.
19:37:04disrupteki guess "safety is not guaranteed" works.
19:40:49*clyybber quit (Ping timeout: 250 seconds)
19:41:40*Hideki_ joined #nim
19:43:03*spacepluk quit (Quit: leaving)
19:43:16*spacepluk joined #nim
19:43:34shashlickYou would need to look at the nimble file
19:43:44shashlickCause that's where the srcDir is defined
19:44:18disrupteki'm already parsing that. but it's still ambiguous, right?
19:45:11shashlickNot sure, I'd have to look at the code
19:45:47disrupteki mean, all i have to work with is the url, a version, and some source. i'll just warn for now and people can do what they want with the result.
19:46:01*Hideki_ quit (Ping timeout: 250 seconds)
19:48:14FromDiscord_<mratsim> Well srcDir is one of nimble quirk that I hate, when a package is installed the srcDir goes poof
19:49:53disruptektell me what's bad about nimph.
19:50:22FromDiscord_<mratsim> @Araq regarding your proposal to replace nim threeadpools by @yglukhov 's, yes sounds good to me. As long as we have a consistent API and we can switch between threadpool backends that will be good
19:50:38FromDiscord_<mratsim> The only bad thing about nimph is that I never tried it 😉
19:51:52disruptekhmm, i will give you a release. that seems to work.
19:52:35FromDiscord_<mratsim> Well right now none of what I'm working on requires a package manager because it's too low level
19:52:53FromDiscord_<mratsim> or because we have our own build system and changing it right now would be too disruptive
19:53:09disruptekdisrupt is my maiden name.
19:58:17*spacepluk quit (Quit: leaving)
19:58:30*spacepluk joined #nim
20:15:14FromDiscord_<onelivesleft> anyone here a git wizard?
20:20:33*sacredfrog joined #nim
20:21:47*thomasross joined #nim
20:24:35*narimiran quit (Quit: leaving)
20:24:51Zevvtry us
20:28:55FromDiscord_<Rika> i'm very nervous, updating main server from xenial lts to bionic
20:29:11FromDiscord_<Rika> i dont know if i did it right xd
20:29:53*nsf quit (Quit: WeeChat 2.6)
20:30:32FromDiscord_<onelivesleft> hey, thanks, I got it to do what I wanted. But if you want a quiz: I forked a repo, did some work, then made a pull request to update the original repo. Now I want to work on a different problem, but if I commit anything on my master it will update the pr. So, I want to branch my fork... but I want the branch to be at the same point as the original repo, not my master (which is where it starts)
20:31:07FromDiscord_<Rika> wait for pull request to be merged
20:31:12FromDiscord_<onelivesleft> yeah
20:31:16FromDiscord_<onelivesleft> that was plan B 🙂
20:31:22FromDiscord_<Rika> afaik thats the only way to do it properly
20:31:39disruptekyou can branch from anything.
20:31:40FromDiscord_<Rika> hey, im no wizard
20:31:47FromDiscord_<Rika> at best im prolly some minor apprentice
20:32:22FromDiscord_<onelivesleft> so I already did this iteration once earlier, and I cheated by simply pasting the original file over the top of my edits. but this meant that my new PR from the branch had a couple of commits in its history that did nothing, and looked ugly
20:33:39FromDiscord_<onelivesleft> the (or a) correct way is: make new branch in github, `git checkout newbranch` -> `git reset --hard <original_head_commit_id>` -> `git push -f origin newbranch`
20:35:12*spacepluk quit (Quit: leaving)
20:37:28FromDiscord_<spacepluk> @onelivesleft iirc you can do: git checkout -b newbranch <commit_sha>
20:37:52FromDiscord_<onelivesleft> that looks cleaner
20:38:06disruptekyou can branch from anything. 😉
20:41:09*kobi7 joined #nim
20:41:13kobi7hello guys
20:42:29kobi7I am writing a link checker, it works correctly now, but is single threaded. How do I use async await but limit the number of connections happening simultaneously? (taking urls from a long queue)
20:45:13disrupteki think there are better ways to do this, but this is what i hacked up for something this: https://github.com/disruptek/rest/blob/master/rest.nim#L317
20:46:09disrupteks/something this/something else/
20:48:38*clyybber joined #nim
20:49:51*vesper11 quit (Ping timeout: 246 seconds)
20:51:18kobi7Thanks disruptek - though, if I have 1000 items, and threads are 20, won't it "spawn" new ones until it reaches 20 ?
20:51:56*vesper11 joined #nim
20:52:14FromGitter<dawkot> Can you save the result of a macro as a const NimNode?
20:53:18kobi7I think I can just use normal os threads for that, but the docs suggest 'await' for I/O
20:53:57*thomasross quit (Ping timeout: 265 seconds)
20:54:15disruptekkobi7: the idea is you want to process the results and you can manipulate the queue at the same time.
20:54:29disruptekie. the waitfor stalls when the queue is too full.
20:55:33kobi7ah, I see. I misunderstood futures for items
20:55:47*thomasross joined #nim
20:55:57kobi7futures are the currently executing jobs? (the already sent requests)
20:56:48disruptekyeah. the iterator just ends if nothing is ready, so you use it in another loop or something.
20:57:14Araqmratsim: the problem is we got the threadpool API wrong
20:57:31Araqso it's not that easy to replace it by something else
20:57:43*tane quit (Quit: Leaving)
20:59:14kobi7that's great, knowing the futures count is a way to limit the requests. I will study it a little more to see where that happens
21:02:49kobi7oh, u just add one when you run its request. No global way, then.
21:03:55kobi7I somehow imagined the system knows how many requests have been sent and didn't come back yet :-)
21:04:01kobi7u just track it, so simple
21:05:14kobi7disruptek, what's with all the fibonacci stuff? :-)
21:05:41*kungtotte quit (Ping timeout: 268 seconds)
21:09:04disrupteki think fib my was my first nim proc. i just use it for backoff.
21:09:43*xet7 quit (Quit: Leaving)
21:14:59clyybberAraq: I'm curious why are embedded objects bad for performance?
21:15:10kobi7I heard "rumours" of a z3 solver?
21:15:31disruptekz3 is a thing, sure.
21:17:25Araqclyybber, are they?
21:17:47Araq--gc:arc doesn't support it because I got bored
21:17:51clyybberAraq: I don't know, this comment says they are: https://github.com/nim-lang/Nim/blob/7e747d11c66405f08cc7c69e5afc18348663275e/compiler/cgen.nim#L354
21:18:28Araqah because objectInit is the old RTTI crap
21:18:41Araqluckily the new runtime doesn't use it anymore
21:18:55clyybberAh ok
21:19:11clyybberHow can we make them work in new runtime?
21:19:17clyybberIts a real blocker for some things
21:19:21Araqsure be my guest
21:19:57Araqblocker? I have little code that uses it, but ok
21:19:57clyybber*How*?
21:20:16clyybberAraq: Well, it means we can't use more than two objects in an object doesn't it?
21:20:35Araqonly if the objects used inheritance
21:20:47Araqanyway, the case for 'frHeader' needs to be generalized
21:20:54Araqthat's your *how*
21:21:40clyybberOk, I wasn't aware its only a restriction for objects with inheritance..
21:21:51clyybberThats why I was so stumped
21:21:57clyybber:D
21:22:07Araqfor every object x inside y you need to set y.x.m_type
21:23:47*xet7 joined #nim
21:24:11clyybberAraq: So in the new runtime inheritance is basically case objects?
21:24:21clyybberWith a discriminator m_type?
21:24:53Araqnah
21:24:55FromGitter<alehander92> does
21:25:00Araqnothing changed
21:25:17FromGitter<alehander92> methods run correct in javascript backend? i feel they do, but wanted to ask for sure
21:25:17Araqexcept that we don't have objectInit anymore, so we need to inline what it does
21:25:40Araqalehander42: quite sure they do
21:25:47clyybberAh ok.
21:25:56FromGitter<alehander92> Araq good
21:26:49Araqclyybber, if you want a new challenge
21:27:15Araqfigure out why tests\stdlib\tmath fails in my araq-better-codegendecl branch
21:27:24clyybberI was wondering anyhow
21:27:37Araqfor some reason this snippet here
21:27:39Araq let p = float(c) / float(cdf[^1])
21:27:41Araq let n = 5000.0
21:27:43Araq let expected = p * n
21:27:45Araq let stdDev = sqrt(n * p * (1.0 - p))
21:27:59Araqproduces 0.0 for 'expected' even though p is 0.4
21:28:14clyybberthat is... interesting
21:28:14Araqcan't reproduce outside the suite/test env
21:28:22clyybberhuh
21:28:32Araqprobably some phase ordering shit going on with .global
21:28:43Araqtime to sleep, good night
21:28:47clyybbergn8
21:30:01FromGitter<alehander92> seee ya
21:31:29kobi7me too, good night all
21:31:33*kobi7 quit (Quit: Leaving)
21:32:20*Trustable quit (Remote host closed the connection)
21:35:50FromDiscord_<Kaynato> I suppose tables withValue is supposed to return pointers for good use of fields with object/tuple types, but is returning pointers to primitive types (behavior with inexact documentation) intended?
21:58:15dom96narimiran: regarding https://irclogs.nim-lang.org/03-12-2019.html#10:53:21. I never said we shouldn't do what you suggest, we need to see how common this is and figure out the best way to solve it.
22:04:47dom96Argh, remaining motivated to do Advent of Code every day is seriously tough
22:07:19FromDiscord_<exelotl> lol right now AoC is procrastination for me every evening
22:07:53FromDiscord_<exelotl> I could be coding something useful but instead I'll do a small brainteaser then go play pokemon
22:09:00clyybberexelotl: Did you test the PR?
22:09:32FromDiscord_<exelotl> not yet! that was one of the useful things I could have been doing xD
22:09:55FromDiscord_<exelotl> I'll give it a try now tho
22:16:59FromDiscord_<mratsim> @Araq, I don't see anything fundamentally wrong in the threadpool API
22:17:51FromDiscord_<mratsim> it's the implementation that has issues
22:18:37FromDiscord_<mratsim> this is what I expose:
22:18:37FromDiscord_<mratsim> https://github.com/mratsim/weave/blob/master/weave.nim#L13-L17
22:18:38FromDiscord_<mratsim>
22:18:38FromDiscord_<mratsim> and usage
22:18:38FromDiscord_<mratsim> https://github.com/mratsim/weave/blob/master/benchmarks/dfs/weave_dfs.nim#L16-L27
22:18:49FromDiscord_<mratsim> (it's DFS this time, not fibonacci ;))
22:21:45AraqI tried to fix blockUntilAny and considered it impossible :P
22:22:25FromDiscord_<mratsim> it's not needed 😉
22:22:41FromDiscord_<mratsim> well for the basic usage
22:33:05disruptekshashlick: nimterop cannot find itself when it's not built in .nimbledir, so installs fine but cannot build wrapped libs.
22:38:50*solitudesf quit (Ping timeout: 265 seconds)
22:39:23disruptekcan we make it build inside the directory of the wrapper? then nim could pick up the env in the usual fashion.
22:39:53disruptekoh, we can't get current directory at compile-time, right?
22:41:20*nixfreak44 quit (Remote host closed the connection)
22:53:14*rockcavera quit (Read error: Connection reset by peer)
22:53:56*rockcavera joined #nim
22:53:57*rockcavera quit (Changing host)
22:53:57*rockcavera joined #nim
23:12:06clyybbergn8 yall
23:12:09*clyybber quit (Quit: WeeChat 2.6)
23:14:42*ltriant joined #nim
23:32:17shashlick@disruptek can you please explain the issue - do you mean the toast binary
23:32:53disruptekso, because it builds the lib in .cache, it's not picking up any of the nim.cfg that it needs to in order for nim to have the right search paths.
23:33:08disruptekdoes that make sense?
23:33:26disruptekthe compiler cannot import nimterop/plugin or such.
23:34:24disrupteki had issues like this before but because i had nimterop in .nimbledir, it was never a problem. now that my nimbledir is empty, i cannot build new libgit2 libs. 😁
23:34:49shashlickOk please walk me thru steps to repro
23:34:57disrupteki know every couple days i report the same confusing issue, but damnit, it's frustrating! 🤣
23:35:05shashlickHow are you setting nimble dir
23:35:15shashlickHow are you installing nimterop
23:35:17*rockcavera quit (Remote host closed the connection)
23:35:37disruptekit doesn't matter how you set it, because nimterop always builds the library outside of whatever tree you're in.
23:35:55disruptekso it will never pick up the paths from nim.cfg.
23:36:13shashlickOnly the C code is outside right
23:36:21shashlickNot the nim wrapper itself
23:36:39disruptekno, i mean the wrapper itself. toast builds just fine with the proper nimble_dir set, etc.
23:37:11disruptekwe just gotta move it into $nimbledir/lib or something.
23:37:20shashlickWhen you nimble install the wrapper, the nim file will be in nimble dir
23:38:01disruptekokay, say i've installed nimterop and nimgit2 locally. local deps.
23:38:09disruptekand i build toast and everything. it's all fine.
23:38:17shashlickCool
23:38:21disruptekbut now i go to build nimph, and getHeader runs and whatnot.
23:38:39disruptek(i had to upgrade to libgit2-#head)
23:38:47disruptekso it wants to build a new .so
23:39:06disruptekand it runs nim inside ~/.cache which is not anywhere near my repo.
23:39:13disruptekso nim misses my environment.
23:43:06*Hideki_ joined #nim
23:43:32*rockcavera joined #nim
23:44:41*kungtotte joined #nim
23:46:03disrupteki guess i can work around this by running `nimph c ...` but it's kinda contrary to the point of nimph.
23:47:57*Hideki_ quit (Ping timeout: 265 seconds)
23:55:41shashlickYa we have an issue open for the so to be built in the data directory
23:56:53shashlickNimterop builds binaries in the same spot, it isn't building in the nimble dir
23:58:05disruptekyeah.