<< 25-07-2022 >>

00:02:49FromDiscord<Elegantbeef> Fuck i've officially drank the wasm koolaid, a Kate contributor made a post on r/linux about using python for plugins and i suggest a wasm plugin system instead
00:03:23*wallabra_ joined #nim
00:05:18FromDiscord<Prestige> How does Nim <-> wasm look?
00:05:34FromDiscord<Elegantbeef> Get emcc and it's a single config
00:05:38*wallabra quit (Ping timeout: 240 seconds)
00:05:38*wallabra_ is now known as wallabra
00:05:40FromDiscord<Elegantbeef> Or use clang and it's a single config
00:05:49FromDiscord<Elegantbeef> Or use nlvm and it's a single config
00:06:22FromDiscord<voidwalker> Do I remember well or I can't use preparedSql + bindparams between sql"BEGIN" and sql"COMMIT" ?
00:06:28FromDiscord<Elegantbeef> https://github.com/beef331/wasmedge_playground/blob/master/wasmsources/hooks.nim this is an example of a module that talks to a wasm runtime
00:07:05FromDiscord<Elegantbeef> for emscripten you need to use `cgendecl` for procedures exported to the wasm runtime easily
00:07:16FromDiscord<Elegantbeef> Clang i think should just use `exportC` but i've yet to look into that
00:07:46qwrplugin system is pretty tough topic, but python technically quite slow and bloated, wasm or luajit should be lighter and much faster...
00:07:46FromDiscord<Elegantbeef> Ya'know what i need something to do so why not, let's get emscripten-less Nim -\> Wasm
00:08:08FromDiscord<Elegantbeef> I mean using wasm is better than python for a variety of reasons
00:08:22qwrwasm avoid language lock-in
00:08:30FromDiscord<Elegantbeef> Exactly!
00:08:45FromDiscord<Elegantbeef> I dont want to use your silly scripting language choice, i want to use what's comfortable to me
00:09:27FromDiscord<Prestige> How would you implement that say in our Wayland compositor so it has a wasm plugin engine?
00:09:53FromDiscord<Elegantbeef> https://github.com/beef331/aiarena/blob/master/src/core/wasmenvs.nim#L49-L68
00:10:32FromDiscord<Prestige> Well that seems simple enough
00:10:45*qwr . o O ( about silly scripting language choices, VimScript is imho unbeatable... )
00:11:35FromDiscord<Elegantbeef> YMMV i like Nim and it's mechanisms
00:12:08FromDiscord<Elegantbeef> If I can extend a language using the language i like using i'm a happy boy
00:12:21FromDiscord<Elegantbeef> It's why lapce is interesting to me
00:12:30FromDiscord<Elegantbeef> Vscode-like that uses wasm for extensions
00:14:30FromDiscord<Elegantbeef> And yea prestige, one think i'd like to look into for our wayland compositor is shipping nlvm
00:15:21FromDiscord<Elegantbeef> The big benefit there is that it'd be a self contained way to support even non programmers to tinker with any default modules, or to extend their own
00:16:05*Figworm quit (Quit: Figworm)
00:16:44FromDiscord<Elegantbeef> Being able to just make a new `goodwm/layouts/mynewlayout.nim` and have the compositor compile it on layout reload is just such a nice idea to me
00:17:12FromDiscord<Prestige> That would be pretty cool actually
00:19:24FromDiscord<Prestige> Looks like I'll be writing react again soon, gotta brush up on that...
00:19:41FromDiscord<Prestige> And maybe golang
00:21:58FromDiscord<!Patitotective> how do i get the unique elements of a sequence?
00:23:03FromDiscord<Prestige> Really depends on your use case, desired performance etc. But you can just iterate over a seq and add the elements to a Hashset
00:23:23FromDiscord<Prestige> Idk if there's some shortcut way of doing so
00:23:29FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=45xb
00:24:12FromDiscord<Prestige> Probably won't be very fast with larger seqs
00:24:41FromDiscord<!Patitotective> https://nim-lang.org/docs/sequtils.html#deduplicate,openArray[T],bool lol
00:25:54FromDiscord<Prestige> Seems that does essentially the same thing, which is interesting
00:26:20FromDiscord<Prestige> Although I suppose the common case is not having very long sequences
00:30:12FromDiscord<Elegantbeef> Deduplicate probably doesnt use a hashset to reduce dependencies
00:31:47FromDiscord<!Patitotective> isnt hashset part of the standard library
00:33:26FromDiscord<Elegantbeef> Yes
00:33:29FromDiscord<Prestige> You still have to import it
00:33:46FromDiscord<Elegantbeef> Having parts of the stdlib depend on other parts makes it tedious to change
00:34:00FromDiscord<Elegantbeef> Alternatively someone just didnt think about using a set
00:34:19*summer left #nim (#nim)
00:34:37FromDiscord<carlosri> In reply to @Elegantbeef "You could look at": GRacias amigo
00:34:47FromDiscord<Prestige> I would think it'd make sense to have that impl live in the sets module
00:35:51FromDiscord<Elegantbeef> Yea an impl that returns the `HashSet[T]` 😛
00:36:01FromDiscord<Elegantbeef> Though that's just `toHashSet`
00:36:46FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45xd
00:37:10FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45xe
00:37:38FromDiscord<Elegantbeef> `seconds` isnt exported
00:38:17FromDiscord<ghoom> how do i get them then?
00:38:33FromDiscord<Elegantbeef> Why do you need them?
00:38:49FromDiscord<ghoom> i wanna convert t into a millisecond timestamp
00:39:31FromDiscord<ghoom> nvm i can just use `toUnix`
00:39:44FromDiscord<Elegantbeef> There is also `format`
00:41:57FromDiscord<Elegantbeef> I imagine the reason those fields arent exported is they dont really make any sense to use
00:53:20FromDiscord<voidwalker> Do I remember well or I can't use preparedSql + bindparams between sql"BEGIN" and sql"COMMIT" ?
00:53:56FromDiscord<voidwalker> I need to insert binary data in db.. 9 mil rows. It will take forever like that
01:30:39*vicecea quit (Remote host closed the connection)
01:31:59*vicecea joined #nim
01:53:41FromDiscord<gibson> Why does `quote do` generate `gensym`s? Those often break what I'm trying to do, and I must overwrite them with regular `ident`s.
01:54:03FromDiscord<Elegantbeef> Cause it's hygenic
01:54:12FromDiscord<Elegantbeef> You can use `{.inject.}` if you need
01:58:21FromDiscord<gibson> Okay, what should I learn so I could have answered my question? I'm fuzzy on AST lingo and what's used where, and it only vaguely connects back to my formal training in compiler design. But I find macros still difficult here and there even after reading the manual and both books. Is it compiler design I need more of? Is it something specific about ASTs I've missed?
01:58:53FromDiscord<Elegantbeef> I mean the best way to learn how to write macros is to write them
01:59:12FromDiscord<gibson> Me going on 8 years of writing macros (poorly) 😆
01:59:15FromDiscord<Elegantbeef> Nim's templates/genasts/quote do are all hygenic which means any new symbols declared are gensymd
01:59:28FromDiscord<Elegantbeef> Well shoot them to someone that knows how to write them and let them enlighten you
02:00:48FromDiscord<gibson> Thanks, every answer helps build that model..
02:07:59FromDiscord<Prestige> Re: my question earlier, just did this https://github.com/avahe-kellenberger/seq2d/commit/c998c1f7654d858583b251ae4d12c2fe487bd262 @beef
02:08:07FromDiscord<Prestige> It's fine, I suppose
02:08:17FromDiscord<Elegantbeef> why not what i did?
02:08:27FromDiscord<Prestige> What'd you do?
02:08:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45xt
02:09:05FromDiscord<Prestige> Didn't know reset was a thing, but also to sort of bypass the bounds checking
02:09:31FromDiscord<Elegantbeef> There are no bounds checks there
02:09:41FromDiscord<Prestige> True
02:09:57FromDiscord<Prestige> Wasn't sure how nim handles like
02:10:02FromDiscord<Prestige> the yielded item
02:10:03FromDiscord<Elegantbeef> I mean i guess it does check to ensure you dont mutate it
02:10:14FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/version-1-6/lib/system/iterators.nim#L242
02:10:17FromDiscord<Elegantbeef> But it only does that in debug
02:10:46FromDiscord<Prestige> like if you had a Seq2D[int] would that mitem actually be muted inside `this.data`
02:11:36FromDiscord<Elegantbeef> I dont follow
02:12:34FromDiscord<Prestige> oh you're operating on this.data
02:12:49FromDiscord<Elegantbeef> Of course
02:13:47FromDiscord<Prestige> That'd be better
02:45:32FromDiscord<KepKep> Hey so I'm trying to install nim to give it a shot , is there a way to check if I installed it correctly? it auto added the paths and everything but I can't compile and I'm pretty sure it's cause it didn't actually generate the .nimble folder when I ran the finish.exe
02:47:21FromDiscord<KepKep> https://media.discordapp.net/attachments/371759389889003532/1000957395884855326/unknown.png
02:48:10FromDiscord<KepKep> I have gcc installed from when I was fiddling with c but gcc doesn't compile it ether
02:48:45FromDiscord<Elegantbeef> `which nim` or `where nim` should show you nim if it's in your path
02:48:51FromDiscord<Elegantbeef> If it's not in your path you'll need to add it
02:50:14*arkurious quit (Quit: Leaving)
02:53:11FromDiscord<Prestige> or `command -v nim`
02:56:22FromDiscord<KepKep> nope not working for some reason, I'm a pretty bad at programming so I dunno what to do to fix it :PikaDerp: https://media.discordapp.net/attachments/371759389889003532/1000959667964481616/unknown.png
02:56:36FromDiscord<huantian> Maybe try restarting your pc? I have no idea how windows path works
02:56:42FromDiscord<Elegantbeef> On windows you need to restart it
02:56:47FromDiscord<KepKep> ah
02:56:53FromDiscord<KepKep> also why did it create like 3 paths for me
02:56:57FromDiscord<KepKep> :MonkaS:
02:57:00FromDiscord<Elegantbeef> There is some way to make it not restart but i dont recall how
02:57:25FromDiscord<Elegantbeef> Seems you installed it once then installed it again
02:59:29FromDiscord<KepKep> new errors now :PepeHands: https://media.discordapp.net/attachments/371759389889003532/1000960455474426016/unknown.png
03:03:21FromDiscord<# Luke> hmm whats nims default c compiler
03:04:59FromDiscord<Yardanico> In reply to @ripluke "hmm whats nims default": it depends on the platform, but on most that's GCC (except macOS where it's clang)
03:05:38FromDiscord<# Luke> hmm? when i tried explicitly defining gcc it gives avx2 erreors when compiling pixie
03:06:02FromDiscord<# Luke> it compiles fine normally
03:06:04FromDiscord<Yardanico> In reply to @KepKep "nope not working for": why do you have two different nim folders?
03:06:06FromDiscord<Yardanico> remove one of them and try again
03:06:30FromDiscord<huantian> There’s 3 Nim folders
03:06:49FromDiscord<Yardanico> lol
03:07:07FromDiscord<KepKep> In reply to @Yardanico "why do you have": already did and removed them from path too didn't help sadly
03:08:24FromDiscord<Yardanico> what's the error now?
03:08:34FromDiscord<KepKep> In reply to @KepKep "new errors now <:PepeHands:625122342577897473>": this
03:08:36FromDiscord<Yardanico> (and yeah, you have to reopen the cmd after doing the path manipulations)
03:09:12FromDiscord<Yardanico> In reply to @KepKep "this": well, you don't need to call gcc directly when you're using nim, but the nim error is weird
03:09:26FromDiscord<Yardanico> are you sure you restarted the cmd? maybe try re-logging to your user account?
03:09:49FromDiscord<KepKep> restarted pc and everything
03:10:23FromDiscord<Yardanico> can you show what do you have in the nim foldeR?
03:10:25FromDiscord<Yardanico> (edit) "foldeR?" => "folder?"
03:10:34FromDiscord<KepKep> the .nimble file has no bin inside it for whatever reason but the path it generated points towards a bin folder
03:10:39FromDiscord<Yardanico> the one you added to PATH, and outside of `bin`
03:10:45FromDiscord<KepKep> (edit) "file" => "folder"
03:11:15FromDiscord<KepKep> https://media.discordapp.net/attachments/371759389889003532/1000963414182604912/unknown.png
03:11:39FromDiscord<Yardanico> not this one
03:11:42FromDiscord<Yardanico> the nim folder
03:11:48FromDiscord<Yardanico> .nimble/bin is just for packages that have binaries when you install them
03:11:58FromDiscord<KepKep> https://media.discordapp.net/attachments/371759389889003532/1000963595850498108/unknown.png
03:12:14FromDiscord<Yardanico> and can you check what's in bin and in `lib` ?
03:12:41FromDiscord<KepKep> lots of funny files in bin https://media.discordapp.net/attachments/371759389889003532/1000963773504442459/unknown.png
03:12:53FromDiscord<KepKep> https://media.discordapp.net/attachments/371759389889003532/1000963824540729498/unknown.png
03:13:02FromDiscord<Yardanico> In reply to @KepKep "": hmm, maybe try running finish.exe? It adds nim to path too, but maybe it'll work correctly
03:14:04FromDiscord<KepKep> nope still same issue
03:14:24FromDiscord<KepKep> https://media.discordapp.net/attachments/371759389889003532/1000964206117519360/unknown.png
03:15:14FromDiscord<# Luke> Is there any example of nim GitHub actions?
03:16:46FromDiscord<KepKep> I guess I'll just try deleting everything restarting and downloading fresh
03:17:31FromDiscord<Yardanico> In reply to @ripluke "Is there any example": https://github.com/jiro4989/setup-nim-action
03:19:18FromDiscord<# Luke> Like how can I get it to compile a binary for like Windows Mac and Linux and then create a release with those binaries
03:21:05FromDiscord<!Patitotective> https://github.com/Patitotective/ImTemplate/blob/main/.github/workflows/build.yml
03:21:19FromDiscord<# Luke> ok
03:21:58FromDiscord<!Patitotective> notice that it uploads them to the release that workflow was activated with
03:23:17FromDiscord<huantian> <https://github.com/huantianad/levelsync/blob/master/.github/workflows/main.yml>
03:23:23FromDiscord<huantian> if you want an overcomplicated one
03:24:07FromDiscord<!Patitotective> In reply to @huantian "<https://github.com/huantianad/levelsync/blob/maste": you could have done that in a nimble task :]
03:24:17FromDiscord<# Luke> In reply to @Patitotective "notice that it uploads": wdym
03:24:29FromDiscord<KepKep> okay I guess I just clicked too fast or something somewhere on my first install attempt or maybe it was shting itself cause instead of cutting the folder and placing where I want it I copied hence the multiple paths , it finally compiled and ran :peepoBlush:
03:24:36FromDiscord<huantian> In reply to @Patitotective "you could have done": but look how cool this is https://media.discordapp.net/attachments/371759389889003532/1000966775472652318/unknown.png
03:24:41FromDiscord<KepKep> https://media.discordapp.net/attachments/371759389889003532/1000966792669315182/unknown.png
03:25:05FromDiscord<!Patitotective> In reply to @ripluke "wdym": that worflow is activated on the `released` event↵meaning when you create a release, assets are uploaded to that release
03:25:12FromDiscord<!Patitotective> In reply to @huantian "but look how cool": youve got reason
03:25:26FromDiscord<KepKep> I stumbled upon Vim like 30 minutes ago while deciding if I really wanna learn c or not
03:25:26FromDiscord<# Luke> In reply to @Patitotective "that worflow is activated": ohh
03:25:43FromDiscord<KepKep> and this language looks like a very weird but interesting hybrid of python with the speed of c
03:25:47FromDiscord<# Luke> In reply to @Patitotective "that worflow is activated": and can i cross compile?
03:25:50FromDiscord<KepKep> at least that's how I understood it
03:26:01FromDiscord<KepKep> and I heckin love indent based languages
03:26:06FromDiscord<KepKep> I'm weird like that
03:26:30FromDiscord<!Patitotective> In reply to @ripluke "and can i cross": of course↵you can run jobs in different hosts, my workflow does that
03:26:37FromDiscord<# Luke> okie
03:26:38FromDiscord<huantian> In reply to @Patitotective "you could have done": also it's more ✨reproducable ❇️
03:26:55FromDiscord<!Patitotective> In reply to @KepKep "and this language looks": it has lots of more features like macros :]
03:27:18FromDiscord<Elegantbeef> Just dont expect it to be like writing python
03:27:25FromDiscord<Yardanico> exactly what I wanted to say ^
03:27:31FromDiscord<Yardanico> it might look similar to python at first glance but it's not
03:27:38FromDiscord<Elegantbeef> It differs a lot, syntax similarities aside
03:27:55FromDiscord<Yardanico> so don't expect it to just be like compiled python,
03:27:57FromDiscord<Yardanico> (edit) "python," => "python"
03:27:59FromDiscord<KepKep> I'm a learning junkie , I have learned a little bit of basically everything but no language actually sticks to me rust for example looks cool and all but after reading for days and stuff I still struggle writing even the most basic things :PepeHands:
03:28:04FromDiscord<!Patitotective> In reply to @Elegantbeef "Just dont expect it": python code is unreadable, how are parameters untyped and you can't know if they're variable or not????? thats horrible
03:28:08FromDiscord<Elegantbeef> I personally find the "Compiled python" tagline some people say very misrepresenting, but some people like it 😄
03:28:20FromDiscord<huantian> In reply to @Patitotective "python code is unreadable,": thats why you type your python
03:28:26FromDiscord<huantian> untyped python is bad python
03:28:32FromDiscord<Elegantbeef> Well i'm not going to type python
03:28:38FromDiscord<Elegantbeef> So dont tell me to type my untyped python
03:28:51FromDiscord<KepKep> I was about to start learning C but vim popped up in my youtube recomendations
03:28:58FromDiscord<KepKep> so here I am sleep deprived
03:28:59FromDiscord<Yardanico> it's nim, not vim
03:29:03FromDiscord<Yardanico> vim is an editor
03:29:06FromDiscord<!Patitotective> it's neovim, not nim
03:29:06FromDiscord<KepKep> yep
03:29:08FromDiscord<Yardanico> you are writing it "vim" for the second time already
03:29:11FromDiscord<KepKep> exactly what I mean
03:29:11FromDiscord<Elegantbeef> Hey maybe they seen someone writing Nim with vim
03:29:22FromDiscord<KepKep> this is what 20 hours of no sleep does to a mf
03:29:24FromDiscord<KepKep> :OMEGALUL:
03:29:29FromDiscord<!Patitotective> with nitro
03:29:32FromDiscord<# Luke> like me :P
03:29:33FromDiscord<Elegantbeef> Fuck i was going to try to use clang to generate Nim
03:29:34FromDiscord<KepKep> sorry it's not intentional
03:29:42FromDiscord<KepKep> Vim and nim are literally one letter off
03:30:14FromDiscord<# Luke> yaml is so fun :<
03:30:21FromDiscord<KepKep> inb4 I get banned cause my autopilot brain keeps calling it vim instead of nim
03:30:33FromDiscord<!Patitotective> In reply to @ripluke "yaml is so fun": toml 😎
03:30:33FromDiscord<KepKep> but yeah
03:30:54FromDiscord<# Luke> In reply to @Patitotective "toml 😎": toml is nice
03:31:01FromDiscord<# Luke> so is json
03:31:17FromDiscord<KepKep> hey guys , I'm a weird fellow that keeps learning a bit of every language and nothing sticks to me so I hope this one does :MokoThumbsUp: I go try to sleep for like the 6th time now that nim is installed and I can learn tomorrow
03:31:19FromDiscord<!Patitotective> nah, json's not nice
03:31:34FromDiscord<KepKep> thank for tha help
03:31:42FromDiscord<# Luke> In reply to @Patitotective "nah, json's not nice": It has braces so it’s alot more readable than yank
03:31:45FromDiscord<# Luke> (edit) "yank" => "yaml"
03:31:58FromDiscord<!Patitotective> it has quotes everywhere and no comments
03:32:25FromDiscord<# Luke> In reply to @Patitotective "it has quotes everywhere": Yea the comment thing i can agree with
03:32:35FromDiscord<Rika> In reply to @ripluke "It has braces so": Well that’s preference for everyone isn’t it
03:32:36FromDiscord<# Luke> I don’t mind the quotes
03:32:52FromDiscord<Rika> Readability depends a lot on the person reading 🙂
03:32:53FromDiscord<!Patitotective> In reply to @Rika "Well that’s preference for": you make a yaml file to config you want to write yaml
03:33:02FromDiscord<!Patitotective> In reply to @Rika "Readability depends a lot": with or without glasses
03:33:07FromDiscord<# Luke> Lmao
03:33:10FromDiscord<!Patitotective> (edit) "In reply to @Rika "Well that’s preference for": you make a yaml file to config ... you" added "how"
03:33:29FromDiscord<Rika> In reply to @Patitotective "you make a yaml": I never want to use YAML, not because it’s “ugly”, but because it’s a pain to parse and has a lot of gotchas and inconsistencies
03:34:03FromDiscord<!Patitotective> hmmm, i really don't like strings _sometimes_ being written without quotes
03:34:05FromDiscord<# Luke> Can I make nim compile for other platforms? Instead of manually changing the os
03:34:24FromDiscord<!Patitotective> In reply to @ripluke "Can I make nim": of course you can↵https://nim-lang.org/docs/nimc.html#crossminuscompilation
03:34:24FromDiscord<# Luke> Like can I make nim compile a windows binary on Ubuntu
03:34:26FromDiscord<Yardanico> yes, but then you need a C compiler for that other platform
03:34:29FromDiscord<# Luke> Ok
03:34:33FromDiscord<Yardanico> In reply to @ripluke "Like can I make": that's pretty simple, with mingw it's easy, yes
03:34:50FromDiscord<Yardanico> but things like windows -> linux or linux -> macos are more complicated
03:35:04FromDiscord<Yardanico> linux -> windows is the easiest cross-compilation you can do I think
03:35:09FromDiscord<!Patitotective> if github actions allow you to select the host, why not?
03:35:16FromDiscord<Yardanico> yes that's true
03:35:43FromDiscord<# Luke> In reply to @Yardanico "but things like windows": Can’t I use clang to compile for Mac?
03:35:55FromDiscord<Yardanico> but you need to find a clang compiler that outputs mac binaries
03:35:56FromDiscord<!Patitotective> you can do everything else with `when defined(Windows)` in a nimble task
03:36:12FromDiscord<Yardanico> i mean zig cc can work for linux -> macos probably, but only for simpler cases
03:36:16FromDiscord<# Luke> In reply to @Patitotective "you can do everything": That’s what I’m planning on doing
03:36:33FromDiscord<# Luke> In reply to @Yardanico "i mean zig cc": O.o that might work
03:36:39FromDiscord<# Luke> But not on my pc
03:36:52FromDiscord<# Luke> Cuz I don’t have avx and zig needs it
03:37:07FromDiscord<# Luke> Hmm so I’ll probably just change os
03:37:26FromDiscord<!Patitotective> what are you compiling luke? 👀
03:37:34FromDiscord<Yardanico> In reply to @ripluke "Cuz I don’t have": huh, wat?
03:37:46FromDiscord<# Luke> Compiling pixie doesn’t work
03:37:51FromDiscord<# Luke> I can send the output
03:37:55FromDiscord<Rika> That’s not Zig then
03:38:07FromDiscord<Rika> Pixie doesn’t require AVX iirc though
03:38:32FromDiscord<# Luke> In reply to @Rika "That’s not Zig then": It is lol
03:38:51FromDiscord<Yardanico> In reply to @ripluke "It is lol": what?
03:39:08FromDiscord<Yardanico> pixie is a nim image library, and zig is a language (zig cc is the clang-based cross-compiler)
03:39:15FromDiscord<Yardanico> they're completely unrelated
03:39:27FromDiscord<# Luke> I’m using zig to compile pixie
03:39:38FromDiscord<Yardanico> but what error do you get?
03:39:45FromDiscord<Yardanico> and why do you set gcc mode when you're clearly compiling with zig cc
03:39:46FromDiscord<Yardanico> which is clang
03:39:53FromDiscord<# Luke> I’ll send it
03:41:44FromDiscord<# Luke> https://pastebin.com/GH1Kxw54
03:41:57FromDiscord<# Luke> the comments are the 2 commands i used
03:42:23FromDiscord<Yardanico> can you try using --cc:clang and instead create a wrapper script for zig cc?
03:42:26FromDiscord<Yardanico> so it doesn't have spaces
03:42:36FromDiscord<Yardanico> and then do `nim c --cc:clang --clang.exe:"zigccwrapperscriptname"`
03:42:42FromDiscord<# Luke> ok
03:42:57FromDiscord<!Patitotective> (you can do `CC="zigcc" nim --cc:env -d:release c src/dye.nim` btw)
03:43:23FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=45xX
03:43:23FromDiscord<# Luke> Yup
03:43:26FromDiscord<Yardanico> don't forget to make it executable of course
03:43:34FromDiscord<# Luke> It is
03:44:34FromDiscord<# Luke> It seems to be working but it’s not done yet
03:45:07FromDiscord<# Luke> Yup it’s done!
03:45:11FromDiscord<# Luke> No errors
03:57:48*krux02 quit (Remote host closed the connection)
04:02:39FromDiscord<ghoom> is there an std proc to parse an integer string in an arbitrary base?
04:03:40FromDiscord<!Patitotective> In reply to @ghoom "is there an std": i don't think there is, don't you know the base of the integer?
04:03:59FromDiscord<ghoom> ofc
04:04:28FromDiscord<!Patitotective> what is it
04:05:03FromDiscord<ghoom> 36
04:05:34FromDiscord<ghoom> (edit) "36" => "62"
04:05:49FromDiscord<ghoom> 0 to z
04:07:02FromDiscord<!Patitotective> there's this thing https://github.com/singularperturbation/base62-encode
04:07:21FromDiscord<!Patitotective> not sure how difficult would it be to implement a arbitrary-base-decoder
04:07:50FromDiscord<ghoom> i just found out about `std/base64`
04:07:57FromDiscord<ghoom> i guess that'll do
04:08:11FromDiscord<!Patitotective> but thats not 62
04:08:29FromDiscord<ghoom> ye it's fine i didn't strictly want arbitrary-base parsing
04:08:39FromDiscord<ghoom> i just asked to see my options
04:08:49FromDiscord<ghoom> 🐸👍
04:10:26FromDiscord<!Patitotective> https://github.com/D-Nice/nbaser
04:10:41FromDiscord<ghoom> 😮
04:20:13*reversem3[m] uploaded an image: (958KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/KHPWWmrCGQUVLqsRepbVNaNg/image.png >
04:20:14reversem3[m]@can.I --
04:20:30reversem3[m]using orientX didn't really work
04:22:30FromDiscord<!Patitotective> I don't think he got pinged @can.l
04:24:17reversem3[m]I think I figured it out
04:42:44FromDiscord<ghoom> In reply to @reversem3 "I think I figured": if you wanna ping someone from there you need their ids, then write `<@ID>`
04:42:53FromDiscord<ghoom> (edit) "ids," => "id,"
04:43:04FromDiscord<ghoom> (edit) "In reply to @reversem3 "I think I figured": if you wanna ping someone from there you need their ... id," added "discord"
04:43:07FromDiscord<ghoom> ¯\_(ツ)_/¯
04:44:17FromDiscord<Elegantbeef> Fuck it didnt save
04:44:18FromDiscord<Elegantbeef> I couldnt help myself rev 😛 https://hatebin.com/
04:44:43FromDiscord<Rika> The bridge should automatically convert text into pings iirc
04:44:53FromDiscord<Rika> In reply to @Elegantbeef "I couldnt help myself": You sent nothing lol
04:49:38FromDiscord<Elegantbeef> https://gdl.space/ubekikoyoq.cs a paste site that actually worked
04:50:40FromDiscord<# Luke> How can I get the item of a tuple that matches the value of a variable
04:51:16FromDiscord<Rika> Fake units lmao
04:51:20FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45y5
04:51:26FromDiscord<Rika> Fahrenheit is how it is spelled
04:51:32FromDiscord<Elegantbeef> I try
04:51:42FromDiscord<# Luke> sent a code paste, see https://play.nim-lang.org/#ix=45y6
04:51:55FromDiscord<Elegantbeef> Wait i spelled it correctly in my joke comment?
04:51:59FromDiscord<Rika> No
04:52:11FromDiscord<Elegantbeef> Aw shit h and r were swapped
04:52:14FromDiscord<Elegantbeef> See
04:52:14FromDiscord<Rika> Lol
04:52:48FromDiscord<Elegantbeef> Luke what are you actually after
04:53:01*estiquelapice quit ()
04:53:15FromDiscord<# Luke> The value in a tuple that matches the input that the user provided
04:53:38FromDiscord<Elegantbeef> So the user gave an input you want to get what value from what tuple?
04:53:59FromDiscord<# Luke> Wait I think I got it
04:54:03FromDiscord<Elegantbeef> Fuck i thought clang -\> wasm was going to be less of a abrasive path than emcc
04:54:19FromDiscord<huantian> is it not
04:54:19FromDiscord<Rika> Lol
04:54:44FromDiscord<Elegantbeef> I'm reading you need clang, wasm-libc, and a sysroot
04:55:02FromDiscord<Elegantbeef> I figured the sysroot was installed with wasm-libc but clang doesnt care about me apparently
04:55:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45y9
04:55:42FromDiscord<Elegantbeef> I know that's where my wasm32-wasi headers are, but i guess that doesnt matter?
04:56:28*reversem3[m] uploaded an image: (987KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/WbBTvAIphrheMcqNpbmOpefH/image.png >
04:56:30FromDiscord<Elegantbeef> Hmph
04:56:43FromDiscord<Elegantbeef> Replacing `--sysroot` with `-I` makes it compile
04:56:56FromDiscord<Elegantbeef> Ah that's what you're doing
04:57:03reversem3[m]can.I - How do I get rid of the bulky entry box on the left hand side?
04:57:36FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1000990179366027294/image.png
04:57:37FromDiscord<Elegantbeef> For reference mine emitted
04:57:54reversem3[m] * can.I - How do I get rid of the bulky entry box on the left hand side?
04:58:01*reversem3[m] uploaded an image: (987KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/aGuOVkvEHyKrEQrwJhZCJUKh/image.png >
04:58:48reversem3[m]Beef did you see the difference between the two entry boxes ?
04:58:55FromDiscord<Elegantbeef> Yea i see
04:58:59FromDiscord<Elegantbeef> I dont know why there is a difference
04:59:32FromDiscord<Elegantbeef> Actually it's due to the spacing i'd wager
04:59:34reversem3[m]lol me either , frustrating .. the only thing I can think of its inheriting the label properties
04:59:44FromDiscord<Elegantbeef> Can you not put the left side in it's own box aswell?
05:00:20reversem3[m]left side is in its own box
05:00:34FromDiscord<Elegantbeef> Not in the code on your right
05:00:39FromDiscord<Elegantbeef> You have a box compassing both
05:01:20FromDiscord<Elegantbeef> If you do `Box(orient = OrienetX, margin = 12, spacing = 10): Entry... Label...` it might work
05:01:24reversem3[m]Yeah I know. I tried but I can't after the label = " = "
05:01:29FromDiscord<Elegantbeef> One lining that to save you a click
05:01:47FromDiscord<Elegantbeef> What happens when you do a `Box Label Box`?
05:02:50reversem3[m]hmm Box: Label box
05:03:06FromDiscord<Elegantbeef> Also i do have to ask, how the hell are you talking to us here, it says matrix in your name it looks like you're using matrix to upload images, but you're going through a Matrix -\> Libera -\> Discord -\> Matrix for me 😄
05:04:07*dom96 quit (*.net *.split)
05:04:07*void09 quit (*.net *.split)
05:04:28*void09 joined #nim
05:04:49*dom96 joined #nim
05:05:15*reversem3[m] uploaded an image: (1022KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/FHQaItPwVdZLCxkbfnBlSjCD/image.png >
05:05:31reversem3[m]Through IRC
05:05:35FromDiscord<Elegantbeef> Can you send the code please
05:05:44reversem3[m]No , doesn't change ... sure
05:07:03reversem3[m]https://hatebin.com/lpcnwynjju
05:07:34*arkanoid quit (*.net *.split)
05:07:34*ldlework quit (*.net *.split)
05:07:34*v9fk quit (*.net *.split)
05:07:34*blackbeard420 quit (*.net *.split)
05:07:35*oisota quit (*.net *.split)
05:07:53*blackbeard420 joined #nim
05:08:01reversem3[m]Do you need me to change to straight Matrix ?
05:08:08*arkanoid joined #nim
05:08:15*v9fk joined #nim
05:08:16*oisota joined #nim
05:08:26FromDiscord<reversem3> Hows that
05:08:37FromDiscord<Elegantbeef> I dont need you to but it makes life easier
05:08:44FromDiscord<huantian> are we having a matrix party
05:08:55*hexeme joined #nim
05:09:14FromDiscord<reversem3> I'll post on both IRC and Matrix and make it fun !
05:09:52FromDiscord<reversem3> add discord too /j/k
05:10:44FromDiscord<Elegantbeef> The nice part about using matrix is we can just write the code blocks and you can see them 😄
05:12:47FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1000994001303900250/image.png
05:12:52FromDiscord<Elegantbeef> Was this the issue you were talking about?
05:13:35*ephaptic joined #nim
05:14:25*ephaptic quit (Quit: WeeChat 3.6)
05:16:40FromDiscord<reversem3> ohh , thats what you where talking about , ok very cool... So why does that work then ?
05:18:25FromDiscord<# Luke> does ubuntu ship with tar and gzip?
05:20:34FromDiscord<Elegantbeef> It works cause boxes are basic "Layout the elements inside in this orientation, expanding if they ask"
05:21:32FromDiscord<reversem3> So boxes inside boxes ?
05:21:36FromDiscord<Elegantbeef> When you do `Box(orient = OrientX)` you're saying "Put all elements inline with default spacing and margins" so when you had the one box nested it had the even less space
05:21:51FromDiscord<Elegantbeef> Cause it had spacing/margin which reduced it's internal elements space
05:22:48FromDiscord<reversem3> Damn ok , well thank you I learned a lot
05:23:12FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45yd
05:23:13FromDiscord<reversem3> I wonder how I can do that better then
05:23:17FromDiscord<Elegantbeef> Indistinguishable rather
05:23:58FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1000996813098209350/image.png
05:23:58FromDiscord<Elegantbeef> It emits this
05:24:46FromDiscord<reversem3> That look a lot more cleaner
05:25:13FromDiscord<reversem3> I guess I thought I needed multiple boxes
05:25:31FromDiscord<Elegantbeef> If you want elements inline in a single direction it does not
05:25:46FromDiscord<Elegantbeef> It's when you want thinks shared on a single axis you need them
05:25:55FromDiscord<Elegantbeef> things\
05:27:20FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1000997660985135206/image.png
05:27:25FromDiscord<Elegantbeef> Stuff like this(stole from gnome-terminal)
05:28:01FromDiscord<Elegantbeef> To replicate this you'd do a `Box(orient = OrientY)` then nest `Box(orient = OrientX)` for those sub elements in each row
05:28:44FromDiscord<Elegantbeef> Probably actually use a ListBox or similar but that's a minor technical difference
05:28:47FromDiscord<KepKep> My brain keeps correcting nim to vim
05:29:03FromDiscord<KepKep> I'm googling questions about vim when thinking of nim
05:29:04FromDiscord<KepKep> help
05:29:07FromDiscord<Elegantbeef> Main thing to take away from this is boxes are used to nest orientation or sizing
05:31:57FromDiscord<reversem3> Actually I noticed that the boxes are not the same
05:32:33FromDiscord<Elegantbeef> They are
05:32:45FromDiscord<Elegantbeef> Selected boxes shrink a bit
05:33:13FromDiscord<reversem3> yep your right , my bad I see it now
05:33:21FromDiscord<reversem3> Contacts are drying out
05:34:08FromDiscord<reversem3> Ok now do write the proc for F and C and I'll have a working sample
05:34:18FromDiscord<Elegantbeef> Feel free to steal from my code 😄
05:34:29FromDiscord<Elegantbeef> fuck i love distinct types for units
05:34:57FromDiscord<reversem3> Nah I have my own calculations for temperature
05:35:19FromDiscord<reversem3> I just use a float and parse int
05:35:26FromDiscord<Elegantbeef> That's what i do aswell
05:35:32FromDiscord<Elegantbeef> Indirectly 😛
05:37:23FromDiscord<reversem3> lol
05:37:58FromDiscord<Elegantbeef> I actually do wonder if a parseFloat wrapped in `try` is faster than a `scanf`
05:38:44FromDiscord<Elegantbeef> I'm not going to check, but i do wonder
05:38:50FromDiscord<reversem3> isn't try and scanf way different
05:39:02FromDiscord<Elegantbeef> Yes which is why I wonder which is more performant
05:39:21FromDiscord<reversem3> isn't like comparing apples and oranges though
05:39:38FromDiscord<reversem3> would you want readLine.stdin and scanf ?
05:40:50FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/UbN
05:41:06FromDiscord<Elegantbeef> Both do the "same" thing
05:41:25FromDiscord<Elegantbeef> I guess i should remove the second scanf to be faithful
05:41:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45yf
05:43:05FromDiscord<Elegantbeef> Both do the same operation practically but i wonder which is faster on parse, the try method of course uses exceptions on fail so will almost certainly be slower
05:43:49FromDiscord<reversem3> I would think try would be slower
05:44:13FromDiscord<Elegantbeef> As would i but by how much is the think that interests me 😄
05:44:17FromDiscord<Elegantbeef> Not enough to actually benchmark it
05:46:23FromDiscord<reversem3> Can't be by much I would think , milliseconds
05:46:40FromDiscord<Elegantbeef> Milliseconds?!
05:46:49FromDiscord<Elegantbeef> We're in two different ballparks 😄
05:47:00FromDiscord<KepKep> bunch of bots in here smh
05:47:05FromDiscord<Rika> No you
05:47:07FromDiscord<reversem3> you think faster ?
05:47:10FromDiscord<Elegantbeef> We're on matrix and you should be too
05:47:13FromDiscord<Rika> How do you know you’re not a bot hmmm
05:47:26FromDiscord<Elegantbeef> Certainly in a few ns rev
05:47:36FromDiscord<KepKep> I'm too mentally challanged to be one
05:47:41FromDiscord<huantian> I think you all are bots and I am hte only human
05:47:56FromDiscord<Elegantbeef> huan "hte human" tian
05:47:57FromDiscord<huantian> or maybe I'm neither bot nor human
05:48:21FromDiscord<huantian> I'm glad my typo is forever engraned in my new nickname
05:48:25FromDiscord<reversem3> alright folks my done for the night .. thanks again for the help
05:48:31FromDiscord<Elegantbeef> Buh bye
05:48:39FromDiscord<Rika> "engraned"
05:48:58FromDiscord<Elegantbeef> huan is worse at the spellings than I
05:49:09FromDiscord<huantian> I mean you can read it so it's fineeeee
05:49:13FromDiscord<Rika> How many granes of sand are there in a beach
05:49:24FromDiscord<Elegantbeef> Not when rika is here
05:49:29FromDiscord<Rika> Haha
05:49:33FromDiscord<Rika> The pedant
05:49:45FromDiscord<huantian> don't you mean pendant
05:49:49FromDiscord<Rika> What
05:49:54FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=45yg
05:50:01FromDiscord<Elegantbeef> There we go
05:50:03FromDiscord<Rika> Now I can’t tell if you’re joking or not
05:50:10FromDiscord<Elegantbeef> With what compile flags though
05:50:13FromDiscord<huantian> you might wanna test error times too
05:50:24FromDiscord<amadan> just -d:release
05:50:28FromDiscord<huantian> with maybe 1 or 2 different error cases
05:50:35FromDiscord<KepKep> the more I'm reading about nim the more I'm confused why isn't this more popular , if I'm correctly understanding it's a systems programming language that by default compiles down to c but can compile down to many other languages, the syntax looks clean and human readable so I'd assume that developing and iterating trhough versions in it would be fast and it's garbage collected so you don't really have to worry about memory unless you want
05:51:01FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=45yh
05:51:20FromDiscord<Elegantbeef> Big programming keeps it down
05:51:32FromDiscord<Elegantbeef> That's what i figured
05:51:41FromDiscord<reversem3> Not much of a difference
05:51:53FromDiscord<KepKep> big programming? what does that mean
05:51:57FromDiscord<KepKep> like big projects?
05:52:40FromDiscord<Elegantbeef> "not much" meanwhile 10 times slower
05:52:42FromDiscord<Elegantbeef> That's at runtime
05:52:43FromDiscord<reversem3> Yeah but would you even noticed that , maybe during compile time but not runtime right
05:52:43FromDiscord<Elegantbeef> Pass `-d:lto` for me if you dont mind
05:52:43FromDiscord<reversem3> oh
05:52:59FromDiscord<Elegantbeef> One is 10 times slower on failure than the other, so if you have millions of things you're parsing one is clearly better
05:53:02FromDiscord<Elegantbeef> It was a joke kep
05:53:07FromDiscord<Elegantbeef> You know like "Big pharma"
05:53:14FromDiscord<KepKep> oh
05:53:36FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=45yi
05:54:02FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=45yj
05:54:11FromDiscord<huantian> hm I bet it'll vary depending on the kind of erring string too
05:54:12FromDiscord<KepKep> dunno this language on paper sounds really insane if I'm understanding it right but I wouldhave probably never found it if youtube didn't randomly recomend me a video while I was looking at C tutorials
05:54:14FromDiscord<Elegantbeef> change to arc/orc to see that go away
05:54:24FromDiscord<amadan> (edit) "https://play.nim-lang.org/#ix=45yi" => "https://play.nim-lang.org/#ix=45yk"
05:54:39FromDiscord<huantian> I think the main issue is that it's still small, and the language still feels a tad scuffed 😛↵(@KepKep)
05:55:27FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=45yl
05:55:37FromDiscord<Elegantbeef> lol
05:55:39FromDiscord<KepKep> well I'm like really bad at programming so everything feels scuffed to me
05:55:57FromDiscord<KepKep> but then again I do this as a hobby for fun
05:56:08FromDiscord<KepKep> so I have nothing to lose while messing around with everything
05:56:11NimEventerNew question by nonimportant: Why does my Heroku application always return a 403 error?, see https://stackoverflow.com/questions/73104565/why-does-my-heroku-application-always-return-a-403-error
05:56:32FromDiscord<Elegantbeef> I think it forces C++ to use goto exceptions and i guess C++ doesnt like them
05:58:08FromDiscord<Yardanico> In reply to @Elegantbeef "I think it forces": i don't think so
05:58:26FromDiscord<huantian> I wouldn't think cpp would not like goto exceptions that much
05:58:36FromDiscord<Elegantbeef> Yea i dont know
05:58:44FromDiscord<Elegantbeef> I'm an idiot anyone that listens to me is dumber than i
05:59:10FromDiscord<Elegantbeef> Speaking of, that code review github repo still sounds nice
05:59:41FromDiscord<Elegantbeef> Make an issue a with code you want reviewed and someone might review it and say "Damn this is bad" 😄
05:59:46FromDiscord<flywind> arc(cpp) uses cpp exception by default.
05:59:47FromDiscord<Yardanico> yes
05:59:52FromDiscord<Yardanico> i just checked to be sure
06:00:15FromDiscord<Elegantbeef> Are C++ exceptions that much worse than C exceptions
06:00:26FromDiscord<Elegantbeef> Well Nim's C exceptions
06:00:44FromDiscord<flywind> It is probably better than Nim's exception.
06:01:01FromDiscord<Elegantbeef> The above code showed it 100times slower roughly
06:01:13FromDiscord<Yardanico> not necessarily, goto exceptions should be roughly on par
06:02:01FromDiscord<Elegantbeef> Ah sorry misread 20 times slower
06:02:29FromDiscord<Elegantbeef> I gues it could just be the C++ compiler not liking the generated C++
06:02:33FromDiscord<huantian> speaking out of my something random, but I think Nim has great design, but the implementation is still a tad lacking on the polish side in some areas↵(@KepKep)
06:03:07FromDiscord<huantian> though ig that's less of "why nim no popular" and more of "why nim not perfect"?
06:03:12FromDiscord<KepKep> what did the polish do again smh
06:03:27FromDiscord<KepKep> again dunno
06:03:37FromDiscord<KepKep> I'm like a noob in programming
06:03:38FromDiscord<flywind> In reply to @Elegantbeef "Ah sorry misread 20": Cannot reproduce on windows
06:03:56FromDiscord<KepKep> I'm trying to find a comfortable simple but fast language
06:04:04FromDiscord<flywind> sent a code paste, see https://paste.rs/a6B
06:04:12FromDiscord<Elegantbeef> Is this another case of "Dont trust others"
06:04:13FromDiscord<flywind> `-d:lto -d:release -b:cpp --mm:arc `
06:05:20FromDiscord<Elegantbeef> Nope gcc doesnt like the C++ code
06:05:38FromDiscord<Elegantbeef> and clang cant even compile it
06:05:45FromDiscord<KepKep> can someone give me a comparison of c vs nim cause I'm not really sure what's better to learn, I kinda wanna dabble in gamedev but because C isn't oop I've heard that can make it difficult and c++ is basically hell so I'm staying the hell away from it
06:06:02FromDiscord<KepKep> well not just gamedev
06:06:08FromDiscord<KepKep> I kinda just like to dabble in a bit of everything
06:06:21FromDiscord<Elegantbeef> Nim and C are very similar in how to program, they're both procedural without cyclical dependencies so games can get a bit weird
06:06:26FromDiscord<Elegantbeef> Nim has OOP though if you want that
06:06:54FromDiscord<Yardanico> In reply to @KepKep "can someone give me": if you just want to _make_ a game, using game engines (and whatever languages they're built around) is probably a better choice
06:06:55FromDiscord<flywind> In reply to @KepKep "can someone give me": https://github.com/nim-lang/Nim/wiki/Nim-for-C-programmers
06:07:03FromDiscord<Elegantbeef> Yea also with clang it gets shitty exceptions
06:07:06FromDiscord<Yardanico> but if you want to program a game specifically, then yeah, choose the language you prefer the most
06:07:07FromDiscord<KepKep> from what I understood C is actually memorizable as in it has like 100 reserved phrases or something like that
06:07:10FromDiscord<Elegantbeef> So something with linux and C++ exceptions such?
06:07:20FromDiscord<Elegantbeef> suck rather
06:07:34FromDiscord<KepKep> In reply to @flywind "https://github.com/nim-lang/Nim/wiki/Nim-for-C-prog": I have no clue what half of that means :MokoThumbsUp:
06:08:07FromDiscord<Elegantbeef> Nim can be used just as C and you can make games with it, the issues might be in cyclical dependencies but it's managable
06:08:27FromDiscord<KepKep> In reply to @Yardanico "if you just want": nono not just games, I'm just someone who learns stuff for fun, I've learned about a lot of stuff from webdev to rust but I
06:08:30FromDiscord<Elegantbeef> You might have a game with a weird design due to that issue, but it's "soon" to be resolved
06:08:37FromDiscord<KepKep> (edit) "I" => "I'm trying to find something "comfortable""
06:09:21FromDiscord<KepKep> something comfortable and that's pretty low level so I can try out everything from graphics api's to game frameworks to building gui apps etc
06:09:39FromDiscord<Elegantbeef> That describes Nim
06:09:49FromDiscord<KepKep> basically I wanna spend less time learning the language and more time actually making stuff
06:09:52FromDiscord<Elegantbeef> The worst case is you use it learn things then dislike it
06:10:12FromDiscord<KepKep> Rust has so many strings attatched to the base version of it that it's making my head implode
06:10:30FromDiscord<KepKep> Javascrip mainly for web
06:10:38FromDiscord<Yardanico> In reply to @KepKep "Javascrip mainly for web": hahaha
06:10:41FromDiscord<KepKep> Python slow-ish unless you giga optimize it
06:10:42FromDiscord<Yardanico> good joke
06:10:53FromDiscord<Yardanico> tell that to people who make everything in JS :)
06:10:58FromDiscord<Elegantbeef> No speaking, do not remind me↵(@Yardanico)
06:11:08FromDiscord<Yardanico> and tell that to discord which you're using to talk right now
06:11:18FromDiscord<Elegantbeef> I already heard someone jokingly say "embedded.js" today which made me rush to check that it didnt exist
06:11:20FromDiscord<Yardanico> (it's made with electron which is basically Chromium, so it's programmed with JS)
06:11:33FromDiscord<Rika> i mean technically discord is "web"
06:11:36FromDiscord<KepKep> yeah discord the consumer of ram
06:11:44FromDiscord<Yardanico> In reply to @Rika "i mean technically discord": yes, but I mean that you can use electron to make games
06:12:13FromDiscord<Yardanico> even treeform's previous steam game is made with electron :)
06:12:18FromDiscord<KepKep> as far as I understand you can use any language for anything you want but I want something small fast and that my pepega brain can understand
06:12:30FromDiscord<KepKep> and Nim seems to be just that
06:12:30FromDiscord<Elegantbeef> You can also put your fingers in a paper shredder
06:12:32FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=45yp
06:12:35FromDiscord<Yardanico> In reply to @KepKep "as far as I": it's also a matter of how many libraries are available
06:12:50FromDiscord<Yardanico> unless you're okay with building everything from scratch you also need to judge by that
06:12:52FromDiscord<Elegantbeef> Lol my xeon1231v3 is not liking it↵(@xflywind)
06:13:17FromDiscord<KepKep> In reply to @Yardanico "unless you're okay with": I like to know how things work but I'm way too horible at maths to build anything overly complex
06:13:34FromDiscord<Yardanico> maths are rarely related to "building things from scratch"
06:13:35FromDiscord<Elegantbeef> Just use godot 😄
06:13:47FromDiscord<Elegantbeef> Hey it's required for a 3D engine from scratch
06:14:07FromDiscord<Yardanico> In reply to @Elegantbeef "*Just use godot* 😄": waiting for godot 4, since using godot 3 is kinda pointless right now, and godot 4 is still in beta :)
06:14:14FromDiscord<Elegantbeef> Yea
06:14:16FromDiscord<Yardanico> so it has no tutorials/docs are not fully accurate/etc
06:14:23FromDiscord<Yardanico> i mean not using, but starting a new project in godot
06:14:32FromDiscord<KepKep> like I said not just games I want a language that can kinda do most if not everything that's why I started looking towards C that's small compact and can do basically everything
06:14:37FromDiscord<KepKep> and also it's zoomy fast
06:14:54FromDiscord<Elegantbeef> Well i'd like godot 4 to make me happy with the play button capable of recompiling native code
06:15:06FromDiscord<Elegantbeef> That'd be a killer feature that'd make it way less annoying
06:15:29FromDiscord<flywind> Nim can do script programming with the same syntax while C needs lua.
06:16:17FromDiscord<KepKep> basically #Let'sMakeNimTheNewPython
06:16:25FromDiscord<Elegantbeef> Ley's not
06:16:26FromDiscord<Elegantbeef> Let's not\
06:16:33FromDiscord<KepKep> I meant like
06:16:38FromDiscord<KepKep> popularity wise
06:16:42FromDiscord<Yardanico> In reply to @KepKep "basically #Let'sMakeNimTheNewPython": i mean, just go ahead and try Nim, you already have it installed
06:16:48FromDiscord<Yardanico> see if you like it in the end or not
06:16:51FromDiscord<KepKep> I am trying it
06:16:55FromDiscord<KepKep> seems heckin cool
06:17:06FromDiscord<KepKep> head empty tho
06:17:16FromDiscord<KepKep> I havent slept basically whole 24hrs
06:17:29FromDiscord<Elegantbeef> Do you want to use gdscript or nim with godot4 yardanico?
06:17:30FromDiscord<KepKep> but I'm too hyper thinking about nim
06:17:55FromDiscord<Yardanico> In reply to @Elegantbeef "Do you want to": well of course Nim if possible, godot seems too scripty
06:18:15FromDiscord<Elegantbeef> Ah have fun with the new extensions then
06:18:30FromDiscord<Yardanico> I just want to create some game idea and make it into a proper game, kinda like one of my "long-term goals"
06:18:55FromDiscord<Yardanico> not just ping-pong, but something more complex of course
06:19:00FromDiscord<KepKep> make the next wow killer :kappa:
06:19:12FromDiscord<Yardanico> I don't play MOBAs
06:19:14FromDiscord<Elegantbeef> Yea i have a dumb idea of making a open source networked pool game 😄
06:19:24FromDiscord<Elegantbeef> "Pool with friends" if you wiill
06:19:44FromDiscord<Yardanico> I mean wow is not MOBA, but I don't really like WoW-style RPGs either
06:19:47FromDiscord<Generic> have fun with floating point numbers and networking
06:19:55FromDiscord<Elegantbeef> I'm not an idiot↵(@Generic)
06:20:12FromDiscord<Elegantbeef> Server runs simulation
06:20:18FromDiscord<Generic> I know, but you don't have to be an idiot for this to get messy
06:20:27FromDiscord<KepKep> I'm a massive roguelike, roguelite fan especially with co-op
06:20:36FromDiscord<Yardanico> and yeah, I'm not even sure if I'll use Godot for my "game" or not
06:20:43FromDiscord<Generic> it's just messy either way, the players have to position their sticks(?)
06:21:08FromDiscord<Elegantbeef> Cues
06:21:10FromDiscord<Yardanico> I actually have a bit of experience with Unity and I've done some reverse-engineering of Unity games too (shh, just for academic purposes)
06:21:22FromDiscord<Elegantbeef> "reverse engineering" you mean ilspy
06:21:26FromDiscord<Yardanico> dnSpy but yes :P
06:22:04FromDiscord<Yardanico> even nowadays a lot of unity devs are too lazy to add proper multiplayer to a game so they use photon which in its most popular default mode doesn't have a master server, so you can easily cheat
06:22:19FromDiscord<Yardanico> just change something on your client, and it actually affects the multiplayer
06:22:26FromDiscord<KepKep> cheating in co-op games is whatever
06:22:30FromDiscord<Elegantbeef> I'd be a casual pool game, so really it's just on player go sync balls, player then can hit the cue ball
06:22:37FromDiscord<KepKep> I love balls
06:22:43FromDiscord<Yardanico> disruptek does too
06:22:54FromDiscord<Yardanico> @KepKep deleting your messages is pointless
06:23:01FromDiscord<KepKep> you saw nothing
06:23:01FromDiscord<Yardanico> they're bridged to matrix and IRC, and IRC specifically has no way of deleting messages
06:23:06FromDiscord<KepKep> I wrote it on autopilot
06:23:08FromDiscord<Rika> ive always wondered why FP isnt deterministic
06:23:11FromDiscord<Yardanico> so your message is there for everyone to see
06:23:23FromDiscord<Yardanico> https://irclogs.nim-lang.org/25-07-2022.html#06:22:37
06:23:27FromDiscord<Generic> In reply to @Rika "ive always wondered why": it is deterministic for the most part
06:23:47FromDiscord<Elegantbeef> The physics engine isnt generally
06:23:59FromDiscord<Yardanico> i mean you can always just do it the proper "remote input" way
06:24:05FromDiscord<Yardanico> only run physics on the server, but that's complicated, yes
06:24:18FromDiscord<Yardanico> or let clients run physics just for visual purposes, but sync with the server
06:24:22FromDiscord<Yardanico> for actual results
06:24:31FromDiscord<Yardanico> but I'm not an expert on that matter
06:24:36FromDiscord<KepKep> if I had the skills and the patience I'd make a magic based arena but I have nether and networking is scary, everyone always tells me it's a nightmare and even triple A companies fail it often times so uhhh yeah I'll just leave it as a dream
06:24:50FromDiscord<Rika> networking is hard
06:24:58FromDiscord<Yardanico> I mean with the Photon thing I mentioned it's not "hard", but it has its trade-offs
06:24:59FromDiscord<Rika> well, hard for most people ig
06:25:08FromDiscord<huantian> I’ve actually considered making a magic engine
06:25:14FromDiscord<huantian> But I have no idea how to even do that
06:25:22FromDiscord<huantian> Like mtg is so complex
06:25:30FromDiscord<KepKep> yeah for a pvp arena game people being able to just cheat client side would be a nono
06:25:48FromDiscord<huantian> And there are so many mtg cards
06:26:28FromDiscord<KepKep> I have a massive dream idea in my head ever since I saw a video about a game phantom dust but it would be a massive undertaking
06:26:42FromDiscord<KepKep> maybe if I actually stick to a single language and refine my skills I'll make it
06:26:49FromDiscord<KepKep> but for now I can't even begin to imagine it
06:26:53FromDiscord<Yardanico> yes everyone has big ideas about games, me included
06:27:00FromDiscord<huantian> Beef do you wanna help me program the like 50k magic cards out there
06:27:06FromDiscord<Yardanico> but even small indie games take years to make and polish
06:27:34FromDiscord<KepKep> I'll just beg you in dm's to make it for me :RatirlBusiness:
06:28:29FromDiscord<Yardanico> block button is always easy to click
06:28:45FromDiscord<# Luke> can someone help me with gh actions?
06:28:46FromDiscord<KepKep> https://tenor.com/view/dog-smile-puppy-love-eyes-gif-24151147
06:28:50FromDiscord<KepKep> please make it for me
06:29:05FromDiscord<Rika> blodk
06:29:06FromDiscord<Rika> (edit) "blodk" => "blokd"
06:29:19FromDiscord<KepKep> waaaah
06:29:27FromDiscord<# Luke> lol anyone a pro with github actions
06:29:33FromDiscord<KepKep> okay well thanks for the warm welcome , I'll do my like 10th attempt to sleep now
06:29:43FromDiscord<# Luke> In reply to @ripluke "lol anyone a pro": i need some help
06:29:49FromDiscord<Yardanico> In reply to @ripluke "lol anyone a pro": it'll be better if you ask the question straight away
06:30:08FromDiscord<Yardanico> https://dontasktoask.com/
06:30:10FromDiscord<Yardanico> classic
06:31:59FromDiscord<# Luke> ok so basicall i have this much of my action, i want it to create a github release, and upload all of the files, right now it just builds and uploads the files↵heres the yml: https://github.com/Infinitybeond1/dye/blob/master/.github/workflows/build.yml
06:32:10FromDiscord<# Luke> (edit) "basicall" => "basically"
06:41:02FromDiscord<fbpyr> had not known that link. 🙂 ↵one additional thing it misses imho\: there potentially might be even folks in the chat room able to answer the the question, who do not think of themselves as experts..
06:54:56FromDiscord<# Luke> YES!!!! I finally got it working
07:19:00FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=45yT
07:19:08FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=45yT" => "https://paste.rs/U8t"
07:19:25FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=45yV" => "https://play.nim-lang.org/#ix=45yU"
07:20:21FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=45yU" => "https://play.nim-lang.org/#ix=45yW"
07:55:53FromDiscord<t8m8> I have updated nim's currying library, which has not been updated for a while. It should now be available in nim 1.6.x You can try it if you want! https://github.com/t8m8/currying
08:15:39FromDiscord<Require Support> have an object that has a timestamp field using epoch time as float ex : `timestamp : 1578706611.324671` Whats the best way to sort a `seq[myobject]` based on that timestamp
08:15:53FromDiscord<Require Support> (edit) "1578706611.324671`" => "1518306611.324341`"
08:31:29FromDiscord<vestel> In reply to @Require Support "have an object that": import std/algorithm↵↵list.sort()
08:59:12FromDiscord<vindaar> not quite. If it's an object with such a field, you'd best use the `sortedByIt` template as `s.sortedByIt(it.timestampField)` https://nim-lang.github.io/Nim/algorithm.html#sortedByIt.t%2Cuntyped%2Cuntyped
09:06:34*estiquelapice joined #nim
09:07:09FromDiscord<PyryTheBurger> what is the difference between an object and a tuple
09:07:31FromDiscord<Elegantbeef> Internally nothing
09:07:49FromDiscord<Elegantbeef> Tuples are structurally typed which means all of them with types in the same order are equivlent
09:08:30FromDiscord<PyryTheBurger> arte they like structs in c++
09:08:52FromDiscord<Elegantbeef> Both are yes
09:11:45FromDiscord<Elegantbeef> Though objects are typed properly in Nim
09:14:02FromDiscord<PyryTheBurger> what is the difference between proc and method
09:14:21FromDiscord<Elegantbeef> Methods are dynamically dispatched and procs are statically
09:14:35FromDiscord<PyryTheBurger> aand what that means
09:15:03FromDiscord<Elegantbeef> Methods use runtime type information to dispatch calls to the procedure, procedures are just called directly
09:15:40FromDiscord<Phil> So basically you don't know exactly what function will be called when you use a method at compile-time, you'll only know at runtime?
09:16:05FromDiscord<Elegantbeef> Correct
09:16:21FromDiscord<PyryTheBurger> so is proc better
09:16:25FromDiscord<Phil> That's slower than static dispatch right? I'd assume the latter has more compile-time information and thus is better to optimize
09:17:06FromDiscord<Elegantbeef> Static is faster as there is no checking or indirection
09:17:09FromDiscord<Elegantbeef> It can also be inlined
09:21:52FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=45ze
09:22:24FromDiscord<Phil> Is that how structs in C++ work?
09:22:31FromDiscord<PyryTheBurger> oh
09:22:36FromDiscord<PyryTheBurger> no
09:22:52FromDiscord<PyryTheBurger> okay io think objects are better
09:23:37FromDiscord<Phil> I have personally no idea when the tuple usecase comes into play, but I guess I might just be writing code in the wrong area for me to stumble over the usecase
09:25:00FromDiscord<Phil> I guess they're really nice for more mathematical code?
09:26:21FromDiscord<Phil> In reply to @PyryTheBurger "so is proc better": You may want to contemplate using func as often as possible btw
09:26:35FromDiscord<PyryTheBurger> what is func
09:26:49FromDiscord<Phil> func is the same as proc, but it guarantees you that in this proc there are no side-effects happening
09:26:54FromDiscord<Elegantbeef> Tuples are useful for multiple return values and anything that needs to be easily written
09:27:02FromDiscord<Phil> So basically proc on steroids
09:27:18FromDiscord<PyryTheBurger> what are side effects
09:27:54FromDiscord<Phil> Think in math terms. There a function takes an input and transforms value x into value y
09:28:04FromDiscord<Phil> It's a pure function.
09:28:38FromDiscord<Phil> The only thing that happens on a function happens without manipulating its inputs or affecting anything outside the function. It's fully self-enclosed
09:29:22FromDiscord<PyryTheBurger> i need to change values inside functions tho
09:29:35FromDiscord<Phil> A side-effect is something that violates that.↵E.g. if you access a global variable, as you didn't input the global variable into the function.↵Or "echo "blub"" is a side-effect, it causes an effect that is something else than transforming a value
09:29:55FromDiscord<Elegantbeef> Parameters can be marked `var` and they do not count as sideffect
09:30:07FromDiscord<PyryTheBurger> yeah
09:31:04FromDiscord<Phil> In general, func is just the guarantee "I don't do stuff you don't expect, all I access is stuff I'm given directly"
09:31:32FromDiscord<Phil> At least as far as I'm aware, the above may be incomplete
09:32:40FromDiscord<Phil> I'm still trying to ingrain the habit into myself to use func when possible... not very successful so far
09:37:13FromDiscord<Elegantbeef> Luckily Nim does side effect analysis so protects you for pointer procs and the like
09:54:36*CyberTailor quit (Excess Flood)
09:56:35*CyberTailor joined #nim
10:13:53FromDiscord<exelotl> hey, can anyone see what's wrong with this code? https://git.sr.ht/~exelotl/natu/tree/uint64-vectors/item/natu/math.nim#L232-250
10:14:24FromDiscord<exelotl> I'm trying to pack 2 ints (which are 32-bits on my platform) into a single uint64
10:14:56FromDiscord<exelotl> as this allows it to be passed and returned more efficiently
10:16:16FromDiscord<exelotl> but the behaviour is funky. When I drop this into my game all the coordinates come out wrong.
10:17:22FromDiscord<Generic> maybe just misoptimisation due to the violation of strict aliasing?
10:17:34FromDiscord<Generic> does it work in debug builds?
10:19:51FromDiscord<Generic> also I'm currently thinking about an incredibly evil hack
10:20:20FromDiscord<Generic> so openArray in Nim will always be passed as a pointer and an int
10:20:40FromDiscord<exelotl> oh god xD
10:21:17FromDiscord<Generic> I think it's possible, the question is whether it's worth anybody's sanity
10:21:51FromDiscord<Generic> though it would be cool just in general to have some way for any type to be passed unpacked in parameters
10:23:50FromDiscord<Generic> ah though the openArray thing wouldn't work with var parameters
10:34:30FromDiscord<Yardanico> In reply to @Generic "maybe just misoptimisation due": yeah I think it's that
10:34:36FromDiscord<Yardanico> @exelotl try to use `copyMem` instead
10:35:02FromDiscord<Yardanico> zippy had a weird problem with LTO that got fixed by changing from similar casting to proper `copyMem`, probably due to strict aliasing rules
10:36:22FromDiscord<Yardanico> also is there any reason you can't just use a `packed` object/tuple instead?
10:36:46FromDiscord<Yardanico> or even not `packed`, probably the alignment will be fine anyway so it'll only take 8 bytes
10:57:10FromDiscord<exelotl> unfortunately it's not about alignment, rather the ARM procedure calling convention says that when you have a composite type (struct/array/union) larger than 4 bytes as a return value, it _must_ be returned as a pointer rather than being returned across multiple registers https://media.discordapp.net/attachments/371759389889003532/1001080664021545011/unknown.png
11:02:07FromDiscord<exelotl> using GCC's vector extensions like in https://github.com/numforge/laser/blob/master/benchmarks/vector_math/vector_extension.nim could solve this, but unfortunately Nim likes to call nimZeroMem on the vectors, which doesn't work because GCC forbids you from taking a pointer to a vector.
11:03:05*jmdaemon quit (Ping timeout: 255 seconds)
11:04:11FromDiscord<Generic> even with noinit?
11:04:32FromDiscord<Generic> ah it's not possible to do noinit per type
11:04:49FromDiscord<exelotl> yeah, I'd have to put noinit on every single function that returns a vector
11:05:03FromDiscord<Generic> what about making the type completely opaque to Nim?
11:05:39FromDiscord<exelotl> then I can't put it in a const or use it at compile-time
11:06:44FromDiscord<Generic> but otherwise it would be possible to use the gcc vector type at compile time?
11:08:08FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=45zv
11:10:57FromDiscord<Generic> https://godbolt.org/z/n5Pboshzx
11:11:00FromDiscord<Generic> this seems to work
11:14:05FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=45zx
11:14:51FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=45zy
11:15:13FromDiscord<Generic> ah yeah
11:15:27FromDiscord<Generic> the problem is the array[2, int]
11:16:44FromDiscord<Generic> it assumes that is an array which would be already a pointer
11:17:02FromDiscord<exelotl> ahhhh
11:17:02FromDiscord<Generic> I think changing the definition to
11:17:11FromDiscord<Generic> sent a code paste, see https://play.nim-lang.org/#ix=45zz
11:17:28FromDiscord<Generic> and then adding appropriate `[]` operators for compiletime and runtime could work
11:49:48FromDiscord<blashyrk> Is it possible to call another macro or proc that returns a NimNode and inject it within the body of a genAst/quote do block?
12:12:47*CyberTailor quit (Remote host closed the connection)
12:13:47*CyberTailor joined #nim
13:09:56*CyberTailor quit (Ping timeout: 268 seconds)
13:11:45FromDiscord<deech> Is there a more "functional" way of working with tables? Currently I have to do a lot of `if myTable.hasKey(k): myTable[k] ... else: `. It would be convenient if table access returned an `Option` so I can do `myTable[k].map(...)`. Thoughts?
13:13:14FromDiscord<Prestige> https://github.com/nim-lang/Nim/issues/18250 related @deech
13:16:37FromDiscord<deech> Not saying Nim needs to be a functional language, but some pattern matching and functional combinators sure would make things easier from time to time. 🙂
13:26:23*arkurious joined #nim
13:28:35*pch quit (Quit: Leaving)
13:58:46*krux02 joined #nim
14:43:17NimEventerNew post on r/nim by polite-pagan: Nim -- Error: internal error: getTypeDescAux(tyVoid), see https://reddit.com/r/nim/comments/w7qouc/nim_error_internal_error_gettypedescauxtyvoid/
14:44:03FromDiscord<Clonkk> I don't know how up to date it is, but there is https://github.com/nim-lang/fusion/blob/master/src/fusion/matching.nim↵(@deech)
14:57:54FromDiscord<deech> I've used it. It's nice.
15:13:28FromDiscord<Phil> Give me result types that can deal with n exceptions
15:14:38FromDiscord<Rika> how would that work actually
15:15:00FromDiscord<Rika> if an exception is raised then no others would be raised no?
15:15:34FromDiscord<Phil> I have no idea, I just want to be forced to deal with all exceptions my code can raise without having to trigger that behaviour by writing pragmas
15:16:27FromDiscord<Phil> Like rust result pattern matching or java with its "throws" declaration on functions... Though I'd prefer to not need the "throws", bit
15:17:15FromDiscord<Phil> In reply to @Rika "if an exception is": I guess it would be correcter to say deal with exceptions of n types
15:17:18FromDiscord<Rika> i dont know whats so wrong about the pragma
15:17:36FromDiscord<Phil> Nothing, I'm just lazy
15:17:56FromDiscord<Rika> then thats your problem
15:41:24FromDiscord<Tanguy> `{.push raises: [].}`
16:11:06FromDiscord<reversem3> image.png https://media.discordapp.net/attachments/371759389889003532/1001159667470311524/image.png
16:11:10FromDiscord<reversem3> Wow how cool is this , css just works for owlkettle
16:13:48FromDiscord<reversem3> image.png https://media.discordapp.net/attachments/371759389889003532/1001160350965702818/image.png
16:19:54FromDiscord<reversem3> @can.l\: Is there a "tooltip" macro or function ? sort of like alt for HTML?
16:22:23*Schnouki quit (Remote host closed the connection)
16:22:24*spff quit (Remote host closed the connection)
16:22:24*toothlessgear quit (Write error: Connection reset by peer)
16:22:25*mronetwo quit (Remote host closed the connection)
16:22:25*noeontheend quit (Write error: Connection reset by peer)
16:26:50*mronetwo joined #nim
16:26:52*Schnouki joined #nim
16:27:01*toothlessgear joined #nim
16:27:06*spff joined #nim
16:27:29*noeontheend joined #nim
16:28:19FromDiscord<reversem3> @can.I https://docs.gtk.org/gtk4/class.Tooltip.html
16:31:00FromDiscord<jmgomez> In reply to @blashyrk "Is it possible to": I dont think you can but what's wrong with passing it as a parameter with genAst? I do that all the time i.e. https://github.com/jmgomez/NimForUE/blob/5615292708226dfc6036654b8a0b2141c2be5d18/src/nimforue/typegen/ueemit.nim#L330
16:34:27*mronetwo quit (Remote host closed the connection)
16:34:27*spff quit (Remote host closed the connection)
16:34:27*toothlessgear quit (Remote host closed the connection)
16:34:27*Schnouki quit (Remote host closed the connection)
16:34:27*noeontheend quit (Remote host closed the connection)
16:36:18*Schnouki joined #nim
16:36:19*mronetwo joined #nim
16:36:21*Schnouki quit (Changing host)
16:36:21*Schnouki joined #nim
16:36:39*toothlessgear joined #nim
16:37:24*noeontheend joined #nim
16:37:26*spff joined #nim
16:37:57FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Ax
16:38:21FromDiscord<Rika> Mac is not a byte
16:38:33FromDiscord<ghoom> but i thought `&` concats sequences and strings
16:38:46FromDiscord<Rika> Mac isn’t a sequence though
16:39:01FromDiscord<ghoom> i can't convert it to one
16:39:08FromDiscord<Rika> Then you’re doing something wrong
16:39:19FromDiscord<Rika> Refer to the documentation of whatever you’re using
16:39:19FromDiscord<ghoom> using `cast[seq[byte]](mac)`
16:39:34FromDiscord<ghoom> monocypher literally has no nim documentation
16:39:49FromDiscord<ghoom> no type defintions
16:39:52FromDiscord<ghoom> (edit) "defintions" => "definitions"
16:40:06FromDiscord<ghoom> nvm i can just look at the code
16:40:14FromDiscord<ghoom> mac is an array
16:40:25FromDiscord<ghoom> how do i convert an array to a seq?
16:40:30FromDiscord<Phil> erm... iterate over it and add individually?
16:40:45FromDiscord<Phil> ah, convert not concat
16:40:46FromDiscord<Phil> hm
16:41:04FromDiscord<Phil> your answer is likely in sequtils or nonexistant
16:42:02FromDiscord<ghoom> found it
16:42:04FromDiscord<ghoom> `toSeq`
16:42:47FromDiscord<ghoom> 🐸👍
16:43:53FromDiscord<ghoom> also
16:43:56FromDiscord<ghoom> weird thing
16:44:18FromDiscord<ghoom> `toseq(mac) & cipherText` puts `cipherText` before not after
16:44:23FromDiscord<ghoom> (edit) "`toseq(mac)" => "`toSeq(mac)"
16:44:34FromDiscord<ghoom> (edit) "`cipherText`" => "`cipherText`'s items"
16:45:12FromDiscord<Phil> I dunno why but I'll never get used to the fact "&" can be used to concat seqs instead of, yknow, the concat method
16:46:23FromDiscord<ghoom> nvm
16:46:25FromDiscord<ghoom> im just dumb
16:46:31FromDiscord<ghoom> i expected the mac to be shorter
16:46:38FromDiscord<ghoom> so my brain got confused for a sec
16:46:48FromDiscord<ghoom> 👌🐸
16:47:33FromDiscord<ghoom> In reply to @Isofruit "I dunno why but": wym? you can use concat too
16:49:24FromDiscord<Phil> I was more off-handedly mentioning that in general, having seq-concat functionality on the `&` symbol remains weird for me to look at
16:49:35FromDiscord<ghoom> ah
16:49:55FromDiscord<ghoom> i mean seqs are like strings so why not?
16:50:05FromDiscord<ghoom> for me, it's trivial
16:50:30FromDiscord<ghoom> maybe cuz im used to js
16:52:17FromDiscord<Rika> Just think of it like + in other languages
16:58:27FromDiscord<ghoom> ye
16:58:50FromDiscord<ghoom> oh you mean why they haven't used `+` instead?
16:58:52FromDiscord<treeform> In reply to @Yardanico "even treeform's previous steam": And I don't really recommend it anymore. But yes it works.
16:59:40FromDiscord<Phil> In reply to @ghoom "oh you mean why": not quite, I'm just not used to short-hand symbols for these operations I guess.↵I prefer concat proc for seqs, I'll use strformat any day for string concatenation over "&" etc.
17:00:26FromDiscord<ghoom> yo @treeform thanks for flatty 🐸👍
17:01:04FromDiscord<ghoom> In reply to @Isofruit "not quite, I'm just": are you a heavy c programmer?
17:02:43FromDiscord<Phil> In reply to @ghoom "are you a heavy": Nope. I am short-hand traumatized from scientific programming. As in, people that never wrote variable names beyond 3 letters and couldn't write readable code if their live's depended on it
17:02:56FromDiscord<ghoom> lol
17:08:05FromDiscord<treeform> In reply to @ghoom "yo <@107140179025735680> thanks for": you welcome
17:15:57FromDiscord<ghoom> is there an std event wrapper like is js?
17:20:26FromDiscord<Phil> ... somehow, I have played myself. What I wanted to do was create actually random characters. What I have achieved is getting random characters, but always the same ones
17:21:02FromDiscord<Phil> The goal was a string of x random readable characters to create auth tokens
17:21:39*Schnouki quit (Remote host closed the connection)
17:21:39*spff quit (Write error: Broken pipe)
17:21:40*toothlessgear quit (Remote host closed the connection)
17:21:40*noeontheend quit (Remote host closed the connection)
17:21:40*mronetwo quit (Remote host closed the connection)
17:21:59FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=45AI
17:22:39*Schnouki joined #nim
17:22:39*mronetwo joined #nim
17:22:45*spff joined #nim
17:22:45FromDiscord<Phil> It'll always pick the same sequence of random characters out of the characters between A and z
17:22:56*toothlessgear joined #nim
17:23:54*noeontheend joined #nim
17:24:09FromDiscord<Phil> Good old "Should've called `randomize()` first
17:24:11FromDiscord<Phil> (edit) "first" => "first""
17:42:09FromDiscord<demotomohiro> Please dont use random module for security things.
17:44:10FromDiscord<demotomohiro> https://nim-lang.org/docs/sysrand.html↵Please use sysran.
17:44:28FromDiscord<demotomohiro> sysrand
17:45:23FromDiscord<ghoom> In reply to @demotomohiro "Please dont use random": wonder why
17:45:31FromDiscord<ghoom> serious question
17:48:22FromDiscord<Phil> In reply to @demotomohiro "Please dont use random": The module states mostly not to use it for cryptographic purposes. ↵Which I'm not, I'm generating a random string with it, that I store in a db and compare against strings that users send me. ↵I'm not using it to calculate hashes or the like where, I'd assume, actual randomness matters more
17:49:03FromDiscord<flywind> std/sysrand still lacks some basic apis like `choice`, `rand` with range etc. Or someone needs to wrap it like https://docs.python.org/3/library/secrets.html and publish it to nimble.
17:49:06FromDiscord<demotomohiro> Pseudo random number generator algorithm used in random module is not designed for security.
17:49:10FromDiscord<voidwalker> is there a fast file diff algo in nim libs somewhere?
17:51:09FromDiscord<demotomohiro> If you need ramdom numbers for security, use true random number or cryptography secure random number generator.
17:51:30FromDiscord<blashyrk> In reply to @jmgomez "I dont think you": That's what I ended up doing, thanks!
17:55:15FromDiscord<Phil> In reply to @demotomohiro "Pseudo random number generator": If that's the bar, then given the generous usage of disclaimers on sysrand it would not qualify either.↵Which basically leaves you with staring at nimcrypto hoping it has a useful proc or scouring the web for a c lib whose proc you can steal
17:56:36FromDiscord<Phil> Aaaaand nimcrypto doesn't have an option there either
17:57:46FromDiscord<demotomohiro> In reply to @Isofruit "The module states mostly": You said it is auth tokens. Isn't it only known to user and your db?↵What if attacker got auth token?
17:58:29FromDiscord<Phil> In reply to @demotomohiro "You said it is": In that case it doesn't matter how I generated the token, the attacker will still have a valid token to authenticate themselves against my db and thus will be able to do so freely
18:01:07FromDiscord<Phil> The danger would lie if the attacker could predict which token was generated, based on knowing a state the machine was in at one point and from there knowing what the next results of urandom are.
18:02:23FromDiscord<Phil> Based on that they could be able to predict which tokens will be within the database and thus wrongly authenticate↵But that relies on them having knowledge of the state the machine was in at one point after a randomize() call
18:09:47FromDiscord<demotomohiro> sent a long message, see http://ix.io/45AV
18:10:32FromDiscord<demotomohiro> You should be able to get random bytes from sysrand and encode to base64:↵https://nim-lang.org/docs/sysrand.html↵https://nim-lang.org/docs/base64.html
18:34:55FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45AY
18:36:43FromDiscord<huantian> you can't have a variable be a generic proc
18:36:57FromDiscord<ghoom> why
18:40:19FromDiscord<iffy (Matt Haggard)> Is https://play.nim-lang.org/ down for anyone else?
18:40:28FromDiscord<ghoom> yep
18:40:32FromDiscord<huantian> In reply to @ghoom "why": because it has to be a concrete type
18:40:34FromDiscord<ghoom> two days now
18:40:41FromDiscord<Prestige> Where is PMunch?
18:40:51FromDiscord<huantian> generics (basically) make a new proc for each type you give it
18:40:57FromDiscord<huantian> In reply to @Avahe "Where is PMunch?": irc iirc
18:40:58FromDiscord<ghoom> ah
18:41:06FromDiscord<ghoom> makes sense
18:41:48FromDiscord<iffy (Matt Haggard)> sent a code paste, see https://play.nim-lang.org/#ix=45AZ
18:43:56FromDiscord<flywind> In reply to @iffy (Matt Haggard) "Is https://play.nim-lang.org/ down for": Maybe <@&371760044473319454> can have access to the server of the Nim playground.
18:44:33FromDiscord<demotomohiro> In reply to @Isofruit "In that case it": If you use non-CSPRNG, attackers can find the state of PRNG by reading outputs from PRNG even if they cannot access the state of PRNG.↵https://www.pcg-random.org/posts/predictability-party-tricks.html (ctrl-f "Trivial Predictability")↵https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator#Requirements↵https://en.wikipedia.org/wiki/Next-bit_test
18:45:50*wallabra quit (Ping timeout: 240 seconds)
18:47:14*wallabra joined #nim
18:47:49FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45B0
18:48:02FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45B0" => "https://play.nim-lang.org/#ix=45B1"
18:51:07FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=45B2
18:51:38FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=45B3
18:52:25FromDiscord<reversem3> @can.l\: Is there a way to focus on an entry and trigger an event rather then clicked proc for a button?
18:52:34FromDiscord<demotomohiro> Which address of function procedural type points to can be changed at runtime.
18:52:37FromDiscord<huantian> (edit) "https://play.nim-lang.org/#ix=45B2" => "https://play.nim-lang.org/#ix=45B5"
18:52:42*jmdaemon joined #nim
18:52:45*jmdaemon quit (Remote host closed the connection)
18:55:20*jmdaemon joined #nim
19:09:25*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
19:15:25FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=45Bd
19:18:22FromDiscord<ghoom> sent a code paste, see https://paste.rs/Qbj
19:18:27FromDiscord<huantian> still won't work
19:18:32FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45Bg" => "https://play.nim-lang.org/#ix=45Bf"
19:18:40FromDiscord<ghoom> i mean how can i fix it
19:18:49FromDiscord<huantian> you have to make the base object generic
19:19:07FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=45Bh
19:19:49FromDiscord<ghoom> bummer
19:20:56FromDiscord<huantian> again it has to be a concrete type
19:21:13FromDiscord<huantian> you can't reason it at runtime
19:21:24FromDiscord<ghoom> 👌🐸
19:26:10FromDiscord<ghoom> can someone link me to `do`'s manual section?
19:26:20FromDiscord<ghoom> (edit) "can someone ... link" added "pls"
19:26:30FromDiscord<huantian> https://nim-lang.org/docs/manual_experimental.html#do-notation
19:26:34FromDiscord<ghoom> tamks
19:34:10FromDiscord<ghoom> what does `{.closure.}` do?
19:34:46FromDiscord<huantian> https://nim-lang.org/docs/manual.html#types-procedural-type
19:35:15FromDiscord<huantian> it makes the proc a, well, closure
19:35:36FromDiscord<huantian> which means it captures any variables in it's surrounding environment
19:35:51FromDiscord<ghoom> 🐸👍
19:36:02FromDiscord<ghoom> that's very useful!
19:36:31FromDiscord<ghoom> imperative programming to da max!
19:38:43FromDiscord<gibson> I just tried ReplIt (nim v1.2) and my macro works, but breaks on my installation (1.6.4). Just checking here if I'm doing anything silly that has changed in the mean time, otherwise I'll head to the forums and see if it's a bug.↵https://pastebin.com/rHHKzVwr
19:50:10FromDiscord<reversem3> Hmm ok so readLine(stdin) isn't allowed in owlkettle https://hatebin.com/oogjblpuzw
19:58:40FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=45Bs
20:07:39FromDiscord<ghoom> what's the exception type for "item not found"?
20:07:51FromDiscord<ghoom> (edit) "what's the ... exception" added "standard"
20:08:25FromDiscord<ghoom> in tables
20:08:51FromDiscord<planetis> KeyError
20:09:27NimEventerNew thread by Ggibson: How to update macro nim1.2 to nim1.6.6?, see https://forum.nim-lang.org/t/9325
20:12:17*LuxuryMode joined #nim
20:22:49FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Bz
20:23:34FromDiscord<lantos> is there a way to peek into a future[string] without completing the future?
20:23:42FromDiscord<ghoom> bruh
20:23:50FromDiscord<ghoom> that doesn't make any sense
20:23:57FromDiscord<ghoom> 🤔🤔🤔
20:26:32FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=45BC
20:26:42FromDiscord<creikey> (edit) "https://play.nim-lang.org/#ix=45BC" => "https://play.nim-lang.org/#ix=45BD"
20:28:11FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=45BE
20:28:58FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=45BE" => "https://play.nim-lang.org/#ix=45BF"
20:29:10FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=45BG
20:29:29FromDiscord<ghoom> thanks
20:29:43FromDiscord<ghoom> didn't work
20:30:53FromDiscord<!Patitotective> error?
20:32:05FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=45BH
20:33:01FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45BI
20:33:11FromDiscord<ghoom> that's the point of the default value
20:33:36FromDiscord<planetis> It means you need to specify int in the object constructor
20:33:44FromDiscord<planetis> The last line
20:33:57FromDiscord<ghoom> so i can't specify a default type?
20:34:10FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=45BJ
20:34:29FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=45BJ" => "https://play.nim-lang.org/#ix=45BK"
20:34:30FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=45BK" => "https://play.nim-lang.org/#ix=45BL"
20:41:21FromDiscord<guttural666> is there a way to compile to a different directory than the current one?
20:42:30FromDiscord<planetis> --out:patg
20:42:36FromDiscord<planetis> (edit) "--out:patg" => "--out:path"
20:46:27FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=45BP
20:46:30FromDiscord<dom96> Why are you creating an iterator yourself?
20:49:58FromDiscord<lantos> sent a long message, see http://ix.io/45BQ
20:50:58FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=45BR
20:51:19FromDiscord<lantos> oops
20:51:43FromDiscord<lantos> (edit) "oops" => "oops, I'll snip it to be more relevant"
20:51:55FromDiscord<dom96> ahh, so you're trying to create an async iterator, fun
20:52:22FromDiscord<lantos> yeah :<
20:52:33FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=45BS
20:53:25FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=45BS" => "https://play.nim-lang.org/#ix=45BT"
20:53:50FromDiscord<lantos> I don't think it is possible because the async dispatch is saying that the future is already read but I am creating a new future to hold the data
20:55:03FromDiscord<!Patitotective> In reply to @ghoom "that's the point of": what default value?
20:55:16FromDiscord<ghoom> In reply to @Patitotective "what default value?": default generic type value
20:55:24FromDiscord<!Patitotective> In reply to @ghoom "so i can't specify": its not default, you sepecify the acceptable types
20:55:36FromDiscord<!Patitotective> any other than int will fail
20:55:43FromDiscord<ghoom> can i specify a default?
20:56:06FromDiscord<!Patitotective> i dont thing
20:56:10FromDiscord<!Patitotective> it doesnt really make sense
20:57:23FromDiscord<dom96> In reply to @lantos "I don't think it": what you really need is a way to tell the caller of the iterator "Await this to get the next item"
20:57:45FromDiscord<!Patitotective> (edit) "thing" => "think"
20:57:46FromDiscord<dom96> this shouldn't be too difficult to implement but it won't work with the native Nim for loop
20:57:46FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=45BU
20:57:54FromDiscord<ghoom> In reply to @Patitotective "it doesnt really make": imagine `O(...)` automatically expanding to `O[T](...)` where `T` is a default
20:58:20FromDiscord<ghoom> they should add dis
20:58:34FromDiscord<!Patitotective> making generics accept a default type would just be more confusing↵why dont you just use the code is showed you
20:58:35FromDiscord<!Patitotective> (edit) "you" => "you?"
20:59:53FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=45BV
21:00:59FromDiscord<ghoom> In reply to @Patitotective "making generics accept a": i just thought it would be a nice feature
21:01:01FromDiscord<ghoom> lazy feature
21:01:03FromDiscord<ghoom> ¯\_(ツ)_/¯
21:01:14FromDiscord<ghoom> (edit) "lazy" => "laziness"
21:02:16FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=45BX
21:02:48FromDiscord<dom96> I do know for definite that you cannot have an async iterator (i.e. {.async.} on `iterator`)
21:03:04FromDiscord<!Patitotective> In reply to @ghoom "i just thought it": there's really no need for that feature, the code i showed you is much clearer and simpler than implementing a new "feature"
21:03:40FromDiscord<huantian> i feel like the ocrrect feature is inferring the generic type from object constructor parameters
21:03:59FromDiscord<huantian> "correct"
21:04:16FromDiscord<ghoom> yes
21:04:21FromDiscord<!Patitotective> In reply to @huantian "i feel like the": that would be really cool, also inferring open array types
21:05:57FromDiscord<ghoom> In reply to @Patitotective "that would be really": dis getting hot
21:06:11FromDiscord<ghoom> 🔥
21:08:21FromDiscord<lantos> In reply to @dom96 "I mean create an": uh o you think you caught covid? I heard it is flaring up also with the monkey pox in the tubes atm.
21:08:47FromDiscord<dom96> dunno, I've been doing LFTs and they've been negative but who knows
21:09:35FromDiscord<guttural666> In reply to @planetis "--out:path": thanks!
21:10:40FromDiscord<lantos> I think I got it 3 weeks ago. All tests negative but it felt exactly like covid and was sick for the same time as I had it before. I think the bbc said in the last few days that there are 2 new variants that don't show up on tests.
21:10:56FromDiscord<# Luke> How can I loop over each item in a tuple and get the field name
21:11:10FromDiscord<lantos> (edit) "I think I got it 3 weeks ago. All tests negative but it felt exactly like covid and was sick for the same time as I had it before. I think the bbc said in the last few days that there are 2 new variants that don't show up on tests. ... " added "guess cuppa soup and tv shows is the best bet"
21:11:21FromDiscord<!Patitotective> In reply to @ripluke "How can I loop": the fieldPairs iterator also works for tuples
21:11:37FromDiscord<# Luke> Ok
21:11:44FromDiscord<ghoom> In reply to @Patitotective "there's really no need": bruh, it'd literally be like proc default values
21:12:00FromDiscord<lantos> In reply to @dom96 "I do know for": Yeah I have tried haha, hence the hacky way I'm doing it. And the code you sent threw me off haha. I thought iterators where like a {.magic.} pragma or something I'll check it
21:12:31FromDiscord<!Patitotective> In reply to @ghoom "bruh, it'd literally be": i dont see any case where default generic types would be useful 🤷‍♂️
21:12:40FromDiscord<ghoom> In reply to @Patitotective "i dont see any": bro
21:12:41FromDiscord<lantos> (edit) "something I'll check it" => "reserved words"
21:12:44FromDiscord<ghoom> we're programmers
21:12:49FromDiscord<ghoom> we're lazy af
21:12:58FromDiscord<ghoom> you should know that
21:13:01FromDiscord<ghoom> you're sus
21:13:06FromDiscord<!Patitotective> In reply to @ghoom "you should know that": i know lazy programmers are lazy
21:14:17FromDiscord<ghoom> https://tenor.com/view/the-rock-rock-gif-21708339
21:14:27FromDiscord<ghoom> i always forget gifs dont work
21:17:05FromDiscord<demotomohiro> If you think it is really the nice feature Nim should have: https://github.com/nim-lang/RFCs/issues
21:20:05FromDiscord<ghoom> lez go
21:33:24FromDiscord<ghoom> posted!
21:36:13FromDiscord<jan0809> is there any chance nim could target carbon one day? theoretically i mean
21:37:25FromDiscord<!Patitotective> In reply to @jan0809 "is there any chance": why would you want to target carbon lol↵compile to c++
21:37:29FromDiscord<Prestige> Yeah, they talked about it on the forum
21:39:12FromDiscord<theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=45C6
21:39:58FromDiscord<jan0809> In reply to @Patitotective "why would you want": wait does carbon compile cpp aswell? no right?
21:40:29FromDiscord<Elegantbeef> That's literally the point of converters↵(@theangryepicbanana)
21:40:33FromDiscord<!Patitotective> In reply to @jan0809 "wait does carbon compile": i havent really taken a look at carbon yet↵im expecting it to die quick lmao
21:40:42FromDiscord<jan0809> you sure
21:40:54FromDiscord<theangryepicbanana> In reply to @Elegantbeef "That's literally the point": I used converters so I can do stuff like `1.Foo` and `Foo(1)`
21:40:55FromDiscord<jan0809> dart isnt dead and go neither
21:41:09FromDiscord<Elegantbeef> Just make a proc then
21:41:27FromDiscord<!Patitotective> In reply to @jan0809 "you sure": 🤨
21:41:27FromDiscord<theangryepicbanana> I have a lot of code that depends on converters implicitly outside of overload resolution -_-
21:41:40FromDiscord<Elegantbeef> `proc foo(i: SomeInteger): Foo = Foo(i.int)`
21:41:58FromDiscord<Elegantbeef> The entire point of converts is implicit conversions, which includes overload resolution
21:42:04FromDiscord<theangryepicbanana> ok
21:43:13FromDiscord<jan0809> even things like rust live somehow
21:43:37FromDiscord<theangryepicbanana> rust has a very active community and is still growing a lot
21:43:42FromDiscord<theangryepicbanana> not that surprising
21:43:43FromDiscord<jan0809> see
21:44:14FromDiscord<theangryepicbanana> golang has a very niche but useful place in backend code
21:44:22FromDiscord<Elegantbeef> Though banana your specific issue right now might be a bug
21:44:25FromDiscord<Elegantbeef> what nim version are you on?
21:44:26FromDiscord<theangryepicbanana> dart is used for cross-platform webapps
21:44:35FromDiscord<theangryepicbanana> In reply to @Elegantbeef "what nim version are": 1.6.6
21:44:43FromDiscord<Elegantbeef> Nevermind 😄
21:44:58FromDiscord<!Patitotective> In reply to @jan0809 "even things like rust": rust is for people that dont believe in the off-side rule
21:45:01FromDiscord<jan0809> and dart is perfect for mobile devs not considering to touch kotlin
21:45:07FromDiscord<theangryepicbanana> ah nvm
21:45:16FromDiscord<jan0809> so why should carbon fail that badly
21:45:22FromDiscord<theangryepicbanana> In reply to @Elegantbeef "Nevermind 😄": actually it's 1.7.1 lol, I forgot
21:45:44FromDiscord<theangryepicbanana> In reply to @jan0809 "so why should carbon": likely because it's Another C++ Clone ™️
21:46:09FromDiscord<theangryepicbanana> I personally don't see anything interesting about the language, it doesn't even have a complete spec so idk if it even has unions and enums, and how they function
21:46:29FromDiscord<jan0809> c++ is from the 80s
21:46:36FromDiscord<!Patitotective> nim already has c++ ffi :D
21:46:36FromDiscord<theangryepicbanana> indeed
21:46:55FromDiscord<jan0809> In reply to @theangryepicbanana "I personally don't see": yeah its not ready for sure
21:47:07FromDiscord<theangryepicbanana> the idea of c++ in general is archaic, hence newer languages like rust, swift, and julia
21:47:44FromDiscord<jan0809> is swift a thing outside darwin btw?
21:47:50FromDiscord<theangryepicbanana> yeah
21:47:54FromDiscord<theangryepicbanana> you can run it on linux
21:48:02FromDiscord<jan0809> oh interesting
21:48:11FromDiscord<theangryepicbanana> supposedly windows as well, though it requires building the entire toolchain by hand (no thanks!)
21:48:33FromDiscord<theangryepicbanana> the easiest way to use swift on linux atm is probably via nix
21:49:00FromDiscord<jan0809> that linux ios sdk is very dead too right?
21:49:00FromDiscord<!Patitotective> (this is off-topic btw)
21:49:15FromDiscord<jan0809> true
21:50:01FromDiscord<theangryepicbanana> In reply to @jan0809 "that linux ios sdk": not sure, I haven't used it in a while
21:50:10FromDiscord<theangryepicbanana> at the very least you could use gnustep
21:53:13FromDiscord<jan0809> In reply to @theangryepicbanana "not sure, I haven't": just read apple dropped the lawsuit after two years, interesting, (when they ported android 11 to the iphone 7 as a revenge move apple prolly just gave up lol)
21:53:36FromDiscord<theangryepicbanana> lol ok
21:56:28FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Ca
21:56:56FromDiscord<Elegantbeef> `proc myThing(str: string): string = "Hello world"`
21:59:18FromDiscord<ghoom> lol
21:59:38FromDiscord<can.l> In reply to @reversem3 "<@893965307171979326>\: Is there": I just added a BaseWidget.tooltip field, which allows you to add a tooltip for any widget (https://github.com/can-lehmann/owlkettle/blob/main/docs/widgets.md#fields).
22:04:18FromDiscord<can.l> In reply to @reversem3 "<@893965307171979326>\: Is there": Entrys currently support the changed(text: string) and activate() events. changed is called when the text in the entry is changed and activate is called when the user presses the enter key.
22:13:10FromDiscord<ghoom> how to do an async `do`?
22:13:29FromDiscord<ghoom> `do(...) {.async.}: ...`?
22:14:42FromDiscord<voidwalker> How do I represent the char literal with code 0002 ?
22:14:42FromDiscord<voidwalker>
22:15:40FromDiscord<Prestige> maybe just cast it
22:15:42FromDiscord<ghoom> `'\x02'`
22:15:45FromDiscord<Prestige> or that
22:15:52FromDiscord<voidwalker> wait.. it's unicode
22:15:53FromDiscord<voidwalker> U+0002 <control> character
22:16:00FromDiscord<ghoom> same thing
22:16:07FromDiscord<Elegantbeef> No it's not the same thing
22:16:15FromDiscord<Elegantbeef> You just past the rune in a string
22:16:18FromDiscord<Elegantbeef> paste\ rahter
22:16:25FromDiscord<Elegantbeef> It's not a char
22:16:29FromDiscord<voidwalker> even if it's a char ?
22:16:31FromDiscord<!Patitotective> yea, you cant use unicode in char literals
22:16:35FromDiscord<voidwalker> ohh damn : )
22:16:41FromDiscord<Elegantbeef> It's not a char, it's more than a single byte
22:16:47FromDiscord<ghoom> In reply to @Elegantbeef "No it's not the": bruh what? ascii 0x2 is not unicode 0x2?
22:16:48FromDiscord<voidwalker> For some reason this file got it as separator for some strings..
22:16:55FromDiscord<!Patitotective> In reply to @ghoom "bruh what? ascii 0x2": of course not
22:17:05FromDiscord<ghoom> 🤯
22:17:21FromDiscord<Elegantbeef> No ascii and unicde `\02` is the same the difference is there is a unicode code point ahead of the `\02`
22:17:22FromDiscord<ghoom> does that mean ascii is not part of unicode?
22:17:41FromDiscord<Elegantbeef> 0..126 ascii is apart of unicode
22:17:51FromDiscord<ghoom> then why'd you say it's not the same?
22:17:51FromDiscord<Elegantbeef> Atleast utf8
22:17:57FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=45Ce
22:18:05FromDiscord<Elegantbeef> I didnt say it wasnt the same
22:18:21FromDiscord<Elegantbeef> They have a unicode character which is different to the ascii character
22:18:30FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Cf
22:18:41FromDiscord<ghoom> In reply to @Elegantbeef "They have a unicode": myy mind is fucking blown rn
22:18:44FromDiscord<dom96> meh, I prefer it to the do notation
22:18:47FromDiscord<!Patitotective> read unicode spec lol
22:18:57FromDiscord<Elegantbeef> is control, \\02
22:19:01FromDiscord<dom96> wish the do notation wasn't in the language
22:19:04FromDiscord<voidwalker> so how do I deal with this +0002 U thing, to pass it as a variable separator for a string split ;\
22:19:06FromDiscord<Elegantbeef> Control characters change how to parse the \`
22:19:10FromDiscord<ghoom> In reply to @dom96 "wish the do notation": why lol
22:19:11FromDiscord<Elegantbeef> parse the character
22:19:22FromDiscord<Elegantbeef> you do `""` voidwalker
22:19:33FromDiscord<dom96> In reply to @ghoom "why lol": cause it's ugly and inconsistent with the rest of the language
22:19:39FromDiscord<voidwalker> but then it's of string type ?
22:19:42FromDiscord<ghoom> or `'\u0002'`
22:19:45FromDiscord<ghoom> i think
22:19:52FromDiscord<Elegantbeef> Unicode characters are not characters↵(@voidwalker)
22:20:05FromDiscord<ghoom> ok
22:20:09FromDiscord<ghoom> so `"\u0002"`
22:20:09FromDiscord<Elegantbeef> In Nim characters are only a single byte that is 0..255
22:20:14FromDiscord<Elegantbeef> No
22:20:18FromDiscord<Elegantbeef> it's `""`
22:20:32FromDiscord<ghoom> yeah but how to do that with escape seqs?
22:20:56FromDiscord<Elegantbeef> No clue i just use unicode characters directly
22:21:07FromDiscord<ghoom> i'm pretty sure what i sent is correct
22:21:11FromDiscord<Elegantbeef> I dont even know if nim support unicode strings
22:21:22FromDiscord<Elegantbeef> Well unicode escaped strings
22:21:24FromDiscord<ghoom> imma try dis!
22:21:44FromDiscord<!Patitotective> In reply to @Elegantbeef "I dont even know": it does
22:21:52FromDiscord<Elegantbeef> Fairly certain that writes \`\\u' then "0002" to a string buffer and not a unicode escaped string
22:21:58FromDiscord<Elegantbeef> I mean i got different result between the two
22:22:14FromDiscord<voidwalker> ahh, split works with string as well for the separator..
22:22:34FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1001253153041305831/image.png
22:22:48FromDiscord<ghoom> beef, `"\u0002"` is correct
22:22:50FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=
22:22:51FromDiscord<ghoom>
22:22:56FromDiscord<ghoom> i tested it
22:22:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45Ch
22:23:08FromDiscord<Zectbumo> https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals
22:23:09FromDiscord<ghoom> ye there we go
22:23:17FromDiscord<Zectbumo> \u HHHH unicode codepoint with hex value HHHH; exactly four hex digits are allowed
22:23:34FromDiscord<ghoom> i'd use `\u{2}`
22:23:42FromDiscord<ghoom> looks cuter
22:23:50FromDiscord<ghoom> and lazier XD
22:28:14NimEventerNew thread by Morturo: Streams and memory usage, see https://forum.nim-lang.org/t/9326
22:30:58FromDiscord<gibson> Anyone know this error? I'm quite stuck. `inconsistent typing for reintroduced symbol 'paramsGlobal' previous type was: object; new type is: object`
22:31:19FromDiscord<Elegantbeef> I seen your forum post and can only say "you're writing macros wrong"
22:31:39FromDiscord<Elegantbeef> Now that you're here i'll help
22:31:43FromDiscord<gibson> 😆 thank you.. unfortunately I already knew that.
22:32:07FromDiscord<gibson> I would love help, thank you.
22:32:10FromDiscord<Elegantbeef> In this case there is no reason to use a macro
22:32:17FromDiscord<Elegantbeef> It's quite literally just a template
22:33:53FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45Ct
22:34:38FromDiscord<gibson> Only issue is the fields are determined from macro invocations across many files, and stored in a compileTime seq, from which this macro gets the information necessary to construct the aggregate type.
22:34:43FromDiscord<Elegantbeef> It doesnt make sense that your macro errors
22:34:53FromDiscord<Elegantbeef> Well where is your actual macro?
22:35:27FromDiscord<gibson> I wonder if it's not a bug, because Nim1.2 is fine with it.
22:36:02FromDiscord<Elegantbeef> It looks like a bug but it's such a dumpster fire of a reproduction that ti's hard to say certainly
22:36:29FromDiscord<gibson> I'll try removing all the fields and such to whittle it down.
22:36:36FromDiscord<Elegantbeef> remove the `inject`
22:43:35FromDiscord<gibson> @ElegantBeef I "solved" it 🤢 by removing `expandMacros`. That was ruining everything. The resulting object works as expected. All good now.
22:44:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45Di
22:44:31FromDiscord<Elegantbeef> Remember you can do `echo result.repr` inside of a macro
22:45:17FromDiscord<gibson> Awesome, I'll quote you and use that for the bug report.
22:45:30FromDiscord<Elegantbeef> You can remove the `inject` aswell
22:45:45FromDiscord<Elegantbeef> And remove the `result = newStmtList`
22:46:03FromDiscord<Elegantbeef> People need to learn to min repro better, just saying
22:47:00FromDiscord<gibson> Fair enough.
22:47:10FromDiscord<gibson> The `result = newStmtList()` is required.
22:47:33FromDiscord<Elegantbeef> No it's not
22:47:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45Ds
22:48:17FromDiscord<gibson> Ah k, wondered what you were `add`ing to otherwise.
22:54:51FromDiscord<gibson> Annnd found the existing issue. Looks like the person working on it is stuck.↵https://github.com/nim-lang/Nim/issues/19071
23:01:24FromDiscord<Arathanis> Is there any documentation on how to include c/c++ static libraries for compilation rather than using dynamic linking with `{.dynlib: "someLib.so".}` style?
23:02:13FromDiscord<Elegantbeef> it's just `{.pass;L "-s -lmyLibName".}` instead
23:02:44FromDiscord<Arathanis> that totally corsses my eyes gonna have to unpack that
23:02:55FromDiscord<# Luke> is there any software written in nim on homebrew
23:03:02FromDiscord<Elegantbeef> sorry it's `-static`
23:03:04FromDiscord<Arathanis> (edit) "corsses" => "crosses"
23:03:15FromDiscord<Elegantbeef> Or is it --static fuck i dont recall
23:03:19FromDiscord<Arathanis> is it supposed to be a `:` or is `;` accurate?
23:03:28FromDiscord<Arathanis> and what is the `L` for
23:03:31FromDiscord<Elegantbeef> Supposed to be `passl:`
23:03:34FromDiscord<Arathanis> (edit) "for" => "for?"
23:03:36FromDiscord<Arathanis> GOT it
23:03:39FromDiscord<Arathanis> passl pragma
23:03:39FromDiscord<Elegantbeef> pass linker
23:03:53FromDiscord<# Luke> In reply to @ripluke "is there any software": 💀
23:03:56FromDiscord<Arathanis> `{.passl: "--static "someLib.a".}`?
23:03:57FromDiscord<# Luke> Guess not
23:04:03FromDiscord<Elegantbeef> Yea my fingers dont like saying what i'm thinking
23:04:08FromDiscord<Arathanis> (edit) ""someLib.a".}`?" => "someLib.a".}`?"
23:04:25FromDiscord<Elegantbeef> I dont think you do `.a`
23:04:25FromDiscord<Elegantbeef> it's `--static -lsomelib` iirc
23:06:16FromDiscord<Arathanis> and this would be a top level pragma I am guessing?
23:06:17FromDiscord<Zectbumo> https://nim-lang.org/1.4.8/nimc.html#dynliboverride
23:06:34FromDiscord<Elegantbeef> You can also pass it in the command line as well if you want
23:06:59FromDiscord<!Patitotective> In reply to @ripluke "Guess not": why dont you search
23:11:11*crem quit (Ping timeout: 255 seconds)
23:12:23FromDiscord<# Luke> Where do I put my GitHub token for nimble?
23:13:26FromDiscord<Prestige> I think you have to use an env variable `GITHUB_TOKEN`
23:14:19*crem joined #nim
23:17:05*krux02 quit (Remote host closed the connection)
23:17:52FromDiscord<!Patitotective> In reply to @Avahe "I think you have": yes
23:18:06FromDiscord<# Luke> hmm i have it set and its still not working
23:21:08FromDiscord<demotomohiro> @Arathanis This article might help you to use static library with Nim:↵https://internet-of-tomohiro.netlify.app/nim/clibrary.en.html
23:21:42FromDiscord<Arathanis> In reply to @demotomohiro "<@136570191038513152> This article might": thanks, i appreciate it
23:22:11FromDiscord<!Patitotective> In reply to @ripluke "hmm i have it": are you doing `getEnv`↵and running it with `GiTHUB_TOKEN="aklsdkljasjklfkjlasf"`
23:22:13FromDiscord<!Patitotective> code would help
23:22:40FromDiscord<!Patitotective> In reply to @Patitotective "are you doing `getEnv`": you also need to assert that `existsEnv("GITHUB_TOKEN")`
23:22:46FromDiscord<# Luke> im trying to publish a package
23:22:59FromDiscord<# Luke> with nimble publish
23:23:10FromDiscord<!Patitotective> sure
23:23:20FromDiscord<# Luke> like im not the one working with the env, thats nimble
23:24:00FromDiscord<!Patitotective> so if you're not running the code how is it not working?
23:24:01FromDiscord<!Patitotective> error?
23:25:00FromDiscord<# Luke> wdym? im not running any code
23:25:25FromDiscord<# Luke> all im doing is uploading a package to nimble
23:25:26FromDiscord<!Patitotective> In reply to @ripluke "hmm i have it": wdym here by "not working"?
23:26:13FromDiscord<# Luke> sent a code paste, see https://play.nim-lang.org/#ix=45Dy
23:26:20FromDiscord<# Luke> the comand output
23:26:34FromDiscord<!Patitotective> oh i understood something completely different LOL
23:26:45FromDiscord<!Patitotective> well, you just paste it after they tell you
23:26:47FromDiscord<!Patitotective> and enter
23:27:03FromDiscord<# Luke> In reply to @Patitotective "well, you just paste": wdym
23:27:09FromDiscord<# Luke> they never trold me to
23:27:19FromDiscord<# Luke> it just goes straight to that message'
23:27:22FromDiscord<# Luke> (edit) "message'" => "message"
23:27:28FromDiscord<!Patitotective> paste it after they tell you that message
23:27:33FromDiscord<# Luke> ok
23:27:36FromDiscord<!Patitotective> (edit) removed "they tell you"
23:28:16FromDiscord<# Luke> nope that didnt work
23:28:24FromDiscord<# Luke> it still opens my browser
23:29:40FromDiscord<!Patitotective> after it opens the browser, go back to the terminal and paste it
23:29:50FromDiscord<# Luke> hmm ok
23:30:14FromDiscord<Prestige> I remember having this same issue a bit ago
23:30:16FromDiscord<Prestige> it was painful
23:30:27FromDiscord<!Patitotective> yea, messages are unclear
23:30:57FromDiscord<# Luke> ok that worked
23:31:00FromDiscord<# Luke> thx
23:31:36FromDiscord<!Patitotective> easy PR if someone asks me
23:32:03FromDiscord<Prestige> Do it
23:34:17FromDiscord<theangryepicbanana> is play.nim-lang down?
23:34:28FromDiscord<Prestige> Yep
23:34:48FromDiscord<theangryepicbanana> great
23:35:11FromDiscord<theangryepicbanana> I'm having this weird issue where a bitpacked object inside of a variant object is being zeroed out when copied
23:37:53FromDiscord<theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=45DB
23:42:03*LuxuryMode quit (Quit: Connection closed for inactivity)
23:42:56FromDiscord<Elegantbeef> Any chance you can give a runnable example?
23:45:02FromDiscord<theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=45DC
23:45:40FromDiscord<Elegantbeef> Works here
23:45:47FromDiscord<Elegantbeef> after fixing the case declaration
23:45:47FromDiscord<theangryepicbanana> that's strange
23:46:10FromDiscord<theangryepicbanana> lol yeah still sometimes write pascal by accident
23:46:20FromDiscord<theangryepicbanana> uh that's weird though
23:47:23FromDiscord<theangryepicbanana> the actual code having issues is <https://github.com/ALANVF/star/blob/master/vm/dec64.nim#L10> and <https://github.com/ALANVF/star/blob/master/vm/values.nim#L25>, with issues occurring with a seq of the latter type
23:47:59FromDiscord<theangryepicbanana> ah I suppose it's not updated
23:48:18FromDiscord<theangryepicbanana> pretend `Value` has a `of vDec64: d64: Dec64` case
23:49:34FromDiscord<Elegantbeef> Is trying hard to not comment about those constant names
23:50:02FromDiscord<theangryepicbanana> In reply to @Elegantbeef "*Is trying hard to": well it's translated from C and I was too lazy to improve it lol
23:50:08FromDiscord<theangryepicbanana> ahhhh it's a copying issue
23:50:20FromDiscord<theangryepicbanana> are bitpacked structs not given default copy behavior?
23:50:28FromDiscord<Elegantbeef> Just chop the C namespace is what i'm annoyed of
23:50:32FromDiscord<Elegantbeef> They should copy as normal
23:50:53FromDiscord<theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=45DD
23:51:05FromDiscord<theangryepicbanana> hmm
23:51:43FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45DE
23:52:04FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45DF
23:52:07FromDiscord<theangryepicbanana> that's so bizarre
23:52:18FromDiscord<theangryepicbanana> ok question
23:52:25FromDiscord<theangryepicbanana> try replacing the `int64` with `-36028797018963968 .. 36028797018963967`
23:53:05FromDiscord<Elegantbeef> Works fine
23:53:14FromDiscord<theangryepicbanana> wtf
23:53:26FromDiscord<Elegantbeef> Have you defined your own `=copy`?
23:54:12FromDiscord<theangryepicbanana> yeah I tried that
23:54:26FromDiscord<Elegantbeef> Ah so you didnt before
23:54:29FromDiscord<theangryepicbanana> yeah
23:56:16FromDiscord<Elegantbeef> Hmm i have an diea let's see if it causes it 😄
23:56:37NimEventerNew Nimble package! dye - An image colorizer, see https://github.com/Infinitybeond1/dye
23:56:45FromDiscord<Elegantbeef> Nope
23:56:56FromDiscord<Elegantbeef> Having a larger branch did not cause anything