00:19:32 | FromDiscord | <Elegantbeef> Oh noes an array syntax that lets you... make your code statically typed! |
00:22:35 | FromDiscord | <threefour> sent a code paste, see https://play.nim-lang.org/#pasty=Ttrksdzn |
00:23:02 | FromDiscord | <threefour> I'm trying to understand concepts, and it's giving me a type mismatch on the last line. But this seems correct to me. What am I missing? |
00:23:38 | FromDiscord | <threefour> (Yes it's dumb code -- just experimenting) |
00:34:24 | FromDiscord | <Elegantbeef> `a, b: Being` binds both to `Being` |
00:34:46 | FromDiscord | <Elegantbeef> `a, b: distinct Being` is what you want |
00:34:56 | FromDiscord | <Elegantbeef> or `[A, B: Being](a: A, b: B)` |
00:44:17 | FromDiscord | <threefour> I guess I'm confused on why I can't simply put `Being`, because according to the concept's definition, they _are_ `Being`s. |
00:45:19 | FromDiscord | <Elegantbeef> Right, but it's a generic which means when it matches `a` it binds `Being` to `Animal` |
00:45:36 | FromDiscord | <Elegantbeef> Now you have the proc as `<(Animal, Animal)` but are passing `Animal, Person)` |
00:46:25 | FromDiscord | <fluff.goose> i must be the worlds worst programmer, because i do not know how, but my code says the same number is not equal to that same number |
00:46:40 | FromDiscord | <Elegantbeef> Good job that takes skill |
00:47:29 | FromDiscord | <fluff.goose> im not even joking either, it literally made something that should be impossible |
00:48:11 | FromDiscord | <Elegantbeef> How big is this code? |
00:54:31 | FromDiscord | <threefour> In reply to @Elegantbeef "Now you have the": Okay that clears it up a lot actually. Thank you. |
00:55:17 | FromDiscord | <Elegantbeef> Nim also has this tedious antifeature that it binds typeclasses once |
00:55:23 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=hmSqzHBD |
00:56:02 | FromDiscord | <Robyn [She/Her]> In reply to @fluff.goose "im not even joking": is it a float? |
00:56:28 | FromDiscord | <fluff.goose> int |
00:56:41 | FromDiscord | <Elegantbeef> I chose the one example that passes 😄 |
00:56:43 | FromDiscord | <Elegantbeef> `doThing 0d, 1.int` fails |
00:59:34 | * | m5zs7k quit (Quit: m5zs7k) |
01:00:50 | FromDiscord | <threefour> I feel like I'm using concepts in the wrong way then, because it seems clunky to have to tack `distinct` onto all my proc signatures. |
01:03:31 | * | m5zs7k joined #nim |
01:13:38 | FromDiscord | <.tokyovigilante> Hey, I'm trying to wrap libwayland-client with Futhark, there are a number of `static inline` functions in the header which don't seeem to be wrapped, is there any way to get these in? |
01:14:10 | FromDiscord | <leorize> I think you gotta translate those yourself |
01:15:00 | FromDiscord | <leorize> you don't wrap static inline functions, since they're meant to be "copied" verbatim to your binary |
01:15:11 | FromDiscord | <leorize> it's best that you reimplement them in nim |
01:16:50 | FromDiscord | <.tokyovigilante> Ah right, makes sense |
01:16:52 | FromDiscord | <.tokyovigilante> thanks |
02:19:07 | FromDiscord | <spider7124> Hello, I am a complete beginner and did not find anything online to fix this. Not sure exactly what is happening here, any insights would be helpful https://media.discordapp.net/attachments/371759389889003532/1343769212539240531/image.png?ex=67be7a1a&is=67bd289a&hm=f5d39a7dceb2beab48353ea3ddf0620cbf456ac89f18c16d80a96d26ba35b613& |
02:19:47 | FromDiscord | <Elegantbeef> Heh mjolnir claims another |
03:57:05 | FromDiscord | <mustacheman> Any interest in starting a nim squad on daily.dev ? |
04:01:52 | * | ehmry quit (Ping timeout: 244 seconds) |
04:08:32 | FromDiscord | <Elegantbeef> Is this just a weird developer centric link aggegator |
04:14:29 | FromDiscord | <lainlaylie> ugh, is daily dev really a thing now |
04:18:18 | * | ehmry joined #nim |
04:21:27 | FromDiscord | <Elegantbeef> It is if you make it! |
06:03:59 | * | ensyde joined #nim |
07:28:01 | FromDiscord | <user2m> I'm using prologue how do I get the ip address of a request?? |
07:32:52 | * | ntat joined #nim |
07:33:50 | FromDiscord | <Elegantbeef> @saemideluxe well I mentioned it was untested before, but now that I wrote a type fuzzer my VSBF has some amount of testing, although now someone has to test the fuzzer.... 😄 |
07:34:25 | FromDiscord | <Elegantbeef> Have thrown like 1000+ randomly generate data types and nothing has exploded....yet |
07:38:16 | FromDiscord | <Elegantbeef> @user2m probably the `nativeRequest` field |
07:42:16 | FromDiscord | <user2m> In reply to @Elegantbeef "<@419925691832991754> probably the `nativeRequest`": Thats where I looked first but I can't seem to find it? can you link me to any documentation? I'm searching through https://nim-lang.org/docs/asynchttpserver.html#Request rn |
07:42:26 | FromDiscord | <Elegantbeef> `url` |
07:42:32 | FromDiscord | <Elegantbeef> `hostname` |
07:51:04 | FromDiscord | <entropydev> sent a code paste, see https://play.nim-lang.org/#pasty=FyebSUCX |
07:51:46 | FromDiscord | <entropydev> sent a code paste, see https://play.nim-lang.org/#pasty=oDwaJIeX |
07:51:51 | FromDiscord | <entropydev> line |
07:52:32 | FromDiscord | <entropydev> here are the imported cpp functions: |
07:53:44 | FromDiscord | <entropydev> sent a code paste, see https://play.nim-lang.org/#pasty=nfDMgfTn |
07:54:28 | FromDiscord | <entropydev> here is the tutorial I'm trying to replicate: https://docs.opencv.org/4.x/d5/dae/tutorial_aruco_detection.html |
07:59:39 | FromDiscord | <entropydev> This is my first time using the C++ foreign function interface, so I suspect I did something wrong in how I import the detectMarkers function, or in how I am using the Vector type |
08:00:37 | FromDiscord | <entropydev> I can provide the whole file if that would help |
08:20:29 | FromDiscord | <saemideluxe> In reply to @Elegantbeef "<@765602578792054845> well I mentioned": can you post the link again? |
09:28:49 | * | ntat quit (Quit: Leaving) |
10:21:08 | FromDiscord | <entropydev> here is the full file if that is helpfull https://media.discordapp.net/attachments/371759389889003532/1343890519671046185/blockchain_architecture.nim?ex=67beeb14&is=67bd9994&hm=9c6b5a76b1e1bb0c35950a962807497b2f223fb9eed89556a3c7495a7f698d14& |
10:41:13 | * | anddam quit (Quit: WeeChat 4.5.1) |
11:30:46 | * | anddam joined #nim |
12:44:12 | FromDiscord | <janakali> sent a code paste, see https://play.nim-lang.org/#pasty=XKIgINDy |
13:26:09 | FromDiscord | <jabuci> sent a code paste, see https://play.nim-lang.org/#pasty=UbDgASxf |
13:28:23 | FromDiscord | <janakali> @jabuci splitWhitespace https://nim-lang.org/docs/strutils.html#splitWhitespace%2Cstring%2Cint |
13:31:18 | FromDiscord | <jabuci> Thanks! I didn't know about it. |
13:34:58 | * | ntat joined #nim |
14:05:51 | * | ensyde quit (Ping timeout: 244 seconds) |
16:32:37 | * | pmp-p quit (Quit: No Ping reply in 180 seconds.) |
16:32:49 | * | pmp-p joined #nim |
17:10:06 | * | halloy2785 joined #nim |
17:12:02 | * | halloy2785 is now known as MauGal |
17:17:41 | FromDiscord | <xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=BjtStKTs |
17:18:16 | * | MauGal quit (Ping timeout: 252 seconds) |
17:18:52 | FromDiscord | <Elegantbeef> sugar.capture |
17:18:59 | FromDiscord | <xtrayambak> In reply to @Elegantbeef "sugar.capture": Ah, thanks |
17:19:33 | FromDiscord | <Elegantbeef> @saemideluxe https://github.com/beef331/vsbf |
17:21:19 | FromDiscord | <xtrayambak> Oh my god it works, thank you so much :^) |
17:21:28 | FromDiscord | <xtrayambak> I've been scratching my head over this for like 3 days |
17:22:07 | FromDiscord | <Elegantbeef> Yea when a proc captures a symbol it raises the symbol so in the above they're all the same |
17:22:17 | FromDiscord | <Elegantbeef> This is a common gotcha in captures |
17:44:47 | * | vsantana joined #nim |
17:46:04 | * | icebattle joined #nim |
18:04:30 | * | Jjp137 quit (Ping timeout: 260 seconds) |
18:04:48 | * | Jjp137 joined #nim |
18:11:00 | FromDiscord | <entropydev> In reply to @janakali "<@409153462324953099> try other exception": Great! that helps a lot, my original problem was that I wasn't passing in the image. However I'm still running into another error on the same function which I don't get when I run what I think should be the exact same code in C++, can you tell if I've correctly imported the detectMarkers function? |
18:12:33 | * | icebattle quit (Quit: Client closed) |
18:14:30 | * | ensyde joined #nim |
18:18:34 | FromDiscord | <Elegantbeef> I've not done C++ interop, but I imagine that if a C++ function raises and you do not have the exception imported and handled it'll explode in this way |
18:18:35 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#exception-handling-imported-exceptions |
18:19:26 | * | ensyde quit (Ping timeout: 272 seconds) |
18:21:18 | FromDiscord | <entropydev> sent a code paste, see https://play.nim-lang.org/#pasty=sRRBUxIJ |
18:21:33 | FromDiscord | <entropydev> which appears to be calling the correct C++ code |
18:21:43 | FromDiscord | <Elegantbeef> Well that's an assertion |
18:22:08 | FromDiscord | <Elegantbeef> So you need to provide all of those arguments properly |
18:22:34 | FromDiscord | <blashyrk> Hi. Does anyone have an example of creating a generic func/proc from a macro? I don't see `newProc` API supporting that unless it has to do with pragmas somehow |
18:22:54 | FromDiscord | <Elegantbeef> You get to manually walk the tree |
18:23:38 | FromDiscord | <Elegantbeef> https://github.com/beef331/micros/blob/master/src/micros/definitions/routines.nim#L132 |
18:23:42 | FromDiscord | <entropydev> In reply to @Elegantbeef "So you need to": yes, and as far as I can tell I am doing it, I can run what should be the exact same code in C++ and it functions correctly |
18:24:13 | FromDiscord | <entropydev> also, though there are 4 arguments, the only one that really seems to matter is the image, as the rest are just empty vectors |
18:24:31 | FromDiscord | <Elegantbeef> I don't know what to say the assert is failing due to either `markerSize` or `sizeWithBorders` |
18:25:01 | FromDiscord | <Elegantbeef> what is `markerSize` `bits.cols` and `bit.rows` |
18:25:21 | FromDiscord | <blashyrk> In reply to @Elegantbeef "You get to manually": Thanks! |
18:25:30 | FromDiscord | <entropydev> I don't really know, those are being used internally in the function |
18:26:04 | FromDiscord | <Elegantbeef> Make sure your types match the C++ types |
18:26:08 | FromDiscord | <entropydev> And I've tested that the image is loading correctly as I can output it |
18:26:11 | FromDiscord | <Elegantbeef> I do not know what else to say |
18:27:07 | FromDiscord | <entropydev> could something be off with the Vector type? It has a generic [T] but I don't really understand how that interacts with the C++ side |
18:27:31 | FromDiscord | <entropydev> sent a code paste, see https://play.nim-lang.org/#pasty=YOWBLRIG |
18:27:32 | FromDiscord | <Elegantbeef> It will emit a `vector<T>` on the C++ side |
18:28:56 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-objects well this does just that for maps |
18:42:04 | FromDiscord | <entropydev> Ok, so I've found one issue, the markerSize of dictionary of the detector is 0, which would trigger the assert, so since I pass the dictionary into the detector when I call its constructor, maybe I'm doing the constructor wrong |
18:42:50 | FromDiscord | <entropydev> because I know I'm creating the dictionary correctly |
18:58:23 | FromDiscord | <entropydev> ok, I've narrowed down the issue, it is really weird |
18:59:12 | FromDiscord | <entropydev> Something is wrong with this function: |
18:59:26 | FromDiscord | <entropydev> sent a code paste, see https://play.nim-lang.org/#pasty=jctCuSyP |
18:59:39 | FromDiscord | <entropydev> the defauly parameter for dictionary is working |
19:00:03 | FromDiscord | <entropydev> sent a code paste, see https://play.nim-lang.org/#pasty=uSLLCyZS |
19:00:09 | FromDiscord | <entropydev> outputs 4 as it should |
19:00:48 | FromDiscord | <entropydev> (edit) "https://play.nim-lang.org/#pasty=RhJYGmto" => "https://play.nim-lang.org/#pasty=DRzKHCEB" |
19:01:19 | FromDiscord | <entropydev> sent a code paste, see https://play.nim-lang.org/#pasty=mIcdepkS |
19:01:43 | FromDiscord | <entropydev> (edit) "https://play.nim-lang.org/#pasty=RpbsVfJt" => "https://play.nim-lang.org/#pasty=PERMwfxV" |
19:02:12 | FromDiscord | <entropydev> even though the only difference that I can tell is that in one the parameter is passed in, and in the other one it is using the default |
19:03:41 | FromDiscord | <entropydev> and if I chage the default from DICT_4X4_50 to another value like DICT_6X6_250 it is properly sending this to the C++ code |
19:04:09 | FromDiscord | <entropydev> so the only issue is passing in the value as a parameter, what could be going wrong here? |
19:04:22 | FromDiscord | <entropydev> (edit) "parameter, what" => "parameter. What" |
19:37:11 | FromDiscord | <konan_5> hello, here↵is there any development task? |
19:37:58 | * | vsantana left #nim (#nim) |
20:23:10 | * | ntat quit (Quit: Leaving) |
22:08:56 | * | rockcavera joined #nim |