<< 05-11-2024 >>

00:24:55FromDiscord<double_spiral> Is it possible to get the string value of an untyped?
00:26:03FromDiscord<double_spiral> ie `assert thing.getStringValue() == "thing"`
00:31:08FromDiscord<double_spiral> Or you know vise versa if necessary ig
00:35:14FromDiscord<Elegantbeef> `astToStr`
01:00:04FromDiscord<double_spiral> Thanks
01:09:43FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#pasty=jYvGDKvL
01:10:19FromDiscord<Elegantbeef> `varargs` is only meant for C interop
01:10:24FromDiscord<Elegantbeef> You want the varargs type
01:14:10FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#pasty=ioayleEQ
01:14:16FromDiscord<m4ul3r> (edit) "https://play.nim-lang.org/#pasty=wdGwtwMy" => "https://play.nim-lang.org/#pasty=PWNPQFqe"
01:15:51FromDiscord<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:47FromDiscord<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:12FromDiscord<whi147> Debugging in vscode, how to implement hovering to show variable values?
02:18:45FromDiscord<whi147> https://media.discordapp.net/attachments/371759389889003532/1303181679292055695/image.png?ex=672ad204&is=67298084&hm=0d882a4dec1b17e8e29010549ed4157c41dc8034919b5d2f050c3bfdf4ebead8&
02:20:18FromDiscord<whi147> I'm using v1.6.20.
02:23:49FromDiscord<grumblygibson> In reply to @whi147 "Debugging in vscode, how": You probably want to write a plug in that interfaces with gdb.
02:24:28FromDiscord<whi147> Can't I just use lldb?
02:27:59FromDiscord<grumblygibson> there is nlvm.
02:28:48FromDiscord<whi147> In reply to @grumblygibson "there is nlvm.": Thanks, is there a sample configuration?
02:49:11FromDiscord<whi147> https://media.discordapp.net/attachments/371759389889003532/1303189336048668682/image.png?ex=672ad925&is=672987a5&hm=df11b880b5711ea7bafd05cb444e7ea480387cdcf997837a2ed0f84a592cc104&
02:49:31FromDiscord<whi147> I'm guessing it's caused by the variables all having _1 after them
02:49:50FromDiscord<whi147> No symbol "x" in current context. (from data-evaluate-expression --thread 1 --frame 0 x)
04:23:15FromDiscord<grumblygibson> There is sample gdb configuration that nim ships with that helps with demangling the names.
05:24:30FromDiscord<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:18FromDiscord<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:05FromDiscord<whi147> I seem to have partially realized
07:07:22FromDiscord<whi147> #launch.json
07:07:24FromDiscord<whi147> sent a long message, see https://pasty.ee/FXyVJzKd
07:07:34FromDiscord<whi147> #tasks.json
07:07:35FromDiscord<whi147> sent a long message, see https://pasty.ee/yZafpYGz
07:07:35FromDiscord<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:01FromDiscord<whi147> https://media.discordapp.net/attachments/371759389889003532/1303254478044139590/image.png?ex=672b15d0&is=6729c450&hm=6a3d888052bdf48e0ea7030ab60fa6b2bf7e58658f8091cd494e0661d833a1bd&
07:08:18FromDiscord<whi147> https://media.discordapp.net/attachments/371759389889003532/1303254548936134707/image.png?ex=672b15e1&is=6729c461&hm=7617402c91ab390563f3c3c4d215269fdf1cedcb3bfda6d03435468e34495c9f&
07:08:24FromDiscord<whi147> No symbol "addrs" in current context. (from data-evaluate-expression --thread 1 --frame 0 addrs)
07:08:44FromDiscord<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:40FromDiscord<wannabelokesh> what are the learning resources for nim-lang?
11:03:51FromDiscord<solitudesf> In reply to @wannabelokesh "what are the learning": https://nim-lang.org/documentation.html
11:16:24FromDiscord<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:39FromDiscord<myxi> (edit) "crossplatform" => "cross-platform"
11:16:53FromDiscord<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:09FromDiscord<wannabelokesh> lol what? https://media.discordapp.net/attachments/371759389889003532/1303319186323275827/image.png?ex=672b5214&is=672a0094&hm=650851c6c148dbb275db59b52861a561701e32442d43cd7eb8c2861390f002ce&
11:27:23FromDiscord<k0ts> Have you installed pixels?
11:28:05FromDiscord<wannabelokesh> yes
11:28:19FromDiscord<odexine> have you verified the library import name is `pixels`?
11:28:32FromDiscord<odexine> because the library name and the module name are not necessarily equal
11:28:52FromDiscord<wannabelokesh> I guess so
11:29:02FromDiscord<wannabelokesh> I'm reading this book `Mastering Nim`
11:29:06FromDiscord<wannabelokesh> first lesson
11:29:31FromDiscord<k0ts> The command shown has `--noNimblePath` but no `--path` pointing to pixels
11:31:27FromDiscord<wannabelokesh> IDGI
11:31:32FromDiscord<wannabelokesh> solution?
11:31:51FromDiscord<odexine> if you have no nimble path then nimble installed libraries wont be used
11:32:04FromDiscord<wannabelokesh> how to set nimblepath?
11:32:20FromDiscord<odexine> ah i didnt notice you used nimble run
11:32:28FromDiscord<odexine> do you have pixels in your nimble requires?
11:32:48FromDiscord<wannabelokesh> I guessed that. ↵I was looking at `Two.nimble`
11:32:54FromDiscord<wannabelokesh> should I add it?
11:32:56FromDiscord<odexine> yes
11:33:20FromDiscord<odexine> nimble run will force no nimble path and only add paths of libraries in your requires
11:33:25FromDiscord<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:38FromDiscord<k0ts> Have you specified pixels as a dependency in your nimble file?
11:33:48FromDiscord<wannabelokesh> I just did.
11:34:03FromDiscord<odexine> working?
11:35:42FromDiscord<wannabelokesh> https://media.discordapp.net/attachments/371759389889003532/1303321840537702421/image.png?ex=672b548d&is=672a030d&hm=4d19c9a35c763b35cdb54560bd481ba9ca6b4cc883f0ac17e9d718481aae42a3&
11:36:15FromDiscord<nnsee> you need to install the sdl2 libs from your distro's repos
11:36:16FromDiscord<solitudesf> people dont have sdl2 installed in 2k24?
11:37:23FromDiscord<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:39FromDiscord<wannabelokesh> In reply to @nnsee "you need to install": I guess they're installed. ↵let me check
11:42:20FromDiscord<wannabelokesh> SDL was, SDL2 wasn't. ↵especially, _ttf ones
11:43:19FromDiscord<wannabelokesh> In reply to @odexine "working?": now.
11:43:28FromDiscord<odexine> congrats
11:43:28FromDiscord<wannabelokesh> thank y'all.
11:49:02FromDiscord<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:12FromDiscord<nnsee> just paste the unicode symbol in the file?
11:50:22FromDiscord<nnsee> `👑`
11:50:45FromDiscord<wannabelokesh> I had to use code to paste the symbol, cause nvim doesn't copy/paste to/from system-clipboard (sed life).
11:50:54FromDiscord<wannabelokesh> but how do I do the unicode thingy?
11:51:25FromDiscord<ayex> depends on your system
11:53:24FromDiscord<nnsee> In reply to @wannabelokesh "I had to use": huh? yeah it does?
11:54:18FromDiscord<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:49FromDiscord<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:11FromDiscord<wannabelokesh> maybe my nvim (distro's) isn't compiled with the corresponding flags
11:56:12FromDiscord<wannabelokesh> idk
11:58:50FromDiscord<nnsee> In reply to @wannabelokesh "I'm using alacritty and": can't you do `"+p` to paste from the system clipboard?
11:59:03FromDiscord<nnsee> i swear that has worked pretty much everywhere i've tried it
12:00:28FromDiscord<wannabelokesh> no
12:01:53FromDiscord<wannabelokesh> either my terminal doesn't working for unicode but utf-8 ..?
12:04:32FromDiscord<nnsee> alacritty definitely supports unicode
12:04:37FromDiscord<nnsee> and it should just work. https://play.nim-lang.org/#pasty=KCpQMGmu
12:06:38FromDiscord<wannabelokesh> https://media.discordapp.net/attachments/371759389889003532/1303329624620666932/image.png?ex=672b5bcd&is=672a0a4d&hm=303bc8496cb9d3da0581b6a6a23c5e5f1f0e571c64e35b80dd0eb5084490f490&
12:06:40FromDiscord<nnsee> you can also use the bytes themselves if you want
12:06:40FromDiscord<nnsee> https://play.nim-lang.org/#pasty=EYrEswBH
12:06:58FromDiscord<nnsee> In reply to @wannabelokesh "": well that's not how you do that
12:07:04FromDiscord<wannabelokesh> I tried `echo -e "\U0001F451"` and it outputs the crown symbol.
12:07:07FromDiscord<nnsee> even your syntax highlighter is giving you a hint
12:07:16FromDiscord<nnsee> echo doesn't use the same syntax as nim
12:07:48FromDiscord<wannabelokesh> I thought it's hinting that it recognizes that it's a unicode pattern
12:07:57FromDiscord<wannabelokesh> so what to use?
12:10:36FromDiscord<wannabelokesh> In reply to @nnsee "https://play.nim-lang.org/#pasty=EYrEswBH": this worked. ↵what is it? hexadecimal?
12:12:14FromDiscord<nnsee> yes, four bytes represented using hex.
12:12:29FromDiscord<k0ts> https://nim-lang.org/docs/manual.html#lexical-analysis-character-literals
12:13:24FromDiscord<nnsee> In reply to @wannabelokesh "this worked. what": run `printf '👑' | xxd` in a terminal
12:14:16FromDiscord<wannabelokesh> https://media.discordapp.net/attachments/371759389889003532/1303331547340079104/image.png?ex=672b5d97&is=672a0c17&hm=0e071d0302125027c89adb220f00a06e94ef0a6db7b389880525baac73a19133&
12:14:39FromDiscord<nnsee> well yeah
12:14:49FromDiscord<nnsee> i was just showing you in case you were confused where i got those bytes
12:18:09FromDiscord<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:19FromDiscord<wannabelokesh> 😅 t
12:18:25FromDiscord<wannabelokesh> (edit) removed "t"
12:18:58FromDiscord<wannabelokesh> and also, why `"\U0001F451"` isn't working..
12:19:50FromDiscord<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:15FromDiscord<odexine> In reply to @wannabelokesh "and also, why `"\U0001F451"`": nim requires {} if there are more than 4 hex digits
12:20:26FromDiscord<odexine> so `\u{1F451}`
12:20:42FromDiscord<odexine> well, thats for a code point
12:20:46FromDiscord<k0ts> Escapes for string literals: https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals
12:20:51FromDiscord<odexine> i dont exactly know if this corresponds correctly to a code point but
12:20:52FromDiscord<wannabelokesh> so `\xf0\x9f\x91\x91` is the hexcode for this `\U0001F451` unicode?
12:21:03FromDiscord<k0ts> It's the utf-8 representation right
12:21:44Amun-Rathat's utf-8 representation for 0x1f451 codepoint
12:22:08FromDiscord<wannabelokesh> what's the unicode code for it?
12:22:24FromDiscord<odexine> In reply to @odexine "so `\u{1F451}`": .
12:22:25FromDiscord<k0ts> 0x1f451
12:22:30FromDiscord<wannabelokesh> ok
12:22:34FromDiscord<nnsee> https://www.compart.com/en/unicode/U+1F451
12:22:40FromDiscord<nnsee> see the encodings section
13:36:13*ntat joined #nim
13:57:28FromDiscord<mtriplet> I need help
14:01:39FromDiscord<nnsee> yeah, me too
14:01:43FromDiscord<tauruuuuuus> Don't we all..
14:04:54FromDiscord<mtriplet> I think I can't even set any ide software
14:05:02FromDiscord<mtriplet> (edit) "I think I can't even set ... any" added "up"
14:06:36FromDiscord<mtriplet> i am pulling my hair out
14:23:03FromDiscord<k0ts> sent a long message, see https://pasty.ee/BjMvtRuJ
14:23:10FromDiscord<tauruuuuuus> Just use vscodium, which is vscode without telemetry
14:23:34FromDiscord<tauruuuuuus> Install the official plugin for Nim, install the compiler, nimble and nimlangserver and you're done
14:23:49FromDiscord<tauruuuuuus> It's the best experience atm
14:24:35FromDiscord<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:31FromDiscord<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:22FromDiscord<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:55FromDiscord<bubbly_avocado_86424> (edit) "works'" => "works'↵only requirement with Nim is to have the language server installed↵↵nimble install nimlangserver"
14:45:42FromDiscord<gogolxdong666> Is there any library suitable for game develop from scratch like Mine craft pixel style?
14:45:59FromDiscord<gogolxdong666> (edit) "develop" => "developping"
14:51:20FromDiscord<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:32FromDiscord<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:52FromDiscord<bostonboston> Is the size of an enum minimized?
21:10:21FromDiscord<tauruuuuuus> I think so
21:10:37FromDiscord<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:51FromDiscord<Robyn [She/Her]> In reply to @bostonboston "Is the size of": iirc no, not unless you force the compiler to do so
21:47:10FromDiscord<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:52FromDiscord<bostonboston> I got silly and `echo sizeof(myenum)` and got a 1, so I think it is minimized
22:03:43Amun-Rano, nim enums are not the same size as C enums are
22:04:52FromDiscord<mrgaturus> In reply to @bostonboston "I got silly and": you can change enum size using `{.size: .}` pragma
22:11:38FromDiscord<tauruuuuuus> By default they are the smallest possible
22:11:47FromDiscord<tauruuuuuus> https://play.nim-lang.org/#pasty=pFKRalHQ
22:14:35Amun-Rayes
22:16:20Amun-Rayou don't need to set the size by hand, unless you need this for C interop etc.
22:21:26FromDiscord<bostonboston> I was doing c# interop and it's enums are int32 by default
22:22:33Amun-Ramhm
22:24:36Amun-RaC ones are cint
22:42:08FromDiscord<tauruuuuuus> Yeah c will pick int as the underlying type, but in C23 you can actually specify the underlying type
22:43:32FromDiscord<zumi.dxy> 👀
22:44:49FromDiscord<nervecenter> Next C standard should just make type keywords with bitwidths included keywords
22:45:23FromDiscord<nervecenter> Stop faffing about putting it all in a library
22:46:30FromDiscord<tauruuuuuus> What do you mean?
23:04:40FromDiscord<bostonboston> Next c standard should just be deprecations
23:28:09FromDiscord<Elegantbeef> Let's be honest the next C standard should just be a pascal dialect
23:43:29*lucasta joined #nim
23:50:57FromDiscord<bostonboston> He's right you know
23:51:33FromDiscord<bostonboston> I used Delphi at work and for me the syntax is second only to Nim
23:52:06FromDiscord<bostonboston> Begin and end should be enforced and replaced with brackets though
23:52:52FromDiscord<bostonboston> Use we are actively using a dinosaur
23:53:34FromDiscord<gogolxdong666> In reply to @griffith1deadly "naylib (raylib)": Is it for native,can it play on browser
23:55:23FromDiscord<Elegantbeef> Naylib does support wasm