<< 29-01-2025 >>

00:43:20*rockcavera quit (Ping timeout: 272 seconds)
01:03:21*arkanoid quit (Ping timeout: 252 seconds)
01:07:16*hernan604 is now known as HER
01:08:43*rockcavera joined #nim
03:22:50FromDiscord<yummy_licorice> is there any better way of implementing this?
03:22:52FromDiscord<yummy_licorice> https://github.com/arashi-software/seine/blob/master/seine/output.nim
03:23:08FromDiscord<yummy_licorice> preferably without an emit call for the constructor
03:23:29FromDiscord<yummy_licorice> but it does get the job done as it is ig
03:25:38FromDiscord<lainlaylie> i wonder if the constructor pragma would be useful here
03:27:39FromDiscord<demotomohiro> In reply to @yummy_licorice "is there any better": There are example code that shows how to wrap C++'s new operator: https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-procs
03:29:19*rockcavera quit (Remote host closed the connection)
03:33:29FromDiscord<yummy_licorice> In reply to @demotomohiro "There are example code": thank you
03:39:16FromDiscord<yummy_licorice> i think the type names are scrambled
03:39:17FromDiscord<yummy_licorice> since
03:39:21FromDiscord<yummy_licorice> i get this error
03:39:26FromDiscord<yummy_licorice> sent a code paste, see https://paste.rs/63Pvs
03:50:20FromDiscord<lainlaylie> exportc maybe?
03:53:30FromDiscord<yummy_licorice> yea that did the trick
03:53:32FromDiscord<yummy_licorice> thanks
04:41:02*alexdaguy joined #nim
04:59:12*m5zs7k quit (Ping timeout: 272 seconds)
05:06:50*m5zs7k joined #nim
05:21:18*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
05:21:45*SchweinDeBurg joined #nim
08:01:25FromDiscord<tauruuuuuus> In reply to @demotomohiro "I did quick test": Got it thanks for the info! I just need to interface with c a lot and would rather not touch c++ even as a target for Nim 😛 but I remember reading about that post talking of the real overhead of exceptions and it was quite interesting
08:41:37FromDiscord<oranwutan_78823> Is there any free LLM available (whether for running locally or online) as an aid for coding with nim (for code completion or code suggestion)?
08:44:13FromDiscord<nnsee> are you a student? github has the student pack, which includes copilot for free
08:44:33FromDiscord<nnsee> as a warning i should say that LLM's aren't _too_ great at nim
08:44:37FromDiscord<nnsee> compared to other languages, at least
08:44:37FromDiscord<oranwutan_78823> In reply to @nnsee "are you a student?": No, I'm not
08:45:10FromDiscord<ringabout> Github Copilot has a free plan
08:45:34FromDiscord<oranwutan_78823> In reply to @ringabout "Github Copilot has a": But it is not unlimited
08:46:29FromDiscord<nnsee> most LLMs, even paid ones, aren't unlimited. what hardware are you running on? there's plenty of open source models you can try if you have decent hardware
08:48:00FromDiscord<michael.lenz.> I tried copilot. Not impressed to be honest
08:48:30FromDiscord<oranwutan_78823> My setup is not so great, I could work with a model of max 7 or 8B
08:49:44*tokyovigilante_ joined #nim
08:50:00*tokyovigilante quit (Ping timeout: 246 seconds)
08:50:00*tokyovigilante_ is now known as tokyovigilante
08:50:08FromDiscord<oranwutan_78823> In reply to @nnsee "most LLMs, even paid": I meant that the free copilot seems very limited to me
08:50:30FromDiscord<nnsee> In reply to @michael.lenz. "I tried copilot. Not": when i used copilot, i found it to be... okay. it generally didn't provide me suggestions that were flat out wrong or annoying, it mostly automated doing the "grunt work" of writing some tedious code. sometimes it scared me by suggesting some code that would make me go "how in the heck did it know I was going to write that next"
08:51:27FromDiscord<oranwutan_78823> "GitHub Copilot offers a free tier that provides up to 2,000 code completions and 50 chat messages per month" Isn't that too little???
08:52:51FromDiscord<nnsee> it sort of bothered me in rust because it sometimes insisted on calling `.unwrap()` on values that could've easily been `?`'d. so sometimes it had really bad context awareness, but sometimes it had mind boggling psychic-ability context awareness
08:53:36FromDiscord<nnsee> i stopped using it after my github pro ran out, and i missed it for like the first week or so, but now i'm back to writing code without LLM code completion and i don't really miss it at all
08:57:39FromDiscord<oranwutan_78823> It is certainly true that github copilot pro plan is not so expensive, 10$/month. With unlimited access, they say
09:21:22*nyeaa49284230101 quit (Ping timeout: 252 seconds)
09:30:50FromDiscord<albassort> https://github.com/ire4ever1190/taskman/blob/81ef3911d5343c633afed336bcfa3c7f976edddf/src/taskman.nim#L417
09:30:57FromDiscord<albassort> is there anyway to make this proc gcsafe?
09:31:05FromDiscord<albassort> well, that is, have the {.gscafe.}
09:31:50FromDiscord<albassort> there is the "effectsOf: a" but the dynamic dispatch variables are made in the body and are not a param
09:32:17FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=IoTuUEYl
09:36:24FromDiscord<yummy_licorice> In reply to @nnsee "as a warning i": llms have this fun habbit of fabricating libraries and functions and even entire API's out of thin air 😭
09:37:24FromDiscord<intellij_gamer> In reply to @albassort "is there anyway to": I'll take a look, seems like it should be
09:43:14FromDiscord<nnsee> are you stalking the chat or did you just happen to be here when albassort posted that? 😄
09:43:52FromDiscord<intellij_gamer> I just opened the chat at the right time haha
09:44:14FromDiscord<albassort> very lucky
09:44:39FromDiscord<intellij_gamer> But hmm, if I make the handlers have the requirement of being gcsafe then it works. Although that would be a breaking change.↵iirc I used to enforce it when threads were on but removed it cause it made the error messages less clear
09:45:05FromDiscord<intellij_gamer> `-d:taskman.gcsafe` flag maybe?
09:48:23FromDiscord<albassort> its a bit surprising to me that its not enforced because its pretty obvious taskman would be run in highly parrelel systems, probably often on threads
09:48:31FromDiscord<albassort> (edit) "parrelel" => "parallel"
09:52:26FromDiscord<albassort> im not sure how you owuld make this gcsafe. Maybe assume gcsafe, and the emit the error if any of the procs which are processed are not gcsafe?
09:52:32FromDiscord<albassort> (edit) "im not sure how you owuld make this gcsafe. Maybe assume gcsafe, and the emit the error if any of the procs which are processed are not gcsafe? ... " added "👁️"
09:57:32*beholders_eye joined #nim
10:02:18FromDiscord<intellij_gamer> sent a long message, see https://pasty.ee/KQDKGmPb
10:05:08*nyeaa49284230101 joined #nim
10:06:33FromDiscord<albassort> In reply to @intellij_gamer "Basically just a matter": a overload with {.gcsafe.} would make it apparent
10:07:06FromDiscord<albassort> also remember, experienced nim developers are like geniuses at reading useless compiler errors
12:32:41FromDiscord<pmunch> Are there any packages to do things like a windowed running average?
12:47:07FromDiscord<spotlightkid> I would start looking here\: https://github.com/ringabout/awesome-nim?tab=readme-ov-file#data-processing
12:48:23FromDiscord<spotlightkid> pmunch, while I see you here\: is there a way in futhark to mark wrapped functions as `discardable`?
12:50:44FromDiscord<spotlightkid> I recently wrapped https://gitlab.com/lv2/pugl for my own use and almost all functions return an error status, but most of the time you don't really care about it.
12:52:58FromDiscord<pmunch> Oh, good question! Unfortunately there is no way to mark a function as discardable, but please create an issue about it, I'd love to implement it
12:53:35strogon14Cool. Will do.
13:03:27FromDiscord<frusadev> Hi !↵Is it possible to use a type before it's declared ? (forward declaration)
13:04:38FromDiscord<odexine> no
13:05:01FromDiscord<nnsee> does `{.experimental: "codeReordering".}` not work?
13:26:08FromDiscord<Robyn [She/Her]> In reply to @pmunch "Oh, good question! Unfortunately": Tbf, potentially a `{.push discardable.}; #[ futhark code ]#; {.pop.}` would work
13:27:47FromDiscord<spotlightkid> yeah, but that would apply to the whole wrapper code generated by futhark.
13:28:39FromDiscord<spotlightkid> Including possibly functions that you don't want to be discardable.
13:35:47*alexdaguy quit (Quit: w)
13:36:17FromDiscord<pmunch> Hmm, maybe I should tag every procedure with a pragma and emit a `when not declared(futharkGenerated): {.pragma futharkGenerated.}` in the top of each file.
13:36:45FromDiscord<pmunch> That way you could override `futharkGenerated` with a macro and post-process everything however you liked
14:13:10FromDiscord<Robyn [She/Her]> In reply to @spotlightkid "Including possibly functions that": yeahh
14:23:31*marcus quit (Remote host closed the connection)
14:24:45*marcus joined #nim
16:54:04*coldfeet joined #nim
17:22:02*ntat joined #nim
17:44:48*beholders_eye quit (Ping timeout: 252 seconds)
18:53:13*ntat quit (Quit: Leaving)
20:10:57FromDiscord<oranwutan_78823> In reply to @michael.lenz. "I tried copilot. Not": I've just tried it with nim in vscode, you're right, it works pretty bad
20:55:49FromDiscord<nnsee> In reply to @oranwutan_78823 "I've just tried it": this is less of a copilot thing and more of a "literally every LLM" thing
20:56:18FromDiscord<nnsee> the problem is that compared to other languages, there isn't too much nim code in public datasets or online to train LLMs on
21:07:47FromDiscord<oranwutan_78823> In reply to @nnsee "the problem is that": Agree! I've tested with other languages and it preformed well, even with R, which is a not so "famous" language. ↵I think we will have to wait for the need next round of neural networks training and, perhaps, they include more nim language examples in them
21:15:24*coldfeet quit (Quit: Lost terminal)
21:45:50FromDiscord<nnsee> In reply to @oranwutan_78823 "Agree! I've tested with": i think R has the benefit of being quite a common language in statistical analysis and data science, which means it's a lot more prevalent in different research papers, which LLMs are often trained on
21:54:38*rockcavera joined #nim
22:22:42*rockcavera quit (Remote host closed the connection)
22:22:58FromDiscord<oranwutan_78823> I think that R has the benefit of being the best language ever! But I should not say that in a nim channel 🤣↵↵Now, seriously, I think that is disappointing that nim hasn't gained the attention or deserves. I'm just learning about it and I like it a lot, compared with other languages is very friendly and legible
22:23:22FromDiscord<oranwutan_78823> (edit) "or" => "it"
22:25:45*rockcavera joined #nim
23:25:51FromDiscord<sleeves> why use LSP and LLMs when you can have 10 tabs of documentation open at all times like god intended?