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:22 | ForumUpdaterBot | New thread by Adnan: Publishing a Nim app in Flathub, see https://forum.nim-lang.org/t/7452 |
00:50:38 | planetis[m] | hey krux02 is back! welcome back! |
00:55:58 | krux02 | thank, 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:01 | FromDiscord | <ElegantBeef> Do you an disruptek just alternate, when he's banned you pop in? π |
01:10:52 | Prestige | did disruptek get banned from chat? |
01:12:51 | FromDiscord | <konsumlamm> ye |
01:18:30 | * | zedeus joined #nim |
01:20:21 | Prestige | damn |
01:42:38 | * | zedeus quit (Quit: zedeus) |
01:44:43 | FromDiscord | <Avatarfighter> o/ everyone |
01:46:35 | Prestige | Hey Avatarfighter |
01:49:13 | krux02 | did not know disruptek got banned. I never got banned. But I think I was pretty close to it. |
01:49:34 | krux02 | have to go to bed now |
01:49:36 | krux02 | good night |
01:50:27 | krux02 | I wonder though what he did to deserve to be banned. |
01:50:41 | krux02 | Anyway, 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:58 | FromDiscord | <dk> This future never returns for me, any ideas? https://nim-lang.org/docs/httpclient.html#body%2CAsyncResponse |
03:39:11 | FromDiscord | <ElegantBeef> What's your code? |
03:41:52 | FromDiscord | <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:33 | FromDiscord | <JSGRANT> https://matrix.org/blog/2020/12/07/gitter-now-speaks-matrix |
03:42:42 | FromDiscord | <ElegantBeef> They arent really moving they were purchased by Element or Matrix(dont recall if the business did or the foundation did)? |
03:43:52 | FromDiscord | <ElegantBeef> Atleast i thought they were purchased |
03:44:05 | FromDiscord | <JSGRANT> Didn't hear about them being bought by Matrix; They were bought originally by Gitlab I know a few years ago |
03:44:20 | FromDiscord | <ElegantBeef> Yea i could be misremembering |
03:44:42 | FromDiscord | <Rika> i believe you arent |
03:44:54 | FromDiscord | <dk> sent a code paste, see https://play.nim-lang.org/#ix=2NO0 |
03:44:58 | FromDiscord | <dk> it gets stuck at the await |
03:45:00 | FromDiscord | <dk> in jester |
03:45:40 | FromDiscord | <ElegantBeef> Interesting, i have 0 clue π |
03:45:58 | FromDiscord | <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:55 | FromDiscord | <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:50 | FromDiscord | <xCFF> sent a code paste, see https://play.nim-lang.org/#ix=2NOj |
05:31:10 | FromDiscord | <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:03 | FromDiscord | <xCFF> sent a code paste, see https://play.nim-lang.org/#ix=2NOl |
05:51:57 | FromDiscord | <xCFF> (edit) sent a code paste, see https://play.nim-lang.org/#ix=2NOm |
06:15:29 | * | sixtyten joined #nim |
06:39:59 | saem | Fun, 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:17 | FromDiscord | <ElegantBeef> Were you doubly disappointed? π |
06:47:01 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:47:11 | saem | Nah, I learned some stuff so that's cool. |
06:49:52 | saem | The 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:31 | FromDiscord | <ElegantBeef> Eh i was talking about your game playing lastnight π |
06:50:38 | saem | oh |
06:50:39 | saem | Hahaha |
06:50:40 | FromDiscord | <ElegantBeef> Yea idk the AST method gives us the Lispy macros |
06:51:17 | saem | I 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:28 | FromDiscord | <ElegantBeef> Ah |
06:51:59 | * | sixtyten quit (Remote host closed the connection) |
06:52:25 | * | sixtyten joined #nim |
06:55:05 | saem | I 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:25 | FromGitter | <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:56 | FromGitter | <Araq> however, it forces us to clean up the compiler's codebase and that's great |
06:58:35 | saem | Yeah, 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:02 | leorize | Araq: are you gonna let disruptek return eventually? |
06:59:08 | FromGitter | <Araq> saem: about MIR, yeah it's a good idea |
07:01:29 | saem | @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:10 | FromGitter | <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:39 | FromGitter | <Araq> saem: using the AST as our IR served us well, yeah |
07:05:32 | FromGitter | <Araq> but our "Packed AST" is the future IMO. no hidden mutations possible and some transformations get even easier |
07:06:33 | saem | I'm definitely in the avoid mutation camp. |
07:08:03 | leorize | Araq: have you talked to him about taming his wording in Nim's public channels? |
07:08:28 | FromGitter | <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:15 | leorize | I just pushed a prototype for my osproc redesign: https://github.com/alaviss/nim-sys/blob/features/exec-prototype/src/sys/exec.nim |
07:10:26 | leorize | if anyone is interested, please review :) |
07:11:48 | FromDiscord | <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:56 | leorize | for the pretty print, which I haven't implement :p |
07:13:42 | FromDiscord | <ElegantBeef> Ah, without that just seems like tedious work π |
07:17:48 | * | sixtyten quit (Quit: Leaving) |
07:17:49 | FromDiscord | <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:51 | leorize | what are you gonna replace them with? |
07:19:17 | FromDiscord | <ElegantBeef> If there is anything after them a space, else remove them |
07:19:37 | leorize | and strutils.replace makes this rather trivial, so I'm not sure what would be the value |
07:19:45 | FromDiscord | <ElegantBeef> I'm probably just being a numpty as usually |
07:20:10 | FromDiscord | <ElegantBeef> Well it's named `toNulless` so it sounds like it should be handling it, but refer to numpty comment |
07:21:26 | leorize | I 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:18 | leorize | I value comments on the API even if you know nothing about process launching. |
07:26:41 | FromDiscord | <ElegantBeef> line 226: "This is the equivalence to setting" -> "This is equivalent to setting" |
07:26:41 | leorize | sys/exec is meant to be safely and easily usable by everyone :) |
07:31:39 | FromDiscord | <ElegantBeef> It all seems fine to me |
07:32:18 | leorize | thanks for reviewing :D |
07:33:34 | FromDiscord | <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:33 | leorize | winblows is responsible for 80% of the headache in designing that api :) |
07:38:15 | FromDiscord | <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:32 | saem | Your use of distinct types and functions warms my heart |
07:40:00 | FromDiscord | <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:29 | FromDiscord | <ElegantBeef> I wanted to re implement small sections with views for that reduced memory/increased speed! |
07:40:43 | leorize | saem: there are a lot of pains associated with those if you see my "reference" posix implementation :p |
07:40:58 | leorize | it's pretty much "compile but please don't even try to use" |
07:40:59 | saem | I read through the code real quick, any reason not to have an enum or distinct type for signals? |
07:41:10 | leorize | Windows :) |
07:41:32 | saem | I was gonna say the platform specific type definition |
07:41:51 | saem | Would still work right? |
07:42:18 | saem | So when windows it's one definition, when nix another |
07:42:42 | leorize | yep, would be a pain right now because I haven't wrapped the signal numbers themselves |
07:42:58 | saem | Or provide a type which abstracts over them. |
07:43:06 | leorize | and Windows don't have signals so there is that too... |
07:43:30 | leorize | but the main problem is that I haven't wrapped the signal numbers |
07:43:36 | leorize | and I'm not sure if I can even |
07:44:51 | FromDiscord | <ElegantBeef> Look at the speed though!β΅https://play.nim-lang.org/#ix=2NOy |
07:44:52 | saem | I 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:26 | saem | Speed for the win |
07:46:25 | FromDiscord | <ElegantBeef> Yea but it's useless since you cannot store the `openarray[char]` without an error |
07:47:41 | leorize | saem: 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:34 | saem | Yeah, I read up a bit on it and it's really different... neat? |
07:51:00 | leorize | can't say much about it other than it will make my life hell when sys/signal become a thing |
07:51:18 | leorize | I'm glad that my prototype API seems to pass the IRC review check :) |
07:52:36 | FromDiscord | <ElegantBeef> I'm not an IRC user, so clearly my intellect is lower π |
07:53:00 | leorize | now I'm gonna post it to the forum for some roast |
07:55:38 | leorize | I just realized that there are no category for RFC posts on the forum :p |
08:21:57 | leorize | posted https://forum.nim-lang.org/t/7453 |
08:22:32 | ForumUpdaterBot | New 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:51 | FromDiscord | <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:38 | FromDiscord | <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:15 | FromDiscord | <carpal> who can help me here? https://discord.com/channels/371759389889003530/371759389889003532/805148053756444722 |
08:59:15 | FromDiscord | <ElegantBeef> My results with 300,000 numbers https://play.nim-lang.org/#ix=2NOQ |
09:00:03 | FromDiscord | <ElegantBeef> Inline should attempt to put that code where you call it, but only accept mutable variables |
09:00:20 | FromDiscord | <ElegantBeef> Also not overly wise to point to a gitub message like that due to irc/matrix users |
09:01:07 | FromDiscord | <carpal> ok so the compiler won't generate a new pointer right? |
09:01:24 | * | sixtyten quit (Quit: Leaving) |
09:01:39 | FromDiscord | <ElegantBeef> I dont imagine it would |
09:01:45 | FromDiscord | <ElegantBeef> i've been known to be wrong |
09:05:02 | FromDiscord | <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:39 | ForumUpdaterBot | New thread by AlectronikHQ: Compile to object file, see https://forum.nim-lang.org/t/7454 |
10:18:07 | * | sbsbio joined #nim |
10:20:00 | FromGitter | <offbeat-stuff> What vulkan library should i use |
10:20:26 | * | zedeus joined #nim |
10:20:33 | FromGitter | <offbeat-stuff> So I can follow up normal vulkan tutorials in nim |
10:21:35 | sbsbio | offbeat-stuff: This seems good: https://github.com/nimgl/vulkan |
10:22:34 | FromGitter | <offbeat-stuff> Thanks |
10:22:54 | FromGitter | <offbeat-stuff> Although no examples are given with it |
10:29:56 | sbsbio | I'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:57 | sbsbio | have 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:46 | FromGitter | <offbeat-stuff> Why is this not a good correct =destroy hook https://play.nim-lang.org/#ix=2NP8 |
10:45:38 | FromGitter | <offbeat-stuff> Okay got it correct sorry to bother |
10:45:56 | FromGitter | <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:22 | FromDiscord | <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:14 | FromDiscord | <mratsim> but then is the proc a no-op? |
11:01:13 | FromDiscord | <lqdev> well if it's borrowed it shouldn't be a noop |
11:02:17 | FromDiscord | <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:31 | FromDiscord | <lqdev> overall, i gotta say the API is much better than osproc |
11:20:52 | FromDiscord | <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:50 | FromDiscord | <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:06 | krux02 | I just read through the chat history to figure out why and when disruptek got banned. |
12:18:15 | PMunch | He got banned again? |
12:18:21 | krux02 | Very entertaining, worth a read. |
12:18:27 | krux02 | aparently. |
12:19:59 | krux02 | To 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:16 | PMunch | I'm reading the logs now |
12:20:34 | PMunch | Started strong with "newsflash: no one gives a shit" :P |
12:20:48 | krux02 | yea, but that isn't the reason. |
12:20:54 | krux02 | That is also where I started. |
12:21:11 | FromDiscord | <Rika> i think thats too far up |
12:21:20 | krux02 | https://irclogs.nim-lang.org/29-01-2021.html#19:44:32 |
12:22:45 | krux02 | and 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:48 | PMunch | Aw come on, that joke was great! |
12:27:18 | PMunch | Actually had me laughing, and not just the slightly more exhale through my nose kind |
12:27:53 | PMunch | I'm not sure that's why he was banned though.. |
12:28:29 | FromDiscord | <Rika> the fist link krux sent |
12:28:48 | FromDiscord | <Rika> not the highlight |
12:28:52 | FromDiscord | <Rika> read a bit below that |
12:29:20 | PMunch | Yeah the whitespace joke |
12:29:33 | FromDiscord | <Rika> oh i misread |
12:30:16 | PMunch | But I think it was his later comments to dom that got him banned |
12:30:25 | PMunch | Well I hope it was |
12:30:32 | FromDiscord | <Rika> smh thats what i said |
12:40:56 | * | hmmm joined #nim |
12:44:21 | FromDiscord | <konsumlamm> in case anyone is bored and wants to look at a simple PR: https://github.com/nim-lang/Nim/pull/16864 |
12:45:26 | PMunch | Hmm, is there a way to just yield an async task without waiting for anything in particular? |
13:11:21 | FromDiscord | <Yardanico> asyncCheck task() |
13:13:25 | PMunch | Ooh, that doesn't await it's completion? |
13:25:47 | PMunch | Oh wait, sorry I meant like `await` nothing |
13:26:32 | PMunch | I 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:53 | PMunch | Currently I have `await sleepAsync(1)` which works, but it's not perfect.. |
13:28:10 | FromDiscord | <Rika> await sleepAsync(0) lol |
13:32:10 | PMunch | Is that really the best way to do it? |
13:32:23 | FromDiscord | <Rika> no idea |
13:32:30 | FromDiscord | <Rika> would "yield" work? |
13:32:53 | FromDiscord | <dom96> That is the best thing available |
13:33:11 | FromDiscord | <Rika> !eval import asyncdispatch; proc a {.async.} = yield |
13:33:13 | NimBot | Compile failed: /usercode/in.nim(1, 42) Error: yield statement must yield a value |
13:33:33 | FromDiscord | <Rika> you can yield :ThonkDumb: |
13:35:13 | FromDiscord | <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:30 | FromDiscord | <dom96> Guess you could special case yielding nil. |
13:35:41 | FromDiscord | <Rika> or just an empty await |
13:35:46 | FromDiscord | <Rika> ?] |
13:37:23 | * | filcuc joined #nim |
13:37:40 | FromDiscord | <dom96> Sure, maybe, but that would just be sugar. The question is how it should work behind the scenes. |
13:40:50 | leorize[m] | @lqdev thanks for looking into it :) |
13:41:06 | krux02 | PMunch, look at the second link. The first link is just where it started. |
13:41:24 | FromDiscord | <konsumlamm> if something doesn't compile in `expandMacros`, but compiles without, is that a bug? |
13:42:23 | leorize[m] | @lqdev re: borrowed docs, it works even without `=`. See https://alaviss.github.io/nim-sys/handles.html#%3D%3D%2CFD%2CFD |
13:42:57 | krux02 | @konsumlamm: yes |
13:43:12 | PMunch | @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:26 | leorize[m] | @lqdev re: initNulStdio -> initNilStdio, I thought about it but decided against nil because it might confuse people with Nim's nil. |
13:43:27 | FromDiscord | <Recruit_main707> krux, is it me or you havent been active in a while? |
13:43:28 | FromDiscord | <konsumlamm> specifically, using `sugar.=>` inside `expandMacros` produces an "illformed AST: proc (x: int): auto = result = x + 1" error (for example) |
13:43:30 | PMunch | krux02, yeah like I said I don't think it was the joke :P |
13:43:51 | krux02 | no it wasn't the joke. The joke was great. |
13:44:15 | krux02 | Recruit_main707: yea I wasn't active for a while. |
13:44:27 | FromDiscord | <Recruit_main707> welcome back then :) |
13:44:34 | krux02 | also visible in my github green tiles |
13:44:42 | krux02 | Well, thank you. |
13:45:14 | leorize[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:18 | PMunch | I mean he could still hang around in offtopic right? |
13:49:36 | leorize[m] | he can, but will he? |
13:50:39 | krux02 | then lets meet at obscenenim where welcome personal attacks there. |
13:51:12 | krux02 | insultfighting will be welcome at #obscenenim |
13:51:48 | PMunch | Haha |
13:51:53 | PMunch | What could go wrong! |
13:53:58 | * | filcuc quit (Ping timeout: 264 seconds) |
13:56:55 | FromDiscord | <Recruit_main707> +1 for this |
13:58:29 | krux02 | me and PMunch are already at the channel. It is just on IRC only yet. |
14:00:11 | krux02 | @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:37 | krux02 | But 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:48 | PMunch | Just like we like it! |
14:06:46 | * | filcuc joined #nim |
14:11:26 | FromDiscord | <dom96> krux02: Please consider naming it something without Nim in the name. |
14:11:31 | FromDiscord | <Recruit_main707> tbh the only reason i use discord is because everyone does, pretty ironic since i use nim |
14:11:57 | krux02 | dom96: you can join the channel an open your complaint there. |
14:12:05 | FromDiscord | <Recruit_main707> lol |
14:14:43 | krux02 | I don't think I will use discord in the near future for Nim. |
14:17:36 | krux02 | Neither 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:04 | PMunch | Is Discord Chinese? |
14:18:11 | PMunch | Or was that just a general thing? |
14:18:23 | krux02 | it is partially owned by Tencent |
14:19:45 | PMunch | Oh damn |
14:19:47 | PMunch | Didn't know |
14:20:04 | PMunch | Well, now I have one more reason to not use Discord I guess |
14:20:39 | krux02 | My 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:53 | krux02 | Some messages just don't reach the other side. |
14:21:24 | PMunch | Oh yeah I've heard of that |
14:22:12 | krux02 | Afaik, Discord doesn't filter messages, ... yet |
14:22:28 | Oddmonger | how can you filter ssl ? |
14:22:58 | FromDiscord | <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:58 | PMunch | BY being the man (platform) in the middle |
14:23:41 | krux02 | Oddmonger, 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:01 | Oddmonger | i thouhgt you were talking about irc |
14:24:24 | krux02 | JSGRANT: Discord just calls their room server. |
14:24:42 | krux02 | It really isn't a server. It is just a room with rich functionality. |
14:25:54 | FromDiscord | <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:17 | krux02 | @JSGRANT: you don't need to give up Discord. But you should be ready to leave when the circumstances require it. |
14:27:43 | FromDiscord | <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:51 | FromDiscord | <flywind> Can I get the system endianess at compile time? |
14:27:52 | krux02 | I 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:35 | FromDiscord | <JSGRANT> krux02: That's how Matrix works afaict? |
14:28:53 | krux02 | I don't know how matrix works. |
14:29:15 | krux02 | Matrix is like an octupus that tries to connect with everything with maximum integration. |
14:29:32 | FromDiscord | <flywind> !eval static: echo cpuEndian # not the wrong endianess |
14:29:34 | NimBot | <no output> |
14:29:53 | FromDiscord | <konsumlamm> why on earth does `runnableExamples` turn `let f = () => (discard)` into `let f = () =>\n discard` -_- |
14:29:55 | krux02 | So Matrix users will have a real IRC name, not just some Bot that repeats everything in thear name. |
14:30:35 | Oddmonger | matrix is a parasit |
14:31:10 | krux02 | well it is. |
14:31:50 | krux02 | and that is good when the parasit host is a hostile platform |
14:32:17 | krux02 | in the vein of, the enemy of my enemy is my friend |
14:32:46 | FromGitter | <krux02> I have btw also an IRC bridge to gitter. |
14:33:00 | FromGitter | <krux02> This allows me to communicate in gitter chats directly. |
14:33:08 | FromGitter | <krux02> from my IRC client. |
14:33:41 | FromGitter | <krux02> I like this bridging technology. |
14:40:55 | FromDiscord | <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:13 | PMunch | Hmm, is there a JSON diffing library out there? |
14:47:42 | krux02 | probably. |
14:47:59 | krux02 | but maybe you can just pretty print the json and then use a normal line based diff tool on it. |
14:48:31 | PMunch | That sounds iffy :P |
14:53:34 | krux02 | I don't know how good your solution needs to be. |
14:54:23 | krux02 | But it could be implemented in a line of bash. |
14:54:33 | PMunch | Well I'm creating a wrapper for this: https://developers.home-assistant.io/docs/api/websocket/#subscribe-to-events |
14:54:35 | krux02 | maybe two |
14:54:52 | PMunch | I have a "base" version that just wraps the message parsing logic |
14:54:57 | PMunch | And auth |
14:56:04 | FromDiscord | <Rika> krux, what do you consider as censorship? and are you in the off topic channel so we can continue there lol |
14:56:24 | PMunch | Now I'm on to making a "managed" version with more high-level things like attaching event handlers and such |
14:56:53 | PMunch | The goal is to end up at a DSL that's dead simple to use |
15:01:52 | krux02 | @Rika: I am in #obscenenim |
15:02:12 | federico3 | https://sr.ht/~arsen/alsa_rnnoise/ this noise filter is impressive. I wonder if there's any alsa filter implemented in Nim |
15:03:14 | FromDiscord | <Rika> guess im firing up ye ol irc client thne |
15:03:43 | krux02 | well, 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:26 | krux02 | @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:33 | FromDiscord | <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:00 | FromDiscord | <Rika> images are scanned as well |
15:20:07 | FromDiscord | <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:43 | saem | That ALSA filter does look pretty cool |
16:19:39 | * | NimBot joined #nim |
16:29:37 | * | Heliotrope joined #nim |
16:31:04 | saem | @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:06 | PMunch | Nice, got my HomeAssistant managed communications thing working it seems |
16:32:42 | saem | "the more people pushing in that direction the merrier" is probably phrased more clearly. |
16:33:30 | * | Heliotrope quit (Client Quit) |
16:35:12 | saem | PMunch: 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:31 | saem | That's really cool... Not sure how my phone lost that. |
16:35:39 | PMunch | Oh definitely |
16:35:43 | saem | Hehe |
16:35:48 | PMunch | I only have stuff that's connected to the local network |
16:36:27 | PMunch | Well, 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:31 | saem | Welp, you're combining two interesting things so it's going up on my priority list. π |
16:36:54 | PMunch | And I guess the IKEA lights are also checking for updates, although that seems to be done via the app. |
16:37:35 | PMunch | I'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:02 | PMunch | Then I have an RPi with Home Assistant which I'm now programming add-ons for to perform actions automatically |
16:38:32 | PMunch | My 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:01 | saem | Guess you follow some of Matthew Garrett's work then? |
16:43:04 | saem | That lighting change sounds awesome for me, I react poorly to loud noises and avoid alarms. |
16:44:47 | PMunch | Matthew Garrett? |
16:45:04 | PMunch | It's great, I now often wake up a couple minutes before my alarm goes off :) |
16:50:34 | * | abm joined #nim |
16:52:56 | saem | https://twitter.com/mjg59?s=09 |
16:53:14 | saem | He's a Linux kernel developer and security researcher |
16:53:28 | saem | Did 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:38 | federico3 | enjoy https://mjg59.dreamwidth.org/data/rss |
17:30:26 | leorize | his work on firmware security is very cool |
17:32:14 | * | nc-x joined #nim |
17:33:29 | nc-x | anybody 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:13 | FromDiscord | <QueenFuckingAdrielle> hulloh |
17:43:05 | FromDiscord | <QueenFuckingAdrielle> anybody have any experience with avx 512? |
17:43:14 | * | shirty joined #nim |
17:43:28 | * | shirty quit (Client Quit) |
17:44:09 | FromDiscord | <QueenFuckingAdrielle> buying a new dev-box/server, not sure if i should wait for the next round of intel cpus |
18:08:43 | leorize | ping @mratsim |
18:09:09 | FromDiscord | <mratsim> I am here to heed to your request |
18:09:16 | FromDiscord | <mratsim> you have 3 wishes and then i will disappear |
18:09:56 | leorize | please answer the avx 512 question :) you're our expert in this stuff |
18:10:31 | Oddmonger | as my first wish, i'd like to have TASM with AVX support |
18:11:34 | FromDiscord | <mratsim> TASM: SIGILL Illegal Instruction, aborting. |
18:11:49 | leorize | are you gonna work on a runtime cpu features dispatching library in Nim? |
18:11:55 | FromDiscord | <mratsim> @QueenFuckingAdrielle what kind of algorithm will you run? |
18:12:06 | FromDiscord | <mratsim> !repo cpuwhat |
18:12:13 | FromDiscord | <mratsim> >_> |
18:12:28 | leorize | disruptek and by extension disbot has been banned :P |
18:12:33 | FromDiscord | <mratsim> This has my seal of approval: https://github.com/awr1/cpuwhat |
18:13:20 | leorize | doesn't seem to have dynamic dispatch though :P |
18:14:13 | FromDiscord | <mratsim> just do if/else: https://github.com/mratsim/constantine/blob/master/constantine/arithmetic/limbs_double_width.nim#L75 |
18:15:14 | FromDiscord | <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:33 | FromDiscord | <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:59 | FromDiscord | <mratsim> but if/else that are always predicted right have no cost so that might be overkill |
18:17:18 | FromDiscord | <mratsim> and since you don't change CPU while a program is running it's easy to predict. |
18:19:43 | leorize | so 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:10 | FromDiscord | <konsumlamm> is it fair to say that Nim is way more buggy than D? |
18:21:19 | FromDiscord | <konsumlamm> not that i wanna switch, just curious |
18:22:10 | FromDiscord | <mratsim> @leorize, yes, I don't have the time/usecase for it. |
18:22:15 | leorize | not sure about "way more", but pretty sure about "more" |
18:22:46 | FromDiscord | <mratsim> at one point I will rework on my deep learning / machine learning / tensor compiler and this will autodispatch |
18:23:52 | FromDiscord | <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:19 | FromDiscord | <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:27 | FromDiscord | <mratsim> I must have been high when I wrote that crazy stuff |
18:24:56 | FromDiscord | <konsumlamm> though 2021 is supposed to be the year to make things more stable iirc? or was that somewhere else? |
18:25:08 | FromDiscord | <haxscramper> yes, more stability |
18:25:28 | FromDiscord | <konsumlamm> good, cause i think Nim really does need more stability |
18:25:36 | FromDiscord | <haxscramper> Though just as a side note - I found three bugs in 2.5 years |
18:26:10 | FromDiscord | <haxscramper> While doing some top-tier garbage with generics+macros and god only knows what |
18:26:10 | FromDiscord | <konsumlamm> lol, tbf, i found 4 bugs alone while writing tests for the sugar module |
18:26:22 | FromDiscord | <haxscramper> Not mratshim level though, not even close |
18:26:24 | FromDiscord | <mratsim> I found 290 bugs/issues: https://github.com/nim-lang/Nim/issues?q=is%3Aissue+author%3Amratsim+ |
18:26:38 | FromDiscord | <konsumlamm> lmao, good job |
18:26:49 | FromDiscord | <mratsim> It's been 4 years though |
18:26:57 | FromDiscord | <mratsim> so 70/year |
18:27:03 | FromDiscord | <mratsim> one per week |
18:27:04 | leorize | currently I just attribute all this to nim-lang being a small team :P |
18:27:21 | * | waleee-cl joined #nim |
18:27:25 | FromDiscord | <mratsim> and Nim has a large scope as well. |
18:27:32 | FromDiscord | <konsumlamm> actually, i forgot one bug |
18:27:34 | FromDiscord | <konsumlamm> so actually 7 |
18:27:38 | FromDiscord | <mratsim> in terms of research features |
18:27:48 | FromDiscord | <haxscramper> were there any in-depth discussion about attracting more compiler developers? |
18:27:53 | FromDiscord | <konsumlamm> though there was no issue for it, so apparently noone ever encountered it |
18:28:00 | FromDiscord | <haxscramper> like rfc/issues or something else of that sort |
18:28:18 | leorize | @konsumlamm: it's more likely that no one bothered to report |
18:28:40 | FromDiscord | <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:50 | leorize | haxscramper: I don't think so |
18:29:06 | FromDiscord | <haxscramper> yes, of course I meant regular nim users |
18:29:18 | FromDiscord | <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:32 | FromDiscord | <haxscramper> it's not like we have thousands of compiler developers walking around and looking for a compiler |
18:29:34 | FromDiscord | <mratsim> @QueenFuckingAdrielle ping me when you're back so we can look at your AVX512 needs, going back to writing code. |
18:29:40 | FromDiscord | <haxscramper> to jump on |
18:29:52 | FromDiscord | <konsumlamm> Ε§hough with using an enum for comparisons (like rust), this shouldnt have happened in the first place |
18:29:53 | leorize | most of our active compiler devs are volunteers afaik |
18:30:12 | leorize | konsumlamm: the stdlib is fairly ancient |
18:30:18 | FromDiscord | <konsumlamm> @haxscramper since you're here now, got some time to talk about custom unpackers for pattern matching? |
18:30:26 | FromDiscord | <haxscramper> yes of course |
18:30:28 | FromDiscord | <konsumlamm> leorize: i noticed |
18:30:48 | leorize | and no one bothered to evolve it :( |
18:31:00 | FromDiscord | <konsumlamm> so, custom indexing is pretty cool (i didn't think about that you can use `static: error(...)` initially) |
18:31:16 | FromDiscord | <haxscramper> btw code example I pasted in my last response works with current implementation |
18:31:26 | FromDiscord | <konsumlamm> i at least try to bring the docs up to date, for now |
18:32:26 | FromDiscord | <konsumlamm> i'd wish for something more... nominal rther than structural |
18:33:47 | FromDiscord | <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:41 | FromDiscord | <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:44 | leorize | stdlib was a wild place |
18:36:55 | leorize | we are actively removing things now afaik |
18:37:15 | leorize | one of the main reason the stdlib is so big is because nimble sucks :) |
18:37:27 | FromDiscord | <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:43 | FromDiscord | <haxscramper> E.g. object being matched is a final value |
18:38:20 | FromDiscord | <konsumlamm> well, sums for example was added not so long ago, so that kinda goes against the "actively removing things" |
18:38:30 | FromDiscord | <haxscramper> though it is not a counter-argument I'm just saying about current assumptions in implementation |
18:38:35 | FromDiscord | <konsumlamm> it's more like "actively removing and adding new stuff to remove later" |
18:39:07 | FromDiscord | <konsumlamm> `unpacker` wouldn't be a special name, just the name i chose for my example |
18:39:17 | FromDiscord | <konsumlamm> my idea was that you can use arbitrary functions |
18:39:25 | leorize | we just gotta fix nimble :p |
18:39:35 | FromDiscord | <haxscramper> and `<ident>()` for unpacker is already occupied for kind matching |
18:39:49 | FromDiscord | <konsumlamm> mm ye, thats kind of a problem |
18:40:00 | FromDiscord | <konsumlamm> ig you could define a `kind` proc for some trickery |
18:40:15 | FromDiscord | <haxscramper> And this is the-non-negotiable part of the syntax |
18:40:17 | FromDiscord | <konsumlamm> couldnt you try to use `.kind` and if that doesnt work, interpret it as an unpacker |
18:41:07 | FromDiscord | <haxscramper> It introduces `compies()` check which is insanely confusing when it is altering behavior |
18:41:15 | FromDiscord | <konsumlamm> eh, fair |
18:41:27 | FromDiscord | <haxscramper> But! |
18:41:58 | FromDiscord | <haxscramper> `(unpacker: (@a, @b))` already works, but not particularly pretty |
18:42:16 | FromDiscord | <konsumlamm> ye, that's pretty cool, but as you say, not that pretty |
18:44:22 | FromDiscord | <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:29 | leorize | I wonder when will we manage to attract more funding into Nim |
18:44:30 | FromDiscord | <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:59 | FromDiscord | <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:01 | FromDiscord | <haxscramper> you can? TIL |
18:45:23 | FromDiscord | <konsumlamm> the inheritance system also works with normal objects, ye |
18:46:10 | FromDiscord | <konsumlamm> one huge advantage Nim has over D is that the latter is way harder to search for... |
18:46:10 | FromDiscord | <haxscramper> Good to know, though I should put iit on tests too |
18:46:26 | FromDiscord | <konsumlamm> oh yeah |
18:46:39 | FromDiscord | <dom96> leorize: I'm curious what you specifically think needs fixed |
18:46:54 | leorize | a proper dependency graph |
18:47:09 | leorize | deterministic dependency resolution |
18:47:17 | leorize | dev deps |
18:47:20 | FromDiscord | <haxscramper> The earlier name was even better - current one has some T9 clashes |
18:47:32 | leorize | features for generating docs |
18:47:36 | FromDiscord | <haxscramper> Build dependencies would be nice too |
18:47:59 | FromDiscord | <dom96> You think all of those are causing people to put their packages into the stdlib? |
18:48:19 | FromDiscord | <konsumlamm> `nimble run --d:release` passing the option to the nim compiler would also be nice :P |
18:48:42 | FromDiscord | <haxscramper> make `nimble test` compilation less noisy |
18:49:05 | FromDiscord | <konsumlamm> ye, i think i'll submit my new `is_thirteen` package for inclusion in the stdlib |
18:49:13 | FromDiscord | <dom96> lol |
18:49:37 | FromDiscord | <dom96> PR to fix that should be a nice entry point into contributing things to Nimble π |
18:49:40 | leorize | dom96: yes, it's blocking us from using third party packages in the Nim compiler, blocking the stdlib from expansion, and so on |
18:50:07 | FromDiscord | <haxscramper> And when `.nimble` has syntax/semantic error show it fully instead of `Invalid section` error |
18:50:15 | FromDiscord | <dom96> leorize: I really doubt Araq would want the Nim compiler to depend on Nimble |
18:50:54 | FromDiscord | <konsumlamm> if you merge my `typetraits` PR, i'll look at it :P |
18:51:15 | leorize | I think packages should be a part of the compiler itself |
18:51:23 | FromDiscord | <konsumlamm> though i still don't have a definitive answer if the behaviour i expect is actually the intende behaviour |
18:52:05 | FromDiscord | <dom96> leorize: yes, quite possibly. But that's something to discuss with Araq et al. |
18:52:27 | FromDiscord | <dom96> I've fought a lot to have nimsuggest/nimpretty as a separate package |
18:52:58 | leorize | does Araq even have time? |
18:53:29 | FromDiscord | <dom96> @konsumlamm done π |
18:53:30 | saem | Having nimsuggest together is presently nicer as I find it's a much faster way to test the compiler frontend. |
18:53:46 | FromDiscord | <konsumlamm> <3 |
18:54:47 | leorize | @dom96 and since you are here, can you explain why you banned disruptek and disbot from #nim-news? |
18:55:16 | FromDiscord | <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:05 | FromDiscord | <dom96> leorize: he was banned for the same reason that he was banned here |
18:56:24 | leorize | dom96: something without loops? disruptek already demonstrated a bug where nimble loop forever trying to resolve dependency |
18:56:51 | leorize | dom96: and what would be that reason? and why does it apply to #nim-news? |
18:57:29 | leorize | he is not a troll, he make nim-news possible with his disbot |
18:58:26 | FromDiscord | <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:33 | FromDiscord | <haxscramper> Shouldn't it be an error instead of an infinite loop? I mean cycle detection for graphs can be implemented |
18:59:49 | FromDiscord | <haxscramper> I've run into this several times, it is really annoying |
19:00:28 | FromDiscord | <dom96> leorize: that may be, but he was banned by Araq. Have a look at the IRC logs for the reason. |
19:00:59 | leorize | I was there, and there were no explaination |
19:01:10 | leorize | the ban on #nim-news is your decision as far as I can see it |
19:01:17 | leorize | that's why I'm asking you |
19:01:41 | leorize | he his also banned from the forum despite no visible offense as well |
19:01:44 | leorize | is* |
19:02:42 | leorize | barring someone from the community should be a last resort |
19:03:05 | leorize | esp. someone that has contributed a lot to the community, you shouldn't ban them without an explaination |
19:04:01 | FromDiscord | <dom96> Araq gave an explanation here: https://irclogs.nim-lang.org/30-01-2021.html#12:16:08 |
19:04:06 | FromDiscord | <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:47 | FromDiscord | <konsumlamm> @dom96 |
19:07:48 | FromDiscord | <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:03 | FromDiscord | <dom96> For download counts we'd need to integrate something into Nimble |
19:08:28 | FromDiscord | <dom96> since Nimble is decentralised it can grab packages from github (or anywhere that supports git/hg) |
19:08:36 | FromDiscord | <dom96> so we don't know how much downloads a package gets |
19:09:25 | FromDiscord | <konsumlamm> i see... |
19:10:44 | FromDiscord | <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:00 | FromDiscord | <dom96> because as it turns out, having a centralised backup of all packages is actually not that bad of a thing π |
19:12:50 | FromDiscord | <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:24 | dom96 | hm, removing embeds triggers an edit. CC Yardanico |
19:17:34 | * | krux02 joined #nim |
19:22:14 | saem | Hmm, 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:27 | FromDiscord | <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:59 | FromDiscord | <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:21 | FromDiscord | <dom96> IIRC the headers you set on the client stay set |
19:29:32 | FromDiscord | <dom96> but just give it a test π |
19:29:36 | FromDiscord | <dom96> or have a look at the code |
19:30:12 | FromDiscord | <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:30 | FromDiscord | <haxscramper> @dom96 What 'search symbol in <packagename>' was mean to be? |
19:31:38 | * | def- quit (Quit: -) |
19:31:41 | FromDiscord | <Avatarfighter> Thanks dom |
19:32:22 | FromDiscord | <dom96> @haxscramper not sure what you mean, can you elaborate? |
19:32:41 | FromDiscord | <haxscramper> This one https://media.discordapp.net/attachments/371759389889003532/805520947813154856/unknown.png |
19:32:46 | ForumUpdaterBot | New 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:48 | FromDiscord | <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:30 | FromDiscord | <dom96> No idea, federico3? |
20:05:48 | * | liblq-dev quit (Quit: WeeChat 3.0) |
20:05:57 | FromDiscord | <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:21 | FromDiscord | <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:17 | FromDiscord | <inv> (edit) "it looks +- ok, but I would like to convert the template into something more generic-typed ... " added "without ``int``" |
20:07:25 | FromDiscord | <haxscramper> You can return `any` if you need this, though I'm not sure if I understand your problem |
20:08:08 | FromDiscord | <inv> I remember an article how someone did perl in Nim via templates. I want to do ~ something like that for APL |
20:08:57 | FromDiscord | <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:06 | FromDiscord | <inv> ===(a, b: seq): seq[bool]β΅===(a, b: non-seq): bool |
20:11:06 | FromDiscord | <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:42 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2NSC |
20:11:44 | FromDiscord | <haxscramper> is a valid prototype for proc type |
20:12:34 | FromDiscord | <inv> Do you mean I need to define kind of the function type? Did not get it, sorry |
20:13:22 | FromDiscord | <inv> ah, it is something in experemental |
20:14:15 | FromDiscord | <inv> Anyway, I see that everything works, except that I do not know how to define with (non-seq) type |
20:15:32 | FromDiscord | <haxscramper> ``func `===`(a, b: not seq): bool = discard`` |
20:16:18 | FromDiscord | <haxscramper> Will match for anything that is not a sequence |
20:16:28 | FromDiscord | <inv> ``not seq`` ? I did not know about it. Thank you. |
20:18:20 | FromDiscord | <lqdev> @inv `not T` where T is a type is a typeclass that matches any type except T |
20:20:44 | FromDiscord | <inv> nice, it works |
20:21:43 | FromDiscord | <inv> https://github.com/inv2004/knim |
20:22:05 | FromDiscord | <inv> but proc type looks interesting to check also |
20:22:11 | FromDiscord | <Meowx> How would I install a specific branch of a module using nimble? |
20:23:59 | FromDiscord | <inv> If I remember correct it is something like install package@tag |
20:24:23 | FromDiscord | <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:27 | FromDiscord | <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:30 | federico3 | @konsumlamm when the docs are generated successfully it should search for exported symbols |
21:23:51 | FromDiscord | <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:09 | FromDiscord | <konsumlamm> frederico3: i think you meant to reply to @haxscramper |
21:26:40 | FromDiscord | <Recruit_main707> is there any reason `inc` is not a temlate for `+=`? |
21:26:45 | FromDiscord | <Recruit_main707> template |
21:27:52 | FromDiscord | <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:12 | FromDiscord | <konsumlamm> C doesn't have operator overloading though, so for converting C to Nim, that shouldn't be a problem, or wdym? |
21:39:27 | FromDiscord | <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:19 | FromDiscord | <konsumlamm> seqs are by default initialized to @[] (i.e. the empty seq) |
21:40:47 | FromDiscord | <konsumlamm> or you mean a potentially non-existant key? |
21:41:00 | FromDiscord | <Kastor> Yes, sorry that's it |
21:41:50 | * | tane quit (Quit: Leaving) |
21:42:22 | FromDiscord | <konsumlamm> between the options you mentioned, i'd rather use `hasKey` |
21:43:05 | FromDiscord | <konsumlamm> though there are some procs to help with possibly non-existant keys |
21:46:06 | FromDiscord | <Kastor> I see, thanks for the help! |
21:46:30 | FromDiscord | <konsumlamm> specifically `mgetOrPut` should be helpful here |
21:46:32 | FromDiscord | <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:52 | FromDiscord | <haxscramper> And I guess this is the reason why it hasn't been implemented by default |
21:47:04 | FromDiscord | <konsumlamm> `table.mgetOrPut(myKey, @[]).add(item)` |
21:48:16 | FromDiscord | <konsumlamm> @Kastor |
21:56:21 | * | def- quit (Quit: -) |
21:57:26 | FromDiscord | <Recruit_main707> @konsumlamm c++ does |
21:57:32 | FromDiscord | <Recruit_main707> and c2nim supports c++ |
21:57:33 | * | def- joined #nim |
21:58:08 | FromDiscord | <haxscramper> I think that's because `inc` is `++` in C, not `+=` |
21:58:32 | FromDiscord | <konsumlamm> are you sure that it also happens for overloaded operators and not just for `int`? |
21:59:16 | FromDiscord | <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:26 | FromDiscord | <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:24 | saem | recruit do you mean the initializers? |
22:05:32 | * | Gustavo6046 quit (Ping timeout: 260 seconds) |
22:07:19 | FromDiscord | <konsumlamm> it's a constructor yes |
22:07:49 | FromDiscord | <Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=2NT7 |
22:08:40 | FromDiscord | <konsumlamm> yes, except the fields are called `P` and `D` |
22:09:59 | FromDiscord | <Recruit_main707> ah yes, my bad.β΅how would that look like, `P: V = points`? |
22:10:11 | FromDiscord | <Recruit_main707> or smthing idk π₯΄ |
22:11:28 | FromDiscord | <Recruit_main707> you are calling the V constructor and passing it points? |
22:14:08 | saem | It'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:31 | FromDiscord | <haxscramper> Is it possible to convert base type object to derived type? |
22:25:20 | FromDiscord | <Recruit_main707> i think so |
22:26:12 | FromDiscord | <haxscramper> I tried to do just `Derived(baseObj)` but got `ObjectConversionDefect` when doing so |
22:30:55 | FromDiscord | <ElegantBeef> @haxscramper no clue what you're doing but https://play.nim-lang.org/#ix=2NT9 |
22:33:13 | FromDiscord | <haxscramper> I basically want to do `let _ = B(A())` somehow |
22:33:41 | FromDiscord | <haxscramper> I have an instance of the base class, but want to convert it to derived |
22:33:57 | FromDiscord | <haxscramper> This compiles with your code but gives `invalid object conversion [ObjectConversionDefect]` |
22:34:14 | FromDiscord | <ElegantBeef> `if x of Derived: x.Derived` |
22:34:40 | FromDiscord | <ElegantBeef> It's inheritance you need to ensure the type is convertable before you attempt to convert it |
22:35:02 | saem | hax 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:45 | FromDiscord | <ElegantBeef> That object conversion defect is from attempting to convert to a type that object isnt actually in |
22:36:34 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=2NTb vs. https://play.nim-lang.org/#ix=2NTa |
22:36:46 | FromDiscord | <haxscramper> saem: yes. Though i suspect there is no way to do this because of reason pointed out by ^^^ |
22:37:28 | saem | I was going to say this sounds like "rub some macros on it" territory. |
22:37:37 | FromDiscord | <ElegantBeef> you could return an `Option[T]` or return nil if it's not derived |
22:38:04 | FromDiscord | <ElegantBeef> Since you should be using ref's for OOP either work |
22:38:11 | FromDiscord | <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:19 | FromDiscord | <haxscramper> it and added some fields |
22:38:33 | FromDiscord | <ElegantBeef> It's a ref object? |
22:38:35 | FromDiscord | <haxscramper> yes |
22:38:40 | FromDiscord | <haxscramper> `ref object of RootObj` |
22:40:00 | FromDiscord | <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:15 | FromDiscord | <haxscramper> without doing deep tree rewrite |
22:40:39 | FromDiscord | <ElegantBeef> Could just store your meta data in another object |
22:40:50 | FromDiscord | <ElegantBeef> What type of meta data are we after? |
22:41:06 | saem | only the best. |
22:41:50 | * | zedeus joined #nim |
22:44:54 | FromDiscord | <haxscramper> Links to some external entries. I can't exactly store this in the outside object. |
22:45:55 | FromDiscord | <haxscramper> I'm adding more information to AST in subsequent pass and need to store it somehow |
22:46:20 | FromDiscord | <haxscramper> Though maybe this is bad approach fundamentally |
22:46:48 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=2NTg |
22:47:54 | FromDiscord | <haxscramper> Well, yes it would be the easiest solution, but at this point it is more of an architectural issue |
22:48:15 | FromDiscord | <haxscramper> Though I can use forbidden technique |
22:48:18 | FromDiscord | <haxscramper> `data: pointer` |
22:48:19 | FromDiscord | <ElegantBeef> I was just kidding, not actually suggesting it |
22:50:18 | FromDiscord | <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) |