<< 29-02-2024 >>

00:11:11FromDiscord<Elegantbeef> Though I have not tested your project
00:11:16FromDiscord<Elegantbeef> So I'll give that a whirl
00:14:31FromDiscord<Elegantbeef> Yea Kate properly manages to close the nimsuggest and nimlanguageserver
00:17:28arkanoidwell the issue happens to me even with helloworld
00:17:32FromDiscord<Elegantbeef> Though it also does not use the project mappings that you have for the .vscode
00:18:06arkanoidwhy should kate read vscode specific settings.json?
00:18:09FromDiscord<Elegantbeef> Ah then yea I have no issues with it in Kate so points to Vscode/extension management
00:18:20FromDiscord<Elegantbeef> It shouldn't I was just saying it was not using it
00:18:36FromDiscord<Elegantbeef> As it could've been a possible concerning difference
00:18:55arkanoidI'd guess there's a specific settings for kate to decide which file is the root of your nim project
00:19:14FromDiscord<Elegantbeef> Nope it'd be done by nimlangserver and there is not that functionality
00:19:43arkanoidwell nimlangserver relies on .nimble file
00:19:55arkanoidand fallsback to whatever
00:20:04arkanoid(open one for each file)
00:20:05FromDiscord<Elegantbeef> Right but you have two entries and there is no way to set that up with Kate afaict
00:20:16FromDiscord<Elegantbeef> But I did open each file and there were 2 nimsuggest instances
00:20:55arkanoidyeah 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:40FromDiscord<Elegantbeef> Yep which does not happen over here with choosenim + nimlangserver
00:21:49FromDiscord<Elegantbeef> So the extension + choosenim seems to be the issue
00:22:25FromDiscord<Elegantbeef> Though maybe kate kills programs that were started inside of it at the end
00:22:47arkanoidmay I share this feedback into the github issue? Do you want to do that yourself? It may help nickysn tackle the issue
00:23:28arkanoidyes that's also possible
00:23:54FromDiscord<Elegantbeef> Yea I don't know if it's a worthwhile addendum if you feel it's worth noting go ahead
00:40:24arkanoidsure, 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:19arkanoidElegantbeef: 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:42FromDiscord<Elegantbeef> Multiple nim files in a single project or across projects?
00:46:14FromDiscord<Elegantbeef> Across multiple projects the suggests stay alive
00:47:26FromDiscord<Robyn [She/Her]> In reply to @arkanoid "user nickysn on github": Oh my god, that's such a simple fix-
00:47:54FromDiscord<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:30FromDiscord<MDuardo> This happens in Helix↵Neovim works fine↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>)
01:28:51NimEventerNew 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:46FromDiscord<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:03FromDiscord<Robyn [She/Her]> Specifically an API wrapper
03:14:38*krux02 quit (Remote host closed the connection)
04:04:43FromDiscord<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:07termerRobyn What would your library do
07:05:32termerIf 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:10termerFor my HTTP parser, I exposed procs to read and write from parser and request builder that give buffer pointers and lengths
07:06:17termerYou can choose to populate and read those in any way you want
07:06:33termerThat's for a streaming interface
07:06:48termerOther things it would depend, but you can bet on callbacks if it's event-based
08:02:24FromDiscord<Robyn [She/Her]> In reply to @termer "Robyn What would your": Probably another Discord API wrapper
08:07:21FromDiscord<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:35FromDiscord<odexine> Where’s the big?
08:11:38FromDiscord<odexine> Bug
08:11:55FromDiscord<Elegantbeef> The biggest insect is the weta in new zealand
08:11:56FromDiscord<odexine> Oh you mean as in the block
08:33:18FromDiscord<that_dude.> Sorry I wasn't very clear on that.
08:33:25FromDiscord<that_dude.> (edit) "Sorry" => "Sorry,"
08:33:33termerRobyn That sounds like a pain in the ass
08:33:46termerlots of callbacks
08:48:15*Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
08:48:37*Batzy joined #nim
08:51:30FromDiscord<Robyn [She/Her]> In reply to @termer "lots of callbacks": Yep
08:51:54termerisn't there arleady a working Discord wrapper anyway
08:53:46FromDiscord<Robyn [She/Her]> There is but it specifically uses asyncdispatch
08:57:30termertake it and rewrite the IO parts with sys
08:58:01termerKeep in mind that you'd also have to write an HTTP client too
08:58:14termerI'll work on an HTTP client soon once I have the server part of methttp solid
08:58:22FromDiscord<Robyn [She/Her]> In reply to @termer "Keep in mind that": Yeah I'm awate
08:58:26FromDiscord<Robyn [She/Her]> Mehttp?
08:58:32termerhttps://github.com/termermc/methttp
08:58:34FromDiscord<Robyn [She/Her]> (edit) "awate" => "aware"
08:58:52termermethttp is my HTTP library
08:58:58termerit's IO agnostic
08:59:17FromDiscord<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:21termerso far it supports request parsing and response composition
08:59:30termerUsing the OpenAPI spec would be fine
09:06:20FromDiscord<JJ> In reply to @termer "https://github.com/termermc/methttp": woah, wait, what is this
09:06:50FromDiscord<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:25termerMax size
09:36:36termeryou define your buffer size and reject requests whose headers exceed it
09:36:57termerIt can be wasteful, but in practice, it's much faster than dynamically allocating memory and headers aren't that big anyway
09:37:55termerThe way the parser works is it streams in request chunks and figures out where headers begin and end
09:38:44termerWhen you ask for the headers, it returns a pointers and lengths of the header keys and values
09:38:48termersame for URI, method, etc
09:39:01termerthose all exist in the statically allocated request buffer
09:39:21termerThe parser internally keeps the length of the buffer content
09:39:32termerSo it's basically like a preallocated string
09:39:59termersame way newStringOfCap works, but with a fixed-size capacity
09:40:57termerJJ https://github.com/termermc/methttp/blob/master/src/http_request.nim#L50
09:41:57*ehmry joined #nim
09:42:06FromDiscord<Elegantbeef> Heh I just seen the enum
09:42:14termerinb4 uint8
09:42:33FromDiscord<Elegantbeef> The entire right hand side of those are pointless
09:42:54termer0.uint8 is strictly necessary to make me feel safe
09:43:13termerHow else am I supposed to make it blazingly efficient
09:43:48FromDiscord<kyrence_> I'd recommend you contact ➡️[ #Support Channel](https://\@dsc.gg/chatrealtime/)
09:44:04FromDiscord<kyrence_> In reply to @termer "How else am I": termer[IRC
09:44:30FromDiscord<Elegantbeef> Why does it make you safer than `0`?
09:44:30FromDiscord<Elegantbeef> `type MyEnum = enum A = 0u8, B = 10000` is valid
09:44:57termerHow do I force it to be 8 bit
09:45:11FromDiscord<Elegantbeef> `static: assert sizeof(MyEnum) == 1`
09:45:36FromDiscord<kyrence_> In reply to @termer "How do I force": I'd recommend you contact ➡️[ #Support Channel](https://\@dsc.gg/chatrealtime/)
09:45:56FromDiscord<nnsee> <@&371760044473319454>
09:46:09FromDiscord<Elegantbeef> There is also`{.size: 1.}`
09:46:26FromDiscord<Elegantbeef> The size pragma is mainly for interop
09:46:46termerI want everything small so I'll use that
09:46:53FromDiscord<Phil> In reply to @kyrence_ "termer[IRC": You have 60 seconds to justify link spam or you'll get banned.
09:47:26FromDiscord<Elegantbeef> Heh termer the size pragma does not do any checking
09:47:39termerwhat the fuck
09:47:59FromDiscord<Elegantbeef> https://play.nim-lang.org/#pasty=UAUQCpvZsPBr
09:48:39FromDiscord<Elegantbeef> https://play.nim-lang.org/#pasty=mNZvJwuTYjsW ah here's what I wanted
09:48:45FromDiscord<Elegantbeef> Removing code folding shows the issue
09:48:58FromDiscord<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:27FromDiscord<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:44FromDiscord<Elegantbeef> Why feel safe when you can actually just be safe
09:52:21termerBecause I don't know every single Nim feature inside out like you inexplicably do
09:52:55FromDiscord<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:05termerI actually did know that
09:53:45FromDiscord<Elegantbeef> I should mention numeric literals now just to spite you
09:53:54FromDiscord<Elegantbeef> 0u8 is just better fite me
09:54:33termerit is
09:54:36termerI forgot I could do that
09:54:46FromDiscord<Elegantbeef> But now you don't need the numbers
09:54:51FromDiscord<Elegantbeef> So... stop adding numbers to enums
09:55:06termerYeah, I was only adding them because I thought I needed the .uint8 bit
09:55:13FromDiscord<Elegantbeef> Ah
09:55:26FromDiscord<Elegantbeef> I thought you didn't trust the compiler to make an enum an ordinal 😛
09:55:48*Batzy joined #nim
09:56:52termerI knew it made them ordinals because I couldn't make them out of order and also because I tested it
09:57:02termerBut it sure would be nice if Nim had a spec to reference
09:57:07termerand not anecdotal evidence
09:57:19FromDiscord<Elegantbeef> The manual is the closest thing there is to a spec so cry about it
09:57:21termerI just read that Rust is finally getting a spec
09:57:26termertook them a while
09:57:31termerNimskull guys are also working on a spec
09:58:57termerMagic https://github.com/termermc/methttp/blob/master/src/http_request.nim#L51
09:59:48FromDiscord<Elegantbeef> Both pragmas you added are doing nothing
09:59:53termerwhat
10:00:06termerexplain
10:00:11FromDiscord<Elegantbeef> `size: 1` only tells Nim the sizeof the enum is 1
10:00:15FromDiscord<Elegantbeef> `pure` literally does nothing
10:00:21termerpure used to do something
10:00:25termernot in 2.x.x though
10:00:30FromDiscord<Elegantbeef> In the year 1832
10:00:34termerI'm planning on making the lib available to 1.6.x
10:00:43FromDiscord<Elegantbeef> Even in 1.6 pure does not do anything important
10:00:53termer"important" but it does do something
10:00:58FromDiscord<Elegantbeef> It allowed declaring two enum fields of the same name next to eachother
10:01:11FromDiscord<Elegantbeef> Are you going to declare a new enum in this module with the same fields?
10:01:16termerMaybe
10:01:24FromDiscord<Elegantbeef> Lol
10:01:29termerIt could very well happen with a name like Done
10:01:39termermight have 2 status enums in the same module
10:02:48FromDiscord<Elegantbeef> Just force the `overloadedEnums` experimental flag
10:02:57termermore experimentals lol no thanks
10:03:05FromDiscord<Elegantbeef> It's stable now
10:03:13termerso is it experimental then
10:03:55FromDiscord<Elegantbeef> It is in 1.6.x as it was a preview feature practically
10:04:35termerso is it mainline in 2.x.x
10:04:46FromDiscord<Elegantbeef> It's the default behaviour in 2.x
10:04:47termerSeriously, how do you know this stuff
10:04:54FromDiscord<Elegantbeef> It's why `pure` is now completely useless
10:05:17FromDiscord<Elegantbeef> I have nothing but time
10:05:23termerHow is that the case
10:05:34termerHow does one get this much time
10:05:38termerare you a NEET or something lol
10:06:29FromDiscord<Elegantbeef> If you go by the strict abbreviation, yes. Though I actually am a 'caregiver'
10:06:49termerwell, I hope you're enjoying it
10:06:54termerI'd be a programming NEET if I could, but that's not the reality I live in right now
10:07:54FromDiscord<Elegantbeef> Maybe you'd write better code
10:08:26termerI write good enough code to get paid for it
10:08:34FromDiscord<Elegantbeef> I cannot get over the shotgun approach of using likely and unlikely
10:08:52termerlol if I know a branch is significantly more likely to run than not, I'll tell the compiler
10:08:56termerand vice-versa
10:08:57termerwhy not?
10:09:01termerIt's there for me to use
10:09:24*xet7 quit (Remote host closed the connection)
10:09:43FromDiscord<Elegantbeef> It makes the code so unfathomably difficult to actually grok
10:09:43FromDiscord<Elegantbeef> Cause it only generates better code in situations it actively needs the help
10:09:44FromDiscord<Elegantbeef> If you label all your if statements likely or unlikely you're not using the tool properly
10:10:00termerhow does it make it hard to understand
10:10:18termerwhen I have a check that in 90% of cases will not resolve to true, why not tell the compiler?
10:10:39termerIn the case of my parser, there are many cases when I have this knowledge from real world experience
10:10:51termerOr just mathematical analysis
10:12:34termerI see no convincing reason not to tag things with probability if it's significantly likely or unlikely
10:24:39FromDiscord<Elegantbeef> Well cause it harms readabillity for one
10:26:03Zevvlikely/unlikely: have you actually measured if these annotations help performance?
10:26:23Zevvbecause branch prediction is insane in modern processors.
10:26:49FromDiscord<Elegantbeef> Plus you can do PGO to get it even better
10:26:50ZevvI honestly doubt that you can significantly improve performance
10:28:06ZevvI even wonder how these hints end up in the assembly these days
10:28:33termerI haven't checked the performance
10:28:40Zevvthen why would you even
10:28:52termerbecause it's information I have that the compiler doesn't, so I give it
10:28:59termerIt would probably be insignificant enough to be hard to benchmark though
10:29:09FromDiscord<Elegantbeef> Termer also gave it his SIN
10:29:15termersay what
10:29:48termerBranch 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:04termerlike the probability is much higher for each char of an HTTP request to be a char other than \r or \n
10:30:26termerIf this was a JIT compiler, it would probably know that after a few requests
10:30:27Zevvif you have not even measured I'm resting my case
10:30:50termerI don't see the harm in giving info that I have
10:31:17termerI only care to change what I'm doing if there's reason to believe it'll slow it down
10:31:31termerbut one of these days I'll do some benchmarks
10:32:45ZevvI used to be smarter than my compiler and CPU
10:32:47Zevvin the 90s
10:32:59ZevvI guess I have become increasingly stupid since then
10:33:39termerOptimizing JIT like in JVM would make likely/unlikely for things like probabilities based on a protocol useless
10:33:46termerin AoT it still makes some sense
10:35:06FromDiscord<odexine> But in that case why not go through PGO
10:35:09FromDiscord<Elegantbeef> I mean you can use PGO if you want to make it learn from requests like the JIT
10:35:15termerwhat's PGO
10:35:15FromDiscord<odexine> Haha suck it beef
10:35:24FromDiscord<odexine> Profile guided optimisation
10:35:36FromDiscord<Elegantbeef> You run code it generates data that it then uses to optimise the code for your specific usage
10:36:00FromDiscord<Elegantbeef> it gives the compiler the information based off of evidence instead of the programmers intuition
10:36:17termerIs this an automated thing
10:36:22Zevvblahblah. just measure. profile. only then even consider optimizing.
10:36:23Zevvold news
10:36:25FromDiscord<Elegantbeef> Rika I did mention PGO earlier
10:36:25*jmdaemon quit (Ping timeout: 268 seconds)
10:36:41FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/6295
10:36:58FromDiscord<Elegantbeef> It's a few flags and run the program against test cases
10:37:35termerThat's interesting
10:37:47termerit would be pretty easy to test this for my usecase since the scope of HTTP requests is pretty narrow
10:37:48FromDiscord<odexine> In reply to @Elegantbeef "Rika I did mention": Damn.
10:37:54FromDiscord<odexine> I guess it’s me who’s sucking it
10:39:07FromDiscord<odexine> I assume someone’s already thought of this but would it make sense to combine the concepts of AOT and JIT
10:39:28termerare you just talking about a JIT recompiler
10:39:34FromDiscord<odexine> I assume actually that’s how most “JIT” works nowadays
10:39:43termerThat describes how most fast emulators work
10:39:51termerbut that's basically just JIT anyway
10:40:00FromDiscord<odexine> Yeah
10:40:23FromDiscord<odexine> im just enthinkening dont mind me ig
10:41:37termerYou're probably thinking of something like Java as a "recompiler" and an interpreted language being JIT'd as "normal JIT"
10:41:54termerbut there's not really a fundamental difference between the two
10:42:24termerThe only novel thing would be recompiling already-native instructions
10:43:07termerwhich 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:30termerIf you had a CPU that could run JVM instructions (and there was one), it wouldn't magically be different
10:45:12FromDiscord<odexine> No I realised that pretty quickly yes
10:45:31termerJIT is cool
10:45:42termerJava SUCKS
10:46:22FromDiscord<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:49FromDiscord<odexine> Did you flush the file after finishing the write?
10:47:16FromDiscord<odexine> Echo flushes by itself
11:44:47Amun-RaI'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:11FromDiscord<gogolxdong666> @Rika flushFile works
12:27:35anddamis there a language primer/book/resource I should go with for starter?
12:28:01anddamthe 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:26Zevvhttps://nim-lang.org/docs/tut1.html
12:45:14NimEventerNew Nimble package! caprese - A front-end web server specialized for real-time message exchange, see https://github.com/zenywallet/caprese
12:51:30Amun-Raby 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:01FromDiscord<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:56FromDiscord<im__cynical> Is there any compiler flag that disables the check for an authenticode signiture
14:11:07FromDiscord<griffith1deadly> In reply to @NimEventer "New Nimble package! caprese": hm, why project with 1000+ commit's avialable on nimble only now?
14:11:49FromDiscord<marioboi3112> hey guys
14:12:18FromDiscord<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:50NimEventerNew 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:32FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=gBlnrnDCEqmx
17:40:25FromDiscord<Robyn [She/Her]> Wait it does
17:40:32FromDiscord<Robyn [She/Her]> So my mismatch sis dumb
17:42:43FromDiscord<Robyn [She/Her]> I'm lost on what it is though
17:44:45FromDiscord<Robyn [She/Her]> I fixed it somehow
17:50:38FromDiscord<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:07arkanoidRobyn: 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:23arkanoidhttps://github.com/nim-lang/langserver/issues/184#issuecomment-1971654764
17:53:40FromDiscord<saint.___.> sent a code paste, see https://play.nim-lang.org/#pasty=VDHFwULRZhkC
17:53:42FromDiscord<saint.___.> Just wonderin
17:53:56FromDiscord<Robyn [She/Her]> In reply to @arkanoid "Robyn: the vscode nimsuggest": I thought it was because of the choosenim proxy exe
17:54:08arkanoidexactly
17:54:15FromDiscord<Robyn [She/Her]> In reply to @saint.___. "What are you workin": A simple Ollama wrapper for Nim aha
17:54:24FromDiscord<saint.___.> Nice!
17:55:28FromDiscord<Robyn [She/Her]> Yeah! Hopefully will just be using it to tweak with LLMs a bit and testing what can be done
17:55:58arkanoidmessage 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:20FromDiscord<Robyn [She/Her]> In reply to @arkanoid "message to choosenim users:": I'm unable to do that atm, sorry
17:56:27arkanoidno problem
18:08:13*jmdaemon quit (Ping timeout: 264 seconds)
18:23:27FromDiscord<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:31FromDiscord<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:31arkanoidtime to delete choosenim
19:08:46arkanoidit feels an abandoned project
19:13:48*jmdaemon quit (Ping timeout: 255 seconds)
19:15:13FromDiscord<Robyn [She/Her]> Yeah it is
19:15:45FromDiscord<djazz> dom96 left nim so yeah
19:19:27*advesperacit quit ()
19:19:36arkanoidit should be removed from nim download page then
19:21:06*advesperacit joined #nim
19:30:25arkanoidI'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:58FromDiscord<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:10FromDiscord<djazz> using system nim 2.0.2
19:35:46arkanoiddjazz, 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:41FromDiscord<djazz> `Nimsuggest initialization for /home/djazz/code/nim/futhark/src/futhark.nim failed with: Nimsuggest process crashed.` no error log?
19:39:13FromDiscord<djazz> oh i see whats wrong
19:39:23FromDiscord<djazz> tried running nimsuggest in cli
19:39:31FromDiscord<djazz> arch package must be missing something
19:39:34FromDiscord<djazz> `Error: cannot open '/usr/lib/system.nim'`
19:41:11FromDiscord<djazz> it should be `/usr/lib/nim/system.nim`
19:43:56FromDiscord<djazz> or /usr/lib/nim/lib
19:44:37FromDiscord<djazz> adding that to globalb nim.cfg made it work <https://forum.nim-lang.org/t/10482#69928>
19:44:43FromDiscord<djazz> (edit) "globalb" => "global"
19:45:36*jmdaemon joined #nim
19:46:31FromDiscord<djazz> well, nimsuggest doesnt give output but it returns with error code
19:58:24FromDiscord<djazz> same error with nim from nim website
20:00:46FromDiscord<tauruuuuuus> is the nim plugin on CLion without lsp support or am I tripping?
20:01:09FromDiscord<djazz> ah strutils is in pure not std, hmmm
20:08:03FromDiscord<djazz> the install script only installed nim executable, no tools
20:13:24FromDiscord<djazz> solved it by pointing PATH to the bin dir in the downloaded nim binary package, now it works without system install
20:13:28FromDiscord<djazz> weird
20:14:33*jmdaemon quit (Ping timeout: 255 seconds)
20:19:55*jmdaemon joined #nim
20:27:02FromDiscord<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:56FromDiscord<tauruuuuuus> Wow, that's a bummer for sure
20:31:26FromDiscord<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:48FromDiscord<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:15FromDiscord<tauruuuuuus> oh I could not find it on my own because it is not compatible with the latest CLion build..
20:45:38FromDiscord<tauruuuuuus> Thanks for all the info! Really appreciated
21:34:52FromDiscord<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:43FromDiscord<kumolonimbus> I also observed the behaviour when using string concatenation
21:39:03FromDiscord<demotomohiro> Does `CreateProcess` requires the memory containing the process name keep valid after `CreateProcess` returned?
21:39:05arkanoiddjazz, 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:12FromDiscord<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:22FromDiscord<bosinski2023> (edit) "In reply to @arkanoid "<@81390960805675008>, I've deleted choosenim,": regarding choosenim - ... like" added "i"
21:46:09arkanoidbosinski2023: 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:19FromDiscord<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:40FromDiscord<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:59FromDiscord<kumolonimbus> (edit) "concatendated" => "concatenated"
21:50:57FromDiscord<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:07FromDiscord<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:48FromDiscord<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:50arkanoidbosinski2023: 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:58arkanoidbosinski2023: been there, done that
21:53:22FromDiscord<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:54FromDiscord<Elegantbeef> Avoiding shims prevents you from having easy language versioning! 😄
21:55:21FromDiscord<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:38FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=VRNrgnGNvpYy
22:06:14FromDiscord<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:28FromDiscord<bosinski2023> (edit) removed "it's"
22:06:42FromDiscord<bosinski2023> (edit) removed "for"
22:06:54FromDiscord<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:43FromDiscord<demotomohiro> yes
22:09:23FromDiscord<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 ()