00:00:14FromGitter<krux02> the class is calld "Mesh" btw
00:04:09FromGitter<Varriount> @zacharycarter I've redone some of the v4 signing code again, by the way.
00:04:21FromGitter<Varriount> I added query-type signing mainly
00:14:39*DarkArctic quit (Read error: Connection reset by peer)
00:15:12*DarkArctic joined #nim
00:16:02*jrbrt quit (Quit: jrbrt)
00:18:25FromGitter<krux02> well yea I go to bed, good night folks, it's late here
00:24:24*MJCaley joined #nim
00:27:44*DarkArctic quit (Ping timeout: 276 seconds)
00:40:03*smt quit (Read error: Connection reset by peer)
00:40:34*smt joined #nim
00:43:08*MJCaley quit (Quit: Bye)
00:43:38*NimBot joined #nim
00:47:00*DarkArctic quit (Client Quit)
00:56:15*DarkArctic joined #nim
00:57:37*DarkArctic_ quit (Ping timeout: 248 seconds)
01:14:50FromGitter<zacharycarter> @Varriount I don't know what that is - but I'm excited to hear it :)
01:14:52FromGitter<zacharycarter> what can I help with?
01:15:44FromGitter<zacharycarter> @krux02 good advice- thank you
01:56:06*noonien quit (Quit: Connection closed for inactivity)
01:58:29*qwertfisch quit (Ping timeout: 255 seconds)
01:59:09*beatmox quit (Ping timeout: 264 seconds)
02:05:36*beatmox joined #nim
02:05:39*qwertfisch joined #nim
02:22:46*krux02 quit (Remote host closed the connection)
02:29:23*BitPuffin quit (Remote host closed the connection)
02:33:37*SenasOzys quit (Ping timeout: 248 seconds)
02:33:44petersjt014[m]anyone have experience w/parsing xml?
02:38:57petersjt014[m]I was trying to parse a string where a file was expected
02:39:33petersjt014[m]now if only I can find the right module..
02:43:06FromGitter<zacharycarter> how do I free shared if I'm using runForever - basically how do I clean up in the case of using jester w/ runForever
02:43:17FromGitter<zacharycarter> since I can't use defer at top leve?
02:43:51FromGitter<zacharycarter> or can I just stick it at the bottom of the routes macro?
02:44:33FromGitter<zacharycarter> petersjt014[m]: https://nim-lang.org/docs/parsexml.html ?
02:48:34petersjt014[m]yeah that looks like it. thx!
02:49:53*endragor joined #nim
02:51:27FromGitter<zacharycarter> sure thing
02:57:24*DarkArctic quit (Ping timeout: 260 seconds)
02:57:37*arecaceae quit (Remote host closed the connection)
02:58:00*arecaceae joined #nim
03:02:44*DarkArctic joined #nim
03:02:59FromGitter<Varriount> @zacharycarter Would you be available for a meet-up tomorrow?
03:08:31FromGitter<zacharycarter> @Varriount yup - I need to meet the contractor I'm working w/ to sell my house at 10 am but I could do something in the afternoon
03:08:40*endragor quit (Remote host closed the connection)
03:14:29*DarkArctic_ joined #nim
03:15:13*DarkArctic quit (Ping timeout: 248 seconds)
03:20:13*DarkArctic joined #nim
03:20:50*gangstacat quit (Ping timeout: 255 seconds)
03:20:51*DarkArctic_ quit (Read error: Connection reset by peer)
03:27:08*DarkArctic quit (Ping timeout: 256 seconds)
03:30:20*DarkArctic joined #nim
03:35:53*gangstacat joined #nim
03:47:33*dddddd quit (Read error: Connection reset by peer)
04:07:32*rockcavera quit (Remote host closed the connection)
04:08:26*rockcavera joined #nim
04:09:05*DarkArctic quit (Ping timeout: 248 seconds)
04:10:02*DarkArctic joined #nim
04:17:29*cspar joined #nim
04:24:23petersjt014[m]are there any caveats with assigning to if statments?
04:24:37petersjt014[m]I have this, which causes an exception:
04:25:16*petersjt014[m] sent a long message: petersjt014[m]_2018-04-21_04:25:15.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/uOGdMcmIMzXMeMLCjnWoajEp>
04:28:45petersjt014[m]okay, now it works
04:29:07petersjt014[m]this xml is hideous, so :shrug:
04:38:04*endragor joined #nim
04:43:55*miran joined #nim
04:46:15*Lord_Nightmare2 joined #nim
04:48:59*endragor quit (Remote host closed the connection)
04:50:09*Lord_Nightmare quit (Ping timeout: 264 seconds)
04:50:45*Lord_Nightmare2 quit (Ping timeout: 264 seconds)
04:52:08*Lord_Nightmare joined #nim
04:52:38*endragor joined #nim
05:10:15*endragor quit (Remote host closed the connection)
05:20:31petersjt014[m]I have a made a web-parsey thing in nim
05:24:11*endragor joined #nim
05:31:29*leorize quit (Quit: WeeChat 2.1)
05:32:23FromGitter<Varriount> petersjt014[m]: I swear, every time someone says "XML", thunder and lightning should strike in the background.
05:35:20petersjt014[m]normally I can just barely handle it
05:36:06petersjt014[m]but tonight I am really into the idea of finding whoever came up with CDATA and choking them
05:36:14petersjt014[m]just a lil bit
05:46:39petersjt014[m]but anyway...
05:49:31petersjt014[m]It's prob gonna break in a lot of situations but it's a start
05:50:28*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
05:50:37petersjt014[m]Can you believe that before before about five minutes ago there were no podcast analysis tools in existence?
05:50:47*Lord_Nightmare joined #nim
05:50:58*natrys joined #nim
05:51:37petersjt014[m]I there still aren't cus it don't do squat but still
05:51:50petersjt014[m]*I mean
05:52:16*endragor quit (Remote host closed the connection)
06:40:20*max3 quit (Quit: Connection closed for inactivity)
06:44:05*cspar quit (Ping timeout: 240 seconds)
06:49:19*xkapastel quit (Quit: Connection closed for inactivity)
06:53:10*r3d9u11 joined #nim
06:55:05*cspar joined #nim
07:01:06*yglukhov quit (Remote host closed the connection)
07:02:40*yglukhov joined #nim
07:03:37*yglukhov quit (Remote host closed the connection)
07:05:13*yglukhov joined #nim
07:09:50*yglukhov quit (Ping timeout: 256 seconds)
07:11:06*r3d9u11 quit (Remote host closed the connection)
07:20:21*nsf joined #nim
07:22:07*Trustable joined #nim
07:27:14*rokups joined #nim
07:32:04*miran quit (Ping timeout: 256 seconds)
07:44:07*r3d9u11 joined #nim
07:58:02*natrys quit (Quit: natrys)
08:05:07Araqhmm 4 bugs left...
08:08:32FromGitter<ephja> :o
08:09:12FromGitter<ephja> probably referring to some specific thing :p
08:09:18petersjt014[m]I don't know what you're doing, but still probably neat
08:11:59petersjt014[m]rn I'm having fun discovering that triple zips in a language I don't really know are not that easy
08:15:52Araqtrying to get the issue count to 1300
08:16:47Araqfix 5 issues every day and it only takes us 260 days to get it to 0.
08:17:26FromGitter<ephja> is "foo.bar(...)" generated for the js target with 'importcpp'? if emit is not used
08:18:23FromGitter<ephja> trying to extend it outside of the dom module. doesn't work so I guess I'll use emit. I should add getComputedStyle though. karax has it
08:21:58*r3d9u11 quit (Read error: Connection reset by peer)
08:26:45*Senketsu joined #nim
08:31:44FromGitter<ephja> was kdom patched or created independently?
08:39:08*jjido joined #nim
08:58:03FromGitter<alehander42> so @krux02 should I make a PR for some of the stuff in https://github.com/krux02/ast-pattern-matching/issues/2 this weekend ?
09:04:39FromGitter<alehander42> @Araq why can't one expand a macro in a type section ?
09:05:12FromGitter<alehander42> e.g. I am trying to make @andreaferretti 's `variant T` macro work as ⏎ ⏎ ```type ⏎ T = variant: ⏎ ..``` [https://gitter.im/nim-lang/Nim?at=5adafec82b9dfdbc3ab2da33]
09:11:40*simonsolnes joined #nim
09:24:17*arecaceae quit (Remote host closed the connection)
09:24:41*arecaceae joined #nim
09:24:44*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:28:02*hal1 joined #nim
09:39:17FromGitter<mratsim> try with parenthesis?
09:39:50FromGitter<mratsim> or behind a (block: yourmacro …)
09:49:08*SenasOzys joined #nim
09:55:19FromGitter<alehander42> interesting it seems one can
09:55:58FromGitter<alehander42> ```type ⏎ T = variant( ⏎ A(i: int), ⏎ B(b: string)) ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5adb0aae5d7286b43a50b94d]
09:56:19FromGitter<alehander42> but not
09:56:23FromGitter<alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5adb0ac71130fe3d36fe66e8]
09:59:53*jjido joined #nim
10:03:53*tiychioh joined #nim
10:09:44petersjt014[m]`parser_v2.nim(119, 53) Error: complex statement requires indentation`
10:09:56petersjt014[m]ok, DAD
10:10:41petersjt014[m]Is a triple nested zip/map too much to ask for?
10:17:01FromGitter<alehander42> @petersjt014[m] usually not, do you have a snippet?
10:26:30*Senketsu quit (Quit: WeeChat 2.1)
10:26:46*Senketsu joined #nim
10:29:19*Senketsu is now known as Senny
10:39:33*Senny is now known as Senketsu
10:43:29*Widdershins quit (Ping timeout: 260 seconds)
10:44:13*Senketsu is now known as Senketsu_
10:44:32*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:44:36*Senketsu_ is now known as Senketsu
10:45:05*Widdershins joined #nim
10:57:21*jjido joined #nim
10:57:22hal1is there a replacement for < ? To avoid this Warning: < is deprecated
11:00:36*tiychioh quit (Ping timeout: 256 seconds)
11:00:58*jjido quit (Client Quit)
11:03:54hal1found it, it's pred(x)
11:11:35*natrys joined #nim
11:13:13dom96no, it's x..<y
11:13:17dom96i.e. no space
11:13:24*endragor joined #nim
11:13:29dom96`..<` is its own operator
11:13:39dom96What was deprecated is the unary ``<``
11:13:52dom96This needs a better warning
11:16:14*cspar quit (Ping timeout: 265 seconds)
11:17:35*endragor quit (Ping timeout: 240 seconds)
11:22:08*xkapastel joined #nim
11:23:45*Senketsu_ joined #nim
11:25:09*r3d9u11 joined #nim
11:26:15*Senketsu_ quit (Client Quit)
11:27:08hal1yes, I found the comment in os for it, in unary <
11:27:31hal1pred is the replacement for the unary <
11:30:36hal1I had to change both, the new range but there were also uses of unary <, just as <pos for example which I changed to pos.pred
11:30:37*tiychioh joined #nim
11:32:25*Senketsu_ joined #nim
11:33:01*Senketsu_ quit (Client Quit)
11:33:17hal1it was in system, not os, sorry
11:33:42*Senketsu_ joined #nim
11:48:13hal1dom96: I'm trying to change docopt to use regex instead of nre and I noticed the unary < warning and that nimble check gives some warnings. Does this look ok to you https://github.com/docopt/docopt.nim/compare/master...hendrikgit:nimblefile ?
11:49:29dom96hal1: Yes, except that your `test` task won't work on Windows.
11:50:27dom96you can use this https://nim-lang.org/docs/nimscript.html#listFiles,string
11:52:08hal1doh that ls was meant for my console. Thanks dom96 I'll do that
11:56:55hal1do I need to call setCommand "nop" after every exec in a task or just at the end of the task
11:59:23dom96You don't have to do that at all in Nimble
12:05:38hal1dom96: like this? https://github.com/docopt/docopt.nim/compare/master...hendrikgit:nimblefile
12:07:24dom96sure, I think there might be a way to use the ospaths module's functions in nimscript too
12:07:33dom96you can use them to check the file extension
12:07:44dom96but what you're doing works too
12:08:31FromGitter<zacharycarter> I keep getting oom errors with this code, right around this line - https://gist.github.com/zacharycarter/ad871978fc697d6d5af28411f1458b50#file-oom-nim-L86
12:09:41*r3d9u11 quit (Remote host closed the connection)
12:11:42hal1these are things I just did to pass the time while I try to figure out how to make it work with the new regex lib, which is the real goal
12:12:27*joe___ joined #nim
12:13:40FromGitter<zacharycarter> output from lldb - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5adb2af31130fe3d36fedcc8]
12:15:38FromGitter<zacharycarter> I guess it's because I'm not returning anything from the method being spawned
12:15:51FromGitter<zacharycarter> but... should this maybe be caught at the compiler level?
12:15:57hal1I get the impression the docopt repository is not the most active, there is an open PR from January
12:16:09FromGitter<zacharycarter> I don't think the maintainer works on Nim stuff anymore
12:16:16*dddddd_ joined #nim
12:17:16dom96Might be good to ask for access to the repo
12:17:24*dddddd_ is now known as dddddd
12:26:09*SenasOzys quit (Ping timeout: 264 seconds)
12:26:47hal1I changed nre to regex and made it compile but then the tests fail. I'm not sure if I wrote an incorrect replacement for captures[0] or if nre and regex differ in other places. If someone has time and interest to have a look this is it so far: https://github.com/docopt/docopt.nim/compare/master...hendrikgit:nim-regex
12:30:13*SenasOzys joined #nim
12:31:05dom96Import both nre and regex and see where they differ
12:31:09dom96add some 'echo's in there
12:31:19dom96it might be a bug in 'regex'
12:42:55*joe___ quit (Ping timeout: 260 seconds)
12:44:50*tiychioh quit ()
13:02:23*natrys quit (Quit: natrys)
13:13:06*smt` joined #nim
13:17:09*smt quit (Ping timeout: 264 seconds)
13:20:35FromGitter<alehander42> I almost made a mini web framework in my horrible websocket.nim based file
13:21:09FromGitter<alehander42> I already have html templates & routing dsl
13:24:00FromGitter<alehander42> actually are there any other nim web frameworks than jester? i've always found it weird crystal guys have several and we have one, a bit like in the python vs ruby distribution
13:28:47AraqI don't know. time to improve jester I guess.
13:28:57*endragor joined #nim
13:29:03Araqbtw you can use "native karax" for the html templates
13:30:08FromGitter<alehander42> jester seems nice, I just always wanted to write my own little framework , pure egoism :D
13:30:31Araqwell it's like your own pattern matching DSL.
13:30:39Araqalways nice to write his own.
13:31:03FromGitter<alehander42> yes, you just have to write one, otherwise you'll never find the true pattern of life
13:31:15AraqI wanted to use 'lexim' for jester's routing
13:33:43*endragor quit (Ping timeout: 256 seconds)
13:34:01FromGitter<alehander42> hm, lexim looks interesting
13:34:49FromGitter<alehander42> how can you use native karax btw ? does it just have an alternative genHtml ?
13:34:57*jjido joined #nim
13:35:30Araqthere is a test for it, I hope.
13:36:07Araqyou import karax_dsl and it buildHtml() builds a DOM that can be turned into a string
13:36:16Araqsadly, it doesn't build the string directly
13:37:00Araqbut depending on what you do, the tree representation can be faster.
13:39:11FromGitter<alehander42> ah yeah, `$`
13:41:43Araqtbh I don't really know what a web framework needs to do. Routing, yes. I tried to do a general 'login' mechanism but it's so tied to the data model
13:43:46*Sembei quit (Read error: Connection reset by peer)
13:44:52*Sembei joined #nim
13:45:09FromGitter<alehander42> yeah, I doubt one can really bake a too general login mechanism inside
13:46:51Araqwould be cool though, users have 'roles' and every action is attached to a role
13:46:57FromGitter<alehander42> also you can have complicated auth schemes, role-based auth etc, probably 3rd party libs
13:47:09FromGitter<alehander42> would be best for that
13:47:39Araqso the framework makes it harder to introduce security problems.
13:48:08Araqevery action is checked against the user role
13:49:29*nsf quit (Quit: WeeChat 2.0.1)
13:50:16FromGitter<alehander42> so basically each action has something like a whitelist of roles?
13:51:39FromGitter<ZarsBranchkin> What tools are there for automatic javascript binding generation?
13:51:52*leorize joined #nim
13:52:07Araqalehander42: exactly.
13:52:51Araqif attached to the routing pattern, you cannot forget it.
13:53:24Araqdjango seems to solve this by producing the SQL schema for you
13:53:40FromGitter<alehander42> @ZarsBranchkin https://github.com/mcclure/dts2nim (it's great, but a bit old, the author doesn't seem to work with Nim anymore: I have an unfinished newer version of it)
13:54:04FromGitter<alehander42> what do you need it for?
13:54:11FromGitter<alehander42> @Araq yeah, it seems useful
13:54:41FromGitter<alehander42> still I can imagine some people just resetting to a single role annoyed by the additional work
13:54:56FromGitter<ZarsBranchkin> alright, thanks. Just wanted to use simple game framework library in Nim, hopefuly can avoid manually writing the bindings as I write
13:55:11hal1dom96: one of my docopt PRs just got accepted, so the repo owner is looking at it :) I made another one following your advice on issue 32 https://github.com/docopt/docopt.nim/pull/36 but that one has conflicts and I'm not sure how it came to that.
13:57:06FromGitter<alehander42> @ZarsBranchkin which framework? if it has definition files, this would be good. otherwise if you're just trying it/using a small subset, you can still go far with the jsffi dynamic `.` or several handwritten definitions
13:58:14FromGitter<alehander42> @Araq I wonder about the server side karax: on one hand it can be very useful, on the other I am already used to write most stuff as SPA and my original server side html is usually a very small sceleton
13:58:16FromGitter<ZarsBranchkin> was looking at this: http://www.pixijs.com/
13:58:32FromGitter<ZarsBranchkin> How the API looks: http://pixijs.io/examples/#/basics/basic.js
13:59:19FromGitter<ZarsBranchkin> Haven't interfaced with javascript yet, so don't really know the workflow there
13:59:39FromGitter<ZarsBranchkin> Espeically since javascript doesn't have static types, so probably have to define all those manually
14:00:21FromGitter<alehander42> @ZarsBranchkin well you need to define only those types which you use, which depends a lot on your usecase
14:01:13FromGitter<ZarsBranchkin> Yeah, I guess writing the bindings as I go isn't that bad
14:01:42FromGitter<alehander42> you can also just use the stdlib jsffi `js` type which is like a dynamic catch-all, but you'll need a lot of casting and generally it's useful for experimentation/playing with an API , not really for longterm code
14:01:42FromGitter<ZarsBranchkin> I just found this framework anyway, so I don't know everything that it has to offer yet
14:02:36Araqalehander42: well yeah, it's mostly an either-or thing. if you use Karax for SPAs you don't need server-side karax
14:03:07Araqbut server-side karax is native Nim and not everybody likes the fluffy DOM stuff
14:06:30*user1101 joined #nim
14:06:58AraqI personally prefer SPAs though.
14:07:59*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:11:34*xkapastel quit (Quit: Connection closed for inactivity)
14:22:50*hddgvvc joined #nim
14:23:41*xet7 joined #nim
14:25:26FromGitter<ZarsBranchkin> jsffi seems perfect for my needs, wasn't aware of it, thanks
14:26:49*Senketsu quit (Quit: WeeChat 2.1)
14:27:19Araqgood thing I want to deprecate it, huh? :P
14:27:20*hddgvvc quit (Ping timeout: 260 seconds)
14:27:46*Senketsu joined #nim
14:29:44*Vladar joined #nim
14:29:58FromGitter<ZarsBranchkin> Hah, well good thing this isn't a serious project
14:34:04FromGitter<ZarsBranchkin> Why is it getting deprecated, because it neglects static types?
14:34:40Araqwell instead of foo.uncheckedField I'd like to do quirky(foo.uncheckedField)
14:35:00Araqso that people know where the static checking is disabled
14:35:19FromDiscord<claude> can someone teach me what these lines do in the js output `var NTI104 = {size: 0,kind: 31,base: null,node: null,finalizer: null};`
14:35:51Araqclaude: it's Nim's RTTI
14:36:35Araqkudos to dom96 btw for bringing it up
14:36:48FromGitter<ZarsBranchkin> Seems reasonable, although probably will make pretty noisey code unless it's used as block macro
14:37:51AraqI wonder if it should be a general macro in sugar.nim
14:38:27Araqbrackets(foo.bar.baz) --> foo["bar"]["baz"]
14:39:04*Senketsu_ quit (Quit: Leaving)
14:40:08*jjido joined #nim
14:46:58*miran joined #nim
14:47:30FromGitter<alehander42> @Araq yea I also prefer spa-s these days
14:48:38AraqI could never remember how forms work in HTTP land :P
14:52:22*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:02:12*jjido joined #nim
15:03:03*smt` quit (Read error: Connection reset by peer)
15:13:50*Vantage joined #nim
15:14:52dom96Araq: Thanks :)
15:15:45dom96SPAs suck, they make browsers even slower than they already are
15:15:45Araqdo we want sugar.brackets ? better tie it to JsObject for now, right?
15:17:21Araqdom96: but they bring us closer to the ideal world where there are recv/send operations instead of HTTP redirects, GET vs POST decisions, URL hierarchies, cookies and all that other cruft that has nothing to do whatsoever with application development
15:18:33*xkapastel joined #nim
15:44:26*Vantage quit (Quit: Leaving)
15:49:44dom96https://github.com/nim-lang/Nim/issues/2650#issuecomment-383306112 :'(
15:49:47dom96That's so sad
15:51:02FromGitter<mratsim> oh :/
15:51:44FromGitter<ZarsBranchkin> woah, hadn't seen something like that before on github. Pretty dark
15:52:32Araqso passionate he told his wife about github. wow.
15:52:50FromGitter<mratsim> she replied by email
16:01:43Araqmratsim: for-loop macros?
16:02:04FromGitter<mratsim> let me have a look :)
16:02:56Araqprobably I need to give the macro a 'typed' AST :P
16:03:17FromGitter<mratsim> I’ve been trying to beat assembly routines for bigints with pure Nim most of the day. I’m now within 10%.
16:03:41Araqseems like a good day. :-)
16:03:53FromGitter<mratsim> yesterday I was 5x slower :P
16:04:06*Hgfdfg joined #nim
16:04:10Araqyou need to livecode your optimization sessions
16:04:16Araqwe need more Nim youtubers.
16:04:33dom96yep, more twitch streaming can't hurt
16:04:34Araqit also forces you to focus, can't read reddit when recording
16:04:37FromGitter<mratsim> Ah that’s actually a good idea
16:04:43dom96We can add a section on the website for them :)
16:05:03FromGitter<mratsim> I never read reddit while working, I have my head deep in papers :P
16:05:31AraqI watch youtube videos about Lego.
16:06:30HgfdfgMe neither I just do 8 hours reddit sessions and go home
16:07:13AraqHgfdfg: since you don't break anything, I bet you're the most productive worker ever
16:07:30HgfdfgYep :-)
16:08:25Araqyou should be promoted to management. :-)
16:12:20*Hgfdfg quit (Ping timeout: 260 seconds)
16:21:48*hal1 quit (Quit: WeeChat 1.4)
16:23:16*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:26:00*BitPuffin joined #nim
16:28:01FromGitter<mratsim> @Araq, what’s the expected syntax?: https://gist.github.com/mratsim/7d05f73fde8e59cc69335b726651a016#file-forloop_macro-nim-L117
16:28:29FromGitter<mratsim> I get "Error: iterator within for loop context expected” with latests devel
16:30:45FromGitter<mratsim> only the last 12 lines are relevant, the rest is a macro to generate a variadic zip iterator. But if I can’t make a normal one work (zipZipZIp) the variadic one won't
16:31:29*smt joined #nim
16:35:14*SenasOzys quit (Ping timeout: 260 seconds)
16:44:53*xet7 quit (Remote host closed the connection)
16:46:37*xet7 joined #nim
16:58:18*PMunch joined #nim
17:02:07PMunchHmm, the `.` experimental operator is a bit weird to work with
17:02:19PMunchI guess that's why it's experimental :P
17:02:56PMunchI wanted to have my protobuf objects have optional fields without littering everything with options from the "options" module as they're so clunky to work with
17:03:36PMunchGot it almost working, but it seems I can't get it to return a var type for some reason..
17:07:48FromGitter<mratsim> I don’t suppose there is a direct acyclic graph library for Nim?
17:08:52FromGitter<mratsim> I will create thousands of nodes per second, each node can have multiple children and parents, so I suppose it needs a seq or something, but just thinking of the heap allocation *shrug*
17:09:44PMunchIf you know how many you're going to create you can always pre-allocate
17:10:21FromGitter<mratsim> Na, it’s for Monte-Carlo simulation of games of go. There is not enough memory on earth for that.
17:11:16PMunchAh :P
17:11:56FromDiscord<claude> thousands? that can't be enough
17:12:24FromGitter<mratsim> yes sorry, thousands of games —> 450 nodes per game
17:13:27FromGitter<mratsim> but some nodes will have 4 parents, some 10, some 1, (if multiple moves lead to the same board position)
17:15:31FromGitter<mratsim> I was thinking that since table can store multiple values for the same key, I can use that and iterate on all stored values for one key but I don’t think there is a proc for that exposed
17:19:36*jjido joined #nim
17:24:24Araqmratsim: check out the test for it, macro m(x: ForLoopStmt)
17:25:27Araqmratsim: I used IntSet with integer node IDs, a is connected to b if myset.contains(a*N+b)
17:26:01Araqa sparse matrix representation
17:26:31AraqPMunch: I want to remove dot overloading.
17:26:36FromGitter<mratsim> interesting
17:26:45PMunchAraq, oh really?
17:27:38AraqPMunch: yeah I dislike them too much, only produces fragile solutions
17:28:04PMunchHmm, what do you mean by fragile solutions?
17:29:09Araqoh I just remembered, they are required for SharedRef hmmm
17:29:37Araqoh well... I will not decide anything.
17:32:02mirancan i nim-brag a bit? :)
17:32:12Araqor shared_ptr
17:32:25Araqsome smart pointer like C++ offers
17:32:31PMunchmiran, brag away :)
17:33:28miranso far i have used nim only for personal toy-projects and just for fun. when i needed to do "serious work" for my job, i have used python.
17:33:32FromGitter<mratsim> oh well, I’ll start with seq first, I’ll see how much creating thousands of seq per second costs :P. At least, I can copy paste Arraymancer code this way.
17:34:23mirannow i started working on a new thing at my work, and decided to use nim from the get-go
17:34:57mirani thought i will struggle much much more, but this has been really a smooth sailing
17:35:29mirani had so much pleasure writing the code!
17:36:42miran(well, i still need python to plot/animate the results, but the numerical calculation is done in nim+neo)
17:37:51PMunchWhat are you using to plot with?
17:38:06FromGitter<ephja> no COBOL?
17:38:44miranephja: well, my mentor/boss is a big fan of fortran, so there's that.... :D
17:39:35miranPMunch: i save the results from nim in a .csv file, then use pandas to read that csv, and use matplotib.animate for animations
17:40:03PMunchAh, I guess that's one way to do it
17:40:21PMunchIs there a plotting library in Nim?
17:40:25miranPMunch: if there's a better way, i'm all ears :)
17:40:46miranthere are some libraries that i have found which should be ok for some simple plots
17:41:07mirani haven't tried them, this is based on the examples they provide
17:41:40PMunchWell, not necessarily better but you could always find a JS library and then output a simple HTML page with the data embedded
17:41:42miransee here: https://github.com/nim-lang/needed-libraries/issues/77#issuecomment-376223649
17:42:37miranPMunch: i have zero experience with JS and anything web-related :)
17:44:11PMunchIt should be pretty easy. But if you have something you're comfortable with then you can just stick to that :)
17:45:52PMunchThat plotly thing is pretty much what I was thinking of
17:46:07PMunchBut in a nice wrapper thing
17:46:08miranwell, matplotlib has the ugliest most unintuitive and inconsistent API ever, but it is quite powerful and i'm familiar with it
17:47:18*Trustable quit (Remote host closed the connection)
17:47:48FromGitter<ZarsBranchkin> Yeah, it's pretty annoying working with it, pretty clumy and messy workflow
17:52:37PMunchWhat I did last I needed something like this was to use gnuplot
17:53:35*endragor joined #nim
17:54:51Araqmiran: I switched from matplotlib to SDL 1.1 back in the days
17:55:16Araqused putPixel to plot my diagrams, was faster than getting matplotlib to do what I wanted
17:55:39dom96I use matplotlib for plotting too :)
17:55:43Araqand I would do it again :P
17:55:55dom96Araq: and what did the graphs look like?
17:56:49Araqdid some nice scatter plots, nobody complained
17:57:04Araqused transparency too.
17:57:37*r3d9u11 joined #nim
17:58:04miranwell, if it is anything simple, i might try to use some of the mentioned nim libraries, but for creating an animation relatively simply, i don't think anything that can beat MPL
17:58:34*endragor quit (Ping timeout: 264 seconds)
18:00:29Araqcan't put an animation in a paper ;-)
18:00:50mirannot with that attitude! :P
18:01:06PMunchNever played with those flip-through animations as a kid Araq?
18:02:04*nsf joined #nim
18:04:22miranregardless of the way to show the results, doing the simulation to obtain those results was such a pleasure to do in nim! will recommend to my colleagues, and will use it again!
18:08:41*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:09:15*yglukhov joined #nim
18:11:07*ieatnerds joined #nim
18:11:12ieatnerdsHey guys!
18:11:29ieatnerdsGot a couple of questions, nothing too crazy I think.
18:11:48PMunchHit us!
18:13:03ieatnerdsSome context. for my job we are moving to storing client info in a more secure manner, I was really hoping to make something with nim that can accomplish this for us. In this endeavor I'm looking at if there are any nim libs that can interface with active directory credentials.
18:13:21*yglukhov quit (Ping timeout: 248 seconds)
18:16:07*xet7 quit (Remote host closed the connection)
18:16:37PMunchHmm, haven't seen any. But then again I haven't been looking :P
18:17:57ieatnerdsThat's alright. I'll admit I'm not entirely sure what I'm doing, just thought I'd ask in case anyone here could help me.
18:18:36*xet7 joined #nim
18:18:46*yglukhov joined #nim
18:22:06*yglukhov quit (Read error: Connection reset by peer)
18:22:40*yglukhov joined #nim
18:26:26PMunchHmm, what is a "method" in Nim?
18:27:48FromDiscord<claude> proc with dynamic dispatch instead of static
18:28:16FromGitter<Bennyelg> Guys, when I declare a 'Type' when I should refer him to an object and when to ref of object?
18:28:17FromDiscord<claude> like the method gets resolved at runtime instead of compiletime
18:28:24FromGitter<Bennyelg> what is the good practice
18:28:58PMunchBennyelg: https://peterme.net/nim-types-originally-a-reddit-reply.html
18:29:07FromGitter<Bennyelg> Thanks.
18:29:12PMunchclaude, aha
18:29:20PMunchThat kinda makes sense I guess
18:29:28AraqBennyelg: 'ref object' if you're too used to Python, 'object' if you want to reap Nim's benefits
18:29:53FromGitter<Bennyelg> @Araq I am python developer but I want to learn nim way hehe
18:30:02FromGitter<Bennyelg> so I want to reap the benifits of Nim evantually
18:32:13miranBennyelg: object vs ref object is something that has bothered me for quite a lot of time (as i'm also coming from pyton's world). PMunch's reddit reply helped me to understand more what's going on. but the best method for learning was when i implemented both version and played with them to see the differences in practice
18:32:54FromGitter<Bennyelg> Yea, I am reading the reddit reply and will play with them and see
18:32:57FromGitter<Bennyelg> thanks.
18:33:53*vantage joined #nim
18:34:56miranpass that (ref) objects around and change them in the new location, see what happens with the originals
18:35:35vantagecan we improve nimble to recommend package maintainers to have a tests directory and also something like travis ci for their packages?
18:41:34*Vladar quit (Quit: Leaving)
18:59:58shashlickAraq: 'nimble install tissue' should work now
19:00:03FromGitter<Varriount> vantage: A generic
19:03:27FromGitter<zacharycarter> vantage: varriount doesn't maintain nimble and I believe the current version of nimble will create a test directory for you when you run nimble init.
19:03:37FromGitter<zacharycarter> I think expecting nimble to produce a CI pipeline for you is asking a bit much
19:03:49FromGitter<zacharycarter> nimble isn't something like yeoman
19:03:52FromGitter<zacharycarter> it's more akin to NPM
19:05:03FromGitter<Bennyelg> how I can print the addr of an object? ⏎ echo(addr(s))
19:05:04FromGitter<Bennyelg> ?
19:05:07vantagezacharycarter. i was just asking for clarification since i didnt understand what he meant with "generic"
19:05:17FromDiscord<claude> echo cast[int](addr(s))
19:05:36FromDiscord<claude> i think
19:06:49vantagezacharycarter, i just want a way to know that the packages i download work, and that they arent broken, at the moment theres really no way to do so.
19:07:42vantageeven just something on nimble's website would be good
19:08:19FromGitter<Bennyelg> anyone ? P
19:08:50miranBunnyelg: claude answered it, no?
19:09:10FromGitter<Bennyelg> oh I see didnt see it :/ sorry
19:09:11FromGitter<Bennyelg> thanks
19:11:10FromGitter<Bennyelg> ```code paste, see link``` ⏎ ⏎ how come it modified the same object but the address in memory is not the same? [https://gitter.im/nim-lang/Nim?at=5adb8cce15c9b031141f2397]
19:13:33*yglukhov quit (Remote host closed the connection)
19:13:45dom96vantage: even if a package has CI that doesn't mean much
19:13:56dom96because the CI won't be run if the package isn't updated
19:14:04dom96or it could be run with an old version of Nim
19:14:05FromGitter<zacharycarter> yeah - it's impossible to force someone to maintain something through tooling
19:14:38FromGitter<krux02> @zacharycarter A lot of people don't understand that.
19:14:40FromGitter<zacharycarter> I think you're describing something like yeoman maybe - something to like bootstrap a project with sensible defaults
19:14:50FromGitter<zacharycarter> @krux02 agreed
19:15:00FromDiscord<claude> @Bennyelg because when you do `addr(s)` you get the adress of the variable not the reference. you will get the same value if you do `addr(s[])` and `addr(o[])`
19:15:30FromGitter<Bennyelg> oh so there are 2 address?
19:15:35FromGitter<Bennyelg> I never heard of that before :|
19:16:06FromDiscord<claude> you can change ref objects to `let` and still mutate them
19:16:27FromDiscord<claude> in the case of `let`, addr(s) won't work
19:17:50FromGitter<Bennyelg> now I c , thanks!
19:20:15vantagezach dom96 well then could it be possible to mark specific versions as working or tested, i think a large part is that most of the package (that ive tried) lacks tests so its difficult to know if the package is broken or my setup is wrong. also a lack of readmes
19:21:10dom96Sure, a project that allows people to do this would be nice, but it's outside the scope of Nimble's responsibility.
19:21:28FromGitter<zacharycarter> I mean - I think this is like totally up to the maintainer and how much time they want to put into it
19:21:52FromGitter<zacharycarter> things like badges, etc... that display status on various SCMs I think are totally sufficient if the maintainer chooses to leverage them and CI solutions
19:22:10FromGitter<zacharycarter> I think tooling already exists for this issue - I just think you're trying to solve a problem that isn't solvable
19:22:16dom96Something similar that could be created is something that goes through all Nimble packages and checks which are depended on by most packages. That could be a useful metric for popularity/reliability.
19:22:16FromGitter<krux02> do any of you people know the editor 4coder?
19:22:26FromGitter<krux02> I know it from the Handmade Hero stream.
19:22:33FromGitter<zacharycarter> nimble.directory could be expanded to be more like npm
19:22:41FromGitter<zacharycarter> @krux02 I've heard of it / seen it
19:22:45FromGitter<zacharycarter> never used it
19:22:50FromGitter<krux02> And it has only a native interface for customization
19:22:51Araqbennyelg: a ref object's "ID" is cast[int](theRef), not cast[int](addr theRef), typical mistake
19:23:04FromGitter<krux02> that is a good idea istead of an editor that is Nim Only.
19:23:18FromGitter<krux02> who was it here who had the font rendering engine written?
19:23:20FromGitter<zacharycarter> NOVA Nim meetup tomorrow - it's happening folks!
19:23:32FromGitter<zacharycarter> font rendering engine?
19:23:32FromGitter<krux02> NOVA?
19:23:38FromGitter<zacharycarter> Northern Virginia
19:23:46FromGitter<zacharycarter> it's just me and Varriount
19:23:53Araqkrux02: blasphemy -- a Nim only editor is cool. we only need more Nim users for this to be viable.
19:24:04FromGitter<zacharycarter> but we're going to solve world peace with Nim
19:24:05FromGitter<zacharycarter> or something
19:24:30FromGitter<krux02> Araq: I am sticking with emacs, even though I now have a love/hate relationship with it now.
19:24:37*Joe___ joined #nim
19:24:55FromGitter<krux02> I wish vscode would not have fucked up keyboard support.
19:25:02FromGitter<Bennyelg> ```code paste, see link``` ⏎ ⏎ and now, why I can see the address of an object p? since it hasnt allocated yet? [https://gitter.im/nim-lang/Nim?at=5adb900e1130fe3d36005b9d]
19:25:05Araqhuhm Nothern Virginia. sounds dirty.
19:26:17FromDiscord<claude> non-ref objects are immutable, you need `var` to mutate them
19:27:06FromDiscord<claude> and since non-ref objects don't point to anything `p[]` isn't valid
19:27:33FromGitter<Bennyelg> yep I notice thanks.
19:27:55FromGitter<zacharycarter> so does Araq
19:27:58FromGitter<zacharycarter> but I'm not saying anything
19:28:04FromGitter<zacharycarter> :P
19:28:24FromGitter<zacharycarter> https://mholt.github.io/json-to-go/ - would something like this for Nim be useful too?
19:28:35*jjido joined #nim
19:29:12FromGitter<krux02> well when it is useful to you and you concider yourself a member of the Nim community, then yes.
19:29:15Joe___Installed NIm on my Antergos 64 and want to experiment with IUP
19:29:39Joe___I compiled an example program but when I try to run it I get this message
19:29:44FromGitter<krux02> Otherwise, it is probably just a neat toy.
19:29:54Joe___could not load: libiup(|3.0|2.7|2.6|2.5|2.4).so(|.1)
19:30:10dom96zacharycarter: sure, but it's important to emphasise that the `to` macro is not the only way to parse JSON in Nim.
19:30:23FromGitter<zacharycarter> but I mean - we are part of the https://www.youtube.com/watch?v=A9l6yTAUhd8
19:30:35FromGitter<zacharycarter> dirty south
19:30:42dom96Joe___: Did you install libiup?
19:30:51FromGitter<krux02> what is in that video, I blocked youtube for productivity reasons
19:31:00Joe___I'm not sure which IUP version to download. I gather it's one of there https://sourceforge.net/projects/iup/files/3.0/Linux%20Libraries/
19:31:09Joe___But no idea which one
19:31:39FromGitter<zacharycarter> a bunch of hip hop american rap videos from hip hop artists that represent the southern eastern coast of northern america
19:31:41FromGitter<zacharycarter> aka don't watch it
19:32:03FromGitter<zacharycarter> this goes back to araq's comment about our state
19:32:07FromGitter<zacharycarter> and it being dirtyu
19:32:21Joe___@dom96 you mean I should install the version from AUR
19:33:12dom96Joe___: yes, or via the official antergos repos (if those exist)
19:33:24dom96I'm not familiar with Antergos
19:34:02Araqvirgin, vagina, virginia...
19:34:16AraqI bet nobody noticed this before :P
19:34:19FromGitter<zacharycarter> lol
19:34:21FromGitter<zacharycarter> I was about to say
19:35:07FromGitter<zacharycarter> dom96: did you by any chance take a glance at that snippet I posted earlier in the day regarding the playground and oom errors I was getting?
19:35:22FromGitter<zacharycarter> and if you don't have the time to talk bout it now - no worries - I can ping you about it later
19:35:27dom96zacharycarter: yes, but I don't see how async could cause that.
19:35:44dom96So you need to give more info
19:35:44FromGitter<zacharycarter> yeah... I'm not sure if it's related to async or what - it's weird
19:35:48FromGitter<zacharycarter> okay
19:36:05FromGitter<zacharycarter> I'll try to produce some different gists and dumps and make sure I'm working with the latest version and everything
19:36:41FromGitter<zacharycarter> thanks for taking a look - I'll spend some time collecting data and let you know when I think I have something
19:38:20AraqJoe___: I never got libiup to build on Linux back then
19:38:40Araqtry the newer ui library?
19:39:25*nsf quit (Quit: WeeChat 2.0.1)
19:44:05*Joe___ quit (Ping timeout: 260 seconds)
19:44:32vantagelibui didnt build for me either :(
19:52:58*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:55:59Araqwhy not? it links statically
19:59:29FromGitter<ephja> undefined references?
19:59:50dom96Is this you? https://github.com/nim-lang/ui/issues/11#issuecomment-383135887
20:01:15FromGitter<ephja> failed on windows for me before. can't remember if it was before or after that was closed. ill check later
20:02:57*rokups quit (Quit: Connection closed for inactivity)
20:09:35vantagelibui compiled then failed at the linking stage
20:09:58vantagebut there might be some instructions ive overlooked
20:11:19*ieatnerds quit (Quit: Leaving)
20:14:33*BitPuffin quit (Remote host closed the connection)
20:21:31*yglukhov joined #nim
20:24:12*Vantage_ joined #nim
20:31:29*miran quit (Ping timeout: 248 seconds)
20:40:07FromGitter<tim-st> when I have the choice between map 30k int items constant using a table or using a const int array but then with 1_000_000 entries (970k unused) but direct lookup, what would be better?