01:26:42 | * | xet7 joined #nim |
01:27:39 | * | xet7 quit (Remote host closed the connection) |
01:36:46 | FromDiscord | <Bung> oh , never seen it, seems like a orphan page |
01:44:39 | FromDiscord | <Girvo> @exelotl Hah whereas I personally really _like_ having a scheduler for coroutines -- though being able to have both having it scheduled and not having it scheduled is ideal |
01:45:22 | FromDiscord | <Girvo> And agreed re. closure iterators being a bad fit on embedded. Caused me some pain. I just stopped fighting the language and systems and accepted threaded life đ |
01:45:38 | FromDiscord | <Girvo> (well, technically Tasks rather than threads, but shrugs) |
01:59:33 | * | arkurious quit (Quit: Leaving) |
02:03:26 | * | romzx joined #nim |
02:33:58 | FromDiscord | <Tuatarian> In reply to @Elegantbeef "Code? (<@284835054633353226>)": the forward decl is |
02:34:07 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=4e97 |
02:35:03 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=4e98 |
02:35:11 | FromDiscord | <Tuatarian> the line throwing the error is |
02:35:19 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=4e9a |
02:35:26 | FromDiscord | <Tuatarian> the error itself is |
02:35:35 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix= |
02:36:44 | FromDiscord | <Girvo> Is the second func supposed to be returning void? |
02:37:18 | FromDiscord | <Girvo> Ah wait I see what you're doing |
02:38:34 | FromDiscord | <Girvo> Does adding the `: seq[ASTNode]` to the definition's signature help? I guess not? |
02:41:59 | FromDiscord | <huantian> I feel like that's the issue? |
02:43:02 | FromDiscord | <Tuatarian> Ok I see the issue |
02:43:06 | FromDiscord | <Tuatarian> I'm printing void right |
02:43:13 | FromDiscord | <Tuatarian> Wait no |
02:43:31 | FromDiscord | <Tuatarian> Ok parseExpr shouldn't be returning anything |
02:43:39 | FromDiscord | <Tuatarian> That's the problem |
02:43:49 | FromDiscord | <huantian> a function that doesn't return anything? what's the point then lmao |
02:44:12 | FromDiscord | <Tuatarian> It used to return |
02:44:26 | FromDiscord | <huantian> oh yeah it has a var arg |
02:44:30 | FromDiscord | <huantian> that makes more sense |
02:44:44 | FromDiscord | <Tuatarian> Yeah that's a very silly mistake lmao |
02:44:49 | FromDiscord | <Tuatarian> Thanks |
02:44:59 | FromDiscord | <huantian> I wonder why that twas the error you got though, I can't seem to reproduce it |
02:47:20 | FromDiscord | <Tuatarian> Yeah it was a very odd error |
03:11:16 | FromDiscord | <ringabout> Debugging macros makes me sick. Hacks after hacks. Hard to change the compiler without break macros. |
03:11:24 | FromDiscord | <ringabout> https://media.discordapp.net/attachments/371759389889003532/1034665525160202302/unknown.png |
03:14:12 | FromDiscord | <huantian> yeah ig even if you move the burden of features from the lang to the users, you still have to carry that burden in some sense |
03:21:13 | * | kenran joined #nim |
03:26:30 | FromDiscord | <ringabout> In reply to @flywind "": Nice, my patch for this macro don't work for the current branch. I'm going to claim I fix this problem. |
03:26:42 | FromDiscord | <ringabout> (edit) "In reply to @flywind "": Nice, my patch for this macro don't work for the current ... branch." added "devel" |
03:51:30 | * | kenran quit (Remote host closed the connection) |
04:07:22 | NimEventer | New thread by phantomcraft: Questions about Nim and its extensibility, see https://forum.nim-lang.org/t/9551 |
04:14:10 | FromDiscord | <Girvo> In reply to @huantian "I wonder why that": Yeah very weird, I can't cause it either |
04:15:16 | FromDiscord | <huantian> wonder if it's a nim version issue? |
04:15:38 | FromDiscord | <Girvo> Quite possibly -- I know some of the stuff I see is because I'm on 1.6.4 still |
05:08:19 | * | rockcavera quit (Remote host closed the connection) |
06:40:36 | * | PMunch joined #nim |
06:59:25 | FromDiscord | <Girvo> Dumb question: can I "spread" one seq (thats a variable) into another seq (that's a @[] literal)? |
07:00:00 | FromDiscord | <Elegantbeef> `@[10, 20 30] & mySeq` is the best you can do |
07:01:47 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
07:11:38 | * | m5zs7k quit (Ping timeout: 250 seconds) |
07:14:34 | * | jjido joined #nim |
07:20:19 | * | m5zs7k joined #nim |
07:24:28 | FromDiscord | <vindaar> @flywind\: well, while I can't speak for everyone, I'm more than happy to see macros break, if that means the hacks "we" use are then unnecessary and can be replaced by some cleaner version. Especially if it's about a library I'm somewhat involved with, just ping me and I'll try to help |
07:25:39 | * | PMunch quit (Quit: leaving) |
07:27:02 | FromDiscord | <ringabout> Thank you! I appreciate your help. |
07:27:42 | FromDiscord | <Elegantbeef> What type of breakages are we talking about? |
07:29:08 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4e9P |
07:29:32 | FromDiscord | <Elegantbeef> That's a bug |
07:29:51 | FromDiscord | <ringabout> Yeah, and somebody's code |
07:29:55 | FromDiscord | <Elegantbeef> With modern Nim thanks to the PRs i added `static openarray[int]` is the correct method |
07:30:50 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4e9Q |
07:31:11 | FromDiscord | <ringabout> I'm going to make this work instead of the former one. |
07:31:32 | FromDiscord | <ringabout> (edit) "I'm going to make this work instead of the former ... one." added "array" |
07:34:35 | FromDiscord | <Elegantbeef> Yea this is the right path imo, but not overly great for backwards compatibillity |
07:34:56 | FromDiscord | <Elegantbeef> Only correct code should work, if incorrect code works and you rely on it, it's not great |
07:49:39 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
08:27:13 | * | dnh joined #nim |
10:10:32 | FromDiscord | <Tanguy> Do we have any idea what's the nim community size? Trying to compare to rust etc |
10:13:26 | madprops | well the reddit has 5.7k subscribers |
10:13:49 | madprops | the rust one has 204k |
10:17:13 | FromDiscord | <Tanguy> Thanks, also found this https://api.github.com/search/repositories?q=language:Nimâ”So between reddit & github, it seems it's about ~40 times smaller than rust |
10:17:40 | FromDiscord | <Tanguy> And ~150 times smaller than g |
10:17:41 | FromDiscord | <Tanguy> (edit) "g" => "go" |
10:19:40 | FromDiscord | <dom96> Community size is tough to gauge, language use/popularity might be better but also tough to gauge |
10:19:52 | FromDiscord | <dom96> I personally like Wikipedia pageview stats https://pageviews.wmcloud.org/?project=en.wikipedia.org&platform=all-access&agent=user&redirects=0&start=2015-07&end=2022-09&pages=Nim_(programming_language)|Rust_(programming_language) |
10:21:31 | FromDiscord | <dom96> Repo counts are definitely interesting too. Zig has half as many as Nim |
10:21:45 | FromDiscord | <dom96> (with the amount of time Zig has been around I'd say it's doing better) |
10:43:25 | NimEventer | New thread by drkameleon: Change ref object variant in-place - drawbacks?, see https://forum.nim-lang.org/t/9552 |
10:53:20 | FromDiscord | <Ekopalypse> Is this something that is still valid and I need to take care of?â”https://nim-lang.org/docs/nimc.html#dll-generationâ”Because I have created two dlls for a cpp app and both are loaded, running and allocating memory all the time but I haven't seen any signs yet that GC is not doing its job. |
11:49:16 | * | PMunch joined #nim |
11:52:25 | * | jjido joined #nim |
11:53:27 | * | arkanoid quit (Ping timeout: 260 seconds) |
12:13:01 | * | vicecea quit (Remote host closed the connection) |
12:13:37 | * | jmdaemon quit (Ping timeout: 240 seconds) |
12:17:28 | FromDiscord | <Saint> if I have a seq[JsonNode] is there an easy way to turn that into a JsonNode so I can pretty() print it? |
12:19:32 | PMunch | @Saint, maybe you can use `%` on it? |
12:23:51 | * | vicecea joined #nim |
12:24:32 | FromDiscord | <Saint> @PMunch worked thanks! |
12:24:46 | PMunch | No problem :) |
12:27:18 | * | arkurious joined #nim |
12:38:06 | FromDiscord | <haxscramper> In reply to @Tanguy "Do we have any": search `language:nim` on github |
12:38:49 | FromDiscord | <ringabout> And https://plausible.io/nim-lang.org |
12:39:00 | FromDiscord | <haxscramper> https://api.github.com/search/repositories?q=language:nim |
12:39:09 | FromDiscord | <haxscramper> this shows direct count, |
12:39:42 | FromDiscord | <haxscramper> for reference, at [8/25/21 2:37 PM] it as at 6.5k |
12:40:07 | FromDiscord | <Tanguy> Also found it, see my last message đ 8k repos for nim, 380k for rust & 1.123m for go |
12:40:28 | * | derpydoo joined #nim |
12:41:35 | FromDiscord | <haxscramper> proper metric of the community size would probably involve something like |
12:41:47 | FromDiscord | <haxscramper> number if unique users that contributed to all the projects marked in this language |
12:42:16 | FromDiscord | <haxscramper> depends on how exactly you define "community" |
12:42:25 | FromDiscord | <haxscramper> In reply to @haxscramper "https://api.github.com/search/repositories?q=langua": that uses "community == contributors" |
12:42:38 | FromDiscord | <haxscramper> In reply to @flywind "And https://plausible.io/nim-lang.org": "communty == onlookers" |
12:42:47 | FromDiscord | <haxscramper> In reply to @dom96 "I personally like Wikipedia": "== unlookers" |
12:43:15 | FromDiscord | <haxscramper> In reply to @madprops "well the reddit has": this one I'm not sure, but I guess it is mostly onlookers, sometimes contributors |
12:43:27 | FromDiscord | <haxscramper> It's well known that most people only read, don't post and don't comment |
12:44:37 | FromDiscord | <haxscramper> In reply to @flywind "And https://plausible.io/nim-lang.org": there is a large number of people who just saw a link on HN/reddit and decided to investigate https://media.discordapp.net/attachments/371759389889003532/1034809777072648192/unknown.png |
12:48:30 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
12:52:47 | FromDiscord | <ringabout> Yeah |
13:03:54 | FromDiscord | <ShalokShalom> Nims online community is surprisingly large |
13:04:04 | FromDiscord | <ShalokShalom> Considering its size, financial support, PR: It's almost huge, compared to other languages who are about as well known |
13:04:30 | FromDiscord | <ShalokShalom> And even larger than more widely known languages. |
13:24:21 | * | rockcavera joined #nim |
13:24:21 | * | rockcavera quit (Changing host) |
13:24:21 | * | rockcavera joined #nim |
13:25:37 | PMunch | Hmm, anyone know how to merge a date and a time in Nim? |
13:26:15 | PMunch | I have a bunch of files in folders. The name of each folder is a day in the format yyyy-MM-dd, and each line in the file contains a hh:mm timestamp along with a value |
13:26:46 | PMunch | I have parsed the date as a DateTime object with the times module, and now I want to set the time in it |
13:31:36 | FromDiscord | <Saint> Is it possible to change a variable type? |
13:31:50 | FromDiscord | <Saint> Like if I want to reassign something to a variable and change that variables type |
13:31:52 | PMunch | What do you mean? |
13:32:04 | FromDiscord | <Saint> like var a used to be a list but now I want to assign a map to a |
13:32:07 | PMunch | Ah, no that's not possible |
13:32:08 | FromDiscord | <Saint> If that makes sense |
13:32:11 | FromDiscord | <Saint> Oh okay thanks |
13:32:16 | PMunch | Well, you can shadow a variable |
13:32:37 | FromDiscord | <Saint> What's that? |
13:32:37 | PMunch | So if you have a global variable a which is a sequence you can have a local variable a which is a map |
13:33:38 | FromDiscord | <Bung> cast or use a convertor |
13:34:27 | PMunch | Huh? |
13:34:56 | FromDiscord | <Saint> In reply to @PMunch "So if you have": Oh okay |
13:35:53 | FromDiscord | <Bung> why talk about variable scope now.. |
13:36:06 | PMunch | Of course you could also have an object variant @Saint |
13:36:23 | PMunch | @Bung, because they asked if they could change the type of a variable |
13:38:20 | FromDiscord | <Bung> hmm, change type doesn't sound same as refer to other scope variable.. |
13:39:11 | FromDiscord | <Rika> Itâs a way to simulate it |
13:39:15 | PMunch | Yes of course, I was just trying to explain all the intricacies |
13:39:22 | FromDiscord | <Saint> Another question, I don't get a line number error for an exception |
13:39:32 | FromDiscord | <Saint> Uncaught exceptions, is there a way to get that in my stack trace |
13:41:14 | PMunch | Not sure what you mean |
13:44:11 | * | derpydoo quit (Ping timeout: 276 seconds) |
13:45:02 | FromDiscord | <Saint> sent a code paste, see https://play.nim-lang.org/#ix=4eb1 |
13:45:26 | FromDiscord | <Saint> Won't tell me where it actually fails in my program, but in some library |
13:53:18 | PMunch | Ah, that can sometimes happen when things are expanded on compile-time unfortunately |
13:53:50 | PMunch | But the error seems to be that you try to do `for x in y` where y is a JsonNode but not a Json array |
13:59:18 | FromDiscord | <Saint> In this case yeah I know where the error is coming from, just wondering what would happen in a more complex case where I don't really know where the error is coming from |
13:59:43 | FromDiscord | <Saint> Is there an easy way to filter a table based on which keys I want? Like python's dict comprehension, or pandas? |
14:06:26 | PMunch | Not a oneliner afaik |
14:15:59 | PMunch | Well, I guess you could do something like this: `myTable = myTable.pairs.toSeq.filterIt(it[0] in 'a'..'z').toTable` |
14:16:14 | PMunch | Something like this: https://play.nim-lang.org/#ix=4ebb |
14:17:59 | * | Goodbye_Vincent quit (Quit: Ping timeout (120 seconds)) |
14:32:35 | FromDiscord | <Saint> In reply to @PMunch "Well, I guess you": Exactly what I was looking for, the toTable, thank you! |
14:37:17 | * | Goodbye_Vincent joined #nim |
14:59:10 | FromDiscord | <slymilano> Has anyone used nim-schedules (https://github.com/soasme/nim-schedules) with some sort of database backing to track jobs if they completed or not with retries, etc? In Elixir land I would reach for Oban, does Nim have something similar? |
15:04:24 | * | PMunch quit (Quit: leaving) |
15:10:55 | FromDiscord | <Rika> Donât think thereâs a job management library like Oban, no |
15:23:59 | * | PMunch joined #nim |
16:03:25 | FromDiscord | <ajusa> In reply to @slymilano "Has anyone used nim-schedules": Maybe https://github.com/capocasa/at |
16:04:42 | FromDiscord | <slymilano> thanks will check it out |
16:26:54 | * | derpydoo joined #nim |
16:37:37 | FromDiscord | <albassort> In reply to @Girvo "And agreed re. closure": What do I do when a microprocessor has one core |
16:37:45 | FromDiscord | <albassort> And coroutines are cool because they just work |
16:38:00 | FromDiscord | <albassort> You don't need to mess with memory |
16:40:18 | FromDiscord | <Rika> Single core microcontrollers can still be threaded |
16:40:44 | FromDiscord | <Rika> Just not parallelised so itâs closer to a mix of async and threads |
16:43:08 | * | derpydoo quit (Ping timeout: 272 seconds) |
16:45:21 | * | derpydoo joined #nim |
16:50:46 | FromDiscord | <auxym> yeah, all RTOSs for MCUs come with a "thread" or "task" mechanism, which is either pre-emptive (uses interrupts to stop your code at an arbitrary point, saves the stack for a later resume, etc) or non-preemptive, which is like async/coroutines (you decide when to "yield", at which point the os/scheduler runs another coroutine until it yields, etc) |
16:52:15 | FromDiscord | <auxym> I still have some idea for a very lightweight coop scheduler based on actors/message passing. The new Tasks in the stdlib would be a good fit for that I think. Need to play around witht that idea sometime. |
16:52:21 | FromDiscord | <Rika> âNon preemptiveâ is called cooperative just an FYI ;P |
16:53:00 | FromDiscord | <auxym> is also called cooperative đ non-preemptive is definitely a term I've seen in many places |
16:53:59 | FromDiscord | <Rika> Really, huh |
16:54:03 | FromDiscord | <Rika> Good to know lol |
16:57:32 | FromDiscord | <albassort> In reply to @Rika "Single core microcontrollers can": But isn't the only reason why threads are cool Is operating in parallel, wouldn't coroutines just be far superior if not parallel |
16:58:14 | FromDiscord | <albassort> Why are dreads threads threads |
16:58:21 | FromDiscord | <albassort> (edit) "dreads" => "" | "threads ... threads" added "called" |
16:58:36 | FromDiscord | <albassort> This isn't string theory |
16:58:38 | FromDiscord | <albassort> Time to Google |
16:58:44 | FromDiscord | <Rika> Because that just is how it is |
16:58:59 | FromDiscord | <albassort> You sound like every teach I've ever met |
16:59:03 | FromDiscord | <albassort> (edit) "teach" => "teacher" |
16:59:57 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1034874030936817664/Screenshot_20221026-125921.png |
17:00:02 | FromDiscord | <albassort> Google can hear my speech impediment better than people usually can |
17:25:57 | * | pro joined #nim |
17:46:46 | * | derpydooo joined #nim |
17:47:41 | FromDiscord | <4zv4l> is there a library for Nim similar to this one https://github.com/charmbracelet/bubbletea ? |
17:49:14 | * | derpydoo quit (Ping timeout: 276 seconds) |
18:21:57 | FromDiscord | <deeuu> Not exactly, you can check out https://github.com/ansiwave/nimwave which I believe uses https://github.com/johnnovak/illwill for TUI |
18:30:35 | * | pro quit (Quit: pro) |
18:32:33 | FromDiscord | <Saint> @deeuu Does nimwave support displaying images? |
18:34:25 | FromDiscord | <deeuu> Haven't used it, check the repo out |
18:34:31 | FromDiscord | <Saint> I tried but didn't see it |
18:42:10 | * | derpydooo quit (Quit: derpydooo) |
18:58:18 | * | jjido joined #nim |
19:01:35 | * | LuxuryMode joined #nim |
19:40:32 | * | xet7 joined #nim |
20:03:37 | * | xet7 quit (Remote host closed the connection) |
20:21:38 | FromDiscord | <Saint> Is there an easy way to use fmt string and access a table |
20:21:48 | FromDiscord | <Saint> (edit) "table" => "table's values? seems like I would have to escape the double quotes?" |
20:21:55 | * | jmdaemon joined #nim |
20:24:18 | FromDiscord | <Saint> Oh triple quotes |
20:41:06 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
20:49:53 | * | jjido joined #nim |
20:50:15 | FromDiscord | <Saint> It is possible to call toString ($) without using brackets before the statement, like a method call after the statement? |
20:50:36 | FromDiscord | <Saint> soo like foo.$() or foo.$ instead of $(foo) |
20:51:00 | FromDiscord | <konsumlamm> yes, by using backticks |
20:53:55 | FromDiscord | <Phil> In reply to @Saint "It is possible to": I generally only make use of the `$foo` Syntax |
20:55:37 | FromDiscord | <Saint> Thank you @konsumlamm |
20:55:39 | FromDiscord | <Saint> @Phil gotcha |
21:27:33 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
21:40:00 | * | jjido joined #nim |
22:00:00 | * | exp1oit joined #nim |
22:03:04 | * | exp1oit quit (Client Quit) |
22:09:14 | * | romzx quit (Ping timeout: 276 seconds) |
22:24:47 | * | romzx joined #nim |
22:48:23 | * | PMunch quit (Quit: leaving) |
23:36:26 | FromDiscord | <Girvo> In reply to @Rika "Because that just is": They don't think it be like it is, but it do |