<< 12-03-2024 >>

00:25:09*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
00:38:20*SchweinDeBurg joined #nim
01:14:11FromDiscord<Elegantbeef> It should be bound inside `bar` as that's there is `newTensor` in scope
01:14:29FromDiscord<Elegantbeef> But one can always `mixin` or `bind` inside `bar`
01:18:20arkanoidElegantbeef, mixin is doing nothing inside bar, but bind does work
01:18:39arkanoidbut I'm failing to understand what's going on
01:18:55FromDiscord<Elegantbeef> This is a bug in binding
01:19:10arkanoidI'm adding one by one the required "binds", trying if "mixin" can be used instead (but none so far)
01:19:34FromDiscord<Elegantbeef> I mean you don't need mixin since you never want to use a user's `newTensor`
01:20:35arkanoidto let it compile, I'm using mixin/bind in a proc where I never use the argument of them
01:20:50arkanoidat least not directly
01:21:00arkanoidit's quite impossible to use generics like this
01:21:25FromDiscord<Elegantbeef> I don't know what you mean
01:22:28FromDiscord<Elegantbeef> In this case the `newTensor[float32](0)` can be fully resolved inside `bar` but it does not make `newTensor` a closed symbol so this is very much a binding symbol bug
01:22:28arkanoidlook at this proc. To make it compile, I have to "bind newTensor" https://play.nim-lang.org/#pasty=siNYZqcsJTXc
01:22:44arkanoidbut I never call directly "newTensor" inside that module
01:22:55arkanoidand the called this is a proc, not a template or a macro
01:22:58FromDiscord<Elegantbeef> This is how generics work
01:23:30FromDiscord<Elegantbeef> `bind newTensor` forces `newTensor` to be a 'closed symbol' which means it stores all instances of `newTensor` at the declaration
01:23:51FromDiscord<girvo> sent a long message, see https://pasty.ee/qONeZrIMRklg
01:23:57FromDiscord<Elegantbeef> Otherwise it's supposed to be a 'open symbol' which means it stores all instances of `newTensor` at instantiation, but also gets them at user scope
01:25:29arkanoidthere's some in depth compiler knowledge needed here
01:25:50FromDiscord<Elegantbeef> I mean that's how generics work and you are expected to understand that
01:25:59FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#generics
01:26:17FromDiscord<Elegantbeef> Specifically https://nim-lang.org/docs/manual.html#generics-symbol-lookup-in-generics
01:26:29FromDiscord<Elegantbeef> This does seem to be a bug but you really need to know about open/closed symbols
01:27:14FromDiscord<Elegantbeef> hmph girvo the double destroy is interesting
01:27:40FromDiscord<Elegantbeef> You have two destructors for a single constructor
01:29:17arkanoidin that example, I don't even get why `proc `==` (a, b: Index): bool {.borrow.}` is a generic
01:30:25FromDiscord<Elegantbeef> It's not
01:30:34FromDiscord<Elegantbeef> There is a `==` for tuples defined that uses `mixin` so you can use the `Index`'s `==`
01:30:48FromDiscord<Elegantbeef> If it was a closed symbol you'd never be able to use your own `==`s
01:31:25FromDiscord<Elegantbeef> The point is to show "Look at what open symbols do you can make generics that expect an interface"
01:32:17arkanoiddo you mean that that exaples uses a `==` generic proc that is not shown nor linked in the example itself?
01:33:49*lucasta quit (Quit: Leaving)
01:34:30arkanoidmaybe this? https://nim-lang.org/docs/system.html#%3D%3D%2CT%2CT_2
01:35:02*lucasta joined #nim
01:35:59FromDiscord<Elegantbeef> It directly mentions that it uses the `==` defined in system for tuples
01:36:01FromDiscord<Elegantbeef> Yes
01:36:54arkanoidmy chance to improve the docs!
01:42:25FromDiscord<Elegantbeef> @girvo this is a value type so it's making copies all over the place 😄
01:43:36arkanoidElegantbeef, when you say that this specific case is a bug, do you mean a bug in arraymancer implementation code, or a bug in nim compiler
01:43:45FromDiscord<Elegantbeef> The latter
01:44:02FromDiscord<Elegantbeef> Nim should properly bind that to a `opensymchoice` and as such it should always remember `newTensor`
01:44:42arkanoidok. I'll try to understand open and closed symbols first
01:45:57arkanoidbtw this experience drives me off the use of generics/concept and all those stuff. I got a really bad adventure refactoring my code, and most of the time it was due to import order, and now mixin and binds. I was not ready for this
01:46:24arkanoidin particural when it ends with a possible compiler bug
01:46:26FromDiscord<Elegantbeef> If it's any consolation I heavily use generics and have never seen this bug 😄
01:48:38arkanoidlucky you
01:50:19arkanoidI'm stuck at the fouth `bind` I have to chain to let my code compile
01:50:40arkanoidI think I should stop using modules and put all my code into a single huge nim file
01:55:01arkanoidthat's what I tend to do with my types anyway
02:02:03FromDiscord<Elegantbeef> I'm sorry for your loss
02:09:20FromDiscord<Elegantbeef> @girvo it was your `uart = Uart[Init](other)`
02:09:26FromDiscord<Elegantbeef> Atleast in one part
02:14:25FromDiscord<Elegantbeef> I think Nim is broken with typestates and destructors though
02:17:30FromDiscord<Elegantbeef> https://play.nim-lang.org/#pasty=MYKhunBHbjgi works for context
02:17:59FromDiscord<Elegantbeef> I think Nim's hook logic does not understand `Uart[Init] isnot Uart[Uninit]`
02:19:25FromDiscord<Elegantbeef> Yep that's the issue https://play.nim-lang.org/#pasty=ddpCsaKMTasr
02:45:58*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
02:52:05*lucasta quit (Remote host closed the connection)
03:06:13NimEventerNew Nimble package! umriss - Extract syscall stats from strace output files, see https://github.com/tdely/umriss
03:16:06FromDiscord<dedraiaken> Is it possible to store a typedesc in an object such that you can store it as RootObj and cast back to the original object type based on that field? I'm trying to create a generic linked list that can store variable object types.
03:16:54FromDiscord<dedraiaken> sent a code paste, see https://play.nim-lang.org/#pasty=bTJTerhUoJqi
03:20:11FromDiscord<Elegantbeef> Nope
03:20:30FromDiscord<Elegantbeef> typedesc are compiletime only
03:20:48FromDiscord<Elegantbeef> Use an object variant or something like jsonnode to get type erasure like you want
03:30:39FromDiscord<demotomohiro> In reply to @dedraiaken "Is it possible to": That is almost same to trying to store different types in a seq:↵https://internet-of-tomohiro.netlify.app/nim/faq.en.html#type-how-to-store-different-types-in-seqqmark
03:33:51FromDiscord<dedraiaken> In reply to @demotomohiro "That is almost same": Hmm maybe I could do it that way. Thanks!
04:12:36arkanoidhow can I disambiguate malebolgia -> and sugar -> ? https://github.com/Araq/malebolgia/blob/32fd877d46478735f1dbe9c937bddcff9255b3e0/src/malebolgia.nim#L183
04:12:56FromDiscord<Elegantbeef> use backticks
04:13:05FromDiscord<Elegantbeef> Oh wait
04:13:12arkanoidhttps://nim-lang.org/docs/sugar.html#-%3E.m%2Cuntyped%2Cuntyped
04:13:15FromDiscord<Elegantbeef> In there you'd do `b[0] == bindSym"->"`
04:13:50FromDiscord<Elegantbeef> Though there is no malebolgia `->`
04:14:17FromDiscord<Elegantbeef> So in summary you don't as sugar is an untyped macro
04:14:33FromDiscord<Elegantbeef> As is malebolgia
04:14:34arkanoidimport std/sugar except `->`
04:15:05arkanoidI know how to circument sugar, but not how to circumvent malebolgia
04:15:35FromDiscord<Elegantbeef> You cannot as it's a DSL
04:15:45FromDiscord<Elegantbeef> There is no `->` symbol you can disregard
04:15:58arkanoidit works
04:15:59FromDiscord<Elegantbeef> If you want to use sugar's `->` you cannot use it inside malebolgia
04:16:10FromDiscord<Elegantbeef> What?
04:16:21arkanoidimport std/sugar except `->`
04:17:54FromDiscord<Elegantbeef> I'm so confused
04:18:40arkanoidprolly because I went from how to disambiguate to "remove sugar side" as soon as I saw your beautiful contraption
04:19:10arkanoidwhich I appreciate, much gratitude
04:19:25FromDiscord<Elegantbeef> malebolgia is untyped so it's odd that sugar interferes 😄
04:24:54arkanoidsugar does interferes. Here's an example where you have to remove sugar from imports to compile https://play.nim-lang.org/#pasty=ESFIjQrsgeMw
04:27:57FromDiscord<Elegantbeef> So odd given that malebolgia is an untyped DSL
04:30:02arkanoidwhy stopping at 1 bug per day
04:30:16FromDiscord<Elegantbeef> This is atleast a bug inside of a DSL
04:30:58arkanoidyes, I was not serious. I also think this is a not so good design decision inside malebolgia
04:38:29arkanoidand now I'm getting "lib/std/tasks.nim(98, 70) Error: undeclared identifier: 'isolate'"
04:40:56arkanoidI already know that by the time I'll get at the end of this major refactory of my project to use compile time unit of measures, I will have reached the idea to rollback to pre-generic era to never have to deal it again
04:42:09arkanoidall the problems I'm facing are external to the logic of the problem I'm trying to solve
05:01:08FromDiscord<dedraiaken> sent a code paste, see https://play.nim-lang.org/#pasty=vaOINoqKysSS
05:01:57FromDiscord<girvo> In reply to @Elegantbeef "I think Nim's hook": yeah damn
05:02:34FromDiscord<Elegantbeef> Is your dumphook defined before or after this procedure
05:04:20FromDiscord<dedraiaken> In reply to @Elegantbeef "Is your dumphook defined": after
05:04:28FromDiscord<Elegantbeef> Put it before
05:06:30FromDiscord<dedraiaken> In reply to @Elegantbeef "Put it before": It works! 😵‍💫
05:09:42FromDiscord<dedraiaken> In reply to @Elegantbeef "Put it before": I owe you like 10 coffees. 🙃
05:10:22*krux02 quit (Remote host closed the connection)
05:13:12FromDiscord<Elegantbeef> Also that cast is dirty
05:13:29FromDiscord<Elegantbeef> if this is a `ref RootObj` you can just do `MyType(...)` assuming those are `ref object of X`
05:14:29*SchweinDeBurg joined #nim
05:17:06FromDiscord<dedraiaken> In reply to @Elegantbeef "if this is a": They are indeed. 11.
05:23:11FromDiscord<Elegantbeef> @girvo atleast you can do manual typestates it's not as nice but it does work 😄
06:10:35FromDiscord<morgan> so im getting a crash somewhere in this function, i think it's a null pointer deref. i tried checking if the input host pointer is nil (by having it write a file) but that didn't trigger so im guessing something else isn't working https://media.discordapp.net/attachments/371759389889003532/1216991711323099147/image.png?ex=660266da&is=65eff1da&hm=6b94bbb31519e5cbdf9000e0ae710b3036bf510430bd91bf12a46baaaa8393b4&
06:10:56FromDiscord<morgan> and it's a dynamic library, nim isn't complaining
06:12:47FromDiscord<odexine> What are the types of your global
06:12:51FromDiscord<Elegantbeef> `myPlug.plugin` is a `ptr` but you do not allocate it
06:13:14FromDiscord<morgan> oh right
06:13:44FromDiscord<morgan> huh
06:13:48FromDiscord<Elegantbeef> I don't imagine `myPlug.plugin` needs to be `ptr T`
06:14:10FromDiscord<Elegantbeef> It probably should be `T` and then you do `myPlug.addr` as the return expression
06:14:18FromDiscord<morgan> i was copying from c code for all this example plugin code, and they didn't there, but i never tried compiling the example
06:14:18FromDiscord<Elegantbeef> `myPlug.plugin.addr` \
06:14:41FromDiscord<Elegantbeef> If the C code uses a pointer as the field it's probably wrong
06:15:26FromDiscord<Elegantbeef> Cause if you lose the `myPlug` pointer you need to be able to get that pointer back to free memory
06:15:55FromDiscord<Elegantbeef> Which is done like `dealloc(cast[pointer](cast[uint](thePtrClapPlugin) - MyType.offsetOf(plugin))`
06:18:23FromDiscord<morgan> In reply to @Elegantbeef "If the C code": it's possible its a value type there, nearly everything in here is pointers so i might've made one more thing a pointer
06:18:39FromDiscord<morgan> anyways adding that allocation fixed that issue
06:18:45FromDiscord<Elegantbeef> It almost certainly is given that otherwise you lose that pointer and cannot get it back
06:20:01FromDiscord<morgan> huh wow that got a lot further than i expected, it's processing the sound even
06:20:24FromDiscord<morgan> oh yeah that isn't a pointer
06:20:27FromDiscord<morgan> huh
06:22:40FromDiscord<Elegantbeef> Apparently I have a skill for guessing field types in some shitty C hellscape
06:30:28*advesperacit joined #nim
06:35:45FromDiscord<girvo> In reply to @Elegantbeef "<@823468778704076810> atleast you can": Yeah that's basically what I'm doing haha. I'm curious how C++ RAII works wrt. destructors/sink/`init()` being run before the previous destroy
06:37:48FromDiscord<Elegantbeef> Who knows I doubt any C++ programmer could tell you 😛
06:38:30FromDiscord<girvo> haha I distinctly remember that a book I have behind me explains it, but I immediately discarded that information 😄
06:41:47FromDiscord<girvo> Ah, right, it seems to be (basically) the same as Nim's; except `example& operator=(const example& other)` instead of `=sink` -- I'd need to define it, etc.
06:42:10FromDiscord<girvo> I have another book that explains RAII for this kind of work. I might check it, see if there are any patterns I can steal
06:46:34NimEventerNew Nimble package! vqsort - A vectorized Quicksort (AVX2-only), see https://github.com/Asc2011/vqsort
07:06:25*om3ga joined #nim
08:03:37*PMunch joined #nim
09:27:40PMunchOh no, it seems like 2.0.0 broke Protobuf :( Error: invalid order of case branches
10:03:44*tc424 joined #nim
10:17:36FromDiscord<vindaar> at least the tests and examples seem to work fine on devel
10:23:03PMunchHmm, strange
10:54:32ZevvPMunch: so how are you doing with your CPS adventures. Did you set out on your kwest yet?
11:04:33PMunchAh, not yet. I just got back from back-to-back vacation and army stuff
11:04:57Zevvarmy stuff. dude.
11:05:02Zevvhow does that work out for oyu
11:06:12PMunchWhat do you mean? In Norway we have one year of mandatory military service, then each year about a week of repetition exercise
11:06:14FromDiscord<nnsee> Norway has conscription, iirc it even applies to women
11:06:27PMunchYes, now it applies to women as well
11:06:40FromDiscord<nnsee> after conscription you're put into reserve and occasionally called back for exercises
11:06:45PMunchExactly
11:07:20PMunchFail to show up and the police will come to your house and you risk some hefty fines AFAIK
11:07:43FromDiscord<nnsee> how much notice do they give you?
11:10:07PMunch3-4 months I think
11:11:05FromDiscord<nnsee> oh, that's quite a lot
11:12:34FromDiscord<nnsee> or, well, I say that, but it's 120 days here too
11:12:48FromDiscord<nnsee> occasionally we have 24-hour ones...
11:12:58FromDiscord<nnsee> to test readiness
11:13:58PMunchI sometimes get an SMS asking how fast I would be able to meet at the rendevouz point
11:14:11PMunchrendezvous*
11:14:45PMunchYou actually have to show up in 24 hours?
11:17:14Zevvi'd hate that all so much
11:17:37Zevvi know the reasons and all but not sure if i could do that
11:18:17Zevvwe used to have conscription in .nl, but just when I turned 18 it got abandoned, so I got away with that
11:18:30PMunchEh, it's not that bad. Actually quite fun to do something so different to what I normally do (although I did get to code some Excel macros this year :P)
11:19:23PMunchAnd they of course do an evaluation of you before you do your mandatory service, and if you can't handle it they send you home
11:34:11FromDiscord<nnsee> In reply to @PMunch "You actually have to": yup
11:35:29FromDiscord<nnsee> In reply to @Zevv "i'd hate that all": 1. we live right next to a certain country with a reputation for randomly invading democratic european countries↵2. it's low key fun
11:36:46PMunchHuh, I don't think that would go down very well in Norway :P
11:37:17PMunchI typically get my messages at times where it might be expected that a lot of people are away
11:44:44FromDiscord<djazz> Me, a Swede: War? What is that? Oh we are in Nato now, what happens next?
11:45:27PMunchYou get to come and exercise with us :P
11:45:50FromDiscord<odexine> ~~imagine being in europe~~
11:46:10FromDiscord<nnsee> i don't need to imagine 💀
11:46:16Zevvlow key fun sounds like a good reason :)
11:52:08PMunchI guess it's kinda like LARPing Modern Warfare edition with an extreme budget and crazy high attendance
12:00:31Zevvbut still. i'm not sure if i'm a pacifist or just a coward.
12:17:04PMunchI'm terrified of actually ending up in a war, that would be horrible. The Norwegian defense ran a campaign fairly recently which was very powerful, it is basically a reel of shots of fighter planes, tanks, submarines, and soldiers. During these clips the narrator voice asks why do we upgrade our fighter planes, why do people have to repeat the same tasks over and over again, why are we a part of NATO, etc. At the end he asks "What do we as a nation want to
12:17:04PMunchachieve with this? What are we hoping will happen?" Then it cuts to a couple on a mountaintop while the narrator says "Absolutely nothing, fantastic nothing"
12:17:26PMunchThe goal is not to end up actually using all this knowledge, the goal is to avoid it
12:17:50Zevvright. sure. i know.
12:17:51Zevvbut still
12:17:54Zevvman
12:18:18Zevvwe've grown up in this hiatus of violence. total absence of anything really threatening in my life at all
12:18:32Zevvstories of grandparents is the closest it got
12:19:40Zevvi have this ukraenian friend
12:19:55Zevvas a kid they used to climb the fences and go into russia for the weekend
12:20:06Zevvputting trains on fire, that kind of shit
12:20:27Zevvall the while i was just hanging around at parties smoking weed and listining to terrible music
12:20:44PMunchWait what?
12:20:50PMunchThey were torching trains?
12:20:54Zevvfreight trains
12:21:02FromDiscord<nnsee> ... but why
12:21:22Zevvbecause they have always been at war, from their perspective
12:21:30PMunchI guess some people really want to watch the world burn, at least very specific parts of it
12:21:33PMunchAh right
12:21:51Zevvit's just how they grow up. he lost two good friend over the last year
12:21:55Zevvand proud of it
12:21:56Zevvbut man.
12:22:01PMunchThat's rough
12:22:11Zevvi know right. but still, he's not even blusing when talking about it
12:22:22Zevvit's such a different perspective. that nationalism.
12:23:55PMunchFor me it's about protecting peoples ability to be able to smoke weed and listen to terrible music. (except that weed isn't really legal here, but you get the point)
12:26:55Zevvsure. i get you.
12:28:02Zevvi guess conscription is actually a very good thing. I think I wish they would bring that back in nl
12:28:13Zevvit just makes you realize some of this shit is, like, real
12:28:24Zevvit's not movies and newspapers
12:28:58PMunchYeah, I think a lot fewer people would call for war if you knew that your name was on the list of people who would have to participate in said war..
12:29:57Zevvright
12:56:27*def- quit (Quit: -)
12:57:01*def- joined #nim
13:22:41*krux02 joined #nim
13:30:42FromDiscord<lyhokia> Hello, any one knows how to solve the issue "error: request for member ‘facedetect_cnn’ in ‘(NU8)resultBuffer’, which is of non-class type "?
13:30:58FromDiscord<lyhokia> so here I am writing a binding to some c functions and nim assumes the first parameter is a class when it isn't
13:31:14FromDiscord<lyhokia> here's the generated code: "void)(((NU8) (resultBuffer))->facedetect_cnn(((NU8) ((&data.p->data[((NI)0)]))), ((int) (width)), ((int) (height)), ((int) (((NI)100)))));"
13:31:23FromDiscord<lyhokia> (edit) ""void)(((NU8)" => ""(void)(((NU8)"
13:34:42FromDiscord<nnsee> In reply to @lyhokia "Hello, any one knows": can you post your nim code? https://play.nim-lang.org
13:39:33FromDiscord<lyhokia> https://play.nim-lang.org/#pasty=pNCansTNZKWn
13:40:13FromDiscord<lyhokia> I tried to replace importcpp with importc and then it tells me the function is not found
13:40:55FromDiscord<lyhokia> there's so many libs on the market to tell you how to wrap a C lib yet I found them still hard to grasp lol
13:42:04FromDiscord<lyhokia> Sorry here's the full code https://play.nim-lang.org/#pasty=uhzjimbmyqNM
13:42:43PMunchIf you're wrapping C and not C++ then I'd highly recommend Futhark
13:42:53PMunchAnd you definitely shouldn't use importcpp
13:43:59FromDiscord<lyhokia> both won't work in my case
13:44:06FromDiscord<lyhokia> the library itself is written in cpp
13:45:49FromDiscord<lyhokia> importc now says I don't have <vector>
13:46:14FromDiscord<lyhokia> so I guess importc is not the way to go either, they have some codes in the header file which is annoying
13:46:24PMunchYeah I'm looking at the code and it's definitely C++ and not C
13:46:27FromDiscord<lyhokia> (edit) "codes" => "codes(definitions) as well "
13:46:46FromDiscord<lyhokia> here's the libraryhttps://github.com/ShiqiYu/libfacedetection/tree/master
13:46:55PMunchI already found it :P
13:47:09FromDiscord<lyhokia> lol
13:47:23PMunchJust to make sure, you are compiling your program with `nim cpp someproject.nim`?
13:47:28FromDiscord<lyhokia> this lib has 0-dependency itself, I managed to get it work with stb_image but not for nim
13:47:34PMunchAnd not the normal `c` switch
13:47:46PMunchOr mode rathe
13:48:20FromDiscord<lyhokia> looks like it is using nim c
13:48:25FromDiscord<lyhokia> I'm calling nimble test
13:48:56PMunchYou have to use `cpp` when linking to C++ libraries
13:49:13FromDiscord<lyhokia> how should I config nimble to do that?
13:49:32FromDiscord<lyhokia> I mean obviously I can't expect end user to use nim cpp to compile the library
13:49:45PMunchWhy is that obvious?
13:50:17FromDiscord<lyhokia> ..
13:50:24FromDiscord<lyhokia> okay probably it's up to argue
13:50:36FromDiscord<lyhokia> then how should I config nimble to use cpp instead?
13:50:57FromDiscord<lyhokia> here's the nimble test log I got: https://pastebin.ubuntu.com/p/RYTJfxjqm3/
13:52:12PMunchAdd a `backend = "cpp"` option in your package element
13:52:44FromDiscord<lyhokia> Let me see
13:53:57FromDiscord<lyhokia> It still has the same issue
13:54:16FromDiscord<lyhokia> And I don't know if it's already using cpp backend because the error message is from *.cpp
13:55:29PMunchSounds like it if it is from a .cpp file
13:56:01FromDiscord<lyhokia> it is, I checked the genreated file by nim
13:57:52FromDiscord<lyhokia> okay looks like I need to rtfm
13:57:59PMunchHmm, strange..
13:58:09PMunchDid you find anything?
13:58:25FromDiscord<lyhokia> https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-procs
13:59:01PMunchAah, right
13:59:49FromDiscord<lyhokia> now I have some omp errors, let me see if I can fix them lol
14:02:10FromDiscord<lyhokia> yeah it compiles now with another -fopenmp
14:02:11FromDiscord<lyhokia> thanks
14:22:20*xet7 joined #nim
14:36:35FromDiscord<treeform> In reply to @arkanoid "is "import vmath except": Why don't you want isNaN?
14:37:17FromDiscord<treeform> Oh math has isNaN now?
14:38:13FromDiscord<treeform> I should fix my lib.
15:13:51NimEventerNew thread by pixel: Gc/malebolgia bug?, see https://forum.nim-lang.org/t/11203
15:19:41*ntat joined #nim
15:20:47*PMunch quit (Quit: Leaving)
16:07:23FromDiscord<ricky._.spanish> is it possible in a nimble definition to pull required precompiled binaries from a external url and include either architecture headers/params in the request?
16:18:24FromDiscord<lyhokia> Hello, I got libfacedetect working when using `nim cpp` but it won't work when I run nimble test, any idea how to fix?
16:18:25FromDiscord<lyhokia> https://github.com/glyh/facedetection/blob/master/src/facedetection.nim
16:19:37FromDiscord<lyhokia> (edit) "nimble test," => "`nimble test`,"
16:20:22FromDiscord<lyhokia> It's kinda annoying that the author write cpp code in the header so I can't use futhark
16:21:20FromDiscord<lyhokia> like, is it possible to config include dir with nimble?
16:24:17FromDiscord<lyhokia> here's the log: https://pastebin.ubuntu.com/p/fjgtmBkC2p/
16:35:29*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
16:44:43*def- quit (Quit: -)
16:50:38*def- joined #nim
17:19:59arkanoidtreeform exactly, I have to disambiguate
17:20:46arkanoidtreeform: I've been crying in vmath + unchained recently. I've opened an issue about it
17:22:06FromDiscord<demotomohiro> In reply to @lyhokia "Hello, I got libfacedetect": It seems your nimble doesn't use cpp backend but uses c backend.↵Did you set backend to use cpp in nimble?↵https://github.com/nim-lang/nimble?tab=readme-ov-file#optional
17:22:55arkanoidI'm using Malebolgia and I'm calling `spawn` from a generic proc. I'm dealing with "nim-2.0.2/lib/std/tasks.nim(97, 39) Error: undeclared identifier: 'isolate'" and I'm failing to understand why this happens. I'm trying using mixins and binds but I fail to understand what's wrong here. If I try to replicate same context outside of my project it compiles successfully
17:27:25arkanoidI'm trying to reproduce the issue, but so far I keep getting working code. Still working on it https://play.nim-lang.org/#pasty=QOkvxZsCKcpw
17:42:58FromDiscord<treeform> In reply to @arkanoid "I'm using Malebolgia and": Oh math.isNan and vmath.isNan have different behaviors
17:43:40FromDiscord<treeform> my isNan also does isInf while Nim's does not.
17:44:13FromDiscord<treeform> But it looks like GLSL does the same thing. I want vmath to follow GLSL as much as possible. So i'll probably change it but its more complex then I thought.
17:46:48*def- quit (Quit: -)
17:47:06*def- joined #nim
17:52:41arkanoidI managed to reproduce the issue. It is again an import vs include issue https://play.nim-lang.org/#pasty=tJMEolVplpNf
18:03:48*Guest87 joined #nim
18:04:08*Guest87 quit (Client Quit)
18:04:23arkanoidtreeform, keeping GLSL compat is important. I also used shady to write and run compute shaders, worlked out flawlessly
18:27:33arkanoidis limiting the generic type via typeclasses/concepts a proc thing, or is it usabe in type declaration also?
18:28:14arkanoidis `type Point[T: Length] = array[2, T]` something I can rely on?
18:33:33arkanoidif I try to use that on types, I have errors like "got: <typedesc[Meter], typedesc[DecaMeter], typedesc[Minute]> but expected: <D: Length, LD: Length, T: Time>"
18:33:53arkanoidif I remove that on types but I keep it on procs, it compiles and run
18:47:51FromDiscord<treeform> Are you asking me? vmath's Vec2 are not array[2, T] they are an object that holds array[2, T] because its faster due to some C aliasing rules. https://github.com/treeform/vmath?tab=readme-ov-file#vector-and-matrix-representation-and-benchmarks
18:49:06arkanoidno, I'm not asking you. It's a generic question about limiting the [T] in type declarations, as I successfully do it for procs, but get compile time error if I add them to type declarations
18:50:08arkanoidtreeform, I know, I also tried vmathArrayBased actually, but then I reverted to default object
18:50:22arkanoidmy actual type is `Point*[D: Length] = GVec2[D]`
18:50:37arkanoidor better `Point*[D] = GVec2[D]`, I'd like to use :Length
19:22:15*cnx quit (Remote host closed the connection)
19:23:05*cnx joined #nim
20:22:05FromDiscord<Elegantbeef> Arkanoid you can use typeclasses for aliases, but that makes no sense
20:26:25*ntat quit (Quit: Leaving)
20:35:40*Jhonny2x4 quit (Quit: Jhonny2x4)
21:32:34*advesperacit quit ()
21:41:54*Jhonny2x4 joined #nim
21:57:41NimEventerNew thread by walkr: -d:thanks, see https://forum.nim-lang.org/t/11206
22:15:54FromDiscord<Robyn [She/Her]> I wonder... Would it be better to fork Mummy or to make my own HTTP library, since I'm wondering rn how hard it'd be to make it so Mummy uses cps under the hood
22:16:27FromDiscord<Robyn [She/Her]> I haven't read much of Mummy's code though, so maybe it's a much harder task then I'm assuming it to be
22:16:36FromDiscord<Robyn [She/Her]> Time to read
22:17:14FromDiscord<Robyn [She/Her]> And I'd need to actually see if there's any reason why I should fork it in the first place instead of just, using it
22:19:17arkanoidElegantbeef: why that would not make sense? `Point*[D: Length] = array[2, D]` seems perfectly reasonable to me
22:21:06FromDiscord<Robyn [She/Her]> Honestly think I'd probably be better off using Mummy, and then just making a cps HTTP server as a tinkering project at some point
22:43:56FromDiscord<Robyn [She/Her]> Anyone able to recommend a library that has query builders for SQL (preferably supporting PostgreSQL and SQLite) that doesn't rely on async?
22:49:58FromDiscord<Robyn [She/Her]> Oh looks like I can just grab the query string from allographer then pass it into a separate lib
22:52:00FromDiscord<Robyn [She/Her]> Seems hacky though
23:00:50*jmdaemon joined #nim
23:01:22FromDiscord<dedraiaken> In reply to @chronos.vitaqua "Oh looks like I": Looked at Norm?
23:02:04FromDiscord<Robyn [She/Her]> I'm looking at that now, actually! Thanks though!
23:13:14FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=nHJpMbekcHMb
23:13:32FromDiscord<Robyn [She/Her]> Oh wait
23:13:38FromDiscord<Robyn [She/Her]> Just missed something in the docs
23:14:06FromDiscord<Robyn [She/Her]> `uniqueGroup` has no examples though, so still a tad confused
23:14:12FromDiscord<ricky._.spanish> @treeform your websocket library is a beast i love it
23:16:28FromDiscord<Robyn [She/Her]> Ah okay, looked at a test and it makes sense now
23:17:25FromDiscord<Robyn [She/Her]> Though, seems like a small oversight to not allow for multiple column combinations to be unique
23:17:40FromDiscord<Robyn [She/Her]> So `a,b` could be unique and `c,d`
23:17:54FromDiscord<Robyn [She/Her]> Not doing that in my usecase but just something I'm mentioning
23:22:54FromDiscord<someone.one> Quick question, is there any other way to initialise a multi dimensional array except just looping over the values?
23:23:32FromDiscord<Elegantbeef> Manually declaring all the elements 😄
23:26:01FromDiscord<someone.one> Can't really do that for something like a 100x100x100 array 😢
23:26:16FromDiscord<Elegantbeef> Are you just trying to init them to the same value?
23:26:55FromDiscord<someone.one> Yes, the same value for all the elements
23:28:55FromDiscord<Robyn [She/Her]> Aaaand PostgreSQL doesn't support blob data still :|
23:29:07FromDiscord<Robyn [She/Her]> (With Norm)
23:29:17FromDiscord<Robyn [She/Her]> Not hard to do that but again, a small oversight :P
23:29:33FromDiscord<Elegantbeef> Yea you have to iterate over them or make a nice proc that does
23:29:37FromDiscord<Robyn [She/Her]> Probably because PostgreSQL requires you to input the binary data as hex
23:31:29FromDiscord<someone.one> In reply to @Elegantbeef "Yea you have to": Cool, thanks 👍
23:31:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=XfknvMuELepf
23:31:35FromDiscord<Elegantbeef> A fun solution
23:32:01FromDiscord<.bobbbob> In reply to @Elegantbeef "Yea you have to": I made just that https://codeberg.org/bobbbob/generate
23:32:28FromDiscord<Elegantbeef> I see nested sequences so I'll just pretend I didn't see anything 😄
23:33:03FromDiscord<.bobbbob> ah he wants array
23:33:38FromDiscord<Elegantbeef> Would be cooler if you did `proc generate(_: typedesc[T], range: Slice[T], fn: ...): T`
23:33:50FromDiscord<Elegantbeef> I guess `range` should be `openArray[T]`
23:34:11FromDiscord<Elegantbeef> then you could do like `Table[string, int].generate(someCollection, ...)`
23:34:27FromDiscord<Elegantbeef> You get a nice general purpose API that can be extended for anything
23:35:22FromDiscord<Elegantbeef> A more compelling example is you could do `array[10, bool].generate(true)`
23:35:49FromDiscord<Elegantbeef> Though this is hard to generalise in a useful way I guess
23:37:13FromDiscord<.bobbbob> yeah I only made it to solve project euler questions lol
23:37:43FromDiscord<Elegantbeef> I dumbly attempt to extract everything i write to the most general purpose solution
23:39:36FromDiscord<.bobbbob> hey that's the dont repeat yourself principle
23:42:33arkanoidjust realised that arraymancer has no inner logic to never print something that would crash the program https://play.nim-lang.org/#pasty=bxdeVaKUTanf