00:01:52 | FromDiscord | <exelotl> thanks a bunch! |
00:19:35 | FromDiscord | <abdu> seems `$ nim r` identical to `$ nim c -r`↵? |
00:22:13 | FromDiscord | <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:48 | NimEventer | New 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:41 | FromDiscord | <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:45 | FromDiscord | <Yardanico> nice |
05:29:08 | FromDiscord | <Yardanico> @beef add it to nimble |
05:29:25 | FromDiscord | <Elegantbeef> Nah it's untested and mainly for fun |
05:29:35 | FromDiscord | <Elegantbeef> I think things of quality need only be added to nimble |
05:29:46 | FromDiscord | <Yardanico> well, sadly that rule is not enforced nowadays |
05:29:52 | FromDiscord | <Yardanico> also, you have a binary in your repo |
05:29:55 | FromDiscord | <Yardanico> traitor/tests/test |
05:30:00 | FromDiscord | <Elegantbeef> Yea i know i have two |
05:36:59 | FromDiscord | <Elegantbeef> Still think i need to do some work with trace hooks |
05:37:15 | FromDiscord | <Elegantbeef> and fix the whole `{.byref.}` requirement |
06:59:47 | * | PMunch joined #nim |
07:07:37 | FromDiscord | <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:37 | FromDiscord | <xflywind> Shouldn't this give ambiguous call? |
07:57:45 | FromDiscord | <xflywind> sent a code paste, see https://play.nim-lang.org/#ix=4038 |
08:06:46 | FromDiscord | <Rika> Then Nim isn’t doing that |
08:07:02 | FromDiscord | <Rika> What is switch f? |
08:09:04 | FromDiscord | <Elegantbeef> Welcome to int literals, yes it should |
08:09:31 | FromDiscord | <ElegantBeef> So flywind deleted that literal message i see and matrix really isnt having anything 😄 |
08:10:18 | FromDiscord | <xflywind> In reply to @ElegantBeef "So flywind deleted that": Yeah I understand the issue so I deleted the question. |
08:10:47 | FromDiscord | <ElegantBeef> Didnt propagate to matrix or IRC so i really thought discord was the crazy one this time |
08:12:49 | FromDiscord | <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:18 | FromDiscord | <demotomohiro> Which OS and CPU arch are you using? |
08:23:56 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=403d |
08:24:01 | FromDiscord | <jmgomez> In reply to @demotomohiro "Which OS and CPU": MacOs it's an ARM but Im using Rosetta |
08:26:13 | FromDiscord | <jmgomez> https://github.com/jmgomez/NimForUE/blob/master/config.nims |
08:26:20 | FromDiscord | <jmgomez> That's the exact fifle |
08:26:32 | FromDiscord | <jmgomez> In case you want to take a look (see how -03 is commented) |
08:30:04 | * | noeontheend joined #nim |
08:30:37 | FromDiscord | <demotomohiro> Using rosetta means Nim runs as cpu arch is amd64? |
08:31:36 | FromDiscord | <jmgomez> Yes |
08:32:11 | FromDiscord | <jmgomez> i386 |
08:41:13 | FromDiscord | <demotomohiro> `nueConfig.targetConfiguration` can be `Shippig`? |
08:41:56 | FromDiscord | <demotomohiro> `Shipping` |
08:47:08 | FromDiscord | <jmgomez> Nope |
08:48:00 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=403h |
08:48:34 | FromDiscord | <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:37 | FromDiscord | <demotomohiro> Above code runs at Nim's compile time and it should echo before backend compiler runs |
08:52:42 | FromDiscord | <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:00 | FromDiscord | <demotomohiro> Or use https://nim-lang.org/docs/compilesettings.html to check accidentally pass `-O3` flag to clang via passC. |
09:03:05 | FromDiscord | <jmgomez> sent a code paste, see https://paste.rs/Ie9 |
09:03:29 | FromDiscord | <jmgomez> (edit) "https://play.nim-lang.org/#ix=403p" => "https://play.nim-lang.org/#ix=403o" |
09:03:36 | FromDiscord | <jmgomez> That applies to danger, release, etc even if I have switch("opt", "none") |
09:04:00 | FromDiscord | <jmgomez> Only way it works is by having switch("opt", "none") and none of the others activated |
09:16:29 | FromDiscord | <demotomohiro> I cannot test your code as I dont have Mac. |
09:22:21 | FromDiscord | <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:34 | FromDiscord | <dom96> In reply to @Elegantbeef "I think things of": nah, Nimble should get everything. Curated package lists are the way for quality. |
09:34:19 | FromDiscord | <Elegantbeef> I disagree vehemently |
09:36:19 | FromDiscord | <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:32 | FromDiscord | <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:41 | FromDiscord | <Elegantbeef> I mean the people that should review the packages are the authors |
09:36:58 | FromDiscord | <Elegantbeef> You dont need anyone to review a package, accept it's shit and dont submit it |
09:37:41 | FromDiscord | <Rika> You’re not gonna get most people to accept that |
09:37:58 | FromDiscord | <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:14 | FromDiscord | <Elegantbeef> Yes i know rika |
09:38:34 | FromDiscord | <Rika> Who is to say whether something would or not benefit others |
09:38:34 | FromDiscord | <Elegantbeef> It's my idealistic world and the view i hold myself to with package registries |
09:38:36 | FromDiscord | <Rika> How would we know |
09:39:08 | FromDiscord | <Elegantbeef> Now without going through the package registry and insulting people I cannot say |
09:39:26 | FromDiscord | <Rika> That’s for you |
09:39:34 | FromDiscord | <Rika> For others it may still be useful |
09:41:14 | * | ltriant joined #nim |
09:41:25 | * | xet7 joined #nim |
09:47:13 | NimEventer | New 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:16 | PMunch | @Elegantbeef, how about channels like some Linux package managers have? |
10:30:35 | PMunch | Essentially 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:48 | FromDiscord | <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:58 | PMunch | @ripluke, let blocks could be combined into a single let |
10:45:35 | PMunch | `if searchString in exCmd[0]: echo "true" else: echo "false"` can just be rewritten as `echo searchString in exCmd[0]` |
10:46:20 | PMunch | For the other if test you can use an inline if to choose betwen contains and does not contain |
10:56:44 | PMunch | @ripluke ^ |
10:57:00 | PMunch | By the way, there's not much point in posting it both here and in offtopic |
10:57:10 | FromDiscord | <uncle jim> where can i find the docs for this?↵https://github.com/nim-lang/sdl2 |
10:58:35 | PMunch | @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:51 | PMunch | You 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:10 | FromDiscord | <uncle jim> In reply to @PMunch "@uncle_jim, well the library": and where will i find those? |
11:10:42 | FromDiscord | <Tanguy> Is there something like `when defined(bootstrapping)`? |
11:10:45 | PMunch | @uncle_jim, it's linked at the bottom of the page you sent, under the "Documentation" heading |
11:10:55 | PMunch | @Tanguy, bootstrapping? |
11:11:13 | FromDiscord | <Tanguy> When the compiler is bootstrapping from the c_sources |
11:11:30 | PMunch | Oooh |
11:11:36 | PMunch | Hmm, not sure |
11:12:15 | FromDiscord | <Tanguy> https://github.com/nim-lang/Nim/blob/devel/koch.nim.cfg#L1 Maybe this, I'll give it a shot |
11:24:21 | FromDiscord | <planetis> At least I tried https://github.com/planetis-m/packedjson2 |
11:24:43 | FromDiscord | <planetis> Araq/packedjson is still unbeatable |
11:25:30 | FromDiscord | <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:49 | NimEventer | New 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:39 | FromDiscord | <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:22 | FromDiscord | <neurocyte> In reply to @uncle jim "PMunch, i've been searching": https://wiki.libsdl.org/APIByCategory |
13:11:52 | FromDiscord | <uncle jim> In reply to @neurocyte "https://wiki.libsdl.org/APIByCategory": may you live for a a million years. THANK YOU!!!! |
13:12:03 | FromDiscord | <uncle jim> (edit) removed "a" |
13:16:14 | PMunch | I'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:40 | PMunch | Not 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:47 | FromDiscord | <uncle jim> In reply to @PMunch "I'm curious how you": i'm a dumb guy yk |
13:26:05 | PMunch | Haha, fair enough |
13:35:57 | FromDiscord | <uncle jim> sent a code paste, see https://paste.rs/2RY |
13:36:06 | FromDiscord | <uncle jim> i have installed sdl.... i guess |
13:41:35 | PMunch | Do you have that DLL in the same folder as your .exe? |
13:43:39 | FromDiscord | <uncle jim> In reply to @PMunch "Do you have that": you mean sdl.dll? |
13:45:04 | FromDiscord | <uncle jim> (edit) "sdl.dll?" => "SDL2.dll?" |
13:45:18 | FromDiscord | <demotomohiro> I think `SDL2.dll` is the file you need to put in the same folder as your .exe |
13:45:25 | FromDiscord | <uncle jim> got it |
13:49:57 | FromDiscord | <uncle jim> dis a bug? https://media.discordapp.net/attachments/371759389889003532/985903853973151844/Screenshot_1314.png |
13:50:06 | FromDiscord | <uncle jim> it happens when i resize it |
13:50:30 | PMunch | Well it's a bug in your code |
13:50:39 | FromDiscord | <uncle jim> In reply to @PMunch "Well it's a bug": hmmmm |
13:50:55 | FromDiscord | <uncle jim> is `SDL_WINDOW_RESIZABLE` not gud? |
13:52:52 | PMunch | Well that makes the window resizeable, doesn't mean your content magically resizes |
13:53:02 | PMunch | If you disable that you shouldn't be able to resize the window at all I believe |
13:54:37 | FromDiscord | <uncle jim> In reply to @PMunch "If you disable that": ye |
13:55:21 | FromDiscord | <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:25 | PMunch | Nah, that just looks like a good ol' forgot to redraw the screen to new dimensions bug |
13:56:46 | FromDiscord | <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:54 | FromDiscord | <Rika> posix module? |
13:56:55 | FromDiscord | <Korven> Basically how to do system calls |
13:57:07 | FromDiscord | <Korven> In reply to @Rika "posix module?": Does it have all the linux syscalls? 🤔 |
13:57:19 | FromDiscord | <Rika> if its in posix sure |
13:57:32 | FromDiscord | <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:38 | FromDiscord | <Rika> https://nim-lang.org/docs/posix.html |
13:57:39 | FromDiscord | <Korven> hmmm idk how compliant linux is to posix to be honest, no idea about that stuff XD |
13:57:56 | FromDiscord | <Rika> linux should be wholly compliant |
13:58:14 | * | derpydoo joined #nim |
13:58:33 | FromDiscord | <Korven> :O |
13:58:35 | FromDiscord | <Korven> fair enough |
13:58:36 | FromDiscord | <Korven> ty! |
13:58:39 | * | PMunch quit (Quit: Leaving) |
13:59:45 | FromDiscord | <Rika> oh wait, its MOSTLY |
13:59:47 | FromDiscord | <Rika> not wholly |
13:59:53 | FromDiscord | <Rika> but its not much of an issue |
14:01:21 | FromDiscord | <uncle jim> what should be the arguments in `createRenderer`? |
14:01:43 | FromDiscord | <uncle jim> sent a code paste, see https://paste.rs/GUH |
14:03:34 | FromDiscord | <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:18 | FromDiscord | <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:59 | FromDiscord | <ynfle> @ElegantBeef (or anyone) can you help with this weird error message? |
16:51:51 | FromDiscord | <ynfle> https://play.nim-lang.org/#ix=405e |
17:03:49 | FromDiscord | <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:01 | FromDiscord | <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:59 | FromDiscord | <ynfle> In reply to @neurocyte "What is weird about": In what way don't the types match |
17:34:01 | FromDiscord | <ynfle> ? |
17:45:46 | FromDiscord | <Korven> i mean |
17:45:57 | FromDiscord | <Korven> it says it got a `Transformer` object |
17:46:04 | FromDiscord | <Korven> but it needs a proc |
17:47:06 | FromDiscord | <Korven> inconsistent, for sure |
17:48:35 | FromDiscord | <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:45 | FromDiscord | <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:54 | FromDiscord | <ynfle> In reply to @Korven "it says it got": Transformer is not an object, it's a type alias for a proc |
17:54:00 | FromDiscord | <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:28 | FromDiscord | <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:40 | FromDiscord | <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:34 | FromDiscord | <Korven> In reply to @ynfle "Transformer is not an": indeed, i failed to notice that |
17:56:04 | FromDiscord | <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:05 | FromDiscord | <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:06 | FromDiscord | <Korven> 🤔 |
17:59:55 | FromDiscord | <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:02 | FromDiscord | <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:36 | FromDiscord | <ynfle> In reply to @neurocyte "Is it a bug?": nimcall works for closure |
18:03:41 | FromDiscord | <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:17 | FromDiscord | <blashyrk> I'm talking just Nim <-> Nim |
18:05:00 | FromDiscord | <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:12 | FromDiscord | <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:48 | FromDiscord | <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:24 | FromDiscord | <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:00 | FromDiscord | <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:20 | FromDiscord | <ynfle> In reply to @neurocyte "forcing everything to {.nimcall.}": Forcing to nimcall to closure works? Hmm |
18:37:19 | FromDiscord | <ynfle> It's all confusing |
18:37:22 | FromDiscord | <ynfle> Bug report? |
18:43:56 | * | vicfred quit (Remote host closed the connection) |
18:46:36 | * | vicfred joined #nim |
18:48:45 | NimEventer | New thread by Planetis: Packedjson2 - A new JSON library, see https://forum.nim-lang.org/t/9231 |
18:57:27 | FromDiscord | <ynfle> Has anyone tried using the nimlang/nim docker images recently? |
19:01:01 | FromDiscord | <ynfle> How do I fix an issue on the ubuntu nim image `could not import: SSL_get_peer_certificate` after installing libcrypto |
19:07:39 | FromDiscord | <ynfle> Who can I get the details of which ubuntu version they use? |
19:10:40 | FromDiscord | <neurocyte> In reply to @ynfle "Who can I get": docker run --rm nimlang/nim bash -c "cat /etc/os-release" |
19:16:06 | FromDiscord | <ynfle> In reply to @neurocyte "docker run --rm nimlang/nim": Thanks. It's devel I'm 99% sure |
19:17:08 | FromDiscord | <ynfle> 22.04 Thanks |
19:17:24 | FromDiscord | <ynfle> So what's with the weird libcrypto errors? |
19:22:11 | FromDiscord | <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:31 | FromDiscord | <ynfle> `RUN apt-get install libssl-dev -y` |
19:24:22 | FromDiscord | <ynfle> That's what I use |
19:24:37 | FromDiscord | <ynfle> There is an issue with nim and libssl3 |
19:25:16 | FromDiscord | <ynfle> sent a code paste, see https://play.nim-lang.org/#ix=4063 |
19:26:34 | FromDiscord | <ynfle> sent a code paste, see https://paste.rs/aja |
19:50:31 | FromDiscord | <ynfle> I ended up building my own image based on ubuntu 20.04 |
19:51:13 | FromDiscord | <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:56 | FromDiscord | <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:25 | FromDiscord | <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:38 | FromDiscord | <Zectbumo> I would guess this is possible because `fieldPairs` has `noSideEffect` |
20:02:50 | FromDiscord | <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:59 | FromDiscord | <Elegantbeef> Ynfle did you get the fix? |
20:16:34 | FromDiscord | <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:09 | FromDiscord | <Elegantbeef> Yep field pairs is unrolled |
20:17:23 | FromDiscord | <Elegantbeef> Which means each iteration is pooped out |
20:18:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=406d |
20:18:49 | FromDiscord | <Elegantbeef> Due to the static nature of Nim you must have loops like fieldPairs/pairs unrolled as your forvar is not homogenous |
20:24:11 | FromDiscord | <Zectbumo> oh, I didn't even catch the non homogenous part of this. very interesting |
20:24:49 | FromDiscord | <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:01 | FromDiscord | <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:35 | FromDiscord | <ripluke> In reply to @PMunch "For the other if": Ok thanks! |
20:53:08 | FromDiscord | <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:03 | FromDiscord | <ynfle> In reply to @Elegantbeef "Ynfle did you get": For which? Docker issue or proc table issue? |
21:10:46 | FromDiscord | <Elegantbeef> Proc table |
21:11:04 | FromDiscord | <Elegantbeef> The issue seems to stem from tuples + overloaded procedures |
21:21:11 | FromDiscord | <ynfle> Is it a bug? |
21:21:26 | FromDiscord | <ynfle> If nimcall is used, it works as shown above? |
21:27:46 | FromDiscord | <Elegantbeef> It's afaik |
21:29:20 | * | arkurious quit (Quit: Leaving) |
21:31:09 | FromDiscord | <ynfle> Should I report it? |
21:44:44 | * | crem quit (Ping timeout: 255 seconds) |
21:48:36 | FromDiscord | <Elegantbeef> If you minimize it properly yes |
21:50:09 | FromDiscord | <Elegantbeef> There you go |
21:50:13 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=406C |
21:50:36 | FromDiscord | <Elegantbeef> Seems it's an issue with tuples and procs |
21:59:11 | * | crem joined #nim |
22:04:49 | * | noeontheend joined #nim |
22:18:14 | FromDiscord | <XxDiCaprioxX> Hey quick question: is there a way to hardcode an image into a program? |
22:18:27 | FromDiscord | <Elegantbeef> `staticRead("myImage.png")` |
22:18:55 | FromDiscord | <XxDiCaprioxX> thanks bot |
22:19:01 | FromDiscord | <Elegantbeef> I am a human! |
22:19:04 | * | noeontheend quit (Ping timeout: 248 seconds) |
22:21:56 | FromDiscord | <XxDiCaprioxX> I do wonder, what is the datatype I get from staticRead? |
22:22:07 | FromDiscord | <Elegantbeef> string |
22:23:25 | FromDiscord | <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:43 | FromDiscord | <Elegantbeef> You get the file read as is into memory |
22:23:53 | FromDiscord | <Elegantbeef> You can use procedures at compile time to extract what you want |
22:23:53 | * | noeontheend joined #nim |
22:24:08 | FromDiscord | <XxDiCaprioxX> okay thank you |
22:26:24 | FromDiscord | <Elegantbeef> No clue if you're still alive pmunch but PR made for the inheritance |
22:42:00 | FromDiscord | <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:21 | FromDiscord | <Elegantbeef> It's the binary image data you just use it wherever you need it |
22:42:29 | FromDiscord | <Elegantbeef> Do you have an image library you're using? |
22:42:32 | FromDiscord | <XxDiCaprioxX> yes |
22:42:33 | FromDiscord | <XxDiCaprioxX> imageman |
22:42:49 | FromDiscord | <XxDiCaprioxX> and I am kinda lost on how to proceed with the binary image data |
22:44:13 | FromDiscord | <Elegantbeef> Imageman doesnt have a way to load data from a binary source |
22:44:46 | FromDiscord | <XxDiCaprioxX> okay so basically the library does not support it. that explains why I wondered around the github page without results |
22:45:04 | FromDiscord | <XxDiCaprioxX> so I have to use a different library? |
22:45:22 | FromDiscord | <Elegantbeef> Or store the image in a file/memfile |
22:46:00 | FromDiscord | <Elegantbeef> pixie has `decodeImage` |
22:46:32 | FromDiscord | <XxDiCaprioxX> In reply to @Elegantbeef "Or store the image": would that be possible in a static compile-time context? |
22:47:11 | FromDiscord | <Elegantbeef> What are you a fter? |
22:47:38 | FromDiscord | <Elegantbeef> You want to embed an image into your project? |
22:47:45 | FromDiscord | <XxDiCaprioxX> yes basically |
22:48:02 | FromDiscord | <Elegantbeef> So then just `staticRead` and you're done |
22:48:03 | FromDiscord | <XxDiCaprioxX> I want it all inside one .exe file in the end |
22:48:31 | FromDiscord | <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:42 | FromDiscord | <Elegantbeef> If you want to use image man you'll need to make a file either using memfile or io |
22:49:06 | FromDiscord | <Elegantbeef> Cause it needs a path to load it at runtime |
22:49:54 | FromDiscord | <XxDiCaprioxX> okay so I have to create the file somewhere during runtime to work with it? |
22:51:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/71A |
22:52:25 | FromDiscord | <Elegantbeef> Might need `newMemMapFileStream` instead |
22:52:37 | FromDiscord | <XxDiCaprioxX> does this tempdir exist in ram? |
22:52:40 | FromDiscord | <Elegantbeef> Either point is you need a file due to a limitation of imageman |
22:52:52 | FromDiscord | <Elegantbeef> Memory mapped files do |
22:53:06 | FromDiscord | <XxDiCaprioxX> okay thank you |
22:53:22 | FromDiscord | <XxDiCaprioxX> at this point I'm considering just using a different library, this is kinda painful |
22:53:40 | FromDiscord | <Elegantbeef> Yea pixie is pretty good |
22:53:49 | FromDiscord | <XxDiCaprioxX> I'll look into it, thank you very much! |
22:53:58 | FromDiscord | <Elegantbeef> `decodeImage(staticRead"myImage.png")` is all you'd need there |
22:54:58 | FromDiscord | <XxDiCaprioxX> sweet, thanks! |
22:59:51 | FromDiscord | <XxDiCaprioxX> uh, I get this error message when trying to compile: `VM does not support 'cast' from tyArray to tyUInt64` |
23:00:18 | FromDiscord | <Elegantbeef> You're attempting to decode the image at compile time i presume |
23:00:19 | FromDiscord | <Elegantbeef> Dont do that |
23:00:47 | FromDiscord | <Elegantbeef> `let myImage = decodeImage(staticRead"myImage.png")` |
23:02:43 | FromDiscord | <XxDiCaprioxX> okay did that, error is gone |
23:16:43 | FromDiscord | <XxDiCaprioxX> sent a long message, see http://ix.io/406N |
23:19:16 | FromDiscord | <Elegantbeef> Look at the examples |
23:19:46 | FromDiscord | <XxDiCaprioxX> The examples only went about a few vectors, don't they? |
23:20:15 | FromDiscord | <Elegantbeef> There is `drawImage` which lets you draw an image on top of one |
23:20:21 | FromDiscord | <Elegantbeef> and `newImage` to create a new image buffer |
23:20:37 | FromDiscord | <Elegantbeef> All the stuff you need is there you'll just need to read the API reference |
23:20:47 | FromDiscord | <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 |