<< 11-02-2023 >>

00:19:59FromDiscord<auxym> IIRC it's supposed to come at the same time as incremental compilation
00:24:00FromDiscord<Elegantbeef> It's likely built ontop of ic
00:24:13FromDiscord<Elegantbeef> So yea it'll be here after IC is usable
00:35:16FromDiscord<Nilts> How would i check if a filepath is a dynamic library?
00:37:32FromDiscord<Elegantbeef> Attempt to load it and if it fails it's not a dynamic library
00:38:21FromDiscord<Nilts> In reply to @Elegantbeef "Attempt to load it": does `std/dynlib` work with `--app:lib`?
00:43:05FromDiscord<Nilts> also, your soliton seems like it would slow things down
00:43:45FromDiscord<Elegantbeef> Well that's how you know afaik
00:44:51FromDiscord<Nilts> would it be better to check file extensions?
00:45:46FromDiscord<Elegantbeef> A dynamic library can be any extension
00:47:00FromDiscord<huantian> Time to name my Linux dynamic library dll instead of so
00:48:05FromDiscord<Elegantbeef> You could check extension, but it's all meaningless really
00:48:06FromDiscord<Elegantbeef> I can have a dynamic library inside a .png if i wanted to
00:54:50*dropkick quit (Ping timeout: 255 seconds)
00:55:52FromDiscord<Nilts> In reply to @Elegantbeef "You could check extension,": I will just enforce a naming convention for nim lib interaction
00:59:23FromDiscord<MetuMortis> In reply to @not logged in "How would i check": Isn't there any way to load a library? IDK but I believe you can except etc
01:06:04FromDiscord<demotomohiro> How about to learn file formats of dynamic library and check a content of given file?↵Or use some tools in binutils?
01:09:06FromDiscord<Elegantbeef> Loadlib returns nil if the library cannot be loaded↵(@MetuMortis)
01:09:23FromDiscord<Elegantbeef> So it's as simple as call loadlib if it returns nil you carry on however you want
01:27:00FromDiscord<Dudugz> In reply to @demotomohiro "How about to learn": DLLs and other formats usually have headers, which are information at the beginning of the file to validate them. PNG files work like this, not sure about DLLs
01:30:12FromDiscord<auxym> https://en.wikipedia.org/wiki/Portable_Executable
01:30:54FromDiscord<auxym> we even have https://github.com/srozb/peni
01:33:29FromDiscord<auxym> on linux for ELF you can use binutils stuff or https://www.man7.org/linux/man-pages/man5/elf.5.html
01:47:20FromDiscord<T0lk1en> yo can someone help me out with nimcrypto. Having a hard time understanding it and cant wrap me head around the examples
02:13:26*beholders_eye quit (Ping timeout: 246 seconds)
02:13:36FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4nI8
02:14:54FromDiscord<T0lk1en> In reply to @T0lk1en "yo can someone help": Please
02:27:32FromDiscord<Require Support> sent a code paste, see https://play.nim-lang.org/#ix=4nIb
02:28:40FromDiscord<Require Support> (edit) "https://play.nim-lang.org/#ix=4nIb" => "https://play.nim-lang.org/#ix=4nIc"
02:47:59FromDiscord<kots> sent a code paste, see https://play.nim-lang.org/#ix=4nIg
02:58:07FromDiscord<kots> sent a code paste, see https://play.nim-lang.org/#ix=4nIi
03:02:24*dropkick joined #nim
03:27:38*arkurious quit (Quit: Leaving)
03:32:56FromDiscord<Require Support> much appreciated kind soul
03:55:30*azimut joined #nim
04:16:16*pbsds quit (Quit: The Lounge - https://thelounge.chat)
04:16:58*pbsds joined #nim
04:30:23*LyndsySimon quit (Ping timeout: 283 seconds)
04:30:35*LyndsySimon joined #nim
05:02:01*azimut quit (Remote host closed the connection)
05:02:42*azimut joined #nim
05:52:17*dropkick quit (Ping timeout: 255 seconds)
05:52:27FromDiscord<ringabout> https://media.discordapp.net/attachments/371759389889003532/1073843939452407818/image.png
05:53:08FromDiscord<ringabout> https://media.discordapp.net/attachments/371759389889003532/1073844114010935318/image.png
05:56:06FromDiscord<ringabout> `opcNodeToReg` looks quite heavy.
06:06:09FromDiscord<ringabout> It seems globals are quite slow in the nimscript, but when I put them to a function, it is faster than Python https://media.discordapp.net/attachments/371759389889003532/1073847387367419945/image.png
06:10:05FromDiscord<ringabout> It seems to apply to Python as well
06:10:11FromDiscord<ringabout> https://media.discordapp.net/attachments/371759389889003532/1073848403785687080/image.png
06:16:38FromDiscord<ringabout> https://media.discordapp.net/attachments/371759389889003532/1073850029611155456/image.png
06:17:12FromDiscord<ringabout> https://media.discordapp.net/attachments/371759389889003532/1073850168203550780/image.png
06:41:19*GreaseMonkey quit (Remote host closed the connection)
07:52:50FromDiscord<BobBBob> Is there a way to us nim without the system module? Kind of like rust no_std. Seems like no because there's a lot of fundamental stuff for the language in there.
07:53:24FromDiscord<BobBBob> (edit) "us" => "use"
07:53:31FromDiscord<Elegantbeef> Nope 2.0 will have a 'slim' mode that reduces imports
07:56:56FromDiscord<BobBBob> So what if Im doing code for an embedded thing that doesnt have a c library?
07:57:53FromDiscord<BobBBob> hypothetically speaking
07:58:10FromDiscord<Elegantbeef> I do not do stuff that wacky so i cannot say much
07:59:01FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/9399#61785
07:59:39FromDiscord<Elegantbeef> You do not need much of glibc really for basic Nim
07:59:39FromDiscord<Elegantbeef> Well i guess libc 😄
08:01:31FromDiscord<BobBBob> cool
08:02:56FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=4nIP
08:27:45FromDiscord<ringabout> Seems to be low-hanging fruits => https://github.com/nim-lang/Nim/pull/21351
08:30:33FromDiscord<ringabout> if not consideing potential performance downgrades
08:30:56FromDiscord<ringabout> (edit) "consideing" => "consider"
08:46:15*Goodbye_Vincent quit (Read error: Connection reset by peer)
08:46:56*Goodbye_Vincent joined #nim
08:48:07FromDiscord<System64 ~ Flandre Scarlet> Does the C++ backend work well?
09:28:25FromDiscord<Phil> Hmmm simple way to transform a seq I know is of length 3 into an array of length 3?
09:28:39FromDiscord<Phil> Or do I have to do it by hand?
09:29:57FromDiscord<Rika> you can prolly copymem
09:31:31FromDiscord<Elegantbeef> `myArr[0..2] = mySeq.toOpenArray(0,2)`
09:31:56FromDiscord<Elegantbeef> Actually you probably can do `mySeq` without `toOpenArray`
09:41:05FromDiscord<Phil> Ohhh I tried the range thing the other way around
09:41:07FromDiscord<Phil> Yeah that one works
09:47:54FromDiscord<tf00> sent a code paste, see https://play.nim-lang.org/#ix=4nJ9
09:48:08FromDiscord<Elegantbeef> Nim doesnt have unions
09:48:10FromDiscord<Elegantbeef> https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants\
09:48:38FromDiscord<Elegantbeef> https://github.com/alaviss/union or if you really want that type of data
09:49:36FromDiscord<tf00> Thanks Elegantbeef 🙏! I'll read both resources. Does https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants show any idiomatic Nim ways of achieving more or less the same result?
09:50:07FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nJa
09:50:26FromDiscord<tf00> Oops, I see that after you fixed the link, it sends me to the correct section 👌
09:50:38FromDiscord<Elegantbeef> Wow a matrix thread, the future is now
09:50:46FromDiscord<Elegantbeef> God i hate this thread already
09:51:04FromDiscord<tf00> Haha, it is!
09:51:14FromDiscord<tf00> Thanks!! Makes sense!
09:51:42FromDiscord<Elegantbeef> Due to how Nim doesnt force unpacking types inside of a pattern match you cannot share fields
09:51:48FromDiscord<Elegantbeef> Well field names
09:52:26FromDiscord<tf00> Yeah, it looks like a bit of extra work to test for the type and then read the correct property but it's not the end of the world
09:52:40FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/devel/compiler/ast.nim#L780-L800 might be some source of inspiration
09:53:04FromDiscord<Elegantbeef> I know it's a token vs ast, but it's in the ballpark atleast
09:53:24FromDiscord<tf00> True, cheers!
09:53:53FromDiscord<Phil> Next, do we have an Error type that is intended to cover "Shell command returned with exit code 0, some process issue happened" ?
09:54:11FromDiscord<Phil> Because that ain't a ValueError and skimming through everything else that I get suggested doesn't really seem to fit
09:54:25FromDiscord<Elegantbeef> OSError?
09:54:50FromDiscord<Phil> I didn't even get OSError suggested, yeah that fits, good to know that's a thing
09:56:00FromDiscord<Elegantbeef> But do think whether you need to raise an exception or want to block there
09:56:31FromDiscord<Phil> Define "block"
09:56:50FromDiscord<Elegantbeef> I assume you're using execShellCmd or similar
09:56:53FromDiscord<Phil> Because this is basically "Ma man, you want me to add this nim project to my overview but I can't read a nimble file from there
09:56:55FromDiscord<Phil> (edit) "there" => "there""
09:57:03FromDiscord<Phil> Aye, execCmdEx
09:57:15FromDiscord<Elegantbeef> Yea that's blocking 😄
09:57:28FromDiscord<Phil> "Blocking" as in "Blocking the process"?
09:57:34FromDiscord<Elegantbeef> Yes
09:57:55FromDiscord<Elegantbeef> My sentence was worded badly
09:58:03FromDiscord<Phil> I mean, it is an exceptional circumstance that requires exceptional intervention, so an exception seems valid
09:58:11FromDiscord<Elegantbeef> "Whether you want to raise an exception and whether you want to block there" 😄
09:58:23FromDiscord<Phil> I'm not sure what "blocking" there would look like
09:58:50FromDiscord<Elegantbeef> I was basically warning that execCmdEx is a blocking operation, so be catious
09:59:17FromDiscord<Phil> But this time blocking is meant as in "it blocks the entire thread, so gui might hang" ?
09:59:24FromDiscord<Elegantbeef> Yes
10:01:43FromDiscord<Phil> `execCmdEx("nimble dump", {poStdErrToStdOut, poUsePath}, nil, projectPath, "") can raise an unlisted exception: Exception` ↵Excuse me what?
10:02:21FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nJd
10:02:30FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4nJd" => "https://play.nim-lang.org/#ix=4nJe"
10:02:36FromDiscord<Elegantbeef> `raises: [OSError, Exception, ValueError, IOError].}`
10:02:45FromDiscord<Elegantbeef> You can handle the other ones yourself or throw them all
10:05:28FromDiscord<Phil> I'll do a CatchableError one because it doesn't matter why that parsing failed, all that matters is that it failed, reraising as OSError
10:05:45FromDiscord<Phil> (edit) "CatchableError one" => "`etry-catch-CatchableError` block"
10:05:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nJf
10:06:01FromDiscord<Elegantbeef> Or whatever error you want to use
10:06:03FromDiscord<Phil> You read my mind
10:06:08FromDiscord<Elegantbeef> Making your own error is always better
10:06:23FromDiscord<Phil> Fair
10:06:51FromDiscord<Phil> How did nim distinguish between "error" and "exception" again?
10:06:53FromDiscord<Elegantbeef> Unless the exceptions fit your purpose, it's better to be able to handle or not handle specific exceptions without overlap
10:07:24FromDiscord<Elegantbeef> A unrecoverable error should be a defect if that's what you mean
10:07:35FromDiscord<Phil> Nah, nim has as suffix exception, error and defect
10:07:45FromDiscord<Phil> Defect is error that should break the program
10:07:46FromDiscord<Rika> exception is deprecated
10:07:49FromDiscord<Rika> iirc
10:07:55FromDiscord<Rika> as in the suffix
10:07:59FromDiscord<Elegantbeef> No one should inherit from exception
10:08:01FromDiscord<Phil> So custom stuff should be suffixed as error
10:08:05FromDiscord<Rika> you should either use error or defect as a suffix
10:08:21FromDiscord<Elegantbeef> One should suffix it and inherit from the proper error
10:11:40FromDiscord<Phil> ` Error: object constructor needs an object type [object declared in /home/philipp/dev/playground/src/playground.nim(3, 6)]`↵Time to dive into the docs as apparently I need to define an error constructor
10:11:56FromDiscord<Elegantbeef> No you're just doing the inheritance wrong
10:12:02FromDiscord<Elegantbeef> How are you calling the raise?
10:12:07FromDiscord<Elegantbeef> How did you define the type?
10:13:00FromDiscord<Phil> as a ref-type, that might've been my error
10:13:05FromDiscord<Elegantbeef> Yep
10:13:27FromDiscord<Elegantbeef> You do not use `ref` if you're doing `newException`
10:13:43FromDiscord<Elegantbeef> if you do not use new exception you can since you'd do `raise myException(msg: bleh, ...)`
10:14:13FromDiscord<Elegantbeef> newException is just a bit of sugar since raising an exception that is typed with a message is most common
10:14:46FromDiscord<Phil> Dangit, CatchableError doesn't catch raw "Exception"
10:15:07FromDiscord<Elegantbeef> Of course not
10:15:07FromDiscord<Elegantbeef> `Exception` should never be raised
10:15:09FromDiscord<Elegantbeef> Cause it covers all including defects
10:15:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nJg
10:15:40FromDiscord<Phil> Then why force me to add it to my raises when Iit should never be raised?
10:15:43FromDiscord<Elegantbeef> Just to show what newException is really hiding
10:15:48FromDiscord<Elegantbeef> Cause it's raised inside the proc
10:16:00FromDiscord<Elegantbeef> Nim tracked it so now you need to use a try except to remove it from being tracked
10:16:24FromDiscord<Elegantbeef> Nim unlike java automatically annotates what a procedure raises
10:16:39FromDiscord<Elegantbeef> Somewhere inside that proc it raises a `Exception`
10:16:51FromDiscord<Elegantbeef> But anyway i now sleep
10:40:01FromDiscord<System64 ~ Flandre Scarlet> In reply to @Elegantbeef "https://github.com/alaviss/union or if you": Does it work like C unions? Does it support bitpacking? And can it be used for C interop?
10:57:45FromDiscord<Phil> Yeah so far I'm convinced that using nimble dump is the only sane way to parse nimble data on your own
11:36:46FromDiscord<Phil> Actually, scratch that, maybe I can use nimble as a library
11:50:29*jmdaemon quit (Ping timeout: 255 seconds)
12:28:54FromDiscord<planetis> In reply to @System64 "Does it work like": there is .union and .bitsize for that
12:29:03FromDiscord<turbo> What's the name for object type defs with `case` statements in them?
12:30:18FromDiscord<auxym> object variants
12:39:28*beholders_eye joined #nim
12:50:09*dnh joined #nim
13:04:55FromDiscord<auxym> sent a code paste, see https://play.nim-lang.org/#ix=4nJR
13:10:30*beholders_eye quit (Ping timeout: 268 seconds)
13:11:25FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4nJT
13:24:58FromDiscord<🍵camellia🍵> sent a code paste, see https://play.nim-lang.org/#ix=4nJZ
13:28:20*xet7 joined #nim
13:44:29FromDiscord<tf00> sent a code paste, see https://play.nim-lang.org/#ix=4nK4
13:49:34FromDiscord<Rika> nim does not have this for enums, we emulate it with object variants
13:49:47FromDiscord<Rika> see options module for the equivalent implementation
13:53:23FromDiscord<tf00> Thanks a ton!
14:10:32FromDiscord<🍵camellia🍵> i feel like a colossal clown finally realising futhark (c wrapper) is not the same as futhark (language)↵i was like "why do i need to use cuda and haskell just to import c libs"
14:11:10FromDiscord<🍵camellia🍵> not knowing about the nim project
14:16:57FromDiscord<🍵camellia🍵> sent a code paste, see https://play.nim-lang.org/#ix=4nKi
14:35:32FromDiscord<ringabout> closure types are reaaaly weird in the VM 😦
14:36:35FromDiscord<ringabout> !eval static: (var s: proc (); doAssert s == nil)
14:36:40NimBot<no output>
14:37:25FromDiscord<ringabout> !eval static: (var s: proc () = default(proc ()); doAssert s == nil)
14:37:28NimBotCompile failed: /playground/nim/lib/system/fatal.nim(54, 5) Error: unhandled exception: /usercode/in.nim(1, 54) `s == nil` [AssertionDefect]
14:38:55FromDiscord<ringabout> How should I handle closure types in the VM?
14:40:56FromDiscord<ringabout> https://media.discordapp.net/attachments/371759389889003532/1073976936449187872/image.png
14:56:32FromDiscord<enthus1ast> @treeform\: you where working on an browser \<-\> server based gui framework right? I do not find it anyhwere online, Is it somewhat usable?
14:56:46FromDiscord<enthus1ast> and is it public?
15:03:00FromDiscord<iencec> something similar to neel?
15:04:05FromDiscord<enthus1ast> i think yes
15:04:33FromDiscord<enthus1ast> but i do not remember 100%
15:08:27FromDiscord<iencec> I see. well, neel does not seem very active these days. (though they have a PR for switching jester for mummy - interesting.. 😄 )
15:17:02*arkurious joined #nim
15:34:44FromDiscord<Phil> Okay, @ringabout nimble question.↵I have come to the realization I can actually access nimble modules in my project, so I don't have to do the nimble parsing myself!↵The question is, what is the "correct" proc to hand a path to a nimble file and receive parsed output from?↵All the ones I've found want an Option object which seems incorrect to me
15:35:49FromDiscord<Phil> (edit) "Okay, @ringabout nimble question.↵I have come to the realization I can actually access nimble modules in my project, so I don't have to do the nimble parsing myself!↵The question is, what is the "correct" proc to hand a path to a nimble file and receive parsed output from?↵All the ones I've found want an Option object which seems incorrect to me ... " added "because that one's created in the CLI context"
15:36:21FromDiscord<ringabout> I know a little about nimble. What info do you want to get?
15:36:22FromDiscord<Phil> (edit) "nimble" => ".nimble-file "
15:37:22FromDiscord<ringabout> You might create a fake Option object like Option()
15:37:24FromDiscord<Phil> Basically everything written in a nimble file:↵Author, version, description, project name, dependencies and ideally also their repo-URLs etc.
15:37:44FromDiscord<Phil> Playing around with a nimble gui written in owlkettle, thus I basically need all the info
15:41:23FromDiscord<Phil> Just blank instantiating Options() sadly throws nil access issue
15:41:25FromDiscord<Phil> (edit) "issue" => "issues"
15:41:30FromDiscord<ringabout> `getPkgInfo`?
15:41:36*dnh quit (Quit: Textual IRC Client: www.textualapp.com)
15:42:11FromDiscord<Phil> Hmm was using `getPkgInfoFromFile`
15:42:59FromDiscord<Phil> Same for `getPkgInfo`
15:50:54FromDiscord<System64 ~ Flandre Scarlet> https://github.com/treeform/netty↵If I use that for the client, do I need the same thing for the server?
15:52:24FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nKU
15:52:26FromDiscord<Phil> I'm not sure of the context, initially: What the browser is based on and what the server is based on should be independent, assuming you're not having a framework somewhere
15:52:58FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nKV
15:54:00FromDiscord<enthus1ast> @System64 ~ Flandre Scarlet\: yeah
15:54:27FromDiscord<enthus1ast> or you speek the protocol netty uses by yourself
15:54:54FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nKW
15:55:04FromDiscord<ringabout> Looks right to me
15:55:18FromDiscord<auxym> In reply to @System64 "https://github.com/treeform/netty If I use": yes, its using its own protocol
15:55:34FromDiscord<System64 ~ Flandre Scarlet> In reply to @auxym "yes, its using its": Ah alright↵So if I use that, the server is Nim too?
15:55:38FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nKZ
15:56:00FromDiscord<ringabout> You can use absolute path for it.
15:56:23FromDiscord<ringabout> Then `expandFilename` is not needed.
15:56:38FromDiscord<ringabout> (edit) "You can use ... absolute" added "an"
15:57:55FromDiscord<auxym> In reply to @System64 "Ah alright So if": yes? I'm not sure I understand. The server would be a nim program also running netty.
15:58:26FromDiscord<System64 ~ Flandre Scarlet> Oh alright, good to know↵Seems it's optimized for games
15:59:49FromDiscord<auxym> @ringabout that seems pretty useful. Could we maybe export a single easy-to-use proc from nimble's toplevel that does this work? If needed I can make the PR (copy pasting your code though haha)
16:00:08FromDiscord<enthus1ast> yes! +1
16:00:38FromDiscord<auxym> In reply to @System64 "Oh alright, good to": yes. Treeform has a recent talk on YT on how all his packages can be integrated together to makes games from scratch in nim
16:01:19FromDiscord<ringabout> In reply to @auxym "<@658563905425244160> that seems pretty": Yeah, I fully agree with you.
16:01:34FromDiscord<ringabout> PR is appreciated!
16:01:56FromDiscord<Phil> In reply to @auxym "<@658563905425244160> that seems pretty": Please, I'm trying to replicate that example and struggling
16:02:08FromDiscord<Phil> It keeps complaining that the file doesn't exist
16:02:45FromDiscord<ringabout> In reply to @Isofruit "It keeps complaining that": Did you use a full path?
16:02:49FromDiscord<ringabout> what's your code?
16:02:51FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nL4
16:04:15FromDiscord<ringabout> In reply to @Isofruit "It keeps complaining that": Let me try out Linux
16:04:48FromDiscord<System64 ~ Flandre Scarlet> In reply to @auxym "yes. Treeform has a": Can be interesting hummm↵Oh god, that's complex, no idea for what language for my backend for my final school project↵I will use Nim for the frond for sure, but what for the back??↵I'm hesiting between NodeJS, Python, Go and Nim
16:05:23FromDiscord<Phil> In reply to @System64 "Can be interesting hummm": I have only cursory glanced, is this about webdev? Webpages?
16:05:31FromDiscord<System64 ~ Flandre Scarlet> In reply to @Isofruit "I have only cursory": Video Game
16:05:37FromDiscord<ringabout> @Phil hi, btw what's your OS?
16:05:41FromDiscord<Phil> Arch
16:06:04FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nL5
16:06:20FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4nL5" => "https://play.nim-lang.org/#ix=4nL6"
16:08:47FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nL8
16:09:09FromDiscord<Phil> Just removed the author field earlier, you can add it back in
16:09:18FromDiscord<Phil> (edit) "earlier," => "earlier when posting to here,"
16:09:20FromDiscord<ringabout> I added it back, it works for me
16:09:34FromDiscord<Phil> when running nimble play?
16:09:38FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nL9
16:09:53FromDiscord<ringabout> Btw, I use cloned nimb;e
16:10:01FromDiscord<ringabout> (edit) "Btw, I use ... clonednimble," added "latest" | "nimb;e" => "nimble,"
16:11:39FromDiscord<Phil> Meanwhile for me it created a new random error
16:11:50FromDiscord<Phil> `/home/philipp/.nimble/pkgs/nimble-0.14.1/nimblepkg/tools.nim(11, 14) Error: cannot open file: compiler/nimblecmd` when running nimble play
16:12:03FromDiscord<ringabout> `nimble install nimble` works for me too,
16:12:19FromDiscord<ringabout> In reply to @Isofruit "`/home/philipp/.nimble/pkgs/nimble-0.14.1/nimblepkg": You need to install the Nim compiler as a library.
16:12:22FromDiscord<Phil> Doesn't work for me either
16:12:23FromDiscord<ringabout> `nimble install nim`
16:13:30FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nLb
16:13:57FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nLc
16:14:17FromDiscord<Phil> Maybe I just already have it installed
16:14:20FromDiscord<Phil> Hopefully that's the reason
16:14:50FromDiscord<ringabout> What's your Nim version?
16:15:09FromDiscord<Phil> 1.9.1
16:15:45FromDiscord<ringabout> https://media.discordapp.net/attachments/371759389889003532/1074000796976435300/image.png
16:16:01FromDiscord<ringabout> I encouter the same problem, but `nimble install compiler` or `nimble install nim` works for me.
16:16:06FromDiscord<ringabout> (edit) "encouter" => "encoutered"
16:16:24FromDiscord<ringabout> You might try `nimble install nim --debug`.
16:18:48FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nLe
16:22:46FromDiscord<Phil> I straight up don't understand what's wrong on my end.↵`echo expandFilename("playground.nimble").readFile()` this works.↵`echo getPkgInfoFromFile(expandFilename("playground.nimble"), opt)` this breaks
16:23:09FromDiscord<ringabout> Are there any stacktraces?
16:23:52FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nLg
16:24:11FromDiscord<Phil> I don't regard a line that doesn't even tell me what it can't find a stacktrace
16:24:42FromDiscord<ringabout> remove `-d:release`
16:25:37FromDiscord<ringabout> There are no stacktraces if that switch is enabled.,
16:27:27FromDiscord<Phil> That one I wasn't aware of, huh
16:27:36FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nLj
16:28:09FromDiscord<ringabout> Btw, it is better to remove other options like `--outdir:.` for debugging purposes.
16:28:34FromDiscord<ringabout> Which might cause troubles
16:28:56FromDiscord<ringabout> (edit) "Btw, it is better to remove other options like `--outdir:.` ... for" added "etc."
16:30:44FromDiscord<ringabout> > 0.14.1/nimblepkg/packageinfo.nim(488) iterInstallFiles
16:30:55FromDiscord<Phil> I inserted an echo before the line inside of `iterInstallFiles` that breaks:↵` echo "Bad evil file: ", file.repr`↵Lead to:↵`Bad evil file: 0x7f5f32af94c0"/home/philipp/dev/playground/src/resources"`
16:31:17FromDiscord<Phil> I don't quite get where it's getting that dir from
16:32:15FromDiscord<Phil> ... its the fact I have subfolders that is breaking me
16:32:47FromDiscord<Phil> so I have a folder `src/resources` or `src/whatever` and somehow it is passing that on ?
16:33:34FromDiscord<Phil> Ohhhhhhhhhh the binary is under src/
16:33:42FromDiscord<Phil> Wait but that shouldn't change things
16:37:08FromDiscord<ringabout> Probably try with `setNimbleDir(opt)`?
16:38:12FromDiscord<Phil> That did it.↵The error was likely because nimble transforming the `.nimble` filepath in an unexpected way to me
16:39:01FromDiscord<ringabout> In reply to @Isofruit "That did it. The": Nice, it is definitelt deserves an API or a nimble package or a post on the stackflow/forum/
16:39:01FromDiscord<Phil> But dang it is slow
16:39:10FromDiscord<ringabout> (edit) "definitelt" => "definitely" | "stackflow/forum/" => "stackflow/forum."
16:39:58FromDiscord<ringabout> release?
16:41:05FromDiscord<Phil> Yeah, that makes it bearable, goes down from like 5+ seconds to 1-2
16:41:09FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4nLq
16:41:35FromDiscord<Phil> (edit) "1-2" => "1"
16:41:43FromDiscord<ringabout> My benchmark shows that in my case, it uses 42ms to parse the nimble file.
16:42:30FromDiscord<Phil> I think for me it was from compiling to echo with a rate-limited CPU and no --define:release, all of those made it take like 5 secs#
16:42:48FromDiscord<Phil> Removing the limiter (which I had there to save power) and with the release flag made it useable
16:43:32FromDiscord<ringabout> I use `echo` too. Today I found `hyperfine` is really handy.
16:46:36FromDiscord<ringabout> There is probably a nimble package for reading info, irrc
16:48:09FromDiscord<ringabout> https://github.com/openpeep/pkginfo
16:48:28FromDiscord<ringabout> It doesn't seem to use nimble API, though.
16:48:45FromDiscord<Phil> I had looked before, but apparently I did it incorrectly
16:49:02FromDiscord<Phil> Yeah given I want to make a frontend for nimble I think it makes sense to couple myself to nimble directly
17:01:10*xet7 quit (Remote host closed the connection)
17:03:24*PMunch joined #nim
17:03:46FromDiscord<Phil> Okay, another thing that gets confusing is when your vscode tasks that execute on save literally just use nim 1.6.10 when your CLI version is 1.9.1
17:09:28FromDiscord<ringabout> That's weird.
17:11:41FromDiscord<Phil> I assume it's vscode doing some assumption somewhere
17:15:00PMunchMaybe it's chosen on install-time of the plugin?
17:15:34*onetwo joined #nim
17:16:41FromDiscord<treeform> In reply to @lantos "Hey <@107140179025735680> ": I am not sure what you mean. You want obj to be in a seq when you parse even though its not in a seq but just a single item in the data json? Do you want it to optimally parse Cat some times but as seq[Cat] when data has it that way? Through hooks everything is totally possible. I just don't understand what you need.
17:17:20FromDiscord<treeform> In reply to @enthus1ast "<@107140179025735680>\: you where working": Sorry its not public, it was not very good and I want to take another stab at it.
17:18:55FromDiscord<treeform> In reply to @System64 "https://github.com/treeform/netty If I use": Yes, netty speaks its own protocol, both sides have to understand it.
17:21:54PMunch@camellia, yeah I tried to not conflict with anything relevant. Only after it was released was I made aware of the language..
17:34:01FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nLC
17:34:42FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4nLC" => "https://play.nim-lang.org/#ix=4nLE"
17:35:31FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4nLE" => "https://play.nim-lang.org/#ix=4nLF"
17:38:11FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=4nLH
17:38:31FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=4nLH" => "https://play.nim-lang.org/#ix=4nLI"
17:40:41*derpydoo quit (Quit: derpydoo)
17:45:19*derpydoo joined #nim
18:01:32FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nLO
18:05:11FromDiscord<Phil> Yeah I'm circumventing the problem by not serializing that data, I'll just serialize the nimble filepath
18:07:51FromDiscord<System64 ~ Flandre Scarlet> In reply to @treeform "Yes, netty speaks its": And I can embed binary data inside?
18:10:36FromDiscord<albassort> Does web ASM have a dichotomy between executables and library files like C
18:10:53FromDiscord<albassort> Do I need to make sure I'm compiling it to the library so I could use its functions in JS?
18:11:05FromDiscord<albassort> (edit) "the" => "a"
18:13:45FromDiscord<albassort> I made my functions public, hope that's enough
18:18:01FromDiscord<treeform> In reply to @lantos "Yeah the json response": Here you go, this should work: https://gist.github.com/treeform/4b1e85dab83217e3807315d64f3a5cd7
18:19:21FromDiscord<treeform> In reply to @System64 "And I can embed": Yes, that is what I send. I most flatty to send packets with netty: https://github.com/treeform/flatty
18:21:19FromDiscord<System64 ~ Flandre Scarlet> In reply to @treeform "Yes, that is what": Oh god, that means it can take an object, turn it into binary and then I can send it?
18:21:31FromDiscord<treeform> In reply to @Isofruit "Okay this is weird": Can you make a simpler rero case and open up a jsony bug?
18:21:51FromDiscord<treeform> In reply to @System64 "Oh god, that means": yes, if its a big object i also compress it
18:22:14FromDiscord<System64 ~ Flandre Scarlet> wow! and it can restore the object on the client?
18:22:22FromDiscord<treeform> In reply to @System64 "wow! and it can": yes
18:22:36FromDiscord<System64 ~ Flandre Scarlet> Oh my god!
18:22:48FromDiscord<treeform> just toFlatty on server send, fromFlatty on client side
18:22:50FromDiscord<Phil> In reply to @treeform "Can you make a": I think this is the simplest I'm aware of. I'm also not certain it's a bug, it's just that this is an object within an object within an object and all of them have a fair amount of field and I don't know which things need hooks or what. At most the fault I see I think would be that the information what is missing could be more complete
18:23:17FromDiscord<System64 ~ Flandre Scarlet> In reply to @treeform "just toFlatty on server": This is incredible! it also supports inheritence too?
18:23:43FromDiscord<treeform> In reply to @Isofruit "I think this is": I don't remember seeing "The following fields must be initialized" is that a new Nim thing?
18:23:50FromDiscord<Phil> No clue
18:24:01FromDiscord<Phil> I thought it was a jsony error message up until 5 seconds ago
18:24:49FromDiscord<treeform> In reply to @System64 "This is incredible! it": I don't know, try it. I don't use classes or methods... so its probably untested.
18:25:34FromDiscord<System64 ~ Flandre Scarlet> might worth to try
18:25:59FromDiscord<System64 ~ Flandre Scarlet> But I think I'll go fully on Nim then
18:27:19FromDiscord<treeform> if it does not open up a Issue and I'll fix it.
18:27:39FromDiscord<System64 ~ Flandre Scarlet> Alright!↵I might use it for my school work
18:31:43FromDiscord<lantos> In reply to @treeform "Here you go, this": thanks ❤️ ↵↵I was just starting to make an xmly version of jsony better ask before diving into it, have you already got a jsony xml version?
18:39:11FromDiscord<treeform> I have started one, big problem is that XML maps poorly to data structures programmers like to use.
18:42:33FromDiscord<lantos> In reply to @treeform "I have started one,": Yeah haha, thats why I've done something like this xmlStr -parseXml-> json -xml2Json-> jsonStr -jsony-> nimObject
18:42:59FromDiscord<lantos> (edit) "nimObject" => "nimObject↵that way I get the nice jsony rename/parseHooks"
18:43:04FromDiscord<lantos> (edit) "rename/parseHooks" => "rename/parse Hooks"
18:43:13FromDiscord<lantos> (edit) "xmlStr -parseXml->" => "xmlStr-parseXml->"
18:46:07FromDiscord<lantos> wait are you referring to the xmlSchema or just xml?↵↵but also kind of left to the api response given. I did some CRS tax reporting xml thing that I ended up solving by converting the schema into json/yaml
18:46:19FromDiscord<lantos> (edit) "wait are you referring to the xmlSchema or just xml?↵↵but also kind of left ... to" added "up"
19:18:13FromDiscord<turbo> What's an easy way to split a sequence into smaller sequences (in order) of a defined length/stride or less (e.g. `[a, b, c, d, e] -> [[a, b], [c, d], [e]]`
19:23:21*xaltsc joined #nim
19:27:16FromDiscord<Phil> Okay, what is this error:↵`Error: The PackageInfo type requires the following fields to be initialized: metaData.`↵It's blocking me now in other matters as well
19:39:46FromDiscord<treeform> In reply to @lantos "Yeah haha, thats why": https://github.com/treeform/taggy not done yet though
19:41:09FromDiscord<lantos> In reply to @treeform "https://github.com/treeform/taggy not done yet": ooo
19:41:32FromDiscord<lantos> Ohhh I see, your doing metamagic
19:44:40FromDiscord<treeform> Yes
20:01:17FromDiscord<treeform> but I don't know, again XML just does not map well to programmer data structures
20:27:38FromDiscord<albassort> In reply to @turbo "What's an easy way": sequtils distirbuye
20:27:43FromDiscord<albassort> (edit) "distirbuye" => "distributive"
20:29:01FromDiscord<albassort> (edit) "distributive" => "distribute"
20:36:43*Zevv joined #nim
20:43:45*derpydoo quit (Quit: derpydoo)
20:43:48FromDiscord<Phil> Okay, vscode tasks randomly refusing to use packages from nim 2 when I'm running a `nim c` command is getting beyond annoying
20:44:05FromDiscord<Phil> (edit) "command" => "task"
20:48:31FromDiscord<albassort> vscode no longer works on nim
20:48:32FromDiscord<albassort> for me
20:48:35FromDiscord<albassort> i've accepted this
20:49:15PMunchReally?
20:50:01FromDiscord<albassort> im on #head
20:50:20FromDiscord<albassort> it the error highlighting barely functions
20:50:24FromDiscord<albassort> and y'know what? fuck it
20:50:31FromDiscord<albassort> i dont need it anyway
20:51:11FromDiscord<turbo> Works perfectly for me with Nim 2
20:52:02FromDiscord<albassort> is nim 2 out
20:52:03FromDiscord<albassort> nannde
20:52:39FromDiscord<albassort> nim 2 not out
20:52:39FromDiscord<albassort> fuck iu
20:55:08FromDiscord<Goat> Nim 2: Electric Boogaloo
20:59:04PMunchHmm, this is pretty serious
20:59:13PMunchVSCode has long been the best editor
20:59:32PMunchIf that falters we don't really have any equally good option
21:01:00om3gavscode eats a lot of cpu on both my computers
21:01:18om3gaand nimsuggest has latency issues with vscode
21:02:16om3gawhy every microsoft product after couple of releases transforms to slow unresponsive software
21:08:18Amun-Ragiven type Type, how can I get the sizeof one of it's members? (compile time)
21:10:15PMunchom3ga, I would guess corporate gets ahold of it and they start adding in tracking/telemetry, integrate with other MS features/tools, etc.
21:10:22PMunchAnd it just slowly bogs down
21:11:26*jmdaemon joined #nim
21:11:27PMunchAmun-Ra, `sizeof(MyType.member)`
21:11:36om3gaPMunch: this is the reason why I hate microsoft
21:11:38PMunchhttps://play.nim-lang.org/#ix=4nME
21:11:39Amun-Rahmm, that simple?
21:11:52PMunchWhy, you expect things to be hard in Nim?
21:12:13Amun-Raright :)
21:12:42om3gabtw VScode is opensource?
21:12:48Amun-RaPMunch: thanks, that was so obvious…
21:12:54Amun-Raom3ga: yes
21:13:20om3gaAmun-Ra: yeah, I opened their git
21:13:38Amun-Raom3ga: although VSCode includes some MS blobs, VSCodium is open source in 100%
21:14:06om3gaI like Geany, but code highlighting in VScode is better
21:14:27Amun-RaI'm using vscode/nvim 60/40% of the time
21:14:29om3gaso in case if VSCodium is the same, I would try it
21:14:31Amun-RaI use*
21:14:33FromDiscord<albassort> @Beef Broccoli https://media.discordapp.net/attachments/371759389889003532/1074075995281305640/image.png
21:14:46FromDiscord<albassort> how does one get emacsripten to export my functions
21:15:04Amun-Raom3ga: I'm not aware if all plugins made by MS itself are available in codium
21:15:21om3gaAmun-Ra: that popup help annoys me little bit
21:15:35Amun-Raom3ga: hmm, what popup?
21:16:09om3gakinda help window that appears when you point the mouse arrow on object or the var
21:17:37Amun-Raah
21:18:26Amun-Rayou can change the delay
21:19:14om3gayeah., I'm just too lazy for tweaking
21:19:47Amun-Rasame here
21:19:51om3gaalso the place where it appears always hides what I type
21:20:48Amun-Rafor me the biggest con of vscode is lack of replace mode
21:21:24om3gawhat is it?
21:21:36FromDiscord<Array in ∀ Matrix> i stopped hosting my projects on github and using github integration with vscode maybe i should give vscodium another try
21:22:03Amun-Raom3ga: replace mode in vim replaces character under the cursor, does not shift characters on the right
21:22:35om3gaAmun-Ra: you mean like insert button does?
21:22:54Amun-Raom3ga: are you familiar with vim?
21:23:15om3ganot really, but with vi- pretty familiar
21:23:23om3gaI understand what you mean
21:23:50Amun-Rait works the same in vi, press insert once more to switch from insert mode to replace mode
21:24:11om3gayeah, that's what I initially thought
21:24:44Amun-Rathere's vim plugin in vscode repo, I've never used it
21:51:08FromDiscord<emanresu3> sent a code paste, see https://play.nim-lang.org/#ix=4nMN
21:51:45FromDiscord<emanresu3> I don't think it should be Option[T] because it would require the user to pass optional types
21:51:56FromDiscord<emanresu3> but a lot of methods also seems weird
21:52:32FromDiscord<Elegantbeef> a `static set[RangeFlag]` or similar
21:52:51FromDiscord<Elegantbeef> Then either raise an error or return a bool or whatever yo uneed
21:53:29FromDiscord<emanresu3> how does that work? do you have the documentation?
21:54:07FromDiscord<Elegantbeef> static are known at compile time so you can check if there are three values
21:54:12FromDiscord<Elegantbeef> I do not know exactly what this is for
21:55:37FromDiscord<emanresu3> Is a helper function in Julia, when the function `range()` is specificed with less arguments
21:57:01FromDiscord<emanresu3> ok, but i'd like to have a boolean for each case if the arguments were passed or not so I can do that logic
21:57:41FromDiscord<emanresu3> But if that's not idiomic Nim, then what would be the alternative?
22:02:20FromDiscord<Elegantbeef> I mean why do you need runtime checks for parameters
22:02:22*greaser|q joined #nim
22:03:38*greaser|q quit (Changing host)
22:03:38*greaser|q joined #nim
22:03:58*greaser|q is now known as GreaseMonkey
22:06:15PMunchIs there a type in Nim which would better capture the concept of `or`-ing special values in C?
22:09:49FromDiscord<Elegantbeef> Bitset
22:09:51FromDiscord<Elegantbeef> 😄
22:10:05FromDiscord<Elegantbeef> Otherwise distinct type for your types
22:11:24FromDiscord<emanresu3> sent a code paste, see https://paste.rs/V2L
22:11:51FromDiscord<emanresu3> but on that note, can I make named-only parameters in Nim?
22:13:41FromDiscord<emanresu3> I mean a parameter which you have to call with its name
22:13:41FromDiscord<Elegantbeef> I'm so confused what the purpose of this is
22:16:31FromDiscord<emanresu3> I'm trying to rewrite the range feature of Julia in Nim. It lets you create vector of a specific start step and length (1\:2\:10 -\> [1,3,5,7,9]), and on Range.jl there's this helper function that throws an error according to the arguments passed
22:16:53FromDiscord<albassort> is there anyway to compile nim to a JS library
22:16:59FromDiscord<albassort> i want my functions to be in there
22:17:01PMunch@Elegantbeef, for wrapping C libraries
22:17:10FromDiscord<albassort> without having messed up names
22:18:18FromDiscord<jmgomez> can you check from nim the length of an arbitrary array in c? Trying to see if I can get the length of a vtable
22:19:14FromDiscord<albassort> In reply to @jmgomez "can you check from": no because nim arrays become unchecked arrays
22:19:24FromDiscord<albassort> (edit) "nim" => "c"
22:19:39FromDiscord<jmgomez> In reply to @albassort "without having messed up": exportc?
22:19:58FromDiscord<albassort> is this what i've been missing
22:19:59FromDiscord<albassort> o.o
22:20:07FromDiscord<jmgomez> In reply to @albassort "no because c arrays": So I guess I need to traverse it and check for nullability hmm
22:21:02FromDiscord<albassort> be normal and do it the c way lol
22:21:17FromDiscord<albassort> like god intended
22:22:31PMunchHmm, set isn't compatible
22:24:13PMunchOh wait, it is
22:24:14PMunchKinda
22:24:52PMunchSizeof doesn't match
22:25:34Amun-Rajmgomez: you can't do that in C, too
22:26:15PMunchAnd you can't go above the 16 bit limit
22:27:03PMunchNo idea what C output it makes though
22:27:16PMunchIt might have a type mismatch with a C int
22:27:47PMunchOh wait, no it doesn't work
22:27:52PMunchHmm, bummer
22:27:59PMunchThe bits would be in the wrong places
22:28:50PMunch@jmgomez, how would you expect that to work?
22:29:53Amun-Rathe problem with arrays in C is you can't pass an array to function and retain the type, it becomes the pointer to the first element
22:31:25Amun-Raint(*)[3] becomes int*
22:32:07FromDiscord<Elegantbeef> Distinct type and or the data pmunch
22:32:51PMunch@Elegantbeef, how would a distinct type help?
22:33:05FromDiscord<Elegantbeef> Yea this doesnt require runtime checks though
22:33:17FromDiscord<Elegantbeef> It's more sane than oring integers together
22:33:43PMunchWell if the C interface expects or'ed integers I kinda have to supply that
22:34:02FromDiscord<Elegantbeef> Distinct types are interopable with their base type
22:34:08PMunchI mean in Nim I'd use an enum and a set
22:34:08FromDiscord<Elegantbeef> It's just a bit of sanity
22:34:24FromDiscord<Elegantbeef> You can also just convert a nim set to a C set on call
22:34:37PMunchSure an enum and a distinct int with procedures to generate it from those enum values would work
22:34:43FromDiscord<jmgomez> Im not verse in C, my subset of C++ doesnt really include C :P. Im getting the vtable like so: `proc getVTable(obj : UObjectPtr) : VTablePtr {. importcpp: "(void)#".}`↵I want to traverse and look for the address of the functions so on the next reload I can check if I need to replace it (I know the functions names and if the user modify it or not)
22:34:50FromDiscord<Elegantbeef> https://github.com/beef331/nimassimp/blob/master/src/assimp.nim#L232-L284 this mess
22:35:11FromDiscord<jmgomez> (edit) "Im not verse in C, my subset of C++ doesnt really include C :P. Im getting the vtable like so: `proc getVTable(obj : UObjectPtr) : VTablePtr {. importcpp: "(void)#".}`↵I want to traverse and look for the address of the functions so on the next reload I can check if I need to replace it (I know the functions names and if the user modify it or not)" => "sent a code paste, see https://play.nim-lang.org/#ix=4nMZ"
22:35:11FromDiscord<Elegantbeef> the vtable likely doesnt have a terminator
22:35:16FromDiscord<Elegantbeef> So there isnt any way of knowing whether you need to change it
22:35:39FromDiscord<Elegantbeef> Objects either point to their vtable or store the index of their element
22:35:58PMunch@Elegantbeef, why have the LUT instead of giving those values to the enum entries explicitly?
22:36:13FromDiscord<Elegantbeef> Cause there are overlapping bits
22:36:22PMunchAh right
22:36:25FromDiscord<Elegantbeef> Atleast iirc there were
22:36:52PMunchWait
22:36:55PMunchThat shouldn't matter
22:37:04FromDiscord<Elegantbeef> For nim bitsets?
22:37:11PMunchA long as you don't have duplicate values
22:37:12FromDiscord<jmgomez> In reply to @Elegantbeef "the vtable likely doesnt": and there is no way to know when it finish? Even checking by the element? I tried to replace it all but was causing some issues. I think UE does it too when HR but I may be missing something
22:37:23FromDiscord<Elegantbeef> That's what i mean pmunch
22:37:34PMunchAh, probably the issue you ran into is that your values are too big to fit in a Nim set
22:37:49FromDiscord<Elegantbeef> if you need `0b11` for one flag and `0b10` it's an issue iirc
22:39:39PMunchApart from 0x00004000 missing you should be able to just convert the set to an int and pass it on
22:40:09PMunchAnd that's easy to get around by just assigning a number one higher that it's supposed to be to 0x00008000
22:40:32FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nN0
22:40:56PMunchYeah
22:47:44PMunch@Elegantbeef, compare this: https://play.nim-lang.org/#ix=4nN4
22:47:52PMunchTo this: https://play.nim-lang.org/#ix=4nN3
22:49:00PMunchBut this only works because each value only sets a single bit
22:49:15FromDiscord<Phil> er.... do we actually have a preferred naming scheme for files in nim?↵Like prefer camelcase, snake-case or whatever?
22:49:28FromDiscord<Phil> I know for variables, just not sure for files
22:49:37FromDiscord<Phil> (edit) "I know ... for" added "we do"
22:50:04PMunchI guess you could have an enum of all the bits, and then sets with the sub-bits for each value, then you could add together the various sets
22:50:20PMunch@Phil, like source files?
22:50:26FromDiscord<Phil> Aye
22:50:33PMunchAll lowercase is the norm
22:50:39PMunchAs in strutils.nim
22:50:42FromDiscord<Phil> project_top_bar vs projecttopbar vs projectTopBar
22:50:47PMunchNot strUtils.nim
22:52:13PMunchAlthough now that imports are also style insensitive it doesn't matter as uch
22:52:15PMunchmuch*
22:52:32FromDiscord<Elegantbeef> Yea i know pmunch i think it might have been that i dislike not being able to make sensible arrays with it, do not recall
22:52:43FromDiscord<Elegantbeef> There was a reason i did it
22:53:18PMunchSensible arrays?
22:53:31FromDiscord<Elegantbeef> Contiguous arrays
22:54:41FromDiscord<Elegantbeef> I do not recall at this moment so... yea 😄
23:15:59PMunchHmm, any way to get a good sloc count for .h files in a GitHub repo?
23:28:35FromDiscord<hotdog> In reply to @PMunch "Hmm, any way to": Clone the repo and run https://github.com/AlDanial/cloc
23:29:06PMunch@hotdog, thanks, but I already got a rough estimate with some bash magic
23:29:38PMunchA simple find with -exec cat and some sed statements to prune out comments and empty lines, passed through wc -l and voila
23:30:27PMunchAlso did a test with `sort | uniq` and there was a surprising amount of equal lines, mostly end brackets I would guess, not sure if people normally count those or not.
23:30:58FromDiscord<turbo> GitHub uses Linguist, but we use code size, not lines to compute the language stats. For offline analysis, I recommend tokei, which is fast (the fastest) and accurate.
23:42:59PMunchMan GitHub search sucks..
23:43:18PMunchSearched for `coap` amongst my existing repositories, no matches
23:43:21FromDiscord<System64 ~ Flandre Scarlet> @kraptor Hi! I saw you already ImGUI for Nim, do you know how can I draw a picture on a window please? (I have an array of uint8 that rapresents the picture)
23:43:25PMunchThe repo is called libcoap..
23:45:34FromDiscord<Yandall> Hello. Which library is good to
23:46:17FromDiscord<Yandall> Hello, which library is good to make CRUD actions to a postgres DB?
23:47:00FromDiscord<jmgomez> In reply to @jmgomez "and there is no": Turns out just replacing the vtable with the new one seems to work for most functions. UE must be doing something else on the ones that doesnt update but at least this seems to be the right direction