00:19:30 | FromDiscord | <carrocho> @demotomohiro How can I get the time in milliseconds as an int value? |
00:39:08 | FromDiscord | <demotomohiro> In reply to @carrocho "<@288750616510201856> How can I": https://nim-lang.org/docs/times.html↵https://nim-lang.org/docs/monotimes.html |
00:42:44 | * | beholders_eye quit (Quit: WeeChat 4.1.2) |
01:31:07 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=TZSuFRcb |
01:32:10 | FromDiscord | <Elegantbeef> Remove return and it'll suddenly work |
01:32:54 | FromDiscord | <user2m> In reply to @Elegantbeef "Remove return and it'll": genius |
01:52:19 | FromDiscord | <carrocho> In reply to @demotomohiro "https://nim-lang.org/docs/times.html https://nim-la": ty bro |
02:08:04 | FromDiscord | <carrocho> @demotomohiro We managed to finish the code, thank you for the support. Are you a Nim dev? |
02:09:53 | FromDiscord | <haniel.> acabamos |
02:14:42 | FromDiscord | <haniel.> ty @demotomohiro we got it |
02:31:41 | * | rockcavera quit (Remote host closed the connection) |
02:55:32 | FromDiscord | <elykpha> is there currently some cross-platform wrapper of system apis for gui? |
03:32:12 | ehmry | xtrayambak: I think you a right, it may be mostly a matter of the libc aligning properly |
03:46:16 | * | ensyde joined #nim |
04:17:21 | FromDiscord | <demotomohiro> In reply to @carrocho "<@288750616510201856> We managed to": No, I'm Nim user. |
04:19:05 | FromDiscord | <carrocho> In reply to @demotomohiro "No, I'm Nim user.": The best nim user 🙏 |
04:19:50 | FromDiscord | <demotomohiro> In reply to @carrocho "The best nim user": There are many Nim users better than me. |
04:21:13 | FromDiscord | <carrocho> In reply to @demotomohiro "There are many Nim": For me, you're the best |
04:21:20 | FromDiscord | <carrocho> Where are you from? |
04:22:08 | FromDiscord | <demotomohiro> In reply to @carrocho "For me, you're the": Thank you! Im from Japan. |
04:22:34 | * | ensyde quit (Ping timeout: 252 seconds) |
04:24:57 | FromDiscord | <carrocho> In reply to @demotomohiro "Thank you! Im from": I like Japan, I would like to go on a trip there |
04:25:13 | FromDiscord | <carrocho> Did you built this website? https://internet-of-tomohiro.pages.dev/nim/faq.en#community-how-to-post-nim-code-with-syntax-highlight-on-discordqmark |
04:26:08 | FromDiscord | <demotomohiro> In reply to @carrocho "I like Japan, I": Yes |
04:27:01 | FromDiscord | <carrocho> In reply to @demotomohiro "Yes": Wrong message I guess, haha |
04:27:32 | FromDiscord | <carrocho> But that's insane |
04:28:00 | FromDiscord | <carrocho> You're the goat |
04:34:31 | * | SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev) |
04:38:58 | * | SchweinDeBurg joined #nim |
04:45:38 | * | mal`` quit (Quit: Leaving) |
05:06:45 | * | mal`` joined #nim |
05:38:19 | * | xet7 quit (Quit: Leaving) |
05:56:05 | * | xutaxkamay quit (Ping timeout: 248 seconds) |
05:57:42 | * | xutaxkamay joined #nim |
07:26:41 | FromDiscord | <michael.lenz.> Vscode says nimlangserver version 1.8.1 available, but reinstall does not help. 1.8.0 been installed again |
07:26:57 | FromDiscord | <michael.lenz.> Do you have the same? |
10:17:52 | * | beholders_eye joined #nim |
13:14:51 | FromDiscord | <spotlightkid> @michael.lenz.\: `nimble install nimlangserver` install version 1.8.1 here (Manjaro Linux, Nim 2.2.0 from choosenim) |
13:14:58 | FromDiscord | <spotlightkid> @michael.lenz.\: `nimble install nimlangserver` installs version 1.8.1 here (Manjaro Linux, Nim 2.2.0 from choosenim) |
13:56:14 | * | Guest41 joined #nim |
13:57:33 | * | Guest41 quit (Client Quit) |
14:14:07 | FromDiscord | <Techy> I was wondering what you all are using to develop Nim. I have been running into an issue where it seems like the LSP doesn't acknowledge imported libraries. I will admit that I have been using NeoVim with `nim_langserver` so that could easily be the issue. |
14:15:54 | FromDiscord | <nnsee> I've had that issue too, both with nvim and vscode. Generally, a restart of the LSP has fixed it |
14:16:35 | FromDiscord | <Techy> Thank you, I will give that a shot and see where that gets me. |
14:21:08 | FromDiscord | <Techy> It seems like once I edit the file I have the restart the LSP each time, otherwise it marks a bunch of lines with errors, even though it compiles and runs file; is that the case for you too? |
14:21:46 | FromDiscord | <nnsee> just for regular edits? No, that doesn't happen for me, it's mostly been an issue with imports specifically |
14:22:58 | FromDiscord | <nnsee> to be clear, you're using https://github.com/nim-lang/langserver, right? |
14:23:01 | FromDiscord | <Techy> I think it stems from the imports for me too - I am trying to import either `balls` or `unittest` so that I can write some tests using something simpler than `testament`. |
14:23:07 | FromDiscord | <nnsee> and you've updated the langserver recently? |
14:23:38 | FromDiscord | <nnsee> it's worth filing a bug report in that repo if so, they're currently working on improving the tooling specifically and bug reports like these help |
14:25:10 | FromDiscord | <Techy> Yes, that is what I am using, but I just checked for an update and there is one, so I will see if that helps me. |
14:25:31 | FromDiscord | <Techy> If not I will gather what info I can and pass it over to them. |
14:25:39 | FromDiscord | <Techy> Thank you |
14:30:06 | FromDiscord | <firasuke> sent a code paste, see https://play.nim-lang.org/#pasty=TUCMFrGN |
14:32:57 | FromDiscord | <firasuke> sent a code paste, see https://play.nim-lang.org/#pasty=SjJUudJx |
14:35:00 | FromDiscord | <Techy> When I first open the file it looks fine, but if add a blank line, then delete, and then exit insert mode it it goes crazy. |
14:35:06 | FromDiscord | <Techy> After Edit.png https://media.discordapp.net/attachments/371759389889003532/1333807569738666066/After_Edit.png?ex=679a3c99&is=6798eb19&hm=ec06764282301f9a6418223d4fe70ad8732d2d9f9f9774dbff247de42916b448& |
14:35:07 | FromDiscord | <Techy> Initially.png https://media.discordapp.net/attachments/371759389889003532/1333807575845568593/Initially.png?ex=679a3c9b&is=6798eb1b&hm=28307e4b9b0a9735296b3c35a4e00a4a491045902642062dd110d8914a594740& |
14:35:27 | FromDiscord | <Techy> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1333807544522768485): When I first open the file it looks fine, but if I add a blank line, then delete the blank line, and then exit insert mode it it goes crazy. |
14:35:50 | FromDiscord | <Techy> The same thing happens when I import unittest. |
14:36:06 | FromDiscord | <Techy> But when I look at my logs I can see the LSP is crashing or something, so I need to look at my config. |
14:38:21 | FromDiscord | <Techy> image.png https://media.discordapp.net/attachments/371759389889003532/1333808388429185044/image.png?ex=679a3d5c&is=6798ebdc&hm=1ebad7e725b87932de7747f0b328e89d1de11a866a4a7973f89f97b1e68758b1& |
14:49:38 | FromDiscord | <lainlaylie> sent a code paste, see https://play.nim-lang.org/#pasty=FcTlogKq |
14:50:11 | FromDiscord | <lainlaylie> sent a code paste, see https://play.nim-lang.org/#pasty=gtpoFCiK |
14:50:46 | FromDiscord | <firasuke> In reply to @lainlaylie "for reference, the error:": yup this is the error |
14:51:19 | FromDiscord | <firasuke> I know this is asking too much from the parser, but is this an issue? |
14:52:41 | FromDiscord | <lainlaylie> i guess technically not, since↵> Within a curly expression, however, {, }, must be escaped with a backslash. |
14:53:06 | FromDiscord | <lainlaylie> sent a code paste, see https://play.nim-lang.org/#pasty=BfJYiCDw |
14:59:02 | FromDiscord | <Techy> Yeah, I don't really have anything special in my config. When digging through the logs with debugging turned on I saw that I am getting a `SIGSEGV: Illegal storage access.` error, so I moved the files to my local drive to see if that was the problem, but it wasn't. This sounds like a bug of sorts. |
14:59:18 | FromDiscord | <Techy> Thank you for the help |
15:00:11 | FromDiscord | <nnsee> for future reference, SIGSEGV generally means memory access issues, not anything to do with hard disks |
15:01:07 | FromDiscord | <nnsee> (and this is definitely something that shouldn't happen & a bug in the langserver) |
15:02:30 | FromDiscord | <tauruuuuuus> Quick style question |
15:06:49 | FromDiscord | <tauruuuuuus> sent a code paste, see https://play.nim-lang.org/#pasty=VWnmpdTL |
15:07:39 | FromDiscord | <tauruuuuuus> (edit) "https://play.nim-lang.org/#pasty=AjEZaiUb" => "https://play.nim-lang.org/#pasty=eabESyEk" |
15:07:50 | FromDiscord | <tauruuuuuus> (edit) "https://play.nim-lang.org/#pasty=hlZMEilC" => "https://play.nim-lang.org/#pasty=QQUSEnWw" |
15:10:25 | FromDiscord | <nnsee> maybe not the most "common" approach, but i would personally take a look at https://github.com/arnetheduck/nim-results - maybe this is what you're looking for |
15:10:35 | FromDiscord | <nnsee> out of curiosity, why are you unable to use exceptions? |
15:11:33 | FromDiscord | <tauruuuuuus> I'm on an 8bit MCU, I need to keep it as lean as possible, and I would have to implement a bit of infrastructure for exceptions |
15:11:45 | FromDiscord | <tauruuuuuus> In reply to @nnsee "maybe not the most": I'll take a look, ty! |
15:11:56 | FromDiscord | <nnsee> then I would personally use the C pattern as you described |
15:12:22 | FromDiscord | <nnsee> `nim-results` should also be relatively lean, but the C pattern is certainly more lean |
15:17:32 | FromDiscord | <tauruuuuuus> sent a code paste, see https://play.nim-lang.org/#pasty=UShoEDjK |
15:17:41 | FromDiscord | <tauruuuuuus> I never got `var` vs `out` here |
15:19:39 | FromDiscord | <nnsee> either that, or return a tuple (ret, err), where err could be an enum indicating the type of error (or a bitset for multiple errors) |
15:20:07 | FromDiscord | <nnsee> i don't rightly know what the best practice here is, or if there even is one and if it just isn't a case of "use whatever you're comfortable with, but at least be consistent" |
15:25:07 | FromDiscord | <lainlaylie> i think it should be var not out here, because in the error case your proc returns without having written to `ret` |
15:28:54 | FromDiscord | <firasuke> In reply to @lainlaylie "i guess technically not,": oh ok cool, thanks |
16:00:48 | FromDiscord | <michael.lenz.> In reply to @spotlightkid "<@812260016890576936>\: `nimble install nimlangserv": Weird, I still get 1.8.0 |
16:03:32 | FromDiscord | <michael.lenz.> Guys, httpClient has timeout parameter, but! It doesn’t have connect timeout option. At least I can’t find anything in manual. Is there any possibility to set connect timeout? |
16:04:49 | FromDiscord | <michael.lenz.> Second what I wasn’t able to find, is how to have status code when performing postContent |
16:05:23 | FromDiscord | <michael.lenz.> Where it could store the respons code? |
16:06:35 | FromDiscord | <lainlaylie> https://nim-lang.org/docs/httpclient.html#post%2CHttpClient%2C%2Cstring%2CMultipartData |
16:07:27 | FromDiscord | <michael.lenz.> In reply to @lainlaylie "https://nim-lang.org/docs/httpclient.html#post%2CHt": Post returns object, then it’s not possible to have content |
16:08:14 | FromDiscord | <michael.lenz.> Response does not have the actual content the server returns, and I need to have it |
16:08:22 | FromDiscord | <lainlaylie> https://nim-lang.org/docs/httpclient.html#body%2CResponse |
16:08:35 | FromDiscord | <lainlaylie> this is what postContent does anyway |
16:08:59 | FromDiscord | <michael.lenz.> Hmm |
16:09:03 | FromDiscord | <michael.lenz.> Let me try |
16:09:54 | FromDiscord | <michael.lenz.> And how to read from that stream? Using network stream procs from std/net? |
16:10:31 | FromDiscord | <lainlaylie> its just a regular Stream, you can readAll it, which is what the postContent and body procs do for you |
16:10:53 | FromDiscord | <michael.lenz.> Thanks I will try |
16:11:36 | FromDiscord | <michael.lenz.> Connect timeout actually is a thing. Probably there’s no such option |
16:24:31 | FromDiscord | <michael.lenz.> In reply to @lainlaylie "https://nim-lang.org/docs/httpclient.html#post%2CHt": Awesome, this not needs readAll(), body already is a string. Thanks |
16:35:07 | FromDiscord | <michael.lenz.> Yes, no connet timeout anywhere in the source |
17:17:21 | * | coldfeet joined #nim |
17:51:12 | * | end quit (Ping timeout: 246 seconds) |
17:52:37 | * | bcksl quit (Ping timeout: 265 seconds) |
18:13:53 | * | bcksl joined #nim |
18:16:21 | * | end joined #nim |
18:23:59 | FromDiscord | <tauruuuuuus> In reply to @lainlaylie "i think it should": thanks for the clarification! |
19:01:04 | * | khazakar quit (Ping timeout: 260 seconds) |
19:01:39 | * | kasimir_ quit (Ping timeout: 260 seconds) |
19:02:15 | * | GreaseMonkey quit (Ping timeout: 260 seconds) |
19:02:35 | * | greaser|q joined #nim |
19:03:37 | * | kasimir_ joined #nim |
19:03:51 | * | khazakar joined #nim |
19:04:48 | * | greaser|q quit (Changing host) |
19:04:48 | * | greaser|q joined #nim |
19:04:55 | * | greaser|q is now known as GreaseMonkey |
19:14:53 | FromDiscord | <demotomohiro> In reply to @tauruuuuuus "I'm on an 8bit": Using exceptions might make code size smaller than using return value: https://forum.nim-lang.org/t/12549↵But it doesn't seem make code smaller for small code as using cpp exception adds some runtime code. |
19:21:55 | FromDiscord | <spotlightkid> sent a long message, see https://pasty.ee/wxWbaqhO |
19:33:36 | FromDiscord | <Elegantbeef> Would a rest api work aswell? Would be less tedious |
19:45:36 | strogon14 | no, the server will sent updates often. |
19:46:51 | FromDiscord | <spotlightkid> also, there may be several web interfaces being used at the same time. |
19:47:09 | FromDiscord | <michael.lenz.> Web audio player? |
19:48:49 | FromDiscord | <spotlightkid> no, the audio will be played by the server app. it's supposed to be a kind of backing track player for musicians. |
19:52:23 | FromDiscord | <tauruuuuuus> In reply to @demotomohiro "Using exceptions might make": But I do have to implement something else I think (maybe via `panicoverride.nim`?), and also I would like to not allocate if possible |
19:54:34 | FromDiscord | <michael.lenz.> In reply to @spotlightkid "no, the audio will": Ah, ok! Then you can have just regular html with buttons that post the commands to the server |
19:56:42 | FromDiscord | <spotlightkid> Yeah, and a few event handlers to receive updates (title, play counter, etc.) from the server and insert the data into the DOM. |
19:58:21 | FromDiscord | <michael.lenz.> Something like that. Depends on how many commands and parameters you need. |
19:59:34 | FromDiscord | <michael.lenz.> I would just use the cgi for this, a lot simpler than dealing with json |
20:01:00 | FromDiscord | <michael.lenz.> Cgi app will interact with the audio server and pass the commands sent from the browser |
20:04:35 | FromDiscord | <michael.lenz.> Passing commands may be done using mmaped ram for example, and if there’s not a lot parameters, with use of a signals, like next track, previous track |
20:04:47 | FromDiscord | <spotlightkid> Cgi? You mean like 1990's Perl scripts? |
20:06:01 | FromDiscord | <spotlightkid> implementing two kinds of IPC seems redundant to me. Why not use websockets as the IPC mechanism in the first place? |
20:06:41 | FromDiscord | <michael.lenz.> I never used web sockets previously, dunno how difficult it is |
20:07:12 | FromDiscord | <nnsee> i think websockets is a perfect fit for this |
20:08:20 | FromDiscord | <nnsee> i've used the status-im websocket library with great success before |
20:08:29 | FromDiscord | <nnsee> wasn't very difficult at all |
20:08:53 | FromDiscord | <spotlightkid> Would that mean using chronos? |
20:09:04 | FromDiscord | <nnsee> yup |
20:10:53 | FromDiscord | <nnsee> i would probably use chronos over asyncdispatch regardless, after having been burnt by the latter |
20:42:45 | * | coldfeet quit (Quit: Lost terminal) |
21:17:25 | * | rockcavera joined #nim |
21:49:54 | FromDiscord | <demotomohiro> sent a long message, see https://pasty.ee/YrGAIWzG |
22:51:46 | * | pqflx3 joined #nim |
23:25:10 | * | beholders_eye quit (Ping timeout: 252 seconds) |