00:01:07 | FromDiscord | <MegaIng (MegaIng)> Aha, then I wrote a to generalized example from my actual problem. I tried that but it didn't work in my actual code. |
00:01:47 | FromDiscord | <Elegantbeef> Do you have you real code somewhere, i dont mind self abuse |
00:02:20 | FromDiscord | <MegaIng (MegaIng)> Nah, I am currently in the early stages of starting to develop this and wanted to directly have sensible type definitions |
00:03:40 | FromDiscord | <Elegantbeef> If you want me to take a look throw the type defs in a file and share it, otherwise cant say much, probably just generic cache being drunk |
00:03:56 | FromDiscord | <Elegantbeef> There is a non zero chance i'm the reason it's not working, i've caused issues before 😛 |
00:04:21 | * | src quit (Quit: Leaving) |
00:04:42 | FromDiscord | <MegaIng (MegaIng)> This is it |
00:04:44 | FromDiscord | <MegaIng (MegaIng)> sent a code paste, see https://play.nim-lang.org/#ix=3ICK |
00:04:55 | FromDiscord | <MegaIng (MegaIng)> Well, no that is not the actual code |
00:05:01 | FromDiscord | <MegaIng (MegaIng)> But this is no very very close |
00:05:36 | FromDiscord | <MegaIng (MegaIng)> E.g. I want a linked list of arrays of some kind |
00:06:24 | FromDiscord | <MegaIng (MegaIng)> And either way I order the object/ref it throws an error |
00:06:39 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ICL |
00:07:19 | FromDiscord | <MegaIng (MegaIng)> That does in fact work as a workaround |
00:07:25 | FromDiscord | <MegaIng (MegaIng)> Why didn't I think of that? |
00:07:40 | FromDiscord | <Elegantbeef> You dont have a degree in workaroundology? |
00:07:58 | FromDiscord | <Elegantbeef> It very much sounds like a generic cache issue so i'd suggest making an issue on the github repo if you have the time |
00:08:09 | FromDiscord | <Elegantbeef> Though i imagine one already exists |
00:08:43 | FromDiscord | <MegaIng (MegaIng)> Could very well be, I had no clue what words to search for. But I will try again |
00:15:15 | FromDiscord | <huantian> Is it possible for two procs to be mutually recursive? |
00:18:43 | FromDiscord | <Elegantbeef> Yes |
00:18:50 | FromDiscord | <Elegantbeef> Forward declare both and voila |
00:19:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ICM |
00:19:33 | FromDiscord | <Elegantbeef> Really mutually recursive procs there |
00:21:38 | FromDiscord | <huantian> cool beans |
00:25:35 | FromDiscord | <Yardanico> seems like i found an oob bug in httpclient, nice |
00:25:51 | FromDiscord | <Yardanico> some web server replies with headers in a very weird way but both browser and curl seem to be happy with it |
00:31:05 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/issues/19261 |
00:36:40 | * | arkurious quit (Quit: Leaving) |
01:07:45 | FromDiscord | <Yardanico> this goddamn http header mess |
01:33:18 | * | kayabaNerve quit (Remote host closed the connection) |
01:54:56 | FromDiscord | <valerga> just now I missed nims feature of x.func vs func(x) format, in javascript |
01:55:15 | FromDiscord | <valerga> it would be useful. only way I see is changing the dom element's prototype and eh |
01:55:30 | FromDiscord | <Yardanico> In reply to @Yardanico "https://github.com/nim-lang/Nim/issues/19261": https://github.com/nim-lang/Nim/pull/19262 |
01:55:34 | FromDiscord | <Elegantbeef> Yep it's a wonderful thing, i especially miss it looking at C# 😀 |
01:55:50 | FromDiscord | <Yardanico> so the root issue is that httpclient doesn't really follow the spec and just finds the `:` in a line to find the header name |
02:50:37 | * | lumo_e quit (Quit: Quit) |
03:14:43 | * | zacts joined #nim |
03:14:57 | zacts | hi #nim |
03:15:27 | nrds | <Prestige99> hey zacts |
03:48:35 | NimEventer | New question by How2: Pythonic pip freeze in Nim or how to list installed packages?, see https://stackoverflow.com/questions/70388197/pythonic-pip-freeze-in-nim-or-how-to-list-installed-packages |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:31 | * | supakeen joined #nim |
04:15:36 | * | rockcavera quit (Remote host closed the connection) |
04:50:10 | * | noeontheend joined #nim |
05:58:32 | FromDiscord | <Yardanico> i don't get these questions |
05:58:38 | FromDiscord | <Yardanico> is it just asking for the sake of answerring? |
05:58:45 | FromDiscord | <Yardanico> i can make tens of those on SO too 🤔 |
06:07:03 | * | bkay quit (Ping timeout: 256 seconds) |
06:07:57 | FromDiscord | <valerga> who is How2? |
06:08:02 | FromDiscord | <valerga> looks useful though |
06:08:38 | FromDiscord | <Phytolizer> Can I include a string at compile time, like Rust's `include_str!("file.txt");`? |
06:08:58 | FromDiscord | <Elegantbeef> `const a = staticRead("file.txt")` |
06:09:03 | FromDiscord | <Phytolizer> staticRead, thank you :) |
06:19:58 | * | kayabaNerve joined #nim |
06:22:57 | * | noeontheend quit (Ping timeout: 240 seconds) |
07:11:55 | FromDiscord | <reilly> Is there a meaningful difference between `type SomeRange = 0..127` and `type SomeRange = range[0..127]`? |
07:13:06 | FromDiscord | <Elegantbeef> The former is the latter |
07:26:51 | FromDiscord | <Rika> You could have said that they were the same |
07:27:10 | FromDiscord | <Elegantbeef> Riddles i must speak in |
07:27:24 | FromDiscord | <Yardanico> woof woof |
07:27:29 | FromDiscord | <Yardanico> meow meow |
07:39:05 | FromDiscord | <reilly> Is there a convenient way of `sleep()`ing until the beginning of the following day? (i.e. the time is 7:53pm, so sleep for 4 hours and 7 minutes.) |
07:39:50 | FromDiscord | <reilly> I already have a way of doing it that works, but it seems to me like a silly way of doing it. Surely there must be a better way. |
07:53:24 | FromDiscord | <Elegantbeef> How are you doing it presently? |
07:56:33 | FromDiscord | <Rika> How precise do you need it to be |
08:09:53 | FromDiscord | <reilly> In reply to @Rika "How precise do you": Precision isn't very important. I'm happy as long as it triggers no earlier than 12am on any given day. |
08:10:27 | FromDiscord | <reilly> Ideally within the first minute would be nice, though :P |
08:12:42 | FromDiscord | <Yardanico> have you considered using the OS facilities for that? |
08:12:46 | FromDiscord | <Yardanico> like systemd timers or cron |
08:16:26 | FromDiscord | <reilly> In reply to @Elegantbeef "How are you doing": `format(now + 24.hours, "yyyy-MM-dd").parse("yyyy-MM-dd") - now` - Basically, I format then re-parse the DateTime so that all the time information I don't need is discarded, and I end up with a DateTime that effectively represents "Tomorrow at 12am." Like I said, a silly way of doing it, but it is a one-line expression. |
08:18:21 | FromDiscord | <reilly> In reply to @Yardanico "have you considered using": I haven't, but that seems like overkill for this silly little thing I'm doing. The only reason I ask, really, is because this isn't the first time I've wanted to sleep() until the very beginning of the next day. Ideally I'd like to be able to write down a convenient way of doing it that I can use later, when I need to do it again, just in case. |
08:18:41 | FromDiscord | <Yardanico> I don't really think it's silly, it's actually smart IMO :) |
08:18:52 | FromDiscord | <Rika> I think it’s the best way |
08:18:56 | FromDiscord | <Yardanico> it's much easier from the developing standpoint to just use existing mechanisms |
08:19:02 | FromDiscord | <Yardanico> and it will work across reboots and stuff |
08:19:03 | FromDiscord | <Rika> Without relying on OS I mean |
08:20:00 | FromDiscord | <Yardanico> first you write some scheduling stuff, next you make scripts to autostart your program on reboot, and in the end you have an init system :D |
08:20:35 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3IE7 i suppose is what you're really doing |
08:20:42 | FromDiscord | <reilly> sent a long message, see http://ix.io/3IE8 |
08:21:02 | FromDiscord | <Yardanico> well that's just my opinion, it just seems a bit weird to me to `sleep` for hours in a program |
08:21:11 | FromDiscord | <Yardanico> instead of using some scheduling to launch it when needed |
08:23:44 | FromDiscord | <reilly> It's not a "real" program that I'll actually be running, it's just a silly little script, so I feel like in this case it's better to just have a ludicrously long sleep time than to go through the trouble of doing it the better way just for a joke script that I'll never actually run. |
08:24:56 | FromDiscord | <narimiran> Nim 1.6.2 is out!! https://nim-lang.org/blog/2021/12/17/version-162-released.html |
08:24:58 | FromDiscord | <Yardanico> In reply to @reilly "It's not a "real"": and what if you reboot? |
08:25:00 | NimEventer | New thread by Miran: Nim 1.6.2 released, see https://forum.nim-lang.org/t/8717 |
08:25:03 | FromDiscord | <Yardanico> In reply to @narimiran "Nim 1.6.2 is out!!": so fast after rc? |
08:25:04 | FromDiscord | <Yardanico> interesting |
08:26:24 | FromDiscord | <reilly> In reply to @Yardanico "and what if you": Maybe I could do a better job of explaining why I don't care about doing it the right way if you just see it: https://play.nim-lang.org/#ix=3IE9 |
08:28:12 | FromDiscord | <reilly> Like I said, a silly little script. I can't imagine that anybody would run this for more than three seconds, if at all. It's about the festive spirit, not the functionality :P |
08:29:34 | FromDiscord | <Rika> Well at least now you know what to do when you need to do it in a serious program |
08:33:30 | FromDiscord | <reilly> If I really wanted a task to run periodically in the real world, there's no way I'd do it the sleep() way. I hate useless windows cluttering up my taskbar... I get annoyed enough already using a Fidget window to render a background for OBS. |
08:34:06 | FromDiscord | <Rika> Why do you use a- you know what you do you |
08:34:28 | FromDiscord | <Elegantbeef> Got it done without deprecation warnings 😛 https://play.nim-lang.org/#ix=3IEb |
08:36:34 | FromDiscord | <reilly> In reply to @Rika "Why do you use": Because I want fancy procedurally-animated backgrounds in OBS, and I want to be able to write them quickly and easily. Doesn't get much easier than just drawing basic 2d shapes... |
08:36:46 | FromDiscord | <Rika> Oh so you’re like me except more sane |
08:36:57 | FromDiscord | <Rika> I was planning on manually doing everything via pixie |
08:37:28 | FromDiscord | <Rika> I’ve got some ideas that I don’t think would fit fidget |
08:37:56 | FromDiscord | <Elegantbeef> Reilly have you ever seen nanim? https://github.com/EriKWDev/nanim might be something you like |
08:38:03 | FromDiscord | <reilly> I may do something more elaborate in Pixie someday, but I haven't written any new backgrounds in a long time and I you can go a long way with circles and some post-processing FX. |
08:39:13 | FromDiscord | <reilly> In reply to @Elegantbeef "Reilly have you ever": I have, haven't gotten around to giving it a spin yet though. The last time I wrote one of these backgrounds I'm talking about was 7 months and 24 days ago, so it hasn't exactly been a priority. |
08:39:39 | FromDiscord | <Elegantbeef> Ah was just asking since it seems similar to what you described 😀 |
08:41:09 | FromDiscord | <Rika> Oh yeah that I forgot |
08:41:13 | FromDiscord | <Rika> Might use that as well |
08:41:35 | FromDiscord | <reilly> For simple stuff like what I've done, I prefer the obvious, procedural syntax that Fidget lets me use. But, if I were to do something more serious and/or elaborate, I'd probably go with Pixie or Nanim. |
08:42:01 | FromDiscord | <Rika> Yeah my plans are kinda stupid wrt. my overlay haha |
08:42:03 | FromDiscord | <reilly> But I have no interest in making more stuff like that at the moment :P |
08:44:53 | FromDiscord | <reilly> Fidget is good enough for when you just want a little bit of eye candy: https://youtu.be/UUmRA1PmE-8 |
08:49:07 | FromDiscord | <Rika> Is that max? |
08:49:28 | FromDiscord | <Rika> Looks dope the bg |
08:52:47 | FromDiscord | <reilly> Bitwig actually, I've taken a peek at Puredata and I dislike the UX... Max, while not exactly the same, I'd wager would be a similar story. It'd only be worth it using if it was Max4Live-flavored, as the standalone Max would be pretty useless to me. |
08:53:02 | FromDiscord | <reilly> (edit) "actually," => "actually!" | "actually!I've taken a peek at Puredata ... and" added "before" |
08:53:22 | FromDiscord | <reilly> (edit) "This is Bitwig actually! I've taken a peek at Puredata before and I dislike the UX... Max, while not exactly the same, I'd wager would be a similar story. It'd only be worth ... it" added "using" | removed "using" |
08:53:45 | FromDiscord | <Rika> Max afaik is the proprietary brother so technically it should be nicer |
08:53:54 | FromDiscord | <Rika> I’ll look into bitwig though since damn |
08:56:32 | FromDiscord | <reilly> Bitwig and U-He have been working on a new audio plugin format (https://github.com/free-audio/clap), and all I'm going to say is that if one were to create an idiomatic Nim wrapper/interface for this library, that would be a serious game changer. |
08:59:34 | FromDiscord | <Rika> Do you not want to try making it? |
08:59:50 | FromDiscord | <Elegantbeef> Cmon reilly change the game |
09:00:40 | FromDiscord | <Rika> I mean if I do get super interested I’ll try but I don’t think I will |
09:00:47 | FromDiscord | <reilly> I would like to, but I don't have nearly a good enough understanding of C to work it out, at least not on my own. |
09:00:50 | FromDiscord | <valerga> is this to replace vst? |
09:00:55 | FromDiscord | <Rika> Let’s say 5% probability I do make such |
09:01:06 | FromDiscord | <Rika> In reply to @reilly "I would *like* to,": You could just ask I guess |
09:01:11 | FromDiscord | <Rika> Some of us do |
09:01:15 | FromDiscord | <reilly> Besides, the format is still in the works, so you can forget about doing it until it's properly codified. |
09:01:30 | FromDiscord | <Rika> In reply to @reilly "Besides, the format is": Can always just change it once the thing is codified |
09:01:36 | FromDiscord | <Rika> Shouldn’t be too hard I assume |
09:01:40 | FromDiscord | <Elegantbeef> Well the best way to learn that information is you just try then hit the wall |
09:01:57 | FromDiscord | <reilly> In reply to @valerga "is this to replace": I don't think it will, but I wish it would. I think everybody's pretty sick of Steinberg's proprietary crap. |
09:02:09 | FromDiscord | <Rika> In reply to @Elegantbeef "Well the best way": C does bite back really hard and often though |
09:02:36 | FromDiscord | <Rika> In reply to @reilly "I don't think it": If only LV2 did huh |
09:02:44 | FromDiscord | <Rika> 14 competing standards |
09:04:43 | FromDiscord | <reilly> Actually, no, you know what? I have a better answer. |
09:05:20 | FromDiscord | <Rika> ? Let’s hear it |
09:06:38 | FromDiscord | <reilly> Based on statements from U-He, it appears to be the case that, while CLAP is a standalone format, it can be translated and/or interfaced with in such a way that it would be relatively easy to write your plugin using CLAP and then compile/bundle it in the VST format. |
09:06:45 | FromDiscord | <Elegantbeef> Prefixed questions Rika is using Lisp english edition |
09:07:19 | FromDiscord | <reilly> LV2, by contrast, is from my understanding intended to be a replacement for VST, which realistically isn't going to happen, at least not anytime soon. |
09:07:31 | FromDiscord | <Rika> Sorry, my native language is VSO |
09:08:26 | FromDiscord | <Rika> Or do you refer to something else |
09:08:36 | FromDiscord | <Rika> The question mark? |
09:09:03 | FromDiscord | <Elegantbeef> Yes |
09:09:19 | FromDiscord | <Elegantbeef> You prefixed the question with the `?` operator 😛 |
09:09:43 | FromDiscord | <Rika> Okay |
09:10:05 | * | jmdaemon quit (Ping timeout: 256 seconds) |
09:19:38 | FromDiscord | <valerga> wew new nim release |
09:19:44 | FromDiscord | <valerga> found out via HN |
09:20:57 | FromDiscord | <Yardanico> In reply to @valerga "wew new nim release": #announcements |
09:21:00 | FromDiscord | <Yardanico> #community-events |
09:21:02 | FromDiscord | <Yardanico> in this chat a bit up |
09:21:10 | FromDiscord | <Yardanico> on the forum, on reddit, on the website :) |
09:21:33 | FromDiscord | <Yardanico> it's a minor patch release though |
09:22:05 | * | SebastianM joined #nim |
09:38:44 | * | SebastianM quit (Quit: Bye) |
10:28:07 | FromDiscord | <dom96> I think it's time someone creates a drinking game based on HN comments 😄 |
10:28:50 | FromDiscord | <Yardanico> oh wow, 51 points so fast |
10:29:04 | FromDiscord | <dom96> it'll get killed as soon as one of the mods wakes up |
10:29:33 | FromDiscord | <dom96> but it seems our timing was good |
10:32:49 | FromDiscord | <dom96> "transpiles" 🥃 |
10:34:22 | FromDiscord | <valerga> python 🍹 |
10:35:27 | FromDiscord | <amadan> s_t_y_l_e_i_n_s_e_n_s_i_t_i_v_e 🍷 |
11:06:42 | * | arkurious joined #nim |
11:09:44 | FromDiscord | <hmmm> oh wehw we on hn? |
11:10:00 | FromDiscord | <Yardanico> In reply to @hmmm "oh wehw we on": every Nim release is on HN |
11:10:04 | FromDiscord | <Yardanico> (edit) "In reply to @hmmm "oh wehw we on": every ... Nim" added "new" |
11:14:24 | FromDiscord | <hmmm> "why would I care about nim there is a ton of different langs already" if these frigging plebs cannot see a no benefit in a typed python that is not slow as an old whale I guess the joke is on them |
11:27:50 | FromDiscord | <hmmm> do hn people really believe people write nim programs L_i_K_e_T_h_i_S |
11:29:26 | FromDiscord | <Yardanico> In reply to @hmmm "do hn people really": yes |
11:29:29 | FromDiscord | <Yardanico> have you seen my nim code yet? |
11:29:37 | FromDiscord | <el__maco> Extra snake mode ftw |
11:29:49 | FromDiscord | <Yardanico> https://raw.githubusercontent.com/Yardanico/nuglifier/master/example_output/example_case.nim |
11:29:58 | FromDiscord | <Yardanico> my usual nim code style |
11:30:03 | FromDiscord | <hmmm> lol |
11:30:14 | FromDiscord | <Yardanico> (it compiles btw) |
11:30:40 | FromDiscord | <el__maco> such a boomer joke but they should allow l33t code in symbol names too |
11:31:24 | FromDiscord | <dom96> !eval var 💬 = "Hello"; echo(💬) |
11:31:26 | NimBot | Hello |
11:31:38 | FromDiscord | <valerga> `iN_PuT[0]` |
11:31:38 | FromDiscord | <dom96> No need for l33t code when you've got emojis |
11:32:44 | FromDiscord | <Yardanico> In reply to @valerga "`iN_PuT[0]`": people sometimes forget that cAsE_InSeNsItIvI_tY applies to keywords too btw |
11:32:53 | FromDiscord | <Yardanico> but fear not, nim got you covered |
11:32:58 | FromDiscord | <Rika> In reply to @hmmm ""why would I care": Well why would I care about go or zig or rust it’s really the same thing |
11:33:12 | FromDiscord | <Rika> It’s just that the value of what Nim offers isn’t immediately appreciable versus the others |
11:34:14 | FromDiscord | <Solitude> marketable buzzword has not arrived |
11:35:44 | * | SebastianM joined #nim |
11:35:45 | FromDiscord | <hmmm> man I've tried rust for just 5 minutes so I'm far from an authority but cannot fathom how people got enough stomach to deal with that robo verbose sythax |
11:35:59 | FromDiscord | <hmmm> I still have a cargo folder from the tutorial laying somewhere |
11:36:29 | FromDiscord | <valerga> saying nim is typed python is short selling it. nim features a bunch of genius experimental ideas that i haven't seen in other languages |
11:36:56 | FromDiscord | <Rika> In reply to @valerga "saying nim is typed": Keyword is experimental; people don’t like stuff that is weird and experimental and unorthodox even if it’s a good idea |
11:36:59 | FromDiscord | <Rika> People don’t like change |
11:37:10 | FromDiscord | <Solitude> In reply to @hmmm "man I've tried rust": you're no better than hn posters then |
11:37:17 | FromDiscord | <hmmm> for sure lol |
11:37:27 | FromDiscord | <valerga> experimental/modern |
11:37:40 | FromDiscord | <valerga> it's a modern language |
11:39:43 | FromDiscord | <Rika> Rust is cool, I don’t like how much people are seemingly overhyping it though |
11:40:33 | FromDiscord | <Yardanico> yeah, memory safety is all cool and good but there are tons of other problems with security in apps |
11:42:15 | FromDiscord | <valerga> i studied rust for some months |
11:42:24 | FromDiscord | <valerga> got hyped, even listened to podcasts about it |
11:42:33 | FromDiscord | <valerga> wrote some programs in it |
11:42:42 | FromDiscord | <valerga> but discovering nim was like loosing out a tight belt |
11:43:00 | FromDiscord | <valerga> small things, even "echo x" is a lot easier |
11:43:10 | FromDiscord | <Rika> In reply to @Yardanico "yeah, memory safety is": And if you want to argue, rust goes against some issues such as those that are caused by readability |
11:43:22 | FromDiscord | <Rika> And yeah ease of use |
11:44:01 | FromDiscord | <Rika> I don’t like people who treat a language (even if it’s Nim) as a fixes-everything kind of godlike entity |
11:44:25 | FromDiscord | <Rika> And rust is just egregious with the amount of people within their religion |
11:45:07 | FromDiscord | <hmmm> I mean....wtf is this lol https://media.discordapp.net/attachments/371759389889003532/921367401675759636/wtf.png |
11:46:45 | FromDiscord | <Yardanico> a screenshot |
11:47:22 | FromDiscord | <Rika> An image |
11:47:28 | FromDiscord | <dom96> A Portable Network Graphics |
11:48:58 | FromDiscord | <valerga> nim's rust backend when |
11:49:05 | FromDiscord | <dom96> never |
11:49:40 | FromDiscord | <valerga> is it possible though? |
11:49:52 | FromDiscord | <dom96> of course |
11:57:31 | FromDiscord | <Rika> It’s just too different and hard to generate for |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
12:11:47 | * | smintheus joined #nim |
12:27:35 | * | SebastianM quit (Quit: Bye) |
13:06:48 | * | smintheus quit (Quit: leaving) |
13:18:38 | FromDiscord | <tandy> what would be the point↵(@valerga) |
13:18:42 | FromDiscord | <tandy> zig backend however..... |
13:32:12 | FromDiscord | <Yardanico> In reply to @tandy "zig backend however.....": what's the point? the same question as you asked |
13:32:46 | FromDiscord | <Yardanico> zig targets llvm ir anyway, and if you only need cross compilation from zig, zig cc is a thing |
13:42:13 | FromDiscord | <tandy> joke↵(@Yardanico) |
13:42:24 | FromDiscord | <Yardanico> You never know these days |
13:42:29 | FromDiscord | <tandy> lool |
13:42:41 | FromDiscord | <tandy> zig truthers |
13:42:46 | FromDiscord | <Rika> i mean |
13:42:50 | FromDiscord | <Rika> theyre all wonderful languages |
13:43:00 | FromDiscord | <Rika> its just that my opinions sway me towards nim the most |
13:45:27 | FromDiscord | <tandy> tbh if zig replaced c that would b cool |
13:45:47 | FromDiscord | <Rika> ~~tbh if nim replaced c that would b cool~~ |
14:00:58 | FromDiscord | <el__maco> ~~c would still continue to exist because of the c backend~~ |
14:25:23 | FromDiscord | <ynfle (ynfle)> The point could be easier cross compilation |
14:26:04 | FromDiscord | <Yardanico> In reply to @ynfle (ynfle) "The point could be": zig cc |
14:33:27 | FromDiscord | <AmjadHD> Is there an official grammar for nim configuration files (nim.cfg) ? |
14:38:07 | * | SebastianM joined #nim |
14:53:04 | * | rockcavera joined #nim |
14:53:04 | * | rockcavera quit (Changing host) |
14:53:04 | * | rockcavera joined #nim |
14:56:11 | NimEventer | New thread by Rnd83: How can I convert a generic Type?, see https://forum.nim-lang.org/t/8718 |
15:09:20 | FromDiscord | <Saptak> which c compiler does nim ship with? |
15:14:33 | FromDiscord | <Recruit_main707> iirc with none, but after installing nim you run finish.exe and it will search for mingw in your path and if it cannot find it it will install it |
15:16:33 | FromDiscord | <GeeLeonidas> has anyone tried wrap tons of headers via futhark? |
15:18:04 | FromDiscord | <GeeLeonidas> I'm trying to wrap libnx, but some functions don't appear inside the generated .nim file |
15:18:14 | FromDiscord | <GeeLeonidas> (edit) "wrap" => "wrapping" |
15:21:01 | FromDiscord | <GeeLeonidas> I'm thinking about opening an issue but I'm not certain if this is futhark's fault |
15:23:27 | FromDiscord | <Recruit_main707> do they use macros and does futhark support them? |
15:30:27 | FromDiscord | <demotomohiro> In reply to @Saptak "which c compiler does": nim is not shipped with c compiler. |
15:30:57 | FromDiscord | <demotomohiro> On linux, package manager automatically install gcc before installing nim |
15:31:48 | FromDiscord | <demotomohiro> And Nim just call gcc when compiling |
15:32:07 | FromDiscord | <GeeLeonidas> In reply to @Recruit_main707 "do they use macros": they do use, but after looking into futhark's cache it seems that it can understand them |
15:33:13 | FromDiscord | <GeeLeonidas> interestingly, if I switch a header's position, some of these functions become avaiable |
15:36:23 | FromDiscord | <GeeLeonidas> I would guess that futhark is ignoring functions with unknown types, but maybe I'm missing something here |
15:36:49 | FromDiscord | <GeeLeonidas> (edit) "unknown" => "not yet wrapped" |
15:40:26 | * | SebastianM quit (Quit: Bye) |
15:43:37 | FromDiscord | <Saptak> In reply to @demotomohiro "nim is not shipped": Ok |
15:43:42 | FromDiscord | <Saptak> In reply to @Recruit_main707 "iirc with none, but": Ok |
15:44:13 | FromDiscord | <enthus1ast> on windows i normally use msys2 to install a recent gcc |
15:44:28 | FromDiscord | <enthus1ast> mingw/gcc |
16:50:05 | * | noeontheend joined #nim |
16:56:45 | * | jmdaemon joined #nim |
17:03:27 | * | SebastianM joined #nim |
17:30:13 | * | noeontheend quit (Ping timeout: 240 seconds) |
17:42:55 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3IGv |
17:46:53 | FromDiscord | <geekrelief> Hmm I guess I can use `{.noinit.}` on the proc. |
17:46:57 | * | SebastianM quit (Read error: Connection reset by peer) |
17:47:10 | * | SebastianM joined #nim |
17:47:24 | * | src joined #nim |
17:47:31 | arkanoid | I have a question about iterator. I know there are closure iterator, inline iterators, but there are also non inlined but non-closure iterators? |
17:47:49 | * | SebastianM quit (Client Quit) |
17:54:16 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3IGz |
18:18:48 | NimEventer | New thread by Xioren: What am I missing here? (async), see https://forum.nim-lang.org/t/8719 |
18:24:00 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
18:36:35 | * | def- quit (Quit: -) |
18:38:46 | ozzz | Hi! Does asan and tsan supported in Nim? I tried, only able to exec binary with asan. |
18:39:49 | * | def- joined #nim |
18:45:48 | FromDiscord | <hmmm> hey how do I use a fusion package, is fusion auto imported? |
18:46:03 | FromDiscord | <IsaacPaul> In reply to @ozzz "Hi! Does asan and": https://pewpewthespells.com/blog/using-sanitizers-with-nim.html ? |
18:46:07 | FromDiscord | <IsaacPaul> maybe that helps |
18:46:36 | ozzz | IsaacPaul, thanks! |
18:49:52 | FromDiscord | <Solitude> In reply to @hmmm "hey how do I": like any other nimble package |
18:50:01 | FromDiscord | <hmmm> yea I found it on nimble |
18:50:37 | FromDiscord | <hmmm> but still the import doesn't work in standalone you have to import the single package like in my case import fusion/iotools |
18:51:02 | FromDiscord | <Solitude> what |
18:51:07 | FromDiscord | <hmmm> or not.. |
18:51:10 | FromDiscord | <hmmm> yea it doesn't work |
18:51:45 | FromDiscord | <hmmm> but still how do I use it, if I just import fusion I get an error 😦 |
18:52:09 | FromDiscord | <Solitude> ? |
18:52:16 | FromDiscord | <hmmm> hmmmmmmm |
18:52:20 | FromDiscord | <hmmm> I'm confus'd |
18:52:28 | FromDiscord | <Solitude> https://github.com/nim-lang/fusion/tree/master/src/fusion |
18:52:32 | FromDiscord | <Solitude> fusion is collection of packages |
18:53:09 | FromDiscord | <hmmm> oh shi it's not iotools it's ioutils lol |
18:53:44 | FromDiscord | <hmmm> perfect it works! |
18:58:02 | FromDiscord | <dom96> @ajusa looks like your article is on HN front page |
19:00:54 | NimEventer | New thread by Nimnewbie1: Memory safety suggestions will this work, see https://forum.nim-lang.org/t/8720 |
19:06:23 | FromDiscord | <hmmm> In reply to @dom96 "<@!102899813149855744> looks like your": as a total webstuff noob, that's impressive to me, karax and jester do a lot of heavy lifting with a few simple lines needed 👀 |
19:06:38 | * | Robin[m]123 joined #nim |
19:08:54 | FromDiscord | <dom96> the beauty of DSLs 🙂 |
19:09:58 | FromDiscord | <ajusa> In reply to @dom96 "<@!102899813149855744> looks like your": Oh wow second time in my life I've been on the first page of HN 😄 |
19:14:19 | FromDiscord | <ajusa> But this sort of content is popular/useful, I'll keep writing this sort of stuff when I'm free. Showing off a small project will probably get more people to try Nim |
19:14:30 | FromDiscord | <ajusa> (edit) "But ... thisseems" added "since" | "is" => "seems to be" |
19:14:44 | FromDiscord | <dom96> yep, blog articles are one of the best ways to promote Nim |
19:16:46 | FromDiscord | <hmmm> I'm eagerly waiting for the video series of "How to build the entire python standard library with 16 lines of nim sequtils" |
19:17:21 | * | Robin[m]123 left #nim (#nim) |
19:18:25 | FromDiscord | <konsumlamm> honestly, sequtils is overhyped |
19:18:43 | FromDiscord | <hmmm> do we have better stuff than sequtiles? 👀 |
19:20:25 | FromDiscord | <treeform> I like sequtiles |
19:20:58 | Zevv | zerofunctional |
19:24:00 | FromDiscord | <konsumlamm> sequtils returns a new seq for everything, which is pretty inefficient |
19:24:42 | FromDiscord | <konsumlamm> i'd like it if it worked on iterators, but even then i'd think it's overhyped, since every modern language has something comparable |
19:39:29 | * | neurocyte0132889 joined #nim |
19:39:29 | * | neurocyte0132889 quit (Changing host) |
19:39:29 | * | neurocyte0132889 joined #nim |
19:45:11 | * | jkl1337 quit (Quit: Gone.) |
19:46:32 | * | jkl joined #nim |
19:47:51 | FromDiscord | <reilly> In reply to @hmmm "I mean....wtf is this": Where did you get this from? |
19:49:46 | FromDiscord | <hmmm> In reply to @reilly "Where did you get": Side-by-side code snippets from Rosetta Code for comparing 2 languages: https://rosetta.fiatjaf.com/ |
19:50:18 | FromDiscord | <reilly> Fantastic, thank you |
19:53:20 | FromDiscord | <Kermithos> sent a code paste, see https://play.nim-lang.org/#ix=3IH8 |
19:53:21 | FromDiscord | <Kermithos> Do I have to use Nil? |
19:54:07 | FromDiscord | <hmmm> nu you probably want to use std/options |
19:55:46 | Zevv | konsumlamm: that's why I mentioned zero-functional |
19:55:56 | Zevv | it's sequtils done right at the macro level |
19:56:11 | Zevv | https://github.com/zero-functional/zero-functional |
19:56:12 | FromDiscord | <Elegantbeef> Depends on the semantics for the typeof(x) you want |
19:56:31 | Zevv | "Functional style handling of sequences is awesome, and Nim is supposed to be fast and smart. Allocating new sequences on each method in a chain can be extremely wasteful and there are not a lot of technical reasons to punish functional style like that. |
19:56:35 | Zevv | This library can expand functional chains to simple loops fusing the method bodies one after another. It is still very experimental, but it shows that a purely metaprogramming approach can be used to optimize functional Nim code." |
19:57:14 | FromDiscord | <Elegantbeef> ZF is nice but i'd really be nice to see iterators in nim be chainable without external tooling |
19:57:30 | Zevv | yes, but we don't have that now, and we *do* have ZF now :) |
19:57:41 | FromDiscord | <Elegantbeef> I agree |
19:57:45 | Zevv | also, I know a way to chain iterators, but i'll not talk about that here |
19:58:58 | FromDiscord | <hmmm> Zev I recently discovered keepItIf from sequtils and found it amazing, is there a zerofunctional version of it |
19:59:03 | FromDiscord | <Elegantbeef> Well i think if iterators were allowed to take iterables but it turned them into generics, it'd solve the problem, though i didnt get that fully implemented |
19:59:43 | FromDiscord | <Elegantbeef> Iterables could be though as a static generic which i think could resolve the issue, though idk |
20:01:47 | Zevv | hmmm: I don't know, the semantics are quite different under the hood, ZF core job is trying to not allocate new seqs in a chain, so the regular filter() might prove just fine |
20:12:08 | * | vicfred joined #nim |
20:52:27 | * | nac joined #nim |
20:53:05 | * | SebastianM joined #nim |
20:54:55 | * | rockcavera quit (Remote host closed the connection) |
21:02:47 | FromDiscord | <that_dude> sent a code paste, see https://play.nim-lang.org/#ix=3IHB |
21:07:59 | * | SebastianM quit (Quit: Bye) |
21:18:30 | FromDiscord | <that_dude> Actually I think I got it |
21:18:30 | FromDiscord | <Elegantbeef> Why not do `x: proc`? |
21:18:46 | FromDiscord | <that_dude> First time I'm ever messing with macros |
21:19:25 | FromDiscord | <Elegantbeef> Sorry i guess you have to do `x: typed` |
21:19:25 | FromDiscord | <that_dude> Trying to get the typing right is hard for me lol |
21:19:51 | FromDiscord | <that_dude> Tbh there is so much I'm trying to keep track of that the idea of that was there once, and then slipped my mind |
21:20:19 | FromDiscord | <Elegantbeef> What are you trying to do anyway? |
21:33:33 | * | xet7 quit (Remote host closed the connection) |
21:34:31 | * | xet7 joined #nim |
21:39:30 | * | nrds quit (Remote host closed the connection) |
21:43:40 | * | nrds joined #nim |
21:57:43 | * | vicfred quit (Quit: Leaving) |
22:10:09 | FromDiscord | <JSONBash> reading that HN thread has really opened my eyes. Gotta make sure I am less dismissive of stuff I don't 'like', or I could end up looking like a fool lol |
22:12:03 | FromDiscord | <JSONBash> Also just a lesson to not add negativity to something I have no part in, whats the use? |
22:13:18 | nrds | <Prestige99> What HN thread? |
22:13:38 | FromDiscord | <JSONBash> There is one on Nim 1.6.x release |
22:14:11 | nrds | <Prestige99> ah https://news.ycombinator.com/item?id=29589436 |
22:22:24 | FromDiscord | <Sabena Sema> if you use a generic multiple times i. the same module but different uses imply different bindings for open symbols will the compiler pick the first like in c++ or actually emit (and mangle differently) each variation? |
22:23:13 | FromDiscord | <Elegantbeef> It should use the first since it adds to the generic cache |
22:26:45 | * | lumo_e joined #nim |
22:27:21 | FromDiscord | <Sabena Sema> even across modules or no? |
22:27:30 | FromDiscord | <Elegantbeef> Should also across modules |
22:27:44 | FromDiscord | <Elegantbeef> You can always try it with a compile time counter |
22:27:48 | FromDiscord | <Sabena Sema> if yes that seems like it could cause breakage, since non-dependent symbols can be open easily |
22:27:51 | FromDiscord | <Sabena Sema> hmm |
22:27:52 | FromDiscord | <Sabena Sema> yeah |
22:28:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3IHN |
22:28:39 | FromDiscord | <Sabena Sema> the more I think about this stuff the more I warm to Ada’s “you gotta explicitly instantiate and name generics” |
22:29:18 | FromDiscord | <Sabena Sema> could also have an open symbol in there that prints different things at each point of instantiation |
22:45:10 | * | Pyautogui joined #nim |
22:54:56 | Pyautogui | About https://forum.nim-lang.org/t/8558, would it be easier to write a "skin" that removes curly braces around indented blocks as opposed to writing a full parser? Maybe a -d:curlyBraces flag. The syntax would be exactly the same otherwise (enforced whitespace, etc). Ignore this question if this question is dumb. Like |
22:54:56 | Pyautogui | https://play.nim-lang.org/#ix=3IHS excepted automated instead of commented. |
23:03:17 | FromDiscord | <Elegantbeef> Eh `{}` is used for sets, and table constructors so there can be ambiguity |
23:04:28 | FromDiscord | <Elegantbeef> `let a = if true: {someVal} else: {0}` vs. `let a = if true: {{someVal}} else: {{0}}` |
23:04:42 | * | krux02 joined #nim |
23:06:07 | Pyautogui | What about only allowing it for multi-line stuff? Might be inconsistant, but I really think that enough people like that sort of syntax (idc about it) that it would be worth it. |
23:08:23 | FromDiscord | <Elegantbeef> if whitespace significance is a spooky demon, just make your editor render scope |
23:08:24 | FromDiscord | <leorize> or make `end` an actual thing in nim \:p |
23:12:01 | * | Pyautogui quit (Quit: Connection closed) |
23:12:01 | FromDiscord | <Elegantbeef> Aw damn blockman doesnt work with nim |
23:45:29 | * | pippin joined #nim |
23:57:50 | FromDiscord | <spazzy> what causes this https://media.discordapp.net/attachments/371759389889003532/921551793249452032/unknown.png |
23:58:27 | FromDiscord | <spazzy> i have two different linux installs, one void one arch, and the void one gives an os error |
23:58:34 | FromDiscord | <spazzy> for some reason |
23:59:03 | FromDiscord | <Elegantbeef> Hard to say without the code |
23:59:17 | FromDiscord | <Elegantbeef> OSError means a multitude of things |
23:59:40 | FromDiscord | <spazzy> the error is coming from the compiler |