00:35:44 | * | SchweinDeBurg joined #nim |
01:00:50 | FromDiscord | <__jont__> sent a code paste, see https://play.nim-lang.org/#pasty=hDMwbWTA |
01:01:09 | FromDiscord | <__jont__> (edit) "https://play.nim-lang.org/#pasty=DCdLAKze" => "https://play.nim-lang.org/#pasty=FVmxsGQF" |
01:20:58 | FromDiscord | <Elegantbeef> Did you use `sysPath`? |
01:37:12 | FromDiscord | <__jont__> In reply to @Elegantbeef "Did you use `sysPath`?": No... in the examples I'm seeing this is usually something like `/usr/include`? |
01:37:30 | FromDiscord | <Elegantbeef> Yes it's the system path for your clang compiler |
01:58:27 | * | SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev) |
02:25:17 | FromDiscord | <__jont__> Cool, issue of `stdint.h` solved... now `math.h`, lol. This seems to be slightly more challenging |
02:26:26 | FromDiscord | <__jont__> My guess is that I need to link it against the math libary, but `compilerarg "-lm"` seems to have no effect here |
02:46:56 | FromDiscord | <__jont__> Solved! Needed to add `{.passL:"-lm".}` at the top of my wrapper file. |
02:47:50 | FromDiscord | <Omi.> https://t.me/hamsTer_kombat_bot/start?startapp=kentId7487400216↵↵Earn dollars with this new bot |
02:48:37 | FromDiscord | <__jont__> In reply to @__jont__ "Solved! Needed to add": This is crazy cool. Now that this is compiling I just need to set up some tests and a friendlier API and it's ready for use |
02:48:59 | FromDiscord | <Elegantbeef> Libclang is magical |
03:42:38 | * | SchweinDeBurg joined #nim |
04:09:51 | FromDiscord | <that_dude.> In reply to @Omi. "https://t.me/hamsTer_kombat_bot/start?startapp=kent": <@&371760044473319454> |
04:12:35 | FromDiscord | <basilajith> sent a code paste, see https://play.nim-lang.org/#pasty=vaxHBQsO |
04:13:12 | FromDiscord | <basilajith> Even if I don't escape the space character ' ', it throws the same error. |
04:13:20 | FromDiscord | <basilajith> It's a Postgres database. |
04:17:29 | FromDiscord | <leorize> you might want to try formatting it as ISO8601 stamps instead |
04:19:18 | FromDiscord | <basilajith> is there an iso() method? |
04:19:23 | FromDiscord | <basilajith> or toISO() method? |
04:21:04 | FromDiscord | <basilajith> Would this work?↵`"YYYY-MM-dd'T'HH:mm:ss'.'ffffffzzz"` |
04:29:13 | FromDiscord | <basilajith> This is what I am aiming to get:↵`2024-05-31 10:33:50.254542+00`↵↵👆🏼 This is from an existing record in the database. Generated using Golang's `time.Now()` |
04:41:04 | FromDiscord | <leorize> that should work↵(@basilajith) |
04:42:03 | FromDiscord | <leorize> you will want `yyyy` instead of `YYYY` though, since ISO year is 4 digits |
04:43:48 | FromDiscord | <leorize> though your problem might not be the time format |
04:43:53 | FromDiscord | <leorize> but rather your query |
05:49:58 | FromDiscord | <basilajith> sent a code paste, see https://play.nim-lang.org/#pasty=yHINhffA |
08:08:48 | * | redj quit (Quit: No Ping reply in 180 seconds.) |
08:10:55 | * | redj joined #nim |
08:29:01 | * | Guest6536 quit (Quit: WeeChat 4.3.2) |
08:29:22 | * | xaltsc joined #nim |
08:29:46 | * | xaltsc is now known as Guest3399 |
08:29:53 | * | Guest3399 quit (Changing host) |
08:29:53 | * | Guest3399 joined #nim |
08:30:39 | * | Guest3399 is now known as xaltsc |
09:06:44 | * | krux02 joined #nim |
09:23:40 | FromDiscord | <Robyn [She/Her]> Why is expression parsing such a pain in the ass |
09:35:54 | FromDiscord | <Clonkk> Parsing is hard |
09:36:02 | FromDiscord | <Clonkk> In general |
09:36:37 | FromDiscord | <Robyn [She/Her]> Parsing a class or a struct seems easy when you have a keyword for it |
11:11:53 | * | computerquip quit (Ping timeout: 272 seconds) |
11:11:53 | * | oddish quit (Ping timeout: 256 seconds) |
11:12:45 | * | LyndsySimon quit (Ping timeout: 255 seconds) |
11:12:47 | * | ormiret quit (Ping timeout: 255 seconds) |
11:12:49 | * | khazakar quit (Ping timeout: 246 seconds) |
11:13:10 | * | notchris quit (Ping timeout: 256 seconds) |
11:14:11 | FromDiscord | <fabric.input_output> it's the precedence that makes it hard |
11:23:06 | * | notchris joined #nim |
11:23:10 | * | ormiret joined #nim |
11:23:46 | * | oddish joined #nim |
11:23:53 | * | computerquip joined #nim |
11:24:26 | * | LyndsySimon joined #nim |
11:26:31 | * | khazakar joined #nim |
11:37:38 | * | disso-peach quit (Quit: Leaving) |
12:11:14 | * | lucasta joined #nim |
12:34:41 | FromDiscord | <Robyn [She/Her]> Yeahh |
14:21:43 | FromDiscord | <pmunch> I wonder how hard it would be to create a parser which just takes examples as input and creates something useful |
14:33:02 | FromDiscord | <albassort> @pmunch can you think of a package that depends on a c/rust lib |
14:33:13 | FromDiscord | <albassort> i need an example for how to integrate this into my code |
14:33:19 | FromDiscord | <albassort> (edit) "code" => "nimble" |
14:33:57 | * | une joined #nim |
14:39:43 | FromDiscord | <fabric.input_output> In reply to @albassort "<@392962235737047041> can you think": naylib? |
14:42:05 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=gKFrZJqi |
14:42:15 | FromDiscord | <albassort> it just doesn't handle it |
14:51:27 | FromDiscord | <pmunch> In reply to @albassort "<@392962235737047041> can you think": What do you mean by c/rust? |
14:52:06 | FromDiscord | <albassort> so as part of my project I've written a library in rust, i want to implement an option that works like this:↵↵So, because we depend on this, you can either download it from my server or build from source |
14:52:23 | FromDiscord | <albassort> then it'll link the output from the .nimble to /usr/lib and /usr/include |
14:54:39 | FromDiscord | <pmunch> So you have a project that requires a binary? |
14:54:44 | FromDiscord | <albassort> yes |
14:55:03 | FromDiscord | <albassort> its not in any package manager, obviously |
15:11:43 | FromDiscord | <albassort> I think I'll just embed a bash script in it |
15:23:37 | FromDiscord | <planetis_m> How's gonna run on windows? |
15:29:20 | FromDiscord | <planetis_m> If I learned something is that linking system libraries is bullshit waiting to break.just ship your own copy |
15:30:03 | * | krux02 quit (Remote host closed the connection) |
15:34:51 | FromDiscord | <planetis_m> In reply to @albassort "I think I'll just": Also what is that you make again? |
15:35:08 | FromDiscord | <albassort> In reply to @planetis_m "How's gonna run on": if windows: "windows is not supported |
15:35:17 | FromDiscord | <albassort> (edit) "supported" => "supported"" |
15:35:46 | FromDiscord | <planetis_m> That's a solution. At least for a start |
15:36:10 | FromDiscord | <albassort> The issue being, I don't know anything about windows to actually implement dynamic linking |
15:36:17 | FromDiscord | <albassort> i do have a vm to test it in when im ready tho |
15:36:46 | FromDiscord | <albassort> In reply to @planetis_m "Also what is that": currently finishing work on a pgp library |
15:45:35 | FromDiscord | <saint.___.> Is https://github.com/treeform/globby still what I should use for globs in nim? |
15:48:28 | FromDiscord | <Robyn [She/Her]> In reply to @pmunch "I wonder how hard": So AI? :P |
15:49:18 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "The issue being, I": Could always use `std/dynlib` |
15:52:35 | * | derpydoo joined #nim |
16:04:25 | * | lucasta quit (Remote host closed the connection) |
16:04:45 | * | lucasta joined #nim |
16:12:34 | NimEventer | New thread by refracted: ARC vs refc, see https://forum.nim-lang.org/t/11844 |
16:16:19 | * | derpydoo quit (Ping timeout: 256 seconds) |
16:29:38 | FromDiscord | <threefour> How does one bind in nativesockets? The `bindAddr` documentation requires a `ptr SockAddr` argument, which the documentation also only mentions pertaining to Windows. |
16:30:06 | * | lucasta quit (Quit: Leaving) |
16:31:12 | FromDiscord | <threefour> Ah nevermind. It links to `std/winlean`, but I found `std/posix`. |
17:09:01 | FromDiscord | <albassort> In reply to @chronos.vitaqua "Could always use `std/dynlib`": maybe. Do you know of a way to take in user input from nimble? |
17:09:04 | FromDiscord | <albassort> im furiously gooling |
17:09:07 | FromDiscord | <albassort> (edit) "gooling" => "googling" |
17:11:12 | FromDiscord | <albassort> AHA, prompt |
17:11:35 | FromDiscord | <albassort> (edit) "AHA, prompt" => "prompt?" |
17:21:15 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "maybe. Do you know": Something with nimble tasks might help |
17:27:04 | NimEventer | New thread by SerjEpatoff: Bulk .importc, see https://forum.nim-lang.org/t/11845 |
17:27:45 | * | coldfeet joined #nim |
17:38:04 | * | coldfeet quit (Remote host closed the connection) |
17:46:42 | * | ntat joined #nim |
18:01:14 | * | rockcavera joined #nim |
18:04:58 | * | rockcavera quit (Read error: Connection reset by peer) |
18:05:17 | * | rockcavera joined #nim |
18:05:17 | * | rockcavera quit (Changing host) |
18:05:17 | * | rockcavera joined #nim |
18:22:03 | * | SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev) |
18:39:31 | NimEventer | New thread by Mrokii: X11 - XQueryTree produces "illegal storage acess" segfault when run, see https://forum.nim-lang.org/t/11846 |
18:56:38 | * | rockcavera quit (Ping timeout: 252 seconds) |
19:13:16 | FromDiscord | <Robyn [She/Her]> Anyone know how I'd get jsony to convert camelCase to snake_case? |
19:13:23 | FromDiscord | <Robyn [She/Her]> When dumping |
19:13:44 | FromDiscord | <Robyn [She/Her]> Do I need to write a custom dump hook? Because I really hope not |
19:15:26 | FromDiscord | <Robyn [She/Her]> Might just use `sunny`, seems to fit what I need better and easier |
19:22:23 | FromDiscord | <saint.___.> In reply to @chronos.vitaqua "Anyone know how I'd": Is this a standard json dumping thing? |
19:22:26 | FromDiscord | <saint.___.> Seems pretty custom |
19:22:45 | FromDiscord | <saint.___.> Don't think I've seen seen any other json libraries support that |
19:23:32 | FromDiscord | <Robyn [She/Her]> In reply to @saint.___. "Is this a standard": No idea what you mean :P |
19:23:42 | FromDiscord | <melmass> It's pretty common |
19:24:00 | FromDiscord | <Robyn [She/Her]> But baaically I just need to convert to snake_case since thats's what Ollama expects, but I hate snake\_case with a passion |
19:24:03 | FromDiscord | <melmass> field renaming for serializing/deserializing |
19:24:08 | FromDiscord | <Robyn [She/Her]> Yeah |
19:24:20 | FromDiscord | <Robyn [She/Her]> Jsony doesn't seem to have a simple way to do it for dumping |
19:27:03 | FromDiscord | <melmass> In reply to @saint.___. "Don't think I've seen": In rust serde it's just `#[serde(rename(serialize = "papy", deserialize= "baby"))]` |
19:27:07 | FromDiscord | <melmass> <https://serde.rs/field-attrs.html> |
19:27:08 | * | rockcavera joined #nim |
19:34:19 | FromDiscord | <saint.___.> In reply to @melmass "In rust serde it's": Gotcha |
19:34:27 | FromDiscord | <saint.___.> But I mean like snake to camell |
19:35:04 | FromDiscord | <melmass> In reply to @saint.___. "Gotcha": There is a special attribute for that 😅 |
19:35:05 | FromDiscord | <melmass> https://serde.rs/attr-rename.html |
19:35:26 | FromDiscord | <saint.___.> Nice |
19:35:29 | FromDiscord | <melmass> but serde is a bad example it's probably one of the most feature complete |
20:21:57 | FromDiscord | <sebastian_solace> im using a loop to post things in a sequence to a site, should the http client be outside the loop and i close it when the loop ends? or should i contain the http client within the loop iterations and close it after every iteration |
20:22:39 | FromDiscord | <Robyn [She/Her]> In reply to @sebastian_solace "im using a loop": Iirc with std/httpclient you're supposed to create a new client for each request, and it's destructor should be called at the end of the scope anywau |
20:22:42 | FromDiscord | <Robyn [She/Her]> Anyway |
20:23:12 | FromDiscord | <sebastian_solace> ohh ok |
20:43:59 | FromDiscord | <.bobbbob> sent a code paste, see https://play.nim-lang.org/#pasty=qUbpbatn |
20:45:45 | FromDiscord | <.bobbbob> nvmd it's UncheckedArray right? |
21:21:11 | * | ntat quit (Quit: Leaving) |
22:22:07 | FromDiscord | <zirael137> sent a code paste, see https://play.nim-lang.org/#pasty=ynBrRVNK |
22:23:19 | FromDiscord | <zirael137> sent a code paste, see https://play.nim-lang.org/#pasty=DHEOVdfh |
22:23:30 | FromDiscord | <zirael137> And I've no idea what is wrong |
22:23:32 | FromDiscord | <z1r343l2> \:o |
22:26:52 | FromDiscord | <Elegantbeef> Did you `import tables` in the consuming module? |
22:27:12 | FromDiscord | <Elegantbeef> Well `import std/tables` |
22:30:53 | FromDiscord | <zirael137> of course |
22:31:06 | FromDiscord | <zirael137> I did |
22:33:12 | FromDiscord | <Elegantbeef> Well provide full code |
22:39:43 | * | Jhonny2x4 quit (Quit: Jhonny2x4) |
22:40:04 | * | Jhonny2x4 joined #nim |
22:42:10 | FromDiscord | <zirael137> In reply to @Elegantbeef "Well provide full code": Sure: https://media.discordapp.net/attachments/371759389889003532/1255291975377096765/ngrun.nim?ex=667c9941&is=667b47c1&hm=012a8309f022fd61c349c722c29951576b0e4738f94c813db538d5af3514f388& https://media.discordapp.net/attachments/371759389889003532/1255291975935197255/ttkbootstrap.nim?ex=667c9941&is=667b47c1&hm=10c5fb6893254b273738d40ed9bf81a5df2efd2ceb1abeb2880425c3830ef4a7& |
22:48:21 | FromDiscord | <Robyn [She/Her]> https://github.com/guzba/sunny/issues/10 😔 small issues |
22:48:49 | FromDiscord | <Robyn [She/Her]> I can work around it though easily |
22:59:55 | FromDiscord | <Elegantbeef> ngrun.nim does not import tables |
23:00:28 | FromDiscord | <Elegantbeef> Also stop including modules |
23:07:52 | FromDiscord | <zirael137> In reply to @Elegantbeef "Also stop including modules": I only included conatants, which is just a bunch of strings, is that a bad practice? |
23:08:03 | FromDiscord | <zirael137> (edit) "conatants," => "constants," |
23:08:06 | FromDiscord | <Elegantbeef> Yes there is no reason to include them |
23:08:44 | FromDiscord | <zirael137> What is the good scenario for including then? |
23:09:08 | FromDiscord | <Elegantbeef> Separating large files with per platform implementations |
23:09:11 | FromDiscord | <Elegantbeef> Pretty much never include |
23:09:48 | FromDiscord | <zirael137> understandable |
23:10:54 | FromDiscord | <Elegantbeef> You also can do `export tables` in your module that uses tables if you want to not force importing on using code |
23:11:03 | FromDiscord | <Elegantbeef> But I generally just explicitly import to reduce complexity of modules |