00:22:53 | FromDiscord | <Ayy Lmao> Out of curiosity, how powerful is nim script compared to python? Like is it conceivable that it could do the same things if there was a community as large as python's? I know it's kind of a silly question since you can compile the language but I'm just curious. |
00:24:42 | * | sagax joined #nim |
00:36:03 | FromDiscord | <Hourglass [She/Her]> Iirc Nimscript is a lot slower than Python + modules like the `os` module aren't implemented because of `exportc` pragmas needing Nim to be compiler |
00:36:07 | FromDiscord | <Hourglass [She/Her]> Compiled |
00:36:21 | FromDiscord | <Elegantbeef> Well they are implemented through VM hooks |
00:36:47 | FromDiscord | <Hourglass [She/Her]> I thought they weren't implemented last I checked? |
00:36:58 | FromDiscord | <Hourglass [She/Her]> Like, 70-85% of the stdlib |
00:37:24 | FromDiscord | <Elegantbeef> You can use some of std/os through VM hooks |
00:37:28 | FromDiscord | <Elegantbeef> at compile time atleast |
00:37:36 | FromDiscord | <Elegantbeef> standalone nimscript does not have that functionaly |
00:37:51 | FromDiscord | <Hourglass [She/Her]> Ah |
00:38:09 | FromDiscord | <Hourglass [She/Her]> Does Nimscripter still work? Or is it broken? |
00:38:23 | FromDiscord | <Elegantbeef> It should still work |
00:38:56 | FromDiscord | <Hourglass [She/Her]> Then yeah nimscripter can be used to embed nimscript into a Nim program, so you could expose whatever function you want |
00:39:08 | FromDiscord | <Ayy Lmao> What exactly are the use cases for nim script? Is it just meant to be used when you want to do something really simple? |
00:39:44 | FromDiscord | <Hourglass [She/Her]> I believe compile time evaluation is one, code inside the `static` block? Beef would know more though |
00:40:23 | FromDiscord | <Elegantbeef> You can use it as standalone |
00:40:32 | FromDiscord | <Elegantbeef> But it's used by the compiler for static evaluation including macros and constant folding |
00:42:25 | FromDiscord | <Elegantbeef> You can also use it to make tasks for Nim and Nimble |
00:42:39 | FromDiscord | <Elegantbeef> Nimble files are just glorified nimscript files |
00:42:59 | FromDiscord | <Ayy Lmao> But if you were doing something like making a game and you wanted to embed a scripting language you'd probably be better off doing lua or something right? |
00:43:16 | FromDiscord | <Elegantbeef> I'm a wasm evangelist for scripting so i'd say no |
00:44:14 | FromDiscord | <Ayy Lmao> I'm not sure what you mean, are you saying you can embed wasm in a game instead of scripting or something? |
00:44:20 | FromDiscord | <Ayy Lmao> Because that would be sick |
00:44:28 | FromDiscord | <Elegantbeef> Use wasm instead of using lua for scripting yes |
00:44:33 | FromDiscord | <Elegantbeef> Wasm is just a VM no different to a lua vm |
00:45:21 | FromDiscord | <Ayy Lmao> I keep hearing about all these amazing things with wasm. I really hope it picks up more. |
00:47:13 | FromDiscord | <Hourglass [She/Her]> WASM is pretty cool ngl |
00:47:35 | FromDiscord | <Hourglass [She/Her]> Still need to work on that mod using WASM... Sigh |
00:47:43 | FromDiscord | <Hourglass [She/Her]> The pain of starting so many projects |
00:55:00 | FromDiscord | <Elegantbeef> Well @Ayy Lmao https://github.com/beef331/wasm3 does exist so it's a start đ |
00:58:26 | FromDiscord | <Ayy Lmao> I'll have to look into that. I was messing around with wasm a long time ago. It has always interested me ever since I heard about it. |
01:20:14 | * | nanxiao joined #nim |
02:04:59 | * | nanxiao quit (Quit: Client closed) |
02:12:45 | * | nanxiao joined #nim |
03:34:45 | * | arkurious quit (Quit: Leaving) |
03:50:41 | * | azimut joined #nim |
03:53:32 | FromDiscord | <dedraiaken> Is there a method to convert a cstring to string without a copy? |
03:55:51 | FromDiscord | <Elegantbeef> No it requires a copy |
04:01:02 | FromDiscord | <Elegantbeef> Do you by anychance want `openArray[char]`? |
04:23:25 | * | nanxiao quit (Quit: Client closed) |
05:00:55 | * | rockcavera quit (Remote host closed the connection) |
05:02:43 | FromDiscord | <Yardanico> oh interesting, I feared that receiving server-sent events won't work with httpclient but it does with async with bodySTream |
05:02:44 | FromDiscord | <Yardanico> (edit) "bodySTream" => "bodyStream" |
05:09:06 | * | nanxiao joined #nim |
06:00:37 | * | advesperacit joined #nim |
06:28:37 | * | nanxiao quit (Quit: Client closed) |
06:35:03 | FromDiscord | <Phil> In reply to @Ayy Lmao "What exactly are the": To me:â”- build scriptsâ”- scripts for executing more complex tests (e.g. involving containers)â”- cross platform mini cli tools like e.g. Ng for angular |
06:35:53 | FromDiscord | <Phil> (edit) "tools like" => "tools, stuff similar to" |
06:36:02 | FromDiscord | <Phil> Essentially it's better bash to me |
06:47:22 | * | nanxiao joined #nim |
06:54:11 | FromDiscord | <Elegantbeef> @Phil\: left out the entire conventional use case of Macros and static evaluation đ |
06:55:11 | FromDiscord | <Phil> TBF if it is code I write in a Nim file, then it's Nim code to me |
06:56:04 | FromDiscord | <Phil> Though I guess that's an incorrect view technically for the reasons you mentioned |
06:56:09 | FromDiscord | <Elegantbeef> Yea i'm just jokingly being pedantics as always |
07:17:19 | * | sagax quit (Quit: Konversation terminated!) |
07:21:14 | * | kenran joined #nim |
07:26:16 | * | rmt joined #nim |
07:33:21 | * | PMunch joined #nim |
07:37:51 | * | junaid_ joined #nim |
08:15:45 | * | xet7 quit (Quit: Leaving) |
08:16:16 | * | nanxiao quit (Quit: Client closed) |
08:16:28 | * | xet7 joined #nim |
08:25:17 | * | nanxiao joined #nim |
08:25:25 | * | junaid_ quit (Remote host closed the connection) |
08:40:18 | * | xet7 quit (Quit: Leaving) |
08:44:06 | * | xet7 joined #nim |
08:47:32 | * | Notxor joined #nim |
08:54:13 | * | randomuser464876 joined #nim |
09:03:41 | * | beholders_eye quit (Ping timeout: 256 seconds) |
09:05:30 | * | beholders_eye joined #nim |
09:09:55 | * | onetwo38 quit (Quit: The Lounge - https://thelounge.chat) |
09:16:44 | * | onetwo38 joined #nim |
09:23:00 | * | om3ga joined #nim |
09:48:35 | FromDiscord | <turbo> Can I pass a seq at runtime to a proc that accepts varargs? |
09:56:27 | Amun-Ra | turbo: if you have unpacking arguments in mind than iirc no |
09:56:40 | FromDiscord | <turbo> đŠ |
09:57:44 | * | nanxiao quit (Quit: Client closed) |
10:03:59 | * | beholders_eye quit (Ping timeout: 260 seconds) |
10:12:09 | NimEventer | New Nimble package! nimalyzer - A static code analyzer for Nim, see https://github.com/thindil/nimalyzer |
10:14:50 | arkanoid | woah, this is a nice package |
10:21:53 | arkanoid | could you please help me understand the difference from "nim.project" and "nim.projectMappings" in https://github.com/saem/vscode-nim ? |
10:35:20 | * | junaid_ joined #nim |
10:37:34 | * | rmnmjw joined #nim |
10:46:20 | * | fallback quit (Read error: Connection reset by peer) |
10:50:39 | * | beholders_eye joined #nim |
10:56:09 | * | fallback joined #nim |
10:58:49 | * | randomuser464876 quit (Quit: Client closed) |
11:13:12 | PMunch | Ugh, new versions of Nim has completely broken nimlsp.. |
11:31:20 | * | junaid_ quit (Remote host closed the connection) |
11:59:01 | om3ga | Hi! Have a question about Tables module. Can ordered table have duplicates, if there will be wrong insertion, or something? |
11:59:23 | om3ga | Or maybe I print out the table using wrong iterator |
11:59:47 | om3ga | for example for i in ordTable.keys: debugEcho i |
12:00:14 | om3ga | using that loop I see duplicate entries, what was unexpected for me |
12:02:25 | om3ga | I carefully read the manual, and with use ordTable[key] = @[] initialize the new key in it. but after any other stuff what happens in that function, I assign the values using ordTable[key].add value |
12:02:27 | FromDiscord | <Rika> all tables can have duplicates |
12:02:36 | FromDiscord | <Rika> using add will make a duplicate |
12:02:55 | FromDiscord | <Rika> well, what you wrote wont make any duplicates |
12:02:59 | om3ga | but values is of type seq[Type] |
12:03:21 | FromDiscord | <Rika> can you give code that shows this behaviour |
12:03:32 | om3ga | unfortunately no :\ |
12:03:50 | om3ga | but what I described is 100% like in the code |
12:04:16 | FromDiscord | <Rika> i cant see how it is possible |
12:04:22 | om3ga | I even commented out that line with .add, but seems initialization of key in table creates duplicates |
12:04:46 | om3ga | I will try to write compact example |
12:05:00 | om3ga | Rika: yeah, that was surprise for me |
12:07:07 | * | fallback quit (Quit: IRCNow and Forever!) |
12:24:49 | * | fallback joined #nim |
13:00:54 | * | rockcavera joined #nim |
13:15:08 | * | rmnmjw quit (Ping timeout: 246 seconds) |
13:17:16 | * | jmdaemon quit (Ping timeout: 246 seconds) |
13:20:06 | om3ga | Very strange, compacted version works well... |
13:20:21 | om3ga | I hate such issues.. damn.. |
13:44:44 | om3ga | Rika: I found the issue, not related with usage of tables. debugEcho was the issue, it prints the output when it wants lol |
13:44:56 | om3ga | with/to |
13:45:19 | FromDiscord | <Rika> idgi |
13:45:58 | om3ga | I used 2 loops for debug Table keys output |
13:46:10 | om3ga | one in called procedure, second after it |
13:46:47 | * | rmnmjw joined #nim |
13:46:59 | om3ga | so what I see on the screen, second keys printout was printed before first! |
13:47:07 | om3ga | idk why that happens |
13:47:37 | FromDiscord | <Rika> ic |
13:48:38 | om3ga | what ic is? |
13:50:00 | FromDiscord | <Phil> Looks like shorthand for "I see", though why Rika lost the ability to write sentences eludes me |
13:50:33 | Amun-Ra | ikr⊠|
13:51:50 | PMunch | Okay, something between 1.6.10 and 1.6.12 broke NimLSP.. |
13:52:04 | FromDiscord | <ringabout> What's the error? |
13:53:18 | PMunch | Infinite recursion |
13:53:33 | PMunch | nimsuggest.nim(235) executeNoHooks |
13:54:19 | PMunch | https://github.com/nim-lang/Nim/blob/devel/nimsuggest/nimsuggest.nim#L236-L237 |
13:54:21 | PMunch | Uhm... |
13:54:47 | * | kenran` joined #nim |
13:54:55 | * | kenran` quit (Remote host closed the connection) |
13:54:59 | PMunch | I assume there was supposed to be a default `tag` argument passed there |
13:55:14 | PMunch | So that it would call this: https://github.com/nim-lang/Nim/blob/devel/nimsuggest/nimsuggest.nim#L190 |
13:56:05 | Amun-Ra | right |
13:56:56 | FromDiscord | <ringabout> In reply to @PMunch "nimsuggest.nim(235) executeNoHooks": Did you try to bisect it? probably related => https://github.com/nim-lang/Nim/commit/17d45dfd6a3de8d0b6f373af70300ba344313c7f |
13:57:18 | PMunch | Yeah that's the commit I ended up with as well |
13:57:25 | PMunch | Haven't actually done a bisect though |
13:57:38 | FromDiscord | <alcatraz> Learning Nim today đ |
13:57:48 | PMunch | @alcatraz, welcome :) |
13:57:53 | FromDiscord | <Phil> Welcome! |
13:58:20 | FromDiscord | <alcatraz> Are there any good ebooks or videos I should watch? This is my 3rd language |
13:58:50 | FromDiscord | <Phil> What were your previous ones? |
13:58:52 | PMunch | @ringabout, it seems like yyancho added some features for langserver, but since Nimsuggest doesn't really have proper tests ended up breaking it (and by extension the library version) |
13:59:09 | FromDiscord | <alcatraz> In reply to @Isofruit "What were your previous": Python & a little bit of nodejs |
13:59:30 | * | fallback quit (Read error: Connection reset by peer) |
13:59:51 | FromDiscord | <Phil> In reply to @alcatraz "Python & a little": https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmersâ”https://github.com/nim-lang/Nim/wiki/Nim-for-TypeScript-Programmersâ”Should give you some basis for parallelsâ”Other than that depends on what you want to get into first |
13:59:59 | FromDiscord | <ringabout> In reply to @PMunch "<@658563905425244160>, it seems like": Yeah, most likely. Does nimlsp have some tests since it has been added to important packages? |
14:00:19 | FromDiscord | <ringabout> In reply to @alcatraz "Are there any good": There is a good book to read => https://ssalewski.de/nimprogramming.html |
14:00:21 | FromDiscord | <Phil> I can talk your ear of about compile-time evaluation, compilers and how nice nimscript is, but none of that is useful to you yet and will only start mattering once you have a project đ |
14:00:36 | FromDiscord | <alcatraz> In reply to @Isofruit "https://github.com/nim-lang/Nim/wiki/Nim-for-Python": I'm into automation & sometimes make ||malware|| for fun |
14:00:45 | FromDiscord | <alcatraz> Thanks |
14:00:53 | PMunch | @ringabout, nothing proper |
14:01:02 | PMunch | I want to add some though |
14:01:25 | PMunch | But I have to fix it first, so I can gather the "here is how it should work" test cases |
14:01:45 | FromDiscord | <ringabout> I see |
14:02:54 | PMunch | @alcatraz, Nim struggles with malware vendors labeling basically any Nim-built binary as malware because people keep writing malware in Nim |
14:02:57 | FromDiscord | <Phil> In reply to @alcatraz "I'm into automation &": Other than that, personally my first suggestion is always: "Find a small project", nothing will teach you quite as much |
14:03:05 | PMunch | So please don't.. |
14:04:27 | FromDiscord | <alcatraz> I don't plan to publicly use Nim malware, it just helps to learn |
14:05:44 | FromDiscord | <Phil> Sidenote, you can use templates in nim to write context-manager like you would use them in python |
14:05:52 | om3ga | Hah, the problem was not with the debugEcho |
14:06:07 | om3ga | loop shifted into previous loop body |
14:06:27 | om3ga | that's why I had that mystic printout |
14:07:05 | FromDiscord | <jmgomez> @ringabout is the plan to fix all regressions before releasing 2.0? |
14:07:05 | om3ga | maan, while syntax and such code format is beautiful, it can lead for such errors |
14:09:05 | FromDiscord | <ringabout> In reply to @jmgomez "<@658563905425244160> is the plan": Yeah, regressions should be fixed as much as possible before 2.0. Though, the critical issues are what are labelled with "showstopper" => https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+label%3AShowstopper |
14:10:01 | FromDiscord | <jmgomez> In reply to @ringabout "Yeah, regressions should be": Okay, Im worried because this may be forgotten: https://github.com/nim-lang/Nim/issues/21505â”And will be odd that NUE doesnt work with the latest version of Nim |
14:10:41 | FromDiscord | <jmgomez> Last thing I want to do is to ship the compiler with the plugin.. |
14:14:13 | FromDiscord | <ringabout> In reply to @jmgomez "Okay, Im worried because": Yeah, it should be fixed or reverted. |
14:16:43 | * | fallback joined #nim |
14:19:38 | PMunch | @ringabout, indeed throwing an empty string in as a default tag argument in that procedure makes NimLSP work again |
14:19:55 | FromDiscord | <ringabout> Nice work! |
14:23:06 | FromDiscord | <ringabout> `nimsuggest.nim` needs a patch which should be backporte to version-1-6 branch. |
14:25:17 | PMunch | @ringabout: https://github.com/nim-lang/Nim/pull/21555 |
14:25:35 | PMunch | Four character fix :P |
14:26:13 | FromDiscord | <ringabout> Neat! |
14:32:48 | * | sagax joined #nim |
14:36:12 | FromDiscord | <planetis> In reply to @Nerve "The point is that": sorry to necrobump but I forgot there is a const JsonNode implementation in nim, https://github.com/planetis-m/packedjson2 although remove, replace, move, copy are not yet implemented |
14:41:35 | FromDiscord | <Nerve> Oh wow that looks impressively optimized |
14:41:43 | FromDiscord | <Nerve> Thanks very much I'll look into this |
14:42:12 | PMunch | Hmm, I should really figure out how to run NimLSP under nimsuggest v3.. |
14:42:27 | PMunch | There is some funky stuff going on there and I can't quite figure out why it doesn't work |
14:42:42 | * | PMunch quit (Quit: Leaving) |
14:45:45 | FromDiscord | <dedraiaken> Is there an ergonomic way to convert a large seq[char] buffer into strings without making copies? Or another type of array? |
14:46:39 | Amun-Ra | i'm not an expert but only toOpenArray comes to my mind |
14:47:03 | FromDiscord | <System64 ~ Flandre Scarlet> sent a long message, see https://paste.rs/R5t |
14:50:24 | FromDiscord | <dedraiaken> In reply to @Amun-Ra "i'm not an expert": Thanks, I'll take a look. |
14:51:01 | Amun-Ra | dedraiaken: it's more like a view than distinct type |
14:59:17 | * | arkurious joined #nim |
15:00:36 | FromDiscord | <treeform> In reply to @System64 "https://github.com/treeform/netty <@107140179025735": Yes that's what it was made for. |
15:01:33 | FromDiscord | <treeform> User inputs and getting hurt is game logic, netty does not do that. It just sends packets. |
15:16:59 | * | rmnmjw quit (Ping timeout: 248 seconds) |
15:35:56 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @treeform "User inputs and getting": So for example I can send packet containing input data? |
15:44:11 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=4rlN |
15:45:06 | FromDiscord | <Ayy Lmao> (edit) "https://play.nim-lang.org/#ix=4rlN" => "https://paste.rs/NCS" |
15:45:24 | FromDiscord | <Ayy Lmao> (edit) "https://play.nim-lang.org/#ix=4rlP" => "https://play.nim-lang.org/#ix=4rlO" |
15:50:01 | FromDiscord | <dedraiaken> In reply to @Amun-Ra "<@296348328122384386>: it's more like": It seems like you might not be able to store them inside of a `seq` |
15:52:21 | * | fallback quit (Read error: Connection reset by peer) |
15:53:55 | * | derpydoo joined #nim |
16:10:17 | FromDiscord | <dedraiaken> Seems like there might be an `experimental: "views"` pragma to enable that though |
16:11:35 | FromDiscord | <treeform> In reply to @System64 "So for example I": You can send packet contenting anything you want. |
16:11:50 | FromDiscord | <treeform> Netty does not impose any restrictions on what is in the packet. |
16:12:01 | FromDiscord | <treeform> Its just like using UDP, but reliable |
16:17:43 | FromDiscord | <m4ul3r> for re library (https://nim-lang.org/docs/re.html)â”â”. matches any character except newline (by default). how do i get this to search for newline and change default - not seeing it in doc |
16:22:12 | FromDiscord | <wiga> is there a way to replace \\x hex digits in a string with a \x, cuz i wanna decompress python hex strings and it has \\x instead of \x |
16:22:18 | FromDiscord | <wiga> (edit) "\\x" => "\\\\x" | "\\x" => "\\\\x" |
16:23:26 | FromDiscord | <m4ul3r> In reply to @wiga "is there a way": strutils has a replace that might fit your need |
16:23:31 | FromDiscord | <wiga> yeah but how |
16:23:40 | FromDiscord | <Rika> https://nim-lang.org/docs/re.html#re%2Cstringâ”â”https://nim-lang.org/docs/re.html#RegexFlag |
16:23:47 | FromDiscord | <wiga> if i replace \\\\x with \x it gives an error |
16:23:58 | FromDiscord | <Rika> In reply to @Rika "https://nim-lang.org/docs/re.html#re%2Cstring http": @m4ul3r |
16:24:17 | FromDiscord | <m4ul3r> sick, i didnât see it as part of re. thanks |
16:24:36 | FromDiscord | <wiga> https://media.discordapp.net/attachments/371759389889003532/1087411377636905080/image.png |
16:24:49 | FromDiscord | <Rika> re("regex string", {reStudy, reDotAll}) |
16:24:53 | FromDiscord | <m4ul3r> In reply to @wiga "if i replace \\\\x": youâll need to escape \ |
16:25:13 | FromDiscord | <m4ul3r> replace(â\\\\xâ, â\\xâ) |
16:25:22 | FromDiscord | <Rika> that wont do anything |
16:25:24 | FromDiscord | <wiga> literally going to replace \\\\x with \\\\x |
16:25:31 | FromDiscord | <m4ul3r> (edit) "replace(â\\\\xâ, â\\xâ)" => "replace(â\\\\\\xâ, â\\\\xâ)" |
16:25:35 | FromDiscord | <Rika> wiga you need smth to parse "\x.." into the proper bytes |
16:25:46 | FromDiscord | <wiga> yes |
16:26:05 | FromDiscord | <wiga> from strings found in decompiled python assembly |
16:26:07 | FromDiscord | <Rika> https://nim-lang.org/docs/strutils.html#fromHex%2Cstring might help |
16:26:18 | FromDiscord | <wiga> there's not always hex bytes |
16:26:19 | FromDiscord | <Rika> split on every `\\x` |
16:26:30 | FromDiscord | <Rika> then you need a more complex parser |
16:26:34 | FromDiscord | <wiga> sometimes there's randomness |
16:26:38 | FromDiscord | <Rika> (edit) |
16:26:46 | FromDiscord | <wiga> In reply to @Rika "in that case then": ; |
16:27:12 | FromDiscord | <Rika> i cant expound since im about to go to sleep but since your data is complex then you might be better off making a proper parser |
16:27:23 | FromDiscord | <Rika> see parseutils module if need be |
16:27:25 | FromDiscord | <Rika> gonna go |
16:27:29 | FromDiscord | <wiga> ok gn |
16:27:56 | FromDiscord | <wiga> chatgpt goes brr |
16:32:46 | * | derpydoo quit (Quit: derpydoo) |
16:33:37 | * | arkurious quit (Ping timeout: 256 seconds) |
16:40:37 | * | kenran quit (Remote host closed the connection) |
16:43:01 | FromDiscord | <m4ul3r> In reply to @Rika "re("regex string", {reStudy, reDotAll})": this works, but iâm also using regex to search for a . character. â”reâ\./.:.:.â. â”looks like the reDotAll prevents me from using \. |
16:43:10 | FromDiscord | <m4ul3r> (edit) "\." => "\\." |
16:43:31 | FromDiscord | <m4ul3r> (edit) "â”reâ\./.:.:.â." => "â”reâ\\./.\\:.\\:.\\â." |
16:44:26 | FromDiscord | <m4ul3r> (edit) "â”reâ\\./.\\:.\\:.\\â." => "â” ` reâ\./.:.:.â `" |
16:44:50 | FromDiscord | <m4ul3r> (edit) "In reply to @Rika "re("regex string", {reStudy, reDotAll})": this works, but iâm also using regex to search for" => "sent" | ". character. â” ` reâ\./.:.:.â ` â”looks like the reDotAll prevents me from using \\." => "long message, see http://ix.io/4rm4" |
16:46:06 | * | arkurious joined #nim |
16:46:10 | * | arkurious quit (Remote host closed the connection) |
16:59:11 | FromDiscord | <Ayy Lmao> Is there a simple idiomatic way to inject fields into an object definition with metaprogramming? |
16:59:51 | FromDiscord | <Ayy Lmao> The idea is to organize some base fields in another file to inject into platform specific implementations while avoiding polymorphism. |
16:59:58 | FromDiscord | <kfdvh> In reply to @PMunch "Hmm, I should really": probably using the CLI interface, not as a Nim library |
17:01:02 | FromDiscord | <auxym> In reply to @Ayy Lmao "Is there a simple": Sure, you can create a macro that generates an object typedef for you. Based on an existing typedef or any other info you want to give it |
17:02:09 | FromDiscord | <auxym> or just use variant objects, or inheritance |
17:04:48 | FromDiscord | <Ayy Lmao> I usually try to avoid macros since I'm kind of a noob at them. I'll have to look into it though. I would like to avoid runtime polymorphism so I am trying to avoid inheritance. |
17:08:13 | FromDiscord | <cloud> Wsp nim gamers |
17:08:15 | FromDiscord | <Synthetic> wsp |
17:08:18 | FromDiscord | <cloud> :nimGlow: |
17:08:20 | FromDiscord | <Synthetic> hi nim dudes |
17:08:22 | FromDiscord | <cloud> Mmmmm yes nim |
17:08:27 | FromDiscord | <Synthetic> nim |
17:08:29 | FromDiscord | <Synthetic> yummy |
17:08:29 | FromDiscord | <cloud> Nim |
17:08:35 | FromDiscord | <cloud> Taste is gud |
17:08:40 | FromDiscord | <Synthetic> fr |
17:08:45 | FromDiscord | <Synthetic> ima start learning it after school |
17:08:53 | FromDiscord | <cloud> Same |
17:09:20 | FromDiscord | <cloud> We r gonna make fortnite hackz !!!!! đ±đ±đđ€đđđđđ |
17:09:25 | FromDiscord | <Synthetic> onb |
17:11:08 | * | rmnmjw joined #nim |
17:12:14 | FromDiscord | <Gumbercules> You both should just stay in school |
17:12:29 | FromDiscord | <Gumbercules> Concentrate on that. You need all the help you can get |
17:12:33 | FromDiscord | <cloud> In reply to @Gumbercules "You both should just": We are joking đ |
17:12:42 | FromDiscord | <Gumbercules> No way |
17:12:58 | FromDiscord | <cloud> Are u is good homie |
17:13:17 | FromDiscord | <Gumbercules> Did you just have a stroke? |
17:13:42 | FromDiscord | <cloud> Mmmmmm |
17:13:47 | FromDiscord | <cloud> Iâm American my bad |
17:14:54 | FromDiscord | <Gumbercules> What is even going on rn |
17:15:34 | FromDiscord | <Phil> This discussion I think may be happening on a higher plane |
17:15:37 | FromDiscord | <cloud> Gumbercules đ„ |
17:15:42 | FromDiscord | <Phil> One that I'm not privvy to |
17:15:45 | FromDiscord | <Phil> But some plan |
17:15:46 | FromDiscord | <Phil> (edit) "plan" => "plane" |
17:15:50 | FromDiscord | <cloud> ^ |
17:15:56 | FromDiscord | <treeform> This is kind of discussion you get when we stop talking about AI and ChatGPT. |
17:16:07 | FromDiscord | <cloud> ^ |
17:16:07 | FromDiscord | <Gumbercules> At least it's novel |
17:16:34 | FromDiscord | <cloud> Chat gpt talks to its self what they discussed ? |
17:16:42 | FromDiscord | <Gumbercules> I'd take talking to my baby who can't formulate words over talking about chat GPT |
17:16:43 | FromDiscord | <cloud> Average convo real |
17:17:04 | FromDiscord | <jmgomez> Can someone ban this guys? |
17:17:12 | FromDiscord | <jmgomez> (edit) "this" => "these" |
17:17:16 | FromDiscord | <Gumbercules> Chat GPT fans should just replace their mouths and brains with chat GPT so we can get it over with |
17:17:50 | FromDiscord | <Phil> Cloud, for general chatting there's #offtopic , this channel is mostly for asking about help with nim specifically |
17:17:52 | FromDiscord | <Gumbercules> Tired of just talking about the singularity |
17:18:06 | FromDiscord | <cloud> In reply to @jmgomez "Can someone ban these*": Mmmmmm average discordian |
17:18:22 | FromDiscord | <cloud> In reply to @Isofruit "Cloud, for general chatting": Thanks Phil! |
17:21:24 | FromDiscord | <auxym> In reply to @Ayy Lmao "I usually try to": Well you did ask for metaprogramming, which is macros (and templates) đ beef's tutorial is pretty good if you want to get started with macros https://dev.to/beef331/demystification-of-macros-in-nim-13n8 |
17:21:37 | FromDiscord | <auxym> genast makes it super easy to write macros, IMO |
17:22:38 | * | junaid_ joined #nim |
17:24:38 | FromDiscord | <Ayy Lmao> In reply to @auxym "Well you did ask": I hadn't seen that tutorial so I'll take a look, thanks. My problem with macros isn't necessarily that I don't understand them, it's just that they become unintelligible once I write them and forget about them and come back to them some day. Maybe I just suck at writing them though. |
17:25:14 | FromDiscord | <Ayy Lmao> I have also in the past gotten absolutely absurd errors using macros before. |
17:25:35 | FromDiscord | <auxym> they do become unintelligible đ |
17:26:32 | FromDiscord | <auxym> depending on your definition of "runtime polymorphism" though, if you use object inheritance with regular procs, rather than methods, they will use statically dispatched calls |
17:26:43 | FromDiscord | <auxym> procs = static dispatch, method = dynamic dispatch |
17:27:15 | FromDiscord | <Ayy Lmao> In reply to @auxym "depending on your definition": I was wondering about that. |
17:27:32 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=4rml |
17:28:23 | FromDiscord | <Ayy Lmao> While incurring zero overhead, as if I had just written win32 on its own |
17:29:45 | FromDiscord | <Ayy Lmao> Injecting base functions is easy because I can just use templates, but injecting the fields seems harder. |
17:30:13 | FromDiscord | <cloud> In reply to @Ayy Lmao "Injecting base functions is": Inject fields mean fast ?!? |
17:31:19 | FromDiscord | <auxym> In reply to @Ayy Lmao "So what I want": I'm pretty sure you'd have to write a macro to do that. Pass in the base object typedef as an argument, introspect it with `fieldPairs`, and generate a new object typedef based on that |
17:31:39 | FromDiscord | <auxym> I mean you could try a template, but I'm not sure it'll work |
17:32:15 | * | fallback joined #nim |
17:33:34 | FromDiscord | <auxym> sent a code paste, see https://paste.rs/mLb |
17:33:46 | FromDiscord | <auxym> (edit) |
17:35:54 | FromDiscord | <Ayy Lmao> sent a code paste, see https://paste.rs/rwn |
17:43:21 | NimEventer | New Nimble package! drawIt - Nim Terminal User Interface library for plotting graphs and drawing shapes in the terminal, uses unicode chars and colours!, see https://gitlab.com/OFThomas/drawIt |
18:01:30 | FromDiscord | <Phil> with that naming scheme I'm immediately getting flashbacks to my prior workplace with tools like "KnowIt", "ShowIt", "ReadIt" etc. |
18:19:03 | FromDiscord | <Gumbercules> It's be cool if someone made a terminal emulator similar to bearlibterminal or libctod for Nim |
18:22:40 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @treeform "Its just like using": Oh alright! I'll give it a try for my school work! |
18:25:14 | anddam | howdy |
18:29:07 | FromDiscord | <auxym> hi |
18:49:14 | FromDiscord | <David> sent a long message, see http://ix.io/4rmK |
18:52:46 | FromDiscord | <jtv> It gets even worse if you have multiple internal packages you're building with dependencies. If you find a good solution I'd love to hear it. I essentially have a nimble dev target to automatically copy the files over. |
18:53:25 | NimEventer | New thread by mantielero: C++ method override, see https://forum.nim-lang.org/t/10026 |
19:00:15 | FromDiscord | <Gumbercules> The best way to use nimble is to not use it |
19:12:45 | * | rmnmjw quit (Quit: Leaving) |
19:13:47 | FromDiscord | <turbo> is it possible to iterate through all values of an enum |
19:13:50 | FromDiscord | <turbo> (edit) "enum" => "enum?" |
19:16:17 | FromDiscord | <demotomohiro> In reply to @turbo "is it possible to": https://nim-lang.org/docs/enumutils.html#items.i,typedesc%5BT%5D |
19:18:23 | * | rmt quit (Ping timeout: 246 seconds) |
19:27:32 | * | rockcavera quit (Ping timeout: 246 seconds) |
19:28:52 | * | jmdaemon joined #nim |
19:31:45 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4rmY |
19:35:44 | anddam | hrmm I cannot tab complete several bridged nicknames |
19:36:20 | anddam | demotomohiro: why are the `B[float].` prefixes required in the second assert? |
19:36:35 | anddam | I mean rather than just [b0, b1] |
19:37:05 | anddam | Gumbercules: what's the alternative? I thought nimble was the recommended tool |
19:38:06 | FromDiscord | <Gumbercules> In reply to @anddam "<@204328759715692544>: what's the alternative?": it is, but that doesn't mean it's good at what it does... I just git submodule my dependencies which also sucks, but it's less of a headache than Nimble |
19:38:17 | FromDiscord | <Gumbercules> There are a few other package managers people have developed but I haven't used any of them |
19:38:27 | FromDiscord | <Gumbercules> nimph is one, pretty sure there is at least one other |
19:41:34 | FromDiscord | <huantian> nimph is interesting, I need to try it at some point |
19:42:04 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/Uu0 |
19:45:48 | FromDiscord | <demotomohiro> @anddam I don't why enum `B` has a generic parameter but it has.â”So using enum `B` requires a generic parameter like `B[float]`. |
19:46:28 | Zevv | huantian: where did you find out about nimph. nobody knows nimph. no one uses nimph. |
19:46:43 | FromDiscord | <huantian> somewhere in this discord |
19:46:51 | FromDiscord | <huantian> maybe beef mentioned it? |
19:47:02 | Zevv | ah, likely |
19:47:16 | FromDiscord | <huantian> I might have been compliaing about nimble and beef mentioned it or something |
19:47:20 | FromDiscord | <Phil> I've been here a year and it was chatted about like twice when I was around |
19:47:34 | Zevv | my point |
19:50:07 | FromDiscord | <Gumbercules> balls |
19:50:10 | FromDiscord | <Phil> Quick read through the Readme makes it look pretty nice |
19:50:19 | FromDiscord | <Phil> But I'm expecting drawbacks |
19:50:22 | FromDiscord | <Gumbercules> uh oh, disruptek's gaining fans |
19:50:30 | FromDiscord | <Phil> And the fact I'm not seeing them there makes me suspicious |
19:50:44 | FromDiscord | <Gumbercules> you should always be suspicious of disruptek |
19:50:47 | * | rockcavera joined #nim |
19:50:47 | * | rockcavera quit (Changing host) |
19:50:47 | * | rockcavera joined #nim |
19:51:14 | FromDiscord | <Phil> Because he likes his genital naming schemes? |
19:51:23 | FromDiscord | <Gumbercules> that's one reason for sure |
19:51:39 | FromDiscord | <Gumbercules> I'm only kidding though, he's a swell guy |
19:51:43 | FromDiscord | <Phil> "Never trust somebody that releases a package called balls" |
19:51:46 | FromDiscord | <Phil> Got it |
19:51:47 | FromDiscord | <Gumbercules> can be a huge asshole, but who can't |
19:52:37 | FromDiscord | <Phil> Anyway, I am still shocked and aghast that I can't import nimscript files into a nimscript file |
19:52:43 | FromDiscord | <Phil> That is heresy and evil and I don't like it |
19:53:52 | FromDiscord | <Phil> I may even be tempted to call it mean |
19:54:47 | FromDiscord | <Gumbercules> definitely sounds limiting |
19:54:50 | Zevv | disruptek is prolific as hell, a lot of stuff he makes is smart and useful |
19:54:55 | Zevv | it's a shame he got chased away, really |
19:55:39 | Zevv | balls, cps, nimph, all excellent stuff, but somehow people don't pick it up |
19:56:39 | FromDiscord | <Gumbercules> people were too busy getting impressed by snake in the browser and io games |
19:56:47 | FromDiscord | <Gumbercules> and web forums |
19:57:00 | Zevv | yeah i guess. he's just too smart isn't he |
19:57:36 | FromDiscord | <Gumbercules> I don't know, that whole situation was quite ridiculous |
19:57:57 | FromDiscord | <Gumbercules> and it's not like he's the only talented person that's been chased off / has run away due to said ridiculousness |
19:59:05 | FromDiscord | <Gumbercules> but the community and dev team both seem to be evolving so I guess that's a good thing? time will tell |
19:59:25 | FromDiscord | <Gumbercules> maybe some former contributors / package developers will come back into the fold |
20:00:35 | FromDiscord | <Gumbercules> and yes sometimes I think disruptek is too smart and that fact is lost on him - especially when he attempts to explain how something he's already familiar with, works |
20:01:05 | Zevv | but it's all trivial |
20:01:11 | Zevv | how can you not understand |
20:01:15 | FromDiscord | <Gumbercules> lol |
20:01:24 | FromDiscord | <Gumbercules> I remember when he was showing me his ebay app |
20:01:54 | FromDiscord | <Gumbercules> and I'm like dude I have no idea what the fuck this thing does |
20:02:55 | FromDiscord | <Gumbercules> he was asking for feedback on some design stuff and I was like - what exactly are you trying to build here? you should step back and figure that out first - I will never make such a suggestion to disruptek again |
20:04:08 | Zevv | i'll never talk to him at all. asshole. |
20:04:16 | FromDiscord | <Gumbercules> that's not a bad route to go either |
20:04:40 | FromDiscord | <Gumbercules> you probably wouldn't be able to make out any words anyway between the bong rips and dog barking |
20:04:59 | FromDiscord | <Gumbercules> I'm just joking - I don't think disruptek smokes a lot of pot |
20:05:12 | FromDiscord | <Gumbercules> he doesn't mess with that kiddy shit |
20:05:23 | Zevv | we had a real nice weekend in brussels during fosdem, he's pretty cool to hang around with |
20:05:28 | Zevv | also, he's not a smoker |
20:05:31 | FromDiscord | <Gumbercules> oh I can imagine |
20:05:39 | FromDiscord | <Gumbercules> yeah I don't know what drugs he's into |
20:05:39 | FromDiscord | <Phil> I think nimph adoption or the like mostly just shows how valuable being "official" is in terms for a project getting promotion |
20:06:04 | FromDiscord | <Gumbercules> Nimble was only "official" because at the time there was nothing else |
20:06:06 | FromDiscord | <Elegantbeef> Doesnt help that Nimble cannot build nimph |
20:06:16 | FromDiscord | <Gumbercules> and the author liked to cargo cult everything they made |
20:07:19 | FromDiscord | <Phil> One of these days I'll actually remember what the default os procs are to get a directory in a path on its own as well as the filename |
20:07:56 | FromDiscord | <Gumbercules> In reply to @Zevv "we had a real": I also wish I could attend fosdem, maybe one of these years |
20:08:05 | FromDiscord | <Gumbercules> I don't think making a baby helped my chances |
20:08:49 | Zevv | i've seen babies at fosdem |
20:09:05 | FromDiscord | <jmgomez> looks cool, did the guy left the community or what? |
20:09:16 | Zevv | he got banned |
20:09:25 | FromDiscord | <Elegantbeef> Disruptek doesnt have the best control over his words đ |
20:09:33 | Zevv | i forgot why. it was something silly like usual |
20:09:51 | FromDiscord | <jmgomez> ouch, hopefully nothing political |
20:09:59 | Zevv | no, we have other people for political nonsense |
20:10:00 | FromDiscord | <Elegantbeef> Called someone's code "dogshit and actively harming the community" |
20:10:03 | FromDiscord | <Gumbercules> to be fair, the person that banned him was turning this place into a marxist hellscape |
20:10:14 | FromDiscord | <Gumbercules> well the code was dogshit |
20:10:22 | FromDiscord | <Elegantbeef> The hyperbole |
20:10:45 | FromDiscord | <jmgomez> so the one who banned him, left the community? |
20:10:53 | FromDiscord | <jmgomez> like double kill? |
20:11:05 | FromDiscord | <Gumbercules> I think technically Andreas banned him |
20:11:17 | FromDiscord | <Gumbercules> but the person who wanted the ban has left |
20:11:28 | Zevv | because of andreas |
20:11:32 | FromDiscord | <Gumbercules> because they were the worst |
20:11:35 | Zevv | it's, like, complicated |
20:11:38 | FromDiscord | <Gumbercules> and because of Andreas |
20:11:41 | FromDiscord | <Gumbercules> and because they're a SJW |
20:11:46 | FromDiscord | <Gumbercules> but that's another tangent entirely |
20:12:12 | FromDiscord | <jmgomez> hmm I see |
20:12:55 | FromDiscord | <Gumbercules> there were a lot of issues going on in the community around that time and afterwards |
20:13:11 | FromDiscord | <Gumbercules> just people not doing the things that needed to get done and instead getting caught up in drama / politics |
20:13:17 | Zevv | yeah, those were the days. boy i miss all that |
20:13:32 | FromDiscord | <Gumbercules> was definitely đż material |
20:14:39 | FromDiscord | <Elegantbeef> Anywho this conversation is one ready for a dumpster fire |
20:15:25 | FromDiscord | <Phil> Agreed |
20:15:32 | FromDiscord | <jmgomez> hmm dunno sick of polarization TBH. Didnt see any around here which I guess it's a good sign |
20:15:50 | FromDiscord | <Phil> Now on to the tragedy that is nimscript files not being able of importing other nimscript files |
20:16:20 | FromDiscord | <jmgomez> In reply to @Isofruit "Now on to the": how so? Didnt even tried yet |
20:16:24 | FromDiscord | <jmgomez> I thought that was possible |
20:16:28 | FromDiscord | <Elegantbeef> You can only import `.nim` |
20:16:40 | FromDiscord | <jmgomez> hmm well, I guess you can readFile |
20:16:45 | FromDiscord | <Elegantbeef> You might be able to do `import "mynim.nims"` |
20:16:57 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/iEe |
20:17:35 | FromDiscord | <Phil> Insert image of facepalm |
20:17:40 | FromDiscord | <Phil> In reply to @Elegantbeef "You might be able": Because that did it |
20:17:45 | FromDiscord | <jmgomez> I see, cant you compound them as workaround? |
20:17:56 | FromDiscord | <jmgomez> ohh nice |
20:17:59 | FromDiscord | <Elegantbeef> The issue is the extension đ |
20:18:17 | FromDiscord | <jmgomez> lol, that should be an easy PR Phil.. đ |
20:20:07 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4rna |
20:20:22 | FromDiscord | <Elegantbeef> `.(test, nims)` |
20:20:32 | FromDiscord | <Elegantbeef> Nim's import does not use the dot expr |
20:20:50 | FromDiscord | <Phil> Going the string way did it again |
20:21:04 | FromDiscord | <Elegantbeef> Of course |
20:21:54 | FromDiscord | <Elegantbeef> `.nims` can import `.nim` |
20:24:58 | FromDiscord | <Elegantbeef> I do not even think there is a PR here |
20:25:13 | FromDiscord | <Elegantbeef> Say you have a standalone file with a nimscript file for it's config |
20:25:32 | FromDiscord | <Elegantbeef> you're inside nimscript and attempt to `import mylibrary` which should it pull in |
20:26:03 | FromDiscord | <Elegantbeef> `.nim` then fallback to `.nims` perhaps might make sense |
20:28:33 | FromDiscord | <Phil> Can you just write a file and have the os create all directories for you if any in the path are missing? |
20:29:25 | FromDiscord | <Elegantbeef> I think you need to do it recursively |
20:34:10 | FromDiscord | <Phil> No lazy way for me đą |
20:37:01 | * | fallback quit (Read error: Connection reset by peer) |
20:44:28 | FromDiscord | <auxym> `mkdir -p` ? |
20:48:56 | * | fallback joined #nim |
20:54:41 | FromDiscord | <planetis> you can definitely include though like this: include "x.nims" |
20:55:21 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4rnh |
20:55:55 | FromDiscord | <Elegantbeef> planetis we already went over that |
20:56:32 | FromDiscord | <planetis> ah shoot |
20:57:07 | FromDiscord | <Elegantbeef> What are you statically linking vs. dynamically linking? |
20:57:34 | FromDiscord | <4zv4l> In reply to @Elegantbeef "What are you statically": a simple nim discord bot |
20:57:48 | FromDiscord | <4zv4l> that's weird because when I cross compiled it to my raspberry pi |
20:57:53 | FromDiscord | <4zv4l> I didn't get any lib issue |
21:01:26 | FromDiscord | <4zv4l> I also tried to statically link with musl but I also get an error |
21:01:41 | * | FromDiscord quit (Remote host closed the connection) |
21:01:54 | * | FromDiscord joined #nim |
21:02:10 | FromDiscord | <Elegantbeef> If so you need to compile with an older version of glibc |
21:02:12 | FromDiscord | <4zv4l> I send it over ssh to my server |
21:02:14 | FromDiscord | <4zv4l> In reply to @Elegantbeef "If so you need": how do I do that ? |
21:02:14 | FromDiscord | <4zv4l> do I need to install it or I can add a flag to specify it ? |
21:03:18 | FromDiscord | <Elegantbeef> I think the solution is generally visualise an older environment and compile there |
21:04:15 | FromDiscord | <4zv4l> I think I'm just gonna download nim on my serverâ”quicker to do I think xDâ”I don't get why it doesn't work when it's statically linked tho |
21:04:24 | FromDiscord | <4zv4l> In reply to @4zv4l "when I link statically": why â”`zb: dl-call-libc-early-init.c:37: _dl_call_libc_early_init: Assertion `sym != NULL' failed.` |
21:06:22 | FromDiscord | <Elegantbeef> Not a clue |
21:07:02 | FromDiscord | <Elegantbeef> What are your C compiler flags |
21:07:28 | FromDiscord | <4zv4l> where can I see that ? |
21:07:38 | FromDiscord | <Elegantbeef> Well how are you attempting to statically link |
21:08:32 | FromDiscord | <4zv4l> I compile using: |
21:08:33 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4rnk |
21:08:42 | FromDiscord | <4zv4l> `nim c --d:release --d:ssl --opt:size --d:strip --passL:-static --d:static zb.nim` |
21:08:53 | FromDiscord | <4zv4l> idk if the `--d:static` is overkill or not or if it even exists |
21:09:02 | FromDiscord | <Elegantbeef> It doesnt exist |
21:10:51 | * | advesperacit quit (Ping timeout: 260 seconds) |
21:11:13 | FromDiscord | <4zv4l> alright, well those two functions are giving trouble xDâ”I compiled it directly on the server to bypass that issue |
21:11:47 | * | advesperacit joined #nim |
21:12:54 | FromDiscord | <Elegantbeef> Best to dynamically link on a virtualised environment |
21:12:54 | FromDiscord | <Elegantbeef> Yea that's now how you static link anything really |
21:12:56 | FromDiscord | <Elegantbeef> Or just compile on your server |
21:13:28 | FromDiscord | <Elegantbeef> > warning\: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking |
21:13:46 | FromDiscord | <Elegantbeef> That means something you relied upon uses dlopen and you need to also statically link that |
21:14:20 | FromDiscord | <Elegantbeef> When it comes to static binaries it's a path of static linking everything |
21:15:10 | FromDiscord | <4zv4l> the only external library I use is `dimscord` |
21:15:15 | FromDiscord | <4zv4l> but yeah it's ok |
21:15:16 | FromDiscord | <caravaggio> am i the only one that finds nim exercism challenges bad? |
21:15:25 | FromDiscord | <Elegantbeef> `-d:ssl` says otherwise |
21:15:55 | FromDiscord | <Elegantbeef> I think they can be bad depending if you solve them idiomatically |
21:24:42 | FromDiscord | <4zv4l> In reply to @Elegantbeef "`-d:ssl` says otherwise": yeah right I didn't see it that way xD |
21:34:37 | FromDiscord | <Dudugz> I made a simple file to compile and test my binaries :v so i just ``debug run`` or ``debug build`` or ``debug`` for both. More practical than going to each one's directory, compiling with ``-d:ssl`` and then going back to the binaries directory and running each one |
21:37:25 | * | junaid_ quit (Remote host closed the connection) |
21:40:03 | * | fallback quit (Read error: Connection reset by peer) |
21:42:13 | * | FromDiscord quit (Remote host closed the connection) |
21:42:26 | * | FromDiscord joined #nim |
21:49:07 | * | fallback joined #nim |
21:58:07 | FromDiscord | <Gumbercules> In reply to @caravaggio "am i the only": bad in what way? |
22:03:51 | FromDiscord | <caravaggio> In reply to @Gumbercules "bad in what way?": I've done quite a few exercism stuff, for some reasons the nim ones don't have instructions |
22:04:21 | FromDiscord | <caravaggio> I like playing on exercism when am on a pc without a compiler and just turned off the nim track |
22:04:23 | * | azimut quit (Ping timeout: 255 seconds) |
22:04:29 | FromDiscord | <caravaggio> Most have step by step instructions |
22:05:09 | FromDiscord | <caravaggio> The nim ones I did. Felt like vague hints on what I needed to do |
22:05:12 | FromDiscord | <Elegantbeef> What's the fun in that |
22:09:12 | FromDiscord | <caravaggio> I guess I was just looking for structure |
22:09:44 | FromDiscord | <caravaggio> I dont want the answers handed to me ofc no learning in that |
22:10:09 | FromDiscord | <caravaggio> But small step by step hints that lead in the right direction would be useful, no? |
22:12:34 | * | advesperacit quit () |
22:27:28 | FromDiscord | <Raynei486> If there was a function in `sdl2/image.nim` that is not exported in `sdl2.nim`, how do I access it? https://media.discordapp.net/attachments/371759389889003532/1087502698141728788/image.png |
22:28:00 | FromDiscord | <Elegantbeef> `import std2/image` |
22:28:02 | FromDiscord | <Raynei486> I tried importing `sdl2/image` but it still can't find the proc |
22:28:17 | FromDiscord | <Elegantbeef> Is the proc exported in image? |
22:28:48 | FromDiscord | <Raynei486> sent a code paste, see https://paste.rs/JSV |
22:29:14 | FromDiscord | <Elegantbeef> Then it should be accesible when you do `import std2/image` |
22:31:19 | FromDiscord | <Raynei486> okay it somehow magically resolved itself when I aliased it as `import sdl2/image as image` |
22:31:29 | FromDiscord | <Raynei486> I guess it didn't know what I was referring to |
22:32:42 | FromDiscord | <geekrelief> In reply to @caravaggio "I guess I was": I used exercism to start learning Nim. It got my feet wet and see alternate implementations was educational. Beyond that, I think you'll learn more finding a goal and hacking towards it while reading the manual and api docs. |
22:42:46 | * | Notxor quit (Remote host closed the connection) |
22:51:14 | FromDiscord | <Nilts> Anyone have a way to pretty print tree-like objects? |
23:22:13 | FromDiscord | <Nilts> nvm i found treeform/print |
23:43:28 | FromDiscord | <treeform> It's me |
23:45:25 | FromDiscord | <Elegantbeef> No it's "it'sa me" |
23:46:13 | Amun-Ra | âŠMario |
23:51:14 | anddam | ah jeez, I am now in lua-hell |
23:51:28 | FromDiscord | <Elegantbeef> Jump before it's too late |
23:52:10 | anddam | it's already too late |
23:52:12 | anddam | https://termbin.com/2r9d |
23:52:31 | anddam | in fact I am going to sleep, thought I could just update cimgui then nimgl/imgui in turn |
23:52:42 | FromDiscord | <Elegantbeef> Just join the wasm scripting evangelism |
23:52:50 | anddam | btw why is there even a "thin C wrapper" on top of Dear Imgui is that is C++ |
23:52:52 | anddam | C++ |
23:53:11 | anddam | x/is that/ c/if that is/ |
23:53:18 | FromDiscord | <Elegantbeef> Are you asking "why does cimgui" exist? |
23:53:21 | anddam | yes |
23:53:41 | anddam | is that because C is the lingua franca of programming? |
23:53:48 | FromDiscord | <Elegantbeef> Cause if you want to use dear imgui from another language it's much better to have a system library then attempt to bind to C++ |
23:54:06 | FromDiscord | <Elegantbeef> To use dear-imgui you need to support compiling C++ |
23:54:17 | FromDiscord | <Elegantbeef> to use cimgui since it's a system library you need `dlOpen` or similar |
23:54:42 | anddam | what's a "system" library, exactly? |
23:54:58 | FromDiscord | <Hourglass [She/Her]> In reply to @Elegantbeef "Then it should be": Std2? |
23:55:50 | FromDiscord | <Hourglass [She/Her]> In reply to @Elegantbeef "Just join the wasm": Yes |
23:56:00 | FromDiscord | <Hourglass [She/Her]> Still need to work on that mod.... |
23:57:25 | FromDiscord | <Elegantbeef> The thing with using source libraries is you can only use what symbols are compiled, if no one marked the procedures as `extern` it will not persist past compilation |
23:57:32 | FromDiscord | <Elegantbeef> Dead code elimination is wonderful |
23:59:09 | FromDiscord | <Elegantbeef> Like `proc doThing = discard` is removed if not called in Nim, but if you do `proc doThing {.extern: "doThing".} = discard` it's compiled in |