<< 22-06-2020 >>

00:03:41FromDiscord<Yardanico> Why
00:03:52FromDiscord<Yardanico> You can have userbots in telegram
00:06:34FromDiscord<kaletaa> i'm not sure if any of the libraries support interacting with those buttons
00:06:37FromDiscord<kaletaa> and quizzes
00:06:47FromDiscord<kaletaa> and the other misc stuff durov jammed into telegram
00:07:04FromDiscord<kaletaa> v https://media.discordapp.net/attachments/371759389889003532/724415118842134596/unknown.png
00:07:11FromDiscord<kaletaa> https://media.discordapp.net/attachments/371759389889003532/724415148818956298/unknown.png
00:07:14FromDiscord<kaletaa> i'm not sure what you call those
00:08:17FromDiscord<Yardanico> @kaletaa yeah of course they do, not in Nim though (since I didn't make my telenim into something easily usable yet)
00:08:25FromDiscord<Yardanico> But you can check Python libs for example
00:08:34FromDiscord<Yardanico> Telethon, pyrogram, etc
00:08:43FromDiscord<kaletaa> yeah those have great support
00:09:07FromDiscord<Yardanico> Well they support the full user API too
00:09:13FromDiscord<kaletaa> yeah it doesn't seem like a hard task
00:09:17FromDiscord<kaletaa> it just seems tedious
00:11:20*vikfret quit (Quit: Leaving)
00:12:31*vicfred quit (Quit: Leaving)
00:14:30*vicfred joined #nim
00:18:00FromDiscord<j-james> Hmm so↵This is probably a dumb question↵But how can I call a different Nim program in the same directory
00:18:35FromDiscord<j-james> Is the only way to `import` it↵And call its functions
00:22:05FromDiscord<Yardanico> Not sure what you mean
00:22:24FromDiscord<Yardanico> You can compile the program into the binary and execute it as a binary instead if that's what you want
00:22:35FromDiscord<Yardanico> From another program
00:25:49FromDiscord<j-james> Yeah I phrased that badly
00:26:09FromDiscord<j-james> Can you import functions from other Nim files?
00:26:26FromDiscord<Yardanico> Yes?
00:26:38FromDiscord<Yardanico> you maybe mean you want to fully qualify the module name?
00:26:55FromDiscord<Yardanico> Like "module.work()" instead of "work()"?
00:27:26FromDiscord<j-james> Thanks↵I think I was just doing it wrong
00:27:35FromDiscord<j-james> (edit) 'I' => 'that was ' | removed 'that'
00:33:23FromDiscord<kaletaa> i didn't know about that `from module import nil` feature
00:33:31FromDiscord<kaletaa> it's epic
00:37:11FromDiscord<Yardanico> Well kinda
00:37:17FromDiscord<Yardanico> You know you can qualify even without that?
00:37:42FromDiscord<Yardanico> !eval import strutils; echo strutils.split("hello would")
00:37:45NimBot@["hello", "would"]
00:37:54FromDiscord<Yardanico> *world
00:38:09zedeusyeah it breaks operator overloading and UFCS while making your code longer, very epic
00:38:17FromDiscord<Yardanico> ^^
00:38:36FromDiscord<kaletaa> lmao
00:38:41FromDiscord<Yardanico> You can just import the normal way and fully qualify for stuff you want
00:39:58*oddp quit (Ping timeout: 260 seconds)
00:40:56*dsrw joined #nim
00:45:55*dsrw quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:46:27FromDiscord<Skaruts> is this how a sequence can be converted to a C array: `cast[ptr Vertex](vertices)`?
00:46:30FromDiscord<Skaruts> I'm trying to give it to this function: <https://github.com/oprypin/nim-csfml/blob/master/src/csfml/private/graphics_gen.nim#L5028>
00:46:31FromDiscord<Skaruts> which takes `ptr Vertex`
00:46:41FromDiscord<Skaruts> proc*
00:47:29FromDiscord<exelotl> @Skaruts cast[ptr UncheckedArray[Vertex]](vertices) ?
00:47:50FromDiscord<Skaruts> gonna try that
00:48:09FromDiscord<Yardanico> @Skaruts not like that
00:48:22FromDiscord<Yardanico> Nim sequence is by default len, cap, pointer to data
00:48:26FromDiscord<exelotl> Oh sorry, you just wanna do addr vertices[0]
00:48:33FromDiscord<Yardanico> Yeah, that'll work
00:48:38FromDiscord<Skaruts> oh
00:48:43FromDiscord<Skaruts> yea that makes sense
00:48:44FromDiscord<exelotl> But the thing I wrote is how they should've defined their function
00:49:01FromDiscord<exelotl> (probably)
00:49:14FromDiscord<exelotl> (Maybe)
00:49:24FromDiscord<Yardanico> csfml wasn't really updated for a few years but I think it still works
00:49:37FromDiscord<Skaruts> it does work, yea 🙂
00:52:06FromDiscord<Skaruts> shouldn't wrappers abstract types though? Like, for example that proc could be defined to take `openarray` and do the conversion itself
00:52:20FromDiscord<Skaruts> abstract type conversions*
00:52:49FromDiscord<exelotl> Oh yeah you're right that would be way better
00:53:21FromDiscord<Skaruts> I find myself writing many templates to abstract stuff like this, also for int->cint conversions...
00:53:36FromDiscord<Skaruts> not just with csfml
00:53:43FromDiscord<Yardanico> Well it depends on the library
00:53:53FromDiscord<Yardanico> E.g. gintro abstracts quite a lot of stuff
00:54:01FromDiscord<Yardanico> It's much nicer than using the raw GTK api
00:54:43FromDiscord<Skaruts> imo it makes usage smoother
00:55:13FromDiscord<Skaruts> well the thing I'm doing still doesn't work... but at least I got the array thing sorted
00:55:17FromDiscord<Skaruts> thanks guys
01:03:50*ynfle joined #nim
01:05:54ynfleIs there a sane way to test macros?
01:08:50ynfleOr .compileTime procs
01:14:54*ynfle quit ()
01:52:25*chemist69 quit (Ping timeout: 272 seconds)
01:53:43*chemist69 joined #nim
02:28:11*nikita_ joined #nim
02:31:02*nikita` quit (Ping timeout: 260 seconds)
02:37:39*endragor joined #nim
02:38:12*Zectbumo joined #nim
02:47:19*muffindrake quit (Ping timeout: 244 seconds)
02:49:13FromDiscord<Varriount> ynfle: Other than writing code that uses the macros?
02:49:38*muffindrake joined #nim
02:59:33*Senny quit (Ping timeout: 272 seconds)
03:15:52*casaca quit (Remote host closed the connection)
03:16:40*waleee-cl quit (Quit: Connection closed for inactivity)
03:24:45*leorize joined #nim
03:28:03FromDiscord<Technisha Circuit> 1015 members in the discord rn
03:28:08Yardanicoyes I know
03:28:14Yardanicowe got more than 1k members after nimconf
03:28:29Yardanicoanyway most of them don't really visit nim
03:28:40Yardanicoit's the issue in all social networks/messengers - people join chats but forget about them
03:30:05*casaca joined #nim
03:52:02*chemist69 quit (Ping timeout: 260 seconds)
03:53:11*chemist69 joined #nim
04:00:27*ynfle joined #nim
04:01:54FromGitter<ynfle> @ Varriount `unittest` doesn't work and the message with `doAssert` using `nimble test` aren't the best
04:06:01*supakeen quit (Quit: WeeChat 2.8)
04:06:39*supakeen joined #nim
04:08:07*ftsf joined #nim
04:13:03*ynfle quit ()
04:24:36FromDiscord<SeanOMik> I remember seeing something about proc prototypes in the tutorial pages but I cant find it anymore
04:24:46FromDiscord<SeanOMik> Maybe I'm dreaming it?
04:24:57FromDiscord<SeanOMik> Or am I not looking in the correct place
04:25:10Yardanicoyes forward declarations
04:25:19FromDiscord<SeanOMik> Ah thats the name
04:25:25FromDiscord<SeanOMik> Found it
04:25:29FromDiscord<SeanOMik> https://nim-lang.org/docs/tut1.html#procedures-forward-declarations
04:25:30FromDiscord<SeanOMik> Thanks
04:25:39Yardanicohopefully in the future we won't need them :)
04:25:46FromDiscord<SeanOMik> Wdym?
04:26:22Yardanicowell, right now one of the features on the "milestone" is to make code reordering work for all stuff
04:26:37Yardanicoso you wouldn't even need forward declarations for recursive dependencies (when a calls b, b calls a)
04:26:49Yardanicobut that's relatively far from now :P
04:26:54FromDiscord<SeanOMik> Yeah
04:27:01FromDiscord<SeanOMik> Sounds cool though
04:27:19FromDiscord<SeanOMik> I guess recursive includes are also probably far a way too then
04:27:22FromDiscord<SeanOMik> (edit) 'then' => 'then?'
04:27:38FromDiscord<Rika> i dont think we're adding cyclic imports if thats what you mean
04:27:46FromDiscord<SeanOMik> Yeah thats what I was meaning
04:27:49Yardanico@SeanOMik they already kinda work
04:27:50FromDiscord<SeanOMik> Why not?
04:27:53Yardanicoyou just have to structure your code properly
04:27:57FromDiscord<SeanOMik> Yeah
04:28:00Yardanicoyou can have recursive dependencies
04:28:18FromDiscord<SeanOMik> I guess cyclic imports could cause spaghetti code.
04:28:34FromDiscord<Rika> its more complicated for the compiler
04:28:40FromDiscord<Rika> might slow down compilation a lot
04:28:44FromDiscord<SeanOMik> Oh okay
04:28:57FromDiscord<SeanOMik> Well thanks for answering questions guys
04:29:17FromDiscord<Rika> ~~i'm here just to ask and answer questions~~
04:29:33Yardanicowell why would you be here otherwise :P
04:30:45FromDiscord<Rika> perhaps i wanted to advertise a program i made in nim
04:30:55FromDiscord<Rika> or i wanted to interact with the community
04:31:09FromDiscord<Rika> or i wanted to know about the newest news about nim
04:31:09Yardanicoyou're just answering questions before they're asked then :D
04:31:15Yardanico /s
04:31:26FromDiscord<Rika> that is true though
04:32:04Yardanicooh no
04:32:04Yardanicohttps://github.com/Zed-Inc/nim_braces
04:32:07Yardanicosomeone actually created it
04:33:00FromDiscord<Avatarfighter> I believe you mean oh yes
04:33:06YardanicoI mean oh no surely
04:34:41FromDiscord<Avatarfighter> almost as good as bython
04:34:42FromDiscord<Avatarfighter> https://github.com/mathialo/bython
04:34:56Yardanicogood thing that it's abandoned
04:35:02FromDiscord<Avatarfighter> hahah fr
04:35:37FromDiscord<Avatarfighter> while looking for bython I typed brython and I found an implementation of python but for webpages wtf
04:35:38FromDiscord<Avatarfighter> https://brython.info/
04:35:39Yardanicoi wonder why github projects have so much daily git clones
04:35:40Yardanicobots?
04:35:48Yardanico@Avatarfighter oh yeah I know that one
04:35:50*B4s1l3 joined #nim
04:36:39FromDiscord<Avatarfighter> its actually really neat wow
04:37:32*B4s1l3 is now known as opDispatch
04:37:43FromDiscord<Avatarfighter> All we gotta do is wait for is nim running in a browser like brython haha
04:37:47Yardanicothe problem with these things is compatibility with python itself
04:37:50Yardanico@Avatarfighter uhhh
04:37:56Yardaniconice joke :)
04:38:27FromDiscord<Avatarfighter> Haha
04:38:30FromDiscord<InventorMatt> you could probably embed nimscript into a webpage
04:38:38FromDiscord<Avatarfighter> oh i do not doubt that you couldn't
04:38:44Yardanicowe have nim js too
04:38:53Yardanicobut yeah, with emscripten you could probably embed the whole nim compiler on the web page
04:38:57Yardanicoand compile to JS on the fly
04:38:58FromDiscord<Avatarfighter> oh wow
04:39:00Yardanicoand run the JS
04:39:03FromDiscord<Avatarfighter> that's very cool
04:58:55*solitudesf joined #nim
04:59:36Yardanicoofc it's not really functional but still XDDhttps://i.imgur.com/bCQFWTz.png
04:59:37Yardanicohttps://i.imgur.com/bCQFWTz.png
04:59:55Yardanicoyes that's nim compiler compiler to webassembly with emscripten (without any stdlib and stuff so it's basically useless rn)
05:01:56Yardanicowell I did patch like 2-3 LOC
05:02:41Yardanicoah right
05:02:59*solitudesf quit (Remote host closed the connection)
05:07:08Yardanicoactual nim tracebacks OOTB xd https://i.imgur.com/JW1SGFD.png
05:16:49FromDiscord<Zed> Yardinco, you dont like my braces transpiler?
05:17:03Yardanicoyou understand why people wouldn't like it :P
05:17:15Yardanicoi mean its fine as a fun project
05:17:27FromDiscord<Zed> hey, im suprised it actually works
05:18:27FromDiscord<Zed> although now that i've gotten used to nims whitespace i cant get used to the braces XD
05:19:09FromDiscord<Rika> some people prefer one or the other, or dont even have a preference
05:19:16FromDiscord<Elegant Beef> Im in the latter!
05:19:27FromDiscord<Elegant Beef> Also rika you literally just said "People have feelings"
05:19:33FromDiscord<Zed> personally i prefer the '@' instead of braces
05:19:48FromDiscord<Zed> :P
05:20:06Yardanicook I'm getting progress with emscripten
05:20:07Yardanicocomp.html:1248 Error: cannot open '/lib/system.nim'
05:20:15Yardaniconeed to find out how to embed the stdlib
05:20:26Yardaniconim stdlib is only 2.7mb src btw
05:20:48Yardanicoah wait 4.4
05:21:17FromDiscord<Zed> that's pretty small
05:21:28FromDiscord<Rika> aaaaaa https://nimble.directory/docs/optionsutils/optionsutils.html doesnt load lmaoooo
05:23:38*narimiran joined #nim
05:30:03Yardanicocomp.html:1248 /lib/system.nim(26, 3) Error: invalid indentation lol
05:41:28narimiranfinally a comment about style insensitivity, i was getting worried nobody would mention it! https://news.ycombinator.com/item?id=23591907
05:42:13FromDiscord<Rika> congratulations
05:59:20Yardaniconarimiran: also we god this https://www.reddit.com/r/nim/comments/hdgvxe/a_language_is_only_as_good_as_its_best_ide/
05:59:21Yardanicogot*
06:01:56FromDiscord<Elegant Beef> I could swear that breakpoint debugging is super easy to setup with nim
06:01:59FromDiscord<Elegant Beef> in vscode that is
06:02:06Yardanicowell they are just lazy people
06:02:14FromDiscord<Zed> lol, he really doesn't want to use a terminal
06:04:25FromDiscord<Elegant Beef> His entire post history is comical
06:04:29Yardanico"It's 2020. Rockets are landing themselves and there are consumer grade 12 core processors on the market. Bloat isn't a thing anymore."
06:04:36Yardanico"Bloat isn't a thing anymore." AAAAAAAAAAAAAAAAAAAAAAAA
06:05:37FromDiscord<Rika> bet i can make a program that even a fucking supercomputer would chug on
06:05:55FromDiscord<Zed> haha
06:06:09FromDiscord<Elegant Beef> That makes no sense bloat isnt a thing anymore
06:07:06Yardanicoimagine people who make simplest desktop apps with electron saying "BlOaT iSn'T a ThInG AnYmOrE"
06:07:12FromDiscord<Elegant Beef> Mods on r/CPP removed his ↵> It's 2020 and you have no excuse not to be using an IDE
06:07:18FromDiscord<Rika> LMAO
06:07:39FromDiscord<Elegant Beef> https://www.reddit.com/r/cpp/comments/ewtttx/its_2020_and_you_have_no_excuse_not_to_be_using/
06:07:41FromDiscord<Elegant Beef> Gold
06:07:42FromDiscord<Rika> wait imma check if i know this dude i just argued with another dude in another server and he sounds p.much like this
06:08:33FromDiscord<Zed> is he just trying to make a really bad ide sales pitch?
06:08:41FromDiscord<Rika> `Why use CLion when - quoting their website - Code::Blocks is already "the IDE with all the features you need"?` LMAO
06:08:48FromDiscord<Rika> he's just a troll
06:10:19FromDiscord<Rika> so who's removing this post from reddit
06:14:41FromDiscord<Elegant Beef> He posts in so many circle jerky subreddits
06:17:18FromDiscord<Elegant Beef> Also best comment because of their name is↵> Telling people how to write code is central planning == communism.
06:19:53*marnix joined #nim
06:31:57*NimBot joined #nim
06:33:53*solitudesf joined #nim
06:36:27*PMunch joined #nim
06:37:35FromDiscord<Skaruts> can anyone get me this little test to work: https://play.nim-lang.org/#ix=2pQ3
06:37:52FromDiscord<Skaruts> I keep getting errors no matter what I do, I dn't even know anymore...
06:38:21FromDiscord<Skaruts> the goal is just to assign a different `print_val` proc depending on which kind the object is
06:40:18FromDiscord<Skaruts> (I forgot to assign a value to val1 and val2, though)
06:40:53FromDiscord<Rika> https://play.nim-lang.org/#ix=2pQ4
06:41:41FromDiscord<Rika> `print_proc` changed to this `print_proc:proc(self: Foo): string` and i fixed the `result.kind` stuff (dont do that basically)
06:41:56FromDiscord<Rika> then you have to re-pass in `f1` and `f2` to `print_proc`
06:42:16FromDiscord<Rika> since `f1.print_proc` returns the proc, it does not call the proc with `f1`
06:42:18FromDiscord<Rika> @Skaruts
06:42:44FromDiscord<Skaruts> oh, I always thought `new result` was equivalent to `result = Foo(kind: Foo1)`
06:42:54FromDiscord<Skaruts> thanks!!
06:42:58FromDiscord<Skaruts> 🙂
06:43:06FromDiscord<Yardanico> It is
06:43:13FromDiscord<Yardanico> new result is redundant here
06:43:25FromDiscord<Rika> i didnt remove it lmao
06:43:27FromDiscord<Rika> sorry
06:43:30FromDiscord<Yardanico> It's okay
06:43:38FromDiscord<Rika> but you cant set `result.kind` since it discriminates
06:43:50FromDiscord<Rika> has to be part of the constructor `Foo(kind: value)`
06:43:57FromDiscord<Yardanico> You can :)
06:44:03FromDiscord<Rika> i mean, its not a great idea to
06:44:04FromDiscord<Skaruts> I always did it this way though
06:44:23FromDiscord<Yardanico> @Skaruts it's worse for the compiler and stuff
06:44:43FromDiscord<Yardanico> Object construction syntax is better since you don't need to care if it's a ref or not and stuff like that
06:44:46FromDiscord<Skaruts> so result = Foo(kind: Foo1) is preferable?
06:44:51FromDiscord<Yardanico> Yeah
06:45:04FromDiscord<Skaruts> nice to know
06:45:06FromDiscord<Yardanico> You can also split it over multiple lines
06:45:23PMunch@Yardanico, can you? I thought that was disallowed prior to 1.0
06:45:42FromDiscord<Yardanico> Can do what?
06:46:08FromDiscord<Rika> you can still do it afaik
06:46:29FromDiscord<Yardanico> Yeah, there even was a PR which fixed it for arc
06:46:33FromDiscord<Skaruts> yea, you can, I've been doing it all along and had no complaints from the compiler so far
06:46:35PMunchChange the discriminator in a variant object
06:46:41FromDiscord<Yardanico> Yeah you can
06:46:57*nikita_ is now known as nikita`
06:47:18FromDiscord<Yardanico> With checks you will get a proper error if you access an invalid branch, without checks on - well, good luck xD
06:47:37FromDiscord<Yardanico> Actually maybe I'm wrong
06:48:02FromDiscord<Yardanico> Don't remember if it's a part of checks or an exception/defect
06:48:42PMunchThis is what I was talking about: https://play.nim-lang.org/#ix=2pQ6
06:48:53PMunchError: unhandled exception: assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period [FieldError]
06:49:52FromDiscord<Yardanico> An right you can't change the kind only
06:50:01FromDiscord<Yardanico> You need to construct a new object
06:50:09FromDiscord<Yardanico> When you're changing the kind
06:50:14PMunchYeah
06:52:48FromDiscord<Yardanico> Ah actually wait
06:52:49FromDiscord<Skaruts> actually, now that I think about it, I'm not sure about my last statement (that you can still do that), as my current project doesn't use any of this, and I only updated to latest nim two days ago...
06:52:57FromDiscord<Yardanico> It might be not allowed by default
06:53:03FromDiscord<Yardanico> But it's allowed with arc
06:53:14FromDiscord<Yardanico> See https://github.com/nim-lang/RFCs/issues/209
06:53:16disbotCase objects in new runtime removing restrictions ; snippet at 12https://play.nim-lang.org/#ix=2pQ7
06:53:48FromDiscord<Yardanico> https://github.com/nim-lang/Nim/pull/13995
06:53:49disbotImplements RFCs #209
06:54:18FromDiscord<Yardanico> An example of how arc makes more things possible :)
06:55:08alehander92_oi
06:55:41FromDiscord<Skaruts> btw, I'd like to know if what I am doing is worth it: I'm doing that proc assignment thing to prevent having to use case/of when both kinds use the same proc to do different things (essentially mimicking dynamic dispatch, I guess, but still keeping it static)
07:02:04ZevvAraq: nothing is *wrong* with CPS per se, it's just that I can't seem to find the time nor the concentration to properly work at it.
07:03:16ZevvMy plan was to methodically work through all the required transform rules, I guess it's about ten or fifteen or so, and then implement them incrementally.
07:03:39alehander92_that's so many
07:11:00Zevvyah but its the typicall decreasing returns, or how do you call it
07:11:13Zevvtwo rules get you going with linear code with no control flow
07:11:21Zevvthen one more allows basic whiles
07:11:27Zevvone more for the break
07:11:38Zevvone for break with label
07:11:38Zevvetc
07:12:20Zevvand also, this needs to go into the compiler because macros just cant go all the way
07:24:28PMunchHow was everyones NimConf by the way?
07:24:45PMunchI had to leave early unfortunately, so I missed out on the live chats for the later talks
07:24:56PMunch(And I've still got a couple to watch)
07:32:14bungI watched all videos
07:34:01PMunchLive?
07:35:22*Vladar joined #nim
07:43:12FromDiscord<ikrima> is there a way to get the most derived type of an object?
07:43:24FromDiscord<Rika> are there locks for async or are the locks in the locks module suitable for async
07:44:13FromDiscord<ikrima> i'm trying to make a generic tree visitor but i can't get the function to be dispatched with the derived type
07:46:45bungarchived videos
07:49:09PMunch@Rika, why would you need locks for async`
07:49:20FromDiscord<djazz> I enjoyed NimConf a lot!
07:49:26FromDiscord<djazz> I watched it all live
07:49:33PMunchThose in the locks module will work, but they won't be optimal
07:49:33FromDiscord<Rika> I'm just asking right now
07:49:46FromDiscord<Rika> I don't need them right now
07:49:53PMunchdjazz, I really liked it as well. The parts I got to watch. So many good presentations
07:50:15PMunch(And interesting to see how many cool thing people have done in Nim that I've never heard about)
07:50:49PMunch@Rika, but what do you imagine using them for? Async doesn't run at the same time as such, so there is no reason to lock anything
07:51:12PMunchAnd if you don't use tryLock you will lock up your entire execution thread
07:51:13FromDiscord<Rika> but async can hit the same pieces of code at the same time
07:51:18PMunchNo it can't
07:51:29FromDiscord<Rika> i mean, consecutively
07:52:00PMunchOnly if you have yielded control
07:52:01FromDiscord<Rika> not *at the same time* per se, but one can enter an async section whilst there's something awaiting in that same section
07:52:44PMunchAnd since you don't need your "locks" to be thread-safe you can simply use a bool as a lock
07:53:43PMunch@ikrima, what do you mean the "most derived type"`
07:53:46PMunch?*
07:54:02PMunchCould you write up a small sample of what you're trying to do?
08:00:07alehander92_it seemed cool
08:00:08FromDiscord<ikrima> @PMunch yup! was just doing that
08:00:12FromDiscord<ikrima> sent a code paste, see http://ix.io/2pQj
08:00:13alehander92_i also havent watched almost anything
08:00:23FromDiscord<ikrima> (edit) 'http://ix.io/2pQj' => 'http://ix.io/2pQk'
08:02:15FromDiscord<ikrima> other things i've tried that didnt work:↵- changing the passed in function to "method" but nim didn't like that. I couldn't figure out how to pass a `method` to a function↵- trying to use generics but couldn't get that to work
08:16:18*lritter joined #nim
08:19:47*brainbomb joined #nim
08:21:22*brainbomb quit (Client Quit)
08:22:34FromDiscord<Rika> use `of` maybe?
08:23:05*drdee joined #nim
08:25:12*brainbomb joined #nim
08:34:53FromDiscord<ikrima> @Rika ah that was it!
08:42:49*bung quit (Ping timeout: 264 seconds)
08:47:01*brainbomb quit (Quit: Leaving.)
08:49:38*bung joined #nim
08:52:55*dddddd quit (Ping timeout: 260 seconds)
08:54:12*bung quit (Ping timeout: 256 seconds)
08:57:51FromDiscord<mratsim> also when you start overloading, use methods
08:58:09*brainbomb joined #nim
08:59:27FromDiscord<mratsim> and you might want to use object algebra or tagless final instead of visitors @ikrima: those are my experiments with similar things https://github.com/mratsim/compute-graph-optim
09:00:29FromDiscord<ikrima> @mratsim heh, this is exactly what i'm building except for my main app and what drove me to nim to try to generate
09:00:37FromDiscord<mratsim> and lifted into a compile-time/runtime compiler implemented as macro: https://github.com/numforge/laser/tree/master/laser/lux_compiler↵https://github.com/numforge/laser/tree/master/laser/lux_compiler/core↵↵In particular the types: https://github.com/numforge/laser/blob/master/laser/lux_compiler/core/lux_types.nim#L14-L132
09:01:10FromDiscord<ikrima> 👍 excellent; that'll be very helpful
09:01:45FromDiscord<mratsim> Note that I wanted something that worked at compile-time so I add extra restrictions:↵- no inheritance/methods so no visitors
09:02:20FromDiscord<ikrima> the inheritance was a compromise; i got frustrated trying to do simple things in Nim for a couple of days
09:02:42FromDiscord<mratsim> I've also gathered some references on DSL implementations techniques here: https://github.com/mratsim/compute-graph-optim/blob/master/arraymancer_discussion_347.md#semantic-pass-and-the-extension-problem
09:02:57FromDiscord<mratsim> though I didn't focus on visitors because they don't work at compile-time
09:03:01FromDiscord<ikrima> i wanted my parse tree to be irregular heterogenus (so named subfields) but I couldn't figure out how to do variant constraints in Nim?
09:03:56FromDiscord<ikrima> sent a code paste, see http://ix.io/2pQB
09:04:23FromDiscord<mratsim> it will be hidden behind variant
09:04:58FromDiscord<mratsim> there is something that you can do with NimNodes, proc foo(a:NimNode{nkIdent}) but it's no documented at all
09:05:08FromDiscord<mratsim> I don't know if it works for any variants either
09:05:30FromDiscord<ikrima> gotcha
09:05:39FromDiscord<mratsim> Also this might help you as well: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/support/emulate_classes_with_ADTs.nim
09:05:55FromDiscord<mratsim> it's for emulating classes with variants
09:06:04FromDiscord<ikrima> brilliant
09:06:14FromDiscord<mratsim> example usage: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/physics/materials.nim#L91-L96
09:06:34FromDiscord<mratsim> and: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/physics/core.nim#L24-L28
09:15:44*alehander92_ is now known as alexander92
09:15:56*alexander92 is now known as alehander92_
09:17:06*sagax joined #nim
09:26:34*bung joined #nim
09:37:59*Zectbumo quit (Remote host closed the connection)
09:46:38*oddp joined #nim
10:05:32*muffindrake quit (Quit: muffindrake)
10:07:31*krux02 joined #nim
10:11:33*arecaceae quit (Remote host closed the connection)
10:11:56*arecaceae joined #nim
10:15:07*muffindrake joined #nim
10:21:05*Vladar quit (Quit: Leaving)
10:21:25*tane joined #nim
10:43:08FromGitter<Bennyelg> Hi All,
10:43:22FromGitter<Bennyelg> does anyone worked with mongodb within him ?
10:54:32FromGitter<Bennyelg> nim*
10:56:47*Vladar joined #nim
10:56:59FromGitter<geotre> @Bennyelg John Dupuy is working on some mongodb stuff, I think repos are at https://github.com/JohnAD/
10:57:27FromGitter<geotre> And there's a few packages on nimble: `nimble search mongodb`
10:58:04FromGitter<geotre> https://nimble.directory/search?query=mongo
11:03:12*abm joined #nim
11:05:11FromDiscord<Recruit_main707> sent a code paste, see http://ix.io/2pRb
11:06:15FromDiscord<lqdev> --multimethods:on
11:06:45FromDiscord<lqdev> by default methods only dispatch using the first parameter
11:07:03FromDiscord<lqdev> you can enable multiple dispatch using the --multimethods:on CLI param
11:08:43FromDiscord<Recruit_main707> thx
11:10:17FromDiscord<lqdev> what would be a good name for a proc that temporarily maps something to virtual memory? `map`? `access`? `mutate`?
11:10:54FromDiscord<lqdev> the proc accepts a callback with a pointer to the data and the size of the buffer
11:12:34FromGitter<antonkatz> looking into JS generation, it seems that a function even if marked with * is not exported. How would I go about using nim generated js inside a bigger js project?
11:13:25FromDiscord<Recruit_main707> antonkatz you probably also need to add `{.exportc.}` pragma
11:27:22FromGitter<antonkatz> @recruit_main707 Didn't work but led me to this page https://www.npmjs.com/package/nim-loader?activeTab=readme#caveats
11:27:41FromGitter<antonkatz> You have to literally mimic the common js export
11:29:17*ftsf quit (Ping timeout: 258 seconds)
11:33:05*ftsf joined #nim
11:41:40Araqftsf: thanks for your talk. You're Nico's author, right?
11:42:01ftsfAraq, thanks! yep!
11:58:36*Vladar quit (Quit: Leaving)
12:05:39FromDiscord<😬🤣> is `setCommand "js"` creating a new, almost empty js file on each save of the .nim file of the same name a vscode extension bug?
12:05:46FromDiscord<😬🤣> or a nimcheck one
12:05:49*Kaivo joined #nim
12:06:02*supakeen quit (Quit: WeeChat 2.8)
12:06:05*Vladar joined #nim
12:06:13FromDiscord<😬🤣> I hope it's the latter because then there's a chance it will get fixed 🙂
12:06:41FromDiscord<😬🤣> I can prevent the bug with `switch "o", "/dev/null"` (it doesn't affect `nimble build`), but it's really stupid
12:06:42*supakeen joined #nim
12:09:08*vsantana joined #nim
12:19:18*drdee quit (Remote host closed the connection)
12:20:30*drdee joined #nim
12:27:29*Trustable joined #nim
12:30:20*endragor quit (Remote host closed the connection)
12:30:47*endragor joined #nim
12:35:13*endragor quit (Ping timeout: 246 seconds)
12:36:26*brainbomb1 joined #nim
12:37:14*brainbomb quit (Ping timeout: 246 seconds)
12:37:16*narimiran quit (Remote host closed the connection)
12:38:00FromDiscord<Shucks> So I almost tried everything to debug a windows process which loads my nim library. Currently tried: `nim-gdb -p process_pid`, `br main.nim:50` and once my nim library is load it just won't hit any breakpoint. Ofcourse compiled with `--debuger:native`
12:38:45alehander92_try to just use gdb
12:39:03alehander92_and source tools/nim-gdb.py inside
12:39:04alehander92_if needed
12:40:17*dsrw joined #nim
12:40:17*dsrw quit (Read error: Connection reset by peer)
12:40:40FromDiscord<Shucks> Yea already tried using gdb itself aswell
12:48:44alehander92_so is it possible it stops before that
12:49:11*Romanson joined #nim
13:07:35*endragor joined #nim
13:09:41*leorize quit (Quit: WeeChat 2.8)
13:14:02*dr-dd joined #nim
13:14:46*endragor quit (Ping timeout: 246 seconds)
13:16:34*drdee quit (Quit: Leaving)
13:16:54*dr-dd quit (Client Quit)
13:17:04*dmi0 joined #nim
13:17:07*drdee joined #nim
13:20:43*marcpm quit (Quit: Connection closed for inactivity)
13:28:37*Vladar quit (Quit: Leaving)
13:50:18FromGitter<erhlee-bird> is there a way to express iterator types in concepts? ⏎ ⏎ ```type ⏎ Foo[T] = concept x ⏎ x.bar is iterator[T]``` [https://gitter.im/nim-lang/Nim?at=5ef0b71a613d3b3394fff22d]
13:52:00*brainbomb1 quit (Quit: Leaving.)
13:56:49alehander92_for i in x: discard
13:56:55alehander92_in x.bar *
13:57:18alehander92_or for i in x.bar: i is T
13:57:20alehander92_iirc
13:58:10FromDiscord<mratsim> "type(items(seq[x])) is x" ?
13:58:24FromDiscord<mratsim> otherwise I proposed an "Iterable" concept iirc
13:58:32FromDiscord<mratsim> and you can do "x is Iterable"
13:58:43FromGitter<erhlee-bird> awesome the first one works ⏎ I'll try the second one
14:00:31alehander92_i think the first one is the way zah wanted the concepts to be used
14:01:04alehander92_by using a similar syntax to the way the construct is used in real code, but this might be just my wrong impression
14:01:27alehander92_otherwise Iterable seems to be going in stdlib mratsim soon
14:02:01*PMunch quit (Quit: Leaving)
14:06:49FromDiscord<dom96> Araq: shouldn't we prioritise stabilising concepts? In particular any new syntax that we may be adopting for them?
14:07:54AraqI'm working on a proposal so that we can finally stabilize 'static T' / 'typedesc'
14:08:24Araqand then we can think about 'concept'
14:09:14FromGitter<erhlee-bird> ```code paste, see link``` ⏎ ⏎ @mratsim neither of the approaches here seem to work [https://gitter.im/nim-lang/Nim?at=5ef0bb8a405be935cdb6dda0]
14:11:46FromDiscord<dom96> Araq: okay, looking forward to that
14:25:19*dddddd joined #nim
14:32:42FromDiscord<Recruit_main707> does c2nim work relatively well with C11?
14:41:49*waleee-cl joined #nim
14:42:51Araqno, C11 is a different beast
14:43:06Araqmaybe if you're lucky and not many C11 features are used...
14:47:36FromDiscord<Recruit_main707> also, is c2nim abandoned? last commit was in 2019
14:49:10*drdee quit (Remote host closed the connection)
14:49:35Araqno, it's not
14:50:18FromDiscord<Recruit_main707> hibernating then? :P
14:51:04Araqyou can create PRs
14:51:12Araqand I'll review them
14:52:11Araqit worked well for all the big projects I wrapped
14:52:15*ftsf quit (Ping timeout: 260 seconds)
14:52:58Araqand if I had the need to wrap more, I would patch it further
14:53:17FromDiscord<Recruit_main707> reasonable
14:55:37AraqI'd probably look into C++2020 support though and not fucking C11
14:56:02Araqat least C++2020 has modules now so we can wrap stuff without preprocessor junk
15:04:14*marnix quit (Ping timeout: 240 seconds)
15:08:07*Romanson quit (Quit: Connection closed for inactivity)
15:15:14FromGitter<ynfle> Why does `strtabs` not have `==` proc?
15:17:03FromDiscord<mratsim> One does not simply compare string tables
15:17:48Araqnever needed it
15:18:01FromGitter<ynfle> Because of style insensitivity?
15:18:13Araqequality on hash tables is hard, you never know if the order should matter
15:18:54FromGitter<ynfle> I'm assuming that's why we have `OrderedTable` and `Table`
15:19:02AraqI mean, you would use an OrderedTable if the order matters, yes
15:19:26Araqbut OrderedTable is often also used for convenience, see json.nim
15:19:31FromGitter<ynfle> Order doesn't matter but I wan't style insensitivity
15:19:44Araqso create a PR
15:20:08Araqbut usually dicts are compared to {:} and to nothing else
15:20:22Araqwhich can be done with x.len == 0
15:20:24FromGitter<ynfle> Would you accept one that compares based on order or not?
15:20:38FromGitter<ynfle> I know but I want specific mappings
15:20:42Araqwell it's an unordered table so the order shouldn't map
15:20:46Araq*matter
15:20:50FromGitter<ynfle> Ok
15:37:47*Romanson joined #nim
15:46:31*gangstacat quit (Ping timeout: 272 seconds)
15:47:18FromDiscord<Isomorpheus> what can ref objects do that objects can't
15:49:20*Vladar joined #nim
15:53:17FromDiscord<Yardanico> not sure what do you mean by that :) it's the difference in how you access and modify them
15:55:04FromDiscord<Isomorpheus> what is a simple example of something which requires a ref object and can't be accomplished with an object
15:55:34FromDiscord<mratsim> inheritance
15:55:47FromDiscord<mratsim> also sharing an unique instance
15:56:04FromDiscord<mratsim> for example a file, a database access, GPU memory
15:58:13FromDiscord<dom96> resizeable memory
15:58:25FromDiscord<dom96> you cannot implement a `seq` with just an object
16:00:18FromDiscord<Isomorpheus> implementing seq not really simple. anyway, the sharing a unique instance example makes the best sense to me
16:00:28FromDiscord<Isomorpheus> thx
16:11:17*vicfred quit (Quit: Leaving)
16:15:19*bung quit (Quit: Lost terminal)
16:16:22*Jesin quit (Quit: Leaving)
16:17:12FromDiscord<Yardanico> @Isomorpheus if you're curious - implementation of seqs for new runtime (arc, etc) is in https://github.com/nim-lang/Nim/blob/devel/lib/system/seqs_v2.nim
16:26:39FromGitter<kdheepak> @genotrance the julia community is excited to see you are using the binaries in nim :)
16:31:02shashlickyep - they were considering getting rid of static libraries - probably that's not how they use the libs
16:31:12shashlickbut it is valuable to us
16:31:24shashlickhopefully they expand their efforts
16:31:46shashlicki also looked into vcpkg but it doesn't work without VC++ on Windows
16:32:02*gangstacat joined #nim
16:32:25shashlickplus they don't really post prebuilt binaries so it is more about providing stable way to build locally
16:33:05shashlick@kdheepak where do you see this discussion
16:34:54FromGitter<kdheepak> On slack, the binary builder developers linked this issue of yours: https://github.com/JuliaBinaryWrappers/Zlib_jll.jl/issues/1#issuecomment-647008970
16:34:56disbotzlib static binaries need to be recompiled with -fPIC to be compatible with PIE builds
16:35:23FromGitter<kdheepak> Why do you want static binaries?
16:36:21FromGitter<kdheepak> If you want to join the julia slack you can chat directly with them. They are a very knowledgeable group.
16:36:58FromGitter<kdheepak> And I'm happy to make introductions there / provide necessary context (based on my understanding).
16:37:46shashlickI'll join the slack - where is it
16:37:49FromGitter<kdheepak> In Julia everything is loaded only at runtime. This is equivalent to using `import dynlib; dynlib.loadLib` in nim.
16:38:14FromGitter<kdheepak> julialang.slack.com/
16:38:20shashlickI figured, but in Nim people can statically link too to simplify distribution
16:38:44*Jesin joined #nim
16:38:52FromGitter<kdheepak> But I think statically linking will have other issues, right?
16:39:03shashlickI understand if they don't want that burden but will be great if they do cause it will benefit many beyond Nim as well
16:39:06FromGitter<kdheepak> You can't statically link the C / C++ runtime anyway.
16:39:20FromGitter<kdheepak> Worth having a conversation about it :)
16:40:04shashlickTypically you build on an old glibc
16:40:21shashlickOr there's musl as well and they do provide musl builds
16:40:21FromGitter<kdheepak> Once you join you should join the `#binarybuilder` slack channel / topic.
16:40:30shashlickOk will do in a few minutes
16:40:59Araqstatic linking is completely misguided but very fashionable
16:41:16Zevvyeah and then you put it in a container
16:41:24Zevvbecause
16:41:50Araqthere seems to be this idea that you can pretend your Linux OS is a JVM, well it isn't and it won't be one
16:42:51Zevvone can always try
16:42:56shashlickI agree, dealing with c/c++ dependencies is a nightmare
16:43:35Araqand all your friends you want to share your x86_64 ELF Linux binary with don't own PCs anymore but Android based phones :P
16:44:07shashlickBut they are valuable nonetheless so it's worthwhile to accelerate the nim ecosystem
16:44:36FromDiscord<Rika> "so who's pinging technisha"
16:45:07*endragor joined #nim
16:47:07*endragor quit (Remote host closed the connection)
16:51:18FromDiscord<Yardanico> Microbenchmarks yet again but arc go brrr https://github.com/jabbalaci/SpeedTests
16:52:01FromDiscord<Rika> rust tho :EyesShaking:
16:52:38FromDiscord<Yardanico> Well it's unfair
16:52:42FromDiscord<Yardanico> Rust uses u32
16:52:53FromDiscord<Yardanico> Nim version uses int which is int64 on x86_64
16:52:55FromDiscord<Rika> *its pr time*
16:53:28FromDiscord<Yardanico> https://www.reddit.com/r/nim/comments/hdoks0/comparing_the_speed_of_c_and_nim/ Reddit thread
16:53:31FromDiscord<Recruit_main707> i guess we could call it.↵A speedrun
16:53:37FromDiscord<Recruit_main707> https://tenor.com/view/ba-dum-tsss-punchline-gif-7320811
16:53:46FromDiscord<Rika> recruit why
16:54:19FromDiscord<Recruit_main707> too much questions
16:54:28FromDiscord<Recruit_main707> many*
16:55:09FromDiscord<Recruit_main707> arc even wins c++, impressive
16:55:25Yardanicowell we have to consider that nim is using -O3 but he's using -O2 for C and C++ :)
16:56:38Araqunfortunately arc related bugfixes take away from arc related optimizations
16:56:38Araqyou should really use LTO too, we don't inline well
16:56:38FromDiscord<Rika> O3 was shown to not really give a difference over O2 from what i remember reading on some shady ass website maybe
16:56:45FromDiscord<Recruit_main707> 0.4 is a considerable bit though, is O2/O3 the diference?
16:56:56Yardanicolemme check
16:57:31YardanicoC with O2 took ~3 sec for me
16:57:34YardanicoC with O3 - same :D
16:58:14FromDiscord<Recruit_main707> lmao get owned
16:58:34FromDiscord<Rika> so the shady ass website i read was correct
16:59:11Araqyou can always use 'ptr' btw, last time I checked Nim v1.0 had that one too
16:59:13FromDiscord<mratsim> it is
16:59:30FromDiscord<mratsim> -03 matters mostly for loop-based call
17:00:03FromDiscord<mratsim> compilers can play with unroll, vectorization, deep hoisting and various things that led to increased codesize
17:01:05FromDiscord<mratsim> if you're doing an interpreter or cryptography it's no difference, if you do image processing or numerical computing you will have some
17:01:11FromDiscord<Recruit_main707> do we win rust using int32 though?
17:01:17Yardanicolemme try
17:01:29Yardanicowith the code in the repo I get mean 2.587s, with using uint32 instead of "int" - 2.296s
17:01:33Yardanicolets see the results for rust on my machine
17:01:35FromDiscord<mratsim> Rust uses uint64 by default though
17:01:43Yardanico@mratsim in the code the author explicitly used u32
17:01:48Yardanicoand for C they used "int"
17:01:52FromDiscord<mratsim> ah
17:02:26FromDiscord<mratsim> using uint32 will remove all the overflow checks from the release build
17:02:36YardanicoI'm testing with -d:danger anyway :)
17:02:49Yardanicoand rust version on my machine is mean 2.345s
17:02:52Yardanicoslower than nim with u32
17:03:00FromDiscord<Recruit_main707> ezz
17:03:34FromDiscord<Recruit_main707> also, python big oof, i bet my pc can even run it faster (i hope)
17:03:59*vikfret joined #nim
17:04:19FromDiscord<Rika> so whos making the pr 😉
17:04:20FromDiscord<mratsim> also using unsigned would allow the compiler to use better optimizations for mod
17:04:53FromDiscord<mratsim> for example a compiler cannot transform div 2 to a shift right unless it proves that the variable is never negative
17:04:55FromDiscord<Recruit_main707> i love it when you guys start talking about optimizing this benchmarks
17:04:57Yardanicooh no, someone made a PR with parallel D version XD
17:06:37Yardanicomaybe I should try with weave
17:06:55FromDiscord<mratsim> you can use OpenMP for this, but you need to make sure you use setupForeignTHreadGC or the strings will crash
17:09:14FromDiscord<KingDarBoja> > "so who's pinging technisha" ↵I could
17:09:34FromDiscord<Recruit_main707> would using an iterator improve performance?
17:09:36YardanicoWith weave I easily get under 500ms
17:09:38*Vladar quit (Quit: Leaving)
17:09:43FromDiscord<Recruit_main707> damm
17:09:45Yardanicowith string output
17:10:06FromDiscord<Rika> so weave's actually a library made by a magician
17:10:09Yardanicoyes
17:11:06Yardanicowell I get so fast because it actually seems to use all my 16 threads :) which is really gud
17:11:54Araqis it fair though to use multi-threading? C doesn't have a lib for it after all and we cannot use anything invented after 1970
17:12:07Yardanicohaha
17:13:09FromDiscord<Recruit_main707> how does weave work?
17:13:26FromGitter<ynfle> I'm trying to modify `unittest` to work at compile time and ran into an issue the compiler complains that `Error: cannot evaluate at compile time: formatters` in a `template` where it is introduced with a `bind` statement. Any way to get around this?
17:13:51FromDiscord<Rika> > how does weave work?↵@Recruit_main707 real life magic
17:14:19Araqjust don't. use 'when isMainModule: static: doAssert(...)'
17:14:49FromGitter<ynfle> Handling the error messages and having clean output is a pain
17:15:46YardanicoD parallelised version seems to be a little bit slower than weave, but it uses dlang's stdlib parallelism
17:16:18FromDiscord<Recruit_main707> just add weave to stdlib :smart:
17:16:41Araqha; I knew it. "mu mu, must not be a dependency"
17:17:02*Senny joined #nim
17:17:02*Vladar joined #nim
17:17:13FromDiscord<Rika> Yardanico: ez fix, make weave stdlib 😛
17:17:15Yardanicowell I won't PR it anyway since it's just a small benchmark, but yeah, weave is nice :) i have nothing against using "third-party" modules
17:17:28Araqwon't be accepted
17:17:43AraqYardanico: no, please do the PR
17:18:14FromDiscord<Rika> araq: i am joking T_T
17:18:37Araqah ok
17:18:55Araqit's always hard to tell when you live in surreal programmer land
17:19:15FromDiscord<Rika> text makes it even hard to tell
17:19:28FromDiscord<Recruit_main707> hard-er
17:20:06FromDiscord<Rika> i apologize it is 1 am
17:20:18FromDiscord<Rika> ive woken up around 14ish hours ago by now
17:22:43Yardanicowait I didn't know weave works with arc lol
17:22:55YardanicoI just compiled with --gc:arc and it worked XD although a little bit slower
17:27:31Yardanico@mratsim do you know test_gc_arc in weave passes on latest devel?
17:27:36Araqdoes it even use arc related stuff?
17:27:37Araqweave does its own memory management
17:27:53Araqso any difference you measure might be noise
17:27:57FromDiscord<mratsim> No I didn't know that it passed
17:28:22YardanicoI just tested, full output - https://gist.github.com/Yardanico/13a2813ab7df46c6c63b2cbeae56e529
17:28:34FromDiscord<mratsim> internally it doesn't use ARC, but it needs to at least pass the tests so that I can explore sending seq/strings in channels
17:30:11FromDiscord<mratsim> (.e. serializing seq/strings in tasks)
17:31:25Yardanicoalso Araq, with --sinkInference:off (without that it crashes in same fillBody thing) nim compiler can compile hello world with --gc:arc (something a bit more complex still fails)
17:31:40YardanicoI mean the compiler compiled with --gc:arc
17:33:13Araqcool, I'm working on #14402 fwiw
17:33:16disbothttps://github.com/nim-lang/Nim/issues/14402 -- 3AsyncHttpClient segfaults with gc:orc, possibly memory corruption ; snippet at 12https://play.nim-lang.org/#ix=2pSW
17:33:52Yardanicoand for us linux plebians ssl with arc is broken on devel :P
17:34:01Yardanicobut yeah, cool :)
17:34:20FromDiscord<mratsim> btw I manage to put mentions of DrNim everywhere in the Rust concurrency thread (though apparently I gathered a lot of downvotes). It's sad that a large portion of the Rust community is so focused on memory safety and ignores the other issues introduced by threads
17:34:35Yardanicoah wait I'm wrong it works (?)
17:35:22Yardanicoah nvm, it still fails with that C compiler error, I thought it was the same as in #14240 but that's not the case
17:35:23disbothttps://github.com/nim-lang/Nim/issues/14240 -- 5[exceptions:goto] C compiler error with dynlib pragma calling a proc ; snippet at 12https://play.nim-lang.org/#ix=2nzx
17:35:38Araqmratsim: well DrNim is still vaporware
17:35:54Araqhelp is appreciated
17:36:23FromDiscord<mratsim> Like VTable, it's documented Vaporware so we can get people excited about it 😉
17:36:58Araqwe have enough to get people excited about
17:37:19Araqwe need more production-ready stuff
17:37:35Araqit's always the famous last 80% of work
17:37:42FromDiscord<mratsim> 😛
17:38:05FromDiscord<mratsim> so regarding production ready stuff, afaik you didn't say if you saw this compiler fuzzer porject: https://github.com/agroce/afl-compiler-fuzzer
17:39:07FromDiscord<mratsim> one issue that will likely come up with our audits is that Nim itself is unaudited, but also not fuzzed
17:40:08FromDiscord<mratsim> this was even used to crash formal verification tools 😄
17:41:36Yardanicowell we already have quite a lot of low-priority compiler crash issues :)
17:42:33FromDiscord<mratsim> fuzzing might reveal a refactor needed to handle several early instead of monkey patching for a couple of bugs
17:44:20*marnix joined #nim
17:45:32FromGitter<ynfle> What does `<//>` do?
17:46:06Yardanicoit's old deprecated syntax for owned ref (needed for bootstrapping I think), you shouldn't use it :)
17:48:31FromGitter<ynfle> `owned` instead or just leave it out
17:51:25Yardanico?
17:51:54FromDiscord<mratsim> @Araq, is there an outline of stuf that needs implementation for Z3 integration?
17:52:15FromDiscord<mratsim> like is everything in teh DrNim page implemented?
17:52:18AraqI run DrNim on the Nim compiler and fix bugs when I work on it
17:52:56ee7[m]@ynfle see https://forum.nim-lang.org/t/6440
17:53:07Araqmost of it is implemented but 'forall' and 'exists' are not mapped to anything useful
17:53:57Araqmratsim: if fuzzing helps your audit we'll do it. if not, I won't anytime soon, terrible cost-benefit tradeoff
17:54:17Araqas we also have real users finding real bugs that affect them
17:55:26FromDiscord<Isomorpheus> what is up with the syntax highlighting in vscode? why are keywords like "let" and "import" the same color as identifiers?
17:55:33Yardaniconot for me?
17:55:36Yardanicotry to change the theme
17:56:07FromDiscord<Isomorpheus> yeah it was my Shades of Purple theme. hmmmmm
17:56:33FromDiscord<Isomorpheus> i wonder why? it's not a problem for my other code
17:56:45FromDiscord<KingDarBoja> share your settings
17:57:06Yardanico@Isomorpheus well I don't know either, I've used Monokai Vibrant theme for a very long time now and I like it a lot :)
17:58:20FromDiscord<mratsim> The compiler is out of scope of this initial audit
17:58:34Yardanicothat's how monokai vibrant looks like (with fira code ofc) https://i.imgur.com/bq7qBig.png
17:58:53Yardanicoalso it's sad that only nim.nvim has semantic syntax highlighting (a nimsuggest feature)
17:59:49FromDiscord<Isomorpheus> whats that whitespace color extension
18:01:21FromDiscord<KingDarBoja> VSCode Default theme https://media.discordapp.net/attachments/371759389889003532/724685474278408252/unknown.png
18:02:07Yardanico@Isomorpheus indent-rainbow if you mean colors for indentation
18:02:09*Zectbumo joined #nim
18:02:20YardanicoI also have Guides extension, forgot to reconfigure it
18:02:37FromDiscord<Isomorpheus> @KingDarBoja https://marketplace.visualstudio.com/items?itemName=ahmadawais.shades-of-purple
18:02:40FromDiscord<Isomorpheus> try this one
18:03:22Yardanicohttps://i.imgur.com/4mophuO.png that's the guides extension
18:03:33Yardanico@Isomorpheus lemme try
18:03:40FromDiscord<KingDarBoja> @Isomorpheus ugh, too many purple to my eyes!
18:03:55Yardanicofor me too
18:03:56FromDiscord<Isomorpheus> see if the syntax highlighting works properly
18:03:58Yardanicohttps://i.imgur.com/ertcwiM.png
18:04:08Yardanicoyeah the theme is kinda broken I guess :P
18:04:20FromDiscord<Isomorpheus> not for my other languages: rust, typescript, python
18:04:30Yardanicowell, most themes I tried work just fine for nim
18:04:33FromDiscord<KingDarBoja> I do use this extra setting to change the color of types
18:04:39FromDiscord<KingDarBoja> sent a code paste, see http://ix.io/2pT7
18:05:26FromDiscord<Isomorpheus> unrelated but im trying to do string interpolation in nim but it's inserting the quotation marks...? can I just get a string within a string
18:05:44Yardanicohow are you doing it?
18:06:09Yardanico!eval import strformat; let a = "hello"; echo fmt"{a} world!"
18:06:13NimBothello world!
18:06:39FromDiscord<KingDarBoja> https://github.com/arcticicestudio/nord-visual-studio-code
18:06:46FromDiscord<KingDarBoja> I love this theme btw
18:07:18Araqtry the "nim-alt" plugin
18:07:25Araqits highlighting is better
18:07:25Yardanico@KingDarBoja https://marketplace.visualstudio.com/items?itemName=s3gf4ult.monokai-vibrant is what I use
18:07:51FromDiscord<Isomorpheus> can I get a type at runtime
18:07:59FromDiscord<KingDarBoja> Oh the constract is high, which makes it easier to read
18:08:07FromDiscord<KingDarBoja> Nice choice Yard
18:08:08Yardanico@Isomorph "kinda"
18:08:18Yardanicotypes don't exist at runtime but you can use typeof(something) to get its type
18:08:37Yardanicowhy do you want types at runtime?
18:08:50Yardanicobtw, there's also another vscode extension
18:09:02Yardanicohttps://github.com/bung87/vscode-nim-lsp uses nimlsp instead of directly using nimsuggest
18:09:09FromDiscord<KingDarBoja> I really love how it looks with Nord
18:09:22FromDiscord<KingDarBoja> https://media.discordapp.net/attachments/371759389889003532/724687487657836597/unknown.png
18:09:25FromDiscord<KingDarBoja> I am keeping it lol
18:10:14shashlicki prefer plain monokai, it's not too blue
18:10:41FromDiscord<Isomorpheus> onvm I had to use `getStr` on the json node first
18:11:01FromDiscord<KingDarBoja> Araq: this one? https://github.com/GaryM-exkage/vscode-nim-alt
18:11:03shashlicki wish there was a dull black theme, easier on the eyes
18:11:21Yardanico@King yeah
18:11:42Yardanicoalso KrispPugg released dimscord v1.0.0 today, I should update ircord :)
18:11:56Yardanicowell, in devel
18:12:02YardanicoI mean in dimscord devel*
18:12:03FromDiscord<KingDarBoja> I have already installed it
18:12:06FromDiscord<Isomorpheus> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/724688170972741742
18:12:13FromDiscord<KingDarBoja> That's the one with the customisation option
18:12:45Yardanico@Isomorpheus well, not really
18:12:50Yardanicothere's "with" but it's different
18:12:56Yardanicoand you can make your own withAs easily :P
18:12:58FromDiscord<KingDarBoja> Did my discord started updating out of nowhere?
18:13:37FromDiscord<Isomorpheus> well where is the with equivalent for this postgres connection code
18:15:09FromDiscord<Rika> make a macro yourself is what yardanico said i think
18:15:26FromDiscord<Isomorpheus> lol
18:15:49Yardanicosomething as simple as https://play.nim-lang.org/#ix=2pT8 can easily work
18:16:28Yardanicoah right forgot to add block
18:16:48Yardanicohttps://play.nim-lang.org/#ix=2pT9 so it opens a new scope
18:18:01FromDiscord<Isomorpheus> this is neat but feels like it should be built into something
18:18:06FromDiscord<Isomorpheus> the db_postgres library perhaps
18:18:07*Romanson quit (Quit: Connection closed for inactivity)
18:18:08FromDiscord<mratsim> I feel like Nim Discord is slowly turning into an anime image board with all those pics
18:18:13FromDiscord<Rika> rude
18:18:15Yardanicowhy? nim doesn't try to copy Python everywhere @Isomorpheus
18:18:28FromDiscord<Yardanico> @mratsim do you not like my profile picture in discord? 😄
18:18:45FromDiscord<KingDarBoja> _are you calling us weebs?_
18:18:47FromDiscord<mratsim> I didn't say it was, bad, I at least recognised on of the Ah My Goddess character and someone from Jojo's
18:18:51FromDiscord<KingDarBoja> Btw, Yardanicco -> https://github.com/tonsky/FiraCode
18:18:56FromDiscord<Yardanico> ? I use it already
18:19:01FromDiscord<Yardanico> I've used Fira Code for years
18:19:03FromDiscord<mratsim> don't know Yardanico or Rika's character though
18:19:15FromDiscord<Rika> @mratsim `Ah My Goddess`?
18:19:23FromDiscord<mratsim> @Isomorpheus
18:19:52FromDiscord<Rika> oh, niko?
18:19:54FromDiscord<mratsim> https://en.wikipedia.org/wiki/Oh_My_Goddess!
18:20:08FromDiscord<Rika> pretty sure thats niko in lovelive
18:20:10FromDiscord<Yardanico> yeah
18:20:27FromDiscord<Yardanico> https://www.youtube.com/watch?v=3oD8tj3eBls you can't mistake her
18:20:36FromDiscord<KingDarBoja> @Yardanico didn't know, just gonna install it 🙂 seems good combined with AtomDarkOne
18:20:49FromDiscord<KingDarBoja> Atom One Dark*
18:20:50FromDiscord<Yardanico> @KingDarBoja don't forget to enable font ligatures
18:20:57FromDiscord<KingDarBoja> Sir, yes sir
18:21:04FromDiscord<Yardanico> "editor.fontLigatures": true in your user settings json file
18:21:23FromDiscord<mratsim> I use Cascadia Code with ligatures
18:21:31FromDiscord<Yardanico> sent a code paste, see http://ix.io/2pTa
18:21:38FromDiscord<Rika> :EyesShaking: totally didnt move to neovim
18:22:41FromDiscord<KingDarBoja> Thank you sensei
18:22:43FromDiscord<mratsim> https://media.discordapp.net/attachments/371759389889003532/724690848528203856/unknown.png
18:22:54FromDiscord<mratsim> very important to get spaceships right
18:22:57FromDiscord<Yardanico> well yes fira code has these too
18:23:10FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/724690964693778614/2020-06-22-21-23-05_grim.png
18:23:11FromDiscord<willyboar> !last disruptek
18:23:12disbotdisruptek spoke in 12#nim-news 2 days ago
18:23:33FromDiscord<Yardanico> (they're italic because of my theme)
18:23:52FromDiscord<KingDarBoja> @mratsim it is Polnareff, the loyal french crusader
18:24:35FromDiscord<mratsim> Cascadia was heavily inspired by Fira
18:24:46FromDiscord<mratsim> https://github.com/microsoft/cascadia-code
18:25:20FromDiscord<mratsim> It has more stars than Nim oO
18:25:43FromDiscord<Yardanico> https://github.com/tonsky/FiraCode 48k stars 😛
18:25:48FromDiscord<Rika> its from microsoft tho?
18:25:52FromDiscord<Yardanico> so wat?
18:25:56FromDiscord<djazz> I use cascadia font in vscode
18:25:57FromDiscord<Yardanico> vscode is from microsoft too
18:26:01FromDiscord<Yardanico> just FYI
18:26:03FromDiscord<djazz> Its great with ligatures
18:26:50FromDiscord<Rika> > so wat?↵@Yardanico ofc it would have more stars than nim
18:27:18FromDiscord<mratsim> it's from September 2019 though
18:28:36*waleee-cl quit (Quit: Connection closed for inactivity)
18:32:22FromDiscord<KingDarBoja> I found my sweet spot with Fira Code Font and Atom One Dark ❤️ https://media.discordapp.net/attachments/371759389889003532/724693275138719894/unknown.png
18:32:38FromDiscord<KingDarBoja> And the nim-alt with custom foreground ofc
18:32:46Yardanicowhy not result instead of return :P
18:33:13FromDiscord<Clyybber> why not implicit :p
18:34:18FromDiscord<KingDarBoja> Staph lol
18:34:30FromDiscord<KingDarBoja> Let me live with return
18:34:32Yardanicough lol
18:34:38Yardanicoircord is broken on latest devel with latest dimscord
18:34:40YardanicoC compiler error
18:34:48Yardanicono arc
18:34:58Yardanicosomething to do with options
18:35:37Yardanicostuff like http://ix.io/2pTj/c
18:35:51YardanicoC compiler says that "error: no member named 'has' in 'struct tyObject_Option__HD0MN7kJw5giWZ8p9aWlT7w'"
18:37:01FromDiscord<Isomorpheus> if I'm using `db_postgres` trying to insert into a column with is of type `jsonb` can I insert a string or do I need a jsonnode or w/e
18:38:19FromDiscord<KingDarBoja> 🤔
18:38:20FromDiscord<Rika> i think you need a string
18:39:01FromDiscord<KingDarBoja> If I recall, jsonb is a json-like structure, so probably you need to use a jsonnode, but haven't used the nim API
18:39:03*vsantana_ joined #nim
18:39:21FromDiscord<Technisha Circuit> @Yardanico why not tell Kris about it?
18:39:27YardanicoIt's not his issue
18:39:36Yardanicoit has to do with recent PR which added inline to options
18:39:44Yardanicowell it's a nim bug after all I guess :P
18:40:48Yardanicohrmm
18:40:58Yardanicoit doesn't seem to be related to inline
18:41:42*vsantana quit (Ping timeout: 260 seconds)
18:42:57FromDiscord<Technisha Circuit> O
18:54:26FromDiscord<Isomorpheus> whats the equiv of python's `pass` for defining a noop function
18:54:33*PMunch joined #nim
18:54:35Yardanico"discard"
18:59:00FromDiscord<Isomorpheus> what do I put for the return type of a noop
18:59:06Yardaniconothing
18:59:10Yardanicoproc doNothing() = discard
18:59:17Yardanicoor just proc doNothing = discard
18:59:21FromDiscord<Isomorpheus> expression has no type or is ambiguous
18:59:25Yardanicoshow code :)
18:59:28*abm quit (Ping timeout: 256 seconds)
19:00:26*narimiran joined #nim
19:00:45FromDiscord<Isomorpheus> i see. you cant discard a noop
19:00:49Yardanicoyes
19:01:11*waleee-cl joined #nim
19:01:14Yardanicowell you can make a template which will be able to do that, but there's no reason to :P
19:01:38FromDiscord<Rika> well whats there to discard
19:02:48Yardanicowell I'm closer to minimizing this issue hmm
19:03:27FromDiscord<Rika> how hard would it be to make an http server that uses weave :ThonkDumb:
19:03:49Yardanicoalready WIP
19:03:57FromDiscord<Rika> ooh where
19:04:25Yardanicohttps://github.com/olliNiinivaara/GuildenStern
19:06:54FromDiscord<Rika> how well does it work :thonk:
19:07:00Yardanicoidk, it's WIP
19:07:11FromDiscord<Rika> ill look into it :thinkOwO:
19:07:56*lritter quit (Quit: Leaving)
19:10:48Yardanicoat this point I think that this might be a signature collision lol, still minimizing the thing
19:16:11Yardanicowell look at this I minimized it :D
19:16:13Yardanicoto one file even
19:16:58FromDiscord<Isomorpheus> JObject is implemented as an OrderedTable. how would I implement over the key, value pairs?
19:17:07FromDiscord<Isomorpheus> err iterate*
19:17:29Yardanicojust "for elem in myjobj:"
19:17:34YardanicoIt'll call https://nim-lang.org/docs/json.html#items.i%2CJsonNode
19:17:38Yardanicoah wait
19:17:41Yardanicohttps://github.com/nim-lang/Nim/tree/version-1-2/lib/pure/json.nim#L755 I mean
19:18:19Yardanicohttps://play.nim-lang.org/#ix=2pTu
19:18:24FromDiscord<Isomorpheus> not `for key, val in myobj:`?
19:18:33Yardanicocheck last link :)
19:18:35*abm joined #nim
19:18:37Yardanicoyeah you're right
19:20:40Yardaniconarimiran: about - nimWorkaround14447 - yes :D
19:20:46Yardanicolemme link you the PR
19:21:06Yardanicohttps://github.com/nim-lang/Nim/pull/14447
19:21:08disbotfix #14421 items uses lent T ; snippet at 12https://play.nim-lang.org/#ix=2pTy
19:21:12narimiranlemme guess the author
19:21:15YardanicoXXDDDDD
19:21:22FromDiscord<Vindaar> does github work for you guys?
19:21:23narimiranoh, i guessed correctly
19:21:27FromDiscord<Vindaar> completely dead for me
19:21:30narimiranwho would have thought
19:21:30Yardanico@Vindaar yes, works just fine
19:21:35FromDiscord<Vindaar> weird
19:23:10Yardanicolo and behold - weird options bug https://github.com/nim-lang/Nim/issues/14758
19:23:12disbotC compiler error with options and a proc field in an object ; snippet at 12https://play.nim-lang.org/#ix=2pTz
19:23:14Yardanicowill see if it's a regression
19:23:35Yardanicowell it works just fine on 1.2.0 so surely it is :D
19:26:00Yardanicowill run bisect on it
19:29:40Araqgah github down!
19:29:49Yardanicoweird, not for me
19:30:36Araqso how can reproduce the arc ssl bug?
19:30:51Araqremember I cannot be bothered to start my linux vm
19:30:57Yardanicoheh
19:31:01FromDiscord<Clyybber> Araq: Unfortunately not at all, even on linux
19:31:10FromDiscord<Clyybber> oh nevermind
19:31:24FromDiscord<Clyybber> I thought you were talking about the httpclient bug
19:31:38Araqthe httpclient bug is easy to reproduce on OSX
19:31:50Araqvia -d:nimDebugArc I always get a nil future
19:32:06Araqit's just that I don't understand the aliasing
19:32:08Yardanicothe options bug is https://play.nim-lang.org/#ix=2pTC btw (if github is down :P)
19:32:27Yardanicothe first bad commit is the PR which added inline to options, but of course it's not the root cause
19:32:54nisstyreI've been test driving an x window manager I wrote in Nim all day today and it is mostly good enough to actually use now
19:38:48Yardanicook now let's try to see if the inline bug itself is a regression or not
19:45:49FromDiscord<mratsim> great Github is down
19:45:55Yardanicohow?!
19:45:56Yardanicoit's up for me lol
19:46:40FromDiscord<Rika> "it works on my machine"
19:46:43FromDiscord<Rika> https://www.githubstatus.com/
19:46:48*Jesin quit (Quit: Leaving)
19:46:48FromDiscord<Rika> degraded
19:46:55FromDiscord<Kiloneie> why was there a 1 in red circle as in mention or smthing, i can't find anything relevant ...
19:47:04Yardanicohttps://i.imgur.com/3pJklbo.png
19:47:04FromDiscord<mratsim> I can't resolve their DNS
19:47:30Yardanicoso apparently this inline options bug is caused by specializing genericReset ??
19:48:22FromGitter<akavel> Hi! I'm trying `import pegs` then `const pegHex = charSet({'0'..'9', 'a'..'f', 'A'..'F'})`, and I'm getting: `Error: {} must have the set type` - any idea what's going on? the same seems to work if I replace `const` with `let` o_O
19:51:03FromDiscord<mratsim> hack: try using a "let foo {.compileTime.}" and then "const bar = static(foo)"
19:52:57FromGitter<akavel> :( ehhh, and I wanted to improve readability with PEGs :(
19:53:11Yardanicohttps://github.com/zevv/npeg also exists :P
19:53:14*marnix quit (Ping timeout: 240 seconds)
19:53:41FromGitter<akavel> oh oh oh oh oh!!!
19:54:20FromGitter<akavel> is it pure nim or requires some 3rdparty libs?
19:54:25Yardanicopure nim ofc
19:54:35Yardanicono dependencies
19:54:38Yardanico(except stdlib ofc)
19:54:50FromDiscord<Elegant Beef> Damn too quick yard i was going to go full pedant
19:54:54FromGitter<akavel> sweeeeet, thanks Yardanico!!! <3 <3 <3
19:55:14FromGitter<akavel> up for one more try ;)
19:55:55FromGitter<xmonader> hello :) new chapter of nim days covering parser combinators https://xmonader.github.io/nimdays/day21_parsec.html
19:56:04*vikfret quit (Quit: Leaving)
19:57:34FromGitter<akavel> lol, speak about timing: if npeg won't work for me, maybe I'll try parser combinators ;P
19:58:37FromGitter<xmonader> > lol, speak about timing: if npeg won't work for me, maybe I'll try parser combinators ;P ⏎ ⏎ I'm sure there're tons of optimizations in npeg one, this is merely to explain the concept :)
20:21:09FromDiscord<willyboar> @xmonader great!
20:21:39FromDiscord<SeanOMik> Is there a tutorial on making a .nimble file for a library?
20:21:52Yardanicojust do "nimble init"
20:21:59Yardanicoit'll create directory structure
20:22:09Yardanicohttps://github.com/nim-lang/nimble#libraries
20:22:09FromDiscord<SeanOMik> Okay
20:22:13Yardanicoand you can of course check other examples
20:22:19FromDiscord<SeanOMik> I've already created the directory structure
20:22:23FromDiscord<SeanOMik> So hopefully its correct
20:22:27Yardanicofor something simple it's just this
20:22:28Yardanicohttps://github.com/Yardanico/nim-mathexpr/blob/master/mathexpr.nimble
20:22:43FromDiscord<willyboar> Do you mean simple nimble file or nimble tasks?
20:22:45FromGitter<akavel> Yardanico: about npeg, after doing `const foo = patt ...`, I don't seem to be able to use it in another `patt`? :(
20:22:55Yardanico?
20:23:05Yardanicowhy do you want to use one patt in another patt?
20:23:10Yardanicojust create a "parser" then
20:23:29FromGitter<akavel> by parser you mean `peg`, yes?
20:23:32Yardanicoyes
20:23:54FromGitter<akavel> but then can I access sub-patterns from this parser?
20:24:23Yardanicowdym?
20:24:35Yardanicoit's PEGs but with nim syntax
20:24:37FromGitter<akavel> i.e.: I want to reuse some patterns in other patterns, but I want to have several separate patterns, not just one "overlord" pattern
20:24:50Yardanicowell it's not a "pattern"
20:24:52Yardanicoit's a whole PEG parser
20:24:57Yardanicopattersn are "a <- thing"
20:25:43FromGitter<akavel> Nim core's peg seems to allow reusing patterns :/
20:25:49FromGitter<akavel> my case:
20:26:03FromGitter<akavel> I want to declare a "helper" pattern pegUrlencoded
20:26:07FromGitter<akavel> which is non-trivial
20:26:16Yardanicobtw ping Zevv ^
20:26:22FromGitter<akavel> then I want to use it in a few places
20:26:24Yardanicoand wdym by "nim core's peg allows it"?
20:26:32Yardanicohow exactly?
20:26:51FromGitter<akavel> there are functions for composing Peg objects
20:27:08zedeusyou can use the grammer feature to define "sub patterns" i think
20:27:11zedeusgrammar*
20:27:18Yardanicoah right I forgot about that one
20:27:20zedeushttps://github.com/zevv/npeg/blob/master/src/npeg/lib/uri.nim
20:27:49Yardanicoexactly
20:28:03zedeushttps://github.com/zevv/npeg#composing-grammars-with-libraries
20:28:05zedeushere
20:28:56FromGitter<akavel> oooh, ok, thanks!!! <3 :) :)
20:31:01*abm quit (Quit: Leaving)
20:34:29FromDiscord<SeanOMik> I have some questions about nimble project structure. My project will have this layout: https://media.discordapp.net/attachments/371759389889003532/724724009346007080/unknown.png
20:34:33FromDiscord<SeanOMik> Similar to it at least
20:34:51FromDiscord<SeanOMik> Will `foobar.nim` import everything in the `foobar` directory?
20:34:57Yardaniconot by default
20:35:02FromDiscord<SeanOMik> Okay
20:35:08FromDiscord<Isomorpheus> does `nimble install` not mutate your `nimble` file?
20:35:10FromDiscord<SeanOMik> What does `foobar.nim` actually have in it then?
20:35:15Yardanico@Isomorpheus why would it?
20:35:23FromDiscord<Isomorpheus> ever used npm?
20:35:28Yardanico@SeanOMik because you might want to split stuff into modules
20:35:37Yardanico@Isomorpheus nimble doesn't change anything in your project
20:35:48Yardanicoit only creates stuff in ~/.nimble (on *nix)
20:35:55FromDiscord<SeanOMik> And I do have stuff split into modules
20:36:05FromDiscord<SeanOMik> But I'm confused what I should put into `foobar.nim`
20:36:08Yardanicowell that's what it's useful for - you have a couple submodules and main submodule
20:36:18FromDiscord<SeanOMik> Oh okay
20:36:18Yardanicoor if you have a lot of separate submodules but want to export them all as one
20:36:29Yardanicoe.g. https://github.com/krisppurg/dimscord/blob/master/dimscord.nim
20:36:34FromDiscord<SeanOMik> Yeah, thats how may project is layed out
20:36:45Yardanicosorry https://github.com/krisppurg/dimscord/blob/devel/dimscord.nim
20:37:35FromDiscord<SeanOMik> Okay thanks
20:43:31*Vladar quit (Quit: Leaving)
20:46:13FromDiscord<KingDarBoja> Lol I was asking something similar at #offtopic
20:50:03*NimBot joined #nim
20:50:33FromDiscord<SeanOMik> I'm trying to generate documentation for my project but I get this error: ```Error: unhandled exception: pathutils.nim(70, 11) `not isAbsolute(f.string)` C:\Users\sean_\.nimble\pkgs\websocket-0.4.1\websocket.html```
20:50:45FromDiscord<SeanOMik> That `pathutils.nim` is not a file in my project
20:51:09FromDiscord<SeanOMik> `nim doc --project -o:docs/documentation.html src/project.nim` is the command I'm running
20:51:57FromDiscord<SeanOMik> Is there a way to not generate documentation for the websocket module?
20:52:29Yardanicoif you just want to generate docs for 1 file just do "nim doc -o:docs/documentation.html src/project.nim"
20:52:30AraqHmm, it’s caused by
20:52:30Araq future.cb = nil
20:52:46FromDiscord<SeanOMik> Okay
20:52:58Araqindicating that 'future.cb's refcount is off
20:53:12FromDiscord<SeanOMik> I'll just have to make a script to generate documentation for all my modules
20:53:16*nikita` quit (Quit: leaving)
20:53:24FromDiscord<KrispPurg> Are you trying to generate docs for every file one at a time?
20:55:20PMunchhttps://www.reddit.com/r/nim/comments/he0mj0/three_part_series_and_a_video_on_embedding/?
20:57:41Yardanicoyay
20:58:01Yardanicoyour url in the article is broken though
20:58:10Yardanico"so if you’re sold on the idea [url https://peterme.net/how-to-embed-nimscript-into-a-nim-program-embedding-nimscript-pt-2.html]head over to part 2[/url]!"
21:05:00PMunchAh..
21:11:13*narimiran quit (Ping timeout: 265 seconds)
21:13:28PMunchThere Yardanico all the links should be fixed now
21:19:06*casaca quit (Remote host closed the connection)
21:20:01*solitudesf quit (Ping timeout: 264 seconds)
21:20:08FromDiscord<gokr> I have a c2nim conundrum, the original header section I am wondering about is this: <https://github.com/gokr/orx/blob/master/code/include/math/orxVector.h#L67-L114> - as can be seen an orxVector is a struct of three unions. c2nim produced this: <https://github.com/gokr/orx/blob/master/code/include/math/orxVector.nim#L49-L89>. The reason I marked all the way to `pvVec.fX = fX` is because that code fails obviously because a Nim orxVECTOR has n
21:21:10*PMunch quit (Quit: leaving)
21:21:16FromDiscord<gokr> So AFAICT the C code uses the same struct type for cartesian, spherical, RGB, HSL and HSV spaces. No clue why though.
21:36:48*tane quit (Quit: Leaving)
21:55:53FromDiscord<gokr> So its apparently... a kinda C pattern I guess. Makes common code more readable, although... captures 5 different things in a single type.
22:16:49Zevvoh late to the party, anythig I can still help with, npegwise?
22:20:00*fowl joined #nim
22:21:42*fowl quit ()
22:21:45Zevv@akavel: you good?
22:22:00*fowl joined #nim
22:22:31FromDiscord<Recruit_main707> dont know if someone noticed, but benchmarks changed↵https://github.com/jabbalaci/SpeedTests
22:23:27FromDiscord<--HA--> Can walkFiles be converted to a sequence? I tried to use toSeq from sequtils on it but I'm either doing it wrong or that does not work.
22:27:11FromDiscord<--HA--> Oh. `toSeq(walkFiles("*")) `works but not `walkFiles("*").toSeq` which I kept trying. I guess because it is a template?
22:30:30FromDiscord<Recruit_main707> That’s weird
22:33:33FromDiscord<juan_carlos> toSeq is template
22:36:57FromDiscord<--HA--> So it is expected? Templates can not be used with the "." call?
22:38:07FromDiscord<--HA--> https://play.nim-lang.org/#ix=2pUr
22:39:10ee7[m]See https://nim-lang.org/docs/manual.html#templates-limitations-of-the-method-call-syntax
22:40:36FromDiscord<--HA--> Thank you
22:45:36ee7[m]You're welcome.
22:54:06*Zectbumo quit (Read error: Connection reset by peer)
22:54:36*mutanttu1key joined #nim
22:54:58mutanttu1keyI am hoping to get a return code from a httpClient objet. I am using newHttpClient() then adding headers, and then getContent
22:55:16mutanttu1keyI thought maybe I could do result = client.getContent() and check result.status or maybe client.status, neither seem right?
22:55:20*Zectbumo joined #nim
22:55:29mutanttu1key(to make sure the page exists with status == Http200
22:58:55FromDiscord<juan_carlos> use get
22:59:35mutanttu1keyOK then I have a fullresponse object?
23:00:24FromDiscord<juan_carlos> ye
23:01:27*drdee joined #nim
23:06:11*thomasross joined #nim
23:10:28FromDiscord<SeanOMik> How would I print colored text to console?
23:10:41*drdee quit (Quit: Leaving)
23:12:09FromDiscord<willyboar> https://nimble.directory/search?query=Terminal+colors
23:13:44FromDiscord<juan_carlos> `terminal.styledEcho(bgBlack, fgRed, "Hi")`
23:14:56FromDiscord<SeanOMik> Cool
23:15:02FromDiscord<SeanOMik> Thanks
23:21:23*Senny quit (Ping timeout: 260 seconds)
23:30:15*Zectbumo quit (Remote host closed the connection)
23:46:08*krux02_ joined #nim
23:48:35*Trustable quit (Remote host closed the connection)
23:49:02*krux02 quit (Ping timeout: 260 seconds)
23:54:31*vsantana_ quit (Quit: leaving)