00:00:11 | * | teal joined #nim |
00:02:34 | * | teal quit (Client Quit) |
00:03:56 | * | Figworm quit (Quit: Figworm) |
00:10:59 | * | teal joined #nim |
00:12:39 | * | Figworm joined #nim |
00:14:25 | lain | so I'm looking at "view types"... can these be used in multithreading? ( https://nim-lang.github.io/Nim/manual_experimental.html#view-types ) |
00:22:36 | leorize[m] | not now, they are very unstable at the moment |
00:23:19 | * | teal quit (Quit: WeeChat 3.1) |
00:24:18 | lain | so like, in what situation would you use view types? |
00:26:11 | leorize[m] | when you want a (mutable) view to your array, seq, string, you name it |
00:26:31 | * | vicfred quit (Quit: Leaving) |
00:27:03 | leorize[m] | it's a very useful feature, just incomplete right now |
00:27:36 | FromDiscord | <ElegantBeef> It's also pretty good for noncopying procedures like `strutils` but without allocating new strings |
00:28:17 | FromDiscord | <exelotl> It's still my most anticipated feature of the language haha |
00:28:45 | lain | aha, ok I can see it now, thanks :3 |
00:30:08 | FromDiscord | <ElegantBeef> https://github.com/beef331/strviewutils if you want to see the usage of it in a "real" library š |
00:31:29 | lain | nice |
00:32:08 | ForumUpdaterBot | New thread by Jrenner: Is it possible to have an embedded Nimscript interpreter when compiling with --app:lib ?, see https://forum.nim-lang.org/t/7881 |
00:52:48 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
00:53:07 | * | njoseph joined #nim |
01:23:05 | FromDiscord | <JSONBash> @ElegantBeef I was wondering if you could give me some guidance with an error I am having? |
01:23:13 | * | leorize joined #nim |
01:23:25 | FromDiscord | <ElegantBeef> Lol acting like you didnt just dm me that question š |
01:23:39 | FromDiscord | <ElegantBeef> Pitter patter let's get at 'er |
01:23:41 | FromDiscord | <JSONBash> cats outta the bag lol |
01:25:05 | FromDiscord | <JSONBash> sent a code paste, see https://paste.rs/pGa |
01:25:44 | FromDiscord | <JSONBash> sent a code paste, see https://play.nim-lang.org/#ix=3kII |
01:26:13 | FromDiscord | <JSONBash> sent a code paste, see https://paste.rs/GOh |
01:26:52 | FromDiscord | <JSONBash> sent a code paste, see https://paste.rs/fQV |
01:27:46 | FromDiscord | <JSONBash> but if i remove the line accessing affWords in the doAnalysisOnText I don't get the error. I'm thinking it's becuase that fn is inside a thread and cannot access the var outside it? im not sure though |
01:29:03 | FromDiscord | <ElegantBeef> If you're certain it's threadsafe you can override the thread analysis with `{.cast(gcSafe).}:` and put the code that's causing it inside |
01:29:29 | FromDiscord | <ElegantBeef> I dont know about using async + threading much |
01:30:03 | FromDiscord | <JSONBash> how might I be certain? make sure it doesnt mutate anything outside of it? |
01:30:10 | FromDiscord | <JSONBash> (thank you for that help) |
01:30:37 | FromDiscord | <ElegantBeef> Well knowing what you're doing and the implications of such |
01:30:49 | FromDiscord | <JSONBash> haha fair enough |
01:32:32 | FromDiscord | <JSONBash> ill give it a go thanks! |
02:02:23 | FromDiscord | <reilly> sent a code paste, see https://paste.rs/1xH |
02:02:40 | FromDiscord | <reilly> No matter how much I work with async, it always manages to give me trouble. |
02:03:52 | FromDiscord | <ElegantBeef> Cause async is done using macros so issues that pop up appear in the macro impl |
02:04:36 | FromDiscord | <reilly> I just realized, I'm dumb as usual and forgot the `{.async.}`. At least asking for help makes me figure it out myself. |
02:08:36 | * | johnnynitwits quit (Quit: Bridge terminating on SIGTERM) |
02:09:04 | * | johnnynitwits joined #nim |
02:24:34 | ForumUpdaterBot | New thread by Masiarek2: Echo isAlphaAscii("Ä
") - expecting false (instead of error), see https://forum.nim-lang.org/t/7882 |
02:31:33 | * | leorize quit (Ping timeout: 240 seconds) |
02:37:54 | * | leorize joined #nim |
02:47:06 | * | thomasross quit (Ping timeout: 260 seconds) |
02:47:18 | * | Tlangir joined #nim |
02:49:52 | * | merlin_the_beard quit (Ping timeout: 252 seconds) |
04:03:17 | * | Tlanger joined #nim |
04:05:45 | * | Tlangir quit (Ping timeout: 252 seconds) |
04:22:32 | * | rockcavera quit (Ping timeout: 240 seconds) |
04:40:36 | * | letto quit (Quit: Konversation terminated!) |
05:03:43 | * | narimiran joined #nim |
05:05:24 | * | mindhunter0x joined #nim |
05:07:17 | * | xet7 quit (Quit: Leaving) |
06:23:03 | * | teal joined #nim |
06:25:37 | saem | Beef: 3000 tests, and they run faster than they take to compile. :D |
06:26:31 | * | xet7 joined #nim |
06:28:47 | FromDiscord | <ElegantBeef> Lol |
06:29:22 | FromDiscord | <ElegantBeef> There is a glaring flaw with my macro and the current way arbitraries are made, so will have to resolve that š |
06:30:47 | FromDiscord | <ElegantBeef> But hey i might have resolved the CI failing, though i dont remove the flag, so that's awful |
06:31:13 | * | Vladar joined #nim |
06:37:20 | * | teal quit (Quit: WeeChat 3.1) |
06:40:52 | saem | Doheth |
06:41:35 | saem | I didn't notice the flaw. It's late so I'm extra slow. |
06:44:41 | FromDiscord | <ElegantBeef> Really it's my bad š |
06:45:19 | FromDiscord | <ElegantBeef> I was trying to resolve it but i couldnt think of the best way, so was going to mention it, but got lost in trying to get the compiler to build with this inference |
06:52:36 | saem | I see the value being uint32, but that seems to never get used. Not sure what else the issue might be. |
06:56:29 | FromDiscord | <ElegantBeef> it's cause i'm using the `initArbitrary` procedure |
06:57:34 | FromDiscord | <ElegantBeef> My idea is mostly we use `Arbitrary[tuple]` for it, but the generators arent really accessible to make a `Shrinkable[tuple] |
06:59:24 | saem | Ah, yeah so the input shrinking can't happen on the whole tuple, it needs to happen on the shrinkable inputs. |
07:00:09 | saem | I know, that's weird, but the tuple is a borderline hack. |
07:00:32 | FromDiscord | <ElegantBeef> No i understand the main issue, is just you need the generics for things like report and stuff |
07:00:53 | FromDiscord | <ElegantBeef> So tuple seemed to be the most sensible, but painted myself in a corner |
07:02:15 | saem | Yeah, wish there was a better way to deal with that, maybe if I allocate memory a bit differently and hold onto failed result sets as packed bytes somehow. |
07:03:21 | saem | That way the report doesn't really need to know directly, could refer to something that can hide the generic bits. |
07:07:06 | FromDiscord | <ElegantBeef> Well the report is just for showing fails right? |
07:09:02 | FromDiscord | <ElegantBeef> If that's the case we could just stringify the results and store them in a string or seq of themthere |
07:09:02 | saem | Other stats too, but the generic part is definitely the counter example |
07:09:35 | * | letto joined #nim |
07:09:48 | saem | Yeah, that's true, precluded some options but not the end of the world for now. |
07:11:39 | saem | Maybe getImpl or a relative might allow fetching the type info for the tuple fields? Then generating vars/shrinkable shouldn't be an issue. |
07:12:44 | saem | I remember bits and pieces of that from CPS, I need to look again. |
07:13:13 | FromDiscord | <ElegantBeef> Yea it could work, gotta reason about shrinkables a bit more |
07:14:32 | saem | OK, I should get some sleep, maybe I'll figure something out tomorrow. |
07:14:50 | FromDiscord | <ElegantBeef> Buh bye |
07:29:01 | * | PMunch joined #nim |
07:32:47 | * | NimBot joined #nim |
07:40:53 | * | aeverr quit (Ping timeout: 268 seconds) |
07:57:51 | * | hyiltiz quit (Ping timeout: 252 seconds) |
07:58:25 | * | hyiltiz joined #nim |
07:58:25 | * | hyiltiz quit (Changing host) |
07:58:25 | * | hyiltiz joined #nim |
08:19:18 | * | mindhunter0x quit (Quit: leaving) |
08:25:30 | * | mindhunter0x joined #nim |
08:55:22 | * | teasea quit (Quit: teasea) |
08:57:27 | * | teasea joined #nim |
09:15:53 | ForumUpdaterBot | New thread by Dabod: Question about package level object, see https://forum.nim-lang.org/t/7884 |
09:17:52 | * | xet7 quit (Remote host closed the connection) |
09:52:01 | ForumUpdaterBot | New thread by Dbl007: Trojan:Win32/Wacatac.B!ml, see https://forum.nim-lang.org/t/7885 |
10:20:14 | * | natrys joined #nim |
10:26:41 | * | aeverr joined #nim |
10:38:40 | PMunch | Have people found any good topics for NimConf 2? |
10:50:33 | * | kuon quit (Remote host closed the connection) |
10:50:54 | * | kuon joined #nim |
11:19:02 | FromDiscord | <exelotl> maybe I'll do another GBA talk... no promises though, I was barely able to finish the last one š
|
11:26:52 | PMunch | Would be cool, and a good opportunity to show off the amazing trailer once more :D |
11:27:21 | FromDiscord | <exelotl> hahaha yeah |
11:28:20 | PMunch | I was thinking on doing something more on the microcontroller stuff |
11:28:41 | FromDiscord | <exelotl> at least I know what approach works best for me now (don't try to follow a script or use a webcam, just record each slide 1 by 1 with as many attempts as it takes) |
11:28:59 | FromDiscord | <exelotl> oh yeah that would be nice |
11:29:20 | narimiran | ...and change clothes/hairstyle between the slides, to keep audience entertained! |
11:29:42 | FromDiscord | <hamidb80> hey every one |
11:29:43 | FromDiscord | <exelotl> hehehe |
11:29:56 | FromDiscord | <Rika> or change bg locations between slides (while maintaining fg positions) |
11:30:07 | FromDiscord | <Rika> would be funny |
11:30:29 | narimiran | ok, we basically figured it out for you. now you must do it |
11:30:40 | PMunch | Moving stuff around in the background like a stop-motion movie :P |
11:31:32 | FromDiscord | <exelotl> each slide is like a tom scott video: "I'm at the large hadron collider!" |
11:32:55 | FromDiscord | <hamidb80> i get diffrent error in windows and nim playground |
11:33:03 | FromDiscord | <Rika> "I'm currently inside your house" |
11:33:06 | FromDiscord | <hamidb80> https://play.nim-lang.org/#ix=3lix |
11:33:34 | FromDiscord | <hamidb80> can anyone tell me why `swap` proc doesn't work here? |
11:33:47 | FromDiscord | <hamidb80> but `replace` template works |
11:34:41 | FromDiscord | <hamidb80> i use nim 1.4.4 |
11:34:48 | FromDiscord | <hamidb80> (edit) "i use nim 1.4.4 ... " added "in windows" |
11:36:58 | FromDiscord | <hamidb80> PMunch your talks and articles about was very helpful, thank u |
11:37:06 | FromDiscord | <hamidb80> (edit) "PMunch your talks and articles about ... was" added "metaprogramming" |
11:37:50 | PMunch | Glad they could be of help :) |
11:39:28 | FromDiscord | <hamidb80> In reply to @hamidb80 "https://play.nim-lang.org/#ix=3lix": any idea? |
11:40:39 | FromDiscord | <hamidb80> nim playground doesn't know `copy` |
11:40:45 | FromDiscord | <hamidb80> strange |
11:40:48 | FromDiscord | <Rika> import macros |
11:41:32 | FromDiscord | <demotomohiro> NimNode doesn't have operator`[]` that returns var NimNode. |
11:41:58 | FromDiscord | <hamidb80> In reply to @Rika "import macros": updated. https://play.nim-lang.org/#ix=3liy |
11:43:04 | PMunch | This seems like what you're trying to do: https://play.nim-lang.org/#ix=3liz |
11:43:18 | PMunch | But I get another very weird error when I try to run it |
11:44:26 | FromDiscord | <hamidb80> how does `swap` works then? i thought it was just like the `replace` template that i wrote |
11:44:37 | FromDiscord | <hamidb80> (edit) removed "the" |
11:44:55 | PMunch | Dunno, don't think I've used it |
11:45:47 | * | blitzworksD1337d joined #nim |
11:47:08 | * | xet7 joined #nim |
11:47:12 | FromDiscord | <hamidb80> In reply to @PMunch "But I get another": https://play.nim-lang.org/#ix=3liA this works fine! |
11:47:31 | PMunch | It does? On the playground I get an error.. |
11:48:33 | FromDiscord | <hamidb80> In reply to @PMunch "It does? On the": i got nothing ( it should print generated AST right? ) |
11:48:51 | * | blitzworks quit (Ping timeout: 252 seconds) |
11:49:00 | PMunch | Yeah, but when it tries to call the two variants the second one fails.. |
11:49:36 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/837294542217674812/unknown.png |
11:50:19 | FromDiscord | <hamidb80> https://play.nim-lang.org/#ix=3liD |
11:51:39 | FromDiscord | <demotomohiro> It seems calling `[]=` proc is an only way to directly set chid node of NimNode and you cannot use proc with var parameter to change it. |
11:51:49 | PMunch | http://ix.io/3liE |
11:52:28 | FromDiscord | <hamidb80> In reply to @PMunch "http://ix.io/3liE": https://media.discordapp.net/attachments/371759389889003532/837295262611406848/unknown.png |
11:53:03 | PMunch | Oh well, all is good then :P |
11:53:37 | FromDiscord | <hamidb80> In reply to @hamidb80 "": seems like nim playground hide the compile time `echos` |
11:53:48 | FromDiscord | <hamidb80> (edit) "`echos`" => "`echo`s" |
11:53:54 | FromDiscord | <hamidb80> (edit) "hide" => "hides" |
11:54:42 | FromDiscord | <Rika> no, theyre shown when you click on the button beside "run" |
11:55:20 | FromDiscord | <hamidb80> In reply to @Rika "no, theyre shown when": oh - showing : debug |
11:58:57 | FromDiscord | <hamidb80> programming was a pain before https://media.discordapp.net/attachments/371759389889003532/837296897407713300/unknown.png |
11:59:05 | FromDiscord | <hamidb80> (edit) "programming was a pain before ... https://media.discordapp.net/attachments/371759389889003532/837296897407713300/unknown.png" added "macros" |
11:59:35 | FromDiscord | <hamidb80> imagine 500 lines of code like this |
11:59:40 | FromDiscord | <hamidb80> (edit) |
12:00:24 | FromDiscord | <hamidb80> (edit) removed "just" |
12:07:19 | FromDiscord | <šphylumš> When I try to set a compiler using the --cc flag it gives me a list of legal names |
12:08:43 | FromDiscord | <šphylumš> I'm trying to set it to a gcc build for a special gcc build targeting a mips R5900 cpu |
12:08:52 | FromDiscord | <šphylumš> by convention the binary isn't called gcc |
12:08:54 | FromDiscord | <Rika> you use --gcc.exe: for that instead i believe |
12:09:13 | FromDiscord | <Rika> and gcc.exe.linker or something i forget (check compiler docs) |
12:09:20 | FromDiscord | <Rika> oh, gcc.linker.exe |
12:09:33 | FromDiscord | <šphylumš> perfect š |
12:13:44 | FromDiscord | <šphylumš> sent a code paste, see https://paste.rs/1Uk |
12:13:51 | FromDiscord | <šphylumš> I think perhaps not :D |
12:13:56 | FromDiscord | <šphylumš> not tonight at least |
12:29:03 | reversem3 | How to cross compile for windows:nim c -d:mingw --cpu:amd64 --threads:on (only if threads are needed) <file.nim> |
12:32:29 | ForumUpdaterBot | New thread by FabienPRI: SetControlCHook , see https://forum.nim-lang.org/t/7886 |
12:34:28 | FromDiscord | <demotomohiro> @reversem3āµhttps://forum.nim-lang.org/t/7803 |
12:42:38 | reversem3 | I haven't cross compiled for a UI yet only CLI and it works great |
12:43:32 | reversem3 | I cross compile from Mac OSX to windows 7 and 10 |
12:53:54 | reversem3 | hmm so I haven't tried using wine but it does have the same compiler installed and it probably would be better especially dealing with any kind of UI |
12:54:13 | reversem3 | I know nigui uses SDL and openGL right |
12:55:10 | reversem3 | You would need to setup all the niGUI dependences in nim.cfg. |
12:58:06 | * | blitzworksD1337d quit (Quit: Gateway shutdown) |
12:58:41 | * | blitzworksD1337d joined #nim |
13:41:04 | * | rockcavera joined #nim |
13:56:31 | * | PMunch quit (Quit: leaving) |
14:29:33 | Benjamin[m]1 | Is it possible to make a seq of proc with varying pragmas? E.g., closures and non-closures in the same seq. |
14:43:43 | giaco | If fut.failed is true, what is the return value of withTimeout? https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/asyncdispatch.nim#L1845 |
14:44:11 | * | natrys quit (Ping timeout: 240 seconds) |
14:44:38 | * | natrys joined #nim |
14:59:31 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/yfz |
15:00:36 | FromDiscord | <haxscramper> I need this pragma to be `typed` in order to get the object definition symbol |
15:18:25 | * | xet7 quit (Remote host closed the connection) |
15:20:04 | * | rockcavera quit (Read error: Connection reset by peer) |
15:20:33 | * | rockcavera joined #nim |
15:20:41 | * | natrys quit (Ping timeout: 240 seconds) |
15:21:05 | FromDiscord | <exelotl> is there a way to set the arm.none.gcc.exe configuration key on the command line rather than in a config file? |
15:21:32 | FromDiscord | <exelotl> particularly for using Nim with compiler explorer |
15:29:40 | leorize[m] | prepend a `--` to that |
15:36:25 | * | natrys joined #nim |
15:37:35 | FromDiscord | <exelotl> ahh thanks |
15:39:22 | giaco | got my asnwer, and it "it raises exception" |
15:45:03 | Amun_Ra | I've encountered weird error, perhaps it's the way templates word I'm not aware of: https://play.nim-lang.org/#ix=3lk0 |
15:45:11 | Amun_Ra | s/word/work/ |
15:50:46 | giaco | https://nim-lang.org/docs/asyncdispatch.html#asynchronous-procedures-handling-exceptions does anybody knows more than "Unfortunately the semantics of the try statement may not always be correct"? |
15:51:32 | FromGitter | <iffy> Is FutureStream threadsafe? |
16:07:45 | * | xet7 joined #nim |
16:12:33 | * | arecaceae quit (Remote host closed the connection) |
16:12:53 | * | arecaceae joined #nim |
16:19:33 | leorize[m] | giaco: @dom96 should know about this stuff |
16:24:03 | * | letto_ joined #nim |
16:24:18 | * | letto quit (Ping timeout: 260 seconds) |
16:41:09 | * | leorize quit (Ping timeout: 240 seconds) |
16:44:04 | * | letto_ quit (Remote host closed the connection) |
16:44:27 | * | letto_ joined #nim |
16:52:30 | FromDiscord | <dom96> wow, that's outdated. We need to update the docs, this isn't the case anymore since Nim's closure iterators support try |
17:08:44 | giaco | dom96: I've just refactored all my code from try/except to yield future; future.failed |
17:08:57 | giaco | are you saying that was not necessary? |
17:09:14 | ForumUpdaterBot | New thread by GamzWithJamz: Nim Standard Library - How expansive should it be?, see https://forum.nim-lang.org/t/7887 |
17:15:20 | FromDiscord | <dom96> giaco: yes |
17:15:59 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3lky |
17:16:07 | FromDiscord | <d4rckh> (edit) "https://play.nim-lang.org/#ix=3lky" => "https://play.nim-lang.org/#ix=3lkz" |
17:17:29 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3lkA |
17:20:06 | giaco | dom96: but I am quite sure it is not working as expected, as I was struggling with a "catch all" try/except block at the root of my async tree, but my program was quitting anyway on error. By replacing that with yield it was working as expected |
17:20:50 | * | leorize joined #nim |
17:24:48 | FromDiscord | <d4rckh> or is there anyway i can do it to pass the post data as a string? |
17:27:23 | FromDiscord | <dom96> giaco: hm, that's odd, are you using `asyncCheck`? That will bubble up any errors to the dispatcher |
17:29:28 | giaco | dom96, at main I run 3 asyncCheck + runForever, then inside each of the three async proc I have a try/execept catch-all block |
17:30:50 | giaco | inside each of these try/catch block I do many "await future" thay may raise exceptions |
17:31:16 | FromDiscord | <dom96> hm, that should catch everything. Would be brilliant if you could come up with a short repro for this, maybe there is a bug hiding there with the exception handling |
17:33:06 | giaco | I will surely want to revert back to try/catch pattern as the yield smells bad |
17:33:21 | giaco | if I will be able to reproduce I will narrow it down to minimal example |
17:33:34 | giaco | one short question while I am here |
17:36:23 | giaco | while I tend to do "try: await myfuture() except: echo foo" I wonder what does "try: asyncdispatch myfuture() except: echo foo" actually do |
17:37:43 | giaco | I mean, if try/except wraps a call tree, where is asyncdispatch attached? Does it branch from the root of the dispatcher? |
17:54:00 | reversem3 | I propose we setup a "kitty" or "pool" for funding documentation for nim |
17:54:28 | reversem3 | I also propose dom96 to write all the documentation lol |
18:01:51 | * | vicfred joined #nim |
18:02:55 | * | kuon quit (Remote host closed the connection) |
18:17:32 | FromDiscord | <zetashift> I think docs are doing great compared to a few years ago tbh, they have improved a lot. I don't know what the status is of docgen and it's problems outlined here: https://github.com/mratsim/Arraymancer/issues/488#issuecomment-754616990 but there are solutions coming up(haxdoc/nimib) for that too. I feel like a current issue is discoverability of Nim. People still not knowing about `-d:danger` and minor stuff like that |
18:19:07 | FromDiscord | <zetashift> F# has an Advent Calender filled with blogposts about all sorts of things F#, Rust had it too, I think that could be a way to have a more easier onboarding to the Nim world, without burdening the maintainers |
18:27:30 | FromDiscord | <haxscramper> `nim doc` was not really designed to generate project-wide documentation to begin with. nim compiler documentation pages are manually stiched together using `koch` https://github.com/nim-lang/Nim/blob/16405083485967a395b8d677833bc26040881b21/tools/kochdocs.nim#L247 |
18:28:52 | FromDiscord | <haxscramper> And as a result some packages don't have compiled documentation and rely instead on "look in the tests" and "look in the documentation comments" |
18:34:21 | * | leorize quit (Ping timeout: 240 seconds) |
18:51:48 | * | leorize joined #nim |
19:11:38 | FromDiscord | <haxscramper> The fact nim RST parser sometimes directly interprets things like `.. include` for example does not help in writing custom tooling on top of it |
19:29:21 | FromDiscord | <exelotl> I tried to generate docs for my GBA library the other day and the compiler just crashed lol |
19:30:16 | FromDiscord | <exelotl> I managed to get docs I'm fairly happy with for my asset conversion lib: https://exelotl.github.io/trick/trick.html |
19:30:59 | FromDiscord | <exelotl> but it required a lot of messing around to fill in for things that nim doc is missing |
19:31:38 | FromDiscord | <exelotl> like this CSS hack š
https://media.discordapp.net/attachments/371759389889003532/837410815028101141/unknown.png |
19:31:57 | FromDiscord | <haxscramper> first and foremost it is missing adequate IR that can be used by others. For haxdoc I"m not really concerned about producing high-quality documentation etc, |
19:32:13 | FromDiscord | <haxscramper> instead I want to make documentation generator Library |
19:32:26 | FromDiscord | <haxscramper> And some default generator too of course |
19:34:09 | FromDiscord | <Avatarfighter> @exelotl those docs look good |
19:34:10 | FromDiscord | <haxscramper> And it is not possible to even query `nim doc` for a list of classes defined in a project or something, you have to compile each file on its own and manually combine this info |
19:35:38 | FromDiscord | <exelotl> In reply to @Avatarfighter "<@!90614688374624256> those docs look": thanks :) |
19:36:09 | FromDiscord | <exelotl> I just realised the anchor format changed so now none of the links in the tables take you to the right part of the page 𤦠|
19:36:33 | FromDiscord | <exelotl> or at least some of them don't |
19:36:37 | FromDiscord | <exelotl> maybe they were always wrong |
19:37:09 | FromDiscord | <exelotl> or I just broke them myself |
19:53:23 | FromDiscord | <treeform> In reply to @ElegantBeef "Especially in treeforms case": Yep fidget left, pixie left, typography left, css left, html cavas left, svg left etc... so many variations left right top bottom center middle... enums! |
19:53:49 | FromDiscord | <ElegantBeef> Yea, i really like the implications of the tests, but CI issues galore |
19:54:06 | * | reversem3 quit (Ping timeout: 245 seconds) |
19:54:31 | * | Clonkk[m] quit (Ping timeout: 245 seconds) |
19:54:56 | * | FlammableDuck[m] quit (Ping timeout: 245 seconds) |
19:54:56 | * | jaens[m] quit (Ping timeout: 245 seconds) |
19:55:40 | * | Clonkk[m] joined #nim |
19:55:46 | * | lnxw37d4 quit (Ping timeout: 245 seconds) |
19:55:47 | * | FlammableDuck[m] joined #nim |
19:55:54 | * | jaens[m] joined #nim |
19:56:18 | * | reversem3 joined #nim |
19:56:20 | FromDiscord | <ElegantBeef> If interested in what it currently enables https://github.com/beef331/Nim/blob/sillyinfercase/tests/inference/tinference.nim |
19:57:00 | * | lnxw37d4 joined #nim |
19:59:41 | * | natrys quit (Ping timeout: 240 seconds) |
20:01:35 | FromDiscord | <treeform> In reply to @ElegantBeef "If interested in what": This is exactly what I need. |
20:02:20 | FromDiscord | <ElegantBeef> And i need my sanity to get it to pass the CI š |
20:03:47 | FromDiscord | <jtiai> Is there some size limit for `seq`? |
20:04:13 | * | narimiran quit (Ping timeout: 252 seconds) |
20:04:34 | FromDiscord | <jtiai> Since I'm trying to do:āµ`var data: seq[uint8] = newSeq[uint8](65536)` |
20:04:48 | FromDiscord | <jtiai> But data ends up begin just `[]` |
20:06:23 | FromDiscord | <ElegantBeef> Are you sure? https://play.nim-lang.org/#ix=3ll5 |
20:07:25 | FromDiscord | <jtiai> Yep... |
20:07:36 | FromDiscord | <jtiai> Wonder why it doesn't work in my code. |
20:08:54 | FromDiscord | <jtiai> Hmm... |
20:08:59 | FromDiscord | <jtiai> Okay... |
20:12:18 | FromDiscord | <jtiai> 0-65535 0 where s=0, e=65535 but why e - s + 1 is 0 ? Does nim do some magic and assumes all are 16 bit unsigned numbers and rolls over? |
20:12:50 | * | natrys joined #nim |
20:13:17 | FromDiscord | <ElegantBeef> is e a u16? |
20:13:27 | FromDiscord | <jtiai> both e and s. |
20:13:54 | FromDiscord | <ElegantBeef> Well there you go, uints overflow |
20:14:53 | FromDiscord | <ElegantBeef> !eval echo 255u8 + 1u8 |
20:14:56 | NimBot | 0 |
20:15:30 | FromDiscord | <jtiai> Is there shortuct to say (e - s + 1) should be evaluated all as u32? |
20:15:51 | FromDiscord | <ElegantBeef> `(e.uint32 - s.uint32 + 1)` |
20:18:06 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=3ll8 |
20:18:16 | FromDiscord | <dain> (edit) "https://play.nim-lang.org/#ix=3ll8" => "https://play.nim-lang.org/#ix=3ll9" |
20:18:37 | FromDiscord | <dain> from the book: https://media.discordapp.net/attachments/371759389889003532/837422639931981854/unknown.png |
20:18:46 | FromDiscord | <dain> https://media.discordapp.net/attachments/371759389889003532/837422679102455888/unknown.png |
20:19:27 | FromDiscord | <Solitude> `echo client[]` |
20:19:38 | FromDiscord | <Solitude> you have to dereference reference types before echoing |
20:20:24 | FromDiscord | <ElegantBeef> This isnt addressed here but if you havent seen this already https://deepakg.github.io/nim/2019/09/28/nim-in-action-errata.html |
20:21:11 | * | natrys quit (Ping timeout: 240 seconds) |
20:24:39 | FromDiscord | <dain> In reply to @Solitude "`echo client[]`": ah thank you :) |
20:24:40 | FromDiscord | <dain> that worked |
20:26:21 | * | vicfred quit (Quit: Leaving) |
20:26:42 | FromDiscord | <dain> so was that added to the language after the book came out? |
20:28:39 | FromDiscord | <ElegantBeef> Probably removed after yes |
20:28:47 | FromDiscord | <Solitude> no, something was probably removed, this could work only if there was default `$` for reference types, but i dont remember that |
20:29:28 | FromDiscord | <ElegantBeef> when you pass a type to `echo` it invokes that types `$` procedure, which the system doesnt define for reference types since it can end badly if you have recursive types |
20:30:09 | FromDiscord | <ElegantBeef> Atleast i imagine that's the reason why, plus you generally want your own `$` to give a specific output |
20:31:36 | FromDiscord | <dain> oh I see, just after that part it says that it will fail compilation because we havent defined a `$` method |
20:31:45 | FromDiscord | <dain> and then proceeds to do so |
20:31:52 | FromDiscord | <ElegantBeef> Lol |
20:32:07 | FromDiscord | <ElegantBeef> Well there you go that's why it failed |
20:32:37 | FromDiscord | <dain> ya |
20:32:38 | FromDiscord | <dain> thankyou |
20:36:52 | * | natrys joined #nim |
20:46:47 | * | natrys quit (Quit: natrys) |
20:59:36 | FromDiscord | <dom96> lol |
21:00:06 | FromDiscord | <dom96> You should use this in case you run into similar situations: https://github.com/dom96/nim-in-action-code |
21:00:34 | FromDiscord | <dom96> https://github.com/dom96/nim-in-action-code/blob/master/Chapter3/ChatApp/src/server.nim#L18 |
21:22:07 | * | thomasross joined #nim |
22:13:57 | * | Vladar quit (Quit: Leaving) |
22:29:14 | * | wasted_youth2 quit (Read error: Connection reset by peer) |
22:29:37 | * | wasted_youth2 joined #nim |
22:50:01 | * | ubq323 joined #nim |
22:56:23 | * | ubq323 quit (Quit: WeeChat 2.3) |
23:08:07 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
23:14:53 | * | Gustavo6046 joined #nim |
23:16:37 | FromDiscord | <mattrb> sent a long message, see http://ix.io/3llO |
23:19:22 | FromDiscord | <ElegantBeef> if instead of bindsym you did `dotexpr(ident"thumb", nnkCall(ident"softwareInterrupt")` it'd override that |
23:19:54 | FromDiscord | <ElegantBeef> the bind sym is a bit odd since you dont use it as a sym |
23:21:28 | FromDiscord | <mattrb> Does nnkCall allow for generic args? |
23:22:31 | FromDiscord | <ElegantBeef> Well yea it's nim ast afterall https://play.nim-lang.org/#ix=3llR |
23:23:36 | FromDiscord | <ElegantBeef> Unless you're using the sym as a sym there isnt any reason to bind it |
23:24:18 | FromDiscord | <mattrb> Ah interesting, good to know |
23:24:25 | FromDiscord | <mattrb> I'm definitely still a noob with nim macros |
23:24:55 | FromDiscord | <ElegantBeef> sym's are semantically checked identifiers, so you can see their impls and get data from it |
23:25:06 | FromDiscord | <mattrb> Also interesting, _just_ changing `bindSym` with `ident` seems to solve this in this case haha. Guess I just don't actually understand what bindSym does |
23:25:08 | FromDiscord | <ElegantBeef> As you're just making proc calls it's pretty much not needed |
23:25:32 | FromDiscord | <ElegantBeef> Bindsym forces lookup of a string or identifier to get all valid symbols |
23:25:59 | FromDiscord | <mattrb> Does it do that with modules that aren't in scope? |
23:26:08 | FromDiscord | <ElegantBeef> It shouldnt |
23:26:51 | FromDiscord | <mattrb> Since `macros.nim` doesn't import `thumb.nim` or `arm.nim`, and neither of those import eachother, I'm confused why it was getting the wrong `softwareInterrupt` anyway.. |
23:27:24 | FromDiscord | <ElegantBeef> It probably was resolving in the call scope |
23:28:48 | FromDiscord | <mattrb> But if thumb.nim imports macros.nim (where `call` lives), and macros.nim doesn't import anything, how would the bind in thumb.nim be resolving to the `softwareInterrupt` in arm.nim? |
23:29:12 | FromDiscord | <ElegantBeef> No clue |
23:29:25 | FromDiscord | <ElegantBeef> I'm just going to say it makes sense if you dont think about it |
23:37:04 | FromDiscord | <mattrb> Works for me lol |
23:37:05 | FromDiscord | <mattrb> Thanks for the help |
23:40:25 | leorize | bindSym bound all symbols present at the scope of the macro |
23:40:48 | leorize | there is a flag that makes it bind that plus symbols at the scope of the macro expansion |
23:50:19 | * | vicfred joined #nim |