00:31:15 | * | skippy8 quit (Quit: WeeChat 4.5.2) |
00:36:16 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
01:35:02 | * | SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev) |
02:14:21 | * | rockcavera quit (Remote host closed the connection) |
02:34:00 | * | xet7 quit (Remote host closed the connection) |
03:15:53 | FromDiscord | <nervecenter> In reply to @jseb "i see `readBuffer` ": `readFile()` slurps a whole file in one go into a `string` |
03:16:32 | FromDiscord | <nervecenter> You can also use it at compile time, define a `const` with it and the string will be part of the compiled executable |
04:07:38 | * | SchweinDeBurg joined #nim |
05:48:09 | Amun-Ra | there's dedicated static_read for that |
06:58:56 | * | nils` quit (Ping timeout: 272 seconds) |
07:07:35 | * | andy-turner joined #nim |
07:49:49 | * | jjido joined #nim |
08:05:03 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
08:08:12 | * | nils` joined #nim |
08:31:24 | * | ntat joined #nim |
08:37:20 | FromDiscord | <jseb> thank you for the hints, my use case is json->data converter (a tool) so no static read for me |
08:50:50 | FromDiscord | <pmunch> Hmm, the times module should really have a MaxDateTime constant |
08:51:53 | FromDiscord | <pmunch> If you want to iterate over a series of DateTimes and get the highest and lowest. It would be handy to set the highest to the lowest possible value and the lowest to the highest possible value and then simply iterate |
09:03:51 | * | ntat quit (Quit: leaving) |
09:27:19 | FromDiscord | <jseb> i have been told above that json module can work with stream. I was thinking files could be opened as stream, but i see in the documentation types like Stream, FileStreamObj and no functions for opening files as streams … |
09:28:01 | FromDiscord | <lainlaylie> https://nim-lang.org/docs/streams.html#openFileStream,string,FileMode,int |
09:28:29 | FromDiscord | <lainlaylie> https://nim-lang.org/docs/streams.html#newFileStream,File |
09:28:32 | FromDiscord | <jseb> ah i wasn't at the good place, thank you |
09:40:10 | FromDiscord | <jseb> i have a more general question: streams seem to exist to process large files which chunks of treatment is one line long. But for JSON, isn't better to load the whole tree (aka the file) at once ? |
09:40:26 | FromDiscord | <jseb> (edit) "chunks" => "chunk" |
10:00:11 | FromDiscord | <griffith1deadly> beef, can traits have default procedures for cases when i don't need override it? |
10:11:42 | * | xtr00 quit (Read error: Connection reset by peer) |
10:18:07 | * | xtr00 joined #nim |
11:00:12 | FromDiscord | <lainlaylie> In reply to @jseb "i have a more": define "better". loading the whole file is problematic if the file is very large |
11:31:06 | * | kobi joined #nim |
11:31:09 | kobi | hi |
11:32:25 | FromDiscord | <dawidek.2137> if it's a valid json file then it probably has to be a single dictionary/array so there are no independent chunks |
11:40:10 | kobi | hi guys, i would like to share with you some progress and ask for advice. |
11:41:04 | kobi | i am looking to create a nice api for the android-for-nim project. i cannot promise or obligate myself, but i am researching the next step and impl challenges. |
11:41:40 | kobi | ... oh, are you guys sleeping? different timezones :-0 |
11:55:22 | FromDiscord | <jseb> In reply to @lainlaylie "define "better". loading the": For example, i need to read a key. With a stream, will the json module read lines until it has found the good key or should i iterate myself ? |
12:01:11 | FromDiscord | <lainlaylie> i don't understand your question. std/json.parseJson turns your string into a StringStream anyway. |
12:23:58 | FromDiscord | <jseb> if it's streamable, that means your file is loaded on demand (for example, line by line). So what if the part that has been already loaded doesn't contain data you want ? |
12:33:36 | * | ntat joined #nim |
12:37:36 | * | kobi quit (Quit: see you) |
12:55:00 | FromDiscord | <lainlaylie> std/json doesn't have the concept of "data you want", it parses the stream until it's done |
12:55:44 | * | andy-turner quit (Quit: Leaving) |
12:59:14 | FromDiscord | <lainlaylie> streaming from a file instead of loading the whole file contents beforehand just means we aren't uselessly holding onto data that we've already parsed / won't need until later |
13:02:41 | FromDiscord | <jseb> i see, anyway in my case it's a big data chunk with very little informations around (tiled export) |
14:37:00 | * | xtr00 quit (Read error: Connection reset by peer) |
14:42:43 | * | xtr00 joined #nim |
14:49:37 | FromDiscord | <litlighilit> possible to resolve a identifier (as symbol) in a untyped argument of a macro? |
14:59:45 | FromDiscord | <kapendev> In reply to @jseb "i see, anyway in": That is easy to load as is, if you can. |
15:07:55 | * | xtr00 quit (Read error: Connection reset by peer) |
15:12:42 | * | xtr00 joined #nim |
15:19:40 | * | kobi joined #nim |
15:23:45 | * | xtr00 quit (Read error: Connection reset by peer) |
15:28:12 | * | xtr00 joined #nim |
16:03:16 | * | kobi quit (Quit: Leaving) |
16:37:29 | * | SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev) |
17:27:21 | FromDiscord | <Elegantbeef> @griffith1deadly `proc doThing[T](a: T) = discard` |
17:37:47 | FromDiscord | <aintea> In reply to @litlighilit "possible to resolve a": do you have an example of what you want to do ? I'm not sure to understand |
17:40:45 | * | mahlon quit (Ping timeout: 260 seconds) |
17:40:46 | * | lucerne4 joined #nim |
17:41:23 | * | mahlon joined #nim |
17:42:02 | * | lucerne quit (Read error: Connection reset by peer) |
17:42:03 | * | lucerne4 is now known as lucerne |
17:42:42 | FromDiscord | <griffith1deadly> In reply to @Elegantbeef "<@620135501201932300> `proc doThing[T](a: T)": 💀 |
18:08:27 | * | jjido joined #nim |
18:31:17 | * | thunder joined #nim |
18:37:40 | * | PMunch_ joined #nim |
18:40:39 | * | PMunch__ quit (Ping timeout: 244 seconds) |
18:52:24 | * | PMunch__ joined #nim |
18:55:14 | * | PMunch_ quit (Ping timeout: 260 seconds) |
19:24:45 | * | NimBot joined #nim |
19:34:06 | * | thunder quit (Killed (NickServ (GHOST command used by metasintactic))) |
19:34:08 | * | metasintactic joined #nim |
19:53:35 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
20:35:23 | * | jjido joined #nim |
20:50:11 | * | ntat quit (Quit: leaving) |
21:26:27 | FromDiscord | <aethrvmn> nimlangserver started spawning infinite nimsuggest instances, is there any fix |
21:26:42 | FromDiscord | <aethrvmn> Or an open issue on GH, otherwise I might open one |
22:11:56 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
22:20:07 | * | PMunch_ joined #nim |
22:22:36 | * | PMunch__ quit (Ping timeout: 244 seconds) |
23:02:52 | * | thunder joined #nim |
23:06:12 | * | metasintactic quit (Ping timeout: 264 seconds) |
23:16:09 | FromDiscord | <threefour> I swear someone mentioned there was a way to limit the max nimsuggest processes not long ago |
23:18:15 | FromDiscord | <threefour> https://github.com/nim-lang/langserver?tab=readme-ov-file#configuration-options |
23:18:17 | FromDiscord | <threefour> Last bullet point |
23:26:51 | * | beholders_eye joined #nim |
23:38:29 | * | rockcavera joined #nim |
23:58:48 | * | beholders_eye quit (Ping timeout: 276 seconds) |