<< 17-10-2024 >>

00:09:46*ehmry joined #nim
00:29:06FromDiscord<spotlightkid> what's the problem with nimsuggest? are you using choosenim?↵If it is this one\: https://github.com/nim-lang/choosenim/issues/13↵then a possible solution might be\: https://github.com/nim-lang/choosenim/pull/38↵currently that requires building choosenim yourself with this patch or using my AUR package\: https://aur.archlinux.org/packages/choosenim
02:41:45*rockcavera quit (Remote host closed the connection)
02:51:19*xet7 joined #nim
04:35:34*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
04:38:59*SchweinDeBurg joined #nim
08:03:20FromDiscord<basilajith> sent a code paste, see https://play.nim-lang.org/#pasty=lekVCrlC
08:14:19FromDiscord<kiloneie> Anyone knows why on broken screen just received win 10 laptop choosenim just does nothing even w admin rights and Win AV turned off ? seems odd.
08:24:02FromDiscord<basilajith> In reply to @basilajith "I'm trying to insert": Could it be that the key already exists in another table? But still, what is the probability? No matter how many times I try to run the script, the same error is thrown.
08:32:27*redj quit (Quit: No Ping reply in 180 seconds.)
08:33:59*redj joined #nim
10:42:39*alexdaguy joined #nim
12:41:29FromDiscord<vortex> https://github.com/vortex73/pasture↵this is my attempt at writing a simple pastebin to learn nim. When i try using this, half of the content of the files i transfer are getting lost. any idea why?
12:48:30FromDiscord<nnsee> In reply to @vortex "https://github.com/vortex73/pasture this is my": by "transfer" do you mean upload? is it exactly half each time or a random amount or a fixed number of bytes that are transferred, such as 4096 or something?
12:57:16FromDiscord<vortex> ok so if the file is small like one line or something, i've mostly noticed that the whole thing gets transferred. but if its larger then some bits only are sent
12:58:45FromDiscord<nnsee> only some bits? how many bytes specifically?
12:59:02FromDiscord<nnsee> "only some bits" makes it sound like there's random bits missing or something :p
13:00:03Amun-Raproc newAsyncHttpServer(reuseAddr = true; reusePort = false; maxBody = 8388608): AsyncHttpServer
13:00:13Amun-Rais that 8388608 by any chance?
13:02:12FromDiscord<vortex> original file was 378 bytes and the uploaded one is 113↵(@nnsee)
13:04:01FromDiscord<vortex> another case a 12k file is reduced to a 9.3k
13:04:42FromDiscord<nnsee> In reply to @vortex "original file was 378": and the body is cut already in `req.body` in `parseMultipartFormData()` before you've done any processing?
13:05:11FromDiscord<nnsee> before it enters the `for` loop in that function, i mean
13:07:10FromDiscord<vortex> I'm sorry i didn't get you↵(@nnsee)
13:08:01FromDiscord<nnsee> In reply to @vortex "I'm sorry i didn't": if you do an `echo req.body` in `parseMultipartFormData()` in your code, are the bytes missing there too?
13:17:00Amun-Raor echo req.body.len
13:17:31FromDiscord<nnsee> that might be a bit misleading as that also includes the rest of the form data
13:17:40FromDiscord<nnsee> not just the uploaded file contents itself
13:17:44Amun-Raright, I'd add repr then
13:23:14FromDiscord<vortex> even the `data` variable
13:23:15FromDiscord<vortex> nop that has all the contents↵(@nnsee)
13:23:50FromDiscord<nnsee> In reply to @vortex "nop that has all": so there's a logic error with how you're processing the data
13:24:15FromDiscord<vortex> yep thanks for that i'll figure it out from here!
13:25:16FromDiscord<nnsee> specifically this looks sus
13:25:20FromDiscord<nnsee> https://github.com/vortex73/pasture/blob/main/src/pasture.nim#L22
13:25:36FromDiscord<nnsee> you're setting `inHeader` to true whenever you encounter a blank like
13:25:38FromDiscord<nnsee> (edit) "like" => "line"
13:25:42FromDiscord<nnsee> which does not seem correct
13:27:52FromDiscord<nnsee> well, not true specifically, but `!inHeader`
13:52:58*alexdaguy quit (Quit: WeeChat 4.4.2)
13:58:22*ntat joined #nim
14:13:18FromDiscord<xtrayambak> How are you supposed to represent a union when binding a C struct?
14:34:10*lucasta joined #nim
14:42:37FromDiscord<pmunch> With the `{.union.}` pragma
14:42:50FromDiscord<pmunch> Easiest is just to use Futhark, it knows all the tricks
14:43:10FromDiscord<pmunch> Is there a way to use a specific config file when building a Nim project?
14:43:36FromDiscord<pmunch> Like `nim c --useConfig=myconfig.nims program.nim`
14:49:12FromDiscord<nasuray> really seems like no...which is surprising
14:55:42FromDiscord<pmunch> Managed to hack around it
14:56:01FromDiscord<pmunch> Creating a strdefine in my config.nims, and then a small macro to include whatever the strdefine pointed to
15:04:18FromDiscord<basilajith> In reply to @basilajith "I'm trying to insert": Any idea; anyone?
15:39:06*xet7 quit (Quit: Leaving)
16:22:08*lucasta quit (Quit: Leaving)
17:01:03*coldfeet joined #nim
18:26:36FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=FIDoJJaH
18:26:41*dvbst joined #nim
20:06:21FromDiscord<kiloneie> In reply to @Elegantbeef "Jetbrains' Nim extension is": What does that mean "from the ground up" ? Who made that extension ?
20:13:07FromDiscord<Elegantbeef> It means it does not use any existent tooling and they reinvented the symbol suggestion and autocompletion that nimsuggest haves
20:18:40*coldfeet quit (Remote host closed the connection)
20:29:44FromDiscord<firasuke> Is this still true? Does the order of arguments to nim matter? https://media.discordapp.net/attachments/371759389889003532/1296570865592303797/image.png?ex=6712c537&is=671173b7&hm=96b0fdda4f2b26d670df35f7ec893bd0c1308b3ebeda2d505818178c78362a96&
20:36:02FromDiscord<kiloneie> In reply to @Elegantbeef "It means it does": oO why would they do that for ?
20:37:04FromDiscord<kiloneie> i wish Geany had Nim LSP...
20:46:59FromDiscord<Elegantbeef> So setup nimlangserver for geany?
20:47:07*dvbst quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
20:48:09FromDiscord<Elegantbeef> All you have to is add to the config https://github.com/techee/geany-lsp/blob/master/lsp/data/lsp.conf#L514-L520
20:48:12FromDiscord<Elegantbeef> It doesn't take a genius 😄
21:05:49*ntat quit (Quit: Leaving)
21:25:49FromDiscord<kiloneie> I change that and build the thing ?↵↵Idk i asked about autocomplete for nim in Geany's matrix server and they said it's not possible due to Nim's LSP not having ctags(i don't know what that is exactly), so i said, meh.
21:26:08FromDiscord<kiloneie> I will give it a try tomorrow, bed time of the sick day...
21:36:38FromDiscord<Elegantbeef> You don't even need to change anything
21:36:49FromDiscord<Elegantbeef> I mean build it
21:36:50FromDiscord<Elegantbeef> Heh
21:36:57FromDiscord<Elegantbeef> It's just a local config
21:37:49FromDiscord<Elegantbeef> `nim` does have ctags so might be able to bodge it together
21:40:32FromDiscord<Elegantbeef> Though it does seem that the geany LSP has autocomplete
21:43:57FromDiscord<Elegantbeef> Kate does seem faster than geany
22:52:50*rockcavera joined #nim
23:11:51FromDiscord<.bobbbob> sent a code paste, see https://play.nim-lang.org/#pasty=lqsFXJYa
23:13:06FromDiscord<Elegantbeef> Aliases are only for your shell, so you need to have a real `clang` in path
23:13:32FromDiscord<Elegantbeef> You can always do `--cc:clang --clang.exe=clang-18 --clang.linkerexe=clang-18` but really `clang` should run
23:14:13FromDiscord<.bobbbob> would having a ln to clang-18 or put an alias in my .profile be better?
23:14:55FromDiscord<Elegantbeef> Like i said the alias likely is not what you want
23:16:52FromDiscord<.bobbbob> yeah doing a link works, thx