00:23:59 | * | derpydoo joined #nim |
00:56:59 | * | jmdaemon joined #nim |
00:58:11 | FromDiscord | <B L Â D É> I'm experiencing something weird, I thought arrays will be faster than seq but seq is about 1.5 times faster!↵Both preallocating 1024 objects using array[1024] and newSeq(1024) |
00:58:47 | FromDiscord | <Elegantbeef> Code? |
00:59:07 | FromDiscord | <Elegantbeef> Also you're timing in release? |
00:59:30 | FromDiscord | <B L Â D É> In reply to @Elegantbeef "Also you're timing in": danger |
01:00:09 | FromDiscord | <B L Â D É> sent a code paste, see https://paste.rs/46v |
01:00:27 | FromDiscord | <B L Â D É> This is the seq version |
01:00:58 | FromDiscord | <B L Â D É> sent a code paste, see https://play.nim-lang.org/#ix=49ZH |
01:01:12 | FromDiscord | <B L Â D É> seq are noticeably faster |
01:01:26 | * | jmdaemon quit (Client Quit) |
01:02:29 | FromDiscord | <Elegantbeef> They certainly shouldnt be any faster here |
01:02:43 | FromDiscord | <Elegantbeef> Can you throw the benchmark somewhere? |
01:03:08 | * | jmdaemon joined #nim |
01:03:40 | FromDiscord | <B L Â D É> sent a code paste, see https://play.nim-lang.org/#ix=49ZI |
01:03:47 | FromDiscord | <Elegantbeef> That's not the benchmark |
01:07:09 | FromDiscord | <Elegantbeef> Actually it might be due to how you have your object layed out |
01:07:15 | FromDiscord | <Elegantbeef> move the stack to the last position in the object |
01:08:12 | FromDiscord | <B L Â D É> sent a code paste, see https://play.nim-lang.org/#ix=49ZK |
01:08:13 | FromDiscord | <Elegantbeef> Yea |
01:08:19 | FromDiscord | <Elegantbeef> I doubt it'll change anything but just an idea |
01:10:59 | FromDiscord | <B L Â D É> IT CHANGED |
01:11:00 | FromDiscord | <B L Â D É> sent a code paste, see https://play.nim-lang.org/#ix=49ZL |
01:11:03 | FromDiscord | <B L Â D É> What? |
01:11:22 | FromDiscord | <B L Â D É> seq are still faster though (by a tiny bit) |
01:11:27 | FromDiscord | <B L Â D É> but why is that |
01:11:37 | FromDiscord | <B L Â D É> This seems really weird to me |
01:12:46 | FromDiscord | <Elegantbeef> My idea with the array at the end was to change how accessing fields were done, so that when you accessed VM fields all were at the pointer |
01:13:01 | FromDiscord | <Elegantbeef> You now likely get most if not all of the fields in a single cache line |
01:13:27 | FromDiscord | <Elegantbeef> Without having the entire code to look at/profile it's hard to say why it's slower |
01:13:35 | FromDiscord | <Elegantbeef> Other than allocation they should be identical |
01:13:52 | FromDiscord | <Elegantbeef> If anything the seq should be slightly slower due to the pointer indirection |
01:14:26 | FromDiscord | <B L Â D É> In reply to @Elegantbeef "If anything the seq": Yes that's what i thought |
01:14:47 | FromDiscord | <Elegantbeef> What memory management are you using? |
01:15:05 | FromDiscord | <B L Â D É> Anyways i'll get the repo ready tomorrow if u want to have a look |
01:15:12 | FromDiscord | <B L Â D É> In reply to @Elegantbeef "What memory management are": Orc |
01:15:22 | FromDiscord | <B L Â D É> Refc is waaaaay slower |
01:15:48 | FromDiscord | <B L Â D É> It's actually worse than golang in some situations |
01:15:58 | FromDiscord | <Elegantbeef> Eh it's tunable |
01:16:52 | FromDiscord | <halc> is there a specific use case where refc is better? |
01:17:17 | FromDiscord | <B L Â D É> In reply to @halc "is there a specific": On the official website they suggest u to use orc for newer projects |
01:17:19 | FromDiscord | <Elegantbeef> Arc/Orc have lower latency but lower throughput |
01:17:34 | FromDiscord | <B L Â D É> It will be the default in the future |
01:17:55 | FromDiscord | <Elegantbeef> So if your only goal is to get a lot of work done in a short period, refc might be faster |
01:18:18 | FromDiscord | <B L Â D É> https://nim-lang.github.io/Nim/mm.html |
01:18:52 | FromDiscord | <Elegantbeef> Arc/Orc are generally faster than the conventional GC, but there are some cases where they may not be |
01:19:14 | FromDiscord | <Elegantbeef> A big benefit of arc/orc is that they have move semantics so you can reuse memory more which is one place where the speed comes in |
01:19:53 | FromDiscord | <B L Â D É> And the shared heap stuff if i'm not mistaken |
01:20:07 | FromDiscord | <Elegantbeef> Shared heap only matters for threading, so it's a moot point 😄 |
01:20:25 | FromDiscord | <Elegantbeef> Due to Nim's allocator you lose performance turning on threads |
01:21:04 | FromDiscord | <Elegantbeef> mimalloc resolves most of this loss though, so when threads are the default it's likely Nim will have a new internal allocator |
01:21:12 | FromDiscord | <Elegantbeef> threads are default for devel presently |
01:23:10 | FromDiscord | <halc> In reply to @Elegantbeef "Due to Nim's allocator": oh yeah, I noticed how just turning threads on drastically decreases performance lol |
01:23:26 | FromDiscord | <Elegantbeef> https://github.com/Yardanico/mimalloc_nim#performance |
01:25:12 | * | alice quit (Killed (lithium.libera.chat (Nickname regained by services))) |
01:25:16 | * | alice joined #nim |
01:26:42 | FromDiscord | <B L Â D É> https://media.discordapp.net/attachments/371759389889003532/1017606942883061803/Screenshot_2022-09-09-03-26-28-81_320a9a695de7cdce83ed5281148d6f19.jpg |
01:26:52 | FromDiscord | <B L Â D É> In reply to @halc "oh yeah, I noticed": Try this |
01:28:05 | FromDiscord | <halc> In reply to @B L Â D É "Try this": oh I'm not doing thread stuff anymore, I do remember trying that with no results though |
01:28:33 | FromDiscord | <halc> and I was just toying anyways |
01:37:34 | * | arkurious quit (Quit: Leaving) |
01:38:59 | * | alice is now known as Guest8251 |
01:39:00 | * | Guest8251 quit (Killed (calcium.libera.chat (Nickname regained by services))) |
01:39:02 | * | alice joined #nim |
01:50:39 | * | tinystoat quit (Remote host closed the connection) |
01:50:48 | * | tinystoat joined #nim |
01:51:26 | * | koltrast quit (Quit: ZNC - http://znc.in) |
01:51:47 | * | koltrast joined #nim |
01:57:24 | * | monkeybusiness quit (Quit: Leaving) |
02:08:07 | * | alice quit (Remote host closed the connection) |
02:10:50 | * | alice joined #nim |
02:11:09 | * | lain quit (Ping timeout: 252 seconds) |
02:12:39 | * | lain joined #nim |
02:30:36 | FromDiscord | <Hapenia> Hi, anyone know about `concept`? Does `concept` stable enough? Do we have any plan to rewrite stdlib by `concept`? |
02:34:45 | FromDiscord | <Elegantbeef> Yes many know about concept, it's stable enough presently for many things, i hope the stdlib will embrace it. |
02:34:56 | * | derpydoo quit (Quit: derpydoo) |
03:19:45 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
03:48:33 | FromDiscord | <Patitotective> 🌃 |
03:58:52 | * | jmdaemon joined #nim |
04:39:47 | NimEventer | New question by Ciro García: Nim ignores variable assignment, see https://stackoverflow.com/questions/73657380/nim-ignores-variable-assignment |
04:40:21 | FromDiscord | <ravinder387> `var e = newSeq[int]()↵for i in 1..5:↵ e.add(rand(100))↵echo e ` |
04:40:51 | FromDiscord | <ravinder387> @[3, 43, 26, 95, 55] |
04:41:10 | FromDiscord | <ravinder387> every time i compile again again... i got same seq |
04:41:38 | FromDiscord | <ravinder387> is rand() really a random number generator |
04:41:40 | FromDiscord | <Prestige> Look at the example on https://nim-lang.org/docs/random.html |
04:41:41 | FromDiscord | <Yardanico> Because the seed is the same |
04:41:48 | FromDiscord | <Prestige> You need to call `randomize()` |
05:38:21 | FromDiscord | <ravinder387> {"data" : [1,2,3]} --> how to get array from json in nim |
05:45:22 | FromDiscord | <Josef> Is there a 1-1 correspondence between nim and c++ classes, inheritance, virtuals and/or methods? |
05:45:42 | FromDiscord | <Josef> (In terms of ABI compatibility) |
05:46:02 | FromDiscord | <Josef> (edit) "ABI compatibility)" => "assembly representation.)" |
05:46:22 | FromDiscord | <Rika> not at all i believe |
06:22:31 | FromDiscord | <ravinder387> In reply to @Rika "not at all i": r u german |
06:22:46 | * | PMunch joined #nim |
06:24:21 | FromDiscord | <Rika> no |
06:30:48 | FromDiscord | <retkid> is there anyway to get all functions in a nim file in a macro |
06:30:51 | NimEventer | New thread by miran: Nim 1.6.8 release candidate, see https://forum.nim-lang.org/t/9451 |
06:31:27 | PMunch | I don't think so unfortunately |
06:32:19 | FromDiscord | <retkid> i wanna make a macro to automatically get file dependencies |
06:32:34 | FromDiscord | <retkid> is there anyway to get the name of the file |
06:32:52 | FromDiscord | <retkid> i guess i can statically link them |
06:33:11 | FromDiscord | <retkid> but i wanna make a macro to replace the dynamic linking with static |
06:33:12 | FromDiscord | <retkid> .-. |
06:42:05 | FromDiscord | <Yardanico> In reply to @ravinder387 "{"data" : [1,2,3]} ": std/json module |
07:36:58 | * | sagax quit (Ping timeout: 240 seconds) |
07:46:33 | * | rockcavera quit (Remote host closed the connection) |
08:02:25 | * | m5zs7k quit (Ping timeout: 252 seconds) |
08:03:01 | PMunch | @retkid, I mean you can call `nim jsondoc` on the file :P |
08:03:09 | PMunch | And get the exported procedures at least |
08:04:13 | PMunch | I guess you could technically alse parseStmt(staticRead(instantiationInfo().filename)) |
08:04:20 | * | m5zs7k joined #nim |
08:11:13 | PMunch | Hmm, hard to get procs created by a macro though.. |
08:11:29 | PMunch | Because if you parse it as typed then you get errors about redifinitions :P |
08:12:36 | FromDiscord | <Elegantbeef> There isnt really any sensible way to query all symbols exported by a import |
08:20:20 | FromDiscord | <retkid> I want it to be like |
08:21:10 | FromDiscord | <retkid> "this readfile / create file stream proc is pretty cool, lets remove that, statically read the file, and replace it with a string stream or just the file contents" |
08:21:23 | FromDiscord | <retkid> but only on release / danger builds |
08:25:09 | NimEventer | New thread by pusewicz: Bindings for imtui, see https://forum.nim-lang.org/t/9452 |
08:39:36 | FromDiscord | <loaf> whats nims js performance like compared to wasm |
08:40:45 | FromDiscord | <Rika> Same as any other JS versus WASM |
08:40:57 | FromDiscord | <Rika> At least I do not expect a difference |
08:41:21 | FromDiscord | <enthus1ast> i think it also depends if you use browser native api or a pure nim one |
08:41:22 | FromDiscord | <Rika> What does that mean anyway? WASM can be both faster and slower than JS in certain contexts |
08:41:49 | FromDiscord | <loaf> because the entire point in wasm is to compile to more performant js |
08:42:15 | FromDiscord | <Rika> WASM doesn’t compile to JS I believe |
08:42:29 | FromDiscord | <loaf> i thought wasm was a js and c glue |
08:42:52 | FromDiscord | <Rika> WASM is a separate VM to JS |
08:50:40 | FromDiscord | <retkid> the only reason I'd use wasm and not js is for better preformancde |
08:50:43 | FromDiscord | <retkid> (edit) "preformancde" => "performance" |
08:50:49 | FromDiscord | <retkid> js is just easier |
08:51:10 | FromDiscord | <retkid> i suppose thats what loaf means as well |
09:33:05 | FromDiscord | <mratsim> In reply to @retkid "the only reason I'd": Some stuff are easier to translate to wasm than to JS because wasm is lower-level vwith basic primitives while JS brings it's own bagage. |
09:33:31 | FromDiscord | <retkid> i mean JS itself |
09:33:34 | FromDiscord | <mratsim> like you can compile a Nim program that uses raw pointers to WASM |
09:33:55 | FromDiscord | <retkid> given the chance to do stuff in webdev i'd rather write JS then compile with nim |
09:36:05 | FromDiscord | <Phil> If I have to do a reactive frontend, give me HTML, CSS and RXJS, it just works pretty dang well |
09:37:38 | FromDiscord | <mratsim> If I had to do a reactive frontend, I'll just hire someone to do it for me 😛 |
09:37:59 | FromDiscord | <retkid> now |
09:38:03 | FromDiscord | <retkid> i cant do it either because i cant design |
09:38:20 | FromDiscord | <retkid> but i can do the frontend if you get a designer |
09:38:22 | FromDiscord | <Phil> Ehhhh it's not that hard to get an okay feeling for design |
09:38:34 | FromDiscord | <retkid> I've tried I just am not good at it |
09:38:48 | FromDiscord | <retkid> i can get everything to work usually |
09:38:49 | FromDiscord | <retkid> just like |
09:38:51 | FromDiscord | <retkid> it looks horrible |
09:38:58 | FromDiscord | <Phil> A lot of it is not getting seduced by the bells and whistles you have access to just for the sake of it |
09:39:28 | NimEventer | New thread by noober: Nim Compiler Issues, see https://forum.nim-lang.org/t/9453 |
09:39:31 | FromDiscord | <retkid> oh yea |
09:39:37 | FromDiscord | <retkid> staring into the black maw of CSS |
09:39:45 | FromDiscord | <retkid> is terrifying |
09:39:47 | FromDiscord | <Phil> ~~To this day I regret making my sidebar expand on hover but it's still the best solution I've got so far~~ |
09:40:13 | FromDiscord | <retkid> doing anything in CSS is horrible |
09:40:21 | FromDiscord | <retkid> not necessarily because its bad |
09:40:22 | FromDiscord | <retkid> it is |
09:40:26 | FromDiscord | <retkid> but because you can do anything |
09:40:27 | FromDiscord | <Phil> That I disagree, CSS is not fun by any means but it's not terrifying |
09:40:47 | FromDiscord | <retkid> it scares me because its so open and free |
09:40:49 | FromDiscord | <retkid> you can do anything |
09:40:53 | FromDiscord | <retkid> so many ways to do anything |
09:41:22 | FromDiscord | <retkid> its paralyzing |
09:41:51 | FromDiscord | <Phil> And the funny thing is some of them are objectively wrong given the circumstances... but eh, it's still manageable imo |
10:09:36 | NimEventer | New thread by archnim: Strange issue with readline, see https://forum.nim-lang.org/t/9454 |
10:12:44 | FromDiscord | <Rika> It’s a bit hard to answer why to that question but the simple answer is that the program needs to handle it I believe |
10:13:02 | FromDiscord | <Yardanico> i already answerred with rstdin :) |
10:25:29 | * | monkeybusiness joined #nim |
10:25:29 | * | monkeybusiness quit (Changing host) |
10:25:29 | * | monkeybusiness joined #nim |
10:28:10 | FromDiscord | <dom96> In reply to @retkid "the only reason I'd": wasm isn't always faster than JS funnily enough |
10:36:57 | FromDiscord | <ravinder387> In reply to @dom96 "wasm isn't always faster": so every nim libraries able to compile to js and run entirely on browser |
10:37:19 | FromDiscord | <ravinder387> can i run ArrayMancer library on browser through javascript |
10:37:56 | FromDiscord | <dom96> no, every library can't |
10:38:39 | FromDiscord | <Rika> In reply to @ravinder387 "can i run ArrayMancer": Unlikely |
10:41:57 | FromDiscord | <ravinder387> In reply to @Rika "Unlikely": what's ur nim frontend and backend stack/libraries |
10:42:34 | FromDiscord | <Rika> I don’t do front end |
10:43:15 | FromDiscord | <Rika> There’s not a lot of backend stuff to choose from really so I don’t know why you’d ask me |
10:43:26 | FromDiscord | <Rika> I’d prolly use prologue for a new project |
10:43:42 | FromDiscord | <enthus1ast> for web\:↵(asynchttpserver or prologue or jester) + nimja + nisane |
10:44:04 | FromDiscord | <enthus1ast> but i mostly do non spa's |
10:44:17 | FromDiscord | <ravinder387> In reply to @enthus1ast "for web\: (asynchttpserver or": nice |
10:44:55 | FromDiscord | <enthus1ast> others also use norm as an orm (but i like the more rough approach more |
10:45:09 | FromDiscord | <enthus1ast> so db libs directly + seq unpacking with nisane |
10:46:09 | FromDiscord | <ravinder387> it is written in nim website you can write frontend and backend in nim that's why I'm asking to people |
10:46:43 | FromDiscord | <enthus1ast> you can compile to js, so you can just wrap your favourite js stuff |
10:46:56 | FromDiscord | <ravinder387> In reply to @enthus1ast "you can compile to": how |
10:47:04 | FromDiscord | <enthus1ast> nim js yourfile.nim |
10:47:29 | FromDiscord | <enthus1ast> https://nim-lang.org/docs/backends.html#backends-the-javascript-target |
10:54:58 | FromDiscord | <retkid> i'd just use svelte for a frontend |
10:55:38 | FromDiscord | <enthus1ast> OR build a nice gui with imgui |
11:00:51 | PMunch | Come on guys, not a single game written in Nim? https://wasm4.org/blog/jam-2-results/ |
11:07:44 | FromDiscord | <Rika> You do it smh |
11:09:59 | FromDiscord | <dom96> Nim doesn't have first-class WASM support |
11:10:59 | PMunch | Yeah but you can go the Nim -> C -> WASM route right? |
11:34:51 | FromDiscord | <Yardanico> In reply to @dom96 "Nim doesn't have first-class": i contributed wasm support to wasm4, it just uses WASI SDK (which is clang with some specific libs) and it compiles fine |
11:35:28 | FromDiscord | <Yardanico> I don't really think that Nim not having a "direct" WASM backend changes anything in regards to writing games via wasm4 |
11:38:27 | FromDiscord | <b1rdf00d> In reply to @PMunch "Yeah but you can": Tom (from Context Free, I think the creator of WASM-4?) made a Nim game in the first jam |
11:39:41 | PMunch | oh cool |
11:40:11 | FromDiscord | <Yardanico> In reply to @b1rdf00d "Tom (from Context Free,": he didn't make wasm4, he just kinda found it out or something :) |
11:40:31 | FromDiscord | <Yardanico> "And thanks much to Bruno for making WASM-4 and for helping with this video and the jam!" |
11:40:51 | FromDiscord | <retkid> whats the generic for any kind of object which has [] |
11:40:52 | FromDiscord | <b1rdf00d> In reply to @Yardanico ""And thanks much to": yeah that's it, I wasn't sure if he was a co-creator |
11:40:54 | FromDiscord | <retkid> (edit) "[]" => "[int]" |
11:41:09 | FromDiscord | <retkid> ie strings or any kind of array |
11:41:15 | FromDiscord | <Yardanico> In reply to @retkid "whats the generic for": huh? |
11:41:22 | FromDiscord | <Yardanico> ah, you want subscript operator |
11:41:28 | FromDiscord | <Yardanico> just check with a concept or `when compiles` |
11:41:41 | FromDiscord | <retkid> i want it in a procedure |
11:41:51 | FromDiscord | <retkid> as a paramater .-. |
11:41:53 | FromDiscord | <retkid> (edit) "paramater" => "parameter" |
11:41:58 | FromDiscord | <Yardanico> then do it with a concept |
11:42:45 | FromDiscord | <retkid> I have just heard of the word concept |
11:43:01 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual_experimental.html#concepts |
11:43:36 | FromDiscord | <Yardanico> also this is using old concept syntax |
11:43:37 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4a1A |
11:44:09 | * | jmdaemon quit (Ping timeout: 268 seconds) |
11:50:10 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=4a1B |
11:50:59 | FromDiscord | <retkid> i dont know why i'd ever use a concept besides htis |
11:51:02 | FromDiscord | <retkid> (edit) "htis" => "thi" |
11:51:14 | FromDiscord | <retkid> (edit) "thi" => "this" |
11:51:18 | FromDiscord | <retkid> but I'll keep it in mind |
11:54:03 | FromDiscord | <retkid> oo i really like the "do" I'll need to find some way to use that |
12:13:08 | * | monkeybusiness quit (Ping timeout: 268 seconds) |
12:26:21 | * | arkurious joined #nim |
12:58:22 | FromDiscord | <dom96> In reply to @Yardanico "i contributed wasm support": Then it's a case of community engagement. Zig has a full-time community manager that from what I've seen advertises this game jam. |
13:00:18 | FromDiscord | <Yardanico> yes, I was just confused as to why you brought up WASM support regarding the fact that no one made Nim games for that jam :) |
13:04:56 | FromDiscord | <flywind> It seems better to revert #19119 before 1.6.8 release since it is a surprising regression => https://github.com/nim-lang/Nim/pull/20327 |
13:06:48 | FromDiscord | <aph> should i use winlean/winim is there some situations where one is better than another? |
13:06:52 | FromDiscord | <aph> (edit) |
13:06:54 | FromDiscord | <aph> (edit) removed "when" |
13:06:57 | FromDiscord | <aph> (edit) "winlean/winim" => "winlean/winim," |
13:07:02 | FromDiscord | <aph> (edit) "is" => "are" |
13:07:21 | PMunch | Please try to refrain from editing your message too much |
13:07:28 | PMunch | It causes a lot of noise in the IRC room :) |
13:07:53 | FromDiscord | <aph> sorry :( |
13:08:56 | FromDiscord | <Yardanico> In reply to @aph "should i use winlean/winim,": just use winim, it's much more extensive and covers more APIs |
13:08:58 | PMunch | I guess you can find the answer by reading the documentation for each, winlean: "This module implements a small wrapper for some needed Win API procedures, so that the Nim compiler does not depend on the huge Windows module."; winim: "Winim contains Windows API, struct, and constant definitions for Nim. The definitions are translated from MinGW's Windows headers and Windows 10 SDK headers." |
13:09:15 | PMunch | So winlean is basically just a subset of the Windows API that the compiler needs |
13:09:33 | FromDiscord | <aph> oh, i guess i'll use winim, thanks |
13:16:59 | * | dv^_^ quit (Read error: Connection reset by peer) |
13:31:18 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a1U |
13:31:59 | * | monkeybusiness joined #nim |
13:31:59 | * | monkeybusiness quit (Changing host) |
13:31:59 | * | monkeybusiness joined #nim |
13:32:05 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a1V |
13:33:06 | FromDiscord | <Rika> did you import the module with xml handling |
13:34:32 | FromDiscord | <! Nilts> oh |
13:35:10 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a1X |
13:37:18 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a1Z |
13:38:43 | * | monkeybusiness quit (Ping timeout: 248 seconds) |
13:39:06 | FromDiscord | <Yardanico> you need to `import std/strtabs` |
13:39:11 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1017791282959089756/unknown.png |
13:39:30 | * | dv^_^ joined #nim |
13:44:24 | FromDiscord | <! Nilts> ok |
14:33:02 | * | PMunch quit (Quit: Leaving) |
15:00:40 | ehmry | what should I do when I see `Warning: method has lock level <unknown>, but another method has 0 [LockLevel]`? |
15:04:07 | FromDiscord | <dlesnoff> sent a long message, see http://ix.io/4a2N |
15:05:04 | FromDiscord | <dlesnoff> (edit) "http://ix.io/4a2N" => "http://ix.io/4a2Q" |
15:05:20 | FromDiscord | <dlesnoff> (edit) "long message," => "code paste," | "http://ix.io/4a2Q" => "https://play.nim-lang.org/#ix=4a2S" |
15:05:52 | FromDiscord | <dlesnoff> (edit) "https://play.nim-lang.org/#ix=4a2S" => "https://play.nim-lang.org/#ix=4a2U" |
15:06:00 | FromDiscord | <Yardanico> I don't know that stuff well, but maybe https://nim-lang.org/docs/critbits.html is what you need? |
15:06:05 | FromDiscord | <Yardanico> "This module implements a crit bit tree which is an efficient container for a sorted set of strings, or for a sorted mapping of strings. Based on the excellent paper by Adam Langley. (A crit bit tree is a form of radix tree or patricia trie.)" |
15:09:29 | FromDiscord | <dlesnoff> I am looking into it. It seems just a form of Patricia trie. I am porting algorithms from this repository https://github.com/jilljenn/tryalgo which contains a lot of data structures and algorithms, and part of the implementation of the syntax checker is to have an easy implementation to learn the data structure from the code source. |
15:11:41 | FromDiscord | <Yardanico> well I doubt that it'll be that efficient because self.s seems to be using a dictionary, but yeah you can port that to Nim then I guess |
15:12:34 | FromDiscord | <Yardanico> and regarding None, you can either just use null character or std/options in this exact case (https://github.com/jilljenn/tryalgo/blob/master/tryalgo/trie.py if someone else wants to look at the code too) |
15:19:00 | FromDiscord | <Rika> i was also looking into implementing a trie |
15:19:29 | FromDiscord | <Rika> currently thinking of the bitset style implementation |
15:20:03 | FromDiscord | <Rika> which i guess wouldnt do ascii too well |
15:25:12 | FromDiscord | <Prestige> Is there a `when` equivalent for case statements, or would that happen at compile time anyway if a parameter was `static` ? |
15:29:38 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4a2Z |
15:31:18 | FromDiscord | <Yardanico> i'm not sure if this is the right way, but I translated the python code for fun: |
15:31:27 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4a30 |
15:31:50 | FromDiscord | <Yardanico> although yeah, I used the more "manual" way instead of proper char indexing with `find`ing chars in an array, there's probably a better way |
15:32:03 | FromDiscord | <Yardanico> In reply to @Jiezron "Can we index an": I don't think so, since you said yourself it needs to be contiguous |
15:32:12 | FromDiscord | <Yardanico> although maybe we can just make an enum of those ascii letters, then we'll be able to |
15:33:27 | FromDiscord | <Yardanico> hmm, that won't work too since the enum would have holes |
15:34:02 | FromDiscord | <Prestige> Hm there's still no way to do cyclic imports is ther |
15:34:05 | FromDiscord | <Prestige> (edit) "ther" => "there" |
15:34:27 | FromDiscord | <Yardanico> In reply to @Avahe "Hm there's still no": there is the same old way, you have to structure your code very carefully, so it's limited in practice |
15:34:57 | FromDiscord | <Yardanico> you can have circular imports if the child module imports the main module, and the main module has the symbols that the child module uses defined before the main module imports the child module |
15:35:22 | FromDiscord | <Yardanico> like in https://github.com/Yardanico/nimeventer/blob/master/src/nimeventer.nim#L83 |
15:35:38 | FromDiscord | <Prestige> Hm thanks, that helps a bit |
15:35:44 | FromDiscord | <Prestige> Hopefully this improves at some point |
15:38:21 | FromDiscord | <Prestige> PMunch: Playground down again? |
15:38:56 | FromDiscord | <Prestige> We really should have some of the Nim funds go toward a better server for the playground imo |
15:40:32 | FromDiscord | <dlesnoff> @PMunch ou @PMunch ping maybe ? |
15:42:59 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4a33 |
15:43:12 | FromDiscord | <Yardanico> In reply to @Jiezron "You have done the": well, that code was pretty simple to begin with, and copilot also helped a bit :) |
15:43:47 | FromDiscord | <dlesnoff> In reply to @Avahe "PMunch: Playground down again?": Playground was down a week before |
15:43:53 | FromDiscord | <dlesnoff> In reply to @Yardanico "well, that code was": copilot ? |
15:43:58 | FromDiscord | <Prestige> dang |
15:44:00 | FromDiscord | <Yardanico> GitHub Copilot |
15:44:14 | FromDiscord | <Yardanico> https://github.com/features/copilot it works more or less fine for Nim now |
15:44:53 | FromDiscord | <Prestige> sent a code paste, see https://play.nim-lang.org/#ix=4a35 |
16:02:13 | FromDiscord | <dlesnoff> In reply to @Yardanico "https://github.com/features/copilot it works more": The tool is very impressive! Looking forward for my first paycheck to get a subscription 🙂 |
16:02:26 | FromDiscord | <Yardanico> if you're a student or have a popular open-source project you can get it for free |
16:03:12 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4a38 |
16:03:34 | FromDiscord | <Rika> change the x parameter to a different name |
16:03:48 | FromDiscord | <Rika> @Prestige |
16:06:36 | FromDiscord | <Prestige> eh |
16:11:04 | FromDiscord | <Prestige> Doesn't really help the situation imo |
16:11:12 | FromDiscord | <Prestige> the compiler should be able to resolve this |
16:14:39 | FromDiscord | <Yardanico> going to do fun stuff with https://github.com/Yardanico/nim-snippets/tree/master/pkgraph again, currently cloning all nimble package repos |
16:18:49 | FromDiscord | <Yardanico> 1920 repos with like 30 repos dead (approximately) |
16:20:40 | FromDiscord | <!&luke> In reply to @Yardanico "https://github.com/features/copilot it works more": Lmao it'll probably steal my job but it's great while it lasta |
16:20:43 | FromDiscord | <!&luke> (edit) "lasta" => "lasts" |
16:21:24 | * | jmdaemon joined #nim |
16:23:07 | * | rockcavera joined #nim |
16:23:07 | * | rockcavera quit (Changing host) |
16:23:07 | * | rockcavera joined #nim |
16:24:57 | FromDiscord | <Rika> In reply to @Avahe "the compiler should be": how would it |
16:25:18 | FromDiscord | <Rika> it is a valid use case to replace both the field name and the value |
16:25:27 | FromDiscord | <Rika> how would the compiler distinguish between such |
16:25:29 | FromDiscord | <Yardanico> dealing with nimble packages that don't have a .nimble file now, fun :) |
16:25:39 | FromDiscord | <Yardanico> at least it's good to know which ones are gone |
16:29:32 | FromDiscord | <Yardanico> for anyone wondering (out of nimble repos that can actually be cloned): |
16:29:40 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4a3c |
16:35:43 | FromDiscord | <Yardanico> more fun `A package mctranslog directly depends on mcdb but it's not in Nimble!` |
16:39:38 | * | sagax joined #nim |
16:54:02 | FromDiscord | <Yardanico> finally parsed |
16:54:19 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4a3n |
16:55:25 | FromDiscord | <Yardanico> now time to import into neo4j and do fun graphs https://media.discordapp.net/attachments/371759389889003532/1017840663695462571/unknown.png |
17:06:34 | FromDiscord | <Yardanico> beloved license stats (some licenses are the same but different rows because of different names) - https://gist.github.com/Yardanico/31ff1991566e9850df51af96502ffed9 |
17:06:52 | FromDiscord | <Yardanico> need to merge all of them so the output is nicer |
17:07:19 | FromDiscord | <Yardanico> at least 1 package in nimble is "Proprietary" :P |
17:08:07 | FromDiscord | <Rainbow Asteroids> :o |
17:08:10 | FromDiscord | <Rainbow Asteroids> heresy |
17:08:15 | FromDiscord | <Rainbow Asteroids> im calling stalman |
17:12:12 | FromDiscord | <Yardanico> it's https://github.com/al6x/pl0t |
17:12:35 | FromDiscord | <Yardanico> https://github.com/al6x/pl0t/tree/main/api/nim specifically |
17:12:58 | FromDiscord | <Yardanico> yeah, it's not "proprietary" but the license is a custom one |
17:13:01 | FromDiscord | <Yardanico> it's not GPL compatible |
17:13:06 | FromDiscord | <Yardanico> "You can't use this product or any of its parts to build similar service and compete with me" |
17:13:16 | FromDiscord | <auxym> surprisingly very little (l)gpl |
17:13:19 | FromDiscord | <Yardanico> "For commercial businesses with annual sales greather than 1 million USD, the first month is free, after that it's 5 USD per developer per month." does that even work when put in a license? |
17:13:27 | FromDiscord | <Yardanico> In reply to @auxym "surprisingly very little (l)gpl": because it generally doesn't make sense for Nim |
17:13:31 | FromDiscord | <Yardanico> Nim links all Nim modules statically |
17:13:46 | FromDiscord | <auxym> Yeah I know. still a very, very small number |
17:14:02 | FromDiscord | <Yardanico> well, Nim likes MIT :P |
17:14:41 | FromDiscord | <Rika> In reply to @Yardanico ""For commercial businesses with": why not? |
17:14:47 | FromDiscord | <Yardanico> because it's a code license |
17:15:01 | FromDiscord | <Yardanico> i don't know if that would work in a court or something |
17:15:26 | FromDiscord | <Yardanico> hmm, what else should I check |
17:15:34 | FromDiscord | <Yardanico> probably the classic "people with most packages", although I already know the answer |
17:15:43 | FromDiscord | <Rika> In reply to @Yardanico "i don't know if": unlikely |
17:15:58 | FromDiscord | <Rika> anything custom made that isnt vetted by a lawyer is very unlikely to pass |
17:20:32 | FromDiscord | <Yardanico> oh right, forgot about status |
17:21:04 | FromDiscord | <Yardanico> https://gist.github.com/Yardanico/20499b8d0f324d2a8b82214a91f990ef top 50 nimble package authors |
17:21:12 | FromDiscord | <Yardanico> (the list uses the names from the nimble file, so might be inaccurate of course) |
17:35:54 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4a3v |
17:37:43 | FromDiscord | <4zv4l> or do like this ? |
17:37:46 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4a3w |
17:41:11 | FromDiscord | <Yardanico> std/sequtils zip |
17:41:36 | FromDiscord | <Yardanico> although it'll be kinda inefficient since it's not an iterator |
17:42:58 | FromDiscord | <auxym> the iterator version is available in https://github.com/def-/nim-iterutils |
17:43:30 | FromDiscord | <auxym> it's only like 5 lines, in case you don't want to add an external dep, you could just lift it |
17:44:09 | FromDiscord | <Yardanico> warning: big png (10k x 10k pixels), all Nimble packages in a graph with their authors and also with package dependencies (a few packages are probably missing, but most are there) |
17:44:10 | FromDiscord | <Yardanico> https://i.imgur.com/0JDd67e.jpg |
17:44:14 | FromDiscord | <Yardanico> argh |
17:44:15 | FromDiscord | <Yardanico> `https://i.imgur.com/0JDd67e.jpg` |
17:44:27 | FromDiscord | <Yardanico> why is it jpg 🤔 |
17:44:50 | FromDiscord | <Yardanico> nimble package universe https://media.discordapp.net/attachments/371759389889003532/1017853101245481031/unknown.png |
17:45:19 | FromDiscord | <Yardanico> the outer belt are packages that don't have much relationships, usually the ones that don't depend on anything and nothing depends on them |
17:45:23 | FromDiscord | <Yardanico> or only with a couple dependencies |
17:45:42 | FromDiscord | <Yardanico> the packages in the centre of the galaxy are the ones that have a lot of dependencies, or a lot of stuff depends on them |
17:45:55 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1017853371530608690/unknown.png |
17:46:29 | FromDiscord | <Yardanico> i guess I should make a forum post, but first I need to make stuff a little better, like merge the licenses, and fix a couple of other things |
17:46:34 | FromDiscord | <enthus1ast> Nice @Yardanico |
17:46:36 | FromDiscord | <Yardanico> with json file as well (neo4j has that) |
17:47:12 | FromDiscord | <Yardanico> the current full graph in json (22mb) - https://gofile.io/d/OkVPxb |
17:47:16 | FromDiscord | <enthus1ast> maybe when the pkgname is an url, just use the last part, so that its not "http://git" |
17:47:31 | FromDiscord | <Yardanico> hm? it shouldn't be like that |
17:47:48 | FromDiscord | <Yardanico> although neo4j json export seems to be weird |
17:48:17 | FromDiscord | <Yardanico> In reply to @enthus1ast "maybe when the pkgname": ah you mean not the full url |
17:48:25 | FromDiscord | <enthus1ast> yeah |
17:48:27 | FromDiscord | <Yardanico> I thought it'd be cleaner to use the full URL to see non-nimble deps |
17:48:28 | FromDiscord | <enthus1ast> image.png https://media.discordapp.net/attachments/371759389889003532/1017854017344381049/image.png |
17:48:42 | FromDiscord | <Yardanico> yeah sad :( |
17:48:50 | FromDiscord | <enthus1ast> in this overview its not so good \:) |
17:48:52 | FromDiscord | <Yardanico> i don't know how to render graphs well |
17:49:00 | FromDiscord | <Yardanico> do you have any recommendations? |
17:49:09 | FromDiscord | <Yardanico> I think I can easily adapt my script to create data for any graph format |
17:49:11 | FromDiscord | <enthus1ast> had a look at gephi? |
17:49:16 | FromDiscord | <Yardanico> never heard :) |
17:49:39 | FromDiscord | <enthus1ast> i personally like gephi more then eg cytoscape |
17:49:53 | FromDiscord | <Yardanico> okay, I'm going to try it |
17:49:57 | FromDiscord | <Yardanico> what formats does it understand? |
17:50:25 | FromDiscord | <Yardanico> ah seems like a lot |
17:50:25 | FromDiscord | <enthus1ast> gephi is a little limited (imho its csv) but cytoscape is quite smart |
18:06:19 | FromDiscord | <Yardanico> also got recommended https://anvaka.github.io/pm/ on tg |
18:06:24 | FromDiscord | <Yardanico> it'll be quite small for Nimble but still fun |
18:41:08 | FromDiscord | <0ffh> sent a code paste, see https://play.nim-lang.org/#ix=4a3J |
18:41:58 | FromDiscord | <0ffh> Trivial to code one up, natch, but not much sense in that if there is something there already. |
18:44:03 | FromDiscord | <Prestige> Float analogue? |
18:44:13 | FromDiscord | <Prestige> There's https://nim-lang.org/docs/math.html#mod%2Cfloat64%2Cfloat64 |
18:52:42 | FromDiscord | <0ffh> In reply to @Avahe "There's https://nim-lang.org/docs/math.html#mod%2Cf": Ha, I think that'll do! 😆 |
18:56:18 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
19:05:56 | FromDiscord | <mratsim> In reply to @Yardanico ""For commercial businesses with": what if I sell in EUR and there are rate variations? |
19:06:03 | FromDiscord | <Yardanico> 🤷 |
19:34:26 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4a46 |
19:35:17 | FromDiscord | <Prestige> ref objects would be nil by default, if that's what he means? |
19:35:58 | FromDiscord | <Phil> Generally yes, but you can instantiate even ref object types at compile-time with `T()` given T being any sort of ref object type |
19:36:14 | FromDiscord | <Phil> Actually I think you can just generally instantiate any type that way at any time |
19:36:54 | FromDiscord | <Prestige> Yeah that's all I can think of, if it still doesn't make sense I'd ask for more clarity on the issue |
19:36:58 | FromDiscord | <Prestige> maybe an example |
19:37:50 | FromDiscord | <Prestige> Also a thought, you'd want to recursively instantiate the fields because of a ref object might have properties that are also refs |
19:38:01 | FromDiscord | <Yardanico> maybe things like `requiresInit` |
19:38:16 | FromDiscord | <Yardanico> a pragma that requires fields to be initialized |
19:38:54 | FromDiscord | <Phil> In reply to @Avahe "Also a thought, you'd": Don't worry, that is being handled, I'm brutally abbreviating |
19:39:13 | FromDiscord | <Phil> See the full PR here if you're curious: https://github.com/moigagoo/norm/pull/164 |
19:39:54 | FromDiscord | <Phil> In reply to @Yardanico "maybe things like `requiresInit`": We have a pragma that makes usage of `T()` basically impossible? Hmmmmm |
19:40:51 | FromDiscord | <Phil> On the one hand I can see that being useful to enforce usage of constructor-procs |
19:41:08 | FromDiscord | <Phil> On the other that kinda puts me in a bind that I don't know how else to iterate at compile-time over fields and check their types |
19:42:29 | FromDiscord | <Prestige> Hm there's also `{.noInit.}` |
19:42:32 | FromDiscord | <Prestige> interesting |
19:43:30 | FromDiscord | <Yardanico> yeah, it's for optimizations where you don't want Nim to zero-initialize |
19:51:10 | FromDiscord | <Phil> Am I getting this right?↵If your proc uses `T()[].fieldPairs` you basically can not allow that T is used with the `requiresInit` pragma?↵So if `requiresInit` means you rob yourself of the ability to iterate over the fields of `T` at compileTime unless you provide a constructor-proc that acts at compile-time? |
19:51:24 | FromDiscord | <Phil> (edit) "if" => "using" |
20:09:16 | FromDiscord | <Patitotective> should i use `str.reset()` or `str.setLen(0)`? |
20:13:55 | FromDiscord | <mratsim> In reply to @Isofruit "Question guys... is there": Sure `range(1..2)` doesn't have a default value because 0 is not in the range |
20:17:09 | FromDiscord | <Phil> In reply to @mratsim "Sure `range(1..2)` doesn't have": Hmm that's a good point... why does it not default to the first element in the range?↵I mean enums have a default, why not ranges? |
20:22:35 | FromDiscord | <Phil> Wait, I'm mixing range up with `1..2` |
20:32:37 | FromDiscord | <mratsim> In reply to @Isofruit "Wait, I'm mixing range": I'm talking about range integer types that are runtime checked. |
20:33:00 | FromDiscord | <mratsim> In reply to @Isofruit "Hmm that's a good": I assume small use-case + extra complexity |
20:33:27 | FromDiscord | <mratsim> if you create an enum with a hole at 0 you'll have the same issue |
20:34:17 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=4a4q |
20:42:32 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4a4u |
21:28:13 | FromDiscord | <dom96> In reply to @Yardanico "": beautiful, I like how you coloured the authors purple. What did you use to draw this? |
21:28:48 | * | monkeybusiness joined #nim |
21:29:02 | * | monkeybusiness quit (Changing host) |
21:29:02 | * | monkeybusiness joined #nim |
21:58:06 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
22:00:18 | FromDiscord | <auxym> he was talking about neo4j earlier. looks better than graphviz for sure! |
22:37:30 | FromDiscord | <Patitotective> is there a way to make an statement discardable? just like the pragma↵discard it if its not used↵i actually want to use it for a template |
22:40:11 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4a4K |
22:40:25 | FromDiscord | <Elegantbeef> No return type on the template |
22:40:50 | FromDiscord | <Patitotective> :[ |
22:41:05 | FromDiscord | <Patitotective> (edit) ":[" => ":]" |
22:41:46 | FromDiscord | <Elegantbeef> What eve nis the point of the above though |
22:42:21 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4a4M |
22:42:29 | FromDiscord | <Patitotective> (edit) "https://play.nim-lang.org/#ix=4a4M" => "https://play.nim-lang.org/#ix=4a4N" |
22:42:44 | FromDiscord | <Elegantbeef> I see |
22:43:01 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4a4O |
22:43:12 | FromDiscord | <Patitotective> ill let you shout at my code when i, at least, get it working |
22:43:44 | FromDiscord | <Elegantbeef> jiezron what's that in response to? |
22:43:48 | FromDiscord | <Elegantbeef> And why even use a macro in that case |
22:43:56 | FromDiscord | <dlesnoff> In reply to @Patitotective "is there a way": To this |
22:44:22 | FromDiscord | <Patitotective> 👀 |
22:44:37 | FromDiscord | <Elegantbeef> Ah matrix didnt get that 😄 |
22:44:39 | FromDiscord | <dlesnoff> I don't know but this macro disables a statement ? I am not sure if that the same as discard |
22:44:49 | FromDiscord | <Elegantbeef> It's not |
22:45:21 | FromDiscord | <Boon> Seems the same as commenting it out, right? |
22:45:30 | FromDiscord | <Elegantbeef> Pretty much |
22:45:35 | FromDiscord | <dlesnoff> Is the difference in the fact that discard actually computes the return value but does not uses it/stores it ? |
22:45:40 | FromDiscord | <Elegantbeef> Discard is "i dont want the result, but i want the sideffect" |
22:46:02 | FromDiscord | <dlesnoff> Ok get it |
22:46:22 | FromDiscord | <dlesnoff> (edit) "get" => "I got" |
22:46:27 | FromDiscord | <Elegantbeef> Due to how templates work you cannot make it discardable |
22:48:34 | FromDiscord | <Elegantbeef> A dumb way would be to make a procedure |
22:48:57 | FromDiscord | <Patitotective> (talking about the kdl parser) i already got it working using `temp` fields in my `Parser` object and resetting them after being used but then i thought it would be better to just return it |
22:49:01 | FromDiscord | <Elegantbeef> Though that's tricky to do here |
22:52:02 | FromDiscord | <! Nilts> How do iterate through a xmlAttributes type? |
22:52:50 | FromDiscord | <Patitotective> find it out yourself https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/xmltree.nim#L413 |
22:53:47 | FromDiscord | <! Nilts> I tried looking in the docs and google, i can't find it tho |
22:53:57 | FromDiscord | <! Nilts> oh |
22:54:01 | FromDiscord | <! Nilts> i tried that |
22:54:45 | FromDiscord | <Patitotective> In reply to @not logged in "I tried looking in": remember when you iterate one value you're calling `items`, two values `pairs` |
22:55:36 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a4P |
22:55:44 | FromDiscord | <Patitotective> are you importing `xmltree`? |
22:56:21 | FromDiscord | <! Nilts> In reply to @Patitotective "are you importing `xmltree`?": yes |
22:56:29 | FromDiscord | <Patitotective> actually `XmlAttributes` is just a `StringTableRef` https://nim-lang.org/docs/strtabs.html#StringTableRef |
22:57:06 | FromDiscord | <! Nilts> so i have to import strtabs? |
22:57:11 | FromDiscord | <Patitotective> perhaps |
22:58:04 | FromDiscord | <! Nilts> nope, not working |
22:58:09 | FromDiscord | <! Nilts> hmmmmm |
22:58:28 | FromDiscord | <Patitotective> use `keys`, `values` or `pairs` |
22:58:31 | FromDiscord | <Patitotective> https://nim-lang.org/docs/strtabs.html#15 |
23:00:34 | FromDiscord | <! Nilts> do you know what type a `{}` is? |
23:00:59 | FromDiscord | <Patitotective> no type |
23:01:03 | FromDiscord | <! Nilts> (edit) "`{}`" => "`{key: value}`" |
23:01:09 | FromDiscord | <Patitotective> !eval echo {} |
23:01:10 | FromDiscord | <! Nilts> ? |
23:01:33 | FromDiscord | <Patitotective> lets pretend it said `/home/cristobal/minidev/kdl-nim/trial.nim(1, 6) Error: type mismatch: got <set[empty]>↵` |
23:01:37 | FromDiscord | <Patitotective> its an empty set |
23:01:42 | FromDiscord | <! Nilts> !eval echo {"key": "value"} |
23:01:58 | FromDiscord | <Patitotective> thats sugar syntax for an array of tuples |
23:02:09 | NimBot | Compile failed: <no output> |
23:02:10 | FromDiscord | <Patitotective> `[("key", "value")]` |
23:02:31 | FromDiscord | <! Nilts> ok, i found a fix |
23:02:37 | FromDiscord | <Patitotective> you probably want https://nim-lang.org/docs/strtabs.html#newStringTable%2Cvarargs%5Btuple%5Bstring%2Cstring%5D%5D%2CStringTableMode |
23:02:42 | NimBot | Compile failed: <no output> |
23:03:22 | FromDiscord | <! Nilts> How to i add a key value pair to this tuple thing |
23:03:36 | FromDiscord | <Patitotective> https://nim-lang.org/docs/strtabs.html#[]=,StringTableRef,string,string |
23:03:45 | FromDiscord | <Patitotective> read the docs :] |
23:04:17 | FromDiscord | <Patitotective> In reply to @not logged in "How to i add": to the `{}` sugar syntax? in that case, you can't↵arrays are fixed size |
23:05:05 | FromDiscord | <! Nilts> In reply to @Patitotective "to the `{}` sugar": How do i make it a sequence? And how do i turn it into an array? |
23:05:35 | FromDiscord | <Patitotective> `@{}` |
23:05:52 | FromDiscord | <! Nilts> oh, ok |
23:14:51 | FromDiscord | <Elegantbeef> `@{}` isnt valid afaik |
23:15:50 | FromDiscord | <Elegantbeef> Oh nvm using it as a table constructor |
23:30:26 | FromDiscord | <! Nilts> ok, new q. How do i edit a queried xmlnode in nimquery |
23:30:51 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/xmltree.html |
23:31:25 | FromDiscord | <Elegantbeef> Atleast i assume that works |
23:31:51 | FromDiscord | <! Nilts> What? where in the page |
23:32:39 | * | tinytoast joined #nim |
23:33:08 | FromDiscord | <! Nilts> In reply to @Elegantbeef "Atleast i assume that": ? |
23:34:07 | * | tinystoat quit (Read error: Connection reset by peer) |
23:37:25 | FromDiscord | <Patitotective> In reply to @not logged in "ok, new q. How": you just modify it as it were a normal `XmlNode` |
23:37:53 | FromDiscord | <Patitotective> `var node = querySelector.querySelectorAll()` |
23:38:02 | FromDiscord | <Patitotective> (edit) "querySelector.querySelectorAll()`" => "something.querySelector()`" |
23:41:59 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4a4V |
23:42:21 | FromDiscord | <jmgomez> (edit) "https://play.nim-lang.org/#ix=4a4V" => "https://play.nim-lang.org/#ix=4a4W" |
23:43:12 | FromDiscord | <jmgomez> (edit) "https://play.nim-lang.org/#ix=4a4W" => "https://play.nim-lang.org/#ix=4a4X" |
23:43:40 | FromDiscord | <Elegantbeef> Given it errors in skip type it's likely the code isnt getting sem'd |
23:44:04 | FromDiscord | <Elegantbeef> `result = semExpr(...)`? |
23:44:19 | FromDiscord | <jmgomez> Ok, Im a total ignorant, what does sem means? |
23:44:22 | FromDiscord | <Elegantbeef> But given what you're after that defeats the purposee |
23:44:35 | FromDiscord | <Elegantbeef> semantically analysed |
23:45:43 | FromDiscord | <jmgomez> Ok, but shouldnt it fail to compile? I mean the repr seem just fine. Maybe I have to look more in depth |
23:46:12 | FromDiscord | <Elegantbeef> You're giving it an untyped AST where it expects a typed one, it's likely hard crashing there |
23:46:27 | FromDiscord | <jmgomez> One more thing, do you think is possible to call a identifier defined at compile time from there? Like use it there but resolve the identifier whe you actually run your progrma |
23:46:30 | FromDiscord | <jmgomez> gotcha |
23:46:30 | FromDiscord | <Elegantbeef> This is the point of IC, stored a typed AST tree in storage to load quickly |
23:47:03 | FromDiscord | <jmgomez> (edit) "whe" => "when" | "progrma" => "program" |
23:47:06 | FromDiscord | <Elegantbeef> No clue |
23:47:35 | FromDiscord | <jmgomez> Okay, is there some place or other project that you would recommend for me to take a look to see how to build PNodes? |
23:47:41 | FromDiscord | <jmgomez> it's hard to find docs |
23:48:11 | FromDiscord | <Elegantbeef> PNodes are literally just ASTNodes you build them like you do in macros, just with a bit more information |
23:48:40 | FromDiscord | <Elegantbeef> I'm an idiot but i dont see this plugin idea working out much, but i could be wrong |
23:49:44 | FromDiscord | <jmgomez> haah ok, wont spend too much time on it. I did a few test and the symbols are compiled when you compile the compiler which should cache everything. Now I need to figure out how to build a mvp |
23:50:12 | FromDiscord | <Elegantbeef> It'd be nice if there was a list of what needed to be done for IC |
23:51:07 | FromDiscord | <jmgomez> yes.. not sure where the work is done. Doesnt seem to be devel |
23:51:15 | FromDiscord | <Elegantbeef> It is devel |
23:51:35 | FromDiscord | <Elegantbeef> Araq works on his branches and moves the work to devel |
23:51:48 | FromDiscord | <jmgomez> so it isnt getting too much attention right? |
23:52:31 | FromDiscord | <Elegantbeef> Correct, it does not seem to be highest priority right now, but it's hard to say since we dont have any roadmaps with a timestamp |
23:53:11 | FromDiscord | <jmgomez> Yeah, because here it says that is top priority https://github.com/nim-lang/RFCs/issues/437 |
23:53:35 | FromDiscord | <bitsousa> Grab a $750 Paypal Gift Card Now!Here is a $750 free paypal gift card for you.Don't missit.if don't belive,you can come back.Trust me.Here is all details .If you click here..👇👇👇👇Click Link \: https://t.me/+_JdxukNCoaVmMWFkTelegram\:@DONALDBAILEY12↵↵@DONALDBAILEY12 |
23:55:11 | FromDiscord | <Patitotective> <@&371760044473319454> |
23:59:29 | FromDiscord | <Prestige> crazy bots |