00:10:49 | FromDiscord | <auxym> In reply to @Isofruit "... Yknow what, I'll": til about nimble dump. I might actually use that. |
00:12:11 | FromDiscord | <ShalokShalom> In reply to @Hourglass, When the Hour Strikes "Sigh, I really need": haha 😅 |
00:12:21 | FromDiscord | <ShalokShalom> you're a running gag 😛 |
00:12:27 | FromDiscord | <ShalokShalom> like me 😄 |
00:12:44 | FromDiscord | <auxym> nim on jvm when? 😉 |
00:12:52 | FromDiscord | <ShalokShalom> You can already do that |
00:12:53 | FromDiscord | <Hourglass [She/Her]> In reply to @ShalokShalom "you're a running gag": Shows up with a new project each time? XD |
00:13:00 | FromDiscord | <ShalokShalom> I told her multiple times 😅 |
00:13:11 | FromDiscord | <Hourglass [She/Her]> ADHD brain makes me focus on many things at once |
00:13:20 | FromDiscord | <Hourglass [She/Her]> In reply to @ShalokShalom "I told her multiple": Only on GraalVM |
00:13:22 | FromDiscord | <ShalokShalom> Running Minecraft on Graal and then consuming LLVM or Wasm |
00:13:28 | FromDiscord | <Hourglass [She/Her]> Also not with the most ideal interop |
00:13:32 | FromDiscord | <ShalokShalom> "Only" |
00:13:43 | FromDiscord | <ShalokShalom> Well, easier than with your solution ^^ |
00:13:46 | FromDiscord | <Hourglass [She/Her]> GraalWASM exposes no host api access which makes it useless aha |
00:14:06 | FromDiscord | <ShalokShalom> Graal has LLVM too |
00:14:20 | FromDiscord | <ShalokShalom> Or you could add that |
00:14:38 | FromDiscord | <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:55 | FromDiscord | <ShalokShalom> That would contribute something ^^ |
00:15:06 | FromDiscord | <ShalokShalom> Fair 🙂 |
00:15:06 | FromDiscord | <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:31 | FromDiscord | <ShalokShalom> Might be a winter depression? |
00:18:48 | FromDiscord | <ShalokShalom> Or do you have an actual psychological cause for it? |
00:19:06 | FromDiscord | <ShalokShalom> I take Vitamin D, to prevent the first, recommended 😀 |
00:25:22 | FromDiscord | <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:13 | FromDiscord | <Elegantbeef> If you seasonal in all the seasons that's just depression |
00:26:17 | FromDiscord | <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:32 | FromDiscord | <Hourglass [She/Her]> In reply to @Elegantbeef "If you seasonal in": That made me chuckle ngl |
00:27:08 | FromDiscord | <Elegantbeef> if you have seasonal depression\ |
00:27:20 | FromDiscord | <Elegantbeef> I have the words the best ones |
00:28:01 | FromDiscord | <Hourglass [She/Her]> Absolute mood right there |
00:43:04 | FromDiscord | <Yepoleb> I love your words, they truly are some of the words i have read |
00:43:35 | FromDiscord | <Elegantbeef> Out of all the words they are words |
00:46:34 | FromDiscord | <normie> What makes Nim worth using over other languages? |
00:46:47 | FromDiscord | <normie> I have a list of languages that look interesting to me, and Nim is on it. |
00:47:36 | FromDiscord | <Elegantbeef> Good compile time evaluation, a nice type system, macros, can be fast as hell. |
00:48:45 | FromDiscord | <normie> sent a long message, see http://ix.io/4nkV |
00:49:00 | FromDiscord | <normie> That is my list |
00:50:45 | FromDiscord | <huantian> Elixir is dynamic and functional |
00:50:50 | FromDiscord | <huantian> Nim isn’t that |
00:51:02 | FromDiscord | <normie> They are just languages that interest me |
00:55:00 | FromDiscord | <Yepoleb> I like that nim needs very little words to do a lot |
00:55:21 | FromDiscord | <Yepoleb> Like the snake language |
00:58:48 | FromDiscord | <Elegantbeef> It's a system programming language so it's the closest to Zig/Rust/C |
00:58:50 | FromDiscord | <Elegantbeef> But it's also quite ergonomic |
01:06:21 | FromDiscord | <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:42 | FromDiscord | <Nilts> I just realized my number is much bigger than `high(int)` |
01:23:18 | * | azimut joined #nim |
01:34:31 | FromDiscord | <ShalokShalom> In reply to @Hourglass, When the Hour Strikes "Near constant, i need": I wish you nothing but the best blessings ❤️ |
01:34:35 | FromDiscord | <leorize> yea that's what it meant |
01:35:59 | FromDiscord | <ShalokShalom> @normie Imho, Nim is a very practical, "get things done" language |
01:38:39 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/4nl3 |
01:39:49 | FromDiscord | <ShalokShalom> (edit) "http://ix.io/4nl3" => "http://ix.io/4nl4" |
01:42:01 | FromDiscord | <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:34 | FromDiscord | <Yepoleb> In reply to @ShalokShalom "There are some dirty": there it is again! 😄 |
01:47:00 | FromDiscord | <ShalokShalom> 😇 |
01:47:11 | FromDiscord | <ShalokShalom> 🙏 |
01:47:30 | FromDiscord | <ShalokShalom> I am innocent 🤣 |
01:51:02 | FromDiscord | <Elegantbeef> It's weird that mentioning F# has a side effect |
01:56:02 | * | dropkick quit (Ping timeout: 255 seconds) |
02:07:30 | FromDiscord | <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:53 | FromDiscord | <hortinstein> is there an easy way to convert a string with hex values to a byte array? |
03:48:32 | FromDiscord | <hortinstein> like hex representing a cryptokey |
03:50:27 | * | arkurious quit (Quit: Leaving) |
03:55:56 | * | deadmarshal_ joined #nim |
04:11:41 | FromDiscord | <Elegantbeef> `parseHexStr` and `toOpenArrayByte` |
04:12:38 | FromDiscord | <hortinstein> thanks! |
04:26:13 | FromDiscord | <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:07 | FromDiscord | <Elegantbeef> You need to convert it manually with a loop |
04:29:19 | FromDiscord | <hortinstein> looks like this might work |
04:29:28 | FromDiscord | <hortinstein> sent a long message, see http://ix.io/4nls |
04:29:32 | FromDiscord | <hortinstein> so ugly |
04:29:34 | FromDiscord | <hortinstein> lol |
04:29:35 | FromDiscord | <Elegantbeef> No it will not |
04:30:01 | FromDiscord | <Elegantbeef> you want something like `var a: array[32, byte]; a[0..31] = c2privKey.toOpenByteArray(0, 31)` |
04:30:26 | FromDiscord | <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:48 | FromDiscord | <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:03 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#types-object-variants |
06:42:36 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nlN |
06:45:22 | FromDiscord | <Elegantbeef> For `ref` objects the convention is to use `new` |
06:45:44 | FromDiscord | <Elegantbeef> Personally i prefer the latter version since it allows more generic code |
06:50:40 | FromDiscord | <BobBBob> So basically use a generic or use hungarian notation? |
06:50:59 | FromDiscord | <Elegantbeef> Yes |
06:52:45 | FromDiscord | <BobBBob> sent a code paste, see https://play.nim-lang.org/#ix=4nlP |
06:52:55 | FromDiscord | <Elegantbeef> Nim doesnt have return type inference |
06:53:01 | FromDiscord | <Elegantbeef> And araq is against it afaik |
07:00:34 | FromDiscord | <BobBBob> btw which channel should I posts projects in and maybe get a little bit of code review? |
07:00:43 | FromDiscord | <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:46 | FromDiscord | <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:28 | FromDiscord | <Elegantbeef> Manual doesnt say that |
07:46:45 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1072423154288435241/image.png |
07:47:11 | FromDiscord | <Elegantbeef> You're on the devel manual |
08:20:35 | FromDiscord | <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:26 | FromDiscord | <4zv4l> my bad, that was because it was in a constant |
08:25:26 | FromDiscord | <Elegantbeef> If you want a cstring it's `myString[0].addr` |
08:42:24 | FromDiscord | <4zv4l> return from a `bool` proc without saying true or false↵by default it returns true ? |
08:43:05 | FromDiscord | <Elegantbeef> All values are defaulted to `0` in nim |
08:43:14 | FromDiscord | <Elegantbeef> Which means it returns false |
08:45:01 | * | xet7 quit (Ping timeout: 252 seconds) |
08:45:03 | FromDiscord | <4zv4l> sent a long message, see http://ix.io/4nmr |
08:45:49 | FromDiscord | <4zv4l> because now I added a bunch of `== 0: return` to be sure |
08:46:11 | FromDiscord | <Elegantbeef> I'd do the explicit check instead of rely on a boolean converter |
08:49:04 | FromDiscord | <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:40 | FromDiscord | <Elegantbeef> If `GetClipboardData()` returns either 0 or 1 you can do `if not bool(GetClipboardData())` |
08:50:02 | FromDiscord | <Elegantbeef> `GetClipboardData()` should return the clipboard data not a boolean |
08:50:18 | * | kenran quit (Remote host closed the connection) |
09:03:44 | FromDiscord | <4zv4l> yeah yeah that was for an example xD |
09:03:53 | FromDiscord | <4zv4l> more SetClipboardData |
09:32:52 | FromDiscord | <Coachonko> Is there a uuid function? |
09:39:29 | FromDiscord | <Rika> External library |
09:59:59 | * | ltriant joined #nim |
10:08:06 | * | uics joined #nim |
10:18:48 | FromDiscord | <4zv4l> is there an easy way to throw custom error that can then be catched ? |
10:24:26 | FromDiscord | <Rika> Make an exception type that inherits from the catchable error type |
11:00:22 | * | beholders_eye joined #nim |
11:27:00 | Amun-Ra | what'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:59 | Amun-Ra | this 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:23 | Amun-Ra | hmm, 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:17 | FromDiscord | <🍵camellia🍵> which distro? |
12:21:57 | FromDiscord | <Phil> does nimble test only run test files directly under /test ? |
12:24:03 | FromDiscord | <pyolyokh> sent a code paste, see https://play.nim-lang.org/#ix=4nn3 |
12:24:58 | FromDiscord | <Phil> oooff |
12:25:17 | FromDiscord | <Phil> I think my strategy at this point would be to use include |
12:26:03 | FromDiscord | <Phil> Like, have a dummy test file directly under test and then include the test files in the subdirectory |
12:26:38 | FromDiscord | <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:51 | FromDiscord | <sOkam!> nimble doc says something about it, but just briefly |
12:27:08 | * | uics quit (Remote host closed the connection) |
12:27:30 | FromDiscord | <sOkam!> (edit) "test/tester`" => "tests/tester`" |
13:00:53 | FromDiscord | <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:07 | Amun-Ra | 🍵camellia🍵: debian (testing) |
13:33:04 | FromDiscord | <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:10 | FromDiscord | <🍵camellia🍵> ah yeah it looks like debian just doesn't include testament, i would honestly have a bug report for that |
14:05:07 | FromDiscord | <Hourglass [She/Her]> How would I check where the cursor is in the terminal in Nim? |
14:05:29 | FromDiscord | <Hourglass [She/Her]> Also need to detect when a user clicks a button |
14:12:05 | * | jmd_ quit (Ping timeout: 256 seconds) |
14:30:06 | FromDiscord | <System64 ~ Flandre Scarlet> Is it normal I still have this issue? https://media.discordapp.net/attachments/371759389889003532/1072524664737386586/message.txt |
14:36:50 | FromDiscord | <federico3> @🍵camellia🍵\: do you feel the need for testament shipped with the compiler? |
14:41:40 | FromDiscord | <🍵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:46 | FromDiscord | <Nerve> What is the preferred way of testing that two floats are close to a given precision, rather than testing for equality? |
15:02:42 | FromDiscord | <🍵camellia🍵> absolute value of the difference between them? |
15:03:06 | FromDiscord | <🍵camellia🍵> that's not a preferred way as much as it is the only way i can think of |
15:14:39 | FromDiscord | <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:55 | FromDiscord | <Coachonko> How is the mysql connector and why is there a third party lib for async mysql connection? |
15:53:26 | FromDiscord | <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:19 | FromDiscord | <Coachonko> I do not mind writing raw queries for mysql, I don't want to learn a new database though |
15:54:23 | FromDiscord | <Phil> The main drawback on the official dB connector package is that it represents null values in a column as empty string |
15:54:44 | FromDiscord | <Coachonko> Hm ok that's worth noting |
15:55:07 | FromDiscord | <Phil> And the version that fixes it, ndb, doesn't implement MySQL |
15:55:26 | FromDiscord | <Phil> Only sqlite and postgres |
15:55:40 | FromDiscord | <Coachonko> ndb is stdlib? |
15:55:46 | FromDiscord | <Phil> Nope |
15:56:35 | FromDiscord | <Coachonko> When you say official connector, you mean the std/db_mysql? |
15:57:02 | FromDiscord | <Coachonko> (edit) "official connector," => "`official dB connector package`," |
16:00:01 | Amun-Ra | 🍵camellia🍵: it also sets wrong path to .css so one can't use nim doc ootb |
16:03:14 | FromDiscord | <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:47 | FromDiscord | <Phil> And I use mostly Nim 2 (devel branch of compiler) |
16:04:40 | FromDiscord | <Coachonko> I probably should move to Nim 2 |
16:04:48 | * | uics quit (Remote host closed the connection) |
16:04:50 | FromDiscord | <Coachonko> No point in starting to learn on 1.6 |
16:06:55 | FromDiscord | <Phil> There really is not that much of a difference |
16:07:00 | FromDiscord | <Phil> As in literally |
16:08:20 | FromDiscord | <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:28 | FromDiscord | <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:40 | FromDiscord | <Phil> But those are semi obscure |
16:11:09 | FromDiscord | <Phil> (edit) removed "that" |
16:12:30 | FromDiscord | <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:55 | FromDiscord | <Phil> (edit) "to" => "to"" | "1.8" => "1.8'" |
16:13:05 | FromDiscord | <Phil> (edit) "1.8'" => "1.8', if such a thing existed" |
16:13:44 | FromDiscord | <Phil> (edit) "Line," => "Like," |
16:21:33 | FromDiscord | <Coachonko> I see alright |
16:21:40 | FromDiscord | <Coachonko> Thank you for the information |
16:26:40 | FromDiscord | <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:07 | FromDiscord | <auxym> yeah it's the same, it's just that in v2 you'll have to nimble install it |
16:45:08 | FromDiscord | <Yandall> Is it possible to make a object with custom type as const? https://media.discordapp.net/attachments/371759389889003532/1072558641539977256/image.png |
16:45:34 | FromDiscord | <Yandall> (edit) "a" => "an" |
16:50:42 | FromDiscord | <auxym> yes. the warning is just telling you that your const is not used |
16:51:34 | FromDiscord | <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:24 | FromDiscord | <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:50 | FromDiscord | <fabricio> ref objects are supposed to be allocated on the heap |
16:55:14 | FromDiscord | <fabricio> and garbage-collected |
16:56:00 | FromDiscord | <fabricio> @Yandall ^ |
16:56:14 | FromDiscord | <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:44 | FromDiscord | <m4ul3r> nim doesn’t have a way to interact with gdb like python’s gdb module - correct? |
17:52:13 | FromDiscord | <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:32 | FromDiscord | <Phil> Nope, no clear timeline other than "soon" |
17:53:15 | FromDiscord | <Ntsékees> soon™, okay |
18:02:52 | * | jmdaemon joined #nim |
18:03:18 | FromDiscord | <Phil> I'll maintain my stance that both devel is good enough to use at this point |
18:03:33 | FromDiscord | <Phil> (edit) removed "both" |
18:09:55 | * | jmdaemon quit (Ping timeout: 268 seconds) |
18:11:18 | * | jmdaemon joined #nim |
18:12:30 | FromDiscord | <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:14 | FromDiscord | <Phil> No idea. |
18:18:35 | FromDiscord | <Phil> You'd need to ask in internals or skim GitHub issues |
18:22:59 | * | azimut quit (Ping timeout: 255 seconds) |
18:24:34 | FromDiscord | <jmgomez> In reply to @Nerve "What are the major": AFAIK there a still a few ORC issues left |
18:24:46 | FromDiscord | <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:15 | FromDiscord | <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:18 | FromDiscord | <4zv4l> how do I use a `.lib` file in Nim ? |
19:26:49 | FromDiscord | <Phil> Err what were .lib files again? |
19:27:07 | FromDiscord | <Phil> Oh, static libraries |
19:27:51 | * | uics joined #nim |
19:27:56 | FromDiscord | <4zv4l> I compiled `detours` from Microsoft repo |
19:28:02 | FromDiscord | <4zv4l> and it made a `detours.lib` |
19:28:09 | FromDiscord | <4zv4l> I try to write a wrapper for a function from it |
19:28:13 | FromDiscord | <4zv4l> but I don't know how to use it |
19:28:38 | FromDiscord | <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:00 | FromDiscord | <Phil> For dynamic linking you'll want an .so file |
19:29:50 | FromDiscord | <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:42 | FromDiscord | <jmgomez> In reply to @4zv4l "how do I use": you need to link it |
19:31:07 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4np5 |
19:33:06 | FromDiscord | <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:53 | FromDiscord | <jmgomez> it seems like linking issues but not sure what shape they have in gcc |
19:36:07 | FromDiscord | <4zv4l> I'll try to get clang |
19:36:43 | FromDiscord | <4zv4l> but that's just weird↵the .lib is supposed to be ok by itself |
19:36:45 | FromDiscord | <4zv4l> seems it is not |
19:36:51 | FromDiscord | <jmgomez> if you have msvc installed, you can try with vcc |
19:37:43 | FromDiscord | <jmgomez> did a quick search, and yes that seems to be a linking issue |
19:38:00 | FromDiscord | <jmgomez> try to add opengl too |
19:38:23 | FromDiscord | <4zv4l> In reply to @jmgomez "if you have msvc": I have msvc but no vcc |
19:38:31 | FromDiscord | <jmgomez> vcc ships with nim |
19:38:35 | FromDiscord | <4zv4l> In reply to @jmgomez "try to add opengl": opengl ? what's the link with opengl ? |
19:39:01 | FromDiscord | <jmgomez> In reply to @jmgomez "vcc ships with nim": it's an "interface" to msvc |
19:39:40 | FromDiscord | <4zv4l> .\vccexe.exe |
19:39:42 | FromDiscord | <4zv4l> this one ? |
19:40:05 | FromDiscord | <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:29 | FromDiscord | <jmgomez> yes, but if you do in your nim compilation call, `--cc:vcc` it should pick it |
19:41:10 | FromDiscord | <4zv4l> I get that with vcc |
19:41:11 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4np7 |
19:41:24 | FromDiscord | <4zv4l> In reply to @jmgomez "not sure, are you": I compiled `detours` |
19:41:32 | FromDiscord | <4zv4l> which created a `detours.lib` |
19:41:43 | FromDiscord | <4zv4l> and I try to make a `wrapper` for one of the function inside of it |
19:41:53 | FromDiscord | <jmgomez> I dont know what detours is, but yes. Linker issue |
19:43:32 | FromDiscord | <4zv4l> well, really weird |
19:43:50 | FromDiscord | <4zv4l> like if I add the right path to my linker maybe it should work ? |
19:44:13 | FromDiscord | <jmgomez> you need to specifically tell it where the library is |
19:44:59 | FromDiscord | <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:18 | FromDiscord | <jmgomez> because it isnt a Nim issue |
19:45:24 | FromDiscord | <4zv4l> `{.passL:"../detours/Detours/lib.X64/detours.lib".}`↵I have this in my code |
19:45:45 | FromDiscord | <4zv4l> and I import it this way |
19:45:45 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4np8 |
19:46:03 | FromDiscord | <jmgomez> and that may be fine the problem is that you are missing deps |
19:46:10 | FromDiscord | <jmgomez> outside nim's world |
19:46:48 | FromDiscord | <4zv4l> it also created a `detours.pdb` is it useful ? |
19:47:22 | FromDiscord | <jmgomez> no, that's for debugging |
19:47:52 | FromDiscord | <4zv4l> oh wait |
19:47:54 | FromDiscord | <jmgomez> does the project has a github repo or something? |
19:47:54 | FromDiscord | <4zv4l> it just compiled |
19:47:59 | FromDiscord | <4zv4l> yes it does |
19:48:18 | FromDiscord | <jmgomez> so it works now? |
19:48:21 | FromDiscord | <4zv4l> https://github.com/microsoft/Detours |
19:48:24 | FromDiscord | <4zv4l> I will run and see if it works |
19:51:05 | FromDiscord | <4zv4l> it seems to only compile with `vcc` |
19:51:10 | FromDiscord | <4zv4l> with `gcc` not working |
19:51:25 | FromDiscord | <4zv4l> and `vcc` is like super slow |
19:51:47 | FromDiscord | <jmgomez> ahh, I see it's from ms so not surprise there |
19:55:10 | FromDiscord | <4zv4l> how come vcc works but not gcc ? |
19:56:06 | FromDiscord | <4zv4l> I get `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`↵when calling the function |
20:07:47 | FromDiscord | <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:42 | FromDiscord | <MartinSkou> ok, got it: for i in l.intervals.mitems(): |
20:38:09 | FromDiscord | <4zv4l> how do I import a structure from a C lib ? |
20:52:08 | FromDiscord | <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:55 | FromDiscord | <Andreas> In reply to @4zv4l "how do I import": try this https://nim-lang.org/docs/manual.html#foreign-function-interface |
21:03:22 | FromDiscord | <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:45 | FromDiscord | <4zv4l> apparently `importc` does not work for `type` |
21:09:16 | FromDiscord | <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:08 | FromDiscord | <Elegantbeef> it does, but it doesnt do what you expect probably↵(@4zv4l) |
21:24:35 | FromDiscord | <Elegantbeef> It tells Nim there is a type with X name in C code and to use that |
21:25:20 | FromDiscord | <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:39 | FromDiscord | <Elegantbeef> Did you use https://github.com/nim-lang/threading/blob/master/threading/channels.nim? |
21:26:32 | FromDiscord | <Zoom> That's them. |
21:27:49 | FromDiscord | <Zoom> Tried with devel/stable, no difference, except devel prints a few warnings in `threadimpl.nim` |
21:32:22 | * | jmdaemon joined #nim |
21:33:15 | FromDiscord | <Elegantbeef> Do you have a min reproduction? |
21:33:47 | FromDiscord | <Elegantbeef> Though i imagine it's related to https://github.com/nim-lang/threading/issues/19 |
21:39:20 | FromDiscord | <Saint> @Phil Hey! I was wondering if you know if you make a different docker-compose for your integration tests |
21:39:55 | FromDiscord | <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:03 | FromDiscord | <Saint> Just wondering if you knew what would be best practices |
21:41:22 | * | uics quit (Remote host closed the connection) |
21:41:44 | FromDiscord | <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:22 | Zevv | who needs channels, in nim 2.0 you can just move stuff to other threads |
22:02:04 | FromDiscord | <beans> sent a code paste, see https://play.nim-lang.org/#ix=4npE |
22:02:16 | FromDiscord | <beans> (edit) "https://play.nim-lang.org/#ix=4npE" => "https://play.nim-lang.org/#ix=4npF" |
22:02:26 | FromDiscord | <Elegantbeef> `e: var ExampleObject` |
22:06:30 | FromDiscord | <beans> aaah ok thanks |
22:10:25 | FromDiscord | <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:45 | FromDiscord | <Elegantbeef> By default parameters are immutable |
22:12:54 | FromDiscord | <Elegantbeef> Doing `var` tells nim that it needs to be a mutable variable |
22:14:06 | FromDiscord | <Elegantbeef> Implicitly it states "pass this by reference" but that's not something we need to concern ourselves wiht |
22:26:41 | FromDiscord | <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:50 | FromDiscord | <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:36 | FromDiscord | <Elegantbeef> I'd imagine the issue is the use of `recv` instead of `tryRecv` but hmmm |
22:31:50 | FromDiscord | <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:28 | FromDiscord | <Zoom> Well, the point is to block until there's a message. |
22:47:02 | FromDiscord | <Zoom> For this test code on my machine it all hangs right after sending 68 tasks. |
22:50:00 | FromDiscord | <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:43 | FromDiscord | <Elegantbeef> Nothing seems off to my single threaded mind |
23:06:12 | FromDiscord | <Zoom> Thanks for looking anyway |
23:07:02 | FromDiscord | <Elegantbeef> > Be careful when using waitForExit for processes created without poParentStreams because they may fill output buffers, causing deadlock.↵might be related? |
23:07:21 | FromDiscord | <Elegantbeef> Though i replaced it with `sleep(5)` |
23:15:25 | FromDiscord | <Zoom> I'm pretty sure I'm subscribed to #9616 which in some better universe could definitely help |
23:23:00 | FromDiscord | <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) |