<< 31-01-2021 >>

00:07:52*hmmm quit (Quit: WeeChat 3.0)
00:24:05*tane quit (Quit: Leaving)
00:30:42*oswin[m] joined #nim
00:37:22ForumUpdaterBotNew thread by Adnan: Publishing a Nim app in Flathub, see https://forum.nim-lang.org/t/7452
00:50:38planetis[m]hey krux02 is back! welcome back!
00:55:58krux02thank, you, but I think being "back" is an exaggeration
01:01:58*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:02:22*njoseph joined #nim
01:09:01FromDiscord<ElegantBeef> Do you an disruptek just alternate, when he's banned you pop in? πŸ˜„
01:10:52Prestigedid disruptek get banned from chat?
01:12:51FromDiscord<konsumlamm> ye
01:18:30*zedeus joined #nim
01:20:21Prestigedamn
01:42:38*zedeus quit (Quit: zedeus)
01:44:43FromDiscord<Avatarfighter> o/ everyone
01:46:35PrestigeHey Avatarfighter
01:49:13krux02did not know disruptek got banned. I never got banned. But I think I was pretty close to it.
01:49:34krux02have to go to bed now
01:49:36krux02good night
01:50:27krux02I wonder though what he did to deserve to be banned.
01:50:41krux02Anyway, I am now offline, I won't get to know it today
01:52:17*krux02 quit (Remote host closed the connection)
02:45:15*Gustavo6046 quit (Ping timeout: 265 seconds)
02:51:00*Gustavo6046 joined #nim
03:31:58FromDiscord<dk> This future never returns for me, any ideas? https://nim-lang.org/docs/httpclient.html#body%2CAsyncResponse
03:39:11FromDiscord<ElegantBeef> What's your code?
03:41:52FromDiscord<JSGRANT> Gitter is probably going to be 'fine' long-term; They announced they're moving to Matrix so takes most of the heavy-lifting off of them.
03:42:33FromDiscord<JSGRANT> https://matrix.org/blog/2020/12/07/gitter-now-speaks-matrix
03:42:42FromDiscord<ElegantBeef> They arent really moving they were purchased by Element or Matrix(dont recall if the business did or the foundation did)?
03:43:52FromDiscord<ElegantBeef> Atleast i thought they were purchased
03:44:05FromDiscord<JSGRANT> Didn't hear about them being bought by Matrix; They were bought originally by Gitlab I know a few years ago
03:44:20FromDiscord<ElegantBeef> Yea i could be misremembering
03:44:42FromDiscord<Rika> i believe you arent
03:44:54FromDiscord<dk> sent a code paste, see https://play.nim-lang.org/#ix=2NO0
03:44:58FromDiscord<dk> it gets stuck at the await
03:45:00FromDiscord<dk> in jester
03:45:40FromDiscord<ElegantBeef> Interesting, i have 0 clue πŸ˜›
03:45:58FromDiscord<JSGRANT> Either or; Think Gitter is in an "okay" place. Not ideal, but not any worse than the state it's been the past few years. Would be shocked if they are about to actually die out
03:46:55FromDiscord<JSGRANT> Also ... bed-time o/
03:50:45*Gustavo6046 quit (Ping timeout: 240 seconds)
03:53:46*Gustavo6046 joined #nim
03:54:45*Gustavo6046 quit (Remote host closed the connection)
03:55:27*Gustavo6046 joined #nim
04:01:15*muffindrake quit (Ping timeout: 272 seconds)
04:02:25*muffindrake joined #nim
04:10:26*FlammableDuck[m] left #nim ("User left")
04:30:59*audiophile quit (Quit: Default Quit Message)
04:47:16*mmohammadi9812 quit (Ping timeout: 240 seconds)
04:47:32*mmohammadi9812 joined #nim
04:49:58*wasted_youth quit (Quit: Leaving)
04:52:03*mmohammadi9812 quit (Ping timeout: 256 seconds)
04:54:19*mmohammadi9812 joined #nim
05:18:02*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
05:18:19*kitech1 joined #nim
05:30:50FromDiscord<xCFF> sent a code paste, see https://play.nim-lang.org/#ix=2NOj
05:31:10FromDiscord<xCFF> (edit) "https://play.nim-lang.org/#ix=2NOj" => "https://play.nim-lang.org/#ix=2NOk"
05:35:16*mmohammadi9812 quit (Ping timeout: 240 seconds)
05:35:41*mmohammadi9812 joined #nim
05:47:03FromDiscord<xCFF> sent a code paste, see https://play.nim-lang.org/#ix=2NOl
05:51:57FromDiscord<xCFF> (edit) sent a code paste, see https://play.nim-lang.org/#ix=2NOm
06:15:29*sixtyten joined #nim
06:39:59saemFun, I know ever so slightly more about sem. Been playing with the eval change in #16840. I think it's showing the corner cases in parameter type analysis and call/overload resolution. I wonder if RFC 149 might alleviate some of this, maybe not directly but perhaps the rigor/revisitation.
06:41:17FromDiscord<ElegantBeef> Were you doubly disappointed? πŸ˜„
06:47:01*waleee-cl quit (Quit: Connection closed for inactivity)
06:47:11saemNah, I learned some stuff so that's cool.
06:49:52saemThe part I haven't figured out is how to get a sense of all the various situations that show up in the AST. I think I get why Rust went with MIR, I don't agree with the idea but I definitely see why they did it.
06:50:31FromDiscord<ElegantBeef> Eh i was talking about your game playing lastnight πŸ˜›
06:50:38saemoh
06:50:39saemHahaha
06:50:40FromDiscord<ElegantBeef> Yea idk the AST method gives us the Lispy macros
06:51:17saemI didn't get to play last night, was tired and went to bed, which is what's going to happen real soon again.
06:51:28FromDiscord<ElegantBeef> Ah
06:51:59*sixtyten quit (Remote host closed the connection)
06:52:25*sixtyten joined #nim
06:55:05saemI think I need to read the code some more tomorrow, hopefully I can start seeing the patterns more clearly.
06:56:59*mmohammadi9812 quit (Ping timeout: 264 seconds)
06:57:25FromGitter<Araq> about the incremental compiler: it's not ready at all. sad I know. I hope once my ic11 branch is merged you can tinker with it but don't expect miracles -- new problems emerged
06:57:56FromGitter<Araq> however, it forces us to clean up the compiler's codebase and that's great
06:58:35saemYeah, that's what I figured would be the biggest win. Just revisiting things, regardless of the reason is usually a good thing.
06:58:41*mmohammadi9812 joined #nim
06:59:02leorizeAraq: are you gonna let disruptek return eventually?
06:59:08FromGitter<Araq> saem: about MIR, yeah it's a good idea
07:01:29saem@Araq I'm a little on the fence, I think for frontend -> backend an IR makes a LOT of sense. But the way they use MIR in Rust, they do a bunch of AST canonicalization with it and in some ways that's really good and in others they seem to lose a bit too much information. I think it's one of those things where there is a real art to that trade off.
07:02:10FromGitter<Araq> leorize: I don't know. he is harsh and obscene and I don't want to constantly watch his words. you could create a new channel and invite him and tell others who miss him to join
07:03:39FromGitter<Araq> saem: using the AST as our IR served us well, yeah
07:05:32FromGitter<Araq> but our "Packed AST" is the future IMO. no hidden mutations possible and some transformations get even easier
07:06:33saemI'm definitely in the avoid mutation camp.
07:08:03leorizeAraq: have you talked to him about taming his wording in Nim's public channels?
07:08:28FromGitter<Araq> leorize: multiple times, and we had a long voice chat too
07:08:29*sixtyten quit (Remote host closed the connection)
07:08:54*sixtyten joined #nim
07:09:15leorizeI just pushed a prototype for my osproc redesign: https://github.com/alaviss/nim-sys/blob/features/exec-prototype/src/sys/exec.nim
07:10:26leorizeif anyone is interested, please review :)
07:11:48FromDiscord<ElegantBeef> I'm curious why you have the strings for the enums since they just seem more like comments then an actual string representation
07:12:56leorizefor the pretty print, which I haven't implement :p
07:13:42FromDiscord<ElegantBeef> Ah, without that just seems like tedious work πŸ˜„
07:17:48*sixtyten quit (Quit: Leaving)
07:17:49FromDiscord<ElegantBeef> I am wondering if there should be a compile flag to replace `\0` in the `toNulless` proc instead of throwing an error
07:18:51leorizewhat are you gonna replace them with?
07:19:17FromDiscord<ElegantBeef> If there is anything after them a space, else remove them
07:19:37leorizeand strutils.replace makes this rather trivial, so I'm not sure what would be the value
07:19:45FromDiscord<ElegantBeef> I'm probably just being a numpty as usually
07:20:10FromDiscord<ElegantBeef> Well it's named `toNulless` so it sounds like it should be handling it, but refer to numpty comment
07:21:26leorizeI prefer not editing unless there is a good reason to. If you're handling some binary data the implicit replacement can be dangerous.
07:26:18leorizeI value comments on the API even if you know nothing about process launching.
07:26:41FromDiscord<ElegantBeef> line 226: "This is the equivalence to setting" -> "This is equivalent to setting"
07:26:41leorizesys/exec is meant to be safely and easily usable by everyone :)
07:31:39FromDiscord<ElegantBeef> It all seems fine to me
07:32:18leorizethanks for reviewing :D
07:33:34FromDiscord<ElegantBeef> My favourite part is ` {.error: "This module has not been ported to your operating system".}` mostly cause i'm to childish and would've wrote `"winblows"` πŸ˜„
07:37:33leorizewinblows is responsible for 80% of the headache in designing that api :)
07:38:15FromDiscord<ElegantBeef> Yea i've had small amounts of "Oh i can just do... oh wait that'd make it unix centric", even in my small stuff
07:39:32saemYour use of distinct types and functions warms my heart
07:40:00FromDiscord<ElegantBeef> Also you make me sad i wanted to continue playing around with views and strutils but i the current limitations are visible πŸ˜„
07:40:29FromDiscord<ElegantBeef> I wanted to re implement small sections with views for that reduced memory/increased speed!
07:40:43leorizesaem: there are a lot of pains associated with those if you see my "reference" posix implementation :p
07:40:58leorizeit's pretty much "compile but please don't even try to use"
07:40:59saemI read through the code real quick, any reason not to have an enum or distinct type for signals?
07:41:10leorizeWindows :)
07:41:32saemI was gonna say the platform specific type definition
07:41:51saemWould still work right?
07:42:18saemSo when windows it's one definition, when nix another
07:42:42leorizeyep, would be a pain right now because I haven't wrapped the signal numbers themselves
07:42:58saemOr provide a type which abstracts over them.
07:43:06leorizeand Windows don't have signals so there is that too...
07:43:30leorizebut the main problem is that I haven't wrapped the signal numbers
07:43:36leorizeand I'm not sure if I can even
07:44:51FromDiscord<ElegantBeef> Look at the speed though!↡https://play.nim-lang.org/#ix=2NOy
07:44:52saemI want sure windows had them or not, but there might be a hint of them? https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/signal?view=msvc-160
07:45:26saemSpeed for the win
07:46:25FromDiscord<ElegantBeef> Yea but it's useless since you cannot store the `openarray[char]` without an error
07:47:41leorizesaem: it's emulated by the C library, Windows itself doesn't have the concept afaik. Instead they have kernel-backed exceptions, and unhandled exceptions doesn't relay any details to the parent process I believe.
07:49:34saemYeah, I read up a bit on it and it's really different... neat?
07:51:00leorizecan't say much about it other than it will make my life hell when sys/signal become a thing
07:51:18leorizeI'm glad that my prototype API seems to pass the IRC review check :)
07:52:36FromDiscord<ElegantBeef> I'm not an IRC user, so clearly my intellect is lower πŸ˜›
07:53:00leorizenow I'm gonna post it to the forum for some roast
07:55:38leorizeI just realized that there are no category for RFC posts on the forum :p
08:21:57leorizeposted https://forum.nim-lang.org/t/7453
08:22:32ForumUpdaterBotNew thread by Leorize: RFC: My prototype for an osproc replacement, see https://forum.nim-lang.org/t/7453
08:54:14*sixtyten joined #nim
08:56:51FromDiscord<ElegantBeef> Oh shit i just added a parsing test it's apparently twice as fast with views... something makes me feel like i'm doing something wrong
08:57:38FromDiscord<ElegantBeef> Someone wanna audit this for me to ensure i'm not missing something that'd be causing the perf difference? https://play.nim-lang.org/#ix=2NOO
08:59:15FromDiscord<carpal> who can help me here? https://discord.com/channels/371759389889003530/371759389889003532/805148053756444722
08:59:15FromDiscord<ElegantBeef> My results with 300,000 numbers https://play.nim-lang.org/#ix=2NOQ
09:00:03FromDiscord<ElegantBeef> Inline should attempt to put that code where you call it, but only accept mutable variables
09:00:20FromDiscord<ElegantBeef> Also not overly wise to point to a gitub message like that due to irc/matrix users
09:01:07FromDiscord<carpal> ok so the compiler won't generate a new pointer right?
09:01:24*sixtyten quit (Quit: Leaving)
09:01:39FromDiscord<ElegantBeef> I dont imagine it would
09:01:45FromDiscord<ElegantBeef> i've been known to be wrong
09:05:02FromDiscord<ElegantBeef> Ah using a character that's actually in the string does change the performance quite a bit, but still in favour of the views impl
09:20:09*letto quit (Quit: Konversation terminated!)
09:24:59*filcuc joined #nim
09:28:13*letto joined #nim
09:38:39ForumUpdaterBotNew thread by AlectronikHQ: Compile to object file, see https://forum.nim-lang.org/t/7454
10:18:07*sbsbio joined #nim
10:20:00FromGitter<offbeat-stuff> What vulkan library should i use
10:20:26*zedeus joined #nim
10:20:33FromGitter<offbeat-stuff> So I can follow up normal vulkan tutorials in nim
10:21:35sbsbiooffbeat-stuff: This seems good: https://github.com/nimgl/vulkan
10:22:34FromGitter<offbeat-stuff> Thanks
10:22:54FromGitter<offbeat-stuff> Although no examples are given with it
10:29:56sbsbioI've been reading chat logs sporadically for a while now instead of just being in this chat, and I read that disruptek got himself banned. I don't want to incite paranoia but you guys need to watch out for that kind of person, they don't know the difference between having productive conversations and dealing with personal emotions/grievances they
10:29:57sbsbiohave that day. That way of acting is unhealthy to communities and it always put me off from this chat, though I'm just a rando.
10:30:16*sbsbio quit (Quit: Connection closed)
10:31:31*lritter joined #nim
10:43:25*Tanger joined #nim
10:44:46FromGitter<offbeat-stuff> Why is this not a good correct =destroy hook https://play.nim-lang.org/#ix=2NP8
10:45:38FromGitter<offbeat-stuff> Okay got it correct sorry to bother
10:45:56FromGitter<offbeat-stuff> ``` proc `=destroy`* (x: var vkWin)= ⏎ ⏎ ```x.win.destroyWindow() ⏎ glfwTerminate() `````` [https://gitter.im/nim-lang/Nim?at=60168a649238c531ad14fecd]
10:47:38*filcuc quit (Ping timeout: 246 seconds)
10:58:22FromDiscord<lqdev> leorize: as far as i know, documentation for borrowed procs can be done if you add `=`. otherwise your doc comment is ignored https://github.com/alaviss/nim-sys/blob/features/exec-prototype/src/sys/exec.nim#L200
10:59:14FromDiscord<mratsim> but then is the proc a no-op?
11:01:13FromDiscord<lqdev> well if it's borrowed it shouldn't be a noop
11:02:17FromDiscord<lqdev> leorize: minor nitpick but for consistency with the language itself i think this should be called `initNilStdio` https://github.com/alaviss/nim-sys/blob/features/exec-prototype/src/sys/exec.nim#L478
11:03:31FromDiscord<lqdev> overall, i gotta say the API is much better than osproc
11:20:52FromDiscord<dom96> sbsbio: thank you for your perspective. I agree with you completely and I believe that there are others in the same boat as you. Keeping a community healthy isn’t an easy thing, it requires work and sometimes difficult decisions.
11:43:09*PMunch joined #nim
11:50:04*krux02 joined #nim
11:52:50FromDiscord<Clyybber> offbeat-stuff: Theres also https://github.com/clyybber/vulkanim , which I updated a few days ago
12:13:14*filcuc joined #nim
12:18:06krux02I just read through the chat history to figure out why and when disruptek got banned.
12:18:15PMunchHe got banned again?
12:18:21krux02Very entertaining, worth a read.
12:18:27krux02aparently.
12:19:59krux02To sum it up, he told a very good joke, somebody thought the joke would be offensive, and he responded with something that sall not be spoken.
12:20:16PMunchI'm reading the logs now
12:20:34PMunchStarted strong with "newsflash: no one gives a shit" :P
12:20:48krux02yea, but that isn't the reason.
12:20:54krux02That is also where I started.
12:21:11FromDiscord<Rika> i think thats too far up
12:21:20krux02https://irclogs.nim-lang.org/29-01-2021.html#19:44:32
12:22:45krux02and then here: https://irclogs.nim-lang.org/29-01-2021.html#21:23:34
12:26:36*filcuc quit (Ping timeout: 240 seconds)
12:26:48PMunchAw come on, that joke was great!
12:27:18PMunchActually had me laughing, and not just the slightly more exhale through my nose kind
12:27:53PMunchI'm not sure that's why he was banned though..
12:28:29FromDiscord<Rika> the fist link krux sent
12:28:48FromDiscord<Rika> not the highlight
12:28:52FromDiscord<Rika> read a bit below that
12:29:20PMunchYeah the whitespace joke
12:29:33FromDiscord<Rika> oh i misread
12:30:16PMunchBut I think it was his later comments to dom that got him banned
12:30:25PMunchWell I hope it was
12:30:32FromDiscord<Rika> smh thats what i said
12:40:56*hmmm joined #nim
12:44:21FromDiscord<konsumlamm> in case anyone is bored and wants to look at a simple PR: https://github.com/nim-lang/Nim/pull/16864
12:45:26PMunchHmm, is there a way to just yield an async task without waiting for anything in particular?
13:11:21FromDiscord<Yardanico> asyncCheck task()
13:13:25PMunchOoh, that doesn't await it's completion?
13:25:47PMunchOh wait, sorry I meant like `await` nothing
13:26:32PMunchI have one procedure that's run with asyncCheck that puts data into a sequence, and another procedure that reads from it and returns data
13:26:53PMunchCurrently I have `await sleepAsync(1)` which works, but it's not perfect..
13:28:10FromDiscord<Rika> await sleepAsync(0) lol
13:32:10PMunchIs that really the best way to do it?
13:32:23FromDiscord<Rika> no idea
13:32:30FromDiscord<Rika> would "yield" work?
13:32:53FromDiscord<dom96> That is the best thing available
13:33:11FromDiscord<Rika> !eval import asyncdispatch; proc a {.async.} = yield
13:33:13NimBotCompile failed: /usercode/in.nim(1, 42) Error: yield statement must yield a value
13:33:33FromDiscord<Rika> you can yield :ThonkDumb:
13:35:13FromDiscord<dom96> Happy to accept a PR to add a specific API for this. But i don’t see there being a way to be more efficient then the sleep.
13:35:30FromDiscord<dom96> Guess you could special case yielding nil.
13:35:41FromDiscord<Rika> or just an empty await
13:35:46FromDiscord<Rika> ?]
13:37:23*filcuc joined #nim
13:37:40FromDiscord<dom96> Sure, maybe, but that would just be sugar. The question is how it should work behind the scenes.
13:40:50leorize[m]@lqdev thanks for looking into it :)
13:41:06krux02PMunch, look at the second link. The first link is just where it started.
13:41:24FromDiscord<konsumlamm> if something doesn't compile in `expandMacros`, but compiles without, is that a bug?
13:42:23leorize[m]@lqdev re: borrowed docs, it works even without `=`. See https://alaviss.github.io/nim-sys/handles.html#%3D%3D%2CFD%2CFD
13:42:57krux02@konsumlamm: yes
13:43:12PMunch@dom96, just having a yieldAsync or something that was a template for await sleepAsync(0) which could be implemented differently in the future would be nice
13:43:26leorize[m]@lqdev re: initNulStdio -> initNilStdio, I thought about it but decided against nil because it might confuse people with Nim's nil.
13:43:27FromDiscord<Recruit_main707> krux, is it me or you havent been active in a while?
13:43:28FromDiscord<konsumlamm> specifically, using `sugar.=>` inside `expandMacros` produces an "illformed AST: proc (x: int): auto = result = x + 1" error (for example)
13:43:30PMunchkrux02, yeah like I said I don't think it was the joke :P
13:43:51krux02no it wasn't the joke. The joke was great.
13:44:15krux02Recruit_main707: yea I wasn't active for a while.
13:44:27FromDiscord<Recruit_main707> welcome back then :)
13:44:34krux02also visible in my github green tiles
13:44:42krux02Well, thank you.
13:45:14leorize[m]I did inquire 4raq about the ban if anyone is interested: https://irclogs.nim-lang.org/31-01-2021.html#07:02:10
13:46:10*mmohammadi9812 quit (Ping timeout: 264 seconds)
13:46:57*mmohammadi9812 joined #nim
13:47:18PMunchI mean he could still hang around in offtopic right?
13:49:36leorize[m]he can, but will he?
13:50:39krux02then lets meet at obscenenim where welcome personal attacks there.
13:51:12krux02insultfighting will be welcome at #obscenenim
13:51:48PMunchHaha
13:51:53PMunchWhat could go wrong!
13:53:58*filcuc quit (Ping timeout: 264 seconds)
13:56:55FromDiscord<Recruit_main707> +1 for this
13:58:29krux02me and PMunch are already at the channel. It is just on IRC only yet.
14:00:11krux02@Recruit_main707: come to IRC, you will like it here. There are no images, code snippets, or any sort of multimedia working here.
14:01:37krux02But if you think that IRC is super reduced and therefore a trivial to use program, think again. IRC still manages to have convoluted clients even without the support of anything expected from a modern chat application.
14:02:48PMunchJust like we like it!
14:06:46*filcuc joined #nim
14:11:26FromDiscord<dom96> krux02: Please consider naming it something without Nim in the name.
14:11:31FromDiscord<Recruit_main707> tbh the only reason i use discord is because everyone does, pretty ironic since i use nim
14:11:57krux02dom96: you can join the channel an open your complaint there.
14:12:05FromDiscord<Recruit_main707> lol
14:14:43krux02I don't think I will use discord in the near future for Nim.
14:17:36krux02Neither do I like software witten with the web stack bloat, nor do I like Chinese mega corporations that try to conquer and control the internet
14:18:04PMunchIs Discord Chinese?
14:18:11PMunchOr was that just a general thing?
14:18:23krux02it is partially owned by Tencent
14:19:45PMunchOh damn
14:19:47PMunchDidn't know
14:20:04PMunchWell, now I have one more reason to not use Discord I guess
14:20:39krux02My girlfriend is Chinese, and she told me that with WeeChat, completely chinese it is impossible to send imagaes of certain things.
14:20:43*wasted_youth joined #nim
14:20:53krux02Some messages just don't reach the other side.
14:21:24PMunchOh yeah I've heard of that
14:22:12krux02Afaik, Discord doesn't filter messages, ... yet
14:22:28Oddmongerhow can you filter ssl ?
14:22:58FromDiscord<JSGRANT> Sadly Discord edged enough into network-effect territory ; That I can't see giving it up anytime soon. Wish Element (or an equivalent Matrix client) had the create-a-server model instead of create-a-room and supported trivial voice chats. Nothing "like it enough" to even try to get people to move over thusfar
14:22:58PMunchBY being the man (platform) in the middle
14:23:41krux02Oddmonger, Discord is completely closed source. In other words the software can change at any time, change what it filers, how it filters, and if it wants to used encryption on not.
14:24:01Oddmongeri thouhgt you were talking about irc
14:24:24krux02JSGRANT: Discord just calls their room server.
14:24:42krux02It really isn't a server. It is just a room with rich functionality.
14:25:54FromDiscord<JSGRANT> I'm talking about creating and manipulating "collection of rooms" trivially; Element has "communities" but they're really underdeveloped ... I made a few like 3 years ago and they STILL haven't created a 'delete community' option
14:26:17krux02@JSGRANT: you don't need to give up Discord. But you should be ready to leave when the circumstances require it.
14:27:43FromDiscord<JSGRANT> Yeah, but if I'm going to leave Discord (for whatever reason) I'm saying I want something with relative feature-parity. I know I can adapt; But the people I know who depend on Discord and are not "tech savvy" will just jump ship to whatever else is sorta-kinda popular at the time
14:27:51FromDiscord<flywind> Can I get the system endianess at compile time?
14:27:52krux02I like the model of IRC, you can just join any channel with any name and it will be there and all people can join initially.
14:28:35FromDiscord<JSGRANT> krux02: That's how Matrix works afaict?
14:28:53krux02I don't know how matrix works.
14:29:15krux02Matrix is like an octupus that tries to connect with everything with maximum integration.
14:29:32FromDiscord<flywind> !eval static: echo cpuEndian # not the wrong endianess
14:29:34NimBot<no output>
14:29:53FromDiscord<konsumlamm> why on earth does `runnableExamples` turn `let f = () => (discard)` into `let f = () =>\n discard` -_-
14:29:55krux02So Matrix users will have a real IRC name, not just some Bot that repeats everything in thear name.
14:30:35Oddmongermatrix is a parasit
14:31:10krux02well it is.
14:31:50krux02and that is good when the parasit host is a hostile platform
14:32:17krux02in the vein of, the enemy of my enemy is my friend
14:32:46FromGitter<krux02> I have btw also an IRC bridge to gitter.
14:33:00FromGitter<krux02> This allows me to communicate in gitter chats directly.
14:33:08FromGitter<krux02> from my IRC client.
14:33:41FromGitter<krux02> I like this bridging technology.
14:40:55FromDiscord<JSGRANT> About to head to work; But yeah, I really don't mind bridging. The only time it's a real problem is if/when someone uses markup features of a 'modern client' and/or system that's incompatible between services.
14:40:56*tane joined #nim
14:41:13PMunchHmm, is there a JSON diffing library out there?
14:47:42krux02probably.
14:47:59krux02but maybe you can just pretty print the json and then use a normal line based diff tool on it.
14:48:31PMunchThat sounds iffy :P
14:53:34krux02I don't know how good your solution needs to be.
14:54:23krux02But it could be implemented in a line of bash.
14:54:33PMunchWell I'm creating a wrapper for this: https://developers.home-assistant.io/docs/api/websocket/#subscribe-to-events
14:54:35krux02maybe two
14:54:52PMunchI have a "base" version that just wraps the message parsing logic
14:54:57PMunchAnd auth
14:56:04FromDiscord<Rika> krux, what do you consider as censorship? and are you in the off topic channel so we can continue there lol
14:56:24PMunchNow I'm on to making a "managed" version with more high-level things like attaching event handlers and such
14:56:53PMunchThe goal is to end up at a DSL that's dead simple to use
15:01:52krux02@Rika: I am in #obscenenim
15:02:12federico3https://sr.ht/~arsen/alsa_rnnoise/ this noise filter is impressive. I wonder if there's any alsa filter implemented in Nim
15:03:14FromDiscord<Rika> guess im firing up ye ol irc client thne
15:03:43krux02well, consorship is, when criticism is turned off by the people who are criticised.
15:03:45*aeverr joined #nim
15:03:46*liblq-dev joined #nim
15:04:26krux02@Rika: yay
15:05:13*filcuc quit (Ping timeout: 246 seconds)
15:14:35*vicfred joined #nim
15:15:06*jess joined #nim
15:17:33FromDiscord<Recruit_main707> discord also censors stuff, im not sure how it works, but i know certain words are checked and servers might be closed
15:20:00FromDiscord<Rika> images are scanned as well
15:20:07FromDiscord<Rika> ~~ehem, loli images~~
15:23:36*filcuc joined #nim
15:32:28*aeverr left #nim ("Konversation terminated!")
15:42:16*Kaivo quit (Quit: WeeChat 3.0)
16:03:43saemThat ALSA filter does look pretty cool
16:19:39*NimBot joined #nim
16:29:37*Heliotrope joined #nim
16:31:04saem@Araq: do you mind if I continue to investigate that stability and nimsuggest stability PR's removal of macro error short circuit. Don't know where it'll lead, but right now it looks like fixes in call resolution at least? Basically asking if you've already got things in mind and are set on them vs the more the merrier?
16:32:06PMunchNice, got my HomeAssistant managed communications thing working it seems
16:32:42saem"the more people pushing in that direction the merrier" is probably phrased more clearly.
16:33:30*Heliotrope quit (Client Quit)
16:35:12saemPMunch: that's really. I while back I found a blog about open source home automation, basically with less spying, which seemed really interesting. Have too many things in the go, but I was wondering if your still was also more automation less spyware?
16:35:31saemThat's really cool... Not sure how my phone lost that.
16:35:39PMunchOh definitely
16:35:43saemHehe
16:35:48PMunchI only have stuff that's connected to the local network
16:36:27PMunchWell, my robo-vacuum is cloud based I think, but it's thick as shit so I'm not too worried about it spying on me
16:36:31saemWelp, you're combining two interesting things so it's going up on my priority list. πŸ˜„
16:36:54PMunchAnd I guess the IKEA lights are also checking for updates, although that seems to be done via the app.
16:37:35PMunchI've definitely gone a bit more "I can buy this, why bother making it myself", and more "let's look at all the options and pick the least spyware-y"
16:38:02PMunchThen I have an RPi with Home Assistant which I'm now programming add-ons for to perform actions automatically
16:38:32PMunchMy lights now dim down slowly in the afternoon, and my bedroom light dims up before the alarm set on my phone
16:38:40*Vladar joined #nim
16:41:01saemGuess you follow some of Matthew Garrett's work then?
16:43:04saemThat lighting change sounds awesome for me, I react poorly to loud noises and avoid alarms.
16:44:47PMunchMatthew Garrett?
16:45:04PMunchIt's great, I now often wake up a couple minutes before my alarm goes off :)
16:50:34*abm joined #nim
16:52:56saemhttps://twitter.com/mjg59?s=09
16:53:14saemHe's a Linux kernel developer and security researcher
16:53:28saemDid a while thing on smart bulbs and other bits
16:55:09*lritter quit (Remote host closed the connection)
16:58:06*PMunch quit (Quit: leaving)
17:08:24*krux02 quit (Ping timeout: 240 seconds)
17:24:55*filcuc quit (Ping timeout: 265 seconds)
17:28:38federico3enjoy https://mjg59.dreamwidth.org/data/rss
17:30:26leorizehis work on firmware security is very cool
17:32:14*nc-x joined #nim
17:33:29nc-xanybody has ideas regarding how to improve testing for experimental features? re https://github.com/nim-lang/Nim/pull/16878#issuecomment-770418207
17:35:53*nc-x quit (Client Quit)
17:42:13FromDiscord<QueenFuckingAdrielle> hulloh
17:43:05FromDiscord<QueenFuckingAdrielle> anybody have any experience with avx 512?
17:43:14*shirty joined #nim
17:43:28*shirty quit (Client Quit)
17:44:09FromDiscord<QueenFuckingAdrielle> buying a new dev-box/server, not sure if i should wait for the next round of intel cpus
18:08:43leorizeping @mratsim
18:09:09FromDiscord<mratsim> I am here to heed to your request
18:09:16FromDiscord<mratsim> you have 3 wishes and then i will disappear
18:09:56leorizeplease answer the avx 512 question :) you're our expert in this stuff
18:10:31Oddmongeras my first wish, i'd like to have TASM with AVX support
18:11:34FromDiscord<mratsim> TASM: SIGILL Illegal Instruction, aborting.
18:11:49leorizeare you gonna work on a runtime cpu features dispatching library in Nim?
18:11:55FromDiscord<mratsim> @QueenFuckingAdrielle what kind of algorithm will you run?
18:12:06FromDiscord<mratsim> !repo cpuwhat
18:12:13FromDiscord<mratsim> >_>
18:12:28leorizedisruptek and by extension disbot has been banned :P
18:12:33FromDiscord<mratsim> This has my seal of approval: https://github.com/awr1/cpuwhat
18:13:20leorizedoesn't seem to have dynamic dispatch though :P
18:14:13FromDiscord<mratsim> just do if/else: https://github.com/mratsim/constantine/blob/master/constantine/arithmetic/limbs_double_width.nim#L75
18:15:14FromDiscord<mratsim> This is not cpuwhat but CPU what imitated this API following my recommendation: https://github.com/numforge/laser/blob/master/laser/primitives/matrix_multiplication/gemm.nim#L229-L233
18:16:33FromDiscord<mratsim> alternatively you can imitate GCC function multiversioning by having the function just carry a pointer and swapping the pointer to the correct implementation depending on runtime feature.
18:16:59FromDiscord<mratsim> but if/else that are always predicted right have no cost so that might be overkill
18:17:18FromDiscord<mratsim> and since you don't change CPU while a program is running it's easy to predict.
18:19:43leorizeso I take it that you're sastisfied with the current status quo and won't work on a macro or smt to simplify this?
18:21:10FromDiscord<konsumlamm> is it fair to say that Nim is way more buggy than D?
18:21:19FromDiscord<konsumlamm> not that i wanna switch, just curious
18:22:10FromDiscord<mratsim> @leorize, yes, I don't have the time/usecase for it.
18:22:15leorizenot sure about "way more", but pretty sure about "more"
18:22:46FromDiscord<mratsim> at one point I will rework on my deep learning / machine learning / tensor compiler and this will autodispatch
18:23:52FromDiscord<mratsim> I already have somewhat of a compiler pass for that: https://github.com/numforge/laser/blob/d1e6ae6106564bfb350d4e566261df97dbb578b3/laser/lux_compiler/backend/legacy/lux_codegen_transfo.nim#L13-L40
18:24:19FromDiscord<konsumlamm> i have found like 6 bugs in nim (stdlib/compiler) since starting with Nim, while i never found a bug in any other language before
18:24:27FromDiscord<mratsim> I must have been high when I wrote that crazy stuff
18:24:56FromDiscord<konsumlamm> though 2021 is supposed to be the year to make things more stable iirc? or was that somewhere else?
18:25:08FromDiscord<haxscramper> yes, more stability
18:25:28FromDiscord<konsumlamm> good, cause i think Nim really does need more stability
18:25:36FromDiscord<haxscramper> Though just as a side note - I found three bugs in 2.5 years
18:26:10FromDiscord<haxscramper> While doing some top-tier garbage with generics+macros and god only knows what
18:26:10FromDiscord<konsumlamm> lol, tbf, i found 4 bugs alone while writing tests for the sugar module
18:26:22FromDiscord<haxscramper> Not mratshim level though, not even close
18:26:24FromDiscord<mratsim> I found 290 bugs/issues: https://github.com/nim-lang/Nim/issues?q=is%3Aissue+author%3Amratsim+
18:26:38FromDiscord<konsumlamm> lmao, good job
18:26:49FromDiscord<mratsim> It's been 4 years though
18:26:57FromDiscord<mratsim> so 70/year
18:27:03FromDiscord<mratsim> one per week
18:27:04leorizecurrently I just attribute all this to nim-lang being a small team :P
18:27:21*waleee-cl joined #nim
18:27:25FromDiscord<mratsim> and Nim has a large scope as well.
18:27:32FromDiscord<konsumlamm> actually, i forgot one bug
18:27:34FromDiscord<konsumlamm> so actually 7
18:27:38FromDiscord<mratsim> in terms of research features
18:27:48FromDiscord<haxscramper> were there any in-depth discussion about attracting more compiler developers?
18:27:53FromDiscord<konsumlamm> though there was no issue for it, so apparently noone ever encountered it
18:28:00FromDiscord<haxscramper> like rfc/issues or something else of that sort
18:28:18leorize@konsumlamm: it's more likely that no one bothered to report
18:28:40FromDiscord<mratsim> attracting depends too much on luck, it's better to think, how can I help existing developer to want to work on the compiler itself
18:28:50leorizehaxscramper: I don't think so
18:29:06FromDiscord<haxscramper> yes, of course I meant regular nim users
18:29:18FromDiscord<konsumlamm> eh, it was doing `cmp(x, y) < 1` instead of `cmp(x, y) < 0` and since most comparison functions return -1, 0 or 1, i doubt anyone encountered it
18:29:32FromDiscord<haxscramper> it's not like we have thousands of compiler developers walking around and looking for a compiler
18:29:34FromDiscord<mratsim> @QueenFuckingAdrielle ping me when you're back so we can look at your AVX512 needs, going back to writing code.
18:29:40FromDiscord<haxscramper> to jump on
18:29:52FromDiscord<konsumlamm> Ε§hough with using an enum for comparisons (like rust), this shouldnt have happened in the first place
18:29:53leorizemost of our active compiler devs are volunteers afaik
18:30:12leorizekonsumlamm: the stdlib is fairly ancient
18:30:18FromDiscord<konsumlamm> @haxscramper since you're here now, got some time to talk about custom unpackers for pattern matching?
18:30:26FromDiscord<haxscramper> yes of course
18:30:28FromDiscord<konsumlamm> leorize: i noticed
18:30:48leorizeand no one bothered to evolve it :(
18:31:00FromDiscord<konsumlamm> so, custom indexing is pretty cool (i didn't think about that you can use `static: error(...)` initially)
18:31:16FromDiscord<haxscramper> btw code example I pasted in my last response works with current implementation
18:31:26FromDiscord<konsumlamm> i at least try to bring the docs up to date, for now
18:32:26FromDiscord<konsumlamm> i'd wish for something more... nominal rther than structural
18:33:47FromDiscord<konsumlamm> what i thought of was something like `proc myUnpacker(x: MyObject): (int, string)` and then you can match a value of type `MyObject` with `myUnpacker(@a, @b)`, where `a` is `int` and `b` is `string`
18:34:41FromDiscord<konsumlamm> leorize: for some stdlib modules (even newer ones), i wonder why they're added in the first place (like `sums` or `mersenne`)
18:36:44leorizestdlib was a wild place
18:36:55leorizewe are actively removing things now afaik
18:37:15leorizeone of the main reason the stdlib is so big is because nimble sucks :)
18:37:27FromDiscord<haxscramper> I'm not a big fan of specially-named procs like `unpacker` etc. - IIRC we either don't have them at all in stdlib (with exception to 'very special' `=destroy`, `field=` ones). Additionally - right now pattern matching is implemented with assumption that there won't be any expensive-to-evaluate procs - https://github.com/nim-lang/fusion/pull/33#issuecomment-723058572
18:37:43FromDiscord<haxscramper> E.g. object being matched is a final value
18:38:20FromDiscord<konsumlamm> well, sums for example was added not so long ago, so that kinda goes against the "actively removing things"
18:38:30FromDiscord<haxscramper> though it is not a counter-argument I'm just saying about current assumptions in implementation
18:38:35FromDiscord<konsumlamm> it's more like "actively removing and adding new stuff to remove later"
18:39:07FromDiscord<konsumlamm> `unpacker` wouldn't be a special name, just the name i chose for my example
18:39:17FromDiscord<konsumlamm> my idea was that you can use arbitrary functions
18:39:25leorizewe just gotta fix nimble :p
18:39:35FromDiscord<haxscramper> and `<ident>()` for unpacker is already occupied for kind matching
18:39:49FromDiscord<konsumlamm> mm ye, thats kind of a problem
18:40:00FromDiscord<konsumlamm> ig you could define a `kind` proc for some trickery
18:40:15FromDiscord<haxscramper> And this is the-non-negotiable part of the syntax
18:40:17FromDiscord<konsumlamm> couldnt you try to use `.kind` and if that doesnt work, interpret it as an unpacker
18:41:07FromDiscord<haxscramper> It introduces `compies()` check which is insanely confusing when it is altering behavior
18:41:15FromDiscord<konsumlamm> eh, fair
18:41:27FromDiscord<haxscramper> But!
18:41:58FromDiscord<haxscramper> `(unpacker: (@a, @b))` already works, but not particularly pretty
18:42:16FromDiscord<konsumlamm> ye, that's pretty cool, but as you say, not that pretty
18:44:22FromDiscord<haxscramper> In general I agree with your idea, but there is just not enough place in DSL to put it nicely and `.kind` takes priority
18:44:29leorizeI wonder when will we manage to attract more funding into Nim
18:44:30FromDiscord<konsumlamm> btw, you can also use `of Name(...)` for normal objects (not only ref objects) which is nice imo (though it gives a warning :/)
18:44:59FromDiscord<dom96> leorize: FWIW a large majority view Nimble positively https://nim-lang.org/blog/2021/01/20/community-survey-results-2020.html#nim-tools
18:45:01FromDiscord<haxscramper> you can? TIL
18:45:23FromDiscord<konsumlamm> the inheritance system also works with normal objects, ye
18:46:10FromDiscord<konsumlamm> one huge advantage Nim has over D is that the latter is way harder to search for...
18:46:10FromDiscord<haxscramper> Good to know, though I should put iit on tests too
18:46:26FromDiscord<konsumlamm> oh yeah
18:46:39FromDiscord<dom96> leorize: I'm curious what you specifically think needs fixed
18:46:54leorizea proper dependency graph
18:47:09leorizedeterministic dependency resolution
18:47:17leorizedev deps
18:47:20FromDiscord<haxscramper> The earlier name was even better - current one has some T9 clashes
18:47:32leorizefeatures for generating docs
18:47:36FromDiscord<haxscramper> Build dependencies would be nice too
18:47:59FromDiscord<dom96> You think all of those are causing people to put their packages into the stdlib?
18:48:19FromDiscord<konsumlamm> `nimble run --d:release` passing the option to the nim compiler would also be nice :P
18:48:42FromDiscord<haxscramper> make `nimble test` compilation less noisy
18:49:05FromDiscord<konsumlamm> ye, i think i'll submit my new `is_thirteen` package for inclusion in the stdlib
18:49:13FromDiscord<dom96> lol
18:49:37FromDiscord<dom96> PR to fix that should be a nice entry point into contributing things to Nimble πŸ˜„
18:49:40leorizedom96: yes, it's blocking us from using third party packages in the Nim compiler, blocking the stdlib from expansion, and so on
18:50:07FromDiscord<haxscramper> And when `.nimble` has syntax/semantic error show it fully instead of `Invalid section` error
18:50:15FromDiscord<dom96> leorize: I really doubt Araq would want the Nim compiler to depend on Nimble
18:50:54FromDiscord<konsumlamm> if you merge my `typetraits` PR, i'll look at it :P
18:51:15leorizeI think packages should be a part of the compiler itself
18:51:23FromDiscord<konsumlamm> though i still don't have a definitive answer if the behaviour i expect is actually the intende behaviour
18:52:05FromDiscord<dom96> leorize: yes, quite possibly. But that's something to discuss with Araq et al.
18:52:27FromDiscord<dom96> I've fought a lot to have nimsuggest/nimpretty as a separate package
18:52:58leorizedoes Araq even have time?
18:53:29FromDiscord<dom96> @konsumlamm done πŸ˜„
18:53:30saemHaving nimsuggest together is presently nicer as I find it's a much faster way to test the compiler frontend.
18:53:46FromDiscord<konsumlamm> <3
18:54:47leorize@dom96 and since you are here, can you explain why you banned disruptek and disbot from #nim-news?
18:55:16FromDiscord<dom96> leorize: for your specific requests, not sure what you mean by "proper dependency graph", deterministic dependency resolution is already possible, and dev deps is a feature request that would definitely be awesome I agree
18:56:05FromDiscord<dom96> leorize: he was banned for the same reason that he was banned here
18:56:24leorizedom96: something without loops? disruptek already demonstrated a bug where nimble loop forever trying to resolve dependency
18:56:51leorizedom96: and what would be that reason? and why does it apply to #nim-news?
18:57:29leorizehe is not a troll, he make nim-news possible with his disbot
18:58:26FromDiscord<dom96> leorize: I'd have to look more closely at that bug, but afaik it occurs because there is a cycle in the dep graph
18:59:33FromDiscord<haxscramper> Shouldn't it be an error instead of an infinite loop? I mean cycle detection for graphs can be implemented
18:59:49FromDiscord<haxscramper> I've run into this several times, it is really annoying
19:00:28FromDiscord<dom96> leorize: that may be, but he was banned by Araq. Have a look at the IRC logs for the reason.
19:00:59leorizeI was there, and there were no explaination
19:01:10leorizethe ban on #nim-news is your decision as far as I can see it
19:01:17leorizethat's why I'm asking you
19:01:41leorizehe his also banned from the forum despite no visible offense as well
19:01:44leorizeis*
19:02:42leorizebarring someone from the community should be a last resort
19:03:05leorizeesp. someone that has contributed a lot to the community, you shouldn't ban them without an explaination
19:04:01FromDiscord<dom96> Araq gave an explanation here: https://irclogs.nim-lang.org/30-01-2021.html#12:16:08
19:04:06FromDiscord<konsumlamm> oh, speaking of nimble, nimble.directory has a few shortcomings imo: if you turn on dark mode, you can't read what's in the search bar anymore, the "visit repo" option is only available before you click on the package, there doesn't seem to be a way to sort the packages by something like total downloads or recent downloads (there's only the trending thing on the main page) and there doesn't seem to be a way to add keywords to a package
19:05:47FromDiscord<konsumlamm> @dom96
19:07:48FromDiscord<dom96> @konsumlamm You can add tags to a package and search by them. All bugs should be reported to https://github.com/FedericoCeratto/nim-package-directory
19:08:03FromDiscord<dom96> For download counts we'd need to integrate something into Nimble
19:08:28FromDiscord<dom96> since Nimble is decentralised it can grab packages from github (or anywhere that supports git/hg)
19:08:36FromDiscord<dom96> so we don't know how much downloads a package gets
19:09:25FromDiscord<konsumlamm> i see...
19:10:44FromDiscord<dom96> An idea we've toyed with is hosting our own git server, and then publishing a package would just be a case of pushing it there
19:11:00FromDiscord<dom96> because as it turns out, having a centralised backup of all packages is actually not that bad of a thing πŸ™‚
19:12:50FromDiscord<dom96> (edit) @konsumlamm You can add tags to a package and search by them. All bugs should be reported to https://github.com/FedericoCeratto/nim-package-directory
19:13:24dom96hm, removing embeds triggers an edit. CC Yardanico
19:17:34*krux02 joined #nim
19:22:14saemHmm, I wonder if there is any getting back on track if the left side of a dot operator is deemed a tyProxy (error).
19:28:27FromDiscord<Avatarfighter> dom96: I noticed that httpclient doesn't have "cookiejar" functionality and I was wondering if cookies/headers were preserved and used throughout a connection to a specific host?
19:28:59FromDiscord<Avatarfighter> e.g: if the host sends a "Set-Cookie" will httpclient comply and send the cookie next time it makes a request to that specific host?
19:29:21FromDiscord<dom96> IIRC the headers you set on the client stay set
19:29:32FromDiscord<dom96> but just give it a test πŸ™‚
19:29:36FromDiscord<dom96> or have a look at the code
19:30:12FromDiscord<Avatarfighter> Yep I am reading the code atm, I might overhaul httpclient though, it might be useful for some to have a cleaner way to set cookies, access the original request information, etc
19:31:30FromDiscord<haxscramper> @dom96 What 'search symbol in <packagename>' was mean to be?
19:31:38*def- quit (Quit: -)
19:31:41FromDiscord<Avatarfighter> Thanks dom
19:32:22FromDiscord<dom96> @haxscramper not sure what you mean, can you elaborate?
19:32:41FromDiscord<haxscramper> This one https://media.discordapp.net/attachments/371759389889003532/805520947813154856/unknown.png
19:32:46ForumUpdaterBotNew thread by JohnAD: Enforcing a const or literal in a proc parameter?, see https://forum.nim-lang.org/t/7455
19:32:50*def- joined #nim
19:34:48FromDiscord<haxscramper> It is present for every package but doesn't seem to do anything, even for compiler (I thought it is connected to documentation search maybe)
19:35:30FromDiscord<dom96> No idea, federico3?
20:05:48*liblq-dev quit (Quit: WeeChat 3.0)
20:05:57FromDiscord<inv> Is it possible to make some kind of return type redefinition (I know no) for the specific case I made here: https://play.nim-lang.org/#ix=2NSx
20:06:21FromDiscord<inv> it looks +- ok, but I would like to convert the template into something more generic-typed
20:06:43*a_chou joined #nim
20:07:17FromDiscord<inv> (edit) "it looks +- ok, but I would like to convert the template into something more generic-typed ... " added "without ``int``"
20:07:25FromDiscord<haxscramper> You can return `any` if you need this, though I'm not sure if I understand your problem
20:08:08FromDiscord<inv> I remember an article how someone did perl in Nim via templates. I want to do ~ something like that for APL
20:08:57FromDiscord<inv> I want all function on two vectors to return vectors of values (seq[bool] in the example), and on atoms (not vectors) - to return atoms (simple bool)
20:11:06FromDiscord<inv> ===(a, b: seq): seq[bool]↡===(a, b: non-seq): bool
20:11:06FromDiscord<haxscramper> You can use `func tmp[T](a, b: openarray[T]): seq[T]`, or `func tmp[T](a, b: openarray[T]): seq[any]` or some runtime discriminant if compile-time return type is not known
20:11:42FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2NSC
20:11:44FromDiscord<haxscramper> is a valid prototype for proc type
20:12:34FromDiscord<inv> Do you mean I need to define kind of the function type? Did not get it, sorry
20:13:22FromDiscord<inv> ah, it is something in experemental
20:14:15FromDiscord<inv> Anyway, I see that everything works, except that I do not know how to define with (non-seq) type
20:15:32FromDiscord<haxscramper> ``func `===`(a, b: not seq): bool = discard``
20:16:18FromDiscord<haxscramper> Will match for anything that is not a sequence
20:16:28FromDiscord<inv> ``not seq`` ? I did not know about it. Thank you.
20:18:20FromDiscord<lqdev> @inv `not T` where T is a type is a typeclass that matches any type except T
20:20:44FromDiscord<inv> nice, it works
20:21:43FromDiscord<inv> https://github.com/inv2004/knim
20:22:05FromDiscord<inv> but proc type looks interesting to check also
20:22:11FromDiscord<Meowx> How would I install a specific branch of a module using nimble?
20:23:59FromDiscord<inv> If I remember correct it is something like install package@tag
20:24:23FromDiscord<inv> (edit) "If I remember correct it is something like install package@tag ... " added "or package@#tag"
20:55:58*Gustavo6046 quit (Ping timeout: 272 seconds)
20:56:27FromDiscord<Meowx> Thanks `package@#tag` worked
21:05:14*Gustavo6046 joined #nim
21:08:31*Gustavo6046 quit (Excess Flood)
21:12:06*Gustavo6046 joined #nim
21:18:11*koltrast quit (Quit: ZNC - http://znc.in)
21:19:22*koltrast joined #nim
21:22:30federico3@konsumlamm when the docs are generated successfully it should search for exported symbols
21:23:51FromDiscord<zidsal> I've followed a pattern I've seen of declaring an object and then declaring a ref type for that object: e.g. refObj = ref valueObj I've declared a `$` for the object however if I stringify the ref object it complains there is no valid implementation for `$` is there a betetr way of solving this then copying my `$` implementation again for the ref type?
21:26:09FromDiscord<konsumlamm> frederico3: i think you meant to reply to @haxscramper
21:26:40FromDiscord<Recruit_main707> is there any reason `inc` is not a temlate for `+=`?
21:26:45FromDiscord<Recruit_main707> template
21:27:52FromDiscord<Recruit_main707> did it use to be like this? because c2nim generates inc for += operations, and that wont be valid for stuff like vectors
21:39:12FromDiscord<konsumlamm> C doesn't have operator overloading though, so for converting C to Nim, that shouldn't be a problem, or wdym?
21:39:27FromDiscord<Kastor> Hello, guys.↡I'm trying out Nim for the first time, and I was wondering which of the following approaches is the best/norm for adding data in a potentially uninitialized sequence within a table: to perform a `hasKey` check before attempting to add to the sequence or to use a `try` and `except KeyError` block pair, like in Python.
21:40:19FromDiscord<konsumlamm> seqs are by default initialized to @[] (i.e. the empty seq)
21:40:47FromDiscord<konsumlamm> or you mean a potentially non-existant key?
21:41:00FromDiscord<Kastor> Yes, sorry that's it
21:41:50*tane quit (Quit: Leaving)
21:42:22FromDiscord<konsumlamm> between the options you mentioned, i'd rather use `hasKey`
21:43:05FromDiscord<konsumlamm> though there are some procs to help with possibly non-existant keys
21:46:06FromDiscord<Kastor> I see, thanks for the help!
21:46:30FromDiscord<konsumlamm> specifically `mgetOrPut` should be helpful here
21:46:32FromDiscord<haxscramper> You can create overload for ``proc `$`(obj: ref YourType): string = $obj[]``. You could define generic overload, but you should be avare of cycles in your data - https://github.com/nim-lang/RFCs/issues/203#issuecomment-602534906
21:46:52FromDiscord<haxscramper> And I guess this is the reason why it hasn't been implemented by default
21:47:04FromDiscord<konsumlamm> `table.mgetOrPut(myKey, @[]).add(item)`
21:48:16FromDiscord<konsumlamm> @Kastor
21:56:21*def- quit (Quit: -)
21:57:26FromDiscord<Recruit_main707> @konsumlamm c++ does
21:57:32FromDiscord<Recruit_main707> and c2nim supports c++
21:57:33*def- joined #nim
21:58:08FromDiscord<haxscramper> I think that's because `inc` is `++` in C, not `+=`
21:58:32FromDiscord<konsumlamm> are you sure that it also happens for overloaded operators and not just for `int`?
21:59:16FromDiscord<haxscramper> But providing automatic overload generation for C operators to match common nim conventions should be trivial to implement at least in theory
22:04:26FromDiscord<Recruit_main707> may someone explain me what is this thing doing?↡https://github.com/IainWinter/IwEngine/blob/8c0f2c0b551c8e1e91fb5b5bdcf919426d097499/IwEngine/include/iw/physics/Plane.h#L17-L23↡its a constructor if im not mistaken, but what is it doing?
22:05:24saemrecruit do you mean the initializers?
22:05:32*Gustavo6046 quit (Ping timeout: 260 seconds)
22:07:19FromDiscord<konsumlamm> it's a constructor yes
22:07:49FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=2NT7
22:08:40FromDiscord<konsumlamm> yes, except the fields are called `P` and `D`
22:09:59FromDiscord<Recruit_main707> ah yes, my bad.↡how would that look like, `P: V = points`?
22:10:11FromDiscord<Recruit_main707> or smthing idk πŸ₯΄
22:11:28FromDiscord<Recruit_main707> you are calling the V constructor and passing it points?
22:14:08saemIt's been a long time, but the C++ code is using initializers in order to avoid a copy IIRC. I'm not sure if the nim code you wrote is necessarily entirely equivalent, but I do think it avoids the copy.
22:15:11*filcuc joined #nim
22:23:32*zedeus quit (Quit: zedeus)
22:24:31FromDiscord<haxscramper> Is it possible to convert base type object to derived type?
22:25:20FromDiscord<Recruit_main707> i think so
22:26:12FromDiscord<haxscramper> I tried to do just `Derived(baseObj)` but got `ObjectConversionDefect` when doing so
22:30:55FromDiscord<ElegantBeef> @haxscramper no clue what you're doing but https://play.nim-lang.org/#ix=2NT9
22:33:13FromDiscord<haxscramper> I basically want to do `let _ = B(A())` somehow
22:33:41FromDiscord<haxscramper> I have an instance of the base class, but want to convert it to derived
22:33:57FromDiscord<haxscramper> This compiles with your code but gives `invalid object conversion [ObjectConversionDefect]`
22:34:14FromDiscord<ElegantBeef> `if x of Derived: x.Derived`
22:34:40FromDiscord<ElegantBeef> It's inheritance you need to ensure the type is convertable before you attempt to convert it
22:35:02saemhax sounds like you just want to perform a copy and are wondering if there is a constructor that is pre-existing that allows you to do that easily?
22:35:45FromDiscord<ElegantBeef> That object conversion defect is from attempting to convert to a type that object isnt actually in
22:36:34FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2NTb vs. https://play.nim-lang.org/#ix=2NTa
22:36:46FromDiscord<haxscramper> saem: yes. Though i suspect there is no way to do this because of reason pointed out by ^^^
22:37:28saemI was going to say this sounds like "rub some macros on it" territory.
22:37:37FromDiscord<ElegantBeef> you could return an `Option[T]` or return nil if it's not derived
22:38:04FromDiscord<ElegantBeef> Since you should be using ref's for OOP either work
22:38:11FromDiscord<haxscramper> My use case is - I have proc that returns case object and I need to add some metainformation on this type so I inherited from ti
22:38:19FromDiscord<haxscramper> it and added some fields
22:38:33FromDiscord<ElegantBeef> It's a ref object?
22:38:35FromDiscord<haxscramper> yes
22:38:40FromDiscord<haxscramper> `ref object of RootObj`
22:40:00FromDiscord<haxscramper> I have AST and want to add some extra metadata into certain nodes. But I guess this is really not possible
22:40:03*a_chou quit (Ping timeout: 265 seconds)
22:40:15FromDiscord<haxscramper> without doing deep tree rewrite
22:40:39FromDiscord<ElegantBeef> Could just store your meta data in another object
22:40:50FromDiscord<ElegantBeef> What type of meta data are we after?
22:41:06saemonly the best.
22:41:50*zedeus joined #nim
22:44:54FromDiscord<haxscramper> Links to some external entries. I can't exactly store this in the outside object.
22:45:55FromDiscord<haxscramper> I'm adding more information to AST in subsequent pass and need to store it somehow
22:46:20FromDiscord<haxscramper> Though maybe this is bad approach fundamentally
22:46:48FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=2NTg
22:47:54FromDiscord<haxscramper> Well, yes it would be the easiest solution, but at this point it is more of an architectural issue
22:48:15FromDiscord<haxscramper> Though I can use forbidden technique
22:48:18FromDiscord<haxscramper> `data: pointer`
22:48:19FromDiscord<ElegantBeef> I was just kidding, not actually suggesting it
22:50:18FromDiscord<haxscramper> I can just rewrite some parts of the tree when needed
22:52:41*Vladar quit (Quit: Leaving)
23:33:22*oprypin quit (Quit: Bye)
23:33:31*oprypin joined #nim
23:40:54*filcuc quit (Ping timeout: 256 seconds)