<< 03-10-2020 >>

00:05:23*abm quit (Read error: Connection reset by peer)
00:05:41*abm joined #nim
00:17:50disrupteknot the first time i made a girl cry.
00:49:48FromDiscord<Avatarfighter> i don’t know if I should be insulted or just amazed
00:49:57*abm quit (Read error: Connection reset by peer)
01:11:37disruptekit /was/ a pretty amazing insult.
01:22:13*oculux quit (Read error: Connection reset by peer)
01:24:50*oculux joined #nim
01:28:31PrestigeIs there a way to pass an iterator as a proc argument? If there is, I'm struggling with the syntax.
01:28:49disruptekyes.
01:31:05Prestigeha, finally. Needed to add a closure pragma.
01:31:13disruptekyes.
01:31:25disruptekhappy to help.
01:31:30PrestigeThanks buddy.
01:45:56*apahl quit (Ping timeout: 240 seconds)
01:48:03*apahl joined #nim
02:06:59*arecacea1 quit (Remote host closed the connection)
02:07:37*arecacea1 joined #nim
02:41:49FromDiscord<Avatarfighter> dude closure iterators are so clutch
02:42:02FromDiscord<Avatarfighter> I used one for my MITM and all I can say is wow
02:42:20FromDiscord<Avatarfighter> being able to advance the iterator whenever you want is just so powerful
02:42:40disruptekshhh my pants are getting tight.
02:43:01FromDiscord<Avatarfighter> I've been told I have that effect
02:43:10FromDiscord<Avatarfighter> I'll keep it to a minimum though don't worry
02:54:47*muffindrake quit (Ping timeout: 240 seconds)
02:57:19*muffindrake joined #nim
03:05:11leorizenim is broken on 32bit windows...
03:05:35FromDiscord<Avatarfighter> just get 64bit windows
03:07:18leorizelol
03:09:01leorizeAraq: https://play.nim-lang.org/#ix=2zym
03:09:06leorizethis is now blocking nightlies
03:11:05*a_chou joined #nim
03:20:21*disruptek throbs.
03:23:34*a_chou quit (Quit: a_chou)
03:26:40*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
03:46:09FromDiscord<himu> Is there a way to denote a variant type in a function declaration as a argument type? Or the other only way to denote type is to denote the Enclosing parent type as a whole?
03:48:24FromDiscord<himu> for example `proc hello(): Stmt(kind: FUNCSTMT)` vs `proc hello(): Stmt`. Is the first one possible to be more specific?
03:50:03FromDiscord<juan_carlos> `func foo(arg: int or float): auto =` ?.
03:56:03*lritter joined #nim
03:59:29FromDiscord<himu> Thanks! I have to rethink on this one though. BTW didn't know one could have `or` for types. Nim has a lot of cool features that I probably missed in the tutorial chapters.
03:59:49leorize@himu that'd requires runtime matching so you'd want a pattern matcher
03:59:56leorize!repo gara
03:59:56disbothttps://github.com/alehander92/gara -- 9gara: 11 15 79⭐ 7🍴
04:01:29FromDiscord<juan_carlos> For quick prototyping you can use `auto` for return type, `any` for argument, but later on change it to proper concrete types.
04:02:07FromDiscord<juan_carlos> You can make a variant type too.
04:05:24FromDiscord<himu> @juan_carlos Actually. I am using a variant type. Just wanted to know if it could have a specific kind of return type only. i.e. only one kind of variant kind. Nevermind. I have to do that manually probably. Anyways thanks for `auto` and `any`. they will come in handy.
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:03FromDiscord<himu> @leorize `gara` library looks like something that could come in handy a lot. Thanks for the suggestion.
04:06:39*supakeen joined #nim
04:13:06FromDiscord<Yardanico> @narimiran you around?
04:13:28FromDiscord<Yardanico> after https://github.com/digitalocean/hacktoberfest/pull/596 we need to add "hacktoberfest" topic to the Nim repo so the PRs will be counted towards it 🙂
04:13:28disbotRequire PRs be in a repo with hacktoberfest topic and be accepted
04:17:39FromDiscord<Yardanico> https://hacktoberfest.digitalocean.com/hacktoberfest-update
04:40:25*narimiran joined #nim
05:01:28*waleee-cl quit (Quit: Connection closed for inactivity)
05:07:27*opal quit (Remote host closed the connection)
05:08:38*opal joined #nim
05:16:03FromDiscord<Rebel> Is there an ideal use for noinit pragma is it wise to use it for a global seq that gets accessed frequently or really just for big arrays?
05:16:48FromDiscord<Elegant Beef> The most ideal use is on a buffer which will be filled, and as such you dont care about if it's 0'd out
05:17:27FromDiscord<Elegant Beef> So i'd say the big benefit is when interoping with C or when passing a `var seq` as a return buffer
05:18:26*solitudesf joined #nim
05:26:24*mmohammadi98126 joined #nim
05:34:57FromDiscord<Yardanico> !seen narimiran
05:34:58disbotnarimiran joined 12#nim 54 minutes ago and last spoke 710 hours ago https://irclogs.nim-lang.org/02-10-2020.html#19:20:32
05:35:07narimiranyes?
05:35:14FromDiscord<Yardanico> after https://github.com/digitalocean/hacktoberfest/pull/596 we need to add "hacktoberfest" topic to the Nim repo so the PRs will be counted towards it 🙂
05:35:15disbotRequire PRs be in a repo with hacktoberfest topic and be accepted
05:35:22FromDiscord<Yardanico> if we want to participate in hacktoberfest 🙂
05:35:34FromDiscord<Yardanico> after a lot of spammers they decided to make it opt-in for maintainers
05:35:59FromDiscord<Yardanico> https://hacktoberfest.digitalocean.com/hacktoberfest-update here is the explanation
05:36:15FromDiscord<Yardanico> also the PR must be merged/accepted/labeled with "hacktoberfest-accepted" to be counted
05:38:55FromDiscord<Yardanico> so I guess hacktoberfest this year already kinda failed 🙂
05:39:11FromDiscord<Yardanico> sadly a lot of people blindly believe those "influencers"
05:40:08FromDiscord<Yardanico> there's at least 5k PRs created based on that video https://github.com/search?q=is%3Apr+in%3Atitle+Improved+docs+updated%3A%3E2019-09-30
05:40:35FromDiscord<Yardanico> also https://github.com/search?q=is%3Apr+label%3Ainvalid+updated%3A%3E2019-09-30
05:47:40AraqRebel: if you need to ask, you don't need .noinit, it's unsafe
05:48:34Araqplus most of its speed advantages are gone with --gc:arc/orc
05:53:09FromDiscord<shirleyquirk> sent a long message, see http://ix.io/2zyT
05:53:25FromDiscord<Yardanico> it's "must"
05:53:30FromDiscord<Yardanico> one of these 3 conditions must be true
05:53:34FromDiscord<Yardanico> in order for it to count
05:53:43FromDiscord<shirleyquirk> Sorry, yes my bad parsing
05:53:51FromDiscord<shashlick> Meh - nimterop is failing on alpine because the find command doesn't support -regextype
05:54:02FromDiscord<shashlick> It uses busybox
05:54:26FromDiscord<Yardanico> hahaha, I wrote the same and wanted to post, but then decided to fact-check first, and you sent the same message 🙂
05:54:28FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/761828490336010260/unknown.png
05:54:50FromDiscord<shashlick> :)
05:58:50leorizeAraq: can you fix this? https://github.com/nim-lang/Nim/blob/devel/compiler/renderer.nim#L339-L340
05:59:16leorizeon 32bit system the `1` is int32 so it's too small to hold the mask
05:59:21leorizeof itself
05:59:32leorizewhich caused funky issues with nightlies
06:13:58FromDiscord<shashlick> Always 5k bugs when you want to do something seemingly simple
06:17:15*mmohammadi98126 quit (Quit: I quit (╯°□°)╯︵ ┻━┻)
06:54:40*Vladar joined #nim
07:00:34*aenesidemus_ joined #nim
07:03:26*aenesidemus quit (Ping timeout: 240 seconds)
07:08:43FromDiscord<shirleyquirk> I reckon (uint.high shr (sizeof(uint)-size)*8) works
07:14:52FromDiscord<shirleyquirk> wait, no, that branch won't be taken if size==32 bits anyway
07:22:17FromDiscord<shirleyquirk> x must be zero when sent to litaux
07:32:22*leorize quit (Remote host closed the connection)
07:32:54*leorize joined #nim
07:39:34*nature joined #nim
08:15:51*gmaggior joined #nim
08:19:56*Trustable joined #nim
08:29:29*bung joined #nim
08:36:11*sirn quit (Ping timeout: 272 seconds)
08:36:49*hnOsmium0001 quit (Ping timeout: 272 seconds)
08:38:01*sirn joined #nim
08:39:00*hnOsmium0001 joined #nim
08:39:12*nickster quit (Remote host closed the connection)
08:39:43*nickster joined #nim
08:39:59*alehander92 quit (Ping timeout: 272 seconds)
08:40:37*d10n-work quit (Ping timeout: 272 seconds)
08:42:14*alehander92 joined #nim
08:42:35*d10n-work joined #nim
09:15:12*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:38:41Araqleorize, looks like you can fix it too :-)
09:42:34FromDiscord<dom96> wow what a shit show with this year's hacktoberfest
09:44:34FromDiscord<dom96> anyway, adding Nim to that topic
09:47:34FromDiscord<dom96> Nice, we're not that far down https://github.com/topics/hacktoberfest
09:47:43FromDiscord<dom96> (For me at least, who knows how algorithmic this page is)
09:48:01FromDiscord<dom96> it does appear to be ordered by stargazers though
09:49:23FromDiscord<dom96> We need to fix this https://github.com/nim-lang/Nim/contribute
09:52:04FromDiscord<dom96> https://github.blog/2020-01-22-how-we-built-good-first-issues/ haha, they're leveraging machine learning to detect issues labelled "good first issue"? Because that's the only issues I see listed in this
09:53:54FromDiscord<iWonderAboutTuatara> https://media.discordapp.net/attachments/371759389889003532/761888748102352896/Screenshot_20201003-025339.jpg
09:53:58FromDiscord<iWonderAboutTuatara> More latex
09:54:12FromDiscord<iWonderAboutTuatara> Now that you guys pointed it out I can't unsee if
09:54:17FromDiscord<iWonderAboutTuatara> *it
09:54:49*FromDiscord quit (Remote host closed the connection)
09:55:05*FromDiscord joined #nim
09:57:09FromDiscord<dom96> well, I created and labelled issues with "good first issue", still don't see them there... https://github.com/nim-lang/Nim/contribute
09:57:28FromDiscord<iWonderAboutTuatara> Is there a way to do something like `cin >> x >> y` in Nim?
10:01:57FromDiscord<Rika> let x = stdin.readline()↵let y = stdin.readline()↵↵?
10:04:02FromDiscord<Vindaar> maybe the tag needs to be written slightly differently @dom96 ?
10:05:31FromDiscord<Vindaar> or it's simpler and it just takes a couple of hours to refresh
10:06:55FromDiscord<Vindaar> huh, since when does someone you follow on github tagging something in a watched repository show up in your timeline? 🤣 you spammed me Dom haha
10:08:55FromDiscord<dom96> lol what
10:08:59FromDiscord<dom96> I tagged like 22 issues
10:09:04FromDiscord<dom96> did they show up individually?
10:11:13FromDiscord<iWonderAboutTuatara> @Rika that reads line, not till whitespace
10:11:31FromDiscord<Rika> well i dont use cin/sout
10:11:32FromDiscord<Rika> (edit) 'cin/sout' => 'cin/cout'
10:11:36FromDiscord<iWonderAboutTuatara> There's a very specific way inputs are fed in in competitive programming
10:11:36FromDiscord<Grzegorz Brzęczyszczykiewicz> I'm trying to compile some nim code to wasm as os:standalone and get a "Error: system module needs: nimErrorFlag" error on memory allocation, can someone help?
10:11:48FromDiscord<iWonderAboutTuatara> Irs just the inputs whitespaced
10:11:58FromDiscord<iWonderAboutTuatara> All 1 line
10:12:16FromDiscord<Rika> let t = stdin.readLine().split(); let (x, y) = (t[0], t[1])
10:12:33FromDiscord<iWonderAboutTuatara> I was thinking of that
10:12:40FromDiscord<iWonderAboutTuatara> Not ideal, but if it works if works
10:12:50FromDiscord<iWonderAboutTuatara> Maybe I can try this with a macro?
10:13:00FromDiscord<Rika> something tells me nim wasnt exactly made for golfing if you're aiming for that
10:13:08FromDiscord<iWonderAboutTuatara> Not golfing
10:13:13FromDiscord<iWonderAboutTuatara> Competitive programming
10:13:17FromDiscord<iWonderAboutTuatara> Ie speed of impl
10:13:23FromDiscord<Grzegorz Brzęczyszczykiewicz> I've tracked the nimErrorFlag definition to be in exception code in standard library, and enable exceptions:goto for it, but it seems like it is still missing
10:13:29FromDiscord<Vindaar> @dom96 yeah, they did for some reason. Never seen that before
10:13:30FromDiscord<iWonderAboutTuatara> What language do people use for golfing? Absurdly functional python?
10:14:07FromDiscord<Rika> no, golfing languages
10:14:08FromDiscord<iWonderAboutTuatara> But idc about size, all that matters is that I write it as fast as possible
10:14:12FromDiscord<iWonderAboutTuatara> Oh that's boring
10:14:20FromDiscord<Rika> a macro wont make this faster i do not think
10:14:32FromDiscord<iWonderAboutTuatara> This is fine as is, but not ideal
10:14:42FromDiscord<Rika> rather i dont think a macro *would make this faster
10:14:48FromDiscord<Vindaar> Looks fun like this https://media.discordapp.net/attachments/371759389889003532/761894003359612943/dom_issues.png
10:15:10FromDiscord<iWonderAboutTuatara> I think it would
10:15:18FromDiscord<Rika> how so?
10:15:28FromDiscord<iWonderAboutTuatara> You can write a macro that reads stdin and makes as many vars as you want
10:15:31FromDiscord<iWonderAboutTuatara> Very reusable
10:15:38FromDiscord<Rika> you mean faster as in for writing? syre
10:15:41FromDiscord<iWonderAboutTuatara> Or a template even
10:15:42FromDiscord<Rika> (edit) 'syre' => 'sure'
10:15:51FromDiscord<iWonderAboutTuatara> Yeah, you can write things before you know the problem
10:16:06FromDiscord<iWonderAboutTuatara> Too hard to police that kind of thing so they don't bother
10:16:17FromDiscord<dom96> > Looks fun like this↵jesus
10:16:59FromDiscord<iWonderAboutTuatara> Pantokrator
10:28:00supakeenI am looking at some tickets for this weekend that are tagged with stdlib and in a few of them I see comments such as 'fusion $lib fixed this'.
10:28:14supakeenDoes that mean that it *doesn't* need to be fixed in stdlib or what is the future plan for fusion :)
10:35:03*opal quit (Ping timeout: 240 seconds)
10:38:45*narimiran quit (Ping timeout: 240 seconds)
10:42:13FromDiscord<dom96> ughhh, why would you do this? Araq, narimiran https://media.discordapp.net/attachments/371759389889003532/761900908048941076/unknown.png
10:44:39FromDiscord<dom96> Why not keep these procs and allow the book to work?
10:46:05*opal joined #nim
10:46:13FromDiscord<Rika> well isnt that how deprecated procs work
10:47:04FromDiscord<dom96> Yes, but why not keep the ones that the book uses?
10:47:23FromDiscord<Rika> because theyre deprecated?
10:47:50FromDiscord<Rika> sorry, i dont get it, i dont believe the book should get privilege because it exists
10:48:03FromDiscord<lqdev> i agree with rika
10:48:15FromDiscord<dom96> What about the poor people that are learning Nim with the book and running into this? Like this person https://github.com/dom96/nim-in-action-code/issues/10
10:48:16disbotListing 7.14 Does Not Compile in Linux
10:48:26FromDiscord<lqdev> especially the book was written on an alpha version of nim
10:48:42FromDiscord<lqdev> so perhaps it's about time to update it?
10:49:22FromDiscord<Rika> well you cant update the physical
10:49:41FromDiscord<Rika> but i assume theres a link that points to errata or something else like updated code locations
10:49:44FromDiscord<lqdev> i mean, 2nd edition.
10:49:49FromDiscord<Rika> that's expensive
10:49:50FromDiscord<dom96> Yeah, that's the point. This is the only physical book in existence for Nim and it really doesn't cost much to keep it at least working.
10:49:56FromDiscord<Rika> unreasonable i think
10:50:01FromDiscord<Rika> (i mean to lq)
10:50:47FromDiscord<lqdev> but dom, keeping bad APIs because of some book you decided to write before nim fully matured (1.0) also is expensive
10:50:47FromDiscord<Rika> isnt there already a line indicating what version of nim this will work on? and that there are no guarantees that it will work in the future?
10:51:13*arecacea1 quit (Remote host closed the connection)
10:52:10*arecacea1 joined #nim
10:52:19FromDiscord<lqdev> well, i guess that's just the thing about physical media. they get out of date after a time
10:53:55FromDiscord<whisperdev> Physical books are a bad medium for anything technology related
10:54:04FromDiscord<whisperdev> I mean they are the embodiment of an oxymoron
10:54:32FromDiscord<Rika> yall so harsh smh
10:55:16FromDiscord<dom96> > but dom, keeping bad APIs because of some book you decided to write before nim fully matured (1.0) also is expensive↵How is it expensive exactly?
10:55:26FromDiscord<dom96> FYI I got agreement from Araq that he would keep these
10:55:34FromDiscord<dom96> so I'm just feeling like he's breaking a promise
10:55:50FromDiscord<whisperdev> Physical books maybe should not be a reference manual on how to learn a new technology
10:55:50FromDiscord<dom96> Like, I went as far as adding tests for every code in the book
10:55:55FromDiscord<dom96> and they just freaking modified it
10:56:22FromDiscord<whisperdev> But @dom96 do you expect it to work for how long?
10:56:23FromDiscord<whisperdev> forever?
10:56:41FromDiscord<dom96> I expect it to work until 2.0 is released
10:57:00FromDiscord<Rika> maybe next time there should be a time of removal for deprecations
10:57:26FromDiscord<Rika> so removals are expected and can be negotiated before it happens
10:58:27FromDiscord<dom96> There is a time, 2 releases
10:58:45FromDiscord<dom96> imagine me writing a book now and then in a year it's already broken because someone decided to deprecate a proc that I used
10:59:14FromDiscord<Rika> so this is a planned removal?
10:59:39FromDiscord<whisperdev> i also own your book but Nim has advanced so much since the book got released
10:59:44FromDiscord<whisperdev> and all that arc and other shit is so awesome
11:00:40FromDiscord<dom96> It didn't advance in a way that means the things the book teaches are incorrect
11:00:50FromDiscord<dom96> these are just small changes to API
11:00:57FromDiscord<dom96> which the reader should get a chance to at least see working
11:01:08FromDiscord<dom96> it's a simple case of not discouraging people
11:01:23FromDiscord<dom96> in fact, it's one more thing that makes it less likely people will use Nim
11:01:36FromDiscord<dom96> setting aside the fact that it's a shitty move for something I spent many years writing
11:01:47FromDiscord<dom96> it's really not a nice experience for anyone wanting to learn Nim
11:02:46FromDiscord<whisperdev> No I think people are more concerned by not having a decent and active http/web framework than things being a bit broken because of some apis got deprecated
11:05:23FromDiscord<dom96> Well, at least the breakage is consistent: it occurs in 1.2.0
11:10:22supakeenwoop 2 prs for asyncftpclient
11:10:27supakeenthat took one cup of coffee :o
11:15:44*Trustable quit (Remote host closed the connection)
11:27:09*lritter quit (Ping timeout: 260 seconds)
11:29:22FromDiscord<dom96> Hope this helps people https://github.com/dom96/nim-in-action-code/wiki/FAQ#compilation-errors-when--is-used
11:29:36FromDiscord<dom96> and that search engines pick it up 🙂
11:38:40supakeenhttps://i.imgur.com/AniO1fO.png stealing all the small issues today.
11:39:47FromDiscord<dom96> niceee
11:39:55supakeenThere's so many tiny ones!
11:40:21FromDiscord<Rika> smol bois
11:55:54FromDiscord<dom96> huh what
11:55:59FromDiscord<dom96> my hacktoberfest maturing times have increased
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:49*supakeen joined #nim
12:34:09*gmaggior quit (Quit: Leaving)
12:39:07*oculuxe joined #nim
12:40:32*oculux quit (Ping timeout: 260 seconds)
12:57:02*FromDiscord quit (Remote host closed the connection)
12:57:18*FromDiscord joined #nim
13:01:39*waleee-cl joined #nim
13:07:13natureDoes anybody know why nimlsp is trying to create a file here ?
13:07:44naturehttps://github.com/PMunch/nimlsp/blob/231835138f0720aabbf3fb0fc7b9dac8b0f6766f/src/nimlsp.nim#L27
13:09:53FromGitter<bung87> cache stashed nim file and store log file from the code I can tell
13:10:48FromGitter<bung87> previous version store the stashed nim file in memory if I remember correct.
13:12:20natureI found what I was looking for: "-d:tempDir=mytempname" option to change the tempDir that is being created
13:37:45*lmariscal quit (Quit: Ping timeout (120 seconds))
13:38:13*lmariscal joined #nim
13:38:22*Jjp137 quit (Ping timeout: 260 seconds)
13:38:40*Jjp137 joined #nim
13:39:24*sagax quit (Read error: Connection reset by peer)
13:41:00*ForumUpdaterBot quit (Remote host closed the connection)
13:41:31*ForumUpdaterBot joined #nim
13:50:26FromDiscord<Anuke> Can anyone tell me why this segfaults with no stack trace? https://play.nim-lang.org/#ix=2zAR
13:51:10FromDiscord<Anuke> It does so both on ix and on my PC
13:51:55FromDiscord<Anuke> GDB tells me it segfaults on the line where `init()` is defined
13:52:09FromDiscord<dom96> That array probably doesn't fit in the stack
13:52:12*D_ quit (Quit: 💨)
13:52:25FromDiscord<Rika> was gonna say
13:52:30*D_ joined #nim
13:52:52FromDiscord<Rika> it's 133 * 133 * 133 * 4 bytes
13:53:15FromDiscord<Anuke> how would one move it into the heap?
13:53:47FromDiscord<Rika> make it a ref i suppose
13:55:56FromDiscord<Anuke> Is there any way to make sure that things like this fail with a more descriptive message next time?
13:57:13FromDiscord<Anuke> I have `d:debug` enabled, and there's nothing besides `Segmentation fault: etc` displayed when it crashes
14:10:02FromDiscord<Rika> dont think so
14:15:30ForumUpdaterBotNew thread by Robert_m_muench: 80-bit (long double) support?, see https://forum.nim-lang.org/t/6885
14:15:56*rusua_ joined #nim
14:16:10disruptek--stackTrace:on
14:19:19disruptek-d:debug isn't really a thing.
14:20:34FromDiscord<Anuke> The strange thing is, it shows stack traces for *other* types of segfaults, e.g. when I try to access nil
14:20:48FromDiscord<Anuke> `--stackTrace:on` doesn't work in this case
14:21:49disruptekoh, you're outside nim's baliwick here.
14:21:55disrupteki didn't read the whole convo.
14:24:00disruptekdom96: there are conventions for updating books after they are published. maybe google `errata`.
14:25:30disruptekit seems unreasonable to expect that others will do the work to ensure that your writing remains relevant indefinitely.
14:26:13Zevvhey disruptek
14:26:17Zevvyou want to see my hip shit
14:26:28disruptekyeah, i saw you updated it.
14:26:46Zevvwhy would you even see that
14:27:00disrupteki'm watching the repo.
14:27:07Zevvwhy would you even know about the repo?
14:27:17disruptekthis is me you're talkin' too.
14:27:19Zevvyou'e making me kind of paranoid here
14:27:27disruptekwell, you should be.
14:27:35disruptekhold on, lemme grab a fork.
14:27:40FromDiscord<dom96> > it seems unreasonable to expect that others will do the work to ensure that your writing remains relevant indefinitely.
14:27:52FromDiscord<dom96> In this case it's people doing work to make it irrelevant
14:28:03Zevvlook at my hip shit: https://www.twitch.tv/zevvhere
14:28:27disruptek140p here i come
14:28:31Zevvdude
14:29:01Zevvis it that bad, really
14:29:36disruptekno, it's like 800kbit i think.
14:29:56ZevvI feel like a virgin
14:29:58Zevvdoing the twitch thing
14:30:02FromDiscord<Rika> arent you?
14:30:06disruptektouched for the very first time?
14:30:15disruptekhow come there's no music?
14:30:28Zevvbecause I can't sing
14:30:47disruptekwhat am i looking at?
14:31:03disruptekzoom all the way in.
14:31:03FromDiscord<Rika> prolly a flame graph or whatever its called
14:31:03Zevvit's a generic event viewer thing I'm making
14:31:13Zevvyou pipe it an ascii file with time stamps and things that happen
14:31:22Zevvin this case it's a perf rerord of my pc
14:31:33Zevvso all processes with threads vertical, and all system calls happening horizontal
14:31:40disruptekeach line is a token? or a leading keyword? an event type.
14:32:01Zevveach line is <timestamp> <this.that.such.so> <thing>
14:32:08Zevvso that's trivial to make from all kinds of sources
14:32:21Zevvmy goal is to get some insight into this cluster million users thing we're making
14:32:24disruptekwhat happens when you hover on the green bit.
14:32:31Zevvsince no one in devops is able to get any insights
14:32:45Zevvat this time you jus see the event nmaes
14:32:49disruptekahh.
14:32:57Zevvgetting the time line to work smooth was a hassle
14:33:04ZevvI cna now zoom from centuries to nanoseconds
14:33:27disruptekmost events happened in 2020 though.
14:33:30ZevvI need to do cool stuff with colors
14:33:34Zevvyeah how come I wonder
14:33:53disruptekso the thing about twitch is, you can talk to the viewer.
14:34:01Zevvyeah but I got stagefright like hell
14:34:04FromDiscord<Vindaar> nah, that's overrated disruptek
14:34:21Zevvunless - and that's funny - I am actuall on stage
14:34:47Zevvyeah I need to find some interesting color coding instead of all the greens
14:34:52disrupteki thought you were gonna present cps at the con.
14:35:01ZevvI'll do some treeform chroma stuff I guess
14:44:24disruptekshow us some real data.
14:45:04AraqAnuke: it's very hard to fix, less effort is document 'array' better
14:47:25*vicfred_ joined #nim
14:49:20FromDiscord<lqdev> @Anuke i believe you're running into a stack overflow
14:49:41FromDiscord<lqdev> 9410548 bytes is way too much for the stack to hold
14:49:47*vicfred quit (Ping timeout: 240 seconds)
14:51:27FromDiscord<Anuke> yeah, that was it
14:51:36disruptekt-shirt people could remove deprecated uses of tables.add() from the tests.
14:51:39FromDiscord<Anuke> I'm used to Java arrays and assumed they would be on the heap
14:51:54FromDiscord<lqdev> yeah you'd have to use a seq in this case
14:51:55disruptekuse a seq.
14:52:21FromDiscord<Anuke> I used `new array[...]`
14:53:02FromDiscord<Anuke> (is that worse than seq, in this case? I don't need expandable storage)
14:54:17FromDiscord<lqdev> well, you're getting a ref array which probably will work just fine
14:54:36FromDiscord<lqdev> but maybe the type checker might get confused
14:54:43disrupteksounds fine to me.
14:54:46FromDiscord<lqdev> which will make you type `arr[][123]` everywhere
14:54:52FromDiscord<lqdev> instead of just `arr[123]`
14:55:06FromDiscord<lqdev> haven't tested {.experimental: "implicitDeref".} with refs yet, though.
14:55:08FromDiscord<dom96> I would just use newSeqOfCap https://nim-lang.org/docs/system.html#newSeqOfCap%2CNatural
14:55:18FromDiscord<lqdev> or just newSeq with a len
14:55:23FromDiscord<dom96> `ref array` isn't something you'd see in the wild
14:56:42FromDiscord<lqdev> though you should avoid seq[seq[seq[T]]]
14:56:57FromDiscord<lqdev> because you have 3 pointer indirections until you get to the final element (!)
14:57:17FromDiscord<lqdev> and it's also a pita to initialize
14:58:00FromDiscord<lqdev> instead use a seq[T] and index it with `s[x + y * width + z * width * depth]`
14:59:06FromDiscord<lqdev> ah
14:59:09FromDiscord<lqdev> width * height
14:59:09FromDiscord<lqdev> not depth
15:00:13FromDiscord<dom96> Are you sure this actually significantly improves efficiency?
15:00:22ZevvI made a nice generic array[x][y][z] implementation the other day. but I forgot how I did it
15:00:30Zevvis that any help?
15:00:52FromDiscord<lqdev> @dom96 yes
15:00:54FromDiscord<lqdev> it does
15:01:09FromDiscord<lqdev> cache efficiency, to be exact
15:01:16Zevvright. Never seq[seq[]]
15:01:38Zevvalso an extra pointer involved
15:01:42disruptekor just use ref array like you're already doing and ignore these knuckleheads.
15:01:43FromDiscord<Vindaar> unless of course you don't have fixed sizes of the inner seqs...
15:04:56disruptekZevv: you look taller online.
15:05:50Zevvno dude you're bullshitting
15:06:03ZevvI know *exactly* what visuals of my float around on the internets
15:24:52natureCan anybody tell me why `echo` and `isMainModule` appears in red when using nim.nvim plugin ?
15:30:38disruptek~leorize
15:30:38disbotleorize: 11responsible for the awesome NeoVim plugin at https://github.com/alaviss/nim.nvim -- disruptek
15:31:07FromDiscord<lqdev> nature: screenshot?
15:31:36FromDiscord<lqdev> try `hi Identifier none`
15:31:49*narimiran joined #nim
15:32:01FromDiscord<lqdev> you can put it in `~/.config/nvim/after/syntax/nim.vim`
15:32:54nature@lqdev didn't work
15:33:00naturelet me take a screenshot
15:33:50disrupteknarimiran: what do you think about supporting nodejs in stdlib?
15:34:32narimirandisruptek: i have no opinion
15:34:40disruptekare you sick?
15:34:50naturehttps://imgur.com/Lk1hDXj
15:35:54FromDiscord<lqdev> hm, that's odd
15:35:56narimirandisruptek: a bit :)
15:36:02FromDiscord<lqdev> nature: does it compile?
15:36:07disruptek🙁
15:36:39nature@lqdev yes it does
15:36:45disrupteknarimiran: where are you located?
15:37:01narimirandisruptek: an ocean away from you, don't worry
15:37:01FromDiscord<lqdev> @leorize
15:37:43disruptekfor some reason i thought you were in, like, argentina.
15:40:37supakeenWe can't all be perfect.
15:44:26*r4vi quit (Ping timeout: 272 seconds)
15:47:05*r4vi joined #nim
16:01:05*einichi left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days")
16:14:11*arecacea1 quit (Remote host closed the connection)
16:14:38*arecacea1 joined #nim
16:18:46*a_chou joined #nim
16:27:15FromDiscord<Avatarfighter> Yo yo yo what is up everyone
16:27:57*rusua_ quit (Quit: Connection closed for inactivity)
16:28:08supakeenConfusing people with a noSplit param to parseHeader mostly.
16:28:39FromDiscord<Avatarfighter> I am confused because I haven't heard of either in my whole nim career
16:32:37supakeenExactly.
16:34:59FromDiscord<Avatarfighter> is disruptek here
16:35:24FromDiscord<Avatarfighter> i am curious to know how his car is doing
16:37:17FromDiscord<Rika> oh hey its the dude whos learning to read
16:38:32FromDiscord<Avatarfighter> I'm about to slap you Rika
16:38:47FromDiscord<Avatarfighter> How are you doing 😛
16:39:34FromDiscord<Rika> vibin
16:39:57FromDiscord<Avatarfighter> Working on anything exciting?
16:40:24*bung quit (Quit: Lost terminal)
16:40:25FromDiscord<Rika> i havent written a nim program in weeks now i think
16:40:34FromDiscord<Avatarfighter> rip
16:40:37FromDiscord<Avatarfighter> Any ideas as to why?
16:40:41FromDiscord<Avatarfighter> Are you burnt out?
16:40:52FromDiscord<Rika> dunno, dont think i am
16:41:01FromDiscord<Rika> prolly just stuck on something
16:41:17FromDiscord<Avatarfighter> I feel for you
16:41:23FromDiscord<Avatarfighter> I was like that for 2 weeks
16:43:01FromDiscord<enthus1ast> i'm trying to use `testament all` but it says `[Warning] - Invalid category specified "tbasic", no tests were run` for my test, what am i doing wrong?
16:43:27FromDiscord<enthus1ast> i've tests in tests/tbasic/simple.nim
16:43:56FromDiscord<Rika> are you sure youre not mistaking unittest for testament
16:44:13FromDiscord<enthus1ast> yes
16:44:42FromDiscord<Rika> brb rebooting someone else help them lol
16:45:55FromDiscord<enthus1ast> my simple.nim file even has ```discard """↵ joinable: true↵"""```
16:46:11FromDiscord<enthus1ast> so it should be joined in the megastest or?
16:46:45FromDiscord<Rika> i dont know, wait for someone more knowledgeable on testament 🙏
16:46:55natureleorize: are you around ?
16:50:56FromDiscord<juan_carlos> https://nim-lang.github.io/Nim/testament.html
16:52:43FromDiscord<enthus1ast> ah got it instead of `tests/tbasic/simple.nim` it must be `tests/tbasic/test_simple.nim`
16:52:59FromDiscord<enthus1ast> not the folder must start with `t` but the test 🙂
16:53:10*vicfred_ quit (Quit: Leaving)
16:55:59ForumUpdaterBotNew thread by Akito: Confusing behaviour with cstringArray, see https://forum.nim-lang.org/t/6886
16:58:46disruptekmy car is a beast.
17:01:28*jjido joined #nim
17:02:23disruptektestament is for chumps. my testes is where it's at.
17:03:30FromDiscord<Avatarfighter> did you name your test suite as a play on words for testicles disruptek
17:03:41disruptekeww
17:03:56FromDiscord<Avatarfighter> Why did i except otherwise smh
17:06:29FromDiscord<Rika> avatar have some tact, jesus
17:07:00disruptekdecorum, you mean. you can't just say whatever the fuck you want in this channel.
17:15:40FromDiscord<Avatarfighter> I'm so sorry disruptek for being so insensitive to your testes
17:16:49disrupteki'm used to it.
17:17:42*hnOsmium0001 joined #nim
17:25:15*a_chou quit (Remote host closed the connection)
17:25:33*a_chou joined #nim
17:37:59leorizenature: you called?
17:53:00*idf joined #nim
18:01:31natureyes :D
18:02:00naturehttps://imgur.com/Lk1hDXj Do you know why this is happening ?
18:03:05leorizedid you mess up your nim install or smt? :P
18:03:27leorizered means the symbol is unknown
18:03:49natureyeah that's weird, it's based on nimsuggest right ?
18:05:47natureI managed to setup nimlsp as well and for instance if I try to get the tooltip over echo I get this:
18:06:05nature0: bad argument #2 to 'min' (number expected, got boolean)
18:09:18leorizethat's weird, I don't know how the structure of nix nim package is like so I can't really help you with this
18:09:26leorizetry a locally-installed nim
18:09:34leorizebasically clone the nim repo and build it
18:09:45leorizethen add the `bin` folder in there to PATH
18:09:51leorizeit should picks up the nimsuggest there
18:10:13leorize(you can also use choosenim for this)
18:11:43natureOk will give this a shot
18:11:54*arecacea1 quit (Remote host closed the connection)
18:12:12*arecacea1 joined #nim
18:14:49FromDiscord<acek7> Would learning python help people learn nim who are having trouble using the available nim tutorials/resources
18:15:25leorizeunfortunately, no
18:15:41FromDiscord<acek7> can you elaborate
18:15:55leorizenim only looks like python in that we use significant whitespace
18:16:06leorizemost of nim semantics are completely different from python
18:16:26FromDiscord<acek7> so maybe just keep trying the nim stuff then
18:16:44leorizeif you have any questions, feel free to ask
18:17:34leorizewe are always happy to help new users :)
18:18:11FromDiscord<acek7> i just get stuck learning some more advanced things
18:18:46FromDiscord<acek7> and so i was like i wonder if something else translates into this and would help me understand. But i will ask more often when i have a question
18:42:34*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:54:37*Vladar quit (Quit: Leaving)
19:01:10FromGitter<StefanSalewski> acek7, if you are really a beginner with programming consider reading my book.
19:02:57natureok leorize working great when I manually compile and install nim
19:03:14Oddmongerwhich book, Stefan ?
19:03:52FromGitter<StefanSalewski> http://ssalewski.de/nimprogramming.html
19:05:15FromGitter<StefanSalewski> But it is more for kids and fully untrained people.
19:05:42Oddmongerah, i remember having read it , i found it excellent
19:05:56Oddmongerand i'm not a newbie :)
19:06:07FromGitter<StefanSalewski> Thanks, bye.
19:06:34*arecacea1 quit (Remote host closed the connection)
19:07:35*arecacea1 joined #nim
19:11:07FromDiscord<juan_carlos> Is there a better way to construct a tuple and use it without making a variable than `cast[TupleType]((key: "value"))` ?.
19:11:43disrupteki didn't realize you couldn't make tuples anonymously.
19:12:03disruptekin fact, i don't believe it.
19:12:39disruptek(key: "value") works for me.
19:15:10leorizenature: you should open a bug report on nixpkg then :P
19:15:19FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2zCO
19:16:11FromDiscord<Elegant Beef> No casting required
19:16:13FromDiscord<juan_carlos> Without variable
19:16:25FromDiscord<Elegant Beef> The point was to show that b is of type Test
19:16:46FromDiscord<Elegant Beef> I really need to use assert more
19:16:47disruptek!eval echo (animal: "goat")[0]
19:16:49NimBotgoat
19:17:01FromDiscord<Rika> https://play.nim-lang.org/#ix=2zCQ ?
19:17:55leorizehttps://play.nim-lang.org/#ix=2zCS
19:18:01leorizeno variable needed
19:18:16FromDiscord<whisperdev> Is there a “cron/quartz” library for Nim?
19:18:24FromDiscord<Rika> i didnt use conversion (`(tuple contents).tupletype`) nor did i use type in let (`let a: tupletype`)
19:18:26leorizetuples aren't distinct from each other, so as long as the ordering is correct, it just works
19:18:31natureleorize: I actually found out that by using the package `nim-unwrapped` instead of `nim` it works flawlessly as well
19:18:40natureThanks for your help
19:19:00FromDiscord<Rika> so the wrapper is broken? what config does the wrapper add anyway
19:19:04leorizeyw :)
19:19:36leorizenix has an unconventional fs layout, so I'm not surprised when it breaks
19:22:09natureyeah me neither, but up until now I have never been totally stuck so it's just a matter of understanding how to make it work
19:22:57leorizeprobably you should nudge them to fix the -unwrapped version :P
19:23:18leorizewrapped*
19:24:19naturetrue, will do
19:24:40natureAlso today I made a PR to port nimlsp to the nixpkgs
19:24:56naturemight probably do one for your nice plugin :D
19:25:12natureI'll kyu
19:25:23leorizepeople package vim plugins in nix too? :P
19:27:06FromDiscord<Rika> yes
19:27:33FromDiscord<Rika> well some people also just use niv and take it straight from the repos
19:27:54leorizenature: well I'm not tagging releases for nim.nvim...
19:28:01leorizesince most people just use the bleeding edge :P
19:28:32disruptekrika: go to bed.
19:29:55natureRika yeah the wrapper is broken and I am not sure what it adds of the unwrapped ^^'
19:31:55natureleorize: ah ok, a bit annoying then, maybe one day if you start tagging releases :D
19:40:17*vicfred joined #nim
19:42:30*jjido joined #nim
20:19:14ZevvDoes anyone know of a complete iso8601 time parser?
20:19:28disruptekcomplete?
20:19:45disruptekyou mean with timezone?
20:20:13FromDiscord<acek7> I was away someone recommended a book to me is he still here
20:20:20disrupteknope.
20:20:30Zevvyeah all the permutations are making me cry
20:20:39disrupteki just do it using the stdlib.
20:20:48Zevvoh wait what's https://github.com/jackhftang/timestamp.nim
20:22:26disruptekhere's some old stuff that should still work: http://ix.io/2zDg/nim
20:22:54Zevvbwah I hate so much about computers and programming
20:23:04Zevv"time" is high on my list
20:23:10Zevvthanks!
20:23:47disrupteklemme know if you need something else; i feel like i've solved this several times in different ways.
20:25:10Zevvwell this jackhftang looks interesting; it's one uint64 nano encoding and promises faster time processing
20:25:17Zevvwhich is basically where I'm spending a lot of time now
20:25:21Zevvha ha ha the puns
20:25:37disrupteknice.
20:25:39disruptekwhat's a nano encoding?
20:25:55disrupteksounds luxurious.
20:26:21Zevvnanoseconds in uint64
20:26:32Zevvinstead of an object with seconds and sub-seconds
20:26:45disruptekyou can get that from posix, no?
20:27:03Zevvyeah sure but nim 'times' is relatively expensive
20:28:21Zevvbwah also only supports zulu stamps
20:28:32Zevvwell then
20:40:38*narimiran quit (Quit: leaving)
20:46:47*apahl quit (Ping timeout: 240 seconds)
20:48:09*apahl joined #nim
21:12:09*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:15:16*a_chou quit (Ping timeout: 260 seconds)
21:19:16FromDiscord<Rebel> Is there an equivalent nim proc similiar to go's LookupId func? That takes a uid and returns the username corresponding to that uid. Can't seem to find anything equivalent on posix and posix_utils.
21:19:33FromDiscord<Rebel> (edit) 'similiar' => 'similar'
21:25:53supakeenRebel: posix.getpwuid
21:26:22supakeenIt'll return an object with a pw_name field which is the username.
21:39:55*thomasross joined #nim
21:39:55*jjido joined #nim
21:42:49disruptekyou're blowin' my mind right now.
21:42:50*solitudesf quit (Ping timeout: 246 seconds)
21:53:56FromDiscord<Rebel> excellent
21:53:57FromDiscord<Rebel> thanks
22:00:13supakeenIs there any plan to renovate the stdlib for 2.x ;)
22:02:46*a_chou joined #nim
22:05:13leorizeyes but if you have any ideas then feel free to make 3rd party packages for them :P
22:07:07supakeenSo the renovation is 'remove most of it'? :)
22:07:27supakeenNah, I was more thinking around the lines of some more consistent naming.
22:11:31FromDiscord<Intexisty> how can i read from environmental variables in nim
22:11:36FromDiscord<Intexisty> I would like to read from $PATH
22:17:33FromDiscord<Avatarfighter> wait nim is getting a 2.x version
22:17:49FromDiscord<Recruit_main707> One day
22:17:51FromDiscord<Rika> well of course did you think nim would be 1.x forever
22:17:55FromDiscord<Avatarfighter> wym
22:17:58FromDiscord<Avatarfighter> nim is 1.x??
22:18:19FromDiscord<Recruit_main707> Ye
22:18:29FromDiscord<Rika> ???
22:18:36FromDiscord<Rika> you're a whole YEAR late
22:18:52leorize@Intexisty checkout os.getEnv
22:19:08*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:19:09FromDiscord<Avatarfighter> @Clyybber did you know nim is 1.x now 😛
22:19:33FromDiscord<Avatarfighter> haha
22:19:57FromDiscord<Avatarfighter> Just curious is 2.x getting an AST rewrite?
22:20:04FromDiscord<Intexisty> what is a tainted string
22:20:34FromDiscord<Clyybber> a string from "outside", but it only matters when you turn tainted mode on
22:21:02FromDiscord<Intexisty> how can i turn it into a normal string
22:21:07FromDiscord<Clyybber> you don't need to
22:21:19FromDiscord<Rika> you're probably not using tainted mode
22:21:53FromDiscord<Clyybber> @Avatarfighter in some form or the other yeah
22:22:20FromDiscord<Avatarfighter> I thought I read that the AST was getting a revamp but I wasn't sure
22:22:37leorizeit's long before v2 will be a thing :P
22:22:49FromDiscord<Avatarfighter> ah
22:22:53FromDiscord<Avatarfighter> exciting
22:28:19supakeenHuh, did something change in relation to assert/doAssert in recent times?
22:29:02FromDiscord<Rika> why do you ask?
22:29:44supakeenBecause the testcases I wrote a while back for asynchttpserver now pass no matter what.
22:31:16supakeenhttps://github.com/nim-lang/Nim/blob/devel/tests/stdlib/tasynchttpserver.nim#L42 specifically if I change that line to say `doAssert(response.status == Http404)` it'll pass even if `response.status` is a Http200.
22:31:52supakeenI was going to expand on the tests and I'm p darned sure that I tested with failing testcases in april.
22:33:07supakeenIn fact, if I put an `assert 1 == 0` in any of the test proces they do not fail.
22:33:16supakeen(though they are executed)
22:33:58FromDiscord<Clyybber> you are probably ocmpiling with -d:danger
22:34:15supakeenI'm running the testcase with `./koch tests r stdlib/tasynchttpserver`.
22:35:54FromDiscord<Clyybber> hmm, can you add --print and check the commands?
22:36:05leorizenote that -d:release also disable assertion
22:36:09leorizeyou need doAssert to force it
22:36:47*a_chou quit (Ping timeout: 265 seconds)
22:36:53supakeenI eh, think I either smoked crack at the time.
22:36:59supakeenBut the test coro is never waitFor'ed.
22:37:09FromDiscord<Clyybber> leorize: -d:release does not disable assertions
22:37:48supakeenHow peculiar.
22:37:54leorizeiirc Araq did say that assertions shouldn't be enabled for release build
22:38:10FromDiscord<Clyybber> I think it used to be that way but was changed pre 1.0
22:38:13FromDiscord<Clyybber> IIRC
22:38:40disruptekwut
22:38:42leorize@Clyybber can you look at #15482? I want to merge that before the next nightlies cycle
22:38:43disbothttps://github.com/nim-lang/Nim/pull/15482 -- 3renderer: use the biggest integer type for masking literals [backport]
22:38:45disruptekthat can't be right.
22:38:51supakeenhttps://bpa.st/T6BQ is what makes it work.
22:39:06supakeenWhich, makes sense, but also, definitely sure it *did* fail correctly previously.
22:39:16FromDiscord<Clyybber> leorize: Right, I looked at it earlier and forgot to approve
22:39:55FromDiscord<Recruit_main707> I’ve always heard release and danger disabled assertions
22:40:05FromDiscord<Clyybber> leorize: merged
22:40:22leorizethanks
22:40:25FromDiscord<Clyybber> @Recruit_main707 you always heard wrong
22:40:30FromDiscord<Clyybber> only danger does
22:40:48FromDiscord<Recruit_main707> Good to know I guess :P
22:45:09*junland quit (Quit: %ZNC Disconnected%)
22:47:21*junland joined #nim
22:52:38supakeen4th PR of the day, time to stop annoying people!
22:53:38FromDiscord<codic> can i convert a byte (uint8) to a char, which i can then convert to a string?
22:54:10FromDiscord<Rika> Yes on the first, kinda on the second
22:56:01FromDiscord<codic> well i have a byte and i want to represent it the character code it represents as a string
22:57:11FromDiscord<codic> eg `'a'.byte` => `"a"`
23:01:08ForumUpdaterBotNew thread by Jdn: Dual 0.1.0, see https://forum.nim-lang.org/t/6887
23:08:27FromDiscord<codic> i figured out a more nim-like way to do this, using optionals
23:09:40*nature quit (Ping timeout: 272 seconds)
23:36:53*Mortir joined #nim
23:41:54*arecacea1 quit (Remote host closed the connection)
23:42:21*arecacea1 joined #nim
23:43:20*a_chou joined #nim
23:46:41*vicfred quit (Quit: Leaving)
23:55:44*idxu quit (Quit: ZNC - https://znc.in)
23:56:52*idxu joined #nim