<< 07-02-2023 >>

00:10:49FromDiscord<auxym> In reply to @Isofruit "... Yknow what, I'll": til about nimble dump. I might actually use that.
00:12:11FromDiscord<ShalokShalom> In reply to @Hourglass, When the Hour Strikes "Sigh, I really need": haha 😅
00:12:21FromDiscord<ShalokShalom> you're a running gag 😛
00:12:27FromDiscord<ShalokShalom> like me 😄
00:12:44FromDiscord<auxym> nim on jvm when? 😉
00:12:52FromDiscord<ShalokShalom> You can already do that
00:12:53FromDiscord<Hourglass [She/Her]> In reply to @ShalokShalom "you're a running gag": Shows up with a new project each time? XD
00:13:00FromDiscord<ShalokShalom> I told her multiple times 😅
00:13:11FromDiscord<Hourglass [She/Her]> ADHD brain makes me focus on many things at once
00:13:20FromDiscord<Hourglass [She/Her]> In reply to @ShalokShalom "I told her multiple": Only on GraalVM
00:13:22FromDiscord<ShalokShalom> Running Minecraft on Graal and then consuming LLVM or Wasm
00:13:28FromDiscord<Hourglass [She/Her]> Also not with the most ideal interop
00:13:32FromDiscord<ShalokShalom> "Only"
00:13:43FromDiscord<ShalokShalom> Well, easier than with your solution ^^
00:13:46FromDiscord<Hourglass [She/Her]> GraalWASM exposes no host api access which makes it useless aha
00:14:06FromDiscord<ShalokShalom> Graal has LLVM too
00:14:20FromDiscord<ShalokShalom> Or you could add that
00:14:38FromDiscord<Hourglass [She/Her]> In reply to @ShalokShalom "Well, easier than with": Definitely but if i ever get the motivation (hah, funny joke) then I definitely wanna do native Java interop
00:14:55FromDiscord<ShalokShalom> That would contribute something ^^
00:15:06FromDiscord<ShalokShalom> Fair 🙂
00:15:06FromDiscord<Hourglass [She/Her]> Depression has been kicking my ass tho and I haven't had the energy for any programming for a while
00:18:31FromDiscord<ShalokShalom> Might be a winter depression?
00:18:48FromDiscord<ShalokShalom> Or do you have an actual psychological cause for it?
00:19:06FromDiscord<ShalokShalom> I take Vitamin D, to prevent the first, recommended 😀
00:25:22FromDiscord<Hourglass [She/Her]> In reply to @ShalokShalom "Might be a winter": Near constant, i need to go to a gp and try working on getting a therapist to help me and stuff, I'm not very mentally healthy if yknow what I mean
00:26:13FromDiscord<Elegantbeef> If you seasonal in all the seasons that's just depression
00:26:17FromDiscord<Hourglass [She/Her]> I have multiple issues but I'm the only one in the family who's actually aware of stuff like mental health, adhd... Etc, because most of my family either were born in an asian country or were raised by strict parents
00:26:32FromDiscord<Hourglass [She/Her]> In reply to @Elegantbeef "If you seasonal in": That made me chuckle ngl
00:27:08FromDiscord<Elegantbeef> if you have seasonal depression\
00:27:20FromDiscord<Elegantbeef> I have the words the best ones
00:28:01FromDiscord<Hourglass [She/Her]> Absolute mood right there
00:43:04FromDiscord<Yepoleb> I love your words, they truly are some of the words i have read
00:43:35FromDiscord<Elegantbeef> Out of all the words they are words
00:46:34FromDiscord<normie> What makes Nim worth using over other languages?
00:46:47FromDiscord<normie> I have a list of languages that look interesting to me, and Nim is on it.
00:47:36FromDiscord<Elegantbeef> Good compile time evaluation, a nice type system, macros, can be fast as hell.
00:48:45FromDiscord<normie> sent a long message, see http://ix.io/4nkV
00:49:00FromDiscord<normie> That is my list
00:50:45FromDiscord<huantian> Elixir is dynamic and functional
00:50:50FromDiscord<huantian> Nim isn’t that
00:51:02FromDiscord<normie> They are just languages that interest me
00:55:00FromDiscord<Yepoleb> I like that nim needs very little words to do a lot
00:55:21FromDiscord<Yepoleb> Like the snake language
00:58:48FromDiscord<Elegantbeef> It's a system programming language so it's the closest to Zig/Rust/C
00:58:50FromDiscord<Elegantbeef> But it's also quite ergonomic
01:06:21FromDiscord<Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4nkY
01:06:56*krux02 quit (Remote host closed the connection)
01:07:42FromDiscord<Nilts> I just realized my number is much bigger than `high(int)`
01:23:18*azimut joined #nim
01:34:31FromDiscord<ShalokShalom> In reply to @Hourglass, When the Hour Strikes "Near constant, i need": I wish you nothing but the best blessings ❤️
01:34:35FromDiscord<leorize> yea that's what it meant
01:35:59FromDiscord<ShalokShalom> @normie Imho, Nim is a very practical, "get things done" language
01:38:39FromDiscord<ShalokShalom> sent a long message, see http://ix.io/4nl3
01:39:49FromDiscord<ShalokShalom> (edit) "http://ix.io/4nl3" => "http://ix.io/4nl4"
01:42:01FromDiscord<ShalokShalom> Ah yeah and tooling is also not the best. But you dont rely so much on tooling, since the language isn't that complicated so it's fine as well. ↵↵Just know this in advance and consider the Jetbrains extension, if you wanna keep your PC from burning 🥵
01:43:34FromDiscord<Yepoleb> In reply to @ShalokShalom "There are some dirty": there it is again! 😄
01:47:00FromDiscord<ShalokShalom> 😇
01:47:11FromDiscord<ShalokShalom> 🙏
01:47:30FromDiscord<ShalokShalom> I am innocent 🤣
01:51:02FromDiscord<Elegantbeef> It's weird that mentioning F# has a side effect
01:56:02*dropkick quit (Ping timeout: 255 seconds)
02:07:30FromDiscord<ShalokShalom> F# is a multi paradigm language 😉
02:13:15*rockcavera quit (Read error: Connection reset by peer)
02:13:35*rockcavera joined #nim
02:13:35*rockcavera quit (Changing host)
02:13:35*rockcavera joined #nim
03:05:07*deadmarshal_ quit (Ping timeout: 252 seconds)
03:26:03*beholders_eye quit (Ping timeout: 260 seconds)
03:29:46*dza quit (Quit: )
03:37:41*dza joined #nim
03:38:40*dza quit (Client Quit)
03:40:11*dza joined #nim
03:47:53FromDiscord<hortinstein> is there an easy way to convert a string with hex values to a byte array?
03:48:32FromDiscord<hortinstein> like hex representing a cryptokey
03:50:27*arkurious quit (Quit: Leaving)
03:55:56*deadmarshal_ joined #nim
04:11:41FromDiscord<Elegantbeef> `parseHexStr` and `toOpenArrayByte`
04:12:38FromDiscord<hortinstein> thanks!
04:26:13FromDiscord<hortinstein> @ElegantBeef Error: type mismatch: got 'openArray[byte]' for 'toOpenArrayByte(c2PrivKey, 0, 31)' but expected 'Key = array[0..31, byte]' .... is there anyway to cast it. Been trying for like 10 min and stuck, really appreciate your help
04:28:07FromDiscord<Elegantbeef> You need to convert it manually with a loop
04:29:19FromDiscord<hortinstein> looks like this might work
04:29:28FromDiscord<hortinstein> sent a long message, see http://ix.io/4nls
04:29:32FromDiscord<hortinstein> so ugly
04:29:34FromDiscord<hortinstein> lol
04:29:35FromDiscord<Elegantbeef> No it will not
04:30:01FromDiscord<Elegantbeef> you want something like `var a: array[32, byte]; a[0..31] = c2privKey.toOpenByteArray(0, 31)`
04:30:26FromDiscord<hortinstein> ahh ok, thank you, appreciate the help
05:24:29*azimut quit (Ping timeout: 255 seconds)
05:26:00*azimut joined #nim
06:02:56*ltriant quit (Ping timeout: 252 seconds)
06:39:48FromDiscord<BobBBob> is there a tagged union/variant type in nim? ↵and also is there a right way to create a proc that returns a new object (ie a constructor)? Like is there a standard name for them?
06:41:40*rockcavera quit (Remote host closed the connection)
06:42:03FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#types-object-variants
06:42:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nlN
06:45:22FromDiscord<Elegantbeef> For `ref` objects the convention is to use `new`
06:45:44FromDiscord<Elegantbeef> Personally i prefer the latter version since it allows more generic code
06:50:40FromDiscord<BobBBob> So basically use a generic or use hungarian notation?
06:50:59FromDiscord<Elegantbeef> Yes
06:52:45FromDiscord<BobBBob> sent a code paste, see https://play.nim-lang.org/#ix=4nlP
06:52:55FromDiscord<Elegantbeef> Nim doesnt have return type inference
06:53:01FromDiscord<Elegantbeef> And araq is against it afaik
07:00:34FromDiscord<BobBBob> btw which channel should I posts projects in and maybe get a little bit of code review?
07:00:43FromDiscord<Elegantbeef> Here is fine
07:19:57*azimut quit (Remote host closed the connection)
07:20:44*azimut joined #nim
07:42:10*kenran joined #nim
07:45:46FromDiscord<ShalokShalom> @ElegantBeef#0000 The manual does say "Enum value names are overloadable, much like routines." ↵↵I did think, they are still experimental and need to be enabled by a pragma?
07:46:28FromDiscord<Elegantbeef> Manual doesnt say that
07:46:45FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1072423154288435241/image.png
07:47:11FromDiscord<Elegantbeef> You're on the devel manual
08:20:35FromDiscord<4zv4l> how do I get a pointer to a string ?↵each time I try I get `has no address`↵to copy a string into a buffer
08:24:26FromDiscord<4zv4l> my bad, that was because it was in a constant
08:25:26FromDiscord<Elegantbeef> If you want a cstring it's `myString[0].addr`
08:42:24FromDiscord<4zv4l> return from a `bool` proc without saying true or false↵by default it returns true ?
08:43:05FromDiscord<Elegantbeef> All values are defaulted to `0` in nim
08:43:14FromDiscord<Elegantbeef> Which means it returns false
08:45:01*xet7 quit (Ping timeout: 252 seconds)
08:45:03FromDiscord<4zv4l> sent a long message, see http://ix.io/4nmr
08:45:49FromDiscord<4zv4l> because now I added a bunch of `== 0: return` to be sure
08:46:11FromDiscord<Elegantbeef> I'd do the explicit check instead of rely on a boolean converter
08:49:04FromDiscord<4zv4l> alright, thank you ^^^↵will be explicit then↵even if `if not GetClipboardData()` would be explicit to me xD too bad it seems not to work as expected
08:49:40FromDiscord<Elegantbeef> If `GetClipboardData()` returns either 0 or 1 you can do `if not bool(GetClipboardData())`
08:50:02FromDiscord<Elegantbeef> `GetClipboardData()` should return the clipboard data not a boolean
08:50:18*kenran quit (Remote host closed the connection)
09:03:44FromDiscord<4zv4l> yeah yeah that was for an example xD
09:03:53FromDiscord<4zv4l> more SetClipboardData
09:32:52FromDiscord<Coachonko> Is there a uuid function?
09:39:29FromDiscord<Rika> External library
09:59:59*ltriant joined #nim
10:08:06*uics joined #nim
10:18:48FromDiscord<4zv4l> is there an easy way to throw custom error that can then be catched ?
10:24:26FromDiscord<Rika> Make an exception type that inherits from the catchable error type
11:00:22*beholders_eye joined #nim
11:27:00Amun-Rawhat's the proper Nim way to test all test_*.nim files inside tests/sub/?
11:30:47*uics quit (Remote host closed the connection)
11:31:31*uics joined #nim
11:46:59Amun-Rathis is my poc: https://pastebin.com/R5MBM3GV
11:49:40_________https://nim-lang.org/docs/testament.html#running-all-tests-from-a-directory
11:55:23Amun-Rahmm, does not ship with my disto, I'll stick with my task
12:06:11*uics quit (Remote host closed the connection)
12:06:31*uics joined #nim
12:10:17FromDiscord<🍵camellia🍵> which distro?
12:21:57FromDiscord<Phil> does nimble test only run test files directly under /test ?
12:24:03FromDiscord<pyolyokh> sent a code paste, see https://play.nim-lang.org/#ix=4nn3
12:24:58FromDiscord<Phil> oooff
12:25:17FromDiscord<Phil> I think my strategy at this point would be to use include
12:26:03FromDiscord<Phil> Like, have a dummy test file directly under test and then include the test files in the subdirectory
12:26:38FromDiscord<sOkam!> In reply to @Isofruit "I think my strategy": i stumbled today upon a project that did it by overriding task test with `nim c -r test/tester`
12:26:51FromDiscord<sOkam!> nimble doc says something about it, but just briefly
12:27:08*uics quit (Remote host closed the connection)
12:27:30FromDiscord<sOkam!> (edit) "test/tester`" => "tests/tester`"
13:00:53FromDiscord<4zv4l> `ps = startProcess(app, {poStdErrToStdOut, poParentStreams})`↵do I have to type the other arguments or is there named argument ?↵since the options are later in the arguments but the default values of the other are fine
13:05:07Amun-Ra🍵camellia🍵: debian (testing)
13:33:04FromDiscord<pyolyokh> In reply to @4zv4l "`ps = startProcess(app,": <https://nim-lang.org/docs/manual.html#procedures> has a "call with named arguments" example a little bit down
13:39:22*dropkick joined #nim
13:44:10FromDiscord<🍵camellia🍵> ah yeah it looks like debian just doesn't include testament, i would honestly have a bug report for that
14:05:07FromDiscord<Hourglass [She/Her]> How would I check where the cursor is in the terminal in Nim?
14:05:29FromDiscord<Hourglass [She/Her]> Also need to detect when a user clicks a button
14:12:05*jmd_ quit (Ping timeout: 256 seconds)
14:30:06FromDiscord<System64 ~ Flandre Scarlet> Is it normal I still have this issue? https://media.discordapp.net/attachments/371759389889003532/1072524664737386586/message.txt
14:36:50FromDiscord<federico3> @🍵camellia🍵\: do you feel the need for testament shipped with the compiler?
14:41:40FromDiscord<🍵camellia🍵> according to nim docs it should be, also if you use choosenim to install nim then testament is included
14:45:38*arkurious joined #nim
14:56:21*uics joined #nim
14:58:46FromDiscord<Nerve> What is the preferred way of testing that two floats are close to a given precision, rather than testing for equality?
15:02:42FromDiscord<🍵camellia🍵> absolute value of the difference between them?
15:03:06FromDiscord<🍵camellia🍵> that's not a preferred way as much as it is the only way i can think of
15:14:39FromDiscord<Nerve> That's pretty simple, I'll do that
15:27:28*peterhil quit (Ping timeout: 248 seconds)
15:29:25*peterhil joined #nim
15:43:55FromDiscord<Coachonko> How is the mysql connector and why is there a third party lib for async mysql connection?
15:53:26FromDiscord<Phil> MySQL connector works near identical to any others, meaning it's functional.↵I haven't used anything built on top of it, I'd honestly rather use Pg because it has async packages from treeform or alternatively has norm available as orm
15:54:19FromDiscord<Coachonko> I do not mind writing raw queries for mysql, I don't want to learn a new database though
15:54:23FromDiscord<Phil> The main drawback on the official dB connector package is that it represents null values in a column as empty string
15:54:44FromDiscord<Coachonko> Hm ok that's worth noting
15:55:07FromDiscord<Phil> And the version that fixes it, ndb, doesn't implement MySQL
15:55:26FromDiscord<Phil> Only sqlite and postgres
15:55:40FromDiscord<Coachonko> ndb is stdlib?
15:55:46FromDiscord<Phil> Nope
15:56:35FromDiscord<Coachonko> When you say official connector, you mean the std/db_mysql?
15:57:02FromDiscord<Coachonko> (edit) "official connector," => "`official dB connector package`,"
16:00:01Amun-Ra🍵camellia🍵: it also sets wrong path to .css so one can't use nim doc ootb
16:03:14FromDiscord<Phil> In reply to @Coachonko "When you say `official": Yeah.↵I called it dB connector because in Nim 2.0 that package was moved out of stdlib to the still official dbconnector package so they can update independently
16:03:47FromDiscord<Phil> And I use mostly Nim 2 (devel branch of compiler)
16:04:40FromDiscord<Coachonko> I probably should move to Nim 2
16:04:48*uics quit (Remote host closed the connection)
16:04:50FromDiscord<Coachonko> No point in starting to learn on 1.6
16:06:55FromDiscord<Phil> There really is not that much of a difference
16:07:00FromDiscord<Phil> As in literally
16:08:20FromDiscord<Phil> I updated by 10k loc protect from Nim 1.6 to 2 and the code changes themselves were like 5 minutes.↵What actually took time was updating my dependencies to import db_sqlite from a different place and that didn't change any of the actual code
16:08:44*uics joined #nim
16:09:28FromDiscord<Phil> Both is perfectly fine and there's not that anything new (on the high level) that you'll learn on devel.↵I'm on there for some of the library fixes that I refuse to be without for the most part
16:09:40FromDiscord<Phil> But those are semi obscure
16:11:09FromDiscord<Phil> (edit) removed "that"
16:12:30FromDiscord<Phil> Line, your choice is fine, I just want to de-mystify it. Unless you're really into memory management, the effectual changes for you from Nim 1.6 to Nim 2 is more like updating to Nim 1.8
16:12:55FromDiscord<Phil> (edit) "to" => "to"" | "1.8" => "1.8'"
16:13:05FromDiscord<Phil> (edit) "1.8'" => "1.8', if such a thing existed"
16:13:44FromDiscord<Phil> (edit) "Line," => "Like,"
16:21:33FromDiscord<Coachonko> I see alright
16:21:40FromDiscord<Coachonko> Thank you for the information
16:26:40FromDiscord<Coachonko> I did get worried by the existance of a mysql driver that differs from the standard lib one. It made me assume that the standard lib one has a serious problem, because writing a native mysql connector is not stuff normal people do for fun
16:35:07FromDiscord<auxym> yeah it's the same, it's just that in v2 you'll have to nimble install it
16:45:08FromDiscord<Yandall> Is it possible to make a object with custom type as const? https://media.discordapp.net/attachments/371759389889003532/1072558641539977256/image.png
16:45:34FromDiscord<Yandall> (edit) "a" => "an"
16:50:42FromDiscord<auxym> yes. the warning is just telling you that your const is not used
16:51:34FromDiscord<auxym> nim has very strong compile-time evaluation, you can do all sorts of stuff to define consts, even call procs and whatever
16:54:24FromDiscord<fabricio> I think you can't use ref types for constants, since they exist exist only during compile time and are more like C `#define` directives compared to regular variables
16:54:50FromDiscord<fabricio> ref objects are supposed to be allocated on the heap
16:55:14FromDiscord<fabricio> and garbage-collected
16:56:00FromDiscord<fabricio> @Yandall ^
16:56:14FromDiscord<fabricio> use let instead
17:10:46*uics quit (Remote host closed the connection)
17:11:05*uics joined #nim
17:32:26*rockcavera joined #nim
17:40:32*uics quit (Remote host closed the connection)
17:40:51*uics joined #nim
17:45:44FromDiscord<m4ul3r> nim doesn’t have a way to interact with gdb like python’s gdb module - correct?
17:52:13FromDiscord<Ntsékees> Is it known when Nim v2 will officially replace v1.6? (I heard there's a release candidate as of now.)
17:52:32FromDiscord<Phil> Nope, no clear timeline other than "soon"
17:53:15FromDiscord<Ntsékees> soon™, okay
18:02:52*jmdaemon joined #nim
18:03:18FromDiscord<Phil> I'll maintain my stance that both devel is good enough to use at this point
18:03:33FromDiscord<Phil> (edit) removed "both"
18:09:55*jmdaemon quit (Ping timeout: 268 seconds)
18:11:18*jmdaemon joined #nim
18:12:30FromDiscord<Nerve> What are the major outstanding issues in the devel branch? I actually have a need for default object field values very soon.
18:18:14FromDiscord<Phil> No idea.
18:18:35FromDiscord<Phil> You'd need to ask in internals or skim GitHub issues
18:22:59*azimut quit (Ping timeout: 255 seconds)
18:24:34FromDiscord<jmgomez> In reply to @Nerve "What are the major": AFAIK there a still a few ORC issues left
18:24:46FromDiscord<jmgomez> (edit) "there a" => "there're"
18:35:08*uics quit (Remote host closed the connection)
18:41:59*jmdaemon quit (Ping timeout: 268 seconds)
18:58:06*jmdaemon joined #nim
19:03:15FromDiscord<Phil> I assume those are subtle things that you'd need to consult external tooling to check for e.g. memory leakage because I can't say I've noticed anything
19:26:18FromDiscord<4zv4l> how do I use a `.lib` file in Nim ?
19:26:49FromDiscord<Phil> Err what were .lib files again?
19:27:07FromDiscord<Phil> Oh, static libraries
19:27:51*uics joined #nim
19:27:56FromDiscord<4zv4l> I compiled `detours` from Microsoft repo
19:28:02FromDiscord<4zv4l> and it made a `detours.lib`
19:28:09FromDiscord<4zv4l> I try to write a wrapper for a function from it
19:28:13FromDiscord<4zv4l> but I don't know how to use it
19:28:38FromDiscord<Phil> Based on this example: https://nim-lang.org/docs/nimc.html#dynliboverride↵`nim c --dynlibOverride:lua --passL:liblua.lib program.nim`↵I am inferring that you just need to pass a `--passL:<Libname>.lib` flag during the compilation process to statically link
19:29:00FromDiscord<Phil> For dynamic linking you'll want an .so file
19:29:50FromDiscord<jmgomez> In reply to @Isofruit "I assume those are": Not so sure about that, https://github.com/issues?q=is%3Aopen+is%3Aissue++archived%3Afalse+label%3A%22ARC%2FORC+Memory+Management%22+
19:30:42FromDiscord<jmgomez> In reply to @4zv4l "how do I use": you need to link it
19:31:07FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4np5
19:33:06FromDiscord<jmgomez> In reply to @4zv4l "I tried that but": Im not familiar with gcc errors. If you try with msvc or clang maybe I can help
19:33:53FromDiscord<jmgomez> it seems like linking issues but not sure what shape they have in gcc
19:36:07FromDiscord<4zv4l> I'll try to get clang
19:36:43FromDiscord<4zv4l> but that's just weird↵the .lib is supposed to be ok by itself
19:36:45FromDiscord<4zv4l> seems it is not
19:36:51FromDiscord<jmgomez> if you have msvc installed, you can try with vcc
19:37:43FromDiscord<jmgomez> did a quick search, and yes that seems to be a linking issue
19:38:00FromDiscord<jmgomez> try to add opengl too
19:38:23FromDiscord<4zv4l> In reply to @jmgomez "if you have msvc": I have msvc but no vcc
19:38:31FromDiscord<jmgomez> vcc ships with nim
19:38:35FromDiscord<4zv4l> In reply to @jmgomez "try to add opengl": opengl ? what's the link with opengl ?
19:39:01FromDiscord<jmgomez> In reply to @jmgomez "vcc ships with nim": it's an "interface" to msvc
19:39:40FromDiscord<4zv4l> .\vccexe.exe
19:39:42FromDiscord<4zv4l> this one ?
19:40:05FromDiscord<jmgomez> In reply to @4zv4l "opengl ? what's the": not sure, are you trying to use a raw version of lua? or are you building something else besides that?
19:40:29FromDiscord<jmgomez> yes, but if you do in your nim compilation call, `--cc:vcc` it should pick it
19:41:10FromDiscord<4zv4l> I get that with vcc
19:41:11FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4np7
19:41:24FromDiscord<4zv4l> In reply to @jmgomez "not sure, are you": I compiled `detours`
19:41:32FromDiscord<4zv4l> which created a `detours.lib`
19:41:43FromDiscord<4zv4l> and I try to make a `wrapper` for one of the function inside of it
19:41:53FromDiscord<jmgomez> I dont know what detours is, but yes. Linker issue
19:43:32FromDiscord<4zv4l> well, really weird
19:43:50FromDiscord<4zv4l> like if I add the right path to my linker maybe it should work ?
19:44:13FromDiscord<jmgomez> you need to specifically tell it where the library is
19:44:59FromDiscord<jmgomez> if you are trying to do bindings? I would suggest to have it working first on C/C++ so you remove the nim moving piece if you are not sure about it
19:45:18FromDiscord<jmgomez> because it isnt a Nim issue
19:45:24FromDiscord<4zv4l> `{.passL:"../detours/Detours/lib.X64/detours.lib".}`↵I have this in my code
19:45:45FromDiscord<4zv4l> and I import it this way
19:45:45FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4np8
19:46:03FromDiscord<jmgomez> and that may be fine the problem is that you are missing deps
19:46:10FromDiscord<jmgomez> outside nim's world
19:46:48FromDiscord<4zv4l> it also created a `detours.pdb` is it useful ?
19:47:22FromDiscord<jmgomez> no, that's for debugging
19:47:52FromDiscord<4zv4l> oh wait
19:47:54FromDiscord<jmgomez> does the project has a github repo or something?
19:47:54FromDiscord<4zv4l> it just compiled
19:47:59FromDiscord<4zv4l> yes it does
19:48:18FromDiscord<jmgomez> so it works now?
19:48:21FromDiscord<4zv4l> https://github.com/microsoft/Detours
19:48:24FromDiscord<4zv4l> I will run and see if it works
19:51:05FromDiscord<4zv4l> it seems to only compile with `vcc`
19:51:10FromDiscord<4zv4l> with `gcc` not working
19:51:25FromDiscord<4zv4l> and `vcc` is like super slow
19:51:47FromDiscord<jmgomez> ahh, I see it's from ms so not surprise there
19:55:10FromDiscord<4zv4l> how come vcc works but not gcc ?
19:56:06FromDiscord<4zv4l> I get `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`↵when calling the function
20:07:47FromDiscord<MartinSkou> Can i do something like: for var i in @[1,2,3]: so i can modify the value in the for loop?
20:09:42FromDiscord<MartinSkou> ok, got it: for i in l.intervals.mitems():
20:38:09FromDiscord<4zv4l> how do I import a structure from a C lib ?
20:52:08FromDiscord<Airbus5717> i installed nimls for lunarvim and i don't the syntax highlighting https://media.discordapp.net/attachments/371759389889003532/1072620804916920450/image.png
20:55:48*jmdaemon quit (Ping timeout: 268 seconds)
21:02:55FromDiscord<Andreas> In reply to @4zv4l "how do I import": try this https://nim-lang.org/docs/manual.html#foreign-function-interface
21:03:22FromDiscord<Andreas> (edit) "https://nim-lang.org/docs/manual.html#foreign-function-interface" => "https://nim-lang.org/docs/manual.html#foreign-function-interface↵`dynlib` and `importc`are your friends"
21:05:45FromDiscord<4zv4l> apparently `importc` does not work for `type`
21:09:16FromDiscord<spoon> In reply to @Airbus5717 "i installed nimls for": i use it with astronvim and i still have to use https://github.com/alaviss/nim.nvim for highlighting
21:24:08FromDiscord<Elegantbeef> it does, but it doesnt do what you expect probably↵(@4zv4l)
21:24:35FromDiscord<Elegantbeef> It tells Nim there is a type with X name in C code and to use that
21:25:20FromDiscord<Zoom> Hey everyone. Long time no see. Do we have any working channels impl for arc/orc yet? Tried to compile something from half a year ago and I'm suspecting the deadlocks is not just me messing things up.
21:25:39FromDiscord<Elegantbeef> Did you use https://github.com/nim-lang/threading/blob/master/threading/channels.nim?
21:26:32FromDiscord<Zoom> That's them.
21:27:49FromDiscord<Zoom> Tried with devel/stable, no difference, except devel prints a few warnings in `threadimpl.nim`
21:32:22*jmdaemon joined #nim
21:33:15FromDiscord<Elegantbeef> Do you have a min reproduction?
21:33:47FromDiscord<Elegantbeef> Though i imagine it's related to https://github.com/nim-lang/threading/issues/19
21:39:20FromDiscord<Saint> @Phil Hey! I was wondering if you know if you make a different docker-compose for your integration tests
21:39:55FromDiscord<Saint> Also should I make a separate test data volume mount for my tests in my directory? Should I mount a folder in /tmp instead?
21:40:03FromDiscord<Saint> Just wondering if you knew what would be best practices
21:41:22*uics quit (Remote host closed the connection)
21:41:44FromDiscord<Zoom> I don't and I haven't prepared one last time either when I got the impression everybody already knew it's broken \:\|
22:00:22Zevvwho needs channels, in nim 2.0 you can just move stuff to other threads
22:02:04FromDiscord<beans> sent a code paste, see https://play.nim-lang.org/#ix=4npE
22:02:16FromDiscord<beans> (edit) "https://play.nim-lang.org/#ix=4npE" => "https://play.nim-lang.org/#ix=4npF"
22:02:26FromDiscord<Elegantbeef> `e: var ExampleObject`
22:06:30FromDiscord<beans> aaah ok thanks
22:10:25FromDiscord<beans> In reply to @Elegantbeef "`e: var ExampleObject`": can you explain to me why I need `var` there? or rather what keyword is implied there by default rather than var?
22:12:45FromDiscord<Elegantbeef> By default parameters are immutable
22:12:54FromDiscord<Elegantbeef> Doing `var` tells nim that it needs to be a mutable variable
22:14:06FromDiscord<Elegantbeef> Implicitly it states "pass this by reference" but that's not something we need to concern ourselves wiht
22:26:41FromDiscord<Zoom> http://ix.io/4npH Here's what it boils down to. Perhaps I could strip more, but why waste a chance of getting some useful critique.
22:29:50FromDiscord<Zoom> If this worked, I have a lot of places I could stick this code, being a poor man's parallel/rush/xargs -P substitute.
22:31:36FromDiscord<Elegantbeef> I'd imagine the issue is the use of `recv` instead of `tryRecv` but hmmm
22:31:50FromDiscord<4zv4l> if anyone has time to kill↵mind trying to bind one function from `detours` and if it succeeds show me how he/she did ?↵cause I'm stuck with this for the whole day :/↵https://github.com/microsoft/Detours
22:33:05*via_ quit (Ping timeout: 255 seconds)
22:40:28FromDiscord<Zoom> Well, the point is to block until there's a message.
22:47:02FromDiscord<Zoom> For this test code on my machine it all hangs right after sending 68 tasks.
22:50:00FromDiscord<Zoom> And the default buffer size is 30. An I have 8 threads. 30+30+8=68 Illuminati confirmed!
22:50:12*beholders_eye quit (Ping timeout: 255 seconds)
22:58:15*xet7 joined #nim
22:58:43FromDiscord<Elegantbeef> Nothing seems off to my single threaded mind
23:06:12FromDiscord<Zoom> Thanks for looking anyway
23:07:02FromDiscord<Elegantbeef> > Be careful when using waitForExit for processes created without poParentStreams because they may fill output buffers, causing deadlock.↵might be related?
23:07:21FromDiscord<Elegantbeef> Though i replaced it with `sleep(5)`
23:15:25FromDiscord<Zoom> I'm pretty sure I'm subscribed to #9616 which in some better universe could definitely help
23:23:00FromDiscord<Zoom> Also, warnings like this just have to have a ref link to an issue/discussion, or it looks like acknowledging defeat and giving up.
23:49:56*dropkick quit (Ping timeout: 252 seconds)
23:59:07*xaltsc quit (Ping timeout: 252 seconds)