<< 25-06-2024 >>

00:35:44*SchweinDeBurg joined #nim
01:00:50FromDiscord<__jont__> sent a code paste, see https://play.nim-lang.org/#pasty=hDMwbWTA
01:01:09FromDiscord<__jont__> (edit) "https://play.nim-lang.org/#pasty=DCdLAKze" => "https://play.nim-lang.org/#pasty=FVmxsGQF"
01:20:58FromDiscord<Elegantbeef> Did you use `sysPath`?
01:37:12FromDiscord<__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:30FromDiscord<Elegantbeef> Yes it's the system path for your clang compiler
01:58:27*SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev)
02:25:17FromDiscord<__jont__> Cool, issue of `stdint.h` solved... now `math.h`, lol. This seems to be slightly more challenging
02:26:26FromDiscord<__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:56FromDiscord<__jont__> Solved! Needed to add `{.passL:"-lm".}` at the top of my wrapper file.
02:47:50FromDiscord<Omi.> https://t.me/hamsTer_kombat_bot/start?startapp=kentId7487400216↵↵Earn dollars with this new bot
02:48:37FromDiscord<__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:59FromDiscord<Elegantbeef> Libclang is magical
03:42:38*SchweinDeBurg joined #nim
04:09:51FromDiscord<that_dude.> In reply to @Omi. "https://t.me/hamsTer_kombat_bot/start?startapp=kent": <@&371760044473319454>
04:12:35FromDiscord<basilajith> sent a code paste, see https://play.nim-lang.org/#pasty=vaxHBQsO
04:13:12FromDiscord<basilajith> Even if I don't escape the space character ' ', it throws the same error.
04:13:20FromDiscord<basilajith> It's a Postgres database.
04:17:29FromDiscord<leorize> you might want to try formatting it as ISO8601 stamps instead
04:19:18FromDiscord<basilajith> is there an iso() method?
04:19:23FromDiscord<basilajith> or toISO() method?
04:21:04FromDiscord<basilajith> Would this work?↵`"YYYY-MM-dd'T'HH:mm:ss'.'ffffffzzz"`
04:29:13FromDiscord<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:04FromDiscord<leorize> that should work↵(@basilajith)
04:42:03FromDiscord<leorize> you will want `yyyy` instead of `YYYY` though, since ISO year is 4 digits
04:43:48FromDiscord<leorize> though your problem might not be the time format
04:43:53FromDiscord<leorize> but rather your query
05:49:58FromDiscord<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:40FromDiscord<Robyn [She/Her]> Why is expression parsing such a pain in the ass
09:35:54FromDiscord<Clonkk> Parsing is hard
09:36:02FromDiscord<Clonkk> In general
09:36:37FromDiscord<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:11FromDiscord<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:41FromDiscord<Robyn [She/Her]> Yeahh
14:21:43FromDiscord<pmunch> I wonder how hard it would be to create a parser which just takes examples as input and creates something useful
14:33:02FromDiscord<albassort> @pmunch can you think of a package that depends on a c/rust lib
14:33:13FromDiscord<albassort> i need an example for how to integrate this into my code
14:33:19FromDiscord<albassort> (edit) "code" => "nimble"
14:33:57*une joined #nim
14:39:43FromDiscord<fabric.input_output> In reply to @albassort "<@392962235737047041> can you think": naylib?
14:42:05FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=gKFrZJqi
14:42:15FromDiscord<albassort> it just doesn't handle it
14:51:27FromDiscord<pmunch> In reply to @albassort "<@392962235737047041> can you think": What do you mean by c/rust?
14:52:06FromDiscord<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:23FromDiscord<albassort> then it'll link the output from the .nimble to /usr/lib and /usr/include
14:54:39FromDiscord<pmunch> So you have a project that requires a binary?
14:54:44FromDiscord<albassort> yes
14:55:03FromDiscord<albassort> its not in any package manager, obviously
15:11:43FromDiscord<albassort> I think I'll just embed a bash script in it
15:23:37FromDiscord<planetis_m> How's gonna run on windows?
15:29:20FromDiscord<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:51FromDiscord<planetis_m> In reply to @albassort "I think I'll just": Also what is that you make again?
15:35:08FromDiscord<albassort> In reply to @planetis_m "How's gonna run on": if windows: "windows is not supported
15:35:17FromDiscord<albassort> (edit) "supported" => "supported""
15:35:46FromDiscord<planetis_m> That's a solution. At least for a start
15:36:10FromDiscord<albassort> The issue being, I don't know anything about windows to actually implement dynamic linking
15:36:17FromDiscord<albassort> i do have a vm to test it in when im ready tho
15:36:46FromDiscord<albassort> In reply to @planetis_m "Also what is that": currently finishing work on a pgp library
15:45:35FromDiscord<saint.___.> Is https://github.com/treeform/globby still what I should use for globs in nim?
15:48:28FromDiscord<Robyn [She/Her]> In reply to @pmunch "I wonder how hard": So AI? :P
15:49:18FromDiscord<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:34NimEventerNew 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:38FromDiscord<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:12FromDiscord<threefour> Ah nevermind. It links to `std/winlean`, but I found `std/posix`.
17:09:01FromDiscord<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:04FromDiscord<albassort> im furiously gooling
17:09:07FromDiscord<albassort> (edit) "gooling" => "googling"
17:11:12FromDiscord<albassort> AHA, prompt
17:11:35FromDiscord<albassort> (edit) "AHA, prompt" => "prompt?"
17:21:15FromDiscord<Robyn [She/Her]> In reply to @albassort "maybe. Do you know": Something with nimble tasks might help
17:27:04NimEventerNew 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:31NimEventerNew 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:16FromDiscord<Robyn [She/Her]> Anyone know how I'd get jsony to convert camelCase to snake_case?
19:13:23FromDiscord<Robyn [She/Her]> When dumping
19:13:44FromDiscord<Robyn [She/Her]> Do I need to write a custom dump hook? Because I really hope not
19:15:26FromDiscord<Robyn [She/Her]> Might just use `sunny`, seems to fit what I need better and easier
19:22:23FromDiscord<saint.___.> In reply to @chronos.vitaqua "Anyone know how I'd": Is this a standard json dumping thing?
19:22:26FromDiscord<saint.___.> Seems pretty custom
19:22:45FromDiscord<saint.___.> Don't think I've seen seen any other json libraries support that
19:23:32FromDiscord<Robyn [She/Her]> In reply to @saint.___. "Is this a standard": No idea what you mean :P
19:23:42FromDiscord<melmass> It's pretty common
19:24:00FromDiscord<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:03FromDiscord<melmass> field renaming for serializing/deserializing
19:24:08FromDiscord<Robyn [She/Her]> Yeah
19:24:20FromDiscord<Robyn [She/Her]> Jsony doesn't seem to have a simple way to do it for dumping
19:27:03FromDiscord<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:07FromDiscord<melmass> <https://serde.rs/field-attrs.html>
19:27:08*rockcavera joined #nim
19:34:19FromDiscord<saint.___.> In reply to @melmass "In rust serde it's": Gotcha
19:34:27FromDiscord<saint.___.> But I mean like snake to camell
19:35:04FromDiscord<melmass> In reply to @saint.___. "Gotcha": There is a special attribute for that 😅
19:35:05FromDiscord<melmass> https://serde.rs/attr-rename.html
19:35:26FromDiscord<saint.___.> Nice
19:35:29FromDiscord<melmass> but serde is a bad example it's probably one of the most feature complete
20:21:57FromDiscord<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:39FromDiscord<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:42FromDiscord<Robyn [She/Her]> Anyway
20:23:12FromDiscord<sebastian_solace> ohh ok
20:43:59FromDiscord<.bobbbob> sent a code paste, see https://play.nim-lang.org/#pasty=qUbpbatn
20:45:45FromDiscord<.bobbbob> nvmd it's UncheckedArray right?
21:21:11*ntat quit (Quit: Leaving)
22:22:07FromDiscord<zirael137> sent a code paste, see https://play.nim-lang.org/#pasty=ynBrRVNK
22:23:19FromDiscord<zirael137> sent a code paste, see https://play.nim-lang.org/#pasty=DHEOVdfh
22:23:30FromDiscord<zirael137> And I've no idea what is wrong
22:23:32FromDiscord<z1r343l2> \:o
22:26:52FromDiscord<Elegantbeef> Did you `import tables` in the consuming module?
22:27:12FromDiscord<Elegantbeef> Well `import std/tables`
22:30:53FromDiscord<zirael137> of course
22:31:06FromDiscord<zirael137> I did
22:33:12FromDiscord<Elegantbeef> Well provide full code
22:39:43*Jhonny2x4 quit (Quit: Jhonny2x4)
22:40:04*Jhonny2x4 joined #nim
22:42:10FromDiscord<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:21FromDiscord<Robyn [She/Her]> https://github.com/guzba/sunny/issues/10 😔 small issues
22:48:49FromDiscord<Robyn [She/Her]> I can work around it though easily
22:59:55FromDiscord<Elegantbeef> ngrun.nim does not import tables
23:00:28FromDiscord<Elegantbeef> Also stop including modules
23:07:52FromDiscord<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:03FromDiscord<zirael137> (edit) "conatants," => "constants,"
23:08:06FromDiscord<Elegantbeef> Yes there is no reason to include them
23:08:44FromDiscord<zirael137> What is the good scenario for including then?
23:09:08FromDiscord<Elegantbeef> Separating large files with per platform implementations
23:09:11FromDiscord<Elegantbeef> Pretty much never include
23:09:48FromDiscord<zirael137> understandable
23:10:54FromDiscord<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:03FromDiscord<Elegantbeef> But I generally just explicitly import to reduce complexity of modules