00:05:16 | FromDiscord | <huantian> In reply to @Elegantbeef "It might just be": looking at the readme for nimlsp, I'd assume the "selector" option does this? |
00:07:30 | FromDiscord | <Ayy Lmao> What's confusing to me is that the selector option is something you set in the lsp settings, and doesn't seem like a project specific setting. It would be a drag to have to change that all the time. |
00:07:30 | FromDiscord | <Elegantbeef> Yea it seems so |
00:08:12 | FromDiscord | <Elegantbeef> Does sublime text not have project specific settings? |
00:11:29 | FromDiscord | <Ayy Lmao> Not that I know of. I'm a noob with it though. Looking through the other lsp clients they all seem to have `source.something` as well. |
00:12:00 | FromDiscord | <Ayy Lmao> sent a code paste, see https://paste.rs/rhD |
00:12:10 | FromDiscord | <Elegantbeef> The selector might just be a pattern for files |
00:12:15 | FromDiscord | <Elegantbeef> `source` being akin to `` |
00:12:33 | FromDiscord | <Ayy Lmao> Yeah that's what I'm thinking |
00:13:13 | FromDiscord | <Ayy Lmao> I just don't know how to tell it to not boot up a separate language server for each file. |
00:13:24 | FromDiscord | <Elegantbeef> I think it's down to nimlime then |
00:13:45 | FromDiscord | <Elegantbeef> Or sublime's lsp implementation |
00:14:06 | FromDiscord | <Elegantbeef> With your project opened you do have multiple NimLsp's open in your task manager eh? |
00:16:11 | FromDiscord | <Ayy Lmao> It looks like there's only one actually |
00:16:39 | FromDiscord | <Elegantbeef> That's odd given the behaviour |
00:53:11 | FromDiscord | <michaelb.eth> I have a situation where calling `alloc` or `alloc0`, or `allocShared`, or `allocShared0` always crashes with SIGSEGV after a particular number of previous calls succeeded. This only happens with Nim 1.2, is working fine with Nim 1.4 and Nim 1.6 |
00:53:25 | FromDiscord | <michaelb.eth> (edit) "is" => "it's" |
00:54:19 | FromDiscord | <michaelb.eth> seems like it's probably a bug with Nim 1.2, but I'm not sure how to dig into it further, did go hunting in the issue tracker on GitHub and the forum |
00:54:41 | FromDiscord | <Rika> Sounds like the time to use bisect on the compiler then |
01:01:35 | FromDiscord | <Elegantbeef> You also can look at the generated code to see if it's sensible with `-d:danger` to reduce noise |
01:03:52 | FromDiscord | <Elegantbeef> Do you have a min repro? |
01:07:21 | FromDiscord | <ajusa> Is there a way to get the name and type of a variable that is passed into a template? |
01:07:45 | FromDiscord | <Elegantbeef> `astToStr()` for name and `typeof()` |
01:07:59 | FromDiscord | <ajusa> typeof is what I was missing, thanks! |
01:08:14 | FromDiscord | <Elegantbeef> you can do `template doThing(a: untyped{sym})` to force it to only accept symbols |
01:08:19 | FromDiscord | <Elegantbeef> Though that's subject to be removed |
02:04:39 | * | lucerne quit (Read error: Connection reset by peer) |
02:07:50 | * | lucerne joined #nim |
02:24:16 | FromDiscord | <ajusa> I'm starting to realize that I try to time when I work on Nim code to when Elegantbeef is online |
02:25:51 | FromDiscord | <Elegantbeef> I'm always on |
02:25:58 | * | ox is now known as oz |
02:25:58 | * | wyrd quit (Remote host closed the connection) |
02:26:11 | * | wyrd joined #nim |
02:54:35 | FromDiscord | <Bung> whats opposite operation of `nimble develop` ? |
03:19:02 | FromDiscord | <huantian> Remove it like any other package |
03:28:55 | FromDiscord | <Bung> that's not proper way I think, It assuming I dont have any comments on that dir |
03:30:10 | * | arkurious quit (Quit: Leaving) |
03:32:20 | FromDiscord | <Rika> Uninstall |
03:32:25 | FromDiscord | <Rika> Use the uninstall sub command |
03:32:42 | FromDiscord | <Rika> Specify @#head if need be |
03:36:50 | FromDiscord | <Bung> okay, that's make sense, thank you |
03:52:10 | FromDiscord | <elaykph> where's the docs for builtins :/ |
03:52:15 | FromDiscord | <elaykph> I can't seem to find it |
03:52:31 | FromDiscord | <elaykph> maybe it's just me blind again as usual |
03:53:44 | FromDiscord | <Elegantbeef> Do you mean keywords? |
03:53:51 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#lexical-analysis-identifiers-amp-keywords |
03:54:59 | FromDiscord | <Bung> `command line(1, 2) Error: invalid command line option: '--css'` I face this when use karax's karun |
03:55:39 | FromDiscord | <Bung> it used to work monthes ago |
03:57:49 | FromDiscord | <Bung> oh found I provide extro arg `-s` |
04:10:59 | * | lucerne quit (Remote host closed the connection) |
04:11:50 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
04:12:37 | * | lucerne joined #nim |
04:15:17 | * | Lord_Nightmare joined #nim |
04:47:02 | FromDiscord | <elaykph> In reply to @Elegantbeef "https://nim-lang.org/docs/manual.html#lexical-analy": works thx |
04:47:30 | FromDiscord | <Elegantbeef> Very few keywords cannot be overridden so it's hardly a concern |
05:56:17 | * | sagax quit (Quit: Konversation terminated!) |
06:12:13 | * | jmdaemon quit (Read error: Connection reset by peer) |
06:13:04 | * | jmdaemon joined #nim |
06:15:18 | * | vicecea quit (Remote host closed the connection) |
06:15:48 | * | vicecea joined #nim |
07:04:12 | FromDiscord | <Bung> is there cross platform , event based file watcher ? |
07:08:35 | * | slowButPresent quit (Quit: leaving) |
07:10:18 | FromDiscord | <Bung> @xflywind macos support has been done ? https://github.com/xflywind/fsnotify |
07:16:47 | FromDiscord | <baalajimaestro> sent a code paste, see https://paste.rs/vGX |
07:42:06 | * | lucerne quit (Remote host closed the connection) |
07:49:26 | * | lucerne joined #nim |
08:10:19 | * | toulene quit (Read error: Connection reset by peer) |
08:12:19 | * | toulene joined #nim |
08:12:51 | * | toulene quit (Read error: Connection reset by peer) |
08:16:41 | * | toulene joined #nim |
08:25:36 | FromDiscord | <rakgew> is there a way to retrieve fields directly from a typedesc? (without macro?) similar to .fieldPairs of an instantiated object, but just for the field names? |
08:26:11 | FromDiscord | <Elegantbeef> `for name, _ in obj.fieldPairs` đ |
08:30:38 | FromDiscord | <rakgew> on a typedesc? |
08:30:51 | FromDiscord | <rakgew> I get type mismatch for that.. |
08:31:12 | FromDiscord | <Elegantbeef> i resolved it you need `Type()` |
08:31:13 | FromDiscord | <rakgew> aahh wait. ok you instantiated it. I see. |
08:34:26 | FromDiscord | <Elegantbeef> you will probably want a variant that does `func doThing(myType: typedesc[ref object])` and `func doThing(myType: typedesc[object])` |
08:36:31 | FromDiscord | <dilawar (Dilawar Singh)> `fileExsits` seems like case-sensitive on Windows?! |
08:37:07 | FromDiscord | <xflywind> In reply to @Bung "<@!658563905425244160> macos support has": no |
08:37:27 | FromDiscord | <Elegantbeef> It calls https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfileattributesa so i doubt it is |
08:37:57 | FromDiscord | <rakgew> instantiating works well. if I wanted to access a field value of the object with a string is there an equivalent to python's getttr? like\: `getattr(Type, "field_name")` ? |
08:38:24 | FromDiscord | <Elegantbeef> I mean it doesnt make sense in Nim since it's static |
08:38:30 | FromDiscord | <Elegantbeef> So field access has to be done statically |
08:39:24 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3S6k |
08:40:03 | FromDiscord | <rakgew> I would like to loop over type and fill the values with user input.. |
08:40:19 | FromDiscord | <Elegantbeef> Ok so then why do you need to access by name |
08:40:37 | FromDiscord | <rakgew> so I ask them with stdin and then fill the value.. (if type matches) |
08:41:29 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/dfs |
08:41:36 | FromDiscord | <Elegantbeef> Then you can call this recursively |
08:42:08 | FromDiscord | <rakgew> ahh right - we have the field anyways! sry, I should have seen that. |
08:42:11 | FromDiscord | <rakgew> thank you!! |
08:42:21 | FromDiscord | <Elegantbeef> No problem |
08:43:10 | FromDiscord | <Elegantbeef> Really though i'd suggest a `proc getFromInput(val: var T)` so you can heavily customize this without manually dispatching |
08:43:28 | FromDiscord | <Elegantbeef> then inside you'd just do `getFromInput(field)` |
08:43:46 | FromDiscord | <rakgew> yes, that sound good! |
08:44:47 | FromDiscord | <Elegantbeef> If unclear `T` is just your type |
08:45:24 | FromDiscord | <rakgew> yes. luckily I currently only have string and int.. \:-D |
08:45:30 | FromDiscord | <Elegantbeef> So by default you'd implement it for all primitives, then just use `proc getFromInput(val: var object)` as the entry for default |
08:45:38 | FromDiscord | <Elegantbeef> Ah |
08:45:48 | FromDiscord | <Elegantbeef> Well if you ever want more it makes life easier |
08:46:12 | FromDiscord | <rakgew> exactly - I like the extendebility of that approach. |
08:48:12 | FromDiscord | <Elegantbeef> I love how simple it is but how extensible it is |
08:50:39 | FromDiscord | <dilawar (Dilawar Singh)> false alarm. I misread `walkDirRec` docs and assumed by default it only returns directory. Logic error from here on. All well now! |
08:50:56 | FromDiscord | <Elegantbeef> Would be odd to fix the windows directory system |
08:51:35 | FromDiscord | <dilawar (Dilawar Singh)> Thanks for reassurance. motivated me to dig a little deeper. |
08:51:46 | FromDiscord | <Elegantbeef> No problem |
08:52:00 | FromDiscord | <Elegantbeef> Looking at the source is always the best solution |
08:58:42 | FromDiscord | <rakgew> when I loop over an instantiated type via fieldPairs, I can `echo fieldName, fieldValue` but not with strformat\: `echo fmt"{fieldName} - {fieldValue}"`. it says `error generic instantiation of 'fmt'` is there another way needed to use fmt here? |
09:00:30 | FromDiscord | <Elegantbeef> name doesnt exist in the end, which is the problem |
09:01:12 | FromDiscord | <rakgew> ah? I thought it would be an empty string on generic instantiation? |
09:01:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3S6q |
09:01:49 | FromDiscord | <rakgew> I actually instantiated it before the loop |
09:01:52 | FromDiscord | <Elegantbeef> Nah the `field`/`fieldPairs` is unrolled so `name`/`field` dont really exist |
09:02:45 | FromDiscord | <rakgew> hmm.. why does it exist for echo then? |
09:02:56 | FromDiscord | <rakgew> but not for fmt? |
09:03:15 | FromDiscord | <Elegantbeef> Cause `name`/`field` are replaced by the compiler in that case |
09:03:39 | FromDiscord | <Elegantbeef> But the compiler cannot replace symbols it doesnt think exist since `fmt "{name}"` hides that the `name` is inside `fmt` |
09:04:20 | FromDiscord | <rakgew> ah ok, so optimizations behind the scenes? well fair enough. |
09:04:25 | FromDiscord | <Elegantbeef> No |
09:04:28 | FromDiscord | <Elegantbeef> Fmt is a macro |
09:04:43 | FromDiscord | <Elegantbeef> It's due to how fmt works and how the loop works |
09:05:15 | FromDiscord | <rakgew> ok, so the macro tries to use it, but the compiler says it does not exist. |
09:06:01 | FromDiscord | <Elegantbeef> Yea cause of how the unroll works there is no `name` or `field` variable so when fmt is expanded it's attempting to access a variable that doesnt exist |
09:06:49 | FromDiscord | <rakgew> I see. thank you so much! \:-D |
09:07:00 | FromDiscord | <Elegantbeef> No problem |
09:07:17 | FromDiscord | <Elegantbeef> It's a bit of a annoying problem, but not much of a solution really |
09:08:25 | FromDiscord | <rakgew> right, just from looking on my code, would have been nice to use fmt there. |
09:08:43 | FromDiscord | <rakgew> but it is not a biggie.. |
09:09:26 | FromDiscord | <Elegantbeef> you can also just do echo `name, ": ", field` |
09:10:11 | FromDiscord | <rakgew> yes, this is what I am now using.. |
09:12:23 | FromDiscord | <Elegantbeef> "This has been redundant information with Beef" |
09:14:55 | * | jjido joined #nim |
09:34:18 | * | brocc left #nim (#nim) |
09:39:21 | FromDiscord | <rakgew> is there way to somehow prefill a default string value when showing `stdin.readLine`? |
09:39:39 | FromDiscord | <Elegantbeef> What do you mean? |
09:40:25 | FromDiscord | <rakgew> I currently fall back to a default, when the user does not enter anything, but if the default text could be pre-entered it would be obvious what they get. |
09:40:51 | FromDiscord | <rakgew> like I use today's date if they do not enter anything for date |
09:41:14 | FromDiscord | <Elegantbeef> I'd personally output it like `Enter a date (13/03/22):` |
09:41:21 | FromDiscord | <rakgew> could today's date be 'pre-typed in'? |
09:42:49 | FromDiscord | <rakgew> right, I could put into the question as well. |
09:44:02 | FromDiscord | <Elegantbeef> You might be able to write to stdin but i dont know how |
09:44:41 | FromDiscord | <rakgew> ok, thx. |
09:49:57 | * | jmdaemon quit (Ping timeout: 272 seconds) |
09:55:22 | * | Gustavo6046 quit (Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world. <screw you aloo_shu my old line was better and more creative!>) |
10:46:15 | NimEventer | New thread by Mardiyah: Inserting single if statement into template, see https://forum.nim-lang.org/t/9004 |
10:52:22 | FromDiscord | <Bung> how to write -d:x=y in nims file ? |
10:52:51 | FromDiscord | <planetis> you need "" around the arguments I think |
10:54:16 | FromDiscord | <Bung> `switch("define", "release")` `proc switch(key: string; val = "")` |
10:56:32 | FromDiscord | <planetis> -d\:"foo" works too |
10:58:51 | FromDiscord | <Bung> hmm, `Error: undeclared identifier: 'd'` I think it works in .cfg |
11:00:53 | FromDiscord | <planetis> https://nim-lang.github.io/Nim/nims.html |
11:01:10 | FromDiscord | <planetis> sorry it's --define\:"x" |
11:02:22 | FromDiscord | <Bung> where do i put value |
11:07:33 | FromDiscord | <Bung> hmm works now, thanks |
11:08:30 | FromDiscord | <S3cur3Th1sSh1t> How would you port the following to Nim? `#define RVA(type, base_addr, rva) (type)(ULONG_PTR)((ULONG_PTR) base_addr + rva)` |
11:12:55 | FromDiscord | <Rika> do we assume `type` is a `typedesc`, `base_addr` is a `pointer`, and `rva` is an `int`? |
11:13:13 | FromDiscord | <Rika> what is ULONG_PTR? |
11:14:00 | FromDiscord | <Rika> a pointer represented as a ULONG? what length is this ULONG exactly? same as in 64 bit arch? |
11:25:41 | FromDiscord | <S3cur3Th1sSh1t> sent a long message, see http://ix.io/3S71 |
11:27:47 | FromDiscord | <S3cur3Th1sSh1t> sent a long message, see http://ix.io/3S72 |
11:28:28 | FromDiscord | <S3cur3Th1sSh1t> I cannot use untyped here for the values, this would only be possible for macros - from reading the docs. |
11:28:38 | FromDiscord | <Rika> proc no |
11:28:51 | FromDiscord | <Rika> ah well i guess it works |
11:29:18 | FromDiscord | <Rika> im not a windows programmer so i do not know these types |
11:29:42 | FromDiscord | <Rika> that works |
11:29:48 | FromDiscord | <S3cur3Th1sSh1t> How would I use this function as macro? |
11:29:54 | FromDiscord | <Rika> you dont need to |
11:30:05 | FromDiscord | <S3cur3Th1sSh1t> sent a long message, see http://ix.io/3S73 |
11:30:08 | FromDiscord | <Rika> thats wrong |
11:30:10 | FromDiscord | <Rika> use a template in that case |
11:30:22 | FromDiscord | <Rika> the proc works as any other proc except that the `atype` must be determined on compile time (of course) |
11:30:38 | FromDiscord | <S3cur3Th1sSh1t> sent a long message, see https://paste.rs/upt |
11:31:06 | FromDiscord | <Rika> im not sure if stropping works properly in templates so maybe |
11:31:10 | FromDiscord | <Rika> it probably does |
11:31:48 | FromDiscord | <S3cur3Th1sSh1t> What does stropping mean? I'm only hobbyist programmer đ |
11:31:54 | * | ltriant quit (Ping timeout: 272 seconds) |
11:32:11 | FromDiscord | <Rika> the `` around type |
11:32:24 | FromDiscord | <S3cur3Th1sSh1t> Ah, yeah I already used that. It's just ignored ^^ |
11:32:31 | FromDiscord | <S3cur3Th1sSh1t> Usable like a normal variable |
11:32:34 | FromDiscord | <Rika> ok |
11:32:37 | FromDiscord | <Rika> then its working yes |
11:34:18 | * | ltriant joined #nim |
11:37:50 | FromDiscord | <Bung> is nims broken , I get "\n none"' ,"\n 0"' |
11:38:03 | FromDiscord | <Rika> ? |
11:38:54 | * | ltriant quit (Ping timeout: 250 seconds) |
11:39:13 | FromDiscord | <Bung> sent a code paste, see https://paste.rs/Ymx |
11:39:48 | FromDiscord | <Bung> when I get these values from nim |
11:59:24 | FromDiscord | <soda> Is it really not possible to pass primitives by reference? đ€ |
12:00:05 | FromDiscord | <soda> what about a string? |
12:00:52 | FromDiscord | <konsumlamm> it is possible, via `var` |
12:01:02 | FromDiscord | <konsumlamm> but why exactly do you need to pass them by reference? |
12:01:18 | FromDiscord | <soda> What is the syntax for passing a reference to a proc? |
12:01:58 | FromDiscord | <konsumlamm> the paramater has to be a `var SomeType` |
12:02:09 | FromDiscord | <konsumlamm> then you just pass the argument like you normally would |
12:03:27 | FromDiscord | <soda> hmm |
12:03:56 | FromDiscord | <soda> doesn't seem to be right |
12:05:34 | FromDiscord | <soda> you mean â”proc someProc(str: var string) ? |
12:05:39 | FromDiscord | <konsumlamm> yes |
12:05:47 | FromDiscord | <soda> đ€ |
12:06:08 | FromDiscord | <soda> ah okay i understand |
12:08:31 | FromDiscord | <soda> So a custom object initialized as a ref is always heap allocated |
12:09:02 | FromDiscord | <soda> Are vars then all stack allocated? |
12:09:34 | FromDiscord | <Rika> a var object is stack |
12:09:40 | FromDiscord | <Rika> a var ref object is naturally still heap |
12:10:08 | FromDiscord | <Rika> but you can then edit the ref object being pointed to as well |
12:10:34 | FromDiscord | <soda> hmm okay makes sense |
12:23:46 | FromDiscord | <Phil> actually... wait, for my web-projects signal system I create a hashmap full of pointers to functions on start-up that may get called during runtime.â”Since pointers are untraced references... do I have to manually deallocate these pointers manually on shutdown? |
12:27:39 | FromDiscord | <Rika> `pointers to functions` as in `proc()`s? or literal `ptr`s? |
12:27:53 | FromDiscord | <Rika> `proc()` is ok, dont worry about those, i believe its no issue |
12:28:16 | * | lucerne quit (Read error: Connection reset by peer) |
12:28:58 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3S7c |
12:29:50 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3S7d |
12:29:56 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3S7d" => "https://play.nim-lang.org/#ix=3S7e" |
12:31:06 | FromDiscord | <Rika> Did you allocate anything |
12:31:11 | FromDiscord | <Rika> Like, anything at all |
12:31:18 | FromDiscord | <Rika> If no then nothing is there to free |
12:31:32 | FromDiscord | <Phil> You mean with calling "alloc" ? Then no |
12:31:52 | FromDiscord | <Rika> How do you set these pointers then |
12:34:30 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/yfY |
12:34:57 | FromDiscord | <Phil> Called like this:â”`connect(SignalType.stPostCreate, DiaryEntry, diaryEntryCreateSignal)` |
12:36:11 | FromDiscord | <Phil> Which is why I was under the impression that the underlying nim magic has some memory allocated somewhere to store the proc in, and then a second area of memory allocated for the Table of Pointer-Hashsets |
12:36:36 | FromDiscord | <Phil> (edit) "Which is why I was under the impression that the underlying nim magic has some memory allocated somewhere to store the proc ... in,(STORE)." added "(diaryEntryCreateSignal)" | "(diaryEntryCreateSignal)in, and then a second area of memory allocated for the Table of Pointer-Hashsets ... " added "(STORE)." |
12:36:54 | FromDiscord | <Phil> And I thought that maybe I have to dellocate the memory that the pointers take up or sth |
12:37:02 | FromDiscord | <Phil> (edit) "dellocate" => "deallocate" |
12:58:12 | * | dtomato quit (Quit: The Lounge - https://thelounge.chat) |
12:59:48 | * | dtomato joined #nim |
13:23:47 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/952557587373641749/imissyou.nim |
13:23:52 | FromDiscord | <retkid> discords nim parser |
13:23:57 | FromDiscord | <retkid> doesn't like """ """ |
13:24:58 | * | lucerne joined #nim |
13:50:27 | FromDiscord | <retkid> Ok so i have a really stupid problem right |
13:50:50 | FromDiscord | <retkid> ugh i know the aner |
13:50:51 | FromDiscord | <retkid> (edit) "aner" => "anwer" |
13:50:57 | FromDiscord | <retkid> its just a pita |
13:51:05 | FromDiscord | <retkid> (edit) "anwer" => "answer" |
13:51:10 | FromDiscord | <retkid> nevermind đ |
13:51:49 | FromDiscord | <enthus1ast> the nim html parser is not that great |
13:51:54 | FromDiscord | <enthus1ast> html/xml |
13:52:06 | FromDiscord | <enthus1ast> if you want to use this i would clean the html beforehand |
13:52:50 | FromDiscord | <enthus1ast> eg with html tidy |
13:56:52 | FromDiscord | <enthus1ast> or use the "html tokens" way araq describes in the forum (i cannot find the post....) |
13:57:55 | * | ltriant joined #nim |
14:03:54 | * | ltriant quit (Ping timeout: 272 seconds) |
14:20:18 | FromDiscord | <retkid> In reply to @enthus1ast "the nim html parser": well im using Q to avoid it |
14:21:48 | FromDiscord | <Rika> What is Q |
14:22:20 | FromDiscord | <retkid> q |
14:22:38 | FromDiscord | <retkid> https://github.com/OpenSystemsLab/q.nim |
14:48:28 | FromDiscord | <Patitotective> In reply to @retkid "doesn't like """ """": multiline comments neither |
14:50:02 | * | arkurious joined #nim |
14:50:06 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/952579311389528074/unknown.png |
14:50:21 | FromDiscord | <retkid> isn't that so readable |
15:08:38 | FromDiscord | <enthus1ast> @retkid\: q uses the default nim stuff |
15:08:50 | FromDiscord | <retkid> ah |
15:08:51 | FromDiscord | <enthus1ast> xmltree htmlparser |
15:08:59 | FromDiscord | <retkid> should we rise up and make our own parsser |
15:09:01 | FromDiscord | <retkid> (edit) "parsser" => "parser" |
15:09:29 | FromDiscord | <enthus1ast> It would be nice to have a really good html parser |
15:09:38 | FromDiscord | <retkid> in that script i was parsing twitches verbose fuck you randomly generated JS content |
15:09:39 | FromDiscord | <enthus1ast> But a big task imho |
15:09:55 | * | fowl quit (Quit: cya pals) |
15:10:07 | FromDiscord | <retkid> they didn't change the start of the header i needed tho >:) |
15:10:07 | * | lucerne quit (Remote host closed the connection) |
15:10:12 | FromDiscord | <retkid> (edit) "header" => "class" |
15:10:38 | FromDiscord | <enthus1ast> Maybe identify issues, create small test cases and open issues in the nim parsers |
15:11:11 | FromDiscord | <retkid> i wanna grow up and start developing for the community because treeform inspires me a lot |
15:11:22 | FromDiscord | <retkid> but im also busy and wanna do weirds hit |
15:11:24 | FromDiscord | <retkid> (edit) "weirds hit" => "weird shit" |
15:11:26 | FromDiscord | <retkid> đ |
15:12:20 | FromDiscord | <enthus1ast> Same, stupid work all the time đâ”(@retkid) |
15:12:25 | FromDiscord | <soda> Prioritize weirdness at all times |
15:13:20 | * | lucerne joined #nim |
15:13:23 | FromDiscord | <retkid> also due to life issues and depression productivity went:â”đ (whistle bomb noise) |
15:17:52 | * | fowl joined #nim |
15:22:35 | FromDiscord | <soda> what's a cool project? |
15:22:46 | FromDiscord | <soda> something to make to further solidify my understanding of nim |
15:23:09 | FromDiscord | <soda> lookin for ideas |
15:23:54 | FromDiscord | <retkid> In reply to @soda "something to make to": i hoard my ideas for myselfg |
15:23:55 | FromDiscord | <retkid> (edit) "myselfg" => "myself" |
15:23:56 | FromDiscord | <retkid> >:) |
15:24:29 | FromDiscord | <auxym> in my experience side projects only work if you're really interested in them, so it's highly personal |
15:24:45 | FromDiscord | <retkid> nah man |
15:24:50 | FromDiscord | <retkid> im obsessive |
15:24:58 | FromDiscord | <retkid> i complete projects if they are possible to complete |
15:25:01 | FromDiscord | <auxym> if you're just looking for something to do though, do advent of code maybe? |
15:25:10 | FromDiscord | <soda> In reply to @auxym "if you're just looking": oh good idea |
15:25:11 | FromDiscord | <retkid> i find it very very very stressful to have a project unfinished |
15:25:18 | FromDiscord | <retkid> for some reason |
15:25:45 | FromDiscord | <auxym> eh, I get obsessive when I'm really into something. At the opposite end I have many half-finished projects that I have fully lost interest in. |
15:26:08 | FromDiscord | <retkid> I have an unfinished project that im really sad about |
15:26:19 | FromDiscord | <Rika> then do it and be not sad about it |
15:26:19 | FromDiscord | <soda> In reply to @retkid "i hoard my ideas": Non-free license ur ideas |
15:26:22 | FromDiscord | <retkid> Im pretty sure I've come to the conclusion its mathematically impossible |
15:26:34 | FromDiscord | <Rika> u dont know that until u formally prove it |
15:26:41 | FromDiscord | <soda> personally i don't really associate programming with emotions lol |
15:26:51 | FromDiscord | <soda> motivation and interest doesn't really have much to do with it |
15:26:52 | FromDiscord | <soda> maybe weird |
15:27:02 | FromDiscord | <Rika> In reply to @retkid "Im pretty sure I've": dont let ur conjectures be conjectures |
15:27:16 | FromDiscord | <retkid> In reply to @Rika "u dont know that": OK Its practically mathematically impossible. It got to a point where it was it was 3 weeks of just trying new ideas to no better rseults |
15:27:18 | FromDiscord | <retkid> (edit) "rseults" => "results\" |
15:27:19 | FromDiscord | <auxym> In reply to @soda "oh good idea": Yeah, in addition to improving your Nim, you'll learn about ds/algos. Highly recommend looking into other people's nim solution once you're done, too, so you can see patterns that you might no know about |
15:27:37 | * | toulene quit (Read error: Connection reset by peer) |
15:27:48 | FromDiscord | <Rika> In reply to @retkid "OK Its practically mathematically": my point still stands, just because you think you cant do it doesnt mean its impossible to do; you have to be able to explain why it cant be done |
15:27:57 | FromDiscord | <auxym> In reply to @Rika "u dont know that": per the incompleteness theorem, it might be impossible to prove đ |
15:28:01 | FromDiscord | <soda> In reply to @auxym "Yeah, in addition to": I've done a lot of this stuff in C++ which makes it a good idea to re-attempt stuff in nim |
15:28:09 | FromDiscord | <soda> already have a point of comparison |
15:28:17 | FromDiscord | <retkid> In reply to @Rika "my point still stands,": I guess it can be done but not efficiently. My objectives where extremely hard to do |
15:28:23 | FromDiscord | <Rika> In reply to @auxym "per the incompleteness theorem,": well then we just get another np complete problem and you can set a bounty xd |
15:28:43 | FromDiscord | <Rika> In reply to @retkid "I guess it can": well now most of us are probably morbidly curious what you were trying to do |
15:29:07 | FromDiscord | <soda> btw, is there a way to have '->' instead if ':' for proc return declarations? Like with lambdas? |
15:29:08 | FromDiscord | <retkid> N o p e |
15:29:15 | * | toulene8 joined #nim |
15:29:22 | FromDiscord | <auxym> In reply to @soda "btw, is there a": check out the sugar module |
15:29:29 | FromDiscord | <soda> In reply to @auxym "check out the sugar": i don't work with normal proc afaik |
15:29:34 | FromDiscord | <soda> (edit) "i" => "it" |
15:29:44 | FromDiscord | <soda> just closures |
15:30:01 | FromDiscord | <Rika> then no |
15:30:02 | FromDiscord | <retkid> In reply to @Rika "well now most of": I will tell you after I get out my brute force hammer and databases of data and show you that I cant find any correlation in these numbers to calculate the values in a fast way without gpu acceleration |
15:30:09 | FromDiscord | <Rika> you can prolly make a macro for that |
15:30:19 | FromDiscord | <soda> oh yeh hmm |
15:30:24 | FromDiscord | <soda> haven't looked into macros at all yet |
15:30:27 | FromDiscord | <soda> err |
15:30:29 | FromDiscord | <Rika> i will condemn you if you do |
15:30:38 | FromDiscord | <soda> err unless you're not talking to me? |
15:30:44 | FromDiscord | <retkid> they are |
15:30:45 | FromDiscord | <Rika> i am talking to you |
15:30:51 | FromDiscord | <soda> why would u condemn it? |
15:30:53 | FromDiscord | <retkid> macros are the cool stuff that -> are |
15:31:05 | FromDiscord | <retkid> (or are they templates?) |
15:32:13 | FromDiscord | <Rika> In reply to @soda "why would u condemn": because its cursed and unnecessary imo |
15:32:30 | FromDiscord | <auxym> https://siraben.dev/2022/03/01/tree-sitter.html anyone feel like writing a neovim treesitter grammar for nim? |
15:32:38 | FromDiscord | <Rika> nope |
15:32:41 | FromDiscord | <Rika> no thanks |
15:32:59 | FromDiscord | <auxym> same, hence why I'm trying to lure others into doing it |
15:33:08 | FromDiscord | <Rika> someone already tried and died trying |
15:33:11 | FromDiscord | <Rika> we dont need more casualties |
15:33:19 | FromDiscord | <soda> In reply to @auxym "https://siraben.dev/2022/03/01/tree-sitter.html any": maybe an emacs package |
15:34:23 | FromDiscord | <auxym> tried emacs a couple times, could never get into it. first time spacemacs on linux w/ nim package, crashed often, second time doom on windows, is slow as a dog |
15:34:33 | FromDiscord | <soda> doom emacs |
15:34:39 | FromDiscord | <Rika> he just said that |
15:34:45 | FromDiscord | <Rika> "second time doom on windows" |
15:34:57 | FromDiscord | <soda> yep |
15:35:02 | FromDiscord | <soda> just saying what i use |
15:35:09 | FromDiscord | <soda> you gotta run it as a client |
15:35:20 | FromDiscord | <soda> but i only know how to do it on windows, then it's very fast |
15:35:26 | FromDiscord | <auxym> yeah, apparently emacs being super-slow on windows is a known thing. If I'm going to invest time into learning a complex editor, it has to work well cross-platform. neovim is quite fine on linux and windows |
15:36:41 | FromDiscord | <Rika> In reply to @soda "you gotta run it": what does this mean? |
15:36:50 | FromDiscord | <Rika> is this related to the emacs is an os meme |
15:36:54 | FromDiscord | <Rika> does emacs secretly run a server |
15:36:54 | FromDiscord | <soda> emac --daemon |
15:37:00 | FromDiscord | <soda> (edit) "emac --daemon" => "emacs--daemon" |
15:37:02 | FromDiscord | <Rika> thats fuckin cursed id say |
15:37:06 | FromDiscord | <soda> (edit) "emacs--daemon" => "emacs --daemon" |
15:37:11 | FromDiscord | <soda> no it's got nothing to do with that |
15:37:24 | FromDiscord | <Rika> okay |
15:37:30 | FromDiscord | <soda> it just lets you load your emacs config only once and spawn clients quickly |
15:37:34 | FromDiscord | <Rika> okay |
15:37:37 | FromDiscord | <Rika> i see |
15:45:40 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/952593293756203018/unknown.png |
15:45:58 | FromDiscord | <retkid> I hope if anyone finds my repo and they see this, they giggle as much as I did |
15:53:43 | * | toulene8 quit (Read error: Connection reset by peer) |
15:55:07 | * | toulene joined #nim |
15:55:25 | * | slowButPresent joined #nim |
15:59:06 | * | krux02 joined #nim |
16:06:30 | FromDiscord | <auxym> do nim seqs ever shrink the internal buffer? eg if you pop out half the items? Or they only grow? |
16:17:21 | * | ltriant joined #nim |
16:22:17 | FromDiscord | <michaelb.eth> sent a long message, see http://ix.io/3S8d |
16:22:29 | * | ltriant quit (Ping timeout: 252 seconds) |
16:23:14 | FromDiscord | <soda> Oh nice. tbh doom's got a few hundred more packages that it needs |
16:24:38 | FromDiscord | <Rika> In reply to @auxym "do nim seqs ever": only grow |
16:25:30 | FromDiscord | <michaelb.eth> preludeâs been around longer I think (Iâve been using it since 2013 iirc), and while itâs evolved over the years the maintainer has stuck to his principles of keeping it lightweight |
16:25:57 | * | dtomato quit (Quit: The Lounge - https://thelounge.chat) |
16:26:26 | * | dtomato joined #nim |
16:26:32 | FromDiscord | <soda> I will def check it out |
16:26:52 | FromDiscord | <soda> been considering going with vanilla emacs and adding my own packages, but this might be a nice alternative |
16:32:57 | FromDiscord | <michaelb.eth> sent a long message, see https://paste.rs/urW |
16:33:08 | FromDiscord | <soda> oh absolutely |
16:33:11 | FromDiscord | <michaelb.eth> (edit) "http://ix.io/3S8g" => "https://paste.rs/d5t" |
16:33:17 | FromDiscord | <soda> it's by far the best git fronted i've used |
16:33:27 | FromDiscord | <michaelb.eth> (edit) "https://paste.rs/4VD" => "https://paste.rs/M3q" |
16:33:29 | FromDiscord | <soda> (edit) "fronted" => "frontend" |
16:33:34 | FromDiscord | <soda> i also really like org mode and elfeed |
16:35:38 | FromDiscord | <soda> sent a code paste, see https://paste.rs/9bn |
16:35:41 | FromDiscord | <soda> dude this is so nice |
16:36:10 | FromDiscord | <Rika> your return statements are unnecessary, you can use implicit return |
16:36:18 | FromDiscord | <soda> yeah i just used to it |
16:36:24 | FromDiscord | <Rika> ok |
16:36:25 | FromDiscord | <soda> but noted |
16:36:50 | FromDiscord | <soda> probably a good idea to write nim in the nim way |
16:37:01 | FromDiscord | <Rika> well theres not really a nim way thats the thing |
16:37:14 | FromDiscord | <soda> yea true with the metaprogramming stuff especially |
16:37:37 | FromDiscord | <soda> but omitting the return statement does give a more accurate way of how the code transpiles i think |
16:39:16 | FromDiscord | <Rika> eh i dont see how |
16:39:28 | FromDiscord | <Rika> ~~btw people will get mad at you if you call it transpiling~~ |
16:40:21 | FromDiscord | <soda> hmm. well i assume the cost of the function pointer is omitted by literally replacing it with contents of the proc block, but i may be wrong |
16:40:26 | FromDiscord | <soda> In reply to @Rika "~~btw people will get": lol why is that |
16:41:09 | FromDiscord | <soda> (edit) "hmm. well i assume the cost of the function pointer is omitted by literally replacing it with contents of the proc block, ... but" added "making the 'return' not mean anything beyond serving programmer, " |
16:41:19 | FromDiscord | <Rika> negative connotation of the word really |
16:41:48 | FromDiscord | <soda> hmm okay |
16:41:54 | FromDiscord | <soda> also noted |
16:42:03 | FromDiscord | <Rika> In reply to @soda "hmm. well i assume": procedures arent usually inlined unless the compiler deems it should |
16:42:23 | FromDiscord | <soda> i see |
16:42:47 | FromDiscord | <retkid> sent a code paste, see https://paste.rs/i9E |
16:43:16 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3S8j |
16:43:23 | FromDiscord | <konsumlamm> transpiling implies that the compiler just does source-to-source translation without optimizing anything or checking much, which isn't true for Nim |
16:43:28 | FromDiscord | <retkid> I could write one easily, but it should be in sugar right? |
16:44:07 | FromDiscord | <soda> In reply to @konsumlamm "transpiling implies that the": So what's the more accurate alternative? |
16:44:37 | FromDiscord | <konsumlamm> "compiling" |
16:45:31 | FromDiscord | <soda> okay |
16:47:02 | FromDiscord | <soda> Do i need an external package to work with opengl? |
16:47:22 | FromDiscord | <michaelb.eth> re: return, see https://status-im.github.io/nim-style-guide/language.result.htmlâ”â”The top part could be worded better: âprosâ is âpros of using resultâ, âconsâ is âcons of using resultâ. |
16:49:59 | FromDiscord | <retkid> looks like there isn't |
16:49:59 | FromDiscord | <retkid> ugh |
16:50:52 | FromDiscord | <soda> In reply to @retkid "looks like there isn't": sorry i dont know any js |
16:51:04 | FromDiscord | <retkid> basically |
16:51:08 | FromDiscord | <retkid> .some(x=>) |
16:51:18 | FromDiscord | <retkid> returns a bool if any criteria is met in an array |
16:52:04 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3S8o |
16:52:05 | FromDiscord | <retkid> prints true |
16:52:27 | FromDiscord | <michaelb.eth> std/sequtils any, I think |
16:52:47 | FromDiscord | <michaelb.eth> https://nim-lang.org/docs/sequtils.html#any%2CopenArray%5BT%5D%2Cproc%28T%29 |
16:52:51 | FromDiscord | <retkid> đ it hid under my nose |
17:05:29 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
17:11:05 | FromDiscord | <retkid> anyone got a cleaner way to do this |
17:11:24 | FromDiscord | <retkid> sent a code paste, see https://paste.rs/am2 |
17:13:07 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3S8B |
17:13:08 | FromDiscord | <retkid> thats more compact but less readable idk |
17:13:10 | FromDiscord | <huantian> start = x== 0 |
17:13:27 | FromDiscord | <huantian> ending = x == endy |
17:13:54 | FromDiscord | <retkid> I like the way you think |
17:13:57 | FromDiscord | <huantian> (edit) "x==" => "x ==" |
17:14:39 | FromDiscord | <retkid> though I think thats less readable |
17:14:55 | FromDiscord | <retkid> but its very smart |
17:15:15 | FromDiscord | <huantian> Perhaps a different variable name would help |
17:15:18 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/952615850551181352/unknown.png |
17:15:25 | FromDiscord | <retkid> i see we had a similar childhood |
17:15:52 | FromDiscord | <huantian> Heh modded mc eh? |
17:16:11 | FromDiscord | <retkid> i watched him like 1.6.4-1.8.9 |
17:16:18 | FromDiscord | <retkid> rip witchery đ |
17:16:31 | FromDiscord | <huantian> Witchery was cool |
17:16:48 | FromDiscord | <retkid> its cool how many modders can tolerate java |
17:17:08 | FromDiscord | <retkid> I would have appreciated more mods as a kid if i wasn't coding in lua |
17:18:43 | FromDiscord | <huantian> Heh java is just fine imo |
17:18:54 | FromDiscord | <huantian> Heard good stuff about kotlin tho |
17:19:01 | FromDiscord | <retkid> Kotlin is cool |
17:19:06 | FromDiscord | <retkid> its much more freeing |
17:20:30 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/952617158989447198/unknown.png |
17:21:17 | FromDiscord | <huantian> I donât understand how people make large projects in lua though, thatâs something I probably could not do |
17:22:15 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3S8D |
17:22:24 | FromDiscord | <retkid> comment will remind me when i forget tomorrow |
17:22:26 | FromDiscord | <retkid> >:) |
17:23:58 | FromDiscord | <huantian> Perhaps you can assign the two comparisons to a variable with a name that can remind you what they are |
17:24:15 | FromDiscord | <retkid> this makes sense to me |
17:24:17 | FromDiscord | <huantian> isFirstElementâ”isLastElement |
17:24:40 | FromDiscord | <retkid> perhaps |
17:24:45 | FromDiscord | <retkid> đ€ |
17:25:15 | FromDiscord | <huantian> I mean the current setup is fine if you like it lol |
17:25:34 | FromDiscord | <retkid> I shall consume grilled cheese like a child and come back |
17:25:41 | FromDiscord | <retkid> it will enlighten me |
17:48:50 | FromDiscord | <sOkam!> In reply to @retkid "": those do be facts |
17:49:12 | FromDiscord | <sOkam!> goes both ways đ |
18:02:03 | FromDiscord | <huantian> Botania is a QoL mod |
18:02:17 | NimEventer | New question by pietroppeter: How to implement a macro to apply a template repeatedly with some common and some varying arguments, see https://stackoverflow.com/questions/71459423/how-to-implement-a-macro-to-apply-a-template-repeatedly-with-some-common-and-som |
18:28:03 | FromDiscord | <S3cur3Th1sSh1t> One more noobie question from my side. I'm often facing the situation, that procs which are defined later in the same file cannot be resolved when compiling. Are there any flags or something so that the order of the procs is ignored? |
18:31:18 | FromDiscord | <soda> prob notâ”use a forward declaration |
18:34:31 | FromDiscord | <S3cur3Th1sSh1t> I have the problem that one calls another which calls the first đ€ |
18:35:09 | FromDiscord | <S3cur3Th1sSh1t> They call each other in some cases so both need the other one to be declared first. |
18:35:26 | * | retronav joined #nim |
18:36:09 | FromDiscord | <soda> sent a code paste, see https://paste.rs/g9v |
18:36:16 | FromDiscord | <soda> a forward declaration would fix this issue |
18:36:35 | FromDiscord | <S3cur3Th1sSh1t> Ah, okay. Now I understand it. |
18:36:41 | FromDiscord | <soda> but whatever you are doing could probably be re-written to avoid this |
18:36:54 | FromDiscord | <soda> it's usually not a good idea to have cyclic dependencies like that |
18:40:25 | Amun-Ra | S3cur3Th1sSh1t: there is experimental feature "codeReordering" |
18:40:34 | Amun-Ra | if won't help with cyclic dependencies tho |
18:42:33 | FromDiscord | <S3cur3Th1sSh1t> In reply to @soda "it's usually not a": Thank you! đ I'll also re-think about the implementation |
18:44:14 | Amun-Ra | S3cur3Th1sSh1t: you can have forward proc declarations in nim |
18:46:14 | Amun-Ra | S3cur3Th1sSh1t: https://play.nim-lang.org/#ix=3S90 |
18:46:57 | Amun-Ra | and if that's a mutual dependency of two types in one type block - that's builtin |
18:52:25 | * | Figworm quit (Quit: Figworm) |
18:53:29 | FromDiscord | <planetis> Man new concepts work for me! |
18:53:49 | FromDiscord | <planetis> about freaking time something works first try |
19:20:53 | FromDiscord | <michaelb.eth> is there a writeup on what's changed in concepts? when you say "new concepts" is that something that's in 1.6 or not released yet? |
19:23:50 | Amun-Ra | new syntax is the only thing I know that changed (apart from Self) |
19:36:18 | FromDiscord | <planetis> nope |
19:36:47 | FromDiscord | <planetis> and I kind of take it back, I can't have openarray[MyConcept] that doesn't compile |
19:37:30 | FromDiscord | <planetis> it's mostly two rfcs https://github.com/nim-lang/RFCs/issues/168 and another one about serializing json |
19:37:35 | FromDiscord | <planetis> there are mostly unimplemented |
19:44:51 | FromDiscord | <planetis> https://play.nim-lang.org/#ix=3S9i |
19:54:06 | FromDiscord | <planetis> I figured out I can have both seq[float32] and float32 match for ShaderV so it works |
19:54:22 | FromDiscord | <planetis> but it's not how I wanted to express that |
20:18:55 | * | ltriant joined #nim |
20:23:05 | FromDiscord | <soda> In reply to @michaelb.eth "Emacs Prelude is another": Thanks for this. Been looking for something like it for a while now. |
20:23:40 | * | ltriant quit (Ping timeout: 250 seconds) |
20:24:03 | FromDiscord | <michaelb.eth> glad you like it, has certainly served me well, and it's easy to customize, whether modifying prelude itself or putting `.el`modules in `personal/` dir |
20:31:59 | FromDiscord | <soda> Yeah trying to get the hang of it. Doom emacs has some features i would like to emulate, but i really appreciate how minimal it is. |
20:46:36 | * | jjido joined #nim |
21:07:59 | NimEventer | New thread by Planetis: Naylib - yet another raylib wrapper becomes available, see https://forum.nim-lang.org/t/9005 |
21:19:25 | FromDiscord | <Forest> Does anyone have an example of a physics engine implemented in Nim? (Preferably with it being simple to use another engine) |
21:42:35 | * | wyrd quit (Ping timeout: 240 seconds) |
21:44:42 | * | wyrd joined #nim |
21:48:55 | * | ltriant joined #nim |
22:30:02 | * | jmdaemon joined #nim |
22:49:32 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
22:50:12 | * | ltriant quit (Ping timeout: 272 seconds) |
23:00:59 | FromDiscord | <michaelb.eth> is there a way at compile-time in a normal `.nim` file (i.e. not NimScript) to get the path for the nimcache dir? |
23:02:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/UXj |
23:04:03 | * | vicecea quit (Remote host closed the connection) |
23:04:34 | * | vicecea joined #nim |
23:05:05 | FromDiscord | <Elegantbeef> Think that module is 1.6 so as you're probably on 1.2(damn status đ ) you may just have to assume it all and do `getCacheDir() / "nim"` with `getProjectPath` from `macros` |
23:09:54 | FromDiscord | <michaelb.eth> thanks! |
23:09:56 | * | jjido joined #nim |
23:10:05 | FromDiscord | <auxym> hey beef, do you have docs or a quick getting started example for micros? Or still wip? I'm looking into implementing a tiny dsl with a macro and micros seems like it could help. |
23:10:26 | FromDiscord | <michaelb.eth> for many projects lately (e.g. standalone libs) we test against 1.2, 1.4, and 1.6 |
23:10:38 | FromDiscord | <michaelb.eth> (edit) "for many projects lately (e.g. standalone libs) ... we" added "at Status" |
23:10:39 | FromDiscord | <Elegantbeef> Tests are the best way to see how to use micros |
23:11:13 | FromDiscord | <auxym> thanks, I'll have a look |
23:11:14 | FromDiscord | <Elegantbeef> The API is rather ok, some things might change slightly, but for the most part i have tests for the API which should show how to use i t |
23:12:24 | FromDiscord | <Elegantbeef> I do need to make a case statement macro still so i can allow dispatching on the NimNode |
23:14:09 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/XD6 |
23:14:46 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3S9Y |
23:15:11 | FromDiscord | <Elegantbeef> Hey i was just joking, dont bring facts here!â”(@michaelb) |
23:15:22 | FromDiscord | <michaelb.eth> lol |
23:17:44 | FromDiscord | <Elegantbeef> And auxym feel free to PR anything to micros that expands the API, it's relatively simple to expand |
23:17:55 | FromDiscord | <michaelb.eth> hey, nice, it's working the same on 1.2.18, 1.4.8 and 1.6.4 |
23:18:02 | FromDiscord | <michaelb.eth> that makes life simpler |
23:18:15 | FromDiscord | <Elegantbeef> I basically just want to get away from `myNimNode[1][3][0][3]` shit |
23:18:20 | FromDiscord | <Elegantbeef> Congrats |
23:18:21 | * | arkurious quit (Quit: Leaving) |
23:19:16 | FromDiscord | <Elegantbeef> Cause this API is nice and nifty đ https://github.com/beef331/micros/blob/master/tests/test1.nim#L66-L86 |
23:24:24 | FromDiscord | <Elegantbeef> @auxym\: if you have any questions feel free to ask |
23:25:10 | FromDiscord | <auxym> ty! |
23:26:07 | FromDiscord | <auxym> and yes, I'm looking to get away from manually checking if every nimnode passed in is what I expected, and using {.error.} everywhere |
23:26:48 | FromDiscord | <Elegantbeef> Ah yea the `utils` module has some helpful templates |
23:27:10 | FromDiscord | <Elegantbeef> https://github.com/beef331/micros/blob/master/src/micros/definitions/routines.nim#L13-L20 for an api usage of them |
23:27:45 | FromDiscord | <Elegantbeef> You can also do like `n.checkit 1..3, {nnkStmtList, nnkIdent, nnkIntLit}` for instance |
23:30:45 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
23:31:43 | * | Gustavo6046 joined #nim |
23:33:06 | FromDiscord | <Elegantbeef> What's the DSL for anyway? |
23:42:36 | FromDiscord | <auxym> toying around with a macro that generates a cooperative scheduler (/ event queue-ish thing) for embedded applications |
23:43:08 | FromDiscord | <Elegantbeef> Ah |
23:59:51 | * | vicfred joined #nim |