<< 24-10-2020 >>

00:02:46*kinkinkijkin quit (Quit: kinkinkijkin)
00:03:11*kinkinkijkin joined #nim
00:33:56*shuji joined #nim
00:36:47FromGitter<jrfondren> random compiler benchmark: https://github.com/jrfondren/chrestomathy/tree/master/pwcheck . it was a little bit funny how the Rust and D versions immediately segfaulted after I generated a bunch of dummy (erroneously-lengthed) hashes for them, otherwise nothing surprising
00:37:38Yardanicoare you taking RSS of the C compiler into the account?
00:37:42Yardanicofor nim
00:37:53FromGitter<jrfondren> yeah, it's /usr/bin/time for the entire run of the process
00:38:44FromGitter<jrfondren> and I checked in some other ways, it's consistent
00:38:48Yardanicook, nice
00:41:29ForumUpdaterBotNew thread by 19: Handmade hero in nim ( warning: noob), see https://forum.nim-lang.org/t/6980
00:49:31FromGitter<sealmove> Did you do gc:none?
00:49:50*clemens3 quit (Ping timeout: 256 seconds)
00:50:30FromGitter<jrfondren> no, default flags. this is the 'nimble build' MaxRSS, not that of running the program. all three programs take <5M when running
00:53:18*xet7 joined #nim
00:56:23*clemens3 joined #nim
00:57:27FromDiscord<William_CTO> can someone link me the github for the irc bot here?
01:00:15Yardanico!repo ircord
01:00:16disbothttps://github.com/Yardanico/ircord -- 9ircord: 11Discord <-> IRC bridge in Nim 15 11โญ 1๐Ÿด
01:00:20Yardanicoyou can ask me questions about it if you want
01:00:22Yardanico!repo nimbot
01:00:23disbothttps://github.com/nim-lang/nimbot -- 9nimbot: 11The friendly, slightly sentient, Nim IRC bot. 15 8โญ 3๐Ÿด 7& 3 more...
01:00:26Yardanicoif you meant nimbot
01:00:45Yardanico@William_CTO ^
01:01:47FromDiscord<William_CTO> sure deal
01:04:58FromDiscord<William_CTO> Yardanico do you think dimscord is up for the task of a bot in 100+ servers?
01:05:20Yardanicowell, you know that it's a Discord<->IRC bot right?
01:05:33FromDiscord<William_CTO> Correct
01:05:47FromDiscord<William_CTO> I just wanted to see dimscord in a project
01:06:11Yardanicoi'm not sure if a single instance can handle that many servers, I've never tried more than 1
01:06:22Yardanicoand right it only can support 1 discord server
01:06:44Yardanicoi don't think that it'll be hard to add support for multiple servers to ircord and its config, but I've never tried it really
01:06:51Yardanicoalso it's not "hot config reload" ;)
01:07:16Yardanicoso if you need to map 100 different IRC channels to 100 different Discord channels (each channel being on a separate server), you'll still need 100 different config sections
01:07:30Yardanicoright now the mapping is irc channel/discord channel id/discord webhook
01:07:44Yardanicowhy do you want to bridge so many discord servers with irc btw?
01:07:53Yardanicoand of course ircord does bridging on a per-channel basis
01:08:11FromDiscord<William_CTO> I'm not doing that. I've written a translate bot with discord.py and am considering moving it to nim
01:08:28Yardanicoah, for dimscord you should ask @krisppurg first :)
01:08:36FromDiscord<Yardanico> he's the creator of dimscord
01:08:39FromDiscord<William_CTO> Ah sorry for misunderstanding
01:08:40FromDiscord<Yardanico> lemme link his discord server
01:09:04FromDiscord<Yardanico> https://discord.gg/bw4mHUV
01:10:23FromDiscord<William_CTO> thanks
01:15:13FromDiscord<shashlick> Would be cool if we had one server for such channels - I'd move my nimterop gitter channel
01:15:28FromDiscord<Yardanico> wdym?
01:24:32*apahl quit (Ping timeout: 260 seconds)
01:25:14*mbomba quit (Quit: WeeChat 2.9)
01:26:27*apahl joined #nim
01:32:00*krux02 quit (Remote host closed the connection)
01:34:54Yardaniconim devel docset https://i.imgur.com/2dQyACq.png (includes stdlib, compiler, fusion)
01:34:59Yardanicofunny how there are only 6 public converters :)
01:35:16Yardanicoonly in httpcore and dom
01:37:00*theelous3 quit (Read error: Connection reset by peer)
01:46:41*ForumUpdaterBot quit (Remote host closed the connection)
01:46:54*ForumUpdaterBot joined #nim
02:08:02FromDiscord<ITR> Is there any way I can get better output than "execution of external program failed"? Like which line the program crashes on
02:08:19disruptekdon't run your program inside another problem.
02:08:22disrupteker, program.
02:08:34disruptekcompile your program with --stackTrace:on.
02:10:23FromDiscord<ITR> I tried `nim c --stackTrace:on -r ./test.nim` but I'm still only getting that error. Trying to run it with --debugger:on or --debugger:native gives the same result
02:12:28FromDiscord<Avatarfighter> ELLO everyone
02:12:35FromDiscord<Avatarfighter> how are you all doing
02:12:52FromDiscord<ElegantBeef> Fine, finding type bugs in the nim VM ๐Ÿ˜„
02:12:53disrupteksup fighter.
02:13:01FromDiscord<Avatarfighter> what's good disruptek
02:13:10FromDiscord<Avatarfighter> @ElegantBeef what type of bugs ๐Ÿ˜›
02:13:31FromDiscord<ElegantBeef> The nimVM cannot generate unnamed tuples in generics apparently
02:13:36FromDiscord<Avatarfighter> oh
02:13:42FromDiscord<Avatarfighter> you really want unnamed tuples lmao
02:14:04FromDiscord<ElegantBeef> I mean they're a datatype so i sorta have to support them
02:14:10FromDiscord<Avatarfighter> yeahhh
02:14:27FromDiscord<Avatarfighter> just segfault whenever someone tries to use them /s
02:14:33FromDiscord<ElegantBeef> The entire thing is to make it seemless, not sorta seemless
02:18:45*arecacea1 quit (Remote host closed the connection)
02:19:38*arecacea1 joined #nim
02:20:49*johnzorn joined #nim
02:22:55*apahl quit (Ping timeout: 272 seconds)
02:23:08johnzornWould it be possible to compile a nim program so that the nim "vm" is somehow embedded that way the programs configuration could be written in nim and even reloaded?
02:23:26disrupteksure.
02:24:40*apahl joined #nim
02:24:44johnzornIs that how nimble is able to use a nim subset for it's configuration?
02:24:53disruptekit is.
02:26:54disruptek"Efficient, expressive, elegant. Rediscover programming without compromise."
02:27:26FromDiscord<Avatarfighter> disruptek what is new
02:27:47disruptekworking on new landing page copy.
02:28:04disruptekpushed some IC code you can look at.
02:28:10FromDiscord<Avatarfighter> yay
02:28:11disruptektightened up mangling.
02:28:33FromDiscord<Avatarfighter> I've spent time just reading how the internals work so I should hopefully be able to edit it without breaking it all!
02:28:43johnzornCool, I do mostly DevOpsy stuff and nim seems like a much better alternative for many tasks that would be done in python, golang and even bash...
02:29:53FromDiscord<Avatarfighter> Devops sounds pretty exciting
02:29:55disruptekas an interpreted language, nimscript leaves something to be desigred.
02:30:17disruptekbut, if you don't mind half a second to compile the code, i'd say it easily replaces those languages.
02:30:30FromDiscord<Avatarfighter> half a second is too long sMh
02:32:00Yardanicojust used recursive imports in nimeventer and i feel good
02:32:17*muffindrake quit (Ping timeout: 246 seconds)
02:34:33*muffindrake joined #nim
02:34:48Yardanicowhen you change the project structure https://i.imgur.com/oBko6V3.png
02:36:11Yardanicolets hope my nimeventer doesn't go rogue and starts spamming 1000 times a second
02:36:48*ForumUpdaterBot quit (Remote host closed the connection)
02:37:27*ForumUpdaterBot joined #nim
02:40:55FromDiscord<ElegantBeef> Johnzorn that's what i'm currently doing
02:41:42FromDiscord<ElegantBeef> This video has been spammed a lot but it's an "in process" vidja https://streamable.com/90r58l
02:41:49*ForumUpdaterBot quit (Remote host closed the connection)
02:41:57*ForumUpdaterBot joined #nim
02:43:11Yardaniconow time to wait for someone to post something on the forum/reddit/so
02:46:04Yardanico@ElegantBeef thanks it works
02:46:21FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/769391299006300210/unknown.png
02:46:27FromDiscord<ElegantBeef> No problem always happy to be a visible fool
02:49:28Yardanico!status
02:49:30FromDiscordUptime - 3 days, 7 hours, and 12 minutes
02:50:08FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/769392253332357120/unknown.png
02:50:15FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/769392280116265000/unknown.png
02:50:36FromDiscord<Avatarfighter> time to make a FAT circular import
02:50:38FromDiscord<Yardanico> the trick is to put import statements for the modules which use the current module after the symbols they need
02:50:57FromDiscord<Yardanico> https://github.com/Yardanico/nimeventer/blob/master/src/nimeventer.nim#L83
02:51:16FromDiscord<Yardanico> my submodules only need post and catchErr (and two globals) from above
02:51:22FromDiscord<Yardanico> (edit) "my submodules only need post and catchErr (and two globals) from above ... " added "the import statement"
02:51:48FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/769392670916345856/unknown.png
02:52:13FromGitter<gogolxdong> Is there a way to define object type with default value field?
02:52:25disrupteknot yet.
02:53:10FromDiscord<ElegantBeef> My constructor macro can generate constructors and force default values ๐Ÿ˜„
02:53:26FromDiscord<ElegantBeef> <https://github.com/beef331/constructor> To save you from manually making constructors if you want it
02:54:40johnzornElegantBeef, so that is nim or nimscript?
02:54:46FromDiscord<ElegantBeef> That's nimscript
02:54:52FromDiscord<ElegantBeef> Which is why it reruns no problem
02:55:55FromDiscord<ElegantBeef> All it takes is `{.exportToScript.}` and then hypothetically your proc is exposed to nimscript and can be invoked there, the hypothetically is there due to nim's VM having some bugs that cause issues atm
02:56:17FromDiscord<ElegantBeef> Unnamed tuples dont work for instance
02:57:14johnzornSo it would be possible to create a standalone binary that can be connected to after it starts running and code hotplugged (like common lisp)?
02:57:32Yardanicodid you check out enu?
02:57:36FromDiscord<ElegantBeef> I mean that's what's done there, i build the nico program which has a simple main loop and invokes nimscript
02:57:40Yardanicohttps://www.youtube.com/watch?v=3l6tsKM1cY8
02:57:49FromDiscord<ElegantBeef> https://github.com/beef331/nicoscript/blob/master/src/main.nim
02:57:55FromDiscord<ElegantBeef> The entirety of that program
02:57:56Yardanicoand then https://www.youtube.com/watch?v=AW0PT9j976s
02:58:01Yardanicoand beef's program too
02:58:17FromDiscord<ElegantBeef> Yea ENU does the same, but enu isnt attempting to abstract it away in a nice bundle afaik
03:00:22FromGitter<gogolxdong> A type section with all ref object hints me invalid indentation, it works when they are {.bycopy.} object
03:01:05FromDiscord<Yardanico> ?
03:01:07FromDiscord<Yardanico> can you show it?
03:01:58FromGitter<gogolxdong> https://play.nim-lang.org/#ix=2BNl
03:02:21*oculuxe joined #nim
03:02:22*oculux quit (Ping timeout: 256 seconds)
03:02:26FromDiscord<Yardanico> " AVOptionUnion {.bycopy.}= object {.union.}"
03:02:27FromGitter<gogolxdong> invalid indentation from where the first ref object begins
03:02:31FromDiscord<Yardanico> that's not how you do it
03:02:48FromDiscord<Yardanico> also "VOption= ref object"
03:02:51FromDiscord<Yardanico> wrong place for
03:03:01FromDiscord<Yardanico> ok lemme share the correct version
03:03:18FromDiscord<Yardanico> https://play.nim-lang.org/#ix=2BNm
03:03:21FromDiscord<Yardanico> spacing matters in some cases
03:03:40Yardanico*= is parsed as one token *= and not as two tokens * and =
03:04:09Yardanicoand generally proper spacing will make your code look nicer :)
03:05:10FromGitter<gogolxdong> get it , thanks!
03:11:37*astronavt quit (Quit: Leaving)
03:12:42*mbomba joined #nim
03:23:43*muffindrake quit (Ping timeout: 272 seconds)
03:25:47*muffindrake joined #nim
03:29:32*TomDotTom quit (Ping timeout: 272 seconds)
03:52:50*shuji quit (Remote host closed the connection)
04:03:07FromDiscord<flywind> What's wrong with this? https://play.nim-lang.org/#ix=2BNz
04:05:00leorize[m]1@flywind never directly modify the dom
04:05:29leorize[m]1karax will bail the moment an undeclared foreign agent modify the dom
04:05:52leorize[m]1with the vdom what you would want to do is to render a new node replacing the previous one
04:05:58leorize[m]1a kind of functional programming i suppose
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:34*supakeen joined #nim
04:06:34FromDiscord<flywind> https://svelte.dev/examples#7guis-counter
04:06:44Yardanicoyes
04:07:13FromDiscord<flywind> I want to implement something similar like this, I don't how to achieve that with `karax`.
04:07:44FromDiscord<MiniApple> Hmm
04:07:55leorize[m]1I can whip up one for you real quick, wait
04:07:58FromDiscord<MiniApple> Is there journey for nim
04:08:07FromDiscord<MiniApple> (edit) "journey" => "jquery"
04:09:35Yardanicowdym "journey"?
04:09:48Yardanicoyou can check difference resources on https://nim-lang.org/learn.html
04:09:51Yardanicofor learning
04:13:42Yardanicoah jquery
04:13:50Yardanicowell if you compile nim to js you can use jquery just fine
04:13:55Yardanicosee e.g. https://nim-lang.org/docs/jsffi.html
04:18:59*leorize_ joined #nim
04:19:12leorize_flywind: this is sorta how you do it: https://play.nim-lang.org/#ix=2BNB
04:19:25FromDiscord<flywind> Thanks!
04:20:08FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2BNC
04:20:11FromDiscord<flywind> Is this right?
04:22:57leorize_probably :P
04:23:38leorize_the thing with karax is that it tries to be stateless
04:23:41leorize_but the dom is stateful
04:23:51leorize_so there might be some interaction bugs if you're not careful
04:24:21FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2BND
04:24:25FromDiscord<flywind> What about this?
04:24:46leorize_that would error out
04:24:49leorize_never modify the dom
04:25:14leorize_if you really want to then karax's native node can be used, but that one is undocumented
04:25:45FromDiscord<flywind> @flywind It works for me. ๐Ÿ˜ฑ
04:26:08leorize_let's just say that I don't recommend it
04:27:29FromDiscord<flywind> Compared to other popular frontend frameworks, Is karax flexible enough?
04:28:08leorize_for this you'll have to consult @dom96 and @alehander42
04:28:21FromDiscord<flywind> Yea, thanks
04:28:25leorize_I don't do frontend a lot so I can't tell
04:28:42leorize_so far it can do whatever I throw at it though, so I'm happy
04:29:27FromDiscord<flywind> I want do UI/admin libraries based on `karax`. But have no ideas.
04:29:31FromDiscord<flywind> (edit) "I want ... do" added "to"
04:29:57leorize_what is ui/admin?
04:30:04leorize_like a database controller?
04:30:23FromDiscord<flywind> Like this https://github.com/ant-design/ant-design
04:30:47FromDiscord<flywind> and https://github.com/PanJiaChen/vue-element-admin
04:30:56*waleee-cl quit (Quit: Connection closed for inactivity)
04:31:42leorize_definitely doable with karax, you will need to consult the people behind karax though :P
04:31:44leorize_basically Araq
04:32:14leorize_so karax got this VComponent system which is similar to React's components I believe?
04:33:06FromDiscord<flywind> Maybe, I'm still learning JS stuff.
04:33:20leorize_but Araq said you should not use it and instead interact with the dom directly
04:33:46leorize_also check out the forum, someone posted a svelte-inspired library a while ago
04:35:13FromDiscord<flywind> I will check it.
04:39:03*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:39:10*njoseph joined #nim
04:51:16FromDiscord<flywind> I find `getVNodeById` and will use it instead.
04:51:20*rockcavera joined #nim
04:52:00FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2BNG
04:52:10FromDiscord<flywind> It doesn't cause problem in browser.
04:54:55FromDiscord<nikki> honestly, incremental-dom is pretty good
04:55:04FromDiscord<nikki> http://google.github.io/incremental-dom/
04:55:13leorize_!repos dom
04:55:13FromDiscord<nikki> afaict doesn't create much JS garbage
04:55:14disbothttps://github.com/phildenhoff/domainator-nim -- 9domainator-nim: 11It's a domain hacking tool, but written in Nim. 15 0โญ 0๐Ÿด
04:55:14disbothttps://github.com/khooj/nim-simple-dom -- 9nim-simple-dom: 11simple module that allow to manipulate html with DOM 15 0โญ 0๐Ÿด
04:55:14disbothttps://github.com/treeform/taggy -- 9taggy: 11HTML DOM generator for Nim's JS mode. 15 1โญ 0๐Ÿด 7& 1 more...
04:55:31leorize_iirc someone did wrap that incremental dom thingy
04:55:41FromDiscord<nikki> and all you need is elemOpenStart('div'), attr('blah', val); ...; elemOpenEnd(); ... children ... elemClose();
04:55:41FromDiscord<nikki> nice
04:56:35FromDiscord<nikki> i was messing around w/ wrapping it in a thin yet useful wrapper in zig: https://github.com/nikki93/zig-wasm-test/blob/6633810ea26b54ff1fb3733e6b29059c6c3dc22a/main.zig#L96-L114
04:56:49FromDiscord<nikki> but actually mainly have used it from c++
04:57:30FromDiscord<nikki> like this: https://gist.github.com/nikki93/003d19e263931edf28ff5d0ebb1ec585#file-main-cc-L491-L502
04:57:48FromDiscord<nikki> but the main thing honestly is about app state mgmt for your domain logic itself
04:58:02FromDiscord<nikki> like in this case i was just kinda immediate-mode-ing it cuz it was for editors for video games
04:58:56FromDiscord<nikki> i just thought it was interesting that incremental-dom felt analogous to old school fixed-function opengl api; or maybe postscript drawing apis (thus canvas) etc.
04:59:05FromDiscord<nikki> (the push / pop paradigm)
04:59:18leorize_https://mildred.github.io/nclearseam/
04:59:52FromDiscord<nikki> v interestnig ๐Ÿ˜ฎ
04:59:55FromDiscord<nikki> will have to dig
05:00:08FromDiscord<nikki> i was thinking to just try karax
05:00:14FromDiscord<ElegantBeef> Nah V isnt interesting ๐Ÿ˜›
05:00:21FromDiscord<nikki> good one
05:00:30FromDiscord<ElegantBeef> It really wasnt
05:00:51FromDiscord<nikki> i'm really interested in trying a mix of nim -> C -> WASM + nim -> JS -> DOM in the browser
05:01:10FromDiscord<nikki> so it's kinda a ui thread and a simulation+graphics / other compute thread
05:04:50*vicfred quit (Quit: Leaving)
05:07:57disruptekthat sounds... very painful.
05:15:27FromDiscord<nikki> is that a good thing
05:16:15FromDiscord<Avatarfighter> i wonder how calling methods from nim wasm via nim generated js would look like
05:17:11FromDiscord<nikki> basically the stuff you define as 'exported C symbols' are visible from the webassembly module you instantiate from js
05:17:20FromDiscord<Avatarfighter> oh thats nice
05:17:25FromDiscord<nikki> it's actually introspectible -- you can eg. iterate over the exports
05:17:34FromDiscord<Avatarfighter> super cool
05:19:05FromDiscord<nikki> but yeah those are available as js functions
05:19:10FromDiscord<nikki> the main thing is the boundary only understands integers
05:19:20FromDiscord<nikki> the way you eg. talk about "strings" is you have a shared memory, and it's pointers into that memory
05:19:27disruptekthe web just makes me sleepy. it's just one shitty interface after another.
05:19:39FromDiscord<nikki> the shared memory looks like the C address space from something you compiled to wasm; the other side is in JS just functions you call
05:19:42FromDiscord<nikki> yeah i agree with that re: the web
05:20:19FromDiscord<nikki> the main thing IMO is; if you want to make some native media application, probably still helps to have a web player for it regardless
05:27:02*leorize_ is now known as leorize
05:30:38disruptekhave you tried nlvm?
05:34:35Yardanicowhat for? you can use clang's wasm32 target even with the c backend
05:34:56PrestigeIs there a way to write a proc that requires a particular object variant, at compile time?
05:35:02Yardanicono
05:35:17*mbomba quit (Quit: WeeChat 2.9)
05:35:26PrestigeDang, was hoping there was some weird black magic macro or something.
05:35:30Prestigeoh well
05:35:37FromDiscord<ElegantBeef> you could make a template that does `if T.kind != x: return`
05:36:08Yardanicoyes but that's not a compile-time check
05:36:11Yardanicoit'll check at runtime
05:36:29FromDiscord<ElegantBeef> Yea i know, i was just saying
05:36:37PrestigeAll good
05:37:05PrestigeI think I'm trying to do something with variants that would be better suited for inheritance
06:05:50*solitudesf joined #nim
06:13:22*mbomba joined #nim
06:20:00*mbomba quit (Quit: WeeChat 2.9)
06:57:26PrestigeI didn't expect `using` to work with generics, interesting stuff
07:01:22PrestigeOh, it only sort of does.
07:24:45FromDiscord<nikki> dang, nim's sink inference is rly good
07:25:06FromDiscord<nikki> i was checking out the codegen for option's `some` constructor yday and it does a copy, and was thinking yeah the `val` param should be annotated with `sink`
07:25:11Yardanicoit's disabled for your code by default
07:25:16Yardanicoonly enabled for the stdlib
07:25:18FromDiscord<nikki> but yeah the sink inference catches it, nice. guess it may count as a simple case but, yeah
07:25:26Yardanicothat's not "sink inference" :)
07:25:37Yardanicosink inference is when the compiler automatically inserts sink annotations where possible
07:25:52Yardanicoit infers that
07:26:02FromDiscord<nikki> yeah, like the `val: T` parameter in option's `some` constructor
07:26:11FromDiscord<nikki> `Option[T]`'s
07:26:36FromDiscord<nikki> tbf, i tried it on my own version of the option code; but will check that it does the same on the actual stdlib one now
07:26:42Yardanicoit's enabled for stdlib but disabled for user code, you can enable it for your code as well with --sinkInference:on
07:26:48Yardanicobut it might cause incompatible types for closure procedures
07:27:06Yardanicofor that there's {.nosinks.}
07:28:10FromDiscord<nikki> so; all of this is cool
07:28:17FromDiscord<nikki> but the most interesting part to me isn't how it's enabled or disable
07:28:18FromDiscord<nikki> (edit) "disable" => "disabled"
07:29:18*gmaggior joined #nim
07:30:04FromDiscord<nikki> it was seeing it happen in the c output ๐Ÿ˜… was just like "oh nice"
07:30:32FromDiscord<nikki> it seems like the `some` constructor does gen a copy tho
07:30:36FromDiscord<nikki> i'll check again
07:30:39Yardanicoare you compiling with arc/orc?
07:30:45FromDiscord<nikki> yeah for sure
07:31:05FromDiscord<nikki> so
07:31:07FromDiscord<nikki> `nim c --panics:on --gc:arc -d:danger`
07:31:08FromDiscord<nikki> is what i have
07:31:34FromDiscord<nikki> i thought you were saying sink inference is on in stdlib; which would mean that the `val: T` param would be inferred to sink
07:32:00Yardanico" i thought you were saying sink inference is on in stdlib" yes it is
07:32:00FromDiscord<nikki> https://media.discordapp.net/attachments/371759389889003532/769463187204472853/unknown.png
07:32:08FromDiscord<nikki> so this is, in my own code
07:32:09FromDiscord<nikki> not stdlib
07:32:30FromDiscord<nikki> but, yeah sink inference catches that -- if i turn on inference, yup, that becomes an eqsink
07:32:51FromDiscord<nikki> i remember the equivalent in stdlib not having an eqsink by default but i'll check
07:33:46FromDiscord<nikki> yeah some does eqcopy
07:34:09FromDiscord<nikki> oh and, if i add --sinkInference:on, it does eqsink
07:34:20FromDiscord<nikki> maybe it's because it's inlined? not sure
07:34:54FromDiscord<nikki> (proc in stdlib is marked `{.inline.}`, the defn appears in the .c for my module, not for an stdlib one)
07:46:53FromDiscord<ElegantBeef> Hmm should i make a forum post to suggest that "This (Determined amount of time) with Nim", where community members submit small like 1 paragraph of what they're doing with links or images if they want to share, that then gets published to the website every X amount of time?
07:50:43FromDiscord<Vindaar> If that would result in an automated stream of people sharing what they do, seems like a fun idea. Especially if it's ok to share random fun things (and doesn't force you to write up something cohesive etc)
07:50:50*tefter joined #nim
07:51:16FromDiscord<Vindaar> like "look I wrote this fun macro, which does x. Super neat, see:". I would participate ๐Ÿ˜…
07:51:33FromDiscord<ElegantBeef> Yea i mean a sentence or two is fine imo
07:51:41FromDiscord<ElegantBeef> Nothing more than a paragraph though
07:51:53FromDiscord<Vindaar> I like it
07:52:01FromDiscord<ElegantBeef> Mostly inspired by this forum post https://forum.nim-lang.org/t/6971
07:52:19FromDiscord<ElegantBeef> It seems rather popular with a many people so seems it's a good idea
07:52:36FromDiscord<Vindaar> yep, I figured
07:54:42FromDiscord<Vindaar> In that thread I personally didn't feel like posting so far, cause... I don't know. Felt like plugging my own work, when I feel like the people who care about what I do probably know anyway? I don't know, I guess I'm just not someone who wants to look like I'm advertising my work more than it's worth
07:55:27FromDiscord<ElegantBeef> Could probably make a `nim-lang/tmwn` repo so people can just add their work, then when it's supposed to be posted someone can post it
07:55:52FromDiscord<ElegantBeef> Or automate the posting since someone has to merge PRs
07:56:25FromDiscord<Vindaar> Best would be to have it automated I'd say. Although I see how that would complicate things in the beginning. Main thing I wonder about is where it should be shared?
07:56:41FromDiscord<Vindaar> A special page on the website + twitter or something?
07:56:59*Vladar joined #nim
07:57:31FromDiscord<ElegantBeef> It could just be a blog post on nim-lang website if that's what you're asking
07:57:37*superbia joined #nim
07:59:07FromDiscord<Vindaar> Well, I suppose. But I think if such a thing were to be used actively than either the posts about it would get so long that people don't read it or if they are posted often they drown out normal posts
07:59:22FromDiscord<ElegantBeef> I mean it'd post only every month
07:59:29FromDiscord<ElegantBeef> Or whatever the determined time was
08:00:00FromDiscord<impbox> just came across `out T` in the manual, but I can't find where it explains what `out T` means
08:00:09FromDiscord<ElegantBeef> The repo would be used like a queue, submit what you're working on then in X amount of time it's posted in on a blog post
08:00:29FromDiscord<ElegantBeef> That way it's not spammy but also allows people to see what others are doing
08:01:01FromDiscord<ElegantBeef> I didnt even know out was a keyword in nim ๐Ÿ˜„
08:01:05FromDiscord<impbox> same
08:01:10FromDiscord<impbox> i'm guessing it's new
08:01:18FromDiscord<ElegantBeef> You sure you werent looking at the C# docs ๐Ÿ˜›
08:01:28FromDiscord<Vindaar> Guess that might work, yeah. One could think about tweeting out each added submission when it's done in addition maybe?โ†ตWould be important to have it as easy to submit as possible though. Because otherwise one enters the territory of not bothering to post
08:01:41FromDiscord<impbox> related to https://github.com/nim-lang/RFCs/issues/62 i'm guessing
08:01:43disbotโžฅ [RFC] `out` params: allows to call in-place `proc` with rvalues ; snippet at 12https://play.nim-lang.org/#ix=2BOa
08:02:58FromDiscord<ElegantBeef> Interesting
08:03:09FromDiscord<impbox> though it seems like that didn't go through
08:03:12FromDiscord<impbox> so i'm confused
08:04:52FromDiscord<impbox> sent a code paste, see https://play.nim-lang.org/#ix=2BOb
08:05:01FromDiscord<ElegantBeef> interesting
08:06:21FromDiscord<ElegantBeef> Seems the all out does is cause a error ๐Ÿ˜„
08:06:40FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2BOc
08:06:52FromDiscord<ElegantBeef> Or is it only with generics? :d
08:07:16FromDiscord<impbox> nfi
08:09:37FromDiscord<impbox> mysterious feature is mysterious
08:10:04FromDiscord<ElegantBeef> Wonder if it was an accidental PR, that got through, considering the fact it's very weird
08:10:12FromDiscord<ElegantBeef> I also tried `out a = 100` and same error
08:12:03FromDiscord<impbox> ahh well, i probably don't need to use it, was just curious since i spotted it in the manual
08:16:04FromDiscord<impbox> whoa, i totally never knew nim had named arguments o_O
08:16:22FromDiscord<ElegantBeef> Really?
08:16:34FromDiscord<impbox> yeah, wow, wonder how i missed that
08:16:36FromDiscord<ElegantBeef> You have all those optional arguements and never knew, feels bad
08:16:42FromDiscord<impbox> yeah
08:17:10FromDiscord<impbox> i was just thinking "i wish nim had named arguments..."
08:17:15FromDiscord<ElegantBeef> I've reread the manual like 3-5 times
08:17:47FromDiscord<ElegantBeef> I dont remember it all 100% but some things get recalled on the fuzzy edges
08:18:05FromDiscord<ElegantBeef> Which i then scramble to find and then wakeup in my bed with a cold sweat ๐Ÿ˜›
08:18:41FromDiscord<Vindaar> you didn't know Nim had named arguments? wow, that's crazy indeed. I had the opposite realization a few weeks ago. Had to help a colleague with some C++ and got majorly confused when I couldn't resolve an overload ambiguity by passing an argument with its name...
08:19:09FromDiscord<ElegantBeef> I rarely use named arguments, but they have their usage
08:19:30FromDiscord<Vindaar> it really depends on the kind of code one writes / uses imo
08:19:48FromDiscord<ElegantBeef> I know swift programmers use them everywhere and it makes their code, very ehhh to me
08:19:50FromDiscord<Vindaar> provide an API with many options for the user? named arguments are a godsend
08:19:51FromDiscord<impbox> it's not something i've often wanted to use, but there's a few times it would have been great
08:20:24FromDiscord<ElegantBeef> looks at your spr procs ๐Ÿ˜›
08:20:33FromDiscord<impbox> haha exactly what i'm looking at
08:21:41FromDiscord<ElegantBeef> We need some proc call introspection from the compiler "Hey hackerman, you know you can just do `procName(a,b,namedArg = val)`"
08:23:08FromDiscord<impbox> time for nico 2.0 API =)
08:23:42FromDiscord<Vindaar> the C++ case I had to deal with: the `Fill` here taking `const char, Double_t` and the one two down taking `Double_t, Double_t`: https://root.cern.ch/doc/master/classTH1.html#a894833e678f283b6849e777c635c059dโ†ตstupid g++ wasn't able to figure out that my colleague obv. wanted the latter proc, cause he was _literally_ handing two floats. That's a broken type system + calling conventions right there if you ask me
08:24:04FromDiscord<ElegantBeef> Is nico 2.0 opengl based?
08:24:44FromDiscord<impbox> hmm probably no nico 2.0, but the opengl based one i need a different name
08:25:41FromDiscord<ElegantBeef> Nove2D ๐Ÿ˜„
08:26:48FromDiscord<ElegantBeef> Yes i just took your Pico -> Nim(ico) and applied it to Love2D
08:28:00FromDiscord<impbox> before I did nico i made picolove which made pico8 games run in love2d
08:28:06FromDiscord<impbox> then i realised lua was horrible
08:28:12FromDiscord<impbox> and moved to nim <3
08:28:17FromDiscord<ElegantBeef> It's dynamically typed what do you expect ๐Ÿ˜›
08:28:51*opal quit (Remote host closed the connection)
08:28:51*leorize quit (Remote host closed the connection)
08:29:06FromDiscord<ElegantBeef> Also between you showing off your rotating sprites and my nimscript stuff i now want to make a game like screeps, so need to figure out something for it
08:29:14*leorize joined #nim
08:29:33FromDiscord<impbox> yeah, next on my list of stuff to do is to play with your nimscript stuff
08:29:52FromDiscord<impbox> haven't seen screeps before, sounds interesting
08:30:03*opal joined #nim
08:30:31FromDiscord<impbox> i'm keen to try livecoding units in a game
08:30:55FromDiscord<ElegantBeef> Yea it seems like a fun idea
08:31:09FromDiscord<ElegantBeef> I really like games that have scripting in game, space engineers for instance
08:31:32FromDiscord<impbox> but you can only script units that you are close to, so once you're away from them they need to fend for themselves via the code you wrote
08:31:57FromDiscord<ElegantBeef> Well the way i'd do it is have RTS like units, where you code behaviour of each type
08:32:12FromDiscord<ElegantBeef> So miner, harvester, intercepter, bomber etc
08:32:25FromDiscord<impbox> mmm i started working on a little RTS/TD project recently
08:32:30FromDiscord<ElegantBeef> And then also the construction building
08:33:00FromDiscord<ElegantBeef> The block in my way right now is trying to figureout what to even start making it
08:33:31FromDiscord<ElegantBeef> Cant exactly use nico since i want a code editor and the limitations dont really enable a split view code editor
08:33:42FromDiscord<impbox> well you could, but it would suck
08:34:02FromDiscord<ElegantBeef> I think fidget could work
08:34:12FromDiscord<impbox> though it could open the code in your fav editor in a separate process
08:34:22FromDiscord<impbox> in a tmp file and update when it's written to
08:34:39FromDiscord<ElegantBeef> That works for like an itch.io game, but for a proper game that's not that nice
08:34:54FromDiscord<ElegantBeef> ~~Although let's be honest i'm never getting to a proper game~~
08:35:19*nikita` quit (Ping timeout: 272 seconds)
08:36:19*nikita` joined #nim
08:36:35*notchris quit (Ping timeout: 272 seconds)
08:38:56*notchris joined #nim
08:39:45*zielmicha__ quit (Ping timeout: 272 seconds)
08:41:01*nikita` quit (Ping timeout: 272 seconds)
08:41:39*matlock quit (Ping timeout: 272 seconds)
08:42:43*nikita` joined #nim
08:42:43*nikita` quit (Excess Flood)
08:42:47*zielmicha__ joined #nim
08:43:05*nikita` joined #nim
08:43:06*nikita` quit (Excess Flood)
08:43:36*nikita` joined #nim
08:43:40*vqrs quit (Ping timeout: 272 seconds)
08:44:32*matlock joined #nim
08:45:24*vqrs joined #nim
08:50:20*natrys joined #nim
09:02:19FromDiscord<impbox> hmm is there a nimidiomatic way of doing nim version specific code?
09:02:43FromDiscord<ElegantBeef> https://nim-lang.org/docs/system.html#NimMinor
09:02:54FromDiscord<ElegantBeef> Use `when` with it i believe
09:03:09FromDiscord<impbox> ahh cool, thanks, i figured it'd be `when ` something
09:03:11FromDiscord<ElegantBeef> Guess https://nim-lang.org/docs/system.html#NimMajorโ†ตshows it exactly
09:03:23FromDiscord<impbox> nice
09:04:09FromDiscord<impbox> I wonder if it's better to use that or use `when compiles...`
09:04:37FromDiscord<ElegantBeef> That's above my paygrade ๐Ÿ˜›
09:06:33*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:16:54FromDiscord<Rika> depends, when compiles is to check if a feature exists
09:17:04FromDiscord<Rika> at least thats what i hear people use it for
09:19:05FromDiscord<ElegantBeef> Can also use it for optional features
09:19:16*Q-Master quit (Quit: ะฃัˆะตะป)
09:19:30FromDiscord<impbox> the situation is a module's type that overrides on in the system library was defining a member that is now included in the base type
09:19:54FromDiscord<impbox> so I can easily fix it in 1.4 by removing that definition in the module, but it'll break pre 1.4
09:20:56FromDiscord<lqdev> `when declared(x)` or `when NimVersion >= (1, 0, 0)`
09:32:14FromDiscord<impbox> https://play.nim-lang.org/#ix=2BOu
09:32:29FromDiscord<impbox> I'm not sure how to use when declared in this context or if it's possible
09:34:16*Q-Master joined #nim
09:34:26*Q-Master quit (Client Quit)
09:35:17*Q-Master joined #nim
09:38:04FromDiscord<lqdev> i think there was a declaredField or fieldDeclared
09:38:18FromDiscord<lqdev> but i don't remember because i never use it.
09:38:33FromDiscord<lqdev> whatever you're doing, feels like quite a hack.
09:39:04FromDiscord<impbox> mmm just aiming for backwards compatibility, but maybe i shouldn't bother
09:39:47*Q-Master quit (Client Quit)
09:40:30FromDiscord<haxscramper> If I use `{.experimental: "caseStmtMacros".}` and have `case` statement inside generic function I need to use `mixin` for all symbols in the dsl, like `mixin _, all, JString` etc. Example: https://play.nim-lang.org/#ix=2BOz
09:40:49FromDiscord<haxscramper> Or force expansion with something like `expandMacros`
09:41:05FromDiscord<haxscramper> Is it a bug or I'm just doing something wrong with `match`?
09:56:55*Q-Master joined #nim
10:19:01*lritter joined #nim
10:26:42supakeenZevv: Getting close to GNU now: https://bpa.st/raw/XKKQ :)
10:29:50*krux02 joined #nim
10:43:00*waleee-cl joined #nim
11:33:55*Vladar quit (Quit: Leaving)
11:52:23*superbia quit (Quit: WeeChat 2.9)
12:02:00*tane joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:34*supakeen joined #nim
12:07:19*lum quit (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
12:08:20*gmaggior quit (Quit: Leaving)
12:08:44*lum joined #nim
12:09:16*lum quit (Client Quit)
12:10:43*lum joined #nim
12:12:31*lum quit (Client Quit)
12:12:55*lum joined #nim
12:14:52*lum quit (Client Quit)
12:16:03*lum joined #nim
12:19:21*lum quit (Client Quit)
12:20:22*lum joined #nim
12:48:13Zevvcan you disambiguate between grouped shortopts and shortopts with option? like "-a -b -c -dfoo" is the same as "-abc -dfoo"
12:48:19Zevvbecause you can't, with a generic grammar
12:49:09ZevvPMunch recently came with some language that formally describes command lines; the description is suitable for human consumption as --help, but you can also parse it and generate a parser for it
12:49:25supakeenZevv: I've listed that as something that won't be supported.
12:49:47supakeenAs in -afoo and -abc where one is option+value and the other is 3 short opts.
12:50:06supakeenI'd have to generate grammars, which is the future.
12:50:33supakeenAnd likely the way it's supposed to work :)
12:52:35supakeenI also have to see what happens in getopt if you have both -a and -f and -b which takes an argument and you give it -bfoo
12:53:03supakeenBut first I need to solve more quoting woes :)
12:53:55ZevvNPeg allows for dynamic generating of grammars
12:54:00Zevvalthough that part is not documented
12:54:06supakeenAh that's nice though.
12:54:23Zevvthe "peg" macro is built on top of other primitives which you can compose
12:54:38supakeenI was going to determine an API to define a command line and then letting it be parsed by various parsers which determine how options/etc look. If I have the first bit I could look at generating the grammar based on that API instead of the reverse.
12:54:50Zevvmy plan was to parse the pmunch thing with npeg into an AST, and then transform this AST into an npeg grammar which makes a parser
12:54:57Zevvall the parts are there, it's just work
12:55:32supakeenYea, PMunch and I talked a bit that we had the same ideas though I think mine is mostly for 'parse any style you want into an abstraction and define your requirements on that abstraction'.
12:56:00Zevvah, docopt
12:56:08Zevvthat would make a nice week end project
12:56:27ZevvI had something else in mind, but that's so much work it makes me tired to think of it
12:56:57FromDiscord<haxscramper> > PMunch recently came with some language that formally describes command lines; the description is suitable for human consumption as --help, but you can also parse it and generate a parser for itโ†ตZevv: do you have a link for discussion/project?
12:57:05Zevvhttp://docopt.org/
12:57:30Zevvthere's parser generaters for other languages, but nim could do thich way cooler. No separate generate step
12:57:51FromDiscord<haxscramper> Oh, I expected something in reverse - generate everything from machine-readable specification
12:57:58Zevvit's machine readable
12:58:00Zevvand human readable
12:58:04FromDiscord<haxscramper> Like yaml/json/xml/dsl etc.
12:58:18Zevvso you give your help text, and it generates a parser that can generate the optiosn as described in your help text
12:58:24supakeenI've been all over the place today though; I also added some extra LFSRs to my PRNG library and then started exploring making Python bindings for that.
12:58:29supakeenProbably return to parsing in the evening!
12:58:41Zevvhaxscramper: nope, this is way cooler and better
12:59:08FromDiscord<haxscramper> Well, IMO it is just approach from wrong end. If you generated it from YAML you can shovel so much validation hooks, documentation additional notes etc.
12:59:34Zevvit's perfectly legal for you to have that opinion
12:59:55FromDiscord<haxscramper> Although it is really nice for small CLI tools
13:00:10Zevvlet me see if the spec is tight enough to peg it
13:00:20Zevvhmm good thing disruptek is not here
13:00:31FromDiscord<haxscramper> And since not everyone writes CLI frontends for ffmpeg that requires whole bookshelf to document
13:01:18supakeenhttps://github.com/docopt/docopt.nim how about this one?
13:02:13ZevvI don't care
13:02:37ZevvI remember now, I saw that and decided to skip it
13:02:44Zevvbut now I already got started. too bad.
13:02:48supakeenrip
13:08:58FromDiscord<haxscramper> How does vscode/other text editors provide highlighting for nim compilation errors? I know compiler outputs file/line/column - this is just being parsed to show errors?
13:09:16FromDiscord<haxscramper> Or there is something smarter than this
13:09:24Zevvbasically that. nimsuggest does the work
13:12:19FromDiscord<haxscramper> nimsuggest outputs errors too, not only suggestions at particular point in code?
13:12:27Zevvright.
13:12:32FromDiscord<haxscramper> awesome
13:12:50Zevvit's not perfect, but it does pretty well
13:13:29FromDiscord<haxscramper> Well, any machine-readable format is certainly better than pretty-printed compiler 120+ line dumps
13:18:29FromDiscord<ITR> How do I get a better error message than `Error: execution of an external program failed: '[path/to/exe.exe] '`
13:19:23FromGitter<jrfondren> try --verbosity:1
13:22:31FromDiscord<ITR> I tried `nim c -r --verbosity:1 test.nim` and it didn't work. I've also tried --debugger:on, and --stackTrace:on, and --debugger:native
13:23:47FromDiscord<Rika> is that the ONLY line you're getting?
13:23:52FromGitter<jrfondren> I wouldn't expect stacktrace or debugger options or help; it's an external program that's failing
13:23:58FromGitter<jrfondren> yeah I've gotten that as the only error before as well.
13:24:53FromGitter<jrfondren> in a pinch you can strace nim to get the full execve that's failing
13:25:14FromDiscord<Yardanico> @ITR please show full output from the Nim compiler command to the last one
13:31:04FromDiscord<ITR> sent a code paste, see https://play.nim-lang.org/#ix=2BPZ
13:31:57FromDiscord<ITR> sent a code paste, see https://play.nim-lang.org/#ix=2BQ0
13:31:58FromGitter<jrfondren> ah ok, I was thinking it was gcc or something that was failing
13:32:11FromGitter<jrfondren> in this case it's actually good. you can just run test.exe yourself
13:32:22FromGitter<jrfondren> it doesn't matter that nim can't provide a good error message; nim successfully built the exe
13:33:08FromDiscord<Rika> its probably an issue with the logi
13:33:09FromDiscord<Rika> c
13:34:05FromDiscord<ITR> Ah, so the error just means the return code of the program was not 0?
13:34:51FromGitter<jrfondren> you will get that error from a non-zero return yes
13:35:05FromGitter<jrfondren> `quit "hi"` is enough of a program for that
13:35:18FromDiscord<ITR> That's a very non-descript error message :/
13:35:39FromDiscord<ITR> I guess I'll manually add logging then
13:35:56*haxscramper joined #nim
13:35:57FromDiscord<Rika> well no its pretty concise
13:35:57FromDiscord<enthus1ast> is there a way to get the current nim file name on compilation, (i'm playing with --import / --include and with term rewriteing macros, but some modules dont like it eg. system.nim)
13:38:01FromDiscord<haxscramper> `currentSourcePath()` gives abosolute path
13:38:47FromDiscord<enthus1ast> yeah this unfortunately gives the name of the file the call is in
13:39:10FromDiscord<enthus1ast> but --import includes a module into every other module compiled, i want to get the file name of THIS module
13:39:24FromDiscord<enthus1ast> to basically do not term rewrite on some modules
13:39:37FromDiscord<ITR> @Rika I'd argue it should at least log which return code the program has.
13:40:06FromDiscord<haxscramper> You can also try `instantiationInfo()`, not sure if it works differently though
13:40:25FromDiscord<enthus1ast> tried this as well, this seems not to be propagated
13:40:48FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=2BQ5
13:42:55FromDiscord<haxscramper> So you want to (1) import module using `--import` flag, and (2) do term rewriting macros only in certain ones, but not others, right? And AFAIK `system.nim` is automatically included in each compilation, so it might be some magic interference from compiler
13:43:09FromDiscord<haxscramper> I.e. this module might behave differently just becase
13:44:25FromDiscord<enthus1ast> yes
13:44:44FromDiscord<haxscramper> Can you show the code?
13:45:23FromDiscord<enthus1ast> ist a customized version of this: https://github.com/Yardanico/nim-strenc/blob/master/src/strenc.nim
13:45:27FromDiscord<enthus1ast> its
13:52:28FromDiscord<enthus1ast> i could fork everything that i use and import this obfuscation module into every module, but this is not so h4xor ๐Ÿ˜„
13:52:54FromDiscord<Yardanico> sadly that module fails for some stdlib modules
13:53:49FromDiscord<enthus1ast> yes, so i thought, this could be disabled for some, but i do not find a way to get the current nim filename on compilation
13:55:08FromDiscord<ITR> How do I excempt logging from counting as a side-effect?
13:56:35FromDiscord<haxscramper> Use `{.cast(noSideEffect).}`, but I would advise against it, since logging is side-effect, so you are effectively tricking compiler
13:57:13FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2BQd
13:57:49FromDiscord<ITR> what effects can tricking it have though?
13:59:14FromDiscord<haxscramper> Well, logging accesses global state/prints messages/writes to file, therefore it has side effects. So with `cast` here you are just losing compiler-enforced checks and hiding side effects.
13:59:26FromDiscord<enthus1ast> there is also `debugEcho`
14:00:17FromDiscord<ITR> Like, the whole point of no side effects (for me at least) is to prevent bugs that come from stuff being touched without you realizing it, touching logging should never cause a bug to begin with
14:00:17FromDiscord<haxscramper> IMO - Either logging of noSideEffects, pick one. `debugecho` is just quick-n-dirty for variable printing, but full-blown logging is quite a differetn story
14:01:58FromDiscord<haxscramper> @ITR Are you sude about this? Logging can write to file or stdout. What if your program is piped somewhere? What if pipe suddenly closes? Writing to file? You can use all space on disk and god-only-knows what can happen
14:03:14FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2BQg
14:03:26FromDiscord<ITR> yeah, I'll probably do that.
14:03:30FromDiscord<ITR> (edit) "yeah, I'll probably do that. ... " added "thanks ^^"
14:03:45FromDiscord<ITR> but basically, if logging is that unstable then it's a problem
14:03:50FromDiscord<haxscramper> no
14:03:56FromDiscord<haxscramper> That's not the point
14:04:13FromDiscord<haxscramper> The point is - you either access global state or you have no side effects
14:04:39FromDiscord<haxscramper> This is not a problem of `std/logging` or whatecher you are using.
14:04:54FromDiscord<ITR> that's the equivalent of either running a program with sudo or running it with no permissions at all
14:05:41FromDiscord<haxscramper> And since logging does access global state, you have mutually exclusive requirements. You can lie about side effects using `cast`
14:06:24FromDiscord<haxscramper> E.g do you really need noSideEffects that much? Maybe push logging upwards in logic - I usually do this
14:11:16disruptekwait you guys talked about pegging without me?
14:15:01Zevvyeah but only if the spec is tight enough
14:15:04Zevvwhich it isn't
14:15:11Zevvunpeggable
14:15:16disruptekfair enough.
14:15:30disruptekyou wouldn't want to force it.
14:15:35Zevvtrue, true
14:15:41disruptekbad things could happen.
14:16:07disruptekshit could get messy, is what i'm saying.
14:16:16Zevvyeah, we get you right :)
14:16:22disruptekwhere are we on cps, zevv?
14:16:31disruptekdo you need to kick the clyybber again?
14:17:01ZevvI don't know. I'm not supposed to leave the country, otherwise I would long have waited for him in a dark alley to tell him the truth
14:17:27Zevvbut maybe timothee can do all of this for us
14:17:37disruptekbecause last night i was working on the landing page and i noticed that the section on concurrency, currently entitled "Crappy Concurrency", is a little thin.
14:17:39Zevvi seems to get the point
14:18:58Zevvs/i/he/
14:20:54*arecacea1 quit (Remote host closed the connection)
14:21:34disruptekoh, we're back to pegging, huh.
14:23:08*arecacea1 joined #nim
14:32:01FromDiscord<lqdev> Hint: 105222 lines; 6.138s
14:32:08FromDiscord<lqdev> this is taking sooooooo loooooooong
14:32:42haxscramperOn nimsuggest: I have file that has `echo 1 * '1'` and I want to get compilation errors for it. So I should do `echo -e "chk\nquit" | nimsuggest --stdout --debug file_with_errors.nim` or something like that?
14:32:43FromDiscord<lqdev> disruptek: approximate just how many weeks i'll have to wait for IC
14:33:05disruptekdude. that's not long.
14:33:20haxscramperI assumed `chk` is for check, but there is no documentation for all commands (or I missed something)
14:33:28leorizehaxscramper: you can also just run nim check...
14:33:30FromDiscord<lqdev> it wouldn't have been so horrible if nimsuggest wasn't so fucking slow
14:34:08disruptekalso, you are more than talented enough to do the job. don't make the morons write your code and then demand they cut corners. ๐Ÿ˜‰
14:34:11FromDiscord<lqdev> and nim check, too.
14:34:18haxscramperleorize: I was told nimsuggest can output more machine-readable error messages. `nim check` has to be parsed
14:34:54haxscramperAnd I would prefer to avoid this if I can get something more defined
14:35:01leorizeassuming you read vim regex, this is all you'll ever need: https://github.com/alaviss/nim.nvim/blob/master/compiler/nim.vim#L11-L17
14:35:16leorizethe format of the compiler messages are designed to be easily parsed
14:35:39disrupteki can confirm they are utf-8.
14:35:54leorizeit's always `filename(line, col): Error/Warning/Hint: message`
14:36:15leorizenimsuggest give you the same list, just in a tab-separated format
14:36:16haxscramperI want to deal with `Error: type mismatch` and highlight all alternatives & first error position for wrong argument
14:36:34haxscramperAnd things like that
14:36:36leorizenimsuggest won't give you the alternatives either
14:36:50leorizebecause those stuff doesn't have concrete formatting
14:36:58haxscramperWell, looks like `npeg` gets another user for parsing compiler output
14:37:06haxscramperOr something like that
14:37:29disruptekthe pegging is fast and furious today.
14:37:41leorizegood luck, the compiler gained a new switch to make parsing that output slightly worse :P
14:38:03leorizepersonally I'd like something structured like gcc/clang overloading hints
14:38:14*sealmove joined #nim
14:38:24leorize(people says rust compile errors are nice but I've never looked into them)
14:38:25haxscramperI'm thinking about implementing json-based compiler output, but I just don't have any concrete ideas for it
14:38:37leorizedon't spam json tbh :P
14:38:47sealmove@Zevv do you have any examples of how to incorporate ternary operator to a peg grammar similar to the one in the rod example?
14:38:49*lritter quit (Quit: Leaving)
14:39:08haxscramperSo I will try to just parse whatewher we have right now into json, see how bad things are and then start from that.
14:39:25leorizeif you want json then just use nimlsp
14:39:32leorizethat protocol is built on json
14:41:26haxscramperI just watched https://www.destroyallsoftware.com/talks/a-whole-new-world and now I need to have this (stacktrace part from the talk) for nim, but also with logging output, compiler error messages (exceptions in macros included) and other things like that
14:41:42leorizethe problem with json-based compiler output is that it doesn't stream
14:41:50disruptekrude.
14:42:55Oddmongeri'm trying to try (yes) godot-nim. With nim 1.2.6, i have this error: ยซ .nimble/pkgs/compiler-#head/compiler/msgs.nim(13, 19) Error: cannot open file: std/private/miscdollars ยป, and with nim 1.4.0rc (from gitnim) i get this one: ยซ.nimble/pkgs/nake-1.9.3/nakelib.nim(219, 18) Error: undeclared identifier: 'toSeconds' ยป
14:43:12leorizeand while you can use json lines, Nim's own json module won't allow that :p
14:43:31Oddmongerit's when i ยซ nake build ยป the default sample, btw
14:43:35disruptekeh you should be able to use the parseFragment stuff for json lines.
14:44:44Oddmongernim -v from 1.4rc returns me 1.3.7, so maybe i can test with even fresher nim. But hey. Another error maybe ?
14:44:56leorizedisruptek: is it some devel-only thing?
14:45:01disruptekno, toSeconds is likely gone due to deprecation.
14:45:11disruptekleorize: no, it was added to address a performance bottleneck.
14:45:29Oddmongerahhh oh
14:45:34disruptekpre-1.0 iirc.
14:45:50haxscramperleorize: right now error is just genenerated from string concatenation, I think doing generating json and converting it into pretty-printed form only on output is better than https://github.com/nim-lang/Nim/blob/devel/compiler/semcall.nim#L289
14:45:58leorizedisruptek: found it, yea this looks like it'd work
14:46:07Zevvsealmove: euh elaborate?
14:46:09Oddmongermaybe upgrade nake then
14:46:47sealmoveI have a peg very similar to rod's and want to add `a ? b : c` operator
14:46:56disruptekit's an easy deprecation to patch, also.
14:47:03Oddmongerso ยซnimble install nakeยป: /tmp/nimble_47567/githubcom_fowlmouthnake/nakelib.nim(219, 18) Error: undeclared identifier: 'toSeconds'
14:47:04Zevvsealmove: right, so what is the problem then?
14:47:07Oddmonger Prompt: Build failed for '[email protected]', would you like to try installing 'nake@#head' (latest unstable)? [y/N]
14:47:16leorizehaxscramper: the issue is that json is expensive (at least with Nim's default json module)
14:47:19Zevvsealmove: precedence?
14:47:25Oddmongeri've cowardly answered 'N'
14:47:30disrupteknimble isn't all that strong when it comes to versions. maybe try nimph.
14:47:43Zevvmild today, are we
14:47:48disruptekextra mild.
14:47:52Zevvsweet
14:48:17disruptekyou catch more flies with honey than vinegar.
14:48:30haxscramperSince you just instantly looze all information etc. And for "don't stream part" - doesn't putting each log on it's own line/json entry solve the issue? Like `/tmp/file_with_errors.nim(1, 8) Error: type mismatch: got <int literal(1), char>` will be turned into `{"lineinfo" : {"file": ...}, "kind" : "error"}`
14:48:32leorizehaxscramper: also you don't really need json here, just convert the not found errors into hints
14:48:36disruptekand you catch more flies with rotten animal carcasses than honey.
14:48:49ZevvI was about to type something like that yes
14:48:55sealmoveNot sure how to do it. I read you can treat it as binary op. Does this seem correct: https://play.nim-lang.org/#ix=2BQD ?
14:49:20disruptekZevv: that was my mild version of `dogshit`. ๐Ÿ˜
14:49:45Zevvsealmove: pfff dude, I never use that stuff :)
14:49:47Zevvlemme see
14:49:56disruptekhaxscramper: just setup your own error handler.
14:49:56leorizehaxscramper: I'm not sure what advantages does json bring to the table
14:50:10haxscrampermachine-readable output
14:50:22leorizethe current output is not machine readable?
14:50:26Zevvsealmove: excellent question, I'm not even sure if it really fits in :/
14:50:29disruptekhearts and minds, people; HEARTS AND MINDS!
14:50:46disruptekdon't be afraid to write some nim.
14:50:53haxscramperleorize: well, depends on how much information you want to give up
14:51:15disruptekyou don't get that much information to begin with.
14:52:05haxscramperIf you are not interested in anything but line/column/file then sure, it is parsable by regex even
14:52:26disruptekwut
14:52:39leorizeso you want to have semantics attached to the error message?
14:52:52haxscramperYes, something like structured logging
14:53:05disruptekbut the messages in the compiler aren't structured.
14:53:19disrupteki don't write messages you should parse, at least.
14:53:32disruptekassert lfNoDecl notin sym.loc.flags, "don't come aroun' here no more"
14:53:44disruptekassert sym.loc.lode != nil, "i will need you to fill out the loc"
14:54:01disruptekassert lfDynamicLib in sym.loc.flags, "are you lost, son?"
14:54:08disruptekgood fucking luck, buddy.
14:54:15leorizeI wouldn't mind if someone do a complete rework of compiler messages :P, Araq might, though
14:54:40leorizejson construction is slow so you should avoid having it in the hot path
14:55:06disruptekmy testes has some stacktrace rendering in it that might be useful.
14:55:38disruptekprobably not, actually.
14:55:51haxscramperYes, messages are not structured right now (although this is not really true, since there is an enumeration for all compiler warnings for example: https://github.com/nim-lang/Nim/blob/devel/compiler/lineinfos.nim#L29), that is true. But they /can/ be structured, the question is just how to make it easy to write & use in compiler code
14:56:12disruptekthis sounds like a job for timmy.
14:56:18disruptekhe absolutely loves this shit.
14:56:34haxscramperleorize: I've already said that I'm thinking about it, just don't exactly know where / how to start
14:56:51disruptekfocus on maximal disruption for minimal impact.
14:57:07disrupteklike my mangling patch that took 4 months and touches 78 files.
14:57:13FromDiscord<ITR> How can I get `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` from an immutable array I have read from a few lines earlier :/
14:57:39disruptekprobably not from the array.
14:57:40disruptekgdb it.
14:57:52haxscramperFor example rust has https://doc.rust-lang.org/error-index.html etc
14:57:55disruptekand use my mangling pr.
14:57:59haxscramperAnd some messages can be improved overall
14:58:33haxscramperFor example these insane walls of text on type mismatch errors. Just try `echo 1 * '1'` or something - it generats two screens worth of text
14:58:55FromDiscord<haxscramper> Or something like that https://media.discordapp.net/attachments/371759389889003532/769575654089556009/unknown.png
14:59:11disruptekhave you looked at elm?
14:59:21disrupteki think it raises the bar for error messages.
14:59:39disrupteksasha has some opinions about this, too; you should hit him up.
15:00:30haxscramperYes, it is a second time I've talked about this here
15:01:15haxscramperBut that time It was about prettier compilation errors, so since everyone has different personal preferences ...
15:01:23Zevvhaxscramper: I do agree that's a lot of output, but what would be the alternative
15:01:31disruptekwe could gzip it.
15:01:36Zevvsaying "I can not find anything that matches" is less helpful then *listing* them
15:01:40Zevvor should we list only 3 or so?
15:02:03disruptekwe should give interactive introspection.
15:02:07Zevvdude
15:03:06disruptekwut
15:03:18disrupteki'm thinking, like, a graphical event log.
15:03:40Zevvwith emoticons and a lot of color
15:03:44haxscramperZevv: Well, for type matching: do unification of expected proc signature and the shit I wrote in my code. Like when I have callback proc signature it usually takes me 10 minutes to determine that "oh, the only difference is gcsafe"
15:03:48haxscramperAlso
15:04:19disruptekit's hard to diff gz output, though.
15:04:23leorizeat one point you really gotta think if you want structured logging, or do you want the compiler to log smarter
15:04:25haxscramperSmarter sorting for listing is also a thing. Out of three possible symbols it can omit one, but when I have 30 it happily dumps 28 of them.
15:04:25haxscramper
15:04:25haxscramperPossible solution: sort all mismatches based on their similarity with
15:04:28disruptekmaybe we diff it and THEN gzip it.
15:04:28haxscrampergiven call site. For example, if proc matches on all arguments except
15:04:31haxscramperfirst one, which differs in ~var~ annotation this proc should
15:04:34Zevvhaxscramper: so, like, ordering on "closeness"
15:04:35haxscramper*certainly* be on top of the list, maybe even highlighted with
15:04:39haxscrampercolorfull arrows 'most likely you wanted to use this one'. Some random
15:04:41haxscramperscrap that does not match on any type (especially first argumment)
15:04:44haxscrampershould be hidden behind ~--showAllMismatches~.
15:04:49Zevvno need to list all the float variants when I'm passing in an int and a char, right
15:04:49leorizeoh no haxscramper is spamming
15:05:00Zevvno he has a point
15:05:07Zevvhis example is good.
15:05:24leorizeI mean you shouldn't write multi-line message for irc :P
15:05:34leorizebut yes the example is fine
15:06:03disruptekeh. these are very specific though.
15:06:04Zevvhm let me see how that is implemented and if I can grok that
15:06:09disruptekthey could be determined using ast diff.
15:06:22disrupteka better example is missing overload.
15:06:30leorizea lot of nim errors can be improved by inspecting the AST
15:06:41leorizeif you want that to be structured I think you'll have to serialize the AST
15:06:47ZevvI always think of C++ and stop whining
15:06:47leorizeand, uh, that's not very pretty
15:07:00haxscramperAlso (IMO) just do more colors, or add option (or better just give me all info so I can write my own pretty-printer instead of nagging compiler devs to implement "that nice colored pretty-printed emoji-filled thing")
15:07:03disruptekthe human doesn't need to parse the ast, though.
15:07:18Zevvyou two should marry, the pope is ok I believe
15:07:36disrupteknimsuggest can tell you the problem and then you can zero in on the ast yourself.
15:07:39leorizedisruptek: haxscramper is thinking about the solution where everything is printed out for a frontend to consume and emit nice error messages
15:07:55FromDiscord<Clyybber> i want that too
15:08:14Zevvyou're just hiding the problem in glitter and decorations
15:08:23FromDiscord<Clyybber> then we can have file:line:col too
15:08:26disrupteki say the compiler is correct. nimsuggest is where you put this functionality, at worst.
15:08:27leorizeI'm not to sure about it, the AST is not cheap to serialize
15:08:32leorizetoo*
15:08:41disruptekat best, you put it in your own tool.
15:08:48leorizeI'd say a new compiler frontend works the best :P
15:09:02disruptekwhy do you say the ast is not cheap to serialize?
15:09:22disruptek1) it's getting cheaper, and 2) we have to do it for ic anyway.
15:09:39leorizeso you're saying... we should wait for IC? :P
15:10:19disruptekyes.
15:10:27disruptekeveryone go on vacation for a couple weeks.
15:10:52disruptekespecially araq.
15:11:03disruptekhe's gonna break me with his ic3 branch.
15:11:45leorizethe current compiler already have a ton of information laying around in the memory when an error message is emitted
15:12:01leorizeso it's not too hard to just traverse those and print better messages
15:12:19leorize@Clyybber file:line:col is ugly imo :P
15:12:32Zevvbut that is exactly what the compiler already does. traverse AST gen generate messages
15:12:47*NimBot joined #nim
15:12:53disruptekhaxscramper: totally agree.
15:13:03haxscramperSince you will be running compiler again, and it is more expensive than any tree -> json conversion
15:13:04leorizehaxscramper: nimsuggest is the issue though
15:13:24disruptekthe expense is human, machine expense is free afaic.
15:14:04leorizeif error reporting is too expensive then nimsuggest would eat even more memory and be even more sluggish
15:14:22disrupteki'm fine with that.
15:14:40haxscramper^ excactly. I don't think that dumping just plain /everyting/ (maybe as optional switch though) is that bad of an idea really (all scopes and whathewher internal state compiler has). If someone is willing to dig down into all of this
15:14:43disrupteki would rather drop $1000 on a new cpu than pay for $1000 of programmer labor.
15:15:09leorizethe problem is that nimsuggest is already sluggish and memory heavy :P
15:15:22haxscramperleorize: I don't think generating json is **that** much more expensive than regular string
15:15:27leorizemratsim can't even escape the problems of nimsuggest even when he got an overkill rig
15:15:50Zevvhow exactly does "1 * 2.3" match `*`(float, float)?
15:15:52haxscramperI mean, it is just more accurately placed quoted and `{}[]""`, that's all
15:16:07leorizeit's expensive if you use JsonNode
15:16:14leorizepackedjson can give you a way out though
15:16:23ZevvI don't see anything in the manual explicitly converting ints to floats
15:16:36haxscramperleorize: is it really that bad?
15:17:03sealmove@Zevv my example works fine after all :) I had some stupid bug in my code (not grammar related)
15:17:13Zevvgood!
15:17:15leorizehaxscramper: yes, Nim's JsonNode is one of the slowest type around
15:17:32leorizeand it doesn't help that our allocator just pool up a ton of memory and also terrible at reusing them
15:17:46leorizeremember, Nim's allocator is O(1), it's meant for latency and not performance
15:17:47disruptektrue.
15:18:05disruptekwe really need to expose the allocator hooks.
15:18:12disruptekso we can write pools and stuff correctly.
15:19:22leorizeAraq got rid of allocators in Nim right before newruntime ships
15:19:24leorizenot sure why
15:19:45disruptekhaxscramper: i'm watching this video. i like the profiling thing, but i want something like that which is applied to the ecosystem for testing.
15:20:10disruptektight specs are only a problem for pegging.
15:20:23disrupteki'm fine with having the allocator hidden right now. ๐Ÿ˜‰
15:20:58haxscramperdisruptek: the only problem is just making things output structured data instead of pretty-printed-everything-is-a-text
15:22:03leorizeyou can try to make errors structured within the compiler backend first
15:22:17leorizethen you can plug whatever frontend in to print whatever kind of messages
15:23:43leorizeonce you got that working then feel free to make the frontend print json out for interop
15:23:58haxscrampergood point
15:24:26haxscramperoh
15:24:34disruptekhow serious do you want to take this?
15:24:44disrupteklike, how much effort are you willing to put in?
15:25:24haxscramperAnd it will also make using nim compiler is a library easier too (I couldn't find a way to don't `quit` when parser encounters invalid nim code for example).
15:25:55disruptek!repo dust
15:25:56disbothttps://github.com/disruptek/dust -- 9dust: 11DUST is Unattended Syntax Truncation 15 4โญ 0๐Ÿด 7& 1 more...
15:26:16disruptekthe design changed, so earlier work might be more useful to you.
15:26:38disruptekbut again, how serious are you?
15:26:43FromDiscord<Rebel> Asking again as there are more awesome people online. Are there any nimble packages that implement AES encryption with support for padding? At least PKCS7. Very surprised that nimAES and nimcrypto don't as that is a very basic component of any block-based crypto system...
15:27:00haxscramperdisruptek: I don't know exactly, but since I've finished pattern matching and hcparse is just @#$%RT^Y right now
15:27:09disruptekrebel: i don't know of an aes solution, no.
15:27:18haxscramperBut I think that is pretty importany
15:27:20leorize@Rebel maybe look inside nim-p2p, iirc Status wrote something for that in there
15:27:29haxscramperSo I could say I'm relatively serious
15:27:53disruptekwell, compiler-as-a-library needs a lot of work based on my dust experience.
15:28:18disruptekbut i would maybe recommend starting with dust.
15:28:27disruptekit's largely the same problem.
15:28:33Araqhmm what about me?
15:28:44disruptekAraq: we love you, enjoy the weekend.
15:28:53Araqgood good.
15:29:09leorizeI'm all for making the compiler backend more robust and easier to use \o/
15:29:12disruptekyou're going to make me rebase against ic3. i guess it's fair.
15:29:18leorizeplease keep us posted with your progress haxscramper
15:29:26Araqdisruptek: seems like it, yeah
15:29:44disrupteki mean, my time is cheaper than yours; i'm okay with it.
15:29:49haxscramperdisruptek: yes, I've seen dust and even wrote https://gist.github.com/haxscramper/8821819221b1d73866e4aed306147f0c (just small example of custom compiler pass) using it as a base
15:30:06disruptekbut ice is now rebased against mangling. so it's starting to be real work to track this stuff.
15:30:11disruptekwould like to get mangling in asap.
15:30:34Araqwe have some process in place here
15:30:37disruptekhaxscramper: okay, sounds like you are now state-of-the-art. just lemme know if i can help.
15:30:39*Araq tries to remember
15:30:57disrupteki need to get leorize to train me on rebase.
15:31:11FromDiscord<Rebel> Thank you leorize I shall take a look later today.
15:31:28haxscramperleorize: Right now I'm just thinking about to do this, but from this discussion I could say it just comes down to refactoring compiler error handing and using separate type for everything instead of just plain errors
15:31:36FromDiscord<Rebel> Maybe one day Nim will have an official cryptography module
15:31:44disruptekAraq: it was red due to cligen, not me.
15:32:13leorizehaxscramper: object variants ftw :P
15:32:15disruptekrebel: we go over this all the time. nimcrypto is audited, which is as close as you're going to get.
15:32:20Araqโ€žThe PR has to be approved (and is often merged too) by one "code owner", either by the code owner who is responsible for the subsystem the PR belongs to or by two core developers or by Araq.โ€œ
15:32:34FromDiscord<Rebel> Yes look at the aes issue on nincrypto lmao
15:32:43FromDiscord<Rebel> That is a bit of a yikes
15:32:48FromDiscord<Rebel> A huge yikes
15:32:59Araqso get both Clyybber and cooldome to approve your name mangling patch
15:33:11disruptekgive us a link on the issue.
15:33:24FromDiscord<Rebel> ๐Ÿ˜ฌ https://media.discordapp.net/attachments/371759389889003532/769584331601084496/image-20.png
15:33:25disruptek!issue aes repo:status-im/nimcrypto
15:33:25disbothttps://github.com/nim-lang/Nim/issues/9503 -- 3nimpretty indents object constructor badly 7& 4 more...
15:33:35leorize@Rebel well you still have openssl to go by
15:33:37FromDiscord<Rebel> One sec let me pull it uo
15:33:38FromDiscord<Rebel> Up
15:34:14ForumUpdaterBotNew question by jjv360: What is the significance of uppercase file names?, see https://stackoverflow.com/questions/64515076/what-is-the-significance-of-uppercase-file-names
15:34:15disruptekAraq: aight.
15:34:29haxscramperAlthough I would like to first finish hcparse and use sourcetrail on nim compiler so I could do refactoring faster
15:34:39FromDiscord<Rebel> https://github.com/cheatfate/nimcrypto/issues/9
15:34:39disbotโžฅ AES encrypt and decrypt
15:35:14FromDiscord<Rebel> I think someone ran into the same issue as me
15:35:16FromDiscord<Rebel> https://gist.github.com/genotrance/53d3ae50434ad73365d45bdd6a0ff97d
15:35:21FromDiscord<Rebel> Had to resort to toast
15:35:34leorizeI guess I'm gonna do some CI work today, gotta get my `process` library working and I need more tests
15:35:58disruptekgithub needs an email-subscription mode where they just send you the initial issue so you can subscribe to it there if you are interested.
15:36:31disrupteki don't like having to watch entire repositories.
15:37:46Araqdisruptek: however...
15:38:28Araqlet's assume we have ic3 applied. What stops you from using the new stable IDs for name mangling, augmented with some type info for convenience
15:38:37disruptekyou don't need to break me; how hard could it be to offer me uniqueId and .id on sym?
15:38:55disruptekthere's nothing preventing me to adapting my code.
15:39:07disrupteklet's not worry about it. it's about the simplest problem we have.
15:39:11Araqremember, that we used to use .id for the name mangling
15:39:16Araqand it was fine.
15:39:19disruptekof course.
15:39:34disrupteklike i said, just deprecate the fields and replace them with procs.
15:39:48Araq?
15:39:56disruptekthe .id and .uniqueId.
15:40:23Araqwhat about them? why are accessor procs better for you?
15:40:40disruptekthey aren't; it's fine if they are still there.
15:40:57disrupteki'm just saying that i use them. that's the only breakage we need to worry about.
15:40:59*Vladar joined #nim
15:41:08disruptekand it's hardly anything to be concerned of.
15:41:15Araqalright
15:41:35Araqso you now like my patch, right?!
15:41:41disruptekyes, yes!
15:41:48Araq:-)
15:41:50disruptekgut gut
15:42:18FromDiscord<ITR> disruptek: I managed to set up gdb with vscode, but some of the fields are listed as "optimized out", despite it being a debug build (I tried adding --opt:off too), do you happen to know what the issue might be?
15:42:41disruptek--debuginfo
15:42:53disruptekalso --embedsrc is nice.
15:42:59disruptek--debugger:native
15:43:20disruptek--linedir:on
15:43:23FromDiscord<ITR> sent a code paste, see https://play.nim-lang.org/#ix=2BR9
15:43:46disruptekman, i broke something so i can't open links from my terminal and it's fucking killing me.
15:44:08disruptekwhat's -x:on and -a:on?
15:44:41Araq-x = checks
15:44:42FromDiscord<ITR> runtime checks and assertions, but I think they're on by default
15:44:45disruptekif they are optimized out, they are optimized out.
15:44:47Araq-a = assertions iirc
15:45:03disruptekthat's literally a message from the c compiler saying, "yo, you don't need this so i'm throwing it away."
15:45:24disrupteklogically, you can ignore it.
15:45:44FromDiscord<ITR> my problem is when it's the parameter to a function, and it doesn't let me see the value because of it
15:46:01disruptekAraq: we run asserts in release now?
15:46:16Araqyeah, due to an oversight
15:46:23disrupteksigh.
15:46:57Araqbut it's not a big deal either way
15:47:05leorize[m]1oh wait it's not intentional?
15:47:07disruptekman, i am so not a fan of that.
15:47:14miprihasn't that been true since -d:danger was added? or does release do more asserts than before?
15:47:16leorize[m]1I brought it up several times and no one said a thing
15:47:16disruptekwhat would it take to fix it?
15:47:30disruptekgah, i thought it must have been a lie.
15:47:39leorize[m]1disruptek: just modify nim.cfg to add assertions:off to release
15:47:47Araqleorize[m]1: when I introduced -d:danger vs d:release
15:47:53disruptekno, i mean in the compiler.
15:48:05AraqI meant to enable all checks for release
15:48:09disruptekwhen they got merged, you mean.
15:48:14disruptekoh.
15:48:32Araqbut I never thought about assertions
15:48:52disruptekhmm.
15:49:02disrupteknow i can't decide how i feel about this.
15:49:20Araqthis is what happens when you avoid the RFC process
15:49:20disruptekdanger is new, right?
15:49:40Araqit's in 1.0, so no.
15:49:44Araqit's not new
15:49:48disruptekright, but danger is the one you added.
15:50:15Araqyes but 'release' used to be 'danger'
15:50:20leorize[m]1so is there anything blocking us from turning assertions off for release?
15:50:22disruptekexactly.
15:50:29disruptekso release used to not include assertions.
15:50:29Araqso I changed them both quite considerably
15:50:32disruptekand now it does.
15:50:36Araqtrue
15:50:51disruptekokay. i say you pick what you want where and we move it.
15:51:11disruptekand either way it's fine, but get it the way you want it.
15:51:30Araqwell personally I want --assertions:on for the release compiler
15:51:45disruptekokay, that's interesting.
15:51:53Araqbut I can totally see that others want something else
15:52:23disruptekyou mean for their projects.
15:52:29Araqfor me the -d:release switch was a productivity boost, no need to check code snippets with two different compilers
15:52:59Araq(debug and 'danger' compiler)
15:53:05disruptekthat's makes a lot of sense.
15:53:26disruptekbut, as you point out, it's solved in the compiler build configuration.
15:53:58disrupteki guess it has to stay enabled.
15:54:04disruptekit's in 1.0, 1.2, 1.4.
15:54:33FromDiscord<ITR> wait, does inc/dec not check for bounds of the variable type?
15:54:47Araqit does
15:54:50disruptekit does with checks.
15:55:10disruptekthere's even a custom check switch iirc.
15:55:52FromDiscord<ITR> strange, because I'm somehow managing to get a -1 in a 0..5 range
15:56:12disruptekthat makes sense.
15:56:25disruptektry toggling the check.
15:56:34disruptekmaybe something in your config is toggling it.
15:57:01FromDiscord<ITR> even stranger is that I'm manually checking if `WidthIndex.low < pos.x:` before calling dec on it
15:57:10mipriwhat D has is a bunch of additional distinctions on assertions: there's assert(), and there are bounds checks, and then there are bounds checks in {.safe.} code vs. other code, then there's contract programming, and there's invariants, that can all be toggled separately.
15:57:20disruptekshow the code.
15:57:25Araqwhat the heck is up with our CIs...
15:57:44Araqmipri: yeah I know, and we have quite the same setup for better or worse.
15:58:26FromDiscord<ITR> gonna try with `--rangeChecks:on --boundChecks:on` first and step through with the debugger first
15:58:48FromDiscord<ITR> I'll see if I can extract the small part where this happens
15:59:06disrupteki think leorize is planning on working on ci today.
16:01:11leorize[m]1Araq: so something is broken?
16:01:29leorize[m]1I plan to work on CI for libraries since I need them for stuff I develop
16:01:34FromDiscord<ITR> ah, I see my issue, I'm checking against the wrong variable. Strange that the checks on inc/dec aren't catching it though.
16:03:41Araqleorize[m]1: it was just an SSL connection hickup I think
16:04:16FromDiscord<ITR> disruptek: https://play.nim-lang.org/#ix=2BRk
16:05:12disruptekthat talk was pretty good and it captures how i feel about pl development.
16:05:36mipriITR: without distinct that fails with an underflow
16:05:56FromDiscord<ITR> ah, so distinct is the issue
16:06:05disruptekneat.
16:06:22disruptekthat should be an easy fix.
16:06:23mipri!eval var x: distinct range[0..2]; x.dec; echo x.int
16:06:24Araqdisruptek: so ... what does 'frosty' do?
16:06:26NimBot-1
16:06:40disruptekAraq: copies memory to stream or socket.
16:07:11Araqhuh? and how? what if my memory has pointers inside?
16:07:13disruptekor from stream or socket. i felt it necessary.
16:07:26FromDiscord<ITR> is there a proc that would have to be borrowed for the check to work? or is it a bug?
16:07:29disruptekthe pointers get stashed and unstashed.
16:07:47disruptekno, i think it's a bug.
16:08:10disrupteki think we need to skiptypes and we aren't.
16:08:18FromDiscord<ITR> welp, I guess I'll just have to keep that in mind for now. Thanks for all the help
16:08:20disruptekif i'm right it's a 1-line fix.
16:08:31disruptekITR: will you file an issue, please?
16:08:37FromDiscord<ITR> ๐Ÿ‘
16:08:41disruptekdanke.
16:09:12FromDiscord<ITR> what does that look like on irc? \๐Ÿ‘๐Ÿ‘ discord has a tendency to replace unicode emoticons with their text versions
16:09:29disruptekit's a thumbs ofc.
16:09:46mipriit's definitely not getting replaced with a text version. Just looks like a meaningless blob to me. But that's my preference.
16:09:59disruptekdid you see someone made an emoji translator in nim?
16:10:11disruptek!repo nimoji
16:10:12disbothttps://github.com/pietroppeter/nimoji -- 9nimoji: 11nimoji - ๐Ÿ•๐Ÿบ emoji support for Nim ๐Ÿ‘‘ and the world ๐ŸŒ. 15 9โญ 0๐Ÿด 7& 1 more...
16:10:53disruptekmipri: you're one of /those/ people, huh?
16:10:58miprioh nice. that might be worth integrating into an IRC client
16:11:33disruptekwell, we apparently don't need it.
16:11:37disruptek(for irc)
16:12:05disruptekor maybe Yardanico is already using it. such a smart boy.
16:12:22disruptek!requires nimoji
16:12:23disbotnimoji: 11pietroppeter/imoji 71 total
16:13:07miprioh god, I thought iwas going the other way
16:13:33mipriit turns perfectly readable ASCII into emojis.
16:14:25haxscramperon json speed again: why exactly it is considered too slow to work with? I'm just trying to understand what is the difference betweej `JsonNode` and let's say `TNode` - both defined using pretty similar approach (case object with `seq` of subnode elements), all have int/string leaf node types etc.
16:15:10disruptekit's slow because it makes a lot of allocs.
16:15:11haxscramperAnd this is how any tree is defined usually (most logical and straighforward way)
16:15:22FromDiscord<Rebel> Maybe one day Nim will have options like Python does with a plethora of json options such as orjson and ujson.
16:15:34disruptekwe already have those options via c.
16:15:54disrupteka wrapper practically writes itself.
16:16:46FromDiscord<Rebel> Fair enough, do you have a specific wrapper in mind that is faster than the default module?
16:17:00Araqmy 'packedjson' is
16:17:06FromDiscord<Rebel> ๐Ÿ‘€
16:17:26disrupteki think npeg is 3-5x faster, depending on when and how you measure.
16:17:46disruptekit would be interesting to see how it performs under arc now.
16:18:22FromDiscord<Rebel> What features have been cut? No wiki :(
16:19:49FromDiscord<Rebel> Ok the macro "magic" is still there excellent I will give this is a try in the future. I use a lot of json for my project.
16:20:39leorize[m]1haxscramper: TNode is also very slow, Araq planned to replace it in the future
16:21:08leorize[m]1you can look at packedjson to see how inefficient json is
16:21:11leorize[m]1!repo packedjson
16:21:12disbothttps://github.com/Araq/packedjson -- 9packedjson: 11packedjson is an alternative Nim implementation for JSON. The JSON is essentially kept as a single string in order to save memory over a more traditional tree representation. 15 49โญ 7๐Ÿด
16:21:30disruptekthis is the first time, ever, that i'm using nimph while being high. high to the point where i really don't know what it's doing or why.
16:21:41disrupteki've had to really put my trust in this software.
16:22:04disruptekso, what do you think happened?
16:22:28disruptekbtw, this is the error i started with: /home/adavidoff/git/golden/deps/pkgs/gittyup-2.5.1/gittyup.nim(1018, 9) Error: undeclared identifier: 'git_strarray_free'
16:22:58disruptek$ nimph outdated
16:23:11disruptekwould upgrade bump from 1.8.20 to 1.8.24
16:23:14disruptekwould upgrade cligen from 1.0.0 to v1.2.2
16:23:18disruptekwould upgrade gittyup from 2.5.1 to 2.5.6
16:23:22disruptekwould upgrade nimgit2 from 0.3.0 to v0.3.2
16:23:30disruptekwould upgrade nimterop from 0.6.2 to v0.6.13
16:23:33disruptekwould upgrade regex from 0.15.0 to v0.17.0
16:23:38disruptek๐Ÿ‘Žgolden is not where you want it
16:23:51disrupteki'm nervous.
16:24:23mipriI was on the edge of my seat but no "upgrade superimportant from 1.2.3 to 1.1.4"
16:24:29disruptekyou can cut the tension in this room with a knife.
16:24:37disruptek$ nimph upgrade
16:24:41disruptekrolled bump from 1.8.20 to 1.8.24
16:24:56disruptekrolled cligen from 1.0.0 to v1.2.2
16:24:57disruptekrolled gittyup from 2.5.1 to 2.5.6
16:24:57disruptekrolled nimgit2 from 0.3.0 to v0.3.2
16:24:57disruptekrolled nimterop from 0.6.2 to v0.6.13
16:24:58disruptekrolled regex from 0.15.0 to v0.17.0
16:24:59disruptekadded path `/home/adavidoff/git/golden/deps/pkgs/regex-0.17.0/src/` to `/home/adavidoff/git/golden/nim.cfg`
16:25:06disruptek๐Ÿ‘Œgolden is lookin' good
16:25:27disruptekyeah baby.
16:25:30disruptekthat's good, i think.
16:25:51disruptek$ nim c -d:danger --gc:arc --panics:on src/golden.nim
16:26:05disruptek/home/adavidoff/git/golden/deps/pkgs/nimgit2-0.3.2/nimgit2.nim(27, 10) template/generic instantiation of `getHeader` from here
16:26:08disruptek/home/adavidoff/nims/lib/system/fatal.nim(41, 5) Error: cannot 'importc' variable at compile time; cstderr
16:26:14FromDiscord<ITR> beep boop, issue made: <https://github.com/nim-lang/Nim/issues/15706>
16:26:17disbotโžฅ Underflow not detected when using dec on distinct ranges ; snippet at 12https://play.nim-lang.org/#ix=2BRp
16:26:17disruptek๐Ÿผ
16:26:25disruptekthanks, itr
16:27:55AraqI remember fixing this one. :-) iirc I had to revert because it breaks code. but yeah, we should fix all these things and call it version 2
16:28:24disruptekseriously.
16:28:32disruptekis there a list of these things somewhere?
16:28:54Araqcompilerdev repo
16:29:08Araq(it lacks this one though)
16:29:10disruptekweird, i don't remember seeing it.
16:29:12disruptekahh.
16:30:14disruptek$ goto nimgit2
16:30:19disruptek$ nimble test
16:30:56disruptekerror: pathspec '1.0.0' did not match any file(s) known to git [AssertionDefect]
16:45:09FromDiscord<shashlick> Hmm
16:51:20Zevvdisruptek, smart man. I asked earlier today but got washed in other discussions. What does make `1 * 2.3` work in nim?
16:51:36Zevvthere is no `*`(int, float)
16:51:51Zevvand it seems to match float,float, even
16:52:19disruptekdon't look for int, float but SomeInteger or even SomeNumber?
16:52:35disrupteki wonder if our docs are fixed yet.
16:53:28ZevvNimsuggest points me to float,float if I lookup `*` for this case
16:53:40disruptekclever.
16:54:00disruptektoFloat isn't a converter, though.
16:54:06Zevvwho converts the int, and why does it do that without asking me first
16:54:13disruptekthat would be super fun, of course.
16:54:23mipriput this in a file: let y = 2.3; echo 1 * y
16:54:30miprithen nim c --gc:arc --expandArc:file file
16:54:40mipri`$`(1.0 * y)
16:54:44disruptekjust paste us the output, chucklehead.
16:54:53leorize[m]1Zevv: literal magics
16:55:00disruptekLITERAL MAGIC
16:55:05disrupteki knew it was real.
16:55:08disrupteki just knew it.
16:55:11Zevvwhere does this live, and do the docs talk about it?
16:55:18miprihttps://play.nim-lang.org/#ix=2BRz
16:55:21disruptekshh, the first rule of literal magic is,
16:55:23leorize[m]1int literal is a special type in the compiler
16:55:26disruptekyou don't talk about literal magic.
16:55:47mipriif you do let x = 1 as well, instead of leaving it a literal, it's a compilation error
16:55:58Zevvthats nasty
16:57:03disruptekno, it's kinda smart.
16:57:51disruptekthink about it; this is a thing which is different from other things that are illiteral.
16:58:17*hnOsmium0001 joined #nim
16:58:45leorize[m]1Zevv: https://nim-lang.org/docs/manual.html#type-relations-convertible-relation
17:00:07*oculux joined #nim
17:00:32*oculuxe quit (Ping timeout: 260 seconds)
17:00:53Zevvah right
17:00:59mipriflexible literals is a really common ergonomic feature in programming languages, I don't think it's that surprising, and other langauges take it farther
17:01:02Zevvthat was pretty obvious
17:01:21disruptekyeah, i'm such an idiot.
17:01:30Zevvsure, but I always explictly convert, never realized this is allowed
17:01:56miprihah I didn't even notice the isIntLiteral(x) in that link until Zevv said it was obvious
17:04:57*abm joined #nim
17:07:05*Axiomatic quit (Remote host closed the connection)
17:07:35Zevvhehe
17:15:46disruptekhow about this idea for a project: something whatfer pair programming on-stream. like kibbitz back in the day.
17:17:33Zevvvi + screen + mumble + twitch?
17:17:53Zevvcan even do a trio if you like these kinds of things
17:19:10miprihttps://www.codetogether.com/pricing/ only $1750/year for the non-saas edition
17:19:24disrupteklol
17:19:39disrupteksorry, i lagged out.
17:20:52disruptekyeah, i was thinking 3-4, but maybe 5-6 could be interesting too, because you can be "on deck".
17:26:01disruptekthis is how we should do the 48hr nim jam.
17:27:03disruptekactually, we can stream 2 or 4 windows on the screen at once.
17:27:09*rockcavera quit (Remote host closed the connection)
17:27:28disruptekor even have two streams going.
17:27:34disrupteksuch a neat idea.
17:27:39disruptekwe should totally build this.
17:27:50disruptekalso, i may be high.
17:37:27*letto_ joined #nim
17:37:49*letto quit (Read error: Connection reset by peer)
17:39:18*lritter joined #nim
17:55:51*Axiomatic joined #nim
17:55:57*Axi0matic joined #nim
17:56:12*lmariscal quit (Quit: I'm Out!)
17:56:16*Axi0matic quit (Client Quit)
17:57:14*lmariscal joined #nim
17:58:15*lmariscal quit (Client Quit)
17:58:35*lmariscal joined #nim
18:05:29*sealmove quit (Quit: WeeChat 2.9)
18:07:36*witcoffee joined #nim
18:10:02*witcoffee left #nim (#nim)
18:15:35federico3can we remove the "Generated: <timestamp>" line from nim doc or replace it with a version number?
18:16:05leorize[m]1export SOURCE_CODE_EPOCH to lock it into a number of your choice
18:16:17leorize[m]1if you wanna get rid of that you'll have to modify nimdoc.cfg and it's a pain then
18:16:32federico3I'l already maintaining a patch that I re-apply to every release...
18:17:27*arecacea1 quit (Read error: Connection reset by peer)
18:17:45federico3and SOURCE_CODE_EPOCH seems to be gone
18:17:54*arecacea1 joined #nim
18:20:00federico3leorize[m]1: are you sure it is in the codebase?
18:21:09*natrys quit (Quit: natrys)
18:27:15FromDiscord<ITR> vs code is annoying me, so i feel like starting a spaces vs tabs discussion, lol
18:28:31disruptektabs makes more sense to me but our ecosystem is too small to suppose more than one style.
18:28:31FromDiscord<Rika> dont do it
18:28:38disrupteks/suppose/support/
18:30:33FromDiscord<ITR> nvm, i managed to find the tabs-as-spaces extension for vs code
18:30:49FromDiscord<ITR> idk why it's so hard to find :|
18:30:57FromDiscord<exelotl> I prefer tabs, like indentation is literally what they're for gdi xD
18:30:58FromDiscord<ITR> idk why it's not built into the editorrr
18:31:27FromDiscord<exelotl> but also I appreciate that nim picks one and enforces it
18:31:42FromDiscord<ITR> yeah, that's one of my fav parts of go
18:32:05FromDiscord<Rika> i do not like how nim enforces it, since everything else nim doesnt enforce
18:32:16FromDiscord<Rika> hell we have partial style insensitivity for fucks sake
18:32:33disruptek"not just any whitespace, OUR whitespace"
18:32:53disrupteki agree, exelotl. but what can you do.
18:33:27disrupteki think it was an example of araq copying bad design simply because guido regretted not using spaces. but that's just my opinion.
18:35:33FromDiscord<ITR> personally i prefer tabs for indentation and spaces for alignment
18:36:19disruptekdepending on whether the checksum of the file is odd or even, i use a tab every four spaces, or once every three spaces.
18:36:44disruptekwhich it is varies with the checksum of the last modification timestamp.
18:37:07*arecacea1 quit (Remote host closed the connection)
18:37:21disruptekwhich i render as a string and then rot13 encode for security.
18:37:38*arecacea1 joined #nim
18:38:09supakeeni indent with the fibonacci style
18:41:26FromDiscord<ITR> Is there any way to mark a proc to only be removed in release builds? I put a `when defined(release): return` in it, but not sure if there's a better way or not
18:41:53disruptekyou can just when out the proc.
18:42:01FromDiscord<Rika> yeah
18:42:30FromDiscord<ITR> like, before defining it? so even if I call it somewhere it won't complain?
18:44:21FromGitter<iffy> I'm trying (my first time) to fix a bug in the compiler. I've got a test case in `tests/vm/tvmmisc.nim` which fails when I do `nim c -r --gc:orc tests/vm/tvmmisc.nim`. Is there a quicker way to test a fix than compiling a new `nim` binary each time I try something?
18:44:42disruptekno.
18:45:17FromGitter<iffy> Second question: does the Nim CI run tests with both default GC and ARC/ORC?
18:45:25disruptekyep.
18:45:32FromGitter<iffy> Great, thanks!
18:45:57disrupteki've taken to using testament for testing, directly, because koch is too big a pita.
18:46:44FromDiscord<neow> 48 hr nim jam?
18:46:51FromDiscord<neow> like make something in nim in 48 hours?
18:46:53FromDiscord<neow> when is that
18:46:58leorize[m]1@Rika well it's a lesson learned from python
18:47:04FromGitter<iffy> I don't understand testament or koch, so I'm just running the `nim c -r`
18:47:06disrupteki don't have a date, yet.
18:48:02FromDiscord<neow> sounds like something I'd participate in if the date suits me
18:48:15FromDiscord<neow> (if the date is not during exam season)
18:48:35disruptekneat, that's one.
18:53:04FromGitter<iffy> Any tips on debugging a compiler bug (link to docs are fine)? My usual approach of adding `echo` statements everywhere doesn't work so well with these PContexts and PNodes
18:53:28FromGitter<iffy> derp... I should read the next section of intern.rst
18:56:49disruptekuse debug instead of echo.
19:01:26FromGitter<iffy> What about for things that don't have a `$` proc?
19:01:50FromGitter<iffy> PContext and PNode is where I'm at right now
19:02:17disruptekwell, i don't think pcontext has a debug overload ๐Ÿคฃ
19:02:24disruptekpnode does, though.
19:02:33FromGitter<iffy> oh yep, sure enough
19:02:39disruptekit's for ast.
19:04:49*Vladar quit (Quit: Leaving)
19:18:29FromGitter<iffy> Where can I find out what `magic` does in this: `n[0].sym.magic` (n is a `PNode`)?
19:19:29disrupteklook up whether magic is a field in ast.nim or grep if it's a proc.
19:24:15FromGitter<iffy> field; thanks for the tip on `ast.nim` -- that'll be a handy file
19:28:30*lritter quit (Quit: Leaving)
19:53:24FromGitter<iffy> disruptek: thanks for your help -- I found the source of the bug (though I don't know how to fix it as I think it will require someone to decide what's supported/not). Thanks!
19:59:29*vicfred joined #nim
20:23:55*TomDotTom joined #nim
20:24:01disrupteknice.
20:41:02FromDiscord<notchris> Is there a library for creating c bindings in nim? I thought I heard of one once
20:41:13disruptek!repo nimterop
20:41:15disbothttps://github.com/nimterop/nimterop -- 9nimterop: 11Nimterop is a Nim package that aims to make C/C++ interop seamless 15 220โญ 20๐Ÿด 7& 11 more...
20:42:09FromDiscord<notchris> Thank you!
20:43:47notchrisdisruptek: So the lib im trying to wrap isn't that complex, though I did have another question
20:43:56notchrisI have the source repo, and within it has the header file
20:44:12notchrisbut when i got the lib off of homebrew, all i see in my local files are the binary
20:46:18*bung joined #nim
20:52:59disruptekwhat's the punchline.
20:56:39*astronavt joined #nim
20:57:12*tane quit (Quit: Leaving)
21:02:12Zevvpmunchline
21:06:15FromDiscord<Recruit_main707> https://tenor.com/view/ba-dum-tsss-punchline-gif-7320811
21:06:42disruptek#15564 makes me so sad.
21:06:43disbothttps://github.com/nim-lang/Nim/pull/15564 -- 3Make IntSet a generic ordinal set OrdSet[A]
21:09:11*haxscramper quit (Remote host closed the connection)
21:14:09FromDiscord<William_CTO> sent a code paste, see https://play.nim-lang.org/#ix=2BSY
21:15:27*jonjitsu[m] joined #nim
21:15:36*johnzorn left #nim ("WeeChat 2.8")
21:22:30FromDiscord<dom96> What makes you think `HttpHeaders` is an enum?
21:26:46FromDiscord<William_CTO> Sorry, I got it confused with httpMethod
21:27:10PrestigeWould it be faster to check equality of an enum state, or to invoke an empty proc?
21:27:46*solitudesf quit (Ping timeout: 246 seconds)
21:27:49disruptekcheck the enum.
21:27:58PrestigeThanks
21:28:18disruptekunless it's not in cache, i guess.
21:28:32disrupteksuch a weird question. what are you even doing?
21:29:51Prestigegame engine things, using an object variant if an enum check will be faster. If the object is renderable, I'd pass it to a render proc
21:30:28Prestigeor invoke a render method which would be empty
21:30:31disruptekah.
21:31:05disruptekit's unlikely to matter, but i'd use a template that may call the renderer if it's renderable (check the enum).
21:31:24PrestigeSounds good. Thanks
21:31:38disruptekit will be as easy to read and may save some cycles when the enum matches, etc.
21:46:08FromDiscord<Recruit_main707> how can i make a macro expect a seq[Object] and treat it as such?
21:46:51FromDiscord<lqdev> `macro foo(x: seq[Object]) =`
21:47:01FromDiscord<lqdev> but macros deal with AST
21:47:19FromDiscord<lqdev> so you'll get the NimNode representing your `seq[Object]`
21:47:55FromDiscord<lqdev> alternatively, if your seq is known at compile time, you can do `x: static seq[Object]` and then you get an actual seq
22:10:19*Sembei joined #nim
22:23:07*TomDotTom quit (Ping timeout: 260 seconds)
22:28:48*mbomba joined #nim
22:42:03*opal quit (Ping timeout: 240 seconds)
23:02:31*vicfred quit (Quit: Leaving)
23:03:31FromDiscord<Gyllou> hiya
23:05:04FromDiscord<Gyllou> did anyone here work on weave?
23:11:16FromDiscord<Gyllou> anybody know what the underlying message passing mechanism is with channels then?
23:13:35leorizenot sure how weave channels work, but nim channels are done with a shared buffer and some locks
23:13:51leorizehttps://github.com/nim-lang/Nim/blob/devel/lib/system/channels.nim <- here's Nim's channel implementation
23:14:01leorizemratsim wrote a better one for weave but I've not read it yet
23:15:51FromDiscord<Gyllou> okay, ill look through that, based on his source code it looks like he uses nim channels in there to some degree as well. im not familiar with the idea of channels, bc ive never really used go which i think is only place I've heard of them before.
23:29:50*bung quit (Ping timeout: 256 seconds)
23:58:43*bung joined #nim
23:59:58*apahl quit (Remote host closed the connection)