00:45:22 | FromDiscord | <lepot311> Can anyone point me to an example of using timers with sdl2 in Nim? |
00:46:45 | FromDiscord | <Elegantbeef> https://github.com/Vladar4/sdl2_nim/blob/bef9a610a6bf53fba4cca231631603a3679b5b98/examples/ex104_timers.nim#L116 |
01:52:16 | * | jkl quit (Quit: Gone.) |
01:53:11 | * | jkl joined #nim |
03:25:43 | * | krux02_ joined #nim |
03:25:48 | * | krux02 quit (Read error: Connection reset by peer) |
03:56:02 | * | HER_ is now known as HER |
04:20:46 | * | fallback quit (Ping timeout: 265 seconds) |
05:35:31 | * | fallback joined #nim |
06:27:57 | * | GreaseMonkey quit (Remote host closed the connection) |
06:28:23 | * | greaser|q joined #nim |
06:43:10 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=vQCeddGZ |
06:45:03 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=vYlXpVEK |
06:45:43 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=urfEYnUs |
06:47:48 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=jdsgWNDd |
06:48:01 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=ZNzeyxzz |
06:48:19 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=aHGPoFsX |
06:49:42 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=XsvKDJXC |
06:51:14 | FromDiscord | <odexine> it makes no sense to declare `result.rms` as a var? |
06:51:33 | FromDiscord | <odexine> just set it normally like `result.rms = getRemovedFiles(diffs)` outside of the var block |
06:52:21 | FromDiscord | <TFed> oh, yeah, i forgot that they are already defined |
06:57:42 | * | ntat joined #nim |
07:16:49 | * | greaser|q quit (Changing host) |
07:16:49 | * | greaser|q joined #nim |
07:38:56 | * | krux02_ quit (Remote host closed the connection) |
07:56:16 | * | marcus quit (Remote host closed the connection) |
07:58:27 | * | marcus joined #nim |
08:49:50 | * | Batzy_ joined #nim |
08:52:35 | * | Batzy quit (Ping timeout: 244 seconds) |
08:59:18 | * | coldfeet joined #nim |
09:51:33 | * | fallback quit (Remote host closed the connection) |
10:25:39 | * | ntat quit (Quit: Leaving) |
13:46:33 | * | logan__ joined #nim |
13:55:15 | * | coldfeet quit (Remote host closed the connection) |
14:16:34 | FromDiscord | <grumblygibson> Yaml in Nim: are there any good yaml libs for loading unknown yaml? I'm trying to load an arbitrary yaml file and crawl a few optional keys. The "streaming api" in NimYaml is cumbersome and I'm looking for something more like the experience of loading json. I've looked over the nimble directory, but probably missed something. |
14:56:14 | FromDiscord | <k0ts> https://nimyaml.org/api/yaml/dom.html ? |
15:24:25 | FromDiscord | <grumblygibson> In reply to @k0ts "https://nimyaml.org/api/yaml/dom.html ?": > You use this API by importing this module alongside loading...↵Seems like it has the same limitation that I need to load it using the YamlStream API, and write my own tree constructor? |
15:49:42 | FromDiscord | <enthus1ast.> 💩 yaml |
15:50:02 | FromDiscord | <enthus1ast.> jsonl ftw |
15:50:24 | FromDiscord | <enthus1ast.> Or maybe kdl but not sure yet 🙂 |
15:50:30 | * | ntat joined #nim |
15:52:10 | FromDiscord | <patitotective> i like kdl beause it's so easy to write, yaml seems like a mess... |
15:53:14 | FromDiscord | <k0ts> In reply to @grumblygibson "> You use this": The docs gave me the impression that nimyaml's load proc is akin to jsony's fromJson(string, typedesc) and is special-cased to give you a dynamic node tree in the case of YamlNode |
15:54:29 | FromDiscord | <enthus1ast.> In reply to @patitotective "i like kdl beause": Yeah I wanted something similar like nginx or Apache config but for general purpose for a long time |
15:55:19 | FromDiscord | <k0ts> https://github.com/flyx/NimYAML/blob/devel/test/tdom.nim |
15:56:09 | FromDiscord | <enthus1ast.> @patitotective do you plan to add a .to proc to your nim-kdl? |
15:56:28 | FromDiscord | <enthus1ast.> So simple nim object construction |
15:56:38 | FromDiscord | <patitotective> as in kdl node to nim object? |
15:56:43 | FromDiscord | <enthus1ast.> Yes |
15:57:18 | FromDiscord | <patitotective> https://patitotective.github.io/kdl-nim/kdl/decoder.html |
15:57:22 | FromDiscord | <enthus1ast.> Currently I use ini (nim sim) for all my config needs |
15:57:24 | FromDiscord | <enthus1ast.> Ah |
15:57:42 | FromDiscord | <enthus1ast.> In reply to @patitotective "https://patitotective.github.io/kdl-nim/kdl/decoder": Nice 👍 |
15:58:24 | FromDiscord | <enthus1ast.> Ahh even parse hooks! Very nice |
15:59:16 | FromDiscord | <patitotective> The docs may be outdated though, now that I take a look... |
16:06:10 | FromDiscord | <grumblygibson> In reply to @k0ts "https://github.com/flyx/NimYAML/blob/devel/test/tdo": 🙏 TY. `loadAs[YamlNode](input)` This was deep in the docs, but what your linked test tdom.nim showed. Perfect. |
16:11:19 | FromDiscord | <grumblygibson> Yeah, I don't have control over these files, otherwise I'd use something else, for sure. TOML is actually my fav. KDL looks great! |
16:15:13 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#pasty=WfKaQiBA |
16:16:07 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#pasty=lVWKGpVN |
16:20:08 | FromDiscord | <odexine> In reply to @patitotective "i like kdl beause": When it comes to data languages I don’t think I’ll ever use something else than CUE… |
16:22:07 | Amun-Ra | cue and bin? |
16:22:58 | FromDiscord | <patitotective> In reply to @odexine "When it comes to": never heard of it, gonna take a look |
16:26:37 | FromDiscord | <TFed> where is bodies of functions?↵(@ravinder387) |
16:27:16 | FromDiscord | <TFed> where is { bodies } of functions? they have to be defined |
16:27:22 | FromDiscord | <TFed> where is { the bodies } of functions? they have to be defined |
16:27:25 | FromDiscord | <ravinder387> gcc -I$HOME/.cache/nim/file_d -I$NIM_DIR/lib -I$HOME/.cache/nim/file_d/.c file.c i COMPile with nim |
16:28:35 | * | logan__ quit (Remote host closed the connection) |
16:33:04 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=kmuQVfzx |
16:34:05 | FromDiscord | <TFed> probably gcc didn't reached those files, because the god different names, idk just guessing... |
16:34:33 | FromDiscord | <TFed> 🤔 |
16:35:03 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=rtkkZHdv |
16:35:19 | FromDiscord | <TFed> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1307745586669158451): probably gcc didn't reached those files, because they god different names or something, idk just guessing... |
16:35:48 | FromDiscord | <TFed> sent a code paste, see https://play.nim-lang.org/#pasty=qWoaVWtM |
16:36:45 | FromDiscord | <TFed> or functions that were generated god another types or names, but idk how nims does in C |
16:36:48 | FromDiscord | <TFed> or functions that were generated god another types or names, but idk how nim does in C |
16:38:28 | FromDiscord | <ravinder387> In reply to @TFed "idk how nim converts": so nim generate add5 and nimmain with different name |
16:38:47 | FromDiscord | <ravinder387> In reply to @ravinder387 "so nim generate add5": how to avoid it |
16:55:36 | FromDiscord | <TFed> i think it's better to wait other people, that know more about this `Nim to C` topic |
16:55:44 | FromDiscord | <TFed> i think it's better to wait other people, that know more about this `Nim+C` topic |
16:57:10 | Amun-Ra | it's better to do the other way around, compile via nim |
17:07:19 | FromDiscord | <patitotective> does `sugar.collect` exist for arrays? |
17:08:19 | FromDiscord | <odexine> ? Collect is for arrays too |
17:08:21 | FromDiscord | <odexine> Oh |
17:08:24 | FromDiscord | <odexine> Misread |
17:08:34 | FromDiscord | <odexine> I get it, CT size arrays |
17:08:43 | FromDiscord | <odexine> I don’t think so |
17:09:51 | FromDiscord | <patitotective> i have this unicode points i want to store as const, but most of them are ranges so i wanted to do a for loop and collect them to an array because they are too big for sets |
17:09:56 | FromDiscord | <patitotective> (edit) "this" => "these" |
17:13:08 | FromDiscord | <solitudesf> In reply to @patitotective "i have these unicode": if its a const array, you could just wrap them in a proc that demotes collected sequence to array at ct. |
17:13:29 | FromDiscord | <patitotective> that's right, thanks |
17:15:31 | * | coldfeet joined #nim |
17:27:33 | * | tam joined #nim |
17:57:48 | * | zgasma_ joined #nim |
17:58:34 | * | zgasma_ quit (Client Quit) |
18:00:11 | * | zgasma_ joined #nim |
18:00:52 | * | zgasma_ quit (Client Quit) |
18:01:42 | FromDiscord | <emilywithoutorgans> hello |
18:01:55 | * | xet7 quit (Remote host closed the connection) |
18:18:37 | * | fallback joined #nim |
18:38:37 | FromDiscord | <nnsee> hello |
18:41:53 | FromDiscord | <demotomohiro> If you want to call procs in Nim from C, this tutorial might help: https://internet-of-tomohiro.pages.dev/nim/clibrary.en#c-library-tutorial-for-nimmer-create-static-library-from-nim-code-and-use-from-c-code↵If you dont know much about C lang: https://internet-of-tomohiro.pages.dev/nim/gccguide.en |
18:44:27 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=zVDBNnGG |
18:46:39 | * | krux02 joined #nim |
18:55:55 | * | coldfeet quit (Remote host closed the connection) |
19:11:32 | FromDiscord | <demotomohiro> In reply to @ravinder387 "it gives me error": `-I/path` just add the given directory to the list of include file search path. Just add .c file path to gcc command if you want gcc comples and links it. |
19:14:51 | * | coldfeet joined #nim |
19:29:50 | * | jkl quit (Quit: Gone.) |
19:31:33 | * | coldfeet quit (Remote host closed the connection) |
19:34:24 | * | jkl joined #nim |
20:17:34 | * | ntat quit (Quit: Leaving) |
20:34:15 | * | mahlon quit (Quit: PotatoTech) |
20:34:53 | * | mahlon joined #nim |
20:48:19 | * | tam left #nim (The Lounge - https://thelounge.chat) |
21:23:43 | * | xet7 joined #nim |
21:42:35 | * | lucasta joined #nim |
21:59:37 | * | Batzy_ is now known as Batzy |