<< 27-10-2020 >>

00:27:13*krux02 quit (Remote host closed the connection)
00:34:36FromDiscord<Avatarfighter> @Gyllou You can always dm him πŸ™‚ He responds and doesn't bite πŸ˜›
00:46:20AxiomaticAre the nim compiler version, and the version of nim, one and the same thing? Or how does it work?
00:46:59AxiomaticFor full marks, do not state your answer in the form of a question.
00:47:43*leorize quit (Ping timeout: 240 seconds)
00:48:17mipri1. you could conveivably ship a compiler of nim with a different stdlib, and this would violate the versions being one in the same, but this doesn't happen, and why would you?
00:49:05mipri2. if Nim develops additional compilers then a distinction between language version and compiler version might be introduced, as in C++17 vs. gcc and clang versions
00:50:41mipriat present there's just Nim 1.0, 1.2, 1.4
00:51:01AxiomaticSo, at present, nim --version is effectively the right way to retrieve "the" version of nim?
00:51:29mipriyeah. what else would you be looking for?
00:52:15AxiomaticI'm new, so it's not a deep question, just a basic howto
00:53:24AxiomaticIn the docs it mentions " Since version 0.8.2..." and I was just checking how to check that value against what I have installed.
00:54:22mipriok, that's from the same numbering scheme as nim --version gives you
00:57:42*mbomba quit (Ping timeout: 260 seconds)
00:59:51FromDiscord<shujidev> anyone knows why this doesn't work? [[1,4],[5,6]].map(sum)
01:00:41Axiomatic@mipri tx u
01:00:41FromDiscord<shujidev> it works when I define a sum that accepts arrays but not with the math module that takes an openArray
01:01:40FromDiscord<Revenant> sent a code paste, see https://paste.rs/7kq
01:01:50FromDiscord<Revenant> (edit)
01:02:10FromDiscord<Revenant> i thought you always need to pass in the symbols like in `doStuff2`
01:03:11FromDiscord<ElegantBeef> well templates are code subsitution
01:03:12*TomDotTom quit (Ping timeout: 272 seconds)
01:03:12mipriwhat do you mean 'pass in the symbols'? you're only passing numbers in that code
01:05:05*shu61 joined #nim
01:05:50FromDiscord<Revenant> symbols, literals, whatever... i meant i wasn't aware it has access to the whole scope
01:06:04FromDiscord<Revenant> by default
01:06:34FromDiscord<Revenant> but if it works like that by design, that's cool. wasn't 100% sure if this is intended or maybe a compiler bug
01:06:59FromDiscord<ElegantBeef> Templates basically just get pasted where you called them
01:07:51*Tanger joined #nim
01:08:30FromDiscord<Revenant> cool, understood. thanks man
01:09:45miprishujidev: proc map[T, S](s: openArray[T]; op: proc (x: T): S {.closure.}): seq[S]
01:10:20mipriT is array[0..1, int] here, so sum has to be sum[array[0..1, int]] per the definition of *map*
01:10:50mipribut sum needs to be sum[int] to sum over an array like that
01:11:01mipri... I think that's the problem.
01:11:07FromDiscord<ElegantBeef> You can get away with using mapit https://play.nim-lang.org/#ix=2C9E
01:17:09shu61ok thanks I need to think a little about it
01:18:09shu61what I find weird is that I defined sum like proc sum[T](x:openArray[T]):T = x[0]+x[1] and it didn't work
01:18:28shu61only when I defined it with an array as input proc sum[I,T](x:array[I,T]):T = x[0]+x[1]
01:21:04miprioh yeah. that seems to me to be a bug then
01:21:07shu61@ElegantBeef that's excellent I was afraid I had to define all those functions with tuple inputs for the zip return
01:47:25FromDiscord<MiniApple> what is proc something() {.inline.}
01:47:28FromDiscord<MiniApple> (edit) "proc" => "`proc" | "{.inline.}" => "{.inline.}`"
02:08:38miprisame as inline hints in C. because that's what nim does, it just generates the hint and leaves it to C to inline or not
02:09:32miprihttps://nim-lang.org/docs/manual.html mentions it. inlining is described at https://en.wikipedia.org/wiki/Inline_expansion
02:19:17*apahl quit (Ping timeout: 260 seconds)
02:19:40leorize[m]1note that `{.inline.}` hints are the only way to make nim inline a function across module boundaries
02:20:36*abm quit (Quit: Leaving)
02:21:07*apahl joined #nim
02:26:04FromDiscord<nikki> do options from `.nims` or other module-specific options apply from the source module when inlining?
02:26:22disruptekmodule-specific options?
02:26:52FromDiscord<nikki> specifically asking cuz i was told sink inference is on by default in the stdlib, but i found interestingly that it didn't eg. infer the `val` parameter of the `Option[T]` `some` constructor as a sink and i thought maybe it was bc. it was inlined into my module
02:27:07FromDiscord<nikki> (it would infer it if i did `--sinkInference:on` in my module tho)
02:27:27FromDiscord<nikki> disruptek: whatever the word is for the mechanism that makes sink inference on in stdlib and not in other ones (if that's a thing)
02:27:29disruptekthat's... interesting.
02:27:40FromDiscord<nikki> maybe it's similar to the mechanism for module_blah.nims files
02:28:37disruptekwell, we don't process module.nims. we process entry.nims, though.
02:28:58disruptekand config.nims adjacent and above.
02:29:48FromDiscord<nikki> ah got it
02:29:49disruptekleorize[m]1: inference is off by default in stdlib? or is it on by default? i can't remember.
02:30:19*rockcavera quit (Remote host closed the connection)
02:30:23leorize[m]1on for stdlib, off elsewhere
02:30:26FromDiscord<nikki> it was, in any case, cool to see the behavior with and without inference. i know it could be better but the nim gen'd C code is alfeady so great
02:30:27disrupteki honestly haven't paid close attention during this 1.4 release.
02:30:33FromDiscord<nikki> so much better than reading llvm IR or asm lol
02:30:47disruptekyou should try this:
02:30:50disruptek!pull mangling
02:30:52disbothttps://github.com/nim-lang/Nim/pull/14632 -- 3porting name mangling from ic effort 7& 20 more...
02:30:55disruptekyou'll like it.
02:31:11FromDiscord<nikki> haha seen that. i'll try it if/when i get around to building the repo and not using choosenim (sorry)
02:31:15FromDiscord<nikki> i do have a repo checkout just to browse it tho
02:31:36disruptekwhat's the point of that?
02:31:38FromDiscord<nikki> actually........ i wanna try it more now
02:31:47FromDiscord<nikki> point of which part?
02:31:53leorize[m]1disruptek let me know when you got the mangling rule set pinned so I can make a demangler for it
02:32:02disruptekleorize[m]1: ffs no.
02:32:20FromDiscord<nikki> choosenim: it was just easy and on the homepage and i was new to nim. repo checkout: bc. nim's own source code is p instructive and i can use my lsp stuff to browse it
02:32:31disruptekanyway, it seems we're doing the front-end ic first, and believe me, that's a good thing.
02:32:42leorize[m]1i want a demangler :p what's the point of nice names when I can't use it with my debugger
02:32:58disruptekuse ndi.
02:32:59FromDiscord<nikki> the compilation flags work out with my c/c++ lsp so i can jump around the nim-generated C with goto def too which is a big win
02:33:56disruptekyou're mad.
02:34:38FromDiscord<shashlick> @disruptek: I'm debugging that nimterop issue affecting golden
02:34:58disrupteki can't remember why nimterop has something to do with it.
02:35:07disruptekwasn't it a nimble reqs buglet?
02:35:18FromDiscord<shashlick> basically nimterop is hard-coding the location of the dynamic lib
02:35:49FromDiscord<shashlick> and nimble builds it in temp so the path doesn't exist on install
02:35:49disrupteki thought it located the libs in the project directory.
02:35:56disruptekoh, that makes sense.
02:36:09FromDiscord<shashlick> i can make it a relative path but that would require a nimterop update for you
02:36:40disruptekwell, if you fix it i'll meet you halfway for the sake of the user.
02:36:48disrupteki can't believe anyone is using golden, though.
02:36:55disruptekit's a half-implemented concept.
02:37:13disruptekand most of that needs reimpl using new gittyup and frosty and gram.
02:39:19FromDiscord<shashlick> okay so i looked at nimph and it has a line to compile toast, we could add one for loaf
02:39:38disruptekshould we just look for loaf.nim?
02:40:01FromDiscord<shashlick> is that the only nimterop issue blocking you at this time?
02:40:15disrupteknimterop is only blocking the user.
02:40:47disruptekbut did you manage to build golden manually?
02:40:52disruptekiirc, i tried and i couldn't.
02:42:22FromDiscord<shashlick> i'm still testing my fix
02:44:02disruptekhmm, so maybe something else is broken.
02:50:17FromDiscord<PizzaFox> i rewrote the JS that runs on documentation pages
02:50:23FromDiscord<PizzaFox> how do i PR this
02:51:44shu61hi, do you know if it is possible to escape a `{` symbol within a & string?
02:53:45FromDiscord<shashlick> @disruptek: i'm not able to test this since both gittyup and golden have <= requires statements so my debug version of nimterop doesn't get picked
02:54:32miprishu61: {{
02:55:07shu61I see thanks, couldnt find it anywhere
02:55:56mipriit's demonstrated under Implementation details in https://nim-lang.org/docs/strformat.html
02:56:37mipribut, I think this is *the* problem with Nim docs, that they rely heavily on the reader already knowing what's being documented
02:56:47disruptekshashlick: what does that have to do with it? you can manipulate the .nimble files in those packages locally, no?
02:57:06FromDiscord<shashlick> i did, and then moved the files around, so i think the fix works
02:57:14disruptekah, nice!
02:57:28shu61yes one has to memorize it at sight
02:58:23disrupteki just wrote some ic code against io when i wanted to write it against streams. i don't worry too much about memorizing stuff and it doesn't bite me too often.
02:58:57disruptekfind someone that writes comments and then read their code.
02:59:09disruptekpmunch would be a good one; he seems to write comments.
02:59:18disrupteki write comments. shashlick has been known to write a comment or two.
03:00:42shu61i will do thanks
03:00:52disruptek!repo bump
03:00:53disbothttps://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions 🍻 15 17⭐ 2🍴 7& 1 more...
03:01:04disruptekit's a little thing i made shashlick and i documented the shit outta it.
03:02:42Axiomaticn00b question: given that VSCode is the recommended(?) IDE on Windows, is there consensus for Nim for what to use as a Linux IDE?
03:03:00disruptekmost of us use nvim, but vscode runs on linux, too.
03:03:18disruptekdoesn't it?
03:03:34disruptekseems like it does.
03:03:47Axiomaticnvim you say.. that's in package neovim?
03:03:52disruptekyep.
03:04:01disruptek!repo alaviss/nim.nvim
03:04:02disbothttps://github.com/alaviss/nim.nvim -- 9nim.nvim: 11Nim plugin for NeoVim 15 104⭐ 12🍴
03:04:03FromDiscord<ElegantBeef> Yea vscode runs on linux
03:04:09FromDiscord<ElegantBeef> It's electron afterall
03:04:13FromDiscord<shashlick> okay it doesn't work - i am hoping nim doesn't change a relative dynlib path into absolute but it might be doing that
03:04:24FromDiscord<ElegantBeef> I should setup nvim again
03:04:29disruptek-d:debugDlOpen or whatever?
03:06:36disruptekshashlick: don't we need an absolute path in the binary?
03:06:48AxiomaticVSCode on Linux eh? Let's put that on the maybe pile. And the NimEdit thing is old/deprecated/vapourware, yes?
03:06:58disruptekyes.
03:07:06AxiomaticA'ight
03:07:27disruptekemacs is an option but it has fewer users. some heavy hitters do use it, though.
03:07:34AxiomaticWith no Borland Turbo Nim to be found, there's also not a NimCharm, eh?
03:07:51disruptekluckily not.
03:07:55AxiomaticI don't pretend to be worthy to worship at the temple of emacs.
03:08:00FromDiscord<shashlick> @disruptek: why not a relative path - it is loaded by the binary at runtime on load
03:08:24miprihttps://github.com/fox0430/moe is already pretty capable
03:08:33disruptekshashlick: well, then you can't move the binary, right?
03:09:04disruptekshashlick: oh if the libs are adjacent to the binary then that sounds fine to me.
03:09:13FromDiscord<shashlick> ya that's the case i'm modifying
03:09:23disruptekaha, makes sense, then.
03:09:43*mbomba joined #nim
03:10:41FromDiscord<PizzaFox> can someone smart at nimdoc internals help with https://github.com/nim-lang/Nim/pull/15744
03:10:42disbotβž₯ refactor(nimdoc): rewrite docs JS in Nim
03:21:23*muffindrake quit (Ping timeout: 260 seconds)
03:23:26*muffindrake joined #nim
04:03:54ForumUpdaterBotNew post on r/nim by MrCordigle: Immutable variable assignments and proc declarations, see https://www.reddit.com/r/nim/comments/jiuali/immutable_variable_assignments_and_proc/
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:45*supakeen joined #nim
04:17:09FromDiscord<cabboose> Hey, is the docs for nim-lang.org overlapped by the navigation side bar or is that just me?
04:17:43FromDiscord<cabboose> https://media.discordapp.net/attachments/371759389889003532/770501452945817620/Capture.PNG
04:18:00FromDiscord<Avatarfighter> Its a bug that is fixed upstream I believe
04:28:52leorize[m]1partially fixed, yes
04:29:31*disruptek shakes his fist at the docs.
04:29:35disrupteknever again.
04:41:29*bunbunbunbunny joined #nim
04:46:48*shu61 quit (Remote host closed the connection)
04:57:42*bunbunbunbunny quit (Quit: Lost terminal)
05:08:53*mbomba quit (Quit: WeeChat 2.9)
05:49:06*mbomba joined #nim
05:52:25*mbomba quit (Quit: WeeChat 2.9)
05:57:50*narimiran joined #nim
06:32:23*solitudesf- joined #nim
06:38:03*narimiran quit (Ping timeout: 256 seconds)
06:46:31FromGitter<jrfondren> ah I see, it becomes much easier to use view types when the {.experimental.} is turned on
06:46:54FromGitter<jrfondren> ... that's obvious, but it's funny to me how much my code just reverted to the first thing I'd tried, which now actually works.
06:47:43*narimiran joined #nim
06:48:22leorize[m]1nim is very intuitive, as long as the compiler support the feature you're trying to use :p
07:04:10*BarrOff joined #nim
07:09:45*mmohammadi9812 quit (Ping timeout: 240 seconds)
07:10:10*mmohammadi9812 joined #nim
07:29:10FromDiscord<Recruit_main707> are cpp vectors the same as nim seqs internally?
07:29:37FromDiscord<Recruit_main707> can you cast one to the other?
07:35:30*Tlangir joined #nim
07:37:28*oculux joined #nim
07:38:39*Tanger quit (Ping timeout: 260 seconds)
07:38:46FromGitter<jrfondren> I'm pretty sure they aren't, since they're written in Nim and not with an FFI to C++
07:39:03*oculuxe quit (Ping timeout: 260 seconds)
07:45:03FromDiscord<nikki> yeah they def aren't πŸ˜… you can have an openArray pointing to the memory in an std::vector though. for a c++ view of nim data you could maybe use std::span
07:45:47FromDiscord<Recruit_main707> id need some kind of conversion functions for:↡ cpp vector <-> nim seq
07:55:56*BarrOff quit (Ping timeout: 265 seconds)
07:56:03*mmohammadi9812 quit (Ping timeout: 258 seconds)
07:56:29*mmohammadi9812 joined #nim
08:02:36FromDiscord<mratsim> @Gyllou better ask in #science too hard to deal with all notifications
08:13:21*xet7 quit (Quit: Leaving)
08:15:12*xet7 joined #nim
08:37:22FromDiscord<Varriount> @PizzaFox Commented on your PR. Nice work so far!
08:39:12FromDiscord<Varriount> sent a code paste, see https://play.nim-lang.org/#ix=2CaY
08:43:33FromDiscord<Recruit_main707> i only get the sequence of bytes, so id rather skip the creation of a vector and then iterating over it and copying into a seq
08:48:44FromDiscord<Varriount> sent a code paste, see https://play.nim-lang.org/#ix=2Cb1
08:49:01PMunchDamn it, left my IRC client on again.. alehander92, sweet! And Zevv, npeg is working out fantastically!
08:49:48PMunchI would like a way to get which rule did the maxParsed value though, so it would be possible to guess at an error message
08:50:06FromDiscord<Varriount> PMunch: The rule can emit an error
08:51:00PMunchYeah, but won't that just always trigger an error?
08:51:31FromDiscord<Varriount> Not if you put it behind an alternation
08:52:07FromDiscord<Varriount> sent a code paste, see https://play.nim-lang.org/#ix=
08:53:00FromDiscord<Varriount> One moment, let get a proper example
08:53:05*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:54:39FromDiscord<Varriount> sent a long message, see http://ix.io/2Cb3
08:56:17PMunchTrue, but then you need to create all those cases
08:57:28FromDiscord<Varriount> PMunch: You can only reduce things so much
09:00:05*brainbomb[m] quit (Quit: Idle for 30+ days)
09:05:59*hoijui joined #nim
09:10:57*krux02 joined #nim
09:12:15FromDiscord<mu_studio> hey
09:15:45PMunchHello
09:19:51*mwbrown quit (Ping timeout: 260 seconds)
09:24:03*Tlangir quit (Remote host closed the connection)
09:27:00*mwbrown joined #nim
09:30:37ZevvPMunch: hm interesting, how would you want to get the "which rule" part, just the name of the rule?
09:31:22*mwbrown quit (Ping timeout: 246 seconds)
09:34:26*mwbrown joined #nim
09:35:37PMunchThat's what I was thinking, but I'm not sure if that would really help all that much
09:40:16ZevvYou know about the "E" pattern, right?
09:41:29Zevvthe problem with your idea is that it's not just in any rule, it has kind of an active call stack
09:41:42Zevvand it can not know which level of that you are interested in
09:48:24*mbomba joined #nim
09:59:05*hoijui quit (Quit: Leaving)
10:04:56*sealmove joined #nim
10:20:01PMunchZevv, hmm that's true
10:20:19PMunchI guess adding the E patterns to my parser is the best bet
10:22:57sealmoveGuys nimitai is going well :) I think it will be ready to use (with json until we fix nimyaml) before the end of this awesome *cough* year.
10:23:39planetis[m]congrats sealmove :)
10:24:11sealmoveyeah finally after 1 year...
10:24:29sealmoveof not being able to get the design right
10:25:52*solitudesf joined #nim
10:26:12planetis[m]I know that feeling first hand, lol
10:27:07PMunchnimitai?
10:27:08sealmoveplanetis what have you been up to during these busy times? oh also I saw the greek channel on discord.
10:27:30sealmovePMunch: https://github.com/sealmove/nimitai
10:27:47supakeenNeat :)
10:27:49*solitudesf- quit (Ping timeout: 264 seconds)
10:28:28planetis[m]I had no idea there is a greek channel, I don't have discord
10:29:23sealmoveah oh, it's not active at all anyways. just thought it's cool they made it.
10:29:49PMunchsealmove, oh cool
10:34:18planetis[m]a bit of everything, farming in August, (missed my exams ffs), now remote lessons, and in my freetime i coded https://github.com/planetis-m/breakout-ecs
10:37:45planetis[m]you?
10:44:17*abm joined #nim
10:45:22sealmovesdl cool! similar. I moved back to Athens (was studying in Tripoli). Still have 1 year of studies so I am also attending remote lessons.
10:53:51sealmovebtw breakout was my first game ever in gameboy color :D
11:09:20*leorize joined #nim
11:09:23*mbomba quit (Quit: WeeChat 2.9)
11:23:40*TomDotTom joined #nim
11:25:06*lritter joined #nim
11:25:42FromDiscord<Yardanico> so, about https://github.com/nim-lang/Nim/pull/15747 - do we prefer british or american english in docs?
11:25:42disbotβž₯ Massive documentation fixes + copy editing
11:25:51FromDiscord<Yardanico> because that PR changes some correct british english spellings into american english ones
11:26:02FromDiscord<Yardanico> like "afterwards" -> "afterward", "initialisation" -> "initialization"
11:26:33supakeenI don't feel it matters much.
11:26:55supakeenBut since the entire PR is minor fixes maybe it's a thing in this case.
11:27:38mipriit's not fixing anything though in these cases.
11:29:31ForumUpdaterBotNew thread by KnorrFG: Mysterious crashed with SIGSEGV, see https://forum.nim-lang.org/t/6990
11:30:09miprian example of a pass that would change such things, is one to make a document more consistent. initialisation is fine; initialization in one paragraph and then initailisation the next isn't as fine.
11:30:57FromDiscord<Yardanico> yes, that's true
11:31:15mipribut if the PR is just running down an automatic grammar checker and making complaints go away--forget it. You'll just get that exact same kind of inconstency when the source of the 'corrected' spelling comes back to add more to the document
11:32:10FromDiscord<Idefau> use Australian english
11:32:13FromDiscord<Yardanico> mate
11:32:25FromDiscord<Idefau> Hungry Jack's
11:42:05FromDiscord<Yardanico> !last narimiran
11:42:05disbotnarimiran joined 12#nim 4 hours ago and last spoke 724 hours ago https://irclogs.nim-lang.org/26-10-2020.html#11:21:51
11:42:32FromDiscord<Yardanico> narimiran: what do you think about https://github.com/nim-lang/Nim/pull/15747 ? I mean the change of british spellings to american spellings
11:42:33disbotβž₯ Massive documentation fixes + copy editing
11:48:03narimirani personally more like british spelling (when writing my own stuff), but in the end i probably use a mix of both because i'm not careful/knowledgeable enough. as for the official nim documents - i'm not sure what is preferred
11:48:39FromDiscord<Yardanico> need to ask Araq then? :)
11:49:35narimiranhe has more important stuff on his plate ;)
11:52:19miprihttps://github.com/nim-lang/Nim/blame/devel/doc/backends.rst
11:52:53mipriinitialize with a z is already there two times, and both from Araq looks like, so new text that's added to the document would also have the z
11:53:10mipriso the Americanization both makes the document more consistent with itself and more consistent with likely additions
11:53:25miprithe initialise with an 's' was someone else
11:57:23*rockcavera joined #nim
11:59:58TomDotTomwrt British vs. Murcian spellings, I've found it's best to follow a single style as outlined by the project. It's much more common to use US English.
12:00:54TomDotTomNim docs appear to use Murican English.
12:01:39*BarrOff joined #nim
12:05:04narimiranok, i'm convinced :)
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:37*supakeen joined #nim
12:10:36*NimBot joined #nim
12:14:19TomDotTomAs a Brit it always hurts a little to omit the 'u' from colour :(
12:14:47narimiranas a non-brit, same here
12:14:53narimiranand neighbour too
12:15:21FromDiscord<Yardanico> @TomDotTom I like colour too :)
12:15:31FromDiscord<Yardanico> and neighbour, initialisation, afterwards, etc
12:15:52PMunchWait, how do they spell afterwards?
12:15:57FromDiscord<Yardanico> afterward
12:15:59FromDiscord<Yardanico> :D
12:16:26TomDotTomHow does everyone feel about 'Maths'
12:16:37TomDotTomDrives my murican wife up the wall :D
12:16:40FromDiscord<Yardanico> Seems like my ForumUpdaterBot stopped crashing after I added the missing .close() statements :)
12:16:44FromDiscord<Yardanico> !last ForumUpdaterBot
12:16:45disbotForumUpdaterBot spoke in 12#nim-news 66 seconds ago
12:16:50FromDiscord<Yardanico> what about uptime
12:17:30FromDiscord<Yardanico> (it was crashing because it hit the max open files limit - I wasn't closing AsyncHttpClient instances)
12:18:59Yardanico!status
12:19:01FromDiscordUptime - 6 days, 16 hours, and 42 minutes
12:19:07Yardaniconice, almost a week for the bridge
12:19:57FromDiscord<Rika> afterwards has no s in american english?!
12:20:00FromDiscord<Yardanico> no
12:20:09FromDiscord<Rika> but y tho
12:20:25FromDiscord<Yardanico> well afterwards is used too, but afterward is more common
12:20:31FromDiscord<Yardanico> @Rika just american vs british english things
12:20:31FromDiscord<Yardanico> https://dictionary.cambridge.org/dictionary/essential-american-english/afterward
12:20:37FromDiscord<Yardanico> https://github.com/nim-lang/website/pull/241
12:20:38disbotβž₯ versions 1.2.8 and 1.0.10 released
12:22:44FromGitter<jrfondren> procCall is a little bit tricky: https://play.nim-lang.org/#ix=2CbZ
12:23:53PMunchI vote for writing all the docs in british english
12:24:13FromGitter<jrfondren> oh .procCall works, and that looks nicest anyway
12:24:21PMunchI tend to name my variable colour for example, but all the procedures and stuff is always color..
12:24:26PMunchMakes the code look really weird
12:24:55FromGitter<jrfondren> {.experimental: "dialectInsensitivity".}
12:25:01narimiran:D
12:25:13leorize[m]1https://forum.nim-lang.org/c/3 <- we have the Docs category on the forum
12:25:17FromDiscord<Yardanico> @PMunch I vote for it too :)
12:25:28FromDiscord<Yardanico> @leorize good idea
12:25:53PMunchGood thing you mentioned that about newAsyncHttpClient, had a look at my own code and I had forgotten it as well :)
12:26:10FromDiscord<Yardanico> haha
12:26:22FromDiscord<Yardanico> yeah I was really ashamed when I realised the cause
12:27:34FromGitter<gogolxdong> Is there a handy way to find index of some element?
12:28:16FromDiscord<Yardanico> .find
12:28:52FromDiscord<Yardanico> https://nim-lang.org/docs/system.html#find%2CT%2CS
12:29:39ForumUpdaterBotNew thread by Miran: Nim 1.2.8 and 1.0.10 are released, see https://forum.nim-lang.org/t/6992
12:29:47Yardanicoleorize[m]1: https://forum.nim-lang.org/t/6991
12:29:51YardanicoI made a thread to vote about it
12:29:51narimiranthanks, bot!
12:29:58Yardaniconarimiran: :P
12:31:19Yardanicopoor man's poll
12:31:42narimiranYardanico: where is "it doesn't matter" option? :P
12:32:07Yardanicodone
12:32:08leorize[m]1you signify that by not voting :P
12:32:21narimiranleorize[m]1: *voting for both
12:32:22FromGitter<gogolxdong> for seq or array?
12:32:31Yardanico@gogolxdong it'll work for both
12:32:39Yardanicoit'll in fact work for any types that have items and == defined
12:35:05*luis_ joined #nim
12:43:12FromGitter<gogolxdong> found find in system.nim, thanks!
12:48:15*luis_ quit (Quit: luis_)
12:58:53*WilhelmVonWeiner quit (Ping timeout: 258 seconds)
13:05:37*dadadani joined #nim
13:39:50ForumUpdaterBotNew thread by Wilypomegranate: Equivalent stdlib data structure to std::map, see https://forum.nim-lang.org/t/6993
13:49:57PMunchI there any way to fix this? https://github.com/Dualog/Dualog.Insights.git
13:50:00PMunchhttps://github.com/nim-lang/Nim/pull/15729/checks?check_run_id=1308768715
13:50:01disbotβž₯ Implements streams for sockets
13:50:10PMunchWoops, that was an entirely wrong URL :P
13:50:25PMunchThe second one is correct though
13:50:51Yardanicotry to add nimcall pragma to your stream procs?
13:54:21PMunchNope, didn't help
13:54:22*TomDotTom quit (Read error: Connection reset by peer)
13:54:26PMunchI mean they should already be nimcall..
13:54:53PMunchlib/pure/socketstreams.nim(146, 22) Error: type mismatch: got <proc (s: Stream){.nimcall, gcsafe, locks: <unknown>.}> but expected 'proc (s: Stream){.nimcall, gcsafe.}' .tag effects differ
13:54:56PMunchNow I just get that
13:57:50FromDiscord<Rika> well its in the end of the error
13:59:49Yardaniconah
13:59:56Yardanicoit's the whole error in that case :)
14:00:22Yardanico@Rika https://github.com/nim-lang/Nim/pull/15729/checks?check_run_id=1308768715#step:13:3325
14:00:23disbotβž₯ Implements streams for sockets
14:04:56PMunchsocket.close can apparently have RootEffect, which isn't listed in stream.close
14:06:44*TomDotTom joined #nim
14:12:28*BarrOff quit (Ping timeout: 260 seconds)
14:32:50FromDiscord<lqdev> can someone explain to me, what's the point in having a binary tree table (or std::map)?
14:32:58FromDiscord<lqdev> hash tables seem much superioe
14:33:00FromDiscord<lqdev> (edit) "superioe" => "superio"
14:33:02FromDiscord<lqdev> (edit) "superio" => "superior"
14:33:14Zevvsupermario
14:33:25FromDiscord<lqdev> i had a stroke there
14:33:42ZevvI don't realle get your question, tho
14:33:58ForumUpdaterBotNew thread by Enthus1ast: How to handle non ordinal enums (enum with holes), see https://forum.nim-lang.org/t/6994
14:34:39FromDiscord<lqdev> Zevv: what's the point of btreetables if regular tables are better.
14:35:03Zevvin general, or in nim?
14:35:06Zevvand how are they 'better'
14:35:10Zevvthey are different
14:35:32FromDiscord<lqdev> yeah, but tables have better lookup performance being O(1)
14:35:59FromDiscord<lqdev> iirc btreetables have O(log n) but i don't remember
14:36:19FromDiscord<Rika> but look up performance isnt everything innit
14:36:22Zevvhash tables need to handel collisions
14:36:34Zevveither by popping to the next bin or putting a list under every bin
14:37:21Zevvthere's probably tons of 'vs' lists on the internets. It's apples and oranges
14:37:28Zevvbut for "general purpose" hashes should usually be fine
14:37:49FromDiscord<lqdev> ok, so when do i use btreetables?
14:38:05Zevvordering.
14:38:57*Kaivo quit (Ping timeout: 260 seconds)
14:40:54Zevvhash tables also generally have more overhead as they should keep emtpy slots for insertions. OTOH they usually are more cache friendly
14:40:56*Kaivo joined #nim
14:44:42FromGitter<jrfondren> you might also prefer trees as you want to make reliably good use of space while potentially having a huge amount of data. That's where you see them, in on-disk databases and stuff like rbldnd's ipv6 trie
14:46:40FromGitter<jrfondren> I'm working on a maxmind db reader now and their datasets come as a tree in a blob. Not a huge one, only megabytes for GeoLite2-Country.mmdb, but that'd be a lot larger if instead of cidr keys you had one IP per bucket
14:47:09FromGitter<jrfondren> and that's another advantage of trees: they can be clever with how keys are looked up, vs. hash tables which have more constraints
14:49:02FromGitter<jrfondren> if you want a rule, use arrays and hash tables until you can't anymore :p
14:51:39FromDiscord<lqdev> anyone has good resources on writing indentation-based parsers? i've been struggling to create one lately but can't figure out how to handle newlines properly
14:52:01ForumUpdaterBotNew thread by Psirus: Compile-time if and/or syntax conflicts, see https://forum.nim-lang.org/t/6995
14:58:45Yardanico7000th forum thread soon!
15:01:09Yardanico@lqdev btw I beat you because that thread was moderated and I approved the user myself :P
15:02:06FromDiscord<lqdev> burn rubber
15:04:38*rokups joined #nim
15:13:42*Kaivo quit (Quit: WeeChat 2.9)
15:14:47*Kaivo joined #nim
15:50:06*hnOsmium0001 joined #nim
15:59:11*liblq-dev joined #nim
15:59:16*liblq-dev quit (Client Quit)
15:59:24*liblq-dev joined #nim
15:59:40*liblq-dev quit (Client Quit)
16:07:55disruptekhearts and minds, people; hearts and minds!
16:13:32FromDiscord<shashlick> @disruptek - this nimterop fix is not working - if i put a relative path in, the executable uses current directory as the base instead of its own location
16:14:33FromDiscord<shashlick> considering {.dynlib.} is handled by the compiler, i might need to change the nim code
16:29:36*dadadani quit (Remote host closed the connection)
16:33:06FromDiscord<g5becks> Hi, I am new to Nim
16:33:07disruptekit sounds like a nim bug to me.
16:33:19disruptekshashlick: if you build it, i will thumb it.
16:33:20FromDiscord<g5becks> primarly use Typescript and Go
16:33:29FromDiscord<Rika> welcome
16:34:04FromDiscord<g5becks> Can anyone tell me what the equivalent of typescript 'any' or Go 'interface{}' is in Nim
16:34:18FromDiscord<g5becks> @Rika glad to be here
16:34:34FromDiscord<g5becks> I looked around
16:34:35FromDiscord<Rika> i do not know what either is
16:34:48FromDiscord<g5becks> Could'nt seem to find it.
16:35:11disruptekdescribe `any`.
16:35:25disruptekor just paste 3-5 lines that demo it.
16:35:25FromDiscord<g5becks> Basically, its type that allows any type to be used. Basically. disables type checking for a param
16:35:29FromDiscord<g5becks> or variable
16:35:35FromDiscord<g5becks> In C#
16:35:38FromDiscord<Rika> use a generic type
16:35:44FromDiscord<g5becks> the type would be dynamic
16:36:24disruptekwe have auto, but it has extremely few uses that aren't code smell.
16:36:40FromDiscord<g5becks> Yea
16:36:42disruptekuse a generic.
16:36:49FromDiscord<Rika> auto isnt dynamic either, vars must still be the same type across its life
16:36:51FromDiscord<g5becks> it's a code smell in TS and Go as well
16:37:08FromDiscord<g5becks> but I am attempting to write a go generator
16:37:15FromDiscord<g5becks> code
16:37:32FromDiscord<g5becks> I want to transform some typescript code to nim
16:37:41FromDiscord<g5becks> I need a 1 to 1 mapping of this type
16:38:04FromDiscord<Rika> then prolly auto
16:39:10FromDiscord<g5becks> @Rika thanks
16:39:13FromDiscord<g5becks> Actually
16:39:17FromDiscord<g5becks> just found it
16:39:22FromDiscord<Rika> `any`?
16:39:27FromDiscord<g5becks> Nim has an any type
16:39:35FromDiscord<Rika> i dont remember the difference between `any` and `auto`
16:39:42FromDiscord<g5becks> https://nim-lang.org/docs/system.html#any
16:40:22FromDiscord<lqdev> `any` makes your proc implicitly generic
16:42:24FromDiscord<g5becks> That makes sense.
16:42:32FromDiscord<g5becks> It's my first day coding nim
16:43:14FromDiscord<g5becks> So I think Ill be doing lots of digging
16:43:20FromDiscord<g5becks> thanks again
16:43:49FromDiscord<Rika> hey no one understands a whole damn programming language in a day
16:44:05FromDiscord<Rika> unless youre dis.rup.tek or something maybe
16:44:09FromDiscord<Recruit_main707> and nim is complex
16:45:12FromDiscord<g5becks> Yea, but I am surprised by how much the semantics of the language map directly to typescript code
16:45:25FromDiscord<g5becks> as far as the type system is concerned anyway
16:46:02FromDiscord<g5becks> It seem very flexible
16:46:09FromDiscord<Recruit_main707> it is indeed
16:46:58FromDiscord<Recruit_main707> probably even more thantypescript
16:47:43FromDiscord<g5becks> From my first impression. I would say that might be true due to the meta programming abilities
16:48:06FromDiscord<g5becks> Nim is probably the only language that can make the claim
16:48:20FromDiscord<g5becks> As far as statically typed languages go
16:55:13ZevvRika: I claim that a language lik Go is totally understandable in a day
16:55:20ZevvNim, not so
16:56:51FromDiscord<Recruit_main707> @g5becks metaprogramming doesnt allow you to change the syntax, its just very exploitable on purpose, (even 99% of python can be parsed as nim code)
16:56:58Zevvand disruptek is probably not particulary smart, he's just *extremely* prolific. That will bring you a loooong way
16:57:14FromDiscord<Recruit_main707> `Macros cannot change Nim's syntax because there is no need for it β€” the syntax is flexible enough.`
16:57:25FromDiscord<Rika> rip pinged someone named nim
16:57:59Avatarfighter[m]Hello hello everyone πŸ‘‹
16:58:12FromDiscord<Rika> who are you
16:58:18FromDiscord<Rika> never met this man in my life
16:58:35FromDiscord<Rika> > and disruptek is probably not particulary smart, he's just extremely prolific. That will bring you a loooong way↡i was joing
16:58:37FromDiscord<Rika> joking
16:58:44FromDiscord<MiniApple> hmm
16:58:50FromDiscord<MiniApple> hello hello hello hello hello hello
16:59:18FromDiscord<g5becks> @Recruit_main707 Are you familiar with typescript?
16:59:40FromDiscord<Recruit_main707> not really
16:59:48FromDiscord<g5becks> I was referring to the metaprogramming because there is no language that would be abel to do the things typescript does
16:59:54FromDiscord<g5becks> without meta programming
17:00:14FromDiscord<g5becks> It has a lot of the same features as nim
17:00:33FromDiscord<g5becks> except its not done via macros
17:00:43FromDiscord<g5becks> well, at least not user defined
17:03:42FromDiscord<William_CTO> What is the nim-lang.org site written in?
17:03:50narimiranenglish
17:04:14FromDiscord<William_CTO> Ask a silly question, get a silly answer πŸ™‚
17:06:08FromDiscord<William_CTO> jekyll is the answer I was looking for
17:06:17narimiran:)
17:10:21FromDiscord<William_CTO> Going repost this from #webdev to get some more opinions :)↡In your opinion, what's the best module/framework for a web server. All it will be doing is allowing users to login with discord then once logged in, redirect them to another site that uses jwt for authentication
17:11:13FromDiscord<martinium> when working with futures in async code are we able to use generics as an expected value type for a future?
17:11:32FromDiscord<martinium> or does it have to have an explicit declared type each time
17:11:52FromDiscord<lqdev> you can use generics just fine with futures
17:12:45FromDiscord<martinium> Futures[T] would work in a proc just fine as Futures[JsonNode]
17:13:05FromDiscord<martinium> That would save me a ton of time
17:13:38FromDiscord<lqdev> `proc thing[T](fut: Future[T]) = discard`
17:13:51FromDiscord<lqdev> or `thing[T](): Future[T] = discard`
17:14:42TomDotTomWilliam_CTO: Can't you do this with a simple proxy?
17:15:44TomDotTomOr, another angle, can't this redirect be baked into the other site/app directly?
17:16:51TomDotTomThe other site is, after all, capable of performing jwt validation, and hence can redirect when needed.
17:17:15FromDiscord<William_CTO> I don't own the other site
17:17:46FromDiscord<William_CTO> Sure I could throw this together with php or python, but I think this would be a good candidate for a first project
17:18:59TomDotTomNot actually built a web-service myself in nim. So any advice I gave would be pure conjecture.
17:19:13Zevvdude who'se all these people
17:19:31Zevvdid we suffer exponential growth?
17:19:43ZevvHullo, ya'll fellow nimmers!
17:21:09FromDiscord<Rika> nimmers vs nimions
17:21:10FromDiscord<nikki> hi πŸ˜„
17:21:11FromDiscord<martinium> @lqdev so are you saying that a Future[T] is automatically discarded?
17:21:14TomDotTomHallo
17:21:15FromDiscord<Rika> im more of a nimion myself
17:21:31FromDiscord<Rika> > so are you saying that a Future[T] is automatically discarded?↡its just an example, i believe
17:21:33FromDiscord<martinium> nimion sounds way cooler
17:21:35TomDotTomnimdiot maybe ?
17:21:39FromDiscord<martinium> rolls off the tongue better
17:21:43FromDiscord<g5becks> πŸ–οΈ
17:21:44FromDiscord<lqdev> @martinium no, why?
17:21:58FromDiscord<Rika> tomdottom: are you describing yourself?
17:21:59FromDiscord<martinium> you just used = discard as an example?
17:22:10FromDiscord<nikki> @martinium you can put anything in the function body. in this case the body was `discard`
17:22:29TomDotTomRika: obviously :)
17:23:34FromDiscord<martinium> @nikki gotcha just making sure I didn't read into the example too much
17:23:58FromDiscord<nikki> yeah it's a normal proc, just happens to take a future which is just a type
17:26:29*PMunch quit (Quit: leaving)
17:28:58disruptekwhen you thread a lot of needles, you're able to look at any needle and choose the right thread.
17:29:44FromDiscord<Rika> how are you so wise
17:32:35disrupteklead paint probably has something to do with it.
17:42:26*tane joined #nim
17:44:58Zevvright about the needles
17:45:00FromDiscord<martinium> nice
17:45:57FromDiscord<martinium> in Nim does marshalling json to an object offer any performance benefits vs accessing the key:values directly?
17:49:25FromDiscord<dom96> it likely offers a performance penalty
17:55:39FromDiscord<martinium> interesting
17:55:50FromDiscord<martinium> sent a code paste, see https://play.nim-lang.org/#ix=2CdE
17:55:50FromDiscord<martinium> where is my error here
17:56:14FromDiscord<martinium> sent a code paste, see https://play.nim-lang.org/#ix=2CdF
17:56:15disruptekyou can only await inside .async procs.
17:56:21FromDiscord<martinium> ahh the pragma
17:56:23disruptekuse `waitfor`.
17:57:33FromDiscord<martinium> sent a code paste, see https://play.nim-lang.org/#ix=2CdH
17:58:24disruptekwhy does your request yield the same type as its url input?
17:58:45FromDiscord<martinium> was following the example on nim tutorial II
17:58:58disruptekwell, maybe give your proc an argument, for starters.
17:59:12FromDiscord<martinium> oh duhh wow
17:59:35FromDiscord<martinium> there we go
17:59:40FromDiscord<martinium> what a dumb error
17:59:54FromDiscord<martinium> (edit) "what a dumb error ... " added "on my part"
18:00:46*luis_ joined #nim
18:00:59FromDiscord<Rika> lol
18:12:07*luis_ quit (Quit: luis_)
18:14:27*BarrOff joined #nim
18:26:11FromDiscord<martinium> what is the correct way to add query parameters to a URL in a request? Multipartdata or parseUri?
18:27:40FromDiscord<Rika> Parseuri
18:28:03FromDiscord<Rika> I believe multipart data is not relevant to query parameters
18:28:11FromDiscord<martinium> gotcha, good to know
18:31:45*astronavt quit (Quit: Leaving)
18:32:17*hyiltiz quit (Ping timeout: 260 seconds)
18:42:51*hyiltiz joined #nim
18:42:51*hyiltiz quit (Changing host)
18:42:51*hyiltiz joined #nim
18:44:28*natrys joined #nim
18:59:22*rokups quit (Quit: Connection closed for inactivity)
19:10:17FromGitter<matrixbot> `ergpopler` pp
19:10:23FromGitter<matrixbot> `ergpopler` ergpopler: ergpopler ergpopler ergpopler
19:10:27disrupteknoted.
19:10:39FromGitter<matrixbot> `ergpopler` * hi
19:11:12FromGitter<matrixbot> `ergpopler` Nim is written in nim how tf
19:11:18Zevvit's magic
19:11:40disruptekthe first chicken to lay a nim egg was named nim.
19:11:45disruptekgo figure.
19:11:53FromGitter<matrixbot> `ergpopler` how was nim made in nim if nim wasnt made because nim didnt exist because nim is nim and its made of nim whiuch didnt exust
19:12:12Zevvhow was C made
19:12:40FromGitter<matrixbot> `ergpopler` oh yeah egg scenario, nim was made in prenim and prenim didn't have to be made in nim 😎
19:12:41Zevvbecause C compilers are typically written in, you know, C
19:13:12FromGitter<matrixbot> `ergpopler` bcz they were compiled in a c compiler not written in c
19:13:34disruptekyou're blowin' my mind right now.
19:14:13disruptekZevv: you hold his arms and i'll get his legs.
19:14:53Zevvdon't hit the newbs
19:15:46disruptekclyybber: do you need zevv's help to fix the bug blocking cps?
19:15:57disruptek'cause, y'know, i'd be happy to volunteer it.
19:19:14FromDiscord<nikki> https://godbolt.org/z/Y7Tj9c checking out some nim-gen'd c on godbolt πŸ‘€
19:19:31FromDiscord<nikki> you can actually just #include nimbase.h by its raw github uri lol (that's what this one does at the top)
19:22:09FromDiscord<Clyybber> godbolt has direct nim support btw
19:22:22FromDiscord<nikki> yeah i actually wanted to see the mapping through nim-c
19:22:28FromDiscord<Clyybber> ah gotcha
19:22:37FromDiscord<Clyybber> disruptek: forgot what bug
19:22:52disruptekany of the ones assigned to you.
19:22:54FromDiscord<nikki> godbolt's nim only goes through gcc and i have more practice reading clang's gen; and also on godbolt it only has nim 1.2 afaict (i think the head version just doesn't work; doesn't have 1.4)
19:23:22FromDiscord<Clyybber> disruptek: i'll take a look once I get this done
19:23:32disruptekaight, 10q.
19:23:58FromDiscord<William_CTO> What is the preferred number of spaces for indentation? 2 or 4?
19:24:04disruptekyes.
19:37:13FromDiscord<Recruit_main707> 2
19:39:03FromDiscord<Idefau> 8
19:42:48FromDiscord<Idefau> !eval echo 2 or 4
19:42:50NimBot6
19:42:56FromDiscord<Idefau> you got your answer
19:42:58FromDiscord<ache of head> Whaaat
19:43:07FromDiscord<Recruit_main707> bitwise or
19:43:11FromDiscord<ache of head> Ohhhh
19:43:18FromDiscord<ache of head> I didn't know it was overloaded for ints
19:43:22FromDiscord<ache of head> (edit) "ints" => "number values"
19:43:27FromDiscord<ache of head> I thought it was a separate operator
19:43:31FromDiscord<Idefau> nah
19:43:42disruptek&
19:43:47disruptek~&
19:43:47disbot&: 11unreachable
19:44:03FromDiscord<Idefau> or if you want either 2 or 4
19:44:06FromDiscord<Idefau> !eval echo 2 xor 4
19:44:08NimBot6
19:44:12FromDiscord<Idefau> wow
19:44:24FromDiscord<Idefau> see you must use 6 ident spaces
19:44:29FromDiscord<Recruit_main707> !eval echo 2 and 4
19:44:31NimBot0
19:45:20FromDiscord<Idefau> !eval echo 2 shr 4 or 6
19:45:22NimBot6
19:47:21*mmohammadi9812 quit (Read error: Connection reset by peer)
19:49:04*mmohammadi9812 joined #nim
19:51:02*apahl quit (Ping timeout: 260 seconds)
19:51:58*apahl joined #nim
19:58:26FromDiscord<Clyybber> !eval echo 2b or not 2b
19:58:27NimBotCompile failed: /usercode/in.nim(1, 7) Error: invalid number: '2b'
19:58:42disruptekitym 10b.
19:59:22FromDiscord<Clyybber> doesn't flow as nicely
20:00:01FromDiscord<Clyybber> !eval echo 10b or not 10b
20:00:05NimBotCompile failed: /usercode/in.nim(1, 8) Error: invalid number: '10b'
20:00:09FromDiscord<Idefau> !eval echo 0x2b or not 0x2b
20:00:14NimBot-1
20:00:21disrupteksnap.
20:00:43*opal quit (Ping timeout: 240 seconds)
20:02:50*opal joined #nim
20:03:42FromDiscord<Idefau> 0x2be would work as well
20:11:46FromDiscord<nikki> the path for `staticRead` is relative to the file it's used in right?
20:11:52FromDiscord<nikki> or is there some shenanignas with module search paths too
20:12:53*sealmove quit (Quit: WeeChat 2.9)
20:15:19*kinkinkijkin quit (Remote host closed the connection)
20:17:22*kinkinkijkin joined #nim
20:19:57FromDiscord<whisperdev> Does the zig compiler really make it easy to cross compile Nim?
20:25:15FromDiscord<ElegantBeef> It's super easy to cross compile as is
20:31:32*tane quit (Ping timeout: 256 seconds)
20:40:18*narimiran quit (Quit: leaving)
20:43:05*solitudesf quit (Ping timeout: 240 seconds)
20:45:31*gangstacat quit (Ping timeout: 272 seconds)
20:47:05*hyiltiz quit (Ping timeout: 240 seconds)
20:48:29*hyiltiz joined #nim
20:48:29*hyiltiz quit (Changing host)
20:48:29*hyiltiz joined #nim
20:49:09FromDiscord<scott> My wifi dongle broke, and I've realized there are no offline docs. Is there something I'm not finding or is that just not a thing?
20:49:33FromDiscord<ElegantBeef> I believe you can generate the docs yourself
20:49:41FromDiscord<scott> Idk I kinda expected choosenim to generate the docs and put them in /usr/share or something
20:49:47FromDiscord<Recruit_main707> @nikki yes, 90% sure
20:49:59FromDiscord<scott> @ElegantBeef↡↡Do I have to have the compiler downloaded?
20:50:25FromDiscord<ElegantBeef> Uncertain, but i imagine so
20:50:37FromDiscord<nikki> @scott do you just want the manual? i have a pdf of the manual if you want πŸ˜…
20:50:43FromDiscord<scott> I haven't done `nimble install compiler` yet on this machine πŸ˜”
20:51:13FromDiscord<ElegantBeef> If you used choosenim it should've downloaded all the libs afaik
20:51:20FromDiscord<ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/770751506060017694/unknown.png
20:51:35FromDiscord<scott> Idk I really need the stdlib reference but thanks @nikki
20:52:06FromDiscord<scott> Ah there it is, thanks @ElegantBeef
20:52:34FromDiscord<scott> I was looking in `~/.nimble` not `~/.choosenim`
20:55:16FromDiscord<ElegantBeef> No problem
20:55:16*natrys quit (Quit: natrys)
20:56:11FromDiscord<ElegantBeef> What's the best way to check if a symbol is a primitive?
20:56:48*tane joined #nim
20:58:40*axion quit (*.net *.split)
20:59:21*axion joined #nim
21:07:23Prestigecan macros create top level variables in a file?
21:07:35disrupteksure.
21:11:28ForumUpdaterBotNew thread by BarrOff25: Template expanding to multiple sequence members, see https://forum.nim-lang.org/t/6997
21:13:13FromDiscord<ElegantBeef> Macros can do whatever a programmer can do
21:13:52disruptekmacro man, macro man, does whatever a coder can.
21:15:10FromDiscord<ElegantBeef> Makes a spaghetti, lookout it's macroman. Writting code no one can understand....
21:20:01*disruptek tried to use std/with in the compiler...
21:20:04*disruptek failed.
21:29:52FromDiscord<Clyybber> disruptek: probably because bootstrapping?
21:30:18disruptekwhat does that have to do with my balls throbbing?
21:30:34Prestigewell if the strap is tigth enough
21:30:41Prestigetight*
21:30:54FromDiscord<Clyybber> oh no
21:31:45FromDiscord<ElegantBeef> So clyybber i've started working on your suggestion, the nimscript -> nim side shouldnt be too bad for objects of shallow depth, but collections seem rather difficult to send across sadl
21:31:46FromDiscord<ElegantBeef> (edit) "sadl" => "sadly"
21:32:28FromDiscord<Clyybber> any examples of difficult stuff?
21:32:37FromDiscord<ElegantBeef> Sequences
21:33:09FromDiscord<Clyybber> treat seqs as primitves
21:33:24FromDiscord<ElegantBeef> The proc signature gets larger and larger
21:33:33FromDiscord<Clyybber> lol why?
21:33:50FromDiscord<ElegantBeef> Cause the signature i make has to take all the primitives as parameters
21:33:59FromDiscord<Clyybber> oh eh
21:34:05FromDiscord<ElegantBeef> Should note the hidden proc siganture does
21:34:06FromDiscord<Clyybber> why not just use a seq of strings?
21:34:09FromDiscord<Clyybber> or a string
21:34:19FromDiscord<ElegantBeef> Didnt quite understand how i'd use a string
21:34:20FromDiscord<Clyybber> ah
21:34:24FromDiscord<Clyybber> I see what you are doing
21:34:29FromDiscord<Clyybber> interesting approach
21:35:11FromDiscord<ElegantBeef> Well the VM args are sitting there, but yea this is rather difficult to manager so probably should stop now
21:35:50FromDiscord<ElegantBeef> But i mean the current rewrite sorta generates ok atm, but yea would need to go quite deep for supporting all objects https://media.discordapp.net/attachments/371759389889003532/770762702997028884/unknown.png
21:36:30FromDiscord<Clyybber> my suggestion from yesterday
21:36:39FromDiscord<ElegantBeef> Would be so much easier if i could just treat it like a network packet πŸ˜„
21:36:44FromDiscord<Clyybber> was actually to use a string as a binary buffer
21:36:57FromDiscord<Clyybber> and use a vm callback to write primitives to that buffer
21:37:03FromDiscord<ElegantBeef> Oh shit
21:37:08FromDiscord<Clyybber> :D
21:37:50disruptekjust generate ast and then run it on the other side. what's the problem?
21:38:09FromDiscord<Clyybber> disruptek: its about nimscript -> nim
21:38:14FromDiscord<Clyybber> but nim is running
21:38:24disrupteki'm okay with that.
21:38:40FromDiscord<ElegantBeef> And nimscript as we've gone into deeply is incapble of using more intelligent copy methods
21:38:48disruptekrude.
21:40:21FromDiscord<ElegantBeef> So clyyber you just gave me the method to make a network packet like buffer, so cheers now just need a template or macro to go through each field to get to the most primitive type and send it
21:40:25*BarrOff quit (Ping timeout: 264 seconds)
21:40:43FromDiscord<Clyybber> cheers
21:41:05FromDiscord<ElegantBeef> I've just deleted the entirety of my `nimscripted` file πŸ˜›
21:41:43disruptekagain you want frosty.
21:41:48FromDiscord<ElegantBeef> Yea
21:41:50disruptekjust copy that shit and get it done.
21:41:59FromDiscord<ElegantBeef> Well yea clyybber suggested that basically
21:42:09FromDiscord<Clyybber> disruptek: think of it as a vm frosty
21:42:25FromDiscord<Clyybber> maybe it can be merged into frosty at some point
21:42:35FromDiscord<Clyybber> virtual frost
21:43:02disruptekfrosty needs the native socket code pulled out when it goes into the compiler.
21:43:12disruptekso, i dunno. maybe we split it up.
21:46:34*hyiltiz quit (Ping timeout: 256 seconds)
21:49:01*hyiltiz joined #nim
21:53:46FromDiscord<nikki> does `staticRead` use the hash (or such) of the input file and not cause a recompile if it didn't change πŸ€”
21:53:58FromDiscord<nikki> like does it factor into the same cache mechanism as for nim modules
21:54:02disrupteknope.
21:55:40*mmohammadi9812 quit (Remote host closed the connection)
21:57:44*mmohammadi9812 joined #nim
22:03:02*mmohammadi9812 quit (Quit: Quit)
22:05:33ForumUpdaterBotNew thread by Mrhdias: Listening for variable changes in Nim?, see https://forum.nim-lang.org/t/6998
22:08:30*mmohammadi9812 joined #nim
22:08:48*mmohammadi9812 quit (Client Quit)
22:09:05FromDiscord<nikki> seems like .... it does actually
22:09:30*mmohammadi9812 joined #nim
22:10:50PrestigeI'm creating a const section in a macro with quote do - if I create variable name here, the output has a `gensym6 suffix. Is this normal?
22:11:37*gangstacat joined #nim
22:11:46FromGitter<ynfle> I'm pretty sure al variable names are gensym'ed unless marked with the pragma `{.dirty.}`
22:12:04FromDiscord<nikki> and i believe also unless the name comes in as a parameter?
22:12:19FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=2CeP
22:12:22disruptekPrestige: it's not normal. stop using macros immediately and consult your physician.
22:12:28Prestigelol
22:12:39disruptekseek professional help!
22:12:45FromDiscord<Recruit_main707> Dr disruptek
22:12:51PrestigeAs long is it's working as intended, just wanted to make sure I wasn't doing something improper
22:14:00FromDiscord<nikki> yeah i think the main reasno is so the variable doesn't collide with another variable of the same name in the enclosing scope
22:20:48*lritter quit (Quit: Leaving)
22:22:40FromDiscord<scott> Is there a simple way (besides a bare for-loop) to create a seq from an iterator?
22:23:17FromDiscord<Clyybber> toSeq
22:23:40FromDiscord<scott> Ok thanks
22:23:48FromDiscord<Clyybber> its in sequtils :)
22:24:53FromDiscord<scott> Don't know how I missed it haha
22:26:15*tane quit (Quit: Leaving)
22:26:28FromDiscord<nikki> disruptek: do you actually try to avoid macros mostly (referring to what you said to Prestige) or was that mostly only a joke
22:27:02FromDiscord<Clyybber> regardless of what he answers it should be understood as a joke :D
22:27:02FromDiscord<nikki> avoid as in -- avoid reaching for a macro solution initially and mostly only resort to it if you really need to / consider rearchitecting to not need it
22:27:21FromDiscord<Clyybber> but in general, yeah go for the simples solution first
22:27:33FromDiscord<Clyybber> unless you have good reasons to do otherwise
22:27:52FromDiscord<nikki> yeah mainly i'm wondering how much of a sense of additional complexity + pitfalls to internalize about macros
22:28:01FromDiscord<nikki> eg. needing to keep track of whether to use `evalOnceAs`
22:31:18FromDiscord<ElegantBeef> Very few times you're happy to see something like `dοΏ½r@@οΏ½@οΏ½r@`
22:31:39FromDiscord<Clyybber> lol
22:31:52*mbomba joined #nim
22:52:47*acidx quit (Quit: Reconnecting)
22:54:03*acidx joined #nim
22:55:23FromDiscord<nikki> hahais that a gensym?
22:55:34FromDiscord<nikki> i haven't macro'd much yet (other than using them)
22:55:50mipriLisp terminology. it's a throwaway symbol that won't collide with one already in the program
22:56:39FromDiscord<Clyybber> @nikki thats the string @ElegantBeef is using as a binary buffer :D
22:56:40FromDiscord<nikki> oh yeah i've coded macros in lisp and actually had to use gensym directly
22:56:53FromDiscord<nikki> my question was just: is that an identifier generated by nim's gensym
22:56:58FromDiscord<nikki> ah word
22:57:15FromDiscord<ElegantBeef> Nah it's the output of me using the nim backend to serialize an objects primitives
22:57:20FromDiscord<nikki> nice
22:58:28FromDiscord<ElegantBeef> Also sorry again for being a tosser yesterday, i couldnt parse what you were saying well enough πŸ˜›
22:59:26FromDiscord<nikki> oh really no worries @ElegantBeef πŸ˜„
23:03:01*acidx_ joined #nim
23:04:33FromDiscord<ElegantBeef> I wouldnt be canadian if i didnt apologize more than once πŸ˜›
23:19:14FromDiscord<ElegantBeef> Interestingly i'm getting a crash trying to convert a string to the object on nimscript side
23:19:33FromDiscord<ElegantBeef> It doesnt give any errors just doesnt continue after attempting to get a float
23:20:09FromDiscord<Clyybber> how do you attempt it?
23:20:17FromDiscord<Clyybber> and are you on the latest devel?
23:20:31FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2Cf7
23:20:42FromDiscord<ElegantBeef> I am not, i'll update
23:20:47FromDiscord<ElegantBeef> the nimside works
23:21:00FromDiscord<ElegantBeef> IE getint returns 100
23:21:16FromDiscord<Clyybber> yeah, devel has seen some critical VM bugfixes yesterday
23:21:23FromDiscord<Clyybber> or the day before yesterday
23:22:11FromDiscord<ElegantBeef> Yea like my super important 1 line fix πŸ˜›
23:22:46FromDiscord<Clyybber> that one too :D
23:23:24FromDiscord<ElegantBeef> How does one update to the most recent commit `choosenim upgrade devel` didnt work
23:23:41FromDiscord<Avatarfighter> choosenim update devel?
23:23:48FromDiscord<Clyybber> I don't use choosenim so I don't know :/
23:24:08FromDiscord<ElegantBeef> Well that's what i meant
23:24:17FromDiscord<Avatarfighter> `choosenim update devel` should rebuidl it
23:24:33FromDiscord<Clyybber> maybe -f ?
23:29:14FromDiscord<ElegantBeef> Guess i have to manually give it the hash weirdly
23:35:19*mmohammadi9812 quit (Ping timeout: 260 seconds)
23:38:08FromDiscord<Avatarfighter> @ElegantBeef not to flex πŸ’ͺ https://media.discordapp.net/attachments/371759389889003532/770793486008975390/unknown.png
23:38:45FromDiscord<ElegantBeef> Not to flex but... πŸ˜› https://media.discordapp.net/attachments/371759389889003532/770793640846557234/unknown.png
23:38:48FromDiscord<Avatarfighter> LOL
23:38:51FromDiscord<Avatarfighter> psh
23:39:36*acidx_ quit (Quit: leaving)
23:39:36*acidx quit (Quit: leaving)
23:39:40FromDiscord<ElegantBeef> Yea latest version didnt resolve this
23:45:46*acidx joined #nim
23:54:15FromDiscord<Clyybber> @ElegantBeef where exactly does it hang?
23:54:16FromDiscord<shashlick> You need to use --latest
23:54:28FromDiscord<shashlick> Else it downloads the most recent nightlies build