<< 13-06-2022 >>

00:01:52FromDiscord<exelotl> thanks a bunch!
00:19:35FromDiscord<abdu> seems `$ nim r` identical to `$ nim c -r`↵?
00:22:13FromDiscord<Elegantbeef> Almost `nim r` outputs the binary in your cache and not the CWD
00:47:06*noeontheend joined #nim
01:12:14*noeontheend quit (Ping timeout: 246 seconds)
01:28:48NimEventerNew Nimble package! at - A powerful, lightweight tool to execute code later, see https://github.com/capocasa/at
01:51:37*krux02 quit (Remote host closed the connection)
02:11:07*kayabaNerve quit (Ping timeout: 240 seconds)
02:13:04*jmdaemon joined #nim
03:33:29*TakinOver quit (Ping timeout: 255 seconds)
04:18:53*rockcavera quit (Remote host closed the connection)
04:23:36*kayabaNerve joined #nim
04:45:41FromDiscord<Elegantbeef> There not that anyone cares but I've now updated Traitor to use a single VTable per trait implementation, the future is now
05:16:53*kayabaNerve quit (Ping timeout: 246 seconds)
05:27:45FromDiscord<Yardanico> nice
05:29:08FromDiscord<Yardanico> @beef add it to nimble
05:29:25FromDiscord<Elegantbeef> Nah it's untested and mainly for fun
05:29:35FromDiscord<Elegantbeef> I think things of quality need only be added to nimble
05:29:46FromDiscord<Yardanico> well, sadly that rule is not enforced nowadays
05:29:52FromDiscord<Yardanico> also, you have a binary in your repo
05:29:55FromDiscord<Yardanico> traitor/tests/test
05:30:00FromDiscord<Elegantbeef> Yea i know i have two
05:36:59FromDiscord<Elegantbeef> Still think i need to do some work with trace hooks
05:37:15FromDiscord<Elegantbeef> and fix the whole `{.byref.}` requirement
06:59:47*PMunch joined #nim
07:07:37FromDiscord<jmgomez> In reply to @demotomohiro "If you set `-d:release`": Tested again a few times with (switch(f) and I can see the `-O3` when no using opt:none
07:22:41*rockcavera joined #nim
07:22:41*rockcavera quit (Changing host)
07:22:41*rockcavera joined #nim
07:27:15*jjido joined #nim
07:27:43*gsalazar joined #nim
07:35:20*ltriant quit (Ping timeout: 248 seconds)
07:46:20*krux02 joined #nim
07:47:46*krux02 quit (Remote host closed the connection)
07:53:11*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
07:57:37FromDiscord<xflywind> Shouldn't this give ambiguous call?
07:57:45FromDiscord<xflywind> sent a code paste, see https://play.nim-lang.org/#ix=4038
08:06:46FromDiscord<Rika> Then Nim isn’t doing that
08:07:02FromDiscord<Rika> What is switch f?
08:09:04FromDiscord<Elegantbeef> Welcome to int literals, yes it should
08:09:31FromDiscord<ElegantBeef> So flywind deleted that literal message i see and matrix really isnt having anything 😄
08:10:18FromDiscord<xflywind> In reply to @ElegantBeef "So flywind deleted that": Yeah I understand the issue so I deleted the question.
08:10:47FromDiscord<ElegantBeef> Didnt propagate to matrix or IRC so i really thought discord was the crazy one this time
08:12:49FromDiscord<demotomohiro> @jmgomez If nim still calls backend clang/gcc with `-O3` when no `-d:release`, `-d:danger`, `--opt:speed` or `--passC:-O3` options were specified, it can be a bug.
08:15:18FromDiscord<demotomohiro> Which OS and CPU arch are you using?
08:23:56FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=403d
08:24:01FromDiscord<jmgomez> In reply to @demotomohiro "Which OS and CPU": MacOs it's an ARM but Im using Rosetta
08:26:13FromDiscord<jmgomez> https://github.com/jmgomez/NimForUE/blob/master/config.nims
08:26:20FromDiscord<jmgomez> That's the exact fifle
08:26:32FromDiscord<jmgomez> In case you want to take a look (see how -03 is commented)
08:30:04*noeontheend joined #nim
08:30:37FromDiscord<demotomohiro> Using rosetta means Nim runs as cpu arch is amd64?
08:31:36FromDiscord<jmgomez> Yes
08:32:11FromDiscord<jmgomez> i386
08:41:13FromDiscord<demotomohiro> `nueConfig.targetConfiguration` can be `Shippig`?
08:41:56FromDiscord<demotomohiro> `Shipping`
08:47:08FromDiscord<jmgomez> Nope
08:48:00FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=403h
08:48:34FromDiscord<jmgomez> If I do set release (or danger) even if I have no opt, it wont compile due to the PCH not having OPTIMIZATIONS defined
08:51:37FromDiscord<demotomohiro> Above code runs at Nim's compile time and it should echo before backend compiler runs
08:52:42FromDiscord<jmgomez> Im know, what Im trying to say is that I know for certain that I dont have any of these flags activated because they arent compatible at all with the way we have setup the PCHs. So it wont compile with them
08:56:00FromDiscord<demotomohiro> Or use https://nim-lang.org/docs/compilesettings.html to check accidentally pass `-O3` flag to clang via passC.
09:03:05FromDiscord<jmgomez> sent a code paste, see https://paste.rs/Ie9
09:03:29FromDiscord<jmgomez> (edit) "https://play.nim-lang.org/#ix=403p" => "https://play.nim-lang.org/#ix=403o"
09:03:36FromDiscord<jmgomez> That applies to danger, release, etc even if I have switch("opt", "none")
09:04:00FromDiscord<jmgomez> Only way it works is by having switch("opt", "none") and none of the others activated
09:16:29FromDiscord<demotomohiro> I cannot test your code as I dont have Mac.
09:22:21FromDiscord<jmgomez> @geekrelief is working on having PCH support on Windows too. It may be reproduced there as well
09:23:35*noeontheend quit (Ping timeout: 255 seconds)
09:33:34FromDiscord<dom96> In reply to @Elegantbeef "I think things of": nah, Nimble should get everything. Curated package lists are the way for quality.
09:34:19FromDiscord<Elegantbeef> I disagree vehemently
09:36:19FromDiscord<dom96> That's fine. But in practice there isn't anyone to review the packages for quality and I don't know of any other language package list that does such a thing (likely because it doesn't scale).
09:36:32FromDiscord<Elegantbeef> A package registry should in my books contain software which is of a certain quality and function. Name sitting like the cargo registry has is the epitome of doing it wrong.
09:36:41FromDiscord<Elegantbeef> I mean the people that should review the packages are the authors
09:36:58FromDiscord<Elegantbeef> You dont need anyone to review a package, accept it's shit and dont submit it
09:37:41FromDiscord<Rika> You’re not gonna get most people to accept that
09:37:58FromDiscord<Elegantbeef> Submitting to a package registry should be done for software that is some effort to write or covers a usage that will greatly benefit others
09:38:14FromDiscord<Elegantbeef> Yes i know rika
09:38:34FromDiscord<Rika> Who is to say whether something would or not benefit others
09:38:34FromDiscord<Elegantbeef> It's my idealistic world and the view i hold myself to with package registries
09:38:36FromDiscord<Rika> How would we know
09:39:08FromDiscord<Elegantbeef> Now without going through the package registry and insulting people I cannot say
09:39:26FromDiscord<Rika> That’s for you
09:39:34FromDiscord<Rika> For others it may still be useful
09:41:14*ltriant joined #nim
09:41:25*xet7 joined #nim
09:47:13NimEventerNew thread by Jasonfi: How to convert to/from an object to a JsonNode object?, see https://forum.nim-lang.org/t/9229
09:50:53*arkurious joined #nim
10:13:49*kayabaNerve joined #nim
10:20:42*kayabaNerve quit (Ping timeout: 244 seconds)
10:22:58*kayabaNerve joined #nim
10:30:16PMunch@Elegantbeef, how about channels like some Linux package managers have?
10:30:35PMunchEssentially one channel which is tried and tested, and other channels which are just wild west
10:31:20*kayabaNerve quit (Ping timeout: 248 seconds)
10:40:48FromDiscord<ripluke> Can someone code review this for me pls I want it to be as minimal as possible. ↵↵https://github.com/Infinitybeond1/cc.nim
10:44:58PMunch@ripluke, let blocks could be combined into a single let
10:45:35PMunch`if searchString in exCmd[0]: echo "true" else: echo "false"` can just be rewritten as `echo searchString in exCmd[0]`
10:46:20PMunchFor the other if test you can use an inline if to choose betwen contains and does not contain
10:56:44PMunch@ripluke ^
10:57:00PMunchBy the way, there's not much point in posting it both here and in offtopic
10:57:10FromDiscord<uncle jim> where can i find the docs for this?↵https://github.com/nim-lang/sdl2
10:58:35PMunch@uncle_jim, well the library is pretty much the same as SDL2, so you should be able to use SDL2 documentation for the overarching stuff
10:58:51PMunchYou can also generate the documentation for the module itself if you want to
11:03:36*xet7 quit (Remote host closed the connection)
11:10:10FromDiscord<uncle jim> In reply to @PMunch "@uncle_jim, well the library": and where will i find those?
11:10:42FromDiscord<Tanguy> Is there something like `when defined(bootstrapping)`?
11:10:45PMunch@uncle_jim, it's linked at the bottom of the page you sent, under the "Documentation" heading
11:10:55PMunch@Tanguy, bootstrapping?
11:11:13FromDiscord<Tanguy> When the compiler is bootstrapping from the c_sources
11:11:30PMunchOooh
11:11:36PMunchHmm, not sure
11:12:15FromDiscord<Tanguy> https://github.com/nim-lang/Nim/blob/devel/koch.nim.cfg#L1 Maybe this, I'll give it a shot
11:24:21FromDiscord<planetis> At least I tried https://github.com/planetis-m/packedjson2
11:24:43FromDiscord<planetis> Araq/packedjson is still unbeatable
11:25:30FromDiscord<planetis> Although the problem with key order still remains, since they are closely related
11:26:58*kayabaNerve joined #nim
11:32:24*kayabaNerve quit (Ping timeout: 276 seconds)
11:35:47*kayabaNerve joined #nim
11:40:01*kayabaNerve quit (Remote host closed the connection)
12:04:14*om3ga quit (Ping timeout: 255 seconds)
12:29:29*jmdaemon quit (Ping timeout: 246 seconds)
12:55:13*kayabaNerve joined #nim
12:59:49NimEventerNew thread by Mardiyah: The most common Nim build system for which we'd go, see https://forum.nim-lang.org/t/9230
13:05:21*kayabaNerve quit (Ping timeout: 276 seconds)
13:08:39FromDiscord<uncle jim> PMunch, i've been searching forever for a thing like "documentation" on https://wiki.libsdl.org/ but can't find a shit. Can you please be kind enough to give me the exact url for a documentation of all the "features"(audio, sprite rendering, etc etc)?
13:10:22FromDiscord<neurocyte> In reply to @uncle jim "PMunch, i've been searching": https://wiki.libsdl.org/APIByCategory
13:11:52FromDiscord<uncle jim> In reply to @neurocyte "https://wiki.libsdl.org/APIByCategory": may you live for a a million years. THANK YOU!!!!
13:12:03FromDiscord<uncle jim> (edit) removed "a"
13:16:14PMunchI'm curious how you missed that, it is a link on the page I sent you with the description "The official documentation for the API. Look here to find detailed information about the functions, structures, and enumerations."
13:16:40PMunchNot trying to me mean or anything, just want to know in case it's something I should keep in mind when writing my own documentation
13:19:47FromDiscord<uncle jim> In reply to @PMunch "I'm curious how you": i'm a dumb guy yk
13:26:05PMunchHaha, fair enough
13:35:57FromDiscord<uncle jim> sent a code paste, see https://paste.rs/2RY
13:36:06FromDiscord<uncle jim> i have installed sdl.... i guess
13:41:35PMunchDo you have that DLL in the same folder as your .exe?
13:43:39FromDiscord<uncle jim> In reply to @PMunch "Do you have that": you mean sdl.dll?
13:45:04FromDiscord<uncle jim> (edit) "sdl.dll?" => "SDL2.dll?"
13:45:18FromDiscord<demotomohiro> I think `SDL2.dll` is the file you need to put in the same folder as your .exe
13:45:25FromDiscord<uncle jim> got it
13:49:57FromDiscord<uncle jim> dis a bug? https://media.discordapp.net/attachments/371759389889003532/985903853973151844/Screenshot_1314.png
13:50:06FromDiscord<uncle jim> it happens when i resize it
13:50:30PMunchWell it's a bug in your code
13:50:39FromDiscord<uncle jim> In reply to @PMunch "Well it's a bug": hmmmm
13:50:55FromDiscord<uncle jim> is `SDL_WINDOW_RESIZABLE` not gud?
13:52:52PMunchWell that makes the window resizeable, doesn't mean your content magically resizes
13:53:02PMunchIf you disable that you shouldn't be able to resize the window at all I believe
13:54:37FromDiscord<uncle jim> In reply to @PMunch "If you disable that": ye
13:55:21FromDiscord<can.l> At least on fedora+wayland there is currently a bug in SDL which does not resize the window properly when using the hardware accelerated renderer. This does probably not apply to windows however.
13:56:25PMunchNah, that just looks like a good ol' forgot to redraw the screen to new dimensions bug
13:56:46FromDiscord<Korven> Hey all, it's me again. I'm wanna do a simple `fork` syscall in a Nim program, but have no idea how to or where to look. Any advice? 👀
13:56:54FromDiscord<Rika> posix module?
13:56:55FromDiscord<Korven> Basically how to do system calls
13:57:07FromDiscord<Korven> In reply to @Rika "posix module?": Does it have all the linux syscalls? 🤔
13:57:19FromDiscord<Rika> if its in posix sure
13:57:32FromDiscord<can.l> In reply to @PMunch "Nah, that just looks": That is indeed very likely, especially since windows should be rather well tested.
13:57:38FromDiscord<Rika> https://nim-lang.org/docs/posix.html
13:57:39FromDiscord<Korven> hmmm idk how compliant linux is to posix to be honest, no idea about that stuff XD
13:57:56FromDiscord<Rika> linux should be wholly compliant
13:58:14*derpydoo joined #nim
13:58:33FromDiscord<Korven> :O
13:58:35FromDiscord<Korven> fair enough
13:58:36FromDiscord<Korven> ty!
13:58:39*PMunch quit (Quit: Leaving)
13:59:45FromDiscord<Rika> oh wait, its MOSTLY
13:59:47FromDiscord<Rika> not wholly
13:59:53FromDiscord<Rika> but its not much of an issue
14:01:21FromDiscord<uncle jim> what should be the arguments in `createRenderer`?
14:01:43FromDiscord<uncle jim> sent a code paste, see https://paste.rs/GUH
14:03:34FromDiscord<can.l> Probably something like window.create_renderer(-1, Renderer_PresentVSync)
14:28:54*vicfred joined #nim
14:30:03*matt_13373 joined #nim
14:30:26*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
14:31:40*Lord_Nightmare joined #nim
14:33:15*matt_1337 quit (Ping timeout: 260 seconds)
14:33:15*matt_13373 is now known as matt_1337
14:35:46*jjido joined #nim
14:37:20*nisstyre quit (Ping timeout: 260 seconds)
14:38:18FromDiscord<Prestige> https://github.com/Vladar4/sdl2_nim/blob/master/examples/ex204_drawing.nim#L149 might be useful @uncle jim
14:59:11*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
14:59:42*toluene quit (Ping timeout: 244 seconds)
15:20:39*nisstyre joined #nim
15:21:14*kayabaNerve joined #nim
15:55:17*rockcavera quit (Ping timeout: 246 seconds)
16:01:28*gsalazar quit (Ping timeout: 248 seconds)
16:19:30*kenran joined #nim
16:20:44*kenran quit (Client Quit)
16:24:37*PMunch joined #nim
16:30:11*jjido joined #nim
16:45:13*xet7 joined #nim
16:50:59FromDiscord<ynfle> @ElegantBeef (or anyone) can you help with this weird error message?
16:51:51FromDiscord<ynfle> https://play.nim-lang.org/#ix=405e
17:03:49FromDiscord<demotomohiro> How about to simplfiy your code that produce same error?
17:12:06*xet7 quit (Ping timeout: 258 seconds)
17:24:28*xet7 joined #nim
17:25:01FromDiscord<neurocyte> In reply to @ynfle "<@145405730571288577> (or anyone) can": What is weird about it to you? It says the return type of no_vowels does not match the type required to construct the transformers Table.
17:33:59FromDiscord<ynfle> In reply to @neurocyte "What is weird about": In what way don't the types match
17:34:01FromDiscord<ynfle> ?
17:45:46FromDiscord<Korven> i mean
17:45:57FromDiscord<Korven> it says it got a `Transformer` object
17:46:04FromDiscord<Korven> but it needs a proc
17:47:06FromDiscord<Korven> inconsistent, for sure
17:48:35FromDiscord<blashyrk> does nim have a first-party shared library (dynamic) plugin system? also, does the GC cause clashes when loading dynamic libraries? I assume arc/orc shouldn't
17:50:45FromDiscord<demotomohiro> In reply to @blashyrk "does nim have a": Something like this?https://nim-lang.org/docs/dynlib.html
17:50:49*rockcavera joined #nim
17:50:49*rockcavera quit (Changing host)
17:50:49*rockcavera joined #nim
17:51:22*xet7 quit (Quit: Leaving)
17:52:54FromDiscord<ynfle> In reply to @Korven "it says it got": Transformer is not an object, it's a type alias for a proc
17:54:00FromDiscord<blashyrk> @demotomohiro ↵Yes though I was looking for something more out-of-the-box 🙂 Like some sort of way to reference symbols defined in shared/static as if they're part of the same program, similarly to how when you have header files available in C
17:54:28FromDiscord<blashyrk> (edit) "@demotomohiro ↵Yes though I was looking for something more out-of-the-box 🙂 Like some sort of way to reference symbols defined in shared/static as if they're part of the same program, similarly to how when you have header files available ... in" added "along with static/shared libraries"
17:54:40FromDiscord<demotomohiro> In reply to @ynfle "<@145405730571288577> (or anyone) can": I think there is a bug that cause compile error in your code when you use Table constructor.↵https://play.nim-lang.org/#ix=405v
17:55:34FromDiscord<Korven> In reply to @ynfle "Transformer is not an": indeed, i failed to notice that
17:56:04FromDiscord<Korven> seems like it's a deeper type issue then, since changing the type of the table to a Transformer still does not work, it just seems to expand the type
17:56:05FromDiscord<demotomohiro> In reply to @blashyrk "<@288750616510201856> Yes though": Then: https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import
17:56:06FromDiscord<Korven> 🤔
17:59:55FromDiscord<neurocyte> In reply to @demotomohiro "I think there is": Is it a bug? The manual says that {.closure.} is the default for procedural types, not {.nimcall.}, which is the default for procs, so the type error is technically correct right?
18:00:02FromDiscord<blashyrk> @demotomohiro ↵Thanks this looks pretty elegant. I was still hoping there would be a way to make these definitions in the exact same way whether they're in the same compilation unit or external. But this is good enough 🙂
18:03:36FromDiscord<ynfle> In reply to @neurocyte "Is it a bug?": nimcall works for closure
18:03:41FromDiscord<demotomohiro> In reply to @blashyrk "<@288750616510201856> Yes though": I think using shared library written in C/C++ doesn't clash GC.↵Using shared library written in Nim from C/C++/Nim would not clash GC if you use arc/orc.
18:04:17FromDiscord<blashyrk> I'm talking just Nim <-> Nim
18:05:00FromDiscord<blashyrk> (edit) "Nim" => "Nim. Basically thinking about a plugin system (say, a renderer via opengl/vulkan/directx) where you could swap them at compile time/runtime via shared libs"
18:06:12FromDiscord<demotomohiro> In reply to @blashyrk "<@288750616510201856> Thanks this": Maybe push/pop pragma helps: https://nim-lang.org/docs/manual.html#pragmas-push-and-pop-pragmas
18:09:48FromDiscord<demotomohiro> In reply to @blashyrk "I'm talking just Nim": In that case, I think you need to use dynlib module: https://nim-lang.org/docs/dynlib.html↵I don't think dynlib pragma allows you to change shared library filename at runtime.
18:15:24FromDiscord<neurocyte> In reply to @ynfle "nimcall works for closure": forcing everything to {.nimcall.} definitely works though. I think it's either a bug or possibly just a nasty edge case in the type inference for the table constructor.
18:26:13*derpydoo quit (Quit: derpydoo)
18:30:00FromDiscord<demotomohiro> In reply to @neurocyte "Is it a bug?": You can assign {.nimcall.} proc to {.closure.} proc type variable.↵Converting {.nimcall.} proc (that is NOT overloaded) to {.closure.} type is compile error in table constructor.↵But it is not compile error in array constructor.↵https://play.nim-lang.org/#ix=405N
18:31:20FromDiscord<ynfle> In reply to @neurocyte "forcing everything to {.nimcall.}": Forcing to nimcall to closure works? Hmm
18:37:19FromDiscord<ynfle> It's all confusing
18:37:22FromDiscord<ynfle> Bug report?
18:43:56*vicfred quit (Remote host closed the connection)
18:46:36*vicfred joined #nim
18:48:45NimEventerNew thread by Planetis: Packedjson2 - A new JSON library, see https://forum.nim-lang.org/t/9231
18:57:27FromDiscord<ynfle> Has anyone tried using the nimlang/nim docker images recently?
19:01:01FromDiscord<ynfle> How do I fix an issue on the ubuntu nim image `could not import: SSL_get_peer_certificate` after installing libcrypto
19:07:39FromDiscord<ynfle> Who can I get the details of which ubuntu version they use?
19:10:40FromDiscord<neurocyte> In reply to @ynfle "Who can I get": docker run --rm nimlang/nim bash -c "cat /etc/os-release"
19:16:06FromDiscord<ynfle> In reply to @neurocyte "docker run --rm nimlang/nim": Thanks. It's devel I'm 99% sure
19:17:08FromDiscord<ynfle> 22.04 Thanks
19:17:24FromDiscord<ynfle> So what's with the weird libcrypto errors?
19:22:11FromDiscord<neurocyte> In reply to @ynfle "So what's with the": Just guessing, but SSL_get_peer_certificate should be in libssl3. Have you tried installing libssl-dev?
19:23:31FromDiscord<ynfle> `RUN apt-get install libssl-dev -y`
19:24:22FromDiscord<ynfle> That's what I use
19:24:37FromDiscord<ynfle> There is an issue with nim and libssl3
19:25:16FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=4063
19:26:34FromDiscord<ynfle> sent a code paste, see https://paste.rs/aja
19:50:31FromDiscord<ynfle> I ended up building my own image based on ubuntu 20.04
19:51:13FromDiscord<Zectbumo> I was looking at fieldPairs https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CS%2CT↵and I noticed there is an example using `when` inside a for loop. I don't understand this. I thought `when` was figured out at compile time so how can this be used inside a loop?
19:53:56FromDiscord<neurocyte> the when statement itself is executed at compile time, yes, but the contents of whichever branch is true may be executed at runtime.
19:54:25FromDiscord<neurocyte> the false branches are stripped away and do not exist at runtime.
19:57:11*jmdaemon joined #nim
19:58:42*PMunch quit (Quit: leaving)
20:01:38FromDiscord<Zectbumo> I would guess this is possible because `fieldPairs` has `noSideEffect`
20:02:50FromDiscord<Zectbumo> or does that have nothing to do with this situation?
20:03:58*jmd_ joined #nim
20:05:15*jmdaemon quit (Ping timeout: 276 seconds)
20:06:03*jjido quit (Quit: Textual IRC Client: www.textualapp.com)
20:10:59FromDiscord<Elegantbeef> Ynfle did you get the fix?
20:16:34FromDiscord<demotomohiro> In reply to @Zectbumo "I would guess this": `fieldPairs` expand the loop at compile time because field names of `object`/`tuple` exists only at compile time. I think that is why when is used.
20:17:09FromDiscord<Elegantbeef> Yep field pairs is unrolled
20:17:23FromDiscord<Elegantbeef> Which means each iteration is pooped out
20:18:04FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=406d
20:18:49FromDiscord<Elegantbeef> Due to the static nature of Nim you must have loops like fieldPairs/pairs unrolled as your forvar is not homogenous
20:24:11FromDiscord<Zectbumo> oh, I didn't even catch the non homogenous part of this. very interesting
20:24:49FromDiscord<Elegantbeef> Really the magic used for field pairs is no longer needed since we have for loop macros now but alas
20:46:14*cyraxjoe quit (Ping timeout: 255 seconds)
20:49:01FromDiscord<ripluke> In reply to @PMunch "By the way, there's": Yea I deleted that one as I read that off topic wasn’t about nim
20:49:35FromDiscord<ripluke> In reply to @PMunch "For the other if": Ok thanks!
20:53:08FromDiscord<mr. glowinthedark> Is there anything like `range`, but for distinct values?
20:55:29*cyraxjoe joined #nim
20:56:06*derpydoo joined #nim
21:05:03FromDiscord<ynfle> In reply to @Elegantbeef "Ynfle did you get": For which? Docker issue or proc table issue?
21:10:46FromDiscord<Elegantbeef> Proc table
21:11:04FromDiscord<Elegantbeef> The issue seems to stem from tuples + overloaded procedures
21:21:11FromDiscord<ynfle> Is it a bug?
21:21:26FromDiscord<ynfle> If nimcall is used, it works as shown above?
21:27:46FromDiscord<Elegantbeef> It's afaik
21:29:20*arkurious quit (Quit: Leaving)
21:31:09FromDiscord<ynfle> Should I report it?
21:44:44*crem quit (Ping timeout: 255 seconds)
21:48:36FromDiscord<Elegantbeef> If you minimize it properly yes
21:50:09FromDiscord<Elegantbeef> There you go
21:50:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=406C
21:50:36FromDiscord<Elegantbeef> Seems it's an issue with tuples and procs
21:59:11*crem joined #nim
22:04:49*noeontheend joined #nim
22:18:14FromDiscord<XxDiCaprioxX> Hey quick question: is there a way to hardcode an image into a program?
22:18:27FromDiscord<Elegantbeef> `staticRead("myImage.png")`
22:18:55FromDiscord<XxDiCaprioxX> thanks bot
22:19:01FromDiscord<Elegantbeef> I am a human!
22:19:04*noeontheend quit (Ping timeout: 248 seconds)
22:21:56FromDiscord<XxDiCaprioxX> I do wonder, what is the datatype I get from staticRead?
22:22:07FromDiscord<Elegantbeef> string
22:23:25FromDiscord<XxDiCaprioxX> so when I staticread a file I get a string? so if my file is a png I get the whole encoded thing with pixel clusters?
22:23:43FromDiscord<Elegantbeef> You get the file read as is into memory
22:23:53FromDiscord<Elegantbeef> You can use procedures at compile time to extract what you want
22:23:53*noeontheend joined #nim
22:24:08FromDiscord<XxDiCaprioxX> okay thank you
22:26:24FromDiscord<Elegantbeef> No clue if you're still alive pmunch but PR made for the inheritance
22:42:00FromDiscord<XxDiCaprioxX> If you're still here Elegantbeef or someone else I could really use some help understanding how the hell to proceed with the string I receive from staticRead
22:42:21FromDiscord<Elegantbeef> It's the binary image data you just use it wherever you need it
22:42:29FromDiscord<Elegantbeef> Do you have an image library you're using?
22:42:32FromDiscord<XxDiCaprioxX> yes
22:42:33FromDiscord<XxDiCaprioxX> imageman
22:42:49FromDiscord<XxDiCaprioxX> and I am kinda lost on how to proceed with the binary image data
22:44:13FromDiscord<Elegantbeef> Imageman doesnt have a way to load data from a binary source
22:44:46FromDiscord<XxDiCaprioxX> okay so basically the library does not support it. that explains why I wondered around the github page without results
22:45:04FromDiscord<XxDiCaprioxX> so I have to use a different library?
22:45:22FromDiscord<Elegantbeef> Or store the image in a file/memfile
22:46:00FromDiscord<Elegantbeef> pixie has `decodeImage`
22:46:32FromDiscord<XxDiCaprioxX> In reply to @Elegantbeef "Or store the image": would that be possible in a static compile-time context?
22:47:11FromDiscord<Elegantbeef> What are you a fter?
22:47:38FromDiscord<Elegantbeef> You want to embed an image into your project?
22:47:45FromDiscord<XxDiCaprioxX> yes basically
22:48:02FromDiscord<Elegantbeef> So then just `staticRead` and you're done
22:48:03FromDiscord<XxDiCaprioxX> I want it all inside one .exe file in the end
22:48:31FromDiscord<XxDiCaprioxX> okay staticRead and I have the image stored as binary but imageman can't work with it, so I have to use a different library, right?
22:48:42FromDiscord<Elegantbeef> If you want to use image man you'll need to make a file either using memfile or io
22:49:06FromDiscord<Elegantbeef> Cause it needs a path to load it at runtime
22:49:54FromDiscord<XxDiCaprioxX> okay so I have to create the file somewhere during runtime to work with it?
22:51:12FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/71A
22:52:25FromDiscord<Elegantbeef> Might need `newMemMapFileStream` instead
22:52:37FromDiscord<XxDiCaprioxX> does this tempdir exist in ram?
22:52:40FromDiscord<Elegantbeef> Either point is you need a file due to a limitation of imageman
22:52:52FromDiscord<Elegantbeef> Memory mapped files do
22:53:06FromDiscord<XxDiCaprioxX> okay thank you
22:53:22FromDiscord<XxDiCaprioxX> at this point I'm considering just using a different library, this is kinda painful
22:53:40FromDiscord<Elegantbeef> Yea pixie is pretty good
22:53:49FromDiscord<XxDiCaprioxX> I'll look into it, thank you very much!
22:53:58FromDiscord<Elegantbeef> `decodeImage(staticRead"myImage.png")` is all you'd need there
22:54:58FromDiscord<XxDiCaprioxX> sweet, thanks!
22:59:51FromDiscord<XxDiCaprioxX> uh, I get this error message when trying to compile: `VM does not support 'cast' from tyArray to tyUInt64`
23:00:18FromDiscord<Elegantbeef> You're attempting to decode the image at compile time i presume
23:00:19FromDiscord<Elegantbeef> Dont do that
23:00:47FromDiscord<Elegantbeef> `let myImage = decodeImage(staticRead"myImage.png")`
23:02:43FromDiscord<XxDiCaprioxX> okay did that, error is gone
23:16:43FromDiscord<XxDiCaprioxX> sent a long message, see http://ix.io/406N
23:19:16FromDiscord<Elegantbeef> Look at the examples
23:19:46FromDiscord<XxDiCaprioxX> The examples only went about a few vectors, don't they?
23:20:15FromDiscord<Elegantbeef> There is `drawImage` which lets you draw an image on top of one
23:20:21FromDiscord<Elegantbeef> and `newImage` to create a new image buffer
23:20:37FromDiscord<Elegantbeef> All the stuff you need is there you'll just need to read the API reference
23:20:47FromDiscord<XxDiCaprioxX> Api reference, okay, thank you
23:21:40*vicfred quit (Read error: Connection reset by peer)
23:21:50*vicfred_ joined #nim
23:29:49*noeontheend quit (Ping timeout: 256 seconds)
23:40:35*systemdsucks quit (Ping timeout: 256 seconds)
23:52:19*systemdsucks joined #nim