00:24:55 | FromDiscord | <double_spiral> Is it possible to get the string value of an untyped? |
00:26:03 | FromDiscord | <double_spiral> ie `assert thing.getStringValue() == "thing"` |
00:31:08 | FromDiscord | <double_spiral> Or you know vise versa if necessary ig |
00:35:14 | FromDiscord | <Elegantbeef> `astToStr` |
01:00:04 | FromDiscord | <double_spiral> Thanks |
01:09:43 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#pasty=jYvGDKvL |
01:10:19 | FromDiscord | <Elegantbeef> `varargs` is only meant for C interop |
01:10:24 | FromDiscord | <Elegantbeef> You want the varargs type |
01:14:10 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#pasty=ioayleEQ |
01:14:16 | FromDiscord | <m4ul3r> (edit) "https://play.nim-lang.org/#pasty=wdGwtwMy" => "https://play.nim-lang.org/#pasty=PWNPQFqe" |
01:15:51 | FromDiscord | <Elegantbeef> Do you not have a Nim compiler? |
01:16:43 | * | m5zs7k quit (Read error: Connection reset by peer) |
01:17:08 | * | m5zs7k joined #nim |
01:26:47 | FromDiscord | <nervecenter> In reply to @fabric.input_output "every time I try": How are you stretching it? |
02:06:48 | * | lucasta quit (Quit: Leaving) |
02:18:12 | FromDiscord | <whi147> Debugging in vscode, how to implement hovering to show variable values? |
02:18:45 | FromDiscord | <whi147> https://media.discordapp.net/attachments/371759389889003532/1303181679292055695/image.png?ex=672ad204&is=67298084&hm=0d882a4dec1b17e8e29010549ed4157c41dc8034919b5d2f050c3bfdf4ebead8& |
02:20:18 | FromDiscord | <whi147> I'm using v1.6.20. |
02:23:49 | FromDiscord | <grumblygibson> In reply to @whi147 "Debugging in vscode, how": You probably want to write a plug in that interfaces with gdb. |
02:24:28 | FromDiscord | <whi147> Can't I just use lldb? |
02:27:59 | FromDiscord | <grumblygibson> there is nlvm. |
02:28:48 | FromDiscord | <whi147> In reply to @grumblygibson "there is nlvm.": Thanks, is there a sample configuration? |
02:49:11 | FromDiscord | <whi147> https://media.discordapp.net/attachments/371759389889003532/1303189336048668682/image.png?ex=672ad925&is=672987a5&hm=df11b880b5711ea7bafd05cb444e7ea480387cdcf997837a2ed0f84a592cc104& |
02:49:31 | FromDiscord | <whi147> I'm guessing it's caused by the variables all having _1 after them |
02:49:50 | FromDiscord | <whi147> No symbol "x" in current context. (from data-evaluate-expression --thread 1 --frame 0 x) |
04:23:15 | FromDiscord | <grumblygibson> There is sample gdb configuration that nim ships with that helps with demangling the names. |
05:24:30 | FromDiscord | <vivamuslibero> 😄 |
05:25:24 | * | attah quit (*.net *.split) |
05:25:24 | * | xaltsc quit (*.net *.split) |
05:25:24 | * | GreaseMonkey quit (*.net *.split) |
05:25:24 | * | blackbeard420 quit (*.net *.split) |
05:25:25 | * | Deadm0th quit (*.net *.split) |
05:25:25 | * | GnuYawk quit (*.net *.split) |
05:25:26 | * | oisota quit (*.net *.split) |
05:25:26 | * | ttkap quit (*.net *.split) |
05:25:27 | * | hovsater quit (*.net *.split) |
05:25:27 | * | anddam quit (*.net *.split) |
05:25:28 | * | tanami_ quit (*.net *.split) |
05:25:30 | * | nisstyre quit (*.net *.split) |
05:25:30 | * | mahlon quit (*.net *.split) |
05:25:30 | * | bcksl quit (*.net *.split) |
05:25:30 | * | via_ quit (*.net *.split) |
05:25:30 | * | notchris quit (*.net *.split) |
05:25:31 | * | ChanServ quit (*.net *.split) |
05:27:14 | * | tanami_ joined #nim |
05:27:14 | * | nisstyre joined #nim |
05:27:14 | * | mahlon joined #nim |
05:27:14 | * | bcksl joined #nim |
05:27:14 | * | via_ joined #nim |
05:27:14 | * | notchris joined #nim |
05:27:53 | * | Deadm0th joined #nim |
05:27:53 | * | GnuYawk joined #nim |
05:27:53 | * | oisota joined #nim |
05:27:53 | * | ttkap joined #nim |
05:27:53 | * | hovsater joined #nim |
05:27:53 | * | anddam joined #nim |
05:28:29 | * | attah joined #nim |
05:28:29 | * | xaltsc joined #nim |
05:28:29 | * | GreaseMonkey joined #nim |
05:28:29 | * | blackbeard420 joined #nim |
05:29:35 | * | ntat joined #nim |
06:41:30 | * | SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev) |
06:45:38 | * | SchweinDeBurg joined #nim |
07:06:18 | FromDiscord | <gokr> In reply to @whi147 "Debugging in vscode, how": I may be wrong, but I think I noticed hovering was there... in the GDB Python-thingy for debugging. So you should be able to snag code from there. |
07:07:05 | FromDiscord | <whi147> I seem to have partially realized |
07:07:22 | FromDiscord | <whi147> #launch.json |
07:07:24 | FromDiscord | <whi147> sent a long message, see https://pasty.ee/FXyVJzKd |
07:07:34 | FromDiscord | <whi147> #tasks.json |
07:07:35 | FromDiscord | <whi147> sent a long message, see https://pasty.ee/yZafpYGz |
07:07:35 | FromDiscord | <gokr> I played with both the other day - and they clearly are good/bad at different things when it comes to rendering the variables. |
07:08:01 | FromDiscord | <whi147> https://media.discordapp.net/attachments/371759389889003532/1303254478044139590/image.png?ex=672b15d0&is=6729c450&hm=6a3d888052bdf48e0ea7030ab60fa6b2bf7e58658f8091cd494e0661d833a1bd& |
07:08:18 | FromDiscord | <whi147> https://media.discordapp.net/attachments/371759389889003532/1303254548936134707/image.png?ex=672b15e1&is=6729c461&hm=7617402c91ab390563f3c3c4d215269fdf1cedcb3bfda6d03435468e34495c9f& |
07:08:24 | FromDiscord | <whi147> No symbol "addrs" in current context. (from data-evaluate-expression --thread 1 --frame 0 addrs) |
07:08:44 | FromDiscord | <whi147> Simple types such as int display their values correctly. |
07:14:24 | * | ntat quit (Quit: Leaving) |
07:32:37 | * | ntat joined #nim |
08:23:42 | * | coldfeet joined #nim |
09:36:31 | * | coldfeet quit (Remote host closed the connection) |
09:56:03 | * | ntat quit (Quit: Leaving) |
10:49:23 | * | Artea joined #nim |
11:02:40 | FromDiscord | <wannabelokesh> what are the learning resources for nim-lang? |
11:03:51 | FromDiscord | <solitudesf> In reply to @wannabelokesh "what are the learning": https://nim-lang.org/documentation.html |
11:16:24 | FromDiscord | <myxi> I am planning to do a project in nim and for that project I need a crossplatform way to get keyboard input; for Linux I found https://nimble.directory/pkg/libevdev but is there something like that for Windows too? |
11:16:39 | FromDiscord | <myxi> (edit) "crossplatform" => "cross-platform" |
11:16:53 | FromDiscord | <myxi> (edit) "I am planning to do a project in nim and for that project I need a cross-platform ... way" added "or platform-specific" |
11:25:09 | FromDiscord | <wannabelokesh> lol what? https://media.discordapp.net/attachments/371759389889003532/1303319186323275827/image.png?ex=672b5214&is=672a0094&hm=650851c6c148dbb275db59b52861a561701e32442d43cd7eb8c2861390f002ce& |
11:27:23 | FromDiscord | <k0ts> Have you installed pixels? |
11:28:05 | FromDiscord | <wannabelokesh> yes |
11:28:19 | FromDiscord | <odexine> have you verified the library import name is `pixels`? |
11:28:32 | FromDiscord | <odexine> because the library name and the module name are not necessarily equal |
11:28:52 | FromDiscord | <wannabelokesh> I guess so |
11:29:02 | FromDiscord | <wannabelokesh> I'm reading this book `Mastering Nim` |
11:29:06 | FromDiscord | <wannabelokesh> first lesson |
11:29:31 | FromDiscord | <k0ts> The command shown has `--noNimblePath` but no `--path` pointing to pixels |
11:31:27 | FromDiscord | <wannabelokesh> IDGI |
11:31:32 | FromDiscord | <wannabelokesh> solution? |
11:31:51 | FromDiscord | <odexine> if you have no nimble path then nimble installed libraries wont be used |
11:32:04 | FromDiscord | <wannabelokesh> how to set nimblepath? |
11:32:20 | FromDiscord | <odexine> ah i didnt notice you used nimble run |
11:32:28 | FromDiscord | <odexine> do you have pixels in your nimble requires? |
11:32:48 | FromDiscord | <wannabelokesh> I guessed that. ↵I was looking at `Two.nimble` |
11:32:54 | FromDiscord | <wannabelokesh> should I add it? |
11:32:56 | FromDiscord | <odexine> yes |
11:33:20 | FromDiscord | <odexine> nimble run will force no nimble path and only add paths of libraries in your requires |
11:33:25 | FromDiscord | <k0ts> As far as I know, unless you've done `nimble setup` and have a `nimble.paths`, nimble tells the compiler which libraries to use via the --path option, which is missing in your screenshot |
11:33:38 | FromDiscord | <k0ts> Have you specified pixels as a dependency in your nimble file? |
11:33:48 | FromDiscord | <wannabelokesh> I just did. |
11:34:03 | FromDiscord | <odexine> working? |
11:35:42 | FromDiscord | <wannabelokesh> https://media.discordapp.net/attachments/371759389889003532/1303321840537702421/image.png?ex=672b548d&is=672a030d&hm=4d19c9a35c763b35cdb54560bd481ba9ca6b4cc883f0ac17e9d718481aae42a3& |
11:36:15 | FromDiscord | <nnsee> you need to install the sdl2 libs from your distro's repos |
11:36:16 | FromDiscord | <solitudesf> people dont have sdl2 installed in 2k24? |
11:37:23 | FromDiscord | <wannabelokesh> In reply to @k0ts "As far as I": I'll ask about this some other day (`nimble setup` and `nimble.paths` things). ↵I'll try learning on my own. and obv talk on these. thanks for suggestions. |
11:37:39 | FromDiscord | <wannabelokesh> In reply to @nnsee "you need to install": I guess they're installed. ↵let me check |
11:42:20 | FromDiscord | <wannabelokesh> SDL was, SDL2 wasn't. ↵especially, _ttf ones |
11:43:19 | FromDiscord | <wannabelokesh> In reply to @odexine "working?": now. |
11:43:28 | FromDiscord | <odexine> congrats |
11:43:28 | FromDiscord | <wannabelokesh> thank y'all. |
11:49:02 | FromDiscord | <wannabelokesh> just for fun, I want to print this `Hello, nim :crown:` ↵How do I pass unicode for this symbol in the .nim file? ↵regex or what? |
11:50:12 | FromDiscord | <nnsee> just paste the unicode symbol in the file? |
11:50:22 | FromDiscord | <nnsee> `👑` |
11:50:45 | FromDiscord | <wannabelokesh> I had to use code to paste the symbol, cause nvim doesn't copy/paste to/from system-clipboard (sed life). |
11:50:54 | FromDiscord | <wannabelokesh> but how do I do the unicode thingy? |
11:51:25 | FromDiscord | <ayex> depends on your system |
11:53:24 | FromDiscord | <nnsee> In reply to @wannabelokesh "I had to use": huh? yeah it does? |
11:54:18 | FromDiscord | <nnsee> or like even if it doesn't, i don't understand why you couldn't just do `ctrl-shift-v` or whatever your terminal emulator's shortcut is for pasting |
11:55:49 | FromDiscord | <wannabelokesh> I'm using alacritty and nvim for writing nim code (lsp support, yes; nvim customized to some extent.. iykyk). ↵I can't copy-paste to/from system-clipboard in nvim. ↵it doesnt' work. It'll copy-paste to/from nvim buffers only. |
11:56:11 | FromDiscord | <wannabelokesh> maybe my nvim (distro's) isn't compiled with the corresponding flags |
11:56:12 | FromDiscord | <wannabelokesh> idk |
11:58:50 | FromDiscord | <nnsee> In reply to @wannabelokesh "I'm using alacritty and": can't you do `"+p` to paste from the system clipboard? |
11:59:03 | FromDiscord | <nnsee> i swear that has worked pretty much everywhere i've tried it |
12:00:28 | FromDiscord | <wannabelokesh> no |
12:01:53 | FromDiscord | <wannabelokesh> either my terminal doesn't working for unicode but utf-8 ..? |
12:04:32 | FromDiscord | <nnsee> alacritty definitely supports unicode |
12:04:37 | FromDiscord | <nnsee> and it should just work. https://play.nim-lang.org/#pasty=KCpQMGmu |
12:06:38 | FromDiscord | <wannabelokesh> https://media.discordapp.net/attachments/371759389889003532/1303329624620666932/image.png?ex=672b5bcd&is=672a0a4d&hm=303bc8496cb9d3da0581b6a6a23c5e5f1f0e571c64e35b80dd0eb5084490f490& |
12:06:40 | FromDiscord | <nnsee> you can also use the bytes themselves if you want |
12:06:40 | FromDiscord | <nnsee> https://play.nim-lang.org/#pasty=EYrEswBH |
12:06:58 | FromDiscord | <nnsee> In reply to @wannabelokesh "": well that's not how you do that |
12:07:04 | FromDiscord | <wannabelokesh> I tried `echo -e "\U0001F451"` and it outputs the crown symbol. |
12:07:07 | FromDiscord | <nnsee> even your syntax highlighter is giving you a hint |
12:07:16 | FromDiscord | <nnsee> echo doesn't use the same syntax as nim |
12:07:48 | FromDiscord | <wannabelokesh> I thought it's hinting that it recognizes that it's a unicode pattern |
12:07:57 | FromDiscord | <wannabelokesh> so what to use? |
12:10:36 | FromDiscord | <wannabelokesh> In reply to @nnsee "https://play.nim-lang.org/#pasty=EYrEswBH": this worked. ↵what is it? hexadecimal? |
12:12:14 | FromDiscord | <nnsee> yes, four bytes represented using hex. |
12:12:29 | FromDiscord | <k0ts> https://nim-lang.org/docs/manual.html#lexical-analysis-character-literals |
12:13:24 | FromDiscord | <nnsee> In reply to @wannabelokesh "this worked. what": run `printf '👑' | xxd` in a terminal |
12:14:16 | FromDiscord | <wannabelokesh> https://media.discordapp.net/attachments/371759389889003532/1303331547340079104/image.png?ex=672b5d97&is=672a0c17&hm=0e071d0302125027c89adb220f00a06e94ef0a6db7b389880525baac73a19133& |
12:14:39 | FromDiscord | <nnsee> well yeah |
12:14:49 | FromDiscord | <nnsee> i was just showing you in case you were confused where i got those bytes |
12:18:09 | FromDiscord | <wannabelokesh> In reply to @nnsee "i was just showing": can you break down the algorithm how you thought and came to the conclusion of `\xf0\x9f\x91\x91` and breakdown the hexcode too? |
12:18:19 | FromDiscord | <wannabelokesh> 😅 t |
12:18:25 | FromDiscord | <wannabelokesh> (edit) removed "t" |
12:18:58 | FromDiscord | <wannabelokesh> and also, why `"\U0001F451"` isn't working.. |
12:19:50 | FromDiscord | <nnsee> Lain linked to the supported escape sequences. `\U` isn't one of them, but `\x` is. `\x` followed by a hex representation of a single byte inserts that byte literally. I just did that four times to insert the bytes for that unicode character |
12:20:15 | FromDiscord | <odexine> In reply to @wannabelokesh "and also, why `"\U0001F451"`": nim requires {} if there are more than 4 hex digits |
12:20:26 | FromDiscord | <odexine> so `\u{1F451}` |
12:20:42 | FromDiscord | <odexine> well, thats for a code point |
12:20:46 | FromDiscord | <k0ts> Escapes for string literals: https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals |
12:20:51 | FromDiscord | <odexine> i dont exactly know if this corresponds correctly to a code point but |
12:20:52 | FromDiscord | <wannabelokesh> so `\xf0\x9f\x91\x91` is the hexcode for this `\U0001F451` unicode? |
12:21:03 | FromDiscord | <k0ts> It's the utf-8 representation right |
12:21:44 | Amun-Ra | that's utf-8 representation for 0x1f451 codepoint |
12:22:08 | FromDiscord | <wannabelokesh> what's the unicode code for it? |
12:22:24 | FromDiscord | <odexine> In reply to @odexine "so `\u{1F451}`": . |
12:22:25 | FromDiscord | <k0ts> 0x1f451 |
12:22:30 | FromDiscord | <wannabelokesh> ok |
12:22:34 | FromDiscord | <nnsee> https://www.compart.com/en/unicode/U+1F451 |
12:22:40 | FromDiscord | <nnsee> see the encodings section |
13:36:13 | * | ntat joined #nim |
13:57:28 | FromDiscord | <mtriplet> I need help |
14:01:39 | FromDiscord | <nnsee> yeah, me too |
14:01:43 | FromDiscord | <tauruuuuuus> Don't we all.. |
14:04:54 | FromDiscord | <mtriplet> I think I can't even set any ide software |
14:05:02 | FromDiscord | <mtriplet> (edit) "I think I can't even set ... any" added "up" |
14:06:36 | FromDiscord | <mtriplet> i am pulling my hair out |
14:23:03 | FromDiscord | <k0ts> sent a long message, see https://pasty.ee/BjMvtRuJ |
14:23:10 | FromDiscord | <tauruuuuuus> Just use vscodium, which is vscode without telemetry |
14:23:34 | FromDiscord | <tauruuuuuus> Install the official plugin for Nim, install the compiler, nimble and nimlangserver and you're done |
14:23:49 | FromDiscord | <tauruuuuuus> It's the best experience atm |
14:24:35 | FromDiscord | <tauruuuuuus> Otherwise just an editor + a terminal is fine, write your code and use `nim c yourfile.nim` or `nimble build` if you're using nimble and you're done |
14:27:31 | FromDiscord | <ayex> for editing nim on terminal, micro text editor (cross platform) has nim syntax highlighting out of the box, no extra config needed. |
14:27:45 | * | beholders_eye joined #nim |
14:29:22 | FromDiscord | <bubbly_avocado_86424> In reply to @mtriplet "I think I can't": I've started using Helix (helix-editor.org) and it is excellent for lazy/stupid people like me, console only but 'just works' |
14:29:55 | FromDiscord | <bubbly_avocado_86424> (edit) "works'" => "works'↵only requirement with Nim is to have the language server installed↵↵nimble install nimlangserver" |
14:45:42 | FromDiscord | <gogolxdong666> Is there any library suitable for game develop from scratch like Mine craft pixel style? |
14:45:59 | FromDiscord | <gogolxdong666> (edit) "develop" => "developping" |
14:51:20 | FromDiscord | <griffith1deadly> naylib (raylib) |
15:00:04 | * | beholders_eye quit (Quit: WeeChat 4.1.2) |
15:14:10 | * | coldfeet joined #nim |
15:34:32 | * | lucasta joined #nim |
15:40:32 | FromDiscord | <mtriplet> In reply to @bubbly_avocado_86424 "I've started using Helix": Good to know |
17:16:14 | * | coldfeet quit (Remote host closed the connection) |
17:40:15 | * | coldfeet joined #nim |
19:32:07 | * | lucasta quit (Quit: Leaving) |
19:32:29 | * | ntat quit (Quit: Leaving) |
19:38:39 | * | ntat joined #nim |
20:31:10 | * | coldfeet quit (Remote host closed the connection) |
21:08:52 | FromDiscord | <bostonboston> Is the size of an enum minimized? |
21:10:21 | FromDiscord | <tauruuuuuus> I think so |
21:10:37 | FromDiscord | <tauruuuuuus> Source: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-size-pragma |
21:12:04 | * | rockcavera joined #nim |
21:18:13 | * | rockcavera quit (Read error: Connection reset by peer) |
21:19:15 | * | rockcavera joined #nim |
21:19:15 | * | rockcavera quit (Changing host) |
21:19:15 | * | rockcavera joined #nim |
21:46:51 | FromDiscord | <Robyn [She/Her]> In reply to @bostonboston "Is the size of": iirc no, not unless you force the compiler to do so |
21:47:10 | FromDiscord | <Robyn [She/Her]> since otherwise it'll just follow C semantics and make it take a full int |
21:49:46 | * | ntat quit (Quit: Leaving) |
22:01:52 | FromDiscord | <bostonboston> I got silly and `echo sizeof(myenum)` and got a 1, so I think it is minimized |
22:03:43 | Amun-Ra | no, nim enums are not the same size as C enums are |
22:04:52 | FromDiscord | <mrgaturus> In reply to @bostonboston "I got silly and": you can change enum size using `{.size: .}` pragma |
22:11:38 | FromDiscord | <tauruuuuuus> By default they are the smallest possible |
22:11:47 | FromDiscord | <tauruuuuuus> https://play.nim-lang.org/#pasty=pFKRalHQ |
22:14:35 | Amun-Ra | yes |
22:16:20 | Amun-Ra | you don't need to set the size by hand, unless you need this for C interop etc. |
22:21:26 | FromDiscord | <bostonboston> I was doing c# interop and it's enums are int32 by default |
22:22:33 | Amun-Ra | mhm |
22:24:36 | Amun-Ra | C ones are cint |
22:42:08 | FromDiscord | <tauruuuuuus> Yeah c will pick int as the underlying type, but in C23 you can actually specify the underlying type |
22:43:32 | FromDiscord | <zumi.dxy> 👀 |
22:44:49 | FromDiscord | <nervecenter> Next C standard should just make type keywords with bitwidths included keywords |
22:45:23 | FromDiscord | <nervecenter> Stop faffing about putting it all in a library |
22:46:30 | FromDiscord | <tauruuuuuus> What do you mean? |
23:04:40 | FromDiscord | <bostonboston> Next c standard should just be deprecations |
23:28:09 | FromDiscord | <Elegantbeef> Let's be honest the next C standard should just be a pascal dialect |
23:43:29 | * | lucasta joined #nim |
23:50:57 | FromDiscord | <bostonboston> He's right you know |
23:51:33 | FromDiscord | <bostonboston> I used Delphi at work and for me the syntax is second only to Nim |
23:52:06 | FromDiscord | <bostonboston> Begin and end should be enforced and replaced with brackets though |
23:52:52 | FromDiscord | <bostonboston> Use we are actively using a dinosaur |
23:53:34 | FromDiscord | <gogolxdong666> In reply to @griffith1deadly "naylib (raylib)": Is it for native,can it play on browser |
23:55:23 | FromDiscord | <Elegantbeef> Naylib does support wasm |