00:06:37 | FromDiscord | <pcarrier> https://media.discordapp.net/attachments/371759389889003532/1166165814488080505/image.png?ex=65497f8c&is=65370a8c&hm=eebcc5ff2d717df51ed2153a0f81a06b09d37ea957de4f2ef1dd9a83c17ade01& |
00:07:02 | FromDiscord | <pcarrier> I'm confused, is the problem with `var`? I'm trying to `addLast(Deque[Ref], Ref)` which seems correct? |
00:11:26 | FromDiscord | <pcarrier> I don't understand the mismatch? https://media.discordapp.net/attachments/371759389889003532/1166167026855854140/image.png?ex=654980ad&is=65370bad&hm=199492ce46625968f411f7cca301ac4a54578802865b06d2360d403df46721e6& |
00:12:22 | FromDiscord | <leorize> vm is immutable |
00:12:31 | FromDiscord | <leorize> use `vm: var VM` |
00:13:22 | FromDiscord | <pcarrier> ah, of course, thanks |
00:37:47 | FromDiscord | <pcarrier> oh joy, another `Uncaught RuntimeError: memory access out of bounds` |
00:37:59 | FromDiscord | <pcarrier> no `release`/`danger` flags |
00:38:49 | FromDiscord | <pcarrier> (edit) "bounds`" => "bounds`. no `release`/`danger` flags" |
00:39:59 | FromDiscord | <Elegantbeef> That's not A nim error |
00:41:56 | Amun-Ra | I have a fresh one: basic_types.nim(46, 16) Error: internal error: symbol has no generated name: true |
00:42:10 | Amun-Ra | I have to check what's causing it |
00:50:09 | FromDiscord | <Elegantbeef> Macro? |
00:50:11 | FromDiscord | <Elegantbeef> Template? |
00:52:25 | Amun-Ra | I don't know yet :/ |
00:53:02 | FromDiscord | <Elegantbeef> Are you using them |
00:53:14 | FromDiscord | <pcarrier> I'd like to embed the build time in my binary. any suggestions?↵`const builtAt = now().utc` ->↵`/usr/lib/nim/pure/times.nim(1388, 6) Error: cannot evaluate at compile time: localInstance` |
00:54:32 | Amun-Ra | yes |
00:55:52 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/system.html#CompileTime |
00:55:57 | Amun-Ra | it's js backend so it's probably my fault |
00:56:06 | FromDiscord | <Elegantbeef> Well likely one of your template/macros are causing an issue |
00:56:40 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4JNC |
01:01:33 | Amun-Ra | hmm |
01:02:15 | Amun-Ra | you're right, it's one of templates |
01:12:25 | Amun-Ra | no, I have a few const seq of objects and one const seq of all of them concatenated together with &; accessing individual seqs works fine, accessing joined one fails |
01:14:14 | Amun-Ra | one of them fails |
01:27:34 | Amun-Ra | found it, it's that type of iterator, that fails: https://play.nim-lang.org/#ix=4JNF |
01:29:42 | FromDiscord | <pcarrier> can I pass a flag through `nimble build` onto config.nims to condition some of my config? |
01:30:41 | Amun-Ra | -d |
01:32:25 | FromDiscord | <pcarrier> and how would I access whether it's set in config.nims? |
01:34:20 | FromDiscord | <pcarrier> In reply to @Elegantbeef "That's not A nim": well, call it an emscripten or a Nim error, but it's a runtime error as far as I'm concerned 🙂 https://media.discordapp.net/attachments/371759389889003532/1166187887075786812/image.png?ex=6549941b&is=65371f1b&hm=dc98f7795193254221850aa5cce02922c3aff8ed56d1dd17b5fcb20fdae0759e& |
01:34:41 | FromDiscord | <pcarrier> can I avoid the destructors getting called when main() returns? |
01:38:27 | FromDiscord | <Elegantbeef> Any reference that exits the runtime you can `GcRef` to keep it alive |
01:42:06 | FromDiscord | <pcarrier> well that sounds frustratingly error-prone |
01:42:21 | FromDiscord | <Elegantbeef> Well you're giving up resources |
01:43:04 | FromDiscord | <pcarrier> yes and no. I don't want `main` to run any destructors because I have a bunch of `let` things that need to be available after `main` returns... |
01:43:19 | FromDiscord | <pcarrier> it's a weirdness of emscripten for sure |
01:44:01 | FromDiscord | <pcarrier> but I basically don't want my globals ever destroyed |
01:44:10 | FromDiscord | <Elegantbeef> You likely want to do `noMain` then just manually call `NimMain` inside your own "main" |
01:45:52 | FromDiscord | <pcarrier> I don't have a main that doesn't return either |
01:46:04 | FromDiscord | <pcarrier> I want to give control back to the JS environment so that it can call me later |
01:46:15 | FromDiscord | <pcarrier> maybe I misunderstand what you're proposing |
01:47:15 | FromDiscord | <Elegantbeef> You practically need to do the same as a dynlib |
01:48:21 | FromDiscord | <pcarrier> got a guiide for that? 😄 |
01:48:27 | FromDiscord | <pcarrier> (edit) "guiide" => "guide" |
01:48:35 | FromDiscord | <Elegantbeef> Sadly not |
01:51:03 | FromDiscord | <pcarrier> and there isn't some magic incantation I could put in my main body that would somehow end execution of `main` without calling destructors? |
01:51:14 | FromDiscord | <Elegantbeef> I don't know if the `--app:lib` works with `dynlib` |
01:51:53 | FromDiscord | <Elegantbeef> Something like that should work |
01:51:56 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4JNH |
01:52:10 | FromDiscord | <Elegantbeef> Sorry `--app:lib` works with emcc/emscripten |
01:53:51 | FromDiscord | <pcarrier> oh my it's like magic |
01:56:05 | FromDiscord | <pcarrier> sent a code paste, see https://play.nim-lang.org/#ix=4JNI |
02:35:06 | * | alice quit (Remote host closed the connection) |
02:38:08 | * | alice joined #nim |
02:57:01 | FromDiscord | <pcarrier> any idea what's wrong here? is [] not a thing on maps? https://media.discordapp.net/attachments/371759389889003532/1166208696217522207/image.png?ex=6549a77c&is=6537327c&hm=f76c637a222893245d1c270cc6b67faca376251f9314527ae661df9b578e9c27& |
02:57:11 | * | rez joined #nim |
02:57:41 | * | rez quit (Client Quit) |
04:23:11 | FromDiscord | <pcarrier> sent a code paste, see https://play.nim-lang.org/#ix=4JO4 |
04:29:40 | FromDiscord | <pcarrier> also, with `app:lib`, is it possible my "main" is reexecuted every time I call a function? |
04:30:10 | FromDiscord | <leorize> no |
04:30:32 | FromDiscord | <pcarrier> ok |
04:44:05 | FromDiscord | <pcarrier> well something weird is happening |
04:44:19 | FromDiscord | <pcarrier> sent a code paste, see https://play.nim-lang.org/#ix=4JO7 |
04:44:28 | FromDiscord | <pcarrier> somehow execution stops silently at `let found = ctx.map[r]` |
04:46:43 | FromDiscord | <Elegantbeef> does `map[r]` have anything that might be blocking? |
04:47:14 | FromDiscord | <Elegantbeef> By that I mean does it call anything in JS land that might make it stop |
04:47:23 | FromDiscord | <pcarrier> it doesn't call JS |
04:48:36 | FromDiscord | <pcarrier> `let VMs = @[initVM()]; let vm = VMs[0]; vm.foo` <--- I think this copies VMs[0] every time. what should I tweak to avoid that? |
04:49:06 | FromDiscord | <Elegantbeef> what type is `VMs[0]`? |
04:49:08 | FromDiscord | <pcarrier> (edit) "`let VMs = @[initVM()]; ... letvm.foo" added "proc … {" | "vm.foo`" => "vm.foo }`" | "this" => "calling …" |
04:49:14 | FromDiscord | <pcarrier> `VM` |
04:49:31 | FromDiscord | <pcarrier> should I switch to a `ref`? |
04:49:36 | FromDiscord | <Elegantbeef> You could |
04:49:48 | FromDiscord | <Elegantbeef> If you want to do unsafe code you also could do `let vm = Vms[0]` |
04:49:49 | FromDiscord | <pcarrier> what else could I do? 🙂 |
04:50:01 | FromDiscord | <Elegantbeef> Or you could use a `template vm(): Vm = Vms[0]` |
04:50:16 | FromDiscord | <pcarrier> I don't see the difference between `let vm = Vms[0]` and what I do now |
04:50:24 | FromDiscord | <Elegantbeef> sorry |
04:50:30 | FromDiscord | <Elegantbeef> `let vm = Vms[0].addr` |
04:54:14 | FromDiscord | <pcarrier> I can't do $vm on that, how do I dereference? |
04:54:47 | FromDiscord | <pcarrier> oh [] |
04:54:52 | FromDiscord | <pcarrier> (edit) "oh [] ... " added "sorry" |
04:58:27 | FromDiscord | <pcarrier> pointers work, thanks |
04:59:01 | FromDiscord | <pcarrier> ha `SUMMARY: AddressSanitizer: null-pointer-dereference (formicid.wasm+0x9e8a2) in eqeq_form_u64+0x9e8a2` |
04:59:53 | FromDiscord | <pcarrier> sent a code paste, see https://play.nim-lang.org/#ix=4JOa |
04:59:53 | FromDiscord | <pcarrier> I don't get it |
05:00:42 | FromDiscord | <pcarrier> (edit) "I ... don't" added "again" |
05:04:35 | FromDiscord | <Elegantbeef> Is `form` a ref type? |
05:04:43 | FromDiscord | <Elegantbeef> Also you do not need `return case lhs.kind` |
05:04:48 | FromDiscord | <Elegantbeef> you can just have `case lhs.kind` |
05:05:24 | FromDiscord | <pcarrier> sent a code paste, see https://play.nim-lang.org/#ix=4JOc |
05:05:33 | FromDiscord | <pcarrier> Form is not a ref type, Ref is a ref Form |
05:06:17 | FromDiscord | <Elegantbeef> `lhs.isNil and rhs.isNil or (lhs[] == rhs[])`? |
05:06:51 | FromDiscord | <Elegantbeef> Sorry `(lhs.isNil and rhs.isNil) or lhs[] == rhs[]` |
05:07:15 | FromDiscord | <Elegantbeef> Don't recall the order here but you might not need `()` at all |
05:07:19 | FromDiscord | <pcarrier> when in doubt, keep both sets of parens 😉 |
05:07:20 | FromDiscord | <Elegantbeef> I just like grouping conditions 😄 |
05:07:43 | FromDiscord | <pcarrier> when not in doubt, someone else might doubt 🙂 |
05:08:11 | FromDiscord | <pcarrier> OK onto the next NPE |
05:08:19 | FromDiscord | <pcarrier> damn I'm getting a lot of NPEs |
05:11:24 | FromDiscord | <Elegantbeef> Refs are bad 😄 |
05:12:29 | FromDiscord | <pcarrier> so I know I have a ref to a symbol rot in my map |
05:12:47 | FromDiscord | <pcarrier> yet looking up another ref to a symbol rot doesn't return it |
05:13:28 | FromDiscord | <Elegantbeef> If you're using Nim's hash function for refs in a table it accesses based of pointer address |
05:13:52 | FromDiscord | <pcarrier> I've implemented `hash` and `==` |
05:14:00 | FromDiscord | <Elegantbeef> So just cause `a == b` does not mean `map[a] == map[b]` |
05:14:00 | FromDiscord | <pcarrier> do I need to do more? |
05:14:09 | FromDiscord | <Elegantbeef> Then your hash function is wrong |
05:14:52 | FromDiscord | <pcarrier> sent a code paste, see https://play.nim-lang.org/#ix=4JOd |
05:14:57 | FromDiscord | <pcarrier> I don't see how that'd be wrong |
05:15:17 | FromDiscord | <pcarrier> (in this case I'm looking up a `Sym`) |
05:22:23 | * | DrWhomever joined #nim |
05:23:06 | * | DrWhomever quit (Client Quit) |
05:33:01 | FromDiscord | <pcarrier> nope, I was stupid |
05:34:10 | FromDiscord | <Elegantbeef> If you keep saying that soon we'll just imagine a puddle of drool talking to us |
05:35:28 | FromDiscord | <pcarrier> I mean... I was putting strings instead of symbols in my symbol map |
05:38:35 | * | advesperacit joined #nim |
05:44:43 | * | azimut joined #nim |
07:02:58 | FromDiscord | <Chronos [She/Her]> I should experiment with a new style of programming hm |
07:03:41 | FromDiscord | <Elegantbeef> Go play with mn or min and blow your mind |
07:04:52 | FromDiscord | <Chronos [She/Her]> Wdym, how will it change anything- By style I mean how the code is formatted |
07:05:27 | FromDiscord | <Chronos [She/Her]> I am now putting `# -----` between the spaces of functions |
07:08:10 | FromDiscord | <Chronos [She/Her]> Hm... Not sure how I should model types now tbh |
07:08:50 | FromDiscord | <Chronos [She/Her]> Specifically the user, since I also need to support OAuth-backed accounts |
07:47:30 | FromDiscord | <Chronos [She/Her]> Moving on to slowly implementing the beginning parts of the chat platform |
08:01:06 | FromDiscord | <xtrayambak> Is there a way to tell `unittest` to compile a particular test using a particular compiler? |
08:01:19 | FromDiscord | <xtrayambak> Or, hell, tell nimble to do that? |
08:02:17 | Amun-Ra | you can write custom test task for that |
08:02:23 | Amun-Ra | but testament can do that |
08:07:15 | FromDiscord | <Elegantbeef> You are using comments for spaces? Interesting↵(@Chronos [She/Her]) |
08:13:19 | FromDiscord | <Chronos [She/Her]> Between proc/func defs |
08:14:09 | FromDiscord | <Elegantbeef> Seems redundant |
08:15:43 | FromDiscord | <xtrayambak> sent a code paste, see https://play.nim-lang.org/#ix=4JOF |
08:15:50 | FromDiscord | <xtrayambak> Why is gcc being used if I told Nim to use clang? |
08:17:05 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "Seems redundant": Makes it easier to see where a new proc starts and ends imo |
08:19:00 | FromDiscord | <Elegantbeef> Do you use a lot of local procedures? |
08:24:31 | FromDiscord | <Chronos [She/Her]> Yeah? |
08:26:38 | FromDiscord | <Elegantbeef> Well there's your problem |
08:28:31 | FromDiscord | <Chronos [She/Her]> Need it for api shit tho |
08:30:51 | FromDiscord | <Elegantbeef> I rarely ever uses local procs, atleast if I can avoid it 😄 |
08:33:24 | FromDiscord | <Chronos [She/Her]> Fair but eh |
09:05:35 | Amun-Ra | xtrayambak: what's the full invocation look like? |
09:05:43 | Amun-Ra | argh |
09:06:23 | FromDiscord | <xtrayambak> In reply to @Amun-Ra "<@498088092406644736>: what's the full": `nim cpp --cc:clang tests/fuzzurl.nim` |
09:07:32 | Amun-Ra | (excuse my english, I slept 3h for the third day in a row) |
09:08:14 | Amun-Ra | xtrayambak: hmm, works for me, do you have clang++ installed? |
09:08:52 | Amun-Ra | try to increase verbosity (--verbosity=2) |
09:09:30 | FromDiscord | <xtrayambak> Yeah, let me do that rq |
09:12:56 | Amun-Ra | you can force the compiler/linker and check the result: nim cpp --cc:clang --gcc.exe=clang++ --gcc.linkerexe=clang++ tests/fuzzurl.nim |
09:13:00 | * | dtomato quit (Quit: Ping timeout (120 seconds)) |
09:13:21 | * | dtomato joined #nim |
09:13:40 | Amun-Ra | (--clang.exe, etc.) |
09:25:12 | * | azimut quit (Ping timeout: 256 seconds) |
09:47:47 | FromDiscord | <pcarrier> any reason Deques aren't sink seq[T]? |
09:47:52 | FromDiscord | <pcarrier> (edit) "any reason Deques aren't sink seq[T]? ... " added "could I make them so?" |
09:49:29 | * | LittleRedBox joined #nim |
10:01:31 | FromDiscord | <pcarrier> and can't iterate over the items in reverse order 😦 |
10:02:16 | FromDiscord | <pcarrier> (edit) "order" => "order. unfortunate" |
10:02:25 | FromDiscord | <Chronos [She/Her]> In reply to @pcarrier "and can't iterate over": `std/algorithm` has the `reversed` proc to return a reversed seq |
10:02:27 | FromDiscord | <Chronos [She/Her]> /array |
10:02:43 | FromDiscord | <Chronos [She/Her]> Or you could use `reverse` for in-place reversal of a list |
10:03:22 | FromDiscord | <pcarrier> in this case I want to prepend it to another deque |
10:03:49 | FromDiscord | <pcarrier> and deques have a seq internally, but they're not seq themselves |
10:04:20 | FromDiscord | <Chronos [She/Her]> In reply to @pcarrier "in this case I": Couldn't you merge the seqs together internally? |
10:04:33 | FromDiscord | <pcarrier> I'm not inside stdlib |
10:04:49 | FromDiscord | <pcarrier> (edit) "stdlib" => "std/deques, so... don't think so?" |
10:05:00 | FromDiscord | <Chronos [She/Her]> `data` is exported |
10:05:14 | FromDiscord | <Chronos [She/Her]> Nvm it isn't |
10:05:30 | FromDiscord | <Chronos [She/Her]> Even still, `privateAccess` from `std/importutils` |
10:05:58 | FromDiscord | <Chronos [She/Her]> But is there a reason why `addFirst`/`addLast` couldn't work? |
10:08:28 | FromDiscord | <pcarrier> it would. but if I have [a,b,c] and I addFirst them in order to [d,e,f], I'll end up with [c,b,a,d,e,f] |
10:40:54 | FromDiscord | <Chronos [She/Her]> In reply to @pcarrier "it would. but if": Could use `for i in [a, b, c].reverse()`? |
10:41:03 | FromDiscord | <Chronos [She/Her]> Or: |
10:42:33 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4JPa |
12:08:02 | FromDiscord | <Chronos [She/Her]> How do I generate an OpenAPI schema with Prologue? Anyone know? |
12:08:14 | FromDiscord | <Chronos [She/Her]> Do I have to write it myself or? |
12:10:52 | * | redj quit (Ping timeout: 248 seconds) |
12:20:06 | FromDiscord | <Chronos [She/Her]> Okay yeah I need to write it myself rip |
12:20:21 | FromDiscord | <Chronos [She/Her]> May see if I can automate that a bit tho hm... |
12:43:23 | FromDiscord | <ayex> yep, that would be awesome if it was possible to get it generated.. 🤔 |
12:56:50 | * | azimut joined #nim |
13:19:19 | * | CO2 joined #nim |
13:29:39 | FromDiscord | <sOkam! 🫐> opinion: what operator combination makes sense to you for accessing one of the fields of a union? |
13:30:27 | FromDiscord | <sOkam! 🫐> considering `%>`, but maybe there is a better one |
13:31:13 | FromDiscord | <sOkam! 🫐> (edit) "`%>`," => "`floatField %> 0.5'f`," |
13:33:53 | * | itsmekali321 joined #nim |
13:34:23 | FromDiscord | <sOkam! 🫐> `field .: value` looks kinda neat too |
13:36:03 | * | itsmekali321 quit (Client Quit) |
13:42:12 | * | LittleRedBox quit (Quit: Client closed) |
13:44:53 | * | CO2 quit (Quit: WeeChat 4.1.0) |
13:54:09 | * | rockcavera quit (Remote host closed the connection) |
14:37:36 | FromDiscord | <pmunch> In reply to @chronos.vitaqua "How do I generate": Nim would be quite perfect for this honestly. I've had it on my list of stuff to do if I ever implement a web framework in Nim. |
14:38:10 | FromDiscord | <pmunch> That being said I'm not sure if any of the existing web frameworks generate a spec like that |
14:40:34 | FromDiscord | <Chronos [She/Her]> Yeah fair, I think this can be implemented easily tbh |
14:43:04 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#ix=4JQd |
14:43:15 | * | CO2 joined #nim |
15:00:24 | FromDiscord | <Phil> In reply to @user2m "Hey guys so I'm": That is correct.↵By writing this, you're basically just telling the nim compiler "This proc exists, and it is in this DLL".↵DLLs typically are on your path |
15:00:26 | FromDiscord | <Phil> (edit) "In reply to @user2m "Hey guys so I'm": That is correct.↵By writing this, you're basically just telling the nim compiler "This proc exists, and it is in this DLL".↵DLLs typically are on your path ... " added "afaik" |
15:01:02 | FromDiscord | <Phil> Or a path where DLLs reside rather. I'd need to google it but I faintly recall there being one for Linux and I think for windows it was multiple options (?) |
15:01:38 | FromDiscord | <Phil> sent a long message, see http://ix.io/4JQq |
15:06:39 | FromDiscord | <user2m> In reply to @isofruit "Or a path where": I thought dll's were windows speciifc? |
15:07:55 | FromDiscord | <user2m> looks like mingw is where the file is located `C:\msys64\mingw64\include` |
15:08:28 | FromDiscord | <Phil> sent a long message, see http://ix.io/4JQv |
15:08:49 | FromDiscord | <Phil> so for shared object IIRC |
15:08:55 | FromDiscord | <Phil> (edit) "so" => ""so"" | "shared object" => ""shared object"" |
15:11:12 | FromDiscord | <Phil> Generally these article from him in general is a good read regarding understanding C and how it interacts with nim.↵There's also: https://internet-of-tomohiro.netlify.app/nim/gccguide.en |
15:11:50 | FromDiscord | <user2m> In reply to @isofruit "Generally these article from": this looks good thankyou! |
15:12:02 | FromDiscord | <Phil> (edit) "these" => "this" |
15:14:31 | FromDiscord | <user2m> @Phil wow this is really helpful!!! |
15:14:43 | FromDiscord | <Chronos [She/Her]> In pragmas, I'm assuming whatever pragma is written first, is what executes first? |
15:14:47 | FromDiscord | <Phil> In reply to @user2m "<@180601887916163073> wow this is": Thank demotomohiro, I was just the link provider 😄 |
15:15:00 | FromDiscord | <Chronos [She/Her]> So `{.myPragma, async.}` would run `myPragma` first? |
15:15:11 | FromDiscord | <user2m> @demotomohiro your guide is great! |
15:15:43 | FromDiscord | <leorize> yes↵(@Chronos [She/Her]) |
15:16:14 | FromDiscord | <leorize> well, sorta |
15:16:21 | FromDiscord | <Chronos [She/Her]> Sorta? |
15:16:50 | FromDiscord | <leorize> so it will be splitted into `async: (myPragma: (proc))` |
15:17:06 | FromDiscord | <leorize> if async is untyped, then it will run first |
15:18:30 | FromDiscord | <Chronos [She/Her]> Ah |
15:18:35 | FromDiscord | <Chronos [She/Her]> Hm... |
15:29:34 | * | azimut quit (Ping timeout: 256 seconds) |
15:32:23 | FromDiscord | <demotomohiro> In reply to @user2m "<@288750616510201856> your guide is": I'm glad it helped you. |
15:32:31 | * | azimut joined #nim |
16:11:30 | FromDiscord | <xtrayambak> Any Emacs users here? How did you get LSP working? Which one did you use (eglot, lsp-mode, company, etc.) and can you please share an example? |
16:58:34 | FromDiscord | <meowfemboy> In reply to @user2m "Hey guys so I'm": Not sure if it's relevant to you or not but printf isn't necessarily a function. For example with visual studio it and some others like scanf have been inlined for some time. |
17:00:22 | FromDiscord | <meowfemboy> In the case of visual studio if you wanted the old function you could use legacy_stdio_definitions.lib |
17:00:35 | Amun-Ra | inlining printf sounds expensive |
17:07:59 | * | rockcavera joined #nim |
17:48:47 | FromDiscord | <Chronos [She/Her]> Should I make it so the root url of my web server can be changed by the config? Or can stuff like Nginx and Apache handle that for me? |
18:07:24 | FromDiscord | <Grahf> What's something I can make in Nim to try and learn it? Please ignore if bad questions |
18:09:18 | FromDiscord | <Chronos [She/Her]> In reply to @Grahf "What's something I can": Simple thing to start with is just a few things like rock paper scissors for example |
18:09:30 | FromDiscord | <Chronos [She/Her]> Maybe something to complete small tasks? |
18:11:10 | FromDiscord | <Grahf> I definitely have a rock paper scissors javascript program I could try to covert to Nim |
18:13:42 | Amun-Ra | and then recompile it to js target :) |
18:59:07 | FromDiscord | <raynei486> In reply to @Grahf "What's something I can": games are always nice |
19:05:56 | * | azimut_ joined #nim |
19:06:02 | * | azimut quit (Ping timeout: 256 seconds) |
19:06:52 | * | azimut_ quit (Remote host closed the connection) |
19:07:10 | * | azimut joined #nim |
19:12:59 | FromDiscord | <ntzeno> In reply to @Grahf "What's something I can": prime number generator |
19:14:35 | FromDiscord | <ntzeno> collatz conjecture also works |
19:41:30 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
19:44:38 | * | Lord_Nightmare joined #nim |
19:46:14 | FromDiscord | <Chronos [She/Her]> Anyone know what prologue uses for logging? |
20:55:49 | FromDiscord | <raynei486> In reply to @chronos.vitaqua "Anyone know what prologue": at a quick glance it seems to use `std/logging` https://media.discordapp.net/attachments/371759389889003532/1166480183491043490/image.png?ex=654aa453&is=65382f53&hm=8b7d1363266ddbfdc80c3397db78399913c150aea67669055c03c0aa8700952b& |
20:56:15 | FromDiscord | <Chronos [She/Her]> Ah |
21:03:20 | * | azimut quit (Ping timeout: 256 seconds) |
22:26:06 | * | advesperacit quit () |
22:26:43 | FromDiscord | <.bobbbob> how would you get an attribute from an object using a string or other variable, like python getattr |
22:27:09 | FromDiscord | <Chronos [She/Her]> In reply to @.bobbbob "how would you get": Dynamically? You can't, really |
22:27:19 | FromDiscord | <Chronos [She/Her]> Unless you want to do it at compile time |
22:27:59 | FromDiscord | <.bobbbob> pshhh no way |
22:31:06 | FromDiscord | <Chronos [She/Her]> In reply to @.bobbbob "pshhh no way": If you explain what you want, I may be able to help better? |
22:39:31 | FromDiscord | <Chronos [She/Her]> @.bobbbob |
22:41:25 | FromDiscord | <.bobbbob> yeah Im looking through the std lib and not seeing anything, I can use an enum with a case statement for it instead |
22:41:47 | FromDiscord | <Chronos [She/Her]> If you explain your usecase, a better solution could be provided perhaps? |
22:43:10 | FromDiscord | <.bobbbob> basically a sequence of objects, and the user can say at runtime what attribute they want to search in the sequence, and it'll return the objects that match |
22:44:00 | FromDiscord | <Chronos [She/Her]> Fair |
22:44:39 | FromDiscord | <Chronos [She/Her]> Well, I wish you good luck! |
22:45:02 | FromDiscord | <.bobbbob> its not bad, its just something like getattr would make it like 3 lines |
22:46:38 | FromDiscord | <Chronos [She/Her]> Yeah understandable, I also originally came from Python aha |
22:46:54 | FromDiscord | <Chronos [She/Her]> The typing threw me off originally, but imo it's the best part about Nim |
22:52:33 | FromDiscord | <Chronos [She/Her]> Does anyone have any resources on how I'd utilise Atlas for dev? I feel like it'd be beneficial for me |
22:57:30 | * | CO2 quit (Quit: WeeChat 4.1.0) |
23:12:00 | * | happy joined #nim |
23:12:18 | * | happy is now known as Guest8518 |