00:11:11 | FromDiscord | <Elegantbeef> Though I have not tested your project |
00:11:16 | FromDiscord | <Elegantbeef> So I'll give that a whirl |
00:14:31 | FromDiscord | <Elegantbeef> Yea Kate properly manages to close the nimsuggest and nimlanguageserver |
00:17:28 | arkanoid | well the issue happens to me even with helloworld |
00:17:32 | FromDiscord | <Elegantbeef> Though it also does not use the project mappings that you have for the .vscode |
00:18:06 | arkanoid | why should kate read vscode specific settings.json? |
00:18:09 | FromDiscord | <Elegantbeef> Ah then yea I have no issues with it in Kate so points to Vscode/extension management |
00:18:20 | FromDiscord | <Elegantbeef> It shouldn't I was just saying it was not using it |
00:18:36 | FromDiscord | <Elegantbeef> As it could've been a possible concerning difference |
00:18:55 | arkanoid | I'd guess there's a specific settings for kate to decide which file is the root of your nim project |
00:19:14 | FromDiscord | <Elegantbeef> Nope it'd be done by nimlangserver and there is not that functionality |
00:19:43 | arkanoid | well nimlangserver relies on .nimble file |
00:19:55 | arkanoid | and fallsback to whatever |
00:20:04 | arkanoid | (open one for each file) |
00:20:05 | FromDiscord | <Elegantbeef> Right but you have two entries and there is no way to set that up with Kate afaict |
00:20:16 | FromDiscord | <Elegantbeef> But I did open each file and there were 2 nimsuggest instances |
00:20:55 | arkanoid | yeah but speaking of that specific problem, there is no use of that "minimal twin root project". Just a single hello.nim with an echo causes it |
00:21:40 | FromDiscord | <Elegantbeef> Yep which does not happen over here with choosenim + nimlangserver |
00:21:49 | FromDiscord | <Elegantbeef> So the extension + choosenim seems to be the issue |
00:22:25 | FromDiscord | <Elegantbeef> Though maybe kate kills programs that were started inside of it at the end |
00:22:47 | arkanoid | may I share this feedback into the github issue? Do you want to do that yourself? It may help nickysn tackle the issue |
00:23:28 | arkanoid | yes that's also possible |
00:23:54 | FromDiscord | <Elegantbeef> Yea I don't know if it's a worthwhile addendum if you feel it's worth noting go ahead |
00:40:24 | arkanoid | sure, thanks. I'll let maintainer decide if it's worth or not. I think it is as surely the vscode extention IS killing something, as one nimsuggest process goes zombie, but the other survives |
00:44:19 | arkanoid | Elegantbeef: if you open multiple nim files in kate, and then close all them but not close the editor completely, does the editor kill nimlangserver/nimsuggest? |
00:44:42 | FromDiscord | <Elegantbeef> Multiple nim files in a single project or across projects? |
00:46:14 | FromDiscord | <Elegantbeef> Across multiple projects the suggests stay alive |
00:47:26 | FromDiscord | <Robyn [She/Her]> In reply to @arkanoid "user nickysn on github": Oh my god, that's such a simple fix- |
00:47:54 | FromDiscord | <Elegantbeef> One instance of nimlangserver is all that's spawned for multiple projects with instances of nimsuggest, if I then restart the LSP it closes all instances of nimsuggest |
01:08:53 | * | ehmry quit (Ping timeout: 256 seconds) |
01:09:30 | FromDiscord | <MDuardo> This happens in Helix↵Neovim works fine↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>) |
01:28:51 | NimEventer | New thread by MisterDrgn: Slow image processing with pixie, see https://forum.nim-lang.org/t/11120 |
03:11:39 | * | rockcavera is now known as Guest398 |
03:11:39 | * | tiorock joined #nim |
03:11:39 | * | Guest398 quit (Killed (calcium.libera.chat (Nickname regained by services))) |
03:11:40 | * | tiorock is now known as rockcavera |
03:13:46 | FromDiscord | <Robyn [She/Her]> I wonder how hard it'd be to create a library for use with cps and asyncdispatch at the same time |
03:14:03 | FromDiscord | <Robyn [She/Her]> Specifically an API wrapper |
03:14:38 | * | krux02 quit (Remote host closed the connection) |
04:04:43 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#pasty=MKwNzftCGmSs |
04:42:49 | * | rockcavera quit (Read error: Connection reset by peer) |
04:43:08 | * | rockcavera joined #nim |
04:43:08 | * | rockcavera quit (Changing host) |
04:43:08 | * | rockcavera joined #nim |
05:24:18 | * | azimut quit (Ping timeout: 260 seconds) |
06:23:13 | * | ntat joined #nim |
06:38:32 | * | advesperacit joined #nim |
07:05:07 | termer | Robyn What would your library do |
07:05:32 | termer | If it's based on events or streams, you'd have to make an interface that has nothing to do with any particular concurrency model |
07:06:10 | termer | For my HTTP parser, I exposed procs to read and write from parser and request builder that give buffer pointers and lengths |
07:06:17 | termer | You can choose to populate and read those in any way you want |
07:06:33 | termer | That's for a streaming interface |
07:06:48 | termer | Other things it would depend, but you can bet on callbacks if it's event-based |
08:02:24 | FromDiscord | <Robyn [She/Her]> In reply to @termer "Robyn What would your": Probably another Discord API wrapper |
08:07:21 | FromDiscord | <that_dude.> https://nim-lang.org/docs/parseopt.html#parsing↵The second code example is bugged. The source looks fine to me though |
08:11:35 | FromDiscord | <odexine> Where’s the big? |
08:11:38 | FromDiscord | <odexine> Bug |
08:11:55 | FromDiscord | <Elegantbeef> The biggest insect is the weta in new zealand |
08:11:56 | FromDiscord | <odexine> Oh you mean as in the block |
08:33:18 | FromDiscord | <that_dude.> Sorry I wasn't very clear on that. |
08:33:25 | FromDiscord | <that_dude.> (edit) "Sorry" => "Sorry," |
08:33:33 | termer | Robyn That sounds like a pain in the ass |
08:33:46 | termer | lots of callbacks |
08:48:15 | * | Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
08:48:37 | * | Batzy joined #nim |
08:51:30 | FromDiscord | <Robyn [She/Her]> In reply to @termer "lots of callbacks": Yep |
08:51:54 | termer | isn't there arleady a working Discord wrapper anyway |
08:53:46 | FromDiscord | <Robyn [She/Her]> There is but it specifically uses asyncdispatch |
08:57:30 | termer | take it and rewrite the IO parts with sys |
08:58:01 | termer | Keep in mind that you'd also have to write an HTTP client too |
08:58:14 | termer | I'll work on an HTTP client soon once I have the server part of methttp solid |
08:58:22 | FromDiscord | <Robyn [She/Her]> In reply to @termer "Keep in mind that": Yeah I'm awate |
08:58:26 | FromDiscord | <Robyn [She/Her]> Mehttp? |
08:58:32 | termer | https://github.com/termermc/methttp |
08:58:34 | FromDiscord | <Robyn [She/Her]> (edit) "awate" => "aware" |
08:58:52 | termer | methttp is my HTTP library |
08:58:58 | termer | it's IO agnostic |
08:59:17 | FromDiscord | <Robyn [She/Her]> In reply to @termer "take it and rewrite": I was planning on using Discord's OpenAPI spec to make maintenance less tedious |
08:59:21 | termer | so far it supports request parsing and response composition |
08:59:30 | termer | Using the OpenAPI spec would be fine |
09:06:20 | FromDiscord | <JJ> In reply to @termer "https://github.com/termermc/methttp": woah, wait, what is this |
09:06:50 | FromDiscord | <JJ> how are you statically allocating memory for parsing unknown http requests? |
09:13:17 | * | rockcavera quit (Remote host closed the connection) |
09:16:08 | * | Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
09:17:23 | * | Batzy joined #nim |
09:18:13 | * | ntat quit (Quit: Leaving) |
09:21:21 | * | Batzy_ joined #nim |
09:24:53 | * | Batzy quit (Ping timeout: 272 seconds) |
09:29:17 | * | Batzy_ is now known as Batzy |
09:36:25 | termer | Max size |
09:36:36 | termer | you define your buffer size and reject requests whose headers exceed it |
09:36:57 | termer | It can be wasteful, but in practice, it's much faster than dynamically allocating memory and headers aren't that big anyway |
09:37:55 | termer | The way the parser works is it streams in request chunks and figures out where headers begin and end |
09:38:44 | termer | When you ask for the headers, it returns a pointers and lengths of the header keys and values |
09:38:48 | termer | same for URI, method, etc |
09:39:01 | termer | those all exist in the statically allocated request buffer |
09:39:21 | termer | The parser internally keeps the length of the buffer content |
09:39:32 | termer | So it's basically like a preallocated string |
09:39:59 | termer | same way newStringOfCap works, but with a fixed-size capacity |
09:40:57 | termer | JJ https://github.com/termermc/methttp/blob/master/src/http_request.nim#L50 |
09:41:57 | * | ehmry joined #nim |
09:42:06 | FromDiscord | <Elegantbeef> Heh I just seen the enum |
09:42:14 | termer | inb4 uint8 |
09:42:33 | FromDiscord | <Elegantbeef> The entire right hand side of those are pointless |
09:42:54 | termer | 0.uint8 is strictly necessary to make me feel safe |
09:43:13 | termer | How else am I supposed to make it blazingly efficient |
09:43:48 | FromDiscord | <kyrence_> I'd recommend you contact ➡️[ #Support Channel](https://\@dsc.gg/chatrealtime/) |
09:44:04 | FromDiscord | <kyrence_> In reply to @termer "How else am I": termer[IRC |
09:44:30 | FromDiscord | <Elegantbeef> Why does it make you safer than `0`? |
09:44:30 | FromDiscord | <Elegantbeef> `type MyEnum = enum A = 0u8, B = 10000` is valid |
09:44:57 | termer | How do I force it to be 8 bit |
09:45:11 | FromDiscord | <Elegantbeef> `static: assert sizeof(MyEnum) == 1` |
09:45:36 | FromDiscord | <kyrence_> In reply to @termer "How do I force": I'd recommend you contact ➡️[ #Support Channel](https://\@dsc.gg/chatrealtime/) |
09:45:56 | FromDiscord | <nnsee> <@&371760044473319454> |
09:46:09 | FromDiscord | <Elegantbeef> There is also`{.size: 1.}` |
09:46:26 | FromDiscord | <Elegantbeef> The size pragma is mainly for interop |
09:46:46 | termer | I want everything small so I'll use that |
09:46:53 | FromDiscord | <Phil> In reply to @kyrence_ "termer[IRC": You have 60 seconds to justify link spam or you'll get banned. |
09:47:26 | FromDiscord | <Elegantbeef> Heh termer the size pragma does not do any checking |
09:47:39 | termer | what the fuck |
09:47:59 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#pasty=UAUQCpvZsPBr |
09:48:39 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#pasty=mNZvJwuTYjsW ah here's what I wanted |
09:48:45 | FromDiscord | <Elegantbeef> Removing code folding shows the issue |
09:48:58 | FromDiscord | <Elegantbeef> Whilst the size is 1 there is no assurance your values don't go out of it, so just use the static assert |
09:49:27 | FromDiscord | <Elegantbeef> If you want to be more helpful you can do a `when sizeof(MyType) > 1: {.error: "Dummy you added an enum outside of 8 bits".}` |
09:49:44 | FromDiscord | <Elegantbeef> Why feel safe when you can actually just be safe |
09:52:21 | termer | Because I don't know every single Nim feature inside out like you inexplicably do |
09:52:55 | FromDiscord | <Elegantbeef> Hey I didnt know the compiler optimised chained string concatenation and even got egg on my face |
09:52:55 | * | Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
09:53:05 | termer | I actually did know that |
09:53:45 | FromDiscord | <Elegantbeef> I should mention numeric literals now just to spite you |
09:53:54 | FromDiscord | <Elegantbeef> 0u8 is just better fite me |
09:54:33 | termer | it is |
09:54:36 | termer | I forgot I could do that |
09:54:46 | FromDiscord | <Elegantbeef> But now you don't need the numbers |
09:54:51 | FromDiscord | <Elegantbeef> So... stop adding numbers to enums |
09:55:06 | termer | Yeah, I was only adding them because I thought I needed the .uint8 bit |
09:55:13 | FromDiscord | <Elegantbeef> Ah |
09:55:26 | FromDiscord | <Elegantbeef> I thought you didn't trust the compiler to make an enum an ordinal 😛 |
09:55:48 | * | Batzy joined #nim |
09:56:52 | termer | I knew it made them ordinals because I couldn't make them out of order and also because I tested it |
09:57:02 | termer | But it sure would be nice if Nim had a spec to reference |
09:57:07 | termer | and not anecdotal evidence |
09:57:19 | FromDiscord | <Elegantbeef> The manual is the closest thing there is to a spec so cry about it |
09:57:21 | termer | I just read that Rust is finally getting a spec |
09:57:26 | termer | took them a while |
09:57:31 | termer | Nimskull guys are also working on a spec |
09:58:57 | termer | Magic https://github.com/termermc/methttp/blob/master/src/http_request.nim#L51 |
09:59:48 | FromDiscord | <Elegantbeef> Both pragmas you added are doing nothing |
09:59:53 | termer | what |
10:00:06 | termer | explain |
10:00:11 | FromDiscord | <Elegantbeef> `size: 1` only tells Nim the sizeof the enum is 1 |
10:00:15 | FromDiscord | <Elegantbeef> `pure` literally does nothing |
10:00:21 | termer | pure used to do something |
10:00:25 | termer | not in 2.x.x though |
10:00:30 | FromDiscord | <Elegantbeef> In the year 1832 |
10:00:34 | termer | I'm planning on making the lib available to 1.6.x |
10:00:43 | FromDiscord | <Elegantbeef> Even in 1.6 pure does not do anything important |
10:00:53 | termer | "important" but it does do something |
10:00:58 | FromDiscord | <Elegantbeef> It allowed declaring two enum fields of the same name next to eachother |
10:01:11 | FromDiscord | <Elegantbeef> Are you going to declare a new enum in this module with the same fields? |
10:01:16 | termer | Maybe |
10:01:24 | FromDiscord | <Elegantbeef> Lol |
10:01:29 | termer | It could very well happen with a name like Done |
10:01:39 | termer | might have 2 status enums in the same module |
10:02:48 | FromDiscord | <Elegantbeef> Just force the `overloadedEnums` experimental flag |
10:02:57 | termer | more experimentals lol no thanks |
10:03:05 | FromDiscord | <Elegantbeef> It's stable now |
10:03:13 | termer | so is it experimental then |
10:03:55 | FromDiscord | <Elegantbeef> It is in 1.6.x as it was a preview feature practically |
10:04:35 | termer | so is it mainline in 2.x.x |
10:04:46 | FromDiscord | <Elegantbeef> It's the default behaviour in 2.x |
10:04:47 | termer | Seriously, how do you know this stuff |
10:04:54 | FromDiscord | <Elegantbeef> It's why `pure` is now completely useless |
10:05:17 | FromDiscord | <Elegantbeef> I have nothing but time |
10:05:23 | termer | How is that the case |
10:05:34 | termer | How does one get this much time |
10:05:38 | termer | are you a NEET or something lol |
10:06:29 | FromDiscord | <Elegantbeef> If you go by the strict abbreviation, yes. Though I actually am a 'caregiver' |
10:06:49 | termer | well, I hope you're enjoying it |
10:06:54 | termer | I'd be a programming NEET if I could, but that's not the reality I live in right now |
10:07:54 | FromDiscord | <Elegantbeef> Maybe you'd write better code |
10:08:26 | termer | I write good enough code to get paid for it |
10:08:34 | FromDiscord | <Elegantbeef> I cannot get over the shotgun approach of using likely and unlikely |
10:08:52 | termer | lol if I know a branch is significantly more likely to run than not, I'll tell the compiler |
10:08:56 | termer | and vice-versa |
10:08:57 | termer | why not? |
10:09:01 | termer | It's there for me to use |
10:09:24 | * | xet7 quit (Remote host closed the connection) |
10:09:43 | FromDiscord | <Elegantbeef> It makes the code so unfathomably difficult to actually grok |
10:09:43 | FromDiscord | <Elegantbeef> Cause it only generates better code in situations it actively needs the help |
10:09:44 | FromDiscord | <Elegantbeef> If you label all your if statements likely or unlikely you're not using the tool properly |
10:10:00 | termer | how does it make it hard to understand |
10:10:18 | termer | when I have a check that in 90% of cases will not resolve to true, why not tell the compiler? |
10:10:39 | termer | In the case of my parser, there are many cases when I have this knowledge from real world experience |
10:10:51 | termer | Or just mathematical analysis |
10:12:34 | termer | I see no convincing reason not to tag things with probability if it's significantly likely or unlikely |
10:24:39 | FromDiscord | <Elegantbeef> Well cause it harms readabillity for one |
10:26:03 | Zevv | likely/unlikely: have you actually measured if these annotations help performance? |
10:26:23 | Zevv | because branch prediction is insane in modern processors. |
10:26:49 | FromDiscord | <Elegantbeef> Plus you can do PGO to get it even better |
10:26:50 | Zevv | I honestly doubt that you can significantly improve performance |
10:28:06 | Zevv | I even wonder how these hints end up in the assembly these days |
10:28:33 | termer | I haven't checked the performance |
10:28:40 | Zevv | then why would you even |
10:28:52 | termer | because it's information I have that the compiler doesn't, so I give it |
10:28:59 | termer | It would probably be insignificant enough to be hard to benchmark though |
10:29:09 | FromDiscord | <Elegantbeef> Termer also gave it his SIN |
10:29:15 | termer | say what |
10:29:48 | termer | Branch prediction can be good, but in cases of a parser that has pieces where the probability is based on the protocol itself, I can give some extra info |
10:30:04 | termer | like the probability is much higher for each char of an HTTP request to be a char other than \r or \n |
10:30:26 | termer | If this was a JIT compiler, it would probably know that after a few requests |
10:30:27 | Zevv | if you have not even measured I'm resting my case |
10:30:50 | termer | I don't see the harm in giving info that I have |
10:31:17 | termer | I only care to change what I'm doing if there's reason to believe it'll slow it down |
10:31:31 | termer | but one of these days I'll do some benchmarks |
10:32:45 | Zevv | I used to be smarter than my compiler and CPU |
10:32:47 | Zevv | in the 90s |
10:32:59 | Zevv | I guess I have become increasingly stupid since then |
10:33:39 | termer | Optimizing JIT like in JVM would make likely/unlikely for things like probabilities based on a protocol useless |
10:33:46 | termer | in AoT it still makes some sense |
10:35:06 | FromDiscord | <odexine> But in that case why not go through PGO |
10:35:09 | FromDiscord | <Elegantbeef> I mean you can use PGO if you want to make it learn from requests like the JIT |
10:35:15 | termer | what's PGO |
10:35:15 | FromDiscord | <odexine> Haha suck it beef |
10:35:24 | FromDiscord | <odexine> Profile guided optimisation |
10:35:36 | FromDiscord | <Elegantbeef> You run code it generates data that it then uses to optimise the code for your specific usage |
10:36:00 | FromDiscord | <Elegantbeef> it gives the compiler the information based off of evidence instead of the programmers intuition |
10:36:17 | termer | Is this an automated thing |
10:36:22 | Zevv | blahblah. just measure. profile. only then even consider optimizing. |
10:36:23 | Zevv | old news |
10:36:25 | FromDiscord | <Elegantbeef> Rika I did mention PGO earlier |
10:36:25 | * | jmdaemon quit (Ping timeout: 268 seconds) |
10:36:41 | FromDiscord | <Elegantbeef> https://forum.nim-lang.org/t/6295 |
10:36:58 | FromDiscord | <Elegantbeef> It's a few flags and run the program against test cases |
10:37:35 | termer | That's interesting |
10:37:47 | termer | it would be pretty easy to test this for my usecase since the scope of HTTP requests is pretty narrow |
10:37:48 | FromDiscord | <odexine> In reply to @Elegantbeef "Rika I did mention": Damn. |
10:37:54 | FromDiscord | <odexine> I guess it’s me who’s sucking it |
10:39:07 | FromDiscord | <odexine> I assume someone’s already thought of this but would it make sense to combine the concepts of AOT and JIT |
10:39:28 | termer | are you just talking about a JIT recompiler |
10:39:34 | FromDiscord | <odexine> I assume actually that’s how most “JIT” works nowadays |
10:39:43 | termer | That describes how most fast emulators work |
10:39:51 | termer | but that's basically just JIT anyway |
10:40:00 | FromDiscord | <odexine> Yeah |
10:40:23 | FromDiscord | <odexine> im just enthinkening dont mind me ig |
10:41:37 | termer | You're probably thinking of something like Java as a "recompiler" and an interpreted language being JIT'd as "normal JIT" |
10:41:54 | termer | but there's not really a fundamental difference between the two |
10:42:24 | termer | The only novel thing would be recompiling already-native instructions |
10:43:07 | termer | which is only a circumstance of the underlying CPU instructions and the program instructions matching up, but the JIT wouldn't really be conceptually different from something like JVM's JIT compiling JVM instructions to x86 |
10:43:30 | termer | If you had a CPU that could run JVM instructions (and there was one), it wouldn't magically be different |
10:45:12 | FromDiscord | <odexine> No I realised that pretty quickly yes |
10:45:31 | termer | JIT is cool |
10:45:42 | termer | Java SUCKS |
10:46:22 | FromDiscord | <gogolxdong666> Why is echo complete but file appending incomplete? https://media.discordapp.net/attachments/371759389889003532/1212712460776382494/image.png?ex=65f2d57d&is=65e0607d&hm=0e8d27e7a57b47f1f6333eb0ae3193f836279f59be540544695285715b87a4ce& https://media.discordapp.net/attachments/371759389889003532/1212712461262786560/image.png?ex=65f2d57d&is=65e0607d&hm=381b0a4921705ca707b36d823e8c2a9c0196297775bf55985f75359fcdf50dbf& |
10:46:49 | FromDiscord | <odexine> Did you flush the file after finishing the write? |
10:47:16 | FromDiscord | <odexine> Echo flushes by itself |
11:44:47 | Amun-Ra | I'm testing my program in 32-bit environment and build fails with RangeDefect (I suspect one of compiletime function); but there's no additional info; is there a way to enable additional info? |
11:50:11 | FromDiscord | <gogolxdong666> @Rika flushFile works |
12:27:35 | anddam | is there a language primer/book/resource I should go with for starter? |
12:28:01 | anddam | the easy stuff are easy to figure but I think I should cover the basis first before diving into things I do not yet understand |
12:30:26 | Zevv | https://nim-lang.org/docs/tut1.html |
12:45:14 | NimEventer | New Nimble package! caprese - A front-end web server specialized for real-time message exchange, see https://github.com/zenywallet/caprese |
12:51:30 | Amun-Ra | by the power of comments I've found the problematic code, bug report here I come ;) |
13:15:59 | * | dtomato quit (Quit: Ping timeout (120 seconds)) |
13:16:19 | * | dtomato joined #nim |
13:40:01 | FromDiscord | <nnsee> In reply to @gogolxdong666 "Why is echo complete": for future reference try posting your code too |
13:44:48 | * | ntat joined #nim |
14:10:56 | FromDiscord | <im__cynical> Is there any compiler flag that disables the check for an authenticode signiture |
14:11:07 | FromDiscord | <griffith1deadly> In reply to @NimEventer "New Nimble package! caprese": hm, why project with 1000+ commit's avialable on nimble only now? |
14:11:49 | FromDiscord | <marioboi3112> hey guys |
14:12:18 | FromDiscord | <marioboi3112> do yall have a weekly event where you take a look at the things happening with nim over the past week? |
14:19:00 | * | azimut joined #nim |
14:23:51 | * | rockcavera joined #nim |
15:20:41 | * | xet7 joined #nim |
15:23:17 | * | om3ga quit (Ping timeout: 256 seconds) |
15:51:10 | * | xet7 quit (Quit: Leaving) |
15:53:49 | * | xet7 joined #nim |
16:22:50 | NimEventer | New thread by ratchet: Infering base type in macro, see https://forum.nim-lang.org/t/11123 |
16:24:07 | * | FromDiscord quit (Remote host closed the connection) |
16:24:20 | * | FromDiscord joined #nim |
16:39:45 | * | om3ga joined #nim |
17:39:32 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=gBlnrnDCEqmx |
17:40:25 | FromDiscord | <Robyn [She/Her]> Wait it does |
17:40:32 | FromDiscord | <Robyn [She/Her]> So my mismatch sis dumb |
17:42:43 | FromDiscord | <Robyn [She/Her]> I'm lost on what it is though |
17:44:45 | FromDiscord | <Robyn [She/Her]> I fixed it somehow |
17:50:38 | FromDiscord | <Robyn [She/Her]> How would I correctly use response streams with std/httpclient? Ollama's API returns JSON parts but not sure how to correctly interpret them |
17:51:39 | * | jmdaemon joined #nim |
17:53:07 | arkanoid | Robyn: the vscode nimsuggest issue is not tied to vscode nor it's extension. It is completely possible to reproduce this issue just by calling nimsuggest separately |
17:53:23 | arkanoid | https://github.com/nim-lang/langserver/issues/184#issuecomment-1971654764 |
17:53:40 | FromDiscord | <saint.___.> sent a code paste, see https://play.nim-lang.org/#pasty=VDHFwULRZhkC |
17:53:42 | FromDiscord | <saint.___.> Just wonderin |
17:53:56 | FromDiscord | <Robyn [She/Her]> In reply to @arkanoid "Robyn: the vscode nimsuggest": I thought it was because of the choosenim proxy exe |
17:54:08 | arkanoid | exactly |
17:54:15 | FromDiscord | <Robyn [She/Her]> In reply to @saint.___. "What are you workin": A simple Ollama wrapper for Nim aha |
17:54:24 | FromDiscord | <saint.___.> Nice! |
17:55:28 | FromDiscord | <Robyn [She/Her]> Yeah! Hopefully will just be using it to tweak with LLMs a bit and testing what can be done |
17:55:58 | arkanoid | message to choosenim users: would you try running nimsuggest (from choosenim shims) standalone on nim file, try kill it with SIGTERM, and check if the shim child process (real nimsuggest process) is killed or not on yout system? |
17:56:20 | FromDiscord | <Robyn [She/Her]> In reply to @arkanoid "message to choosenim users:": I'm unable to do that atm, sorry |
17:56:27 | arkanoid | no problem |
18:08:13 | * | jmdaemon quit (Ping timeout: 264 seconds) |
18:23:27 | FromDiscord | <Robyn [She/Her]> Hm, should I use a `Parameters` object or should I just allow users to pass the params via the function arguments |
18:26:31 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "Hm, should I use": Struggling to decide on what I should do for this honestly |
18:35:47 | * | jmdaemon joined #nim |
19:08:31 | arkanoid | time to delete choosenim |
19:08:46 | arkanoid | it feels an abandoned project |
19:13:48 | * | jmdaemon quit (Ping timeout: 255 seconds) |
19:15:13 | FromDiscord | <Robyn [She/Her]> Yeah it is |
19:15:45 | FromDiscord | <djazz> dom96 left nim so yeah |
19:19:27 | * | advesperacit quit () |
19:19:36 | arkanoid | it should be removed from nim download page then |
19:21:06 | * | advesperacit joined #nim |
19:30:25 | arkanoid | I'll wait for PMunch feedback before wiping it from my machine. It has been the root of many problems. https://github.com/dom96/choosenim/issues/326#issuecomment-1537155597 |
19:33:58 | FromDiscord | <djazz> so i removed choosenim and nimble folder and installed nim langserver as the vscode extension said, but in vscode i get Server failed with Nimsuggest process crashed.. |
19:34:10 | FromDiscord | <djazz> using system nim 2.0.2 |
19:35:46 | arkanoid | djazz, I'm going to to the same, let me cleanup my system and start from pristine nim env (with just plain nim in PATH) |
19:38:41 | FromDiscord | <djazz> `Nimsuggest initialization for /home/djazz/code/nim/futhark/src/futhark.nim failed with: Nimsuggest process crashed.` no error log? |
19:39:13 | FromDiscord | <djazz> oh i see whats wrong |
19:39:23 | FromDiscord | <djazz> tried running nimsuggest in cli |
19:39:31 | FromDiscord | <djazz> arch package must be missing something |
19:39:34 | FromDiscord | <djazz> `Error: cannot open '/usr/lib/system.nim'` |
19:41:11 | FromDiscord | <djazz> it should be `/usr/lib/nim/system.nim` |
19:43:56 | FromDiscord | <djazz> or /usr/lib/nim/lib |
19:44:37 | FromDiscord | <djazz> adding that to globalb nim.cfg made it work <https://forum.nim-lang.org/t/10482#69928> |
19:44:43 | FromDiscord | <djazz> (edit) "globalb" => "global" |
19:45:36 | * | jmdaemon joined #nim |
19:46:31 | FromDiscord | <djazz> well, nimsuggest doesnt give output but it returns with error code |
19:58:24 | FromDiscord | <djazz> same error with nim from nim website |
20:00:46 | FromDiscord | <tauruuuuuus> is the nim plugin on CLion without lsp support or am I tripping? |
20:01:09 | FromDiscord | <djazz> ah strutils is in pure not std, hmmm |
20:08:03 | FromDiscord | <djazz> the install script only installed nim executable, no tools |
20:13:24 | FromDiscord | <djazz> solved it by pointing PATH to the bin dir in the downloaded nim binary package, now it works without system install |
20:13:28 | FromDiscord | <djazz> weird |
20:14:33 | * | jmdaemon quit (Ping timeout: 255 seconds) |
20:19:55 | * | jmdaemon joined #nim |
20:27:02 | FromDiscord | <intellij_gamer> In reply to @tauruuuuuus "is the nim plugin": No LSP↵Although you can install an LSP plugin and setup nimlsp/ninlangserver separate from the plugt |
20:28:39 | * | ntat quit (Quit: Leaving) |
20:30:56 | FromDiscord | <tauruuuuuus> Wow, that's a bummer for sure |
20:31:26 | FromDiscord | <tauruuuuuus> In reply to @intellij_gamer "No LSP Although you": How would one go and do that? You mean install a random one from the ones available and just change the binary? |
20:32:37 | * | jmdaemon quit (Ping timeout: 246 seconds) |
20:33:48 | FromDiscord | <intellij_gamer> https://github.com/PMunch/nimlsp?tab=readme-ov-file#intellij↵Like you can follow the steps here, and change `nimlsp` to nimlangserver if you want |
20:33:57 | * | def- quit (Quit: -) |
20:34:39 | * | def- joined #nim |
20:45:15 | FromDiscord | <tauruuuuuus> oh I could not find it on my own because it is not compatible with the latest CLion build.. |
20:45:38 | FromDiscord | <tauruuuuuus> Thanks for all the info! Really appreciated |
21:34:52 | FromDiscord | <kumolonimbus> Hey all, I am seeing some weird behaviour when trying to use strformat with winim and `CreateProcess`. If I hardcode a string for a process name then I can create the process without issue, but if I assemble the process name using `&` or `fmt` then it fails with an access denied error. Any idea why this might be happening? |
21:37:43 | FromDiscord | <kumolonimbus> I also observed the behaviour when using string concatenation |
21:39:03 | FromDiscord | <demotomohiro> Does `CreateProcess` requires the memory containing the process name keep valid after `CreateProcess` returned? |
21:39:05 | arkanoid | djazz, I've deleted choosenim, cleaned up .nimble/bin from choosenim chims, added path to newly installed toolchain symbolic link ~/nim/toolchains/current/bin and everything works nicely |
21:41:12 | FromDiscord | <bosinski2023> In reply to @arkanoid "<@81390960805675008>, I've deleted choosenim,": regarding choosenim - like it, isn't it fixable or is there a alternative ? |
21:41:22 | FromDiscord | <bosinski2023> (edit) "In reply to @arkanoid "<@81390960805675008>, I've deleted choosenim,": regarding choosenim - ... like" added "i" |
21:46:09 | arkanoid | bosinski2023: don't know if there's an alternative. All I know is that choosenim saves me the time to download new version and change a symlink, not worth the problem it gives in return by proxying exes |
21:46:19 | FromDiscord | <kumolonimbus> In reply to @demotomohiro "Does `CreateProcess` requires the": `CreateProcess` requires a `LPCWSTR`. So I assemble the string then call a converter function from winim called `cmdLine.winstrConverterCStringToLPWSTR` to create an LPWSTR that is passed to `CreateProcess`. That function is essentially `+$cast[LPWSTR](s[0].unsafeaddr)` |
21:47:40 | FromDiscord | <kumolonimbus> I am not sure how long `CreateProcess` is keeping the memory. I did notice that sometimes when attempting to convert the formatted string to a `cstring` it only converts the first part of the concatendated string rather than the whole assembled string |
21:47:59 | FromDiscord | <kumolonimbus> (edit) "concatendated" => "concatenated" |
21:50:57 | FromDiscord | <bosinski2023> In reply to @arkanoid "<@754284517316886598>: don't know if": hmm, right, i had my share of foam in the mouth after VC had slurped my 32GB of mem away for 200-LOC and then locked the whole system. I'm on Pycharm now, maybe i'll give VC another try.. |
21:51:07 | FromDiscord | <Robyn [She/Her]> In reply to @arkanoid "<@754284517316886598>: don't know if": Could be solved easily by replacing the proxy exe using symlinks |
21:51:48 | FromDiscord | <demotomohiro> In reply to @kumolonimbus "`CreateProcess` requires a `LPCWSTR`.": Did you read this?↵https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw |
21:52:50 | arkanoid | bosinski2023: the issue are choosenim nimsuggest shim that does not kill child nimsuggest process on SIGTERM. This makes nimlangserver and numsuggest process accumulates. Just avoid shims, and now vscode will correctly close all processes and never OOM as before |
21:52:58 | arkanoid | bosinski2023: been there, done that |
21:53:22 | FromDiscord | <demotomohiro> In reply to @kumolonimbus "`CreateProcess` requires a `LPCWSTR`.": osproc module in Nim's standard library doesn't work for your case?↵https://nim-lang.org/docs/osproc.html |
21:53:54 | FromDiscord | <Elegantbeef> Avoiding shims prevents you from having easy language versioning! 😄 |
21:55:21 | FromDiscord | <kumolonimbus> In reply to @demotomohiro "Did you read this?": Yes, and I am sure my call is correct, because when I use a normal string it works fine, but as soon as I make the string using format or concatenate it fails. And unforunately OSProc won't work in this case because I need to start the process in a suspended state |
22:02:38 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=VRNrgnGNvpYy |
22:06:14 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Avoiding shims prevents you": sadly, well i can handle that, but it's a version-switcher is somewhat standard these days and for makes it easy for newbies.. |
22:06:28 | FromDiscord | <bosinski2023> (edit) removed "it's" |
22:06:42 | FromDiscord | <bosinski2023> (edit) removed "for" |
22:06:54 | FromDiscord | <kumolonimbus> In reply to @demotomohiro "String literals keep alive": Ah interesting, so just place some reference to the variable after the createprocess call then? |
22:08:43 | FromDiscord | <demotomohiro> yes |
22:09:23 | FromDiscord | <kumolonimbus> Alright I have to step out for a bit but I'll try that when I get back, thanks for your help! |
22:16:57 | * | pmp-p quit (Ping timeout: 268 seconds) |
23:36:21 | * | oprypin quit (Quit: Bye) |
23:36:31 | * | oprypin joined #nim |
23:37:10 | * | advesperacit quit () |