00:05:23 | * | abm quit (Read error: Connection reset by peer) |
00:05:41 | * | abm joined #nim |
00:17:50 | disruptek | not the first time i made a girl cry. |
00:49:48 | FromDiscord | <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:37 | disruptek | it /was/ a pretty amazing insult. |
01:22:13 | * | oculux quit (Read error: Connection reset by peer) |
01:24:50 | * | oculux joined #nim |
01:28:31 | Prestige | Is there a way to pass an iterator as a proc argument? If there is, I'm struggling with the syntax. |
01:28:49 | disruptek | yes. |
01:31:05 | Prestige | ha, finally. Needed to add a closure pragma. |
01:31:13 | disruptek | yes. |
01:31:25 | disruptek | happy to help. |
01:31:30 | Prestige | Thanks 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:49 | FromDiscord | <Avatarfighter> dude closure iterators are so clutch |
02:42:02 | FromDiscord | <Avatarfighter> I used one for my MITM and all I can say is wow |
02:42:20 | FromDiscord | <Avatarfighter> being able to advance the iterator whenever you want is just so powerful |
02:42:40 | disruptek | shhh my pants are getting tight. |
02:43:01 | FromDiscord | <Avatarfighter> I've been told I have that effect |
02:43:10 | FromDiscord | <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:11 | leorize | nim is broken on 32bit windows... |
03:05:35 | FromDiscord | <Avatarfighter> just get 64bit windows |
03:07:18 | leorize | lol |
03:09:01 | leorize | Araq: https://play.nim-lang.org/#ix=2zym |
03:09:06 | leorize | this 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:09 | FromDiscord | <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:24 | FromDiscord | <himu> for example `proc hello(): Stmt(kind: FUNCSTMT)` vs `proc hello(): Stmt`. Is the first one possible to be more specific? |
03:50:03 | FromDiscord | <juan_carlos> `func foo(arg: int or float): auto =` ?. |
03:56:03 | * | lritter joined #nim |
03:59:29 | FromDiscord | <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:49 | leorize | @himu that'd requires runtime matching so you'd want a pattern matcher |
03:59:56 | leorize | !repo gara |
03:59:56 | disbot | https://github.com/alehander92/gara -- 9gara: 11 15 79⭐ 7🍴 |
04:01:29 | FromDiscord | <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:07 | FromDiscord | <juan_carlos> You can make a variant type too. |
04:05:24 | FromDiscord | <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:03 | FromDiscord | <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:06 | FromDiscord | <Yardanico> @narimiran you around? |
04:13:28 | FromDiscord | <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:28 | disbot | ➥ Require PRs be in a repo with hacktoberfest topic and be accepted |
04:17:39 | FromDiscord | <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:03 | FromDiscord | <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:48 | FromDiscord | <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:27 | FromDiscord | <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:57 | FromDiscord | <Yardanico> !seen narimiran |
05:34:58 | disbot | narimiran 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:07 | narimiran | yes? |
05:35:14 | FromDiscord | <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:15 | disbot | ➥ Require PRs be in a repo with hacktoberfest topic and be accepted |
05:35:22 | FromDiscord | <Yardanico> if we want to participate in hacktoberfest 🙂 |
05:35:34 | FromDiscord | <Yardanico> after a lot of spammers they decided to make it opt-in for maintainers |
05:35:59 | FromDiscord | <Yardanico> https://hacktoberfest.digitalocean.com/hacktoberfest-update here is the explanation |
05:36:15 | FromDiscord | <Yardanico> also the PR must be merged/accepted/labeled with "hacktoberfest-accepted" to be counted |
05:38:55 | FromDiscord | <Yardanico> so I guess hacktoberfest this year already kinda failed 🙂 |
05:39:11 | FromDiscord | <Yardanico> sadly a lot of people blindly believe those "influencers" |
05:40:08 | FromDiscord | <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:35 | FromDiscord | <Yardanico> also https://github.com/search?q=is%3Apr+label%3Ainvalid+updated%3A%3E2019-09-30 |
05:47:40 | Araq | Rebel: if you need to ask, you don't need .noinit, it's unsafe |
05:48:34 | Araq | plus most of its speed advantages are gone with --gc:arc/orc |
05:53:09 | FromDiscord | <shirleyquirk> sent a long message, see http://ix.io/2zyT |
05:53:25 | FromDiscord | <Yardanico> it's "must" |
05:53:30 | FromDiscord | <Yardanico> one of these 3 conditions must be true |
05:53:34 | FromDiscord | <Yardanico> in order for it to count |
05:53:43 | FromDiscord | <shirleyquirk> Sorry, yes my bad parsing |
05:53:51 | FromDiscord | <shashlick> Meh - nimterop is failing on alpine because the find command doesn't support -regextype |
05:54:02 | FromDiscord | <shashlick> It uses busybox |
05:54:26 | FromDiscord | <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:28 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/761828490336010260/unknown.png |
05:54:50 | FromDiscord | <shashlick> :) |
05:58:50 | leorize | Araq: can you fix this? https://github.com/nim-lang/Nim/blob/devel/compiler/renderer.nim#L339-L340 |
05:59:16 | leorize | on 32bit system the `1` is int32 so it's too small to hold the mask |
05:59:21 | leorize | of itself |
05:59:32 | leorize | which caused funky issues with nightlies |
06:13:58 | FromDiscord | <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:43 | FromDiscord | <shirleyquirk> I reckon (uint.high shr (sizeof(uint)-size)*8) works |
07:14:52 | FromDiscord | <shirleyquirk> wait, no, that branch won't be taken if size==32 bits anyway |
07:22:17 | FromDiscord | <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:41 | Araq | leorize, looks like you can fix it too :-) |
09:42:34 | FromDiscord | <dom96> wow what a shit show with this year's hacktoberfest |
09:44:34 | FromDiscord | <dom96> anyway, adding Nim to that topic |
09:47:34 | FromDiscord | <dom96> Nice, we're not that far down https://github.com/topics/hacktoberfest |
09:47:43 | FromDiscord | <dom96> (For me at least, who knows how algorithmic this page is) |
09:48:01 | FromDiscord | <dom96> it does appear to be ordered by stargazers though |
09:49:23 | FromDiscord | <dom96> We need to fix this https://github.com/nim-lang/Nim/contribute |
09:52:04 | FromDiscord | <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:54 | FromDiscord | <iWonderAboutTuatara> https://media.discordapp.net/attachments/371759389889003532/761888748102352896/Screenshot_20201003-025339.jpg |
09:53:58 | FromDiscord | <iWonderAboutTuatara> More latex |
09:54:12 | FromDiscord | <iWonderAboutTuatara> Now that you guys pointed it out I can't unsee if |
09:54:17 | FromDiscord | <iWonderAboutTuatara> *it |
09:54:49 | * | FromDiscord quit (Remote host closed the connection) |
09:55:05 | * | FromDiscord joined #nim |
09:57:09 | FromDiscord | <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:28 | FromDiscord | <iWonderAboutTuatara> Is there a way to do something like `cin >> x >> y` in Nim? |
10:01:57 | FromDiscord | <Rika> let x = stdin.readline()↵let y = stdin.readline()↵↵? |
10:04:02 | FromDiscord | <Vindaar> maybe the tag needs to be written slightly differently @dom96 ? |
10:05:31 | FromDiscord | <Vindaar> or it's simpler and it just takes a couple of hours to refresh |
10:06:55 | FromDiscord | <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:55 | FromDiscord | <dom96> lol what |
10:08:59 | FromDiscord | <dom96> I tagged like 22 issues |
10:09:04 | FromDiscord | <dom96> did they show up individually? |
10:11:13 | FromDiscord | <iWonderAboutTuatara> @Rika that reads line, not till whitespace |
10:11:31 | FromDiscord | <Rika> well i dont use cin/sout |
10:11:32 | FromDiscord | <Rika> (edit) 'cin/sout' => 'cin/cout' |
10:11:36 | FromDiscord | <iWonderAboutTuatara> There's a very specific way inputs are fed in in competitive programming |
10:11:36 | FromDiscord | <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:48 | FromDiscord | <iWonderAboutTuatara> Irs just the inputs whitespaced |
10:11:58 | FromDiscord | <iWonderAboutTuatara> All 1 line |
10:12:16 | FromDiscord | <Rika> let t = stdin.readLine().split(); let (x, y) = (t[0], t[1]) |
10:12:33 | FromDiscord | <iWonderAboutTuatara> I was thinking of that |
10:12:40 | FromDiscord | <iWonderAboutTuatara> Not ideal, but if it works if works |
10:12:50 | FromDiscord | <iWonderAboutTuatara> Maybe I can try this with a macro? |
10:13:00 | FromDiscord | <Rika> something tells me nim wasnt exactly made for golfing if you're aiming for that |
10:13:08 | FromDiscord | <iWonderAboutTuatara> Not golfing |
10:13:13 | FromDiscord | <iWonderAboutTuatara> Competitive programming |
10:13:17 | FromDiscord | <iWonderAboutTuatara> Ie speed of impl |
10:13:23 | FromDiscord | <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:29 | FromDiscord | <Vindaar> @dom96 yeah, they did for some reason. Never seen that before |
10:13:30 | FromDiscord | <iWonderAboutTuatara> What language do people use for golfing? Absurdly functional python? |
10:14:07 | FromDiscord | <Rika> no, golfing languages |
10:14:08 | FromDiscord | <iWonderAboutTuatara> But idc about size, all that matters is that I write it as fast as possible |
10:14:12 | FromDiscord | <iWonderAboutTuatara> Oh that's boring |
10:14:20 | FromDiscord | <Rika> a macro wont make this faster i do not think |
10:14:32 | FromDiscord | <iWonderAboutTuatara> This is fine as is, but not ideal |
10:14:42 | FromDiscord | <Rika> rather i dont think a macro *would make this faster |
10:14:48 | FromDiscord | <Vindaar> Looks fun like this https://media.discordapp.net/attachments/371759389889003532/761894003359612943/dom_issues.png |
10:15:10 | FromDiscord | <iWonderAboutTuatara> I think it would |
10:15:18 | FromDiscord | <Rika> how so? |
10:15:28 | FromDiscord | <iWonderAboutTuatara> You can write a macro that reads stdin and makes as many vars as you want |
10:15:31 | FromDiscord | <iWonderAboutTuatara> Very reusable |
10:15:38 | FromDiscord | <Rika> you mean faster as in for writing? syre |
10:15:41 | FromDiscord | <iWonderAboutTuatara> Or a template even |
10:15:42 | FromDiscord | <Rika> (edit) 'syre' => 'sure' |
10:15:51 | FromDiscord | <iWonderAboutTuatara> Yeah, you can write things before you know the problem |
10:16:06 | FromDiscord | <iWonderAboutTuatara> Too hard to police that kind of thing so they don't bother |
10:16:17 | FromDiscord | <dom96> > Looks fun like this↵jesus |
10:16:59 | FromDiscord | <iWonderAboutTuatara> Pantokrator |
10:28:00 | supakeen | I 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:14 | supakeen | Does 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:13 | FromDiscord | <dom96> ughhh, why would you do this? Araq, narimiran https://media.discordapp.net/attachments/371759389889003532/761900908048941076/unknown.png |
10:44:39 | FromDiscord | <dom96> Why not keep these procs and allow the book to work? |
10:46:05 | * | opal joined #nim |
10:46:13 | FromDiscord | <Rika> well isnt that how deprecated procs work |
10:47:04 | FromDiscord | <dom96> Yes, but why not keep the ones that the book uses? |
10:47:23 | FromDiscord | <Rika> because theyre deprecated? |
10:47:50 | FromDiscord | <Rika> sorry, i dont get it, i dont believe the book should get privilege because it exists |
10:48:03 | FromDiscord | <lqdev> i agree with rika |
10:48:15 | FromDiscord | <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:16 | disbot | ➥ Listing 7.14 Does Not Compile in Linux |
10:48:26 | FromDiscord | <lqdev> especially the book was written on an alpha version of nim |
10:48:42 | FromDiscord | <lqdev> so perhaps it's about time to update it? |
10:49:22 | FromDiscord | <Rika> well you cant update the physical |
10:49:41 | FromDiscord | <Rika> but i assume theres a link that points to errata or something else like updated code locations |
10:49:44 | FromDiscord | <lqdev> i mean, 2nd edition. |
10:49:49 | FromDiscord | <Rika> that's expensive |
10:49:50 | FromDiscord | <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:56 | FromDiscord | <Rika> unreasonable i think |
10:50:01 | FromDiscord | <Rika> (i mean to lq) |
10:50:47 | FromDiscord | <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:47 | FromDiscord | <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:19 | FromDiscord | <lqdev> well, i guess that's just the thing about physical media. they get out of date after a time |
10:53:55 | FromDiscord | <whisperdev> Physical books are a bad medium for anything technology related |
10:54:04 | FromDiscord | <whisperdev> I mean they are the embodiment of an oxymoron |
10:54:32 | FromDiscord | <Rika> yall so harsh smh |
10:55:16 | FromDiscord | <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:26 | FromDiscord | <dom96> FYI I got agreement from Araq that he would keep these |
10:55:34 | FromDiscord | <dom96> so I'm just feeling like he's breaking a promise |
10:55:50 | FromDiscord | <whisperdev> Physical books maybe should not be a reference manual on how to learn a new technology |
10:55:50 | FromDiscord | <dom96> Like, I went as far as adding tests for every code in the book |
10:55:55 | FromDiscord | <dom96> and they just freaking modified it |
10:56:22 | FromDiscord | <whisperdev> But @dom96 do you expect it to work for how long? |
10:56:23 | FromDiscord | <whisperdev> forever? |
10:56:41 | FromDiscord | <dom96> I expect it to work until 2.0 is released |
10:57:00 | FromDiscord | <Rika> maybe next time there should be a time of removal for deprecations |
10:57:26 | FromDiscord | <Rika> so removals are expected and can be negotiated before it happens |
10:58:27 | FromDiscord | <dom96> There is a time, 2 releases |
10:58:45 | FromDiscord | <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:14 | FromDiscord | <Rika> so this is a planned removal? |
10:59:39 | FromDiscord | <whisperdev> i also own your book but Nim has advanced so much since the book got released |
10:59:44 | FromDiscord | <whisperdev> and all that arc and other shit is so awesome |
11:00:40 | FromDiscord | <dom96> It didn't advance in a way that means the things the book teaches are incorrect |
11:00:50 | FromDiscord | <dom96> these are just small changes to API |
11:00:57 | FromDiscord | <dom96> which the reader should get a chance to at least see working |
11:01:08 | FromDiscord | <dom96> it's a simple case of not discouraging people |
11:01:23 | FromDiscord | <dom96> in fact, it's one more thing that makes it less likely people will use Nim |
11:01:36 | FromDiscord | <dom96> setting aside the fact that it's a shitty move for something I spent many years writing |
11:01:47 | FromDiscord | <dom96> it's really not a nice experience for anyone wanting to learn Nim |
11:02:46 | FromDiscord | <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:23 | FromDiscord | <dom96> Well, at least the breakage is consistent: it occurs in 1.2.0 |
11:10:22 | supakeen | woop 2 prs for asyncftpclient |
11:10:27 | supakeen | that 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:22 | FromDiscord | <dom96> Hope this helps people https://github.com/dom96/nim-in-action-code/wiki/FAQ#compilation-errors-when--is-used |
11:29:36 | FromDiscord | <dom96> and that search engines pick it up 🙂 |
11:38:40 | supakeen | https://i.imgur.com/AniO1fO.png stealing all the small issues today. |
11:39:47 | FromDiscord | <dom96> niceee |
11:39:55 | supakeen | There's so many tiny ones! |
11:40:21 | FromDiscord | <Rika> smol bois |
11:55:54 | FromDiscord | <dom96> huh what |
11:55:59 | FromDiscord | <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:13 | nature | Does anybody know why nimlsp is trying to create a file here ? |
13:07:44 | nature | https://github.com/PMunch/nimlsp/blob/231835138f0720aabbf3fb0fc7b9dac8b0f6766f/src/nimlsp.nim#L27 |
13:09:53 | FromGitter | <bung87> cache stashed nim file and store log file from the code I can tell |
13:10:48 | FromGitter | <bung87> previous version store the stashed nim file in memory if I remember correct. |
13:12:20 | nature | I 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:26 | FromDiscord | <Anuke> Can anyone tell me why this segfaults with no stack trace? https://play.nim-lang.org/#ix=2zAR |
13:51:10 | FromDiscord | <Anuke> It does so both on ix and on my PC |
13:51:55 | FromDiscord | <Anuke> GDB tells me it segfaults on the line where `init()` is defined |
13:52:09 | FromDiscord | <dom96> That array probably doesn't fit in the stack |
13:52:12 | * | D_ quit (Quit: 💨) |
13:52:25 | FromDiscord | <Rika> was gonna say |
13:52:30 | * | D_ joined #nim |
13:52:52 | FromDiscord | <Rika> it's 133 * 133 * 133 * 4 bytes |
13:53:15 | FromDiscord | <Anuke> how would one move it into the heap? |
13:53:47 | FromDiscord | <Rika> make it a ref i suppose |
13:55:56 | FromDiscord | <Anuke> Is there any way to make sure that things like this fail with a more descriptive message next time? |
13:57:13 | FromDiscord | <Anuke> I have `d:debug` enabled, and there's nothing besides `Segmentation fault: etc` displayed when it crashes |
14:10:02 | FromDiscord | <Rika> dont think so |
14:15:30 | ForumUpdaterBot | New 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:10 | disruptek | --stackTrace:on |
14:19:19 | disruptek | -d:debug isn't really a thing. |
14:20:34 | FromDiscord | <Anuke> The strange thing is, it shows stack traces for *other* types of segfaults, e.g. when I try to access nil |
14:20:48 | FromDiscord | <Anuke> `--stackTrace:on` doesn't work in this case |
14:21:49 | disruptek | oh, you're outside nim's baliwick here. |
14:21:55 | disruptek | i didn't read the whole convo. |
14:24:00 | disruptek | dom96: there are conventions for updating books after they are published. maybe google `errata`. |
14:25:30 | disruptek | it seems unreasonable to expect that others will do the work to ensure that your writing remains relevant indefinitely. |
14:26:13 | Zevv | hey disruptek |
14:26:17 | Zevv | you want to see my hip shit |
14:26:28 | disruptek | yeah, i saw you updated it. |
14:26:46 | Zevv | why would you even see that |
14:27:00 | disruptek | i'm watching the repo. |
14:27:07 | Zevv | why would you even know about the repo? |
14:27:17 | disruptek | this is me you're talkin' too. |
14:27:19 | Zevv | you'e making me kind of paranoid here |
14:27:27 | disruptek | well, you should be. |
14:27:35 | disruptek | hold on, lemme grab a fork. |
14:27:40 | FromDiscord | <dom96> > it seems unreasonable to expect that others will do the work to ensure that your writing remains relevant indefinitely. |
14:27:52 | FromDiscord | <dom96> In this case it's people doing work to make it irrelevant |
14:28:03 | Zevv | look at my hip shit: https://www.twitch.tv/zevvhere |
14:28:27 | disruptek | 140p here i come |
14:28:31 | Zevv | dude |
14:29:01 | Zevv | is it that bad, really |
14:29:36 | disruptek | no, it's like 800kbit i think. |
14:29:56 | Zevv | I feel like a virgin |
14:29:58 | Zevv | doing the twitch thing |
14:30:02 | FromDiscord | <Rika> arent you? |
14:30:06 | disruptek | touched for the very first time? |
14:30:15 | disruptek | how come there's no music? |
14:30:28 | Zevv | because I can't sing |
14:30:47 | disruptek | what am i looking at? |
14:31:03 | disruptek | zoom all the way in. |
14:31:03 | FromDiscord | <Rika> prolly a flame graph or whatever its called |
14:31:03 | Zevv | it's a generic event viewer thing I'm making |
14:31:13 | Zevv | you pipe it an ascii file with time stamps and things that happen |
14:31:22 | Zevv | in this case it's a perf rerord of my pc |
14:31:33 | Zevv | so all processes with threads vertical, and all system calls happening horizontal |
14:31:40 | disruptek | each line is a token? or a leading keyword? an event type. |
14:32:01 | Zevv | each line is <timestamp> <this.that.such.so> <thing> |
14:32:08 | Zevv | so that's trivial to make from all kinds of sources |
14:32:21 | Zevv | my goal is to get some insight into this cluster million users thing we're making |
14:32:24 | disruptek | what happens when you hover on the green bit. |
14:32:31 | Zevv | since no one in devops is able to get any insights |
14:32:45 | Zevv | at this time you jus see the event nmaes |
14:32:49 | disruptek | ahh. |
14:32:57 | Zevv | getting the time line to work smooth was a hassle |
14:33:04 | Zevv | I cna now zoom from centuries to nanoseconds |
14:33:27 | disruptek | most events happened in 2020 though. |
14:33:30 | Zevv | I need to do cool stuff with colors |
14:33:34 | Zevv | yeah how come I wonder |
14:33:53 | disruptek | so the thing about twitch is, you can talk to the viewer. |
14:34:01 | Zevv | yeah but I got stagefright like hell |
14:34:04 | FromDiscord | <Vindaar> nah, that's overrated disruptek |
14:34:21 | Zevv | unless - and that's funny - I am actuall on stage |
14:34:47 | Zevv | yeah I need to find some interesting color coding instead of all the greens |
14:34:52 | disruptek | i thought you were gonna present cps at the con. |
14:35:01 | Zevv | I'll do some treeform chroma stuff I guess |
14:44:24 | disruptek | show us some real data. |
14:45:04 | Araq | Anuke: it's very hard to fix, less effort is document 'array' better |
14:47:25 | * | vicfred_ joined #nim |
14:49:20 | FromDiscord | <lqdev> @Anuke i believe you're running into a stack overflow |
14:49:41 | FromDiscord | <lqdev> 9410548 bytes is way too much for the stack to hold |
14:49:47 | * | vicfred quit (Ping timeout: 240 seconds) |
14:51:27 | FromDiscord | <Anuke> yeah, that was it |
14:51:36 | disruptek | t-shirt people could remove deprecated uses of tables.add() from the tests. |
14:51:39 | FromDiscord | <Anuke> I'm used to Java arrays and assumed they would be on the heap |
14:51:54 | FromDiscord | <lqdev> yeah you'd have to use a seq in this case |
14:51:55 | disruptek | use a seq. |
14:52:21 | FromDiscord | <Anuke> I used `new array[...]` |
14:53:02 | FromDiscord | <Anuke> (is that worse than seq, in this case? I don't need expandable storage) |
14:54:17 | FromDiscord | <lqdev> well, you're getting a ref array which probably will work just fine |
14:54:36 | FromDiscord | <lqdev> but maybe the type checker might get confused |
14:54:43 | disruptek | sounds fine to me. |
14:54:46 | FromDiscord | <lqdev> which will make you type `arr[][123]` everywhere |
14:54:52 | FromDiscord | <lqdev> instead of just `arr[123]` |
14:55:06 | FromDiscord | <lqdev> haven't tested {.experimental: "implicitDeref".} with refs yet, though. |
14:55:08 | FromDiscord | <dom96> I would just use newSeqOfCap https://nim-lang.org/docs/system.html#newSeqOfCap%2CNatural |
14:55:18 | FromDiscord | <lqdev> or just newSeq with a len |
14:55:23 | FromDiscord | <dom96> `ref array` isn't something you'd see in the wild |
14:56:42 | FromDiscord | <lqdev> though you should avoid seq[seq[seq[T]]] |
14:56:57 | FromDiscord | <lqdev> because you have 3 pointer indirections until you get to the final element (!) |
14:57:17 | FromDiscord | <lqdev> and it's also a pita to initialize |
14:58:00 | FromDiscord | <lqdev> instead use a seq[T] and index it with `s[x + y * width + z * width * depth]` |
14:59:06 | FromDiscord | <lqdev> ah |
14:59:09 | FromDiscord | <lqdev> width * height |
14:59:09 | FromDiscord | <lqdev> not depth |
15:00:13 | FromDiscord | <dom96> Are you sure this actually significantly improves efficiency? |
15:00:22 | Zevv | I made a nice generic array[x][y][z] implementation the other day. but I forgot how I did it |
15:00:30 | Zevv | is that any help? |
15:00:52 | FromDiscord | <lqdev> @dom96 yes |
15:00:54 | FromDiscord | <lqdev> it does |
15:01:09 | FromDiscord | <lqdev> cache efficiency, to be exact |
15:01:16 | Zevv | right. Never seq[seq[]] |
15:01:38 | Zevv | also an extra pointer involved |
15:01:42 | disruptek | or just use ref array like you're already doing and ignore these knuckleheads. |
15:01:43 | FromDiscord | <Vindaar> unless of course you don't have fixed sizes of the inner seqs... |
15:04:56 | disruptek | Zevv: you look taller online. |
15:05:50 | Zevv | no dude you're bullshitting |
15:06:03 | Zevv | I know *exactly* what visuals of my float around on the internets |
15:24:52 | nature | Can anybody tell me why `echo` and `isMainModule` appears in red when using nim.nvim plugin ? |
15:30:38 | disruptek | ~leorize |
15:30:38 | disbot | leorize: 11responsible for the awesome NeoVim plugin at https://github.com/alaviss/nim.nvim -- disruptek |
15:31:07 | FromDiscord | <lqdev> nature: screenshot? |
15:31:36 | FromDiscord | <lqdev> try `hi Identifier none` |
15:31:49 | * | narimiran joined #nim |
15:32:01 | FromDiscord | <lqdev> you can put it in `~/.config/nvim/after/syntax/nim.vim` |
15:32:54 | nature | @lqdev didn't work |
15:33:00 | nature | let me take a screenshot |
15:33:50 | disruptek | narimiran: what do you think about supporting nodejs in stdlib? |
15:34:32 | narimiran | disruptek: i have no opinion |
15:34:40 | disruptek | are you sick? |
15:34:50 | nature | https://imgur.com/Lk1hDXj |
15:35:54 | FromDiscord | <lqdev> hm, that's odd |
15:35:56 | narimiran | disruptek: a bit :) |
15:36:02 | FromDiscord | <lqdev> nature: does it compile? |
15:36:07 | disruptek | 🙁 |
15:36:39 | nature | @lqdev yes it does |
15:36:45 | disruptek | narimiran: where are you located? |
15:37:01 | narimiran | disruptek: an ocean away from you, don't worry |
15:37:01 | FromDiscord | <lqdev> @leorize |
15:37:43 | disruptek | for some reason i thought you were in, like, argentina. |
15:40:37 | supakeen | We 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:15 | FromDiscord | <Avatarfighter> Yo yo yo what is up everyone |
16:27:57 | * | rusua_ quit (Quit: Connection closed for inactivity) |
16:28:08 | supakeen | Confusing people with a noSplit param to parseHeader mostly. |
16:28:39 | FromDiscord | <Avatarfighter> I am confused because I haven't heard of either in my whole nim career |
16:32:37 | supakeen | Exactly. |
16:34:59 | FromDiscord | <Avatarfighter> is disruptek here |
16:35:24 | FromDiscord | <Avatarfighter> i am curious to know how his car is doing |
16:37:17 | FromDiscord | <Rika> oh hey its the dude whos learning to read |
16:38:32 | FromDiscord | <Avatarfighter> I'm about to slap you Rika |
16:38:47 | FromDiscord | <Avatarfighter> How are you doing 😛 |
16:39:34 | FromDiscord | <Rika> vibin |
16:39:57 | FromDiscord | <Avatarfighter> Working on anything exciting? |
16:40:24 | * | bung quit (Quit: Lost terminal) |
16:40:25 | FromDiscord | <Rika> i havent written a nim program in weeks now i think |
16:40:34 | FromDiscord | <Avatarfighter> rip |
16:40:37 | FromDiscord | <Avatarfighter> Any ideas as to why? |
16:40:41 | FromDiscord | <Avatarfighter> Are you burnt out? |
16:40:52 | FromDiscord | <Rika> dunno, dont think i am |
16:41:01 | FromDiscord | <Rika> prolly just stuck on something |
16:41:17 | FromDiscord | <Avatarfighter> I feel for you |
16:41:23 | FromDiscord | <Avatarfighter> I was like that for 2 weeks |
16:43:01 | FromDiscord | <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:27 | FromDiscord | <enthus1ast> i've tests in tests/tbasic/simple.nim |
16:43:56 | FromDiscord | <Rika> are you sure youre not mistaking unittest for testament |
16:44:13 | FromDiscord | <enthus1ast> yes |
16:44:42 | FromDiscord | <Rika> brb rebooting someone else help them lol |
16:45:55 | FromDiscord | <enthus1ast> my simple.nim file even has ```discard """↵ joinable: true↵"""``` |
16:46:11 | FromDiscord | <enthus1ast> so it should be joined in the megastest or? |
16:46:45 | FromDiscord | <Rika> i dont know, wait for someone more knowledgeable on testament 🙏 |
16:46:55 | nature | leorize: are you around ? |
16:50:56 | FromDiscord | <juan_carlos> https://nim-lang.github.io/Nim/testament.html |
16:52:43 | FromDiscord | <enthus1ast> ah got it instead of `tests/tbasic/simple.nim` it must be `tests/tbasic/test_simple.nim` |
16:52:59 | FromDiscord | <enthus1ast> not the folder must start with `t` but the test 🙂 |
16:53:10 | * | vicfred_ quit (Quit: Leaving) |
16:55:59 | ForumUpdaterBot | New thread by Akito: Confusing behaviour with cstringArray, see https://forum.nim-lang.org/t/6886 |
16:58:46 | disruptek | my car is a beast. |
17:01:28 | * | jjido joined #nim |
17:02:23 | disruptek | testament is for chumps. my testes is where it's at. |
17:03:30 | FromDiscord | <Avatarfighter> did you name your test suite as a play on words for testicles disruptek |
17:03:41 | disruptek | eww |
17:03:56 | FromDiscord | <Avatarfighter> Why did i except otherwise smh |
17:06:29 | FromDiscord | <Rika> avatar have some tact, jesus |
17:07:00 | disruptek | decorum, you mean. you can't just say whatever the fuck you want in this channel. |
17:15:40 | FromDiscord | <Avatarfighter> I'm so sorry disruptek for being so insensitive to your testes |
17:16:49 | disruptek | i'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:59 | leorize | nature: you called? |
17:53:00 | * | idf joined #nim |
18:01:31 | nature | yes :D |
18:02:00 | nature | https://imgur.com/Lk1hDXj Do you know why this is happening ? |
18:03:05 | leorize | did you mess up your nim install or smt? :P |
18:03:27 | leorize | red means the symbol is unknown |
18:03:49 | nature | yeah that's weird, it's based on nimsuggest right ? |
18:05:47 | nature | I managed to setup nimlsp as well and for instance if I try to get the tooltip over echo I get this: |
18:06:05 | nature | 0: bad argument #2 to 'min' (number expected, got boolean) |
18:09:18 | leorize | that'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:26 | leorize | try a locally-installed nim |
18:09:34 | leorize | basically clone the nim repo and build it |
18:09:45 | leorize | then add the `bin` folder in there to PATH |
18:09:51 | leorize | it should picks up the nimsuggest there |
18:10:13 | leorize | (you can also use choosenim for this) |
18:11:43 | nature | Ok will give this a shot |
18:11:54 | * | arecacea1 quit (Remote host closed the connection) |
18:12:12 | * | arecacea1 joined #nim |
18:14:49 | FromDiscord | <acek7> Would learning python help people learn nim who are having trouble using the available nim tutorials/resources |
18:15:25 | leorize | unfortunately, no |
18:15:41 | FromDiscord | <acek7> can you elaborate |
18:15:55 | leorize | nim only looks like python in that we use significant whitespace |
18:16:06 | leorize | most of nim semantics are completely different from python |
18:16:26 | FromDiscord | <acek7> so maybe just keep trying the nim stuff then |
18:16:44 | leorize | if you have any questions, feel free to ask |
18:17:34 | leorize | we are always happy to help new users :) |
18:18:11 | FromDiscord | <acek7> i just get stuck learning some more advanced things |
18:18:46 | FromDiscord | <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:10 | FromGitter | <StefanSalewski> acek7, if you are really a beginner with programming consider reading my book. |
19:02:57 | nature | ok leorize working great when I manually compile and install nim |
19:03:14 | Oddmonger | which book, Stefan ? |
19:03:52 | FromGitter | <StefanSalewski> http://ssalewski.de/nimprogramming.html |
19:05:15 | FromGitter | <StefanSalewski> But it is more for kids and fully untrained people. |
19:05:42 | Oddmonger | ah, i remember having read it , i found it excellent |
19:05:56 | Oddmonger | and i'm not a newbie :) |
19:06:07 | FromGitter | <StefanSalewski> Thanks, bye. |
19:06:34 | * | arecacea1 quit (Remote host closed the connection) |
19:07:35 | * | arecacea1 joined #nim |
19:11:07 | FromDiscord | <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:43 | disruptek | i didn't realize you couldn't make tuples anonymously. |
19:12:03 | disruptek | in fact, i don't believe it. |
19:12:39 | disruptek | (key: "value") works for me. |
19:15:10 | leorize | nature: you should open a bug report on nixpkg then :P |
19:15:19 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2zCO |
19:16:11 | FromDiscord | <Elegant Beef> No casting required |
19:16:13 | FromDiscord | <juan_carlos> Without variable |
19:16:25 | FromDiscord | <Elegant Beef> The point was to show that b is of type Test |
19:16:46 | FromDiscord | <Elegant Beef> I really need to use assert more |
19:16:47 | disruptek | !eval echo (animal: "goat")[0] |
19:16:49 | NimBot | goat |
19:17:01 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2zCQ ? |
19:17:55 | leorize | https://play.nim-lang.org/#ix=2zCS |
19:18:01 | leorize | no variable needed |
19:18:16 | FromDiscord | <whisperdev> Is there a “cron/quartz” library for Nim? |
19:18:24 | FromDiscord | <Rika> i didnt use conversion (`(tuple contents).tupletype`) nor did i use type in let (`let a: tupletype`) |
19:18:26 | leorize | tuples aren't distinct from each other, so as long as the ordering is correct, it just works |
19:18:31 | nature | leorize: I actually found out that by using the package `nim-unwrapped` instead of `nim` it works flawlessly as well |
19:18:40 | nature | Thanks for your help |
19:19:00 | FromDiscord | <Rika> so the wrapper is broken? what config does the wrapper add anyway |
19:19:04 | leorize | yw :) |
19:19:36 | leorize | nix has an unconventional fs layout, so I'm not surprised when it breaks |
19:22:09 | nature | yeah 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:57 | leorize | probably you should nudge them to fix the -unwrapped version :P |
19:23:18 | leorize | wrapped* |
19:24:19 | nature | true, will do |
19:24:40 | nature | Also today I made a PR to port nimlsp to the nixpkgs |
19:24:56 | nature | might probably do one for your nice plugin :D |
19:25:12 | nature | I'll kyu |
19:25:23 | leorize | people package vim plugins in nix too? :P |
19:27:06 | FromDiscord | <Rika> yes |
19:27:33 | FromDiscord | <Rika> well some people also just use niv and take it straight from the repos |
19:27:54 | leorize | nature: well I'm not tagging releases for nim.nvim... |
19:28:01 | leorize | since most people just use the bleeding edge :P |
19:28:32 | disruptek | rika: go to bed. |
19:29:55 | nature | Rika yeah the wrapper is broken and I am not sure what it adds of the unwrapped ^^' |
19:31:55 | nature | leorize: 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:14 | Zevv | Does anyone know of a complete iso8601 time parser? |
20:19:28 | disruptek | complete? |
20:19:45 | disruptek | you mean with timezone? |
20:20:13 | FromDiscord | <acek7> I was away someone recommended a book to me is he still here |
20:20:20 | disruptek | nope. |
20:20:30 | Zevv | yeah all the permutations are making me cry |
20:20:39 | disruptek | i just do it using the stdlib. |
20:20:48 | Zevv | oh wait what's https://github.com/jackhftang/timestamp.nim |
20:22:26 | disruptek | here's some old stuff that should still work: http://ix.io/2zDg/nim |
20:22:54 | Zevv | bwah I hate so much about computers and programming |
20:23:04 | Zevv | "time" is high on my list |
20:23:10 | Zevv | thanks! |
20:23:47 | disruptek | lemme know if you need something else; i feel like i've solved this several times in different ways. |
20:25:10 | Zevv | well this jackhftang looks interesting; it's one uint64 nano encoding and promises faster time processing |
20:25:17 | Zevv | which is basically where I'm spending a lot of time now |
20:25:21 | Zevv | ha ha ha the puns |
20:25:37 | disruptek | nice. |
20:25:39 | disruptek | what's a nano encoding? |
20:25:55 | disruptek | sounds luxurious. |
20:26:21 | Zevv | nanoseconds in uint64 |
20:26:32 | Zevv | instead of an object with seconds and sub-seconds |
20:26:45 | disruptek | you can get that from posix, no? |
20:27:03 | Zevv | yeah sure but nim 'times' is relatively expensive |
20:28:21 | Zevv | bwah also only supports zulu stamps |
20:28:32 | Zevv | well 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:16 | FromDiscord | <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:33 | FromDiscord | <Rebel> (edit) 'similiar' => 'similar' |
21:25:53 | supakeen | Rebel: posix.getpwuid |
21:26:22 | supakeen | It'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:49 | disruptek | you're blowin' my mind right now. |
21:42:50 | * | solitudesf quit (Ping timeout: 246 seconds) |
21:53:56 | FromDiscord | <Rebel> excellent |
21:53:57 | FromDiscord | <Rebel> thanks |
22:00:13 | supakeen | Is there any plan to renovate the stdlib for 2.x ;) |
22:02:46 | * | a_chou joined #nim |
22:05:13 | leorize | yes but if you have any ideas then feel free to make 3rd party packages for them :P |
22:07:07 | supakeen | So the renovation is 'remove most of it'? :) |
22:07:27 | supakeen | Nah, I was more thinking around the lines of some more consistent naming. |
22:11:31 | FromDiscord | <Intexisty> how can i read from environmental variables in nim |
22:11:36 | FromDiscord | <Intexisty> I would like to read from $PATH |
22:17:33 | FromDiscord | <Avatarfighter> wait nim is getting a 2.x version |
22:17:49 | FromDiscord | <Recruit_main707> One day |
22:17:51 | FromDiscord | <Rika> well of course did you think nim would be 1.x forever |
22:17:55 | FromDiscord | <Avatarfighter> wym |
22:17:58 | FromDiscord | <Avatarfighter> nim is 1.x?? |
22:18:19 | FromDiscord | <Recruit_main707> Ye |
22:18:29 | FromDiscord | <Rika> ??? |
22:18:36 | FromDiscord | <Rika> you're a whole YEAR late |
22:18:52 | leorize | @Intexisty checkout os.getEnv |
22:19:08 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:19:09 | FromDiscord | <Avatarfighter> @Clyybber did you know nim is 1.x now 😛 |
22:19:33 | FromDiscord | <Avatarfighter> haha |
22:19:57 | FromDiscord | <Avatarfighter> Just curious is 2.x getting an AST rewrite? |
22:20:04 | FromDiscord | <Intexisty> what is a tainted string |
22:20:34 | FromDiscord | <Clyybber> a string from "outside", but it only matters when you turn tainted mode on |
22:21:02 | FromDiscord | <Intexisty> how can i turn it into a normal string |
22:21:07 | FromDiscord | <Clyybber> you don't need to |
22:21:19 | FromDiscord | <Rika> you're probably not using tainted mode |
22:21:53 | FromDiscord | <Clyybber> @Avatarfighter in some form or the other yeah |
22:22:20 | FromDiscord | <Avatarfighter> I thought I read that the AST was getting a revamp but I wasn't sure |
22:22:37 | leorize | it's long before v2 will be a thing :P |
22:22:49 | FromDiscord | <Avatarfighter> ah |
22:22:53 | FromDiscord | <Avatarfighter> exciting |
22:28:19 | supakeen | Huh, did something change in relation to assert/doAssert in recent times? |
22:29:02 | FromDiscord | <Rika> why do you ask? |
22:29:44 | supakeen | Because the testcases I wrote a while back for asynchttpserver now pass no matter what. |
22:31:16 | supakeen | https://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:52 | supakeen | I was going to expand on the tests and I'm p darned sure that I tested with failing testcases in april. |
22:33:07 | supakeen | In fact, if I put an `assert 1 == 0` in any of the test proces they do not fail. |
22:33:16 | supakeen | (though they are executed) |
22:33:58 | FromDiscord | <Clyybber> you are probably ocmpiling with -d:danger |
22:34:15 | supakeen | I'm running the testcase with `./koch tests r stdlib/tasynchttpserver`. |
22:35:54 | FromDiscord | <Clyybber> hmm, can you add --print and check the commands? |
22:36:05 | leorize | note that -d:release also disable assertion |
22:36:09 | leorize | you need doAssert to force it |
22:36:47 | * | a_chou quit (Ping timeout: 265 seconds) |
22:36:53 | supakeen | I eh, think I either smoked crack at the time. |
22:36:59 | supakeen | But the test coro is never waitFor'ed. |
22:37:09 | FromDiscord | <Clyybber> leorize: -d:release does not disable assertions |
22:37:48 | supakeen | How peculiar. |
22:37:54 | leorize | iirc Araq did say that assertions shouldn't be enabled for release build |
22:38:10 | FromDiscord | <Clyybber> I think it used to be that way but was changed pre 1.0 |
22:38:13 | FromDiscord | <Clyybber> IIRC |
22:38:40 | disruptek | wut |
22:38:42 | leorize | @Clyybber can you look at #15482? I want to merge that before the next nightlies cycle |
22:38:43 | disbot | https://github.com/nim-lang/Nim/pull/15482 -- 3renderer: use the biggest integer type for masking literals [backport] |
22:38:45 | disruptek | that can't be right. |
22:38:51 | supakeen | https://bpa.st/T6BQ is what makes it work. |
22:39:06 | supakeen | Which, makes sense, but also, definitely sure it *did* fail correctly previously. |
22:39:16 | FromDiscord | <Clyybber> leorize: Right, I looked at it earlier and forgot to approve |
22:39:55 | FromDiscord | <Recruit_main707> I’ve always heard release and danger disabled assertions |
22:40:05 | FromDiscord | <Clyybber> leorize: merged |
22:40:22 | leorize | thanks |
22:40:25 | FromDiscord | <Clyybber> @Recruit_main707 you always heard wrong |
22:40:30 | FromDiscord | <Clyybber> only danger does |
22:40:48 | FromDiscord | <Recruit_main707> Good to know I guess :P |
22:45:09 | * | junland quit (Quit: %ZNC Disconnected%) |
22:47:21 | * | junland joined #nim |
22:52:38 | supakeen | 4th PR of the day, time to stop annoying people! |
22:53:38 | FromDiscord | <codic> can i convert a byte (uint8) to a char, which i can then convert to a string? |
22:54:10 | FromDiscord | <Rika> Yes on the first, kinda on the second |
22:56:01 | FromDiscord | <codic> well i have a byte and i want to represent it the character code it represents as a string |
22:57:11 | FromDiscord | <codic> eg `'a'.byte` => `"a"` |
23:01:08 | ForumUpdaterBot | New thread by Jdn: Dual 0.1.0, see https://forum.nim-lang.org/t/6887 |
23:08:27 | FromDiscord | <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 |