<< 31-10-2024 >>

00:00:33*lucasta quit (Quit: Leaving)
00:04:46*tiorock joined #nim
00:04:46*tiorock quit (Changing host)
00:04:46*tiorock joined #nim
00:04:46*rockcavera quit (Killed (molybdenum.libera.chat (Nickname regained by services)))
00:04:46*tiorock is now known as rockcavera
00:08:20*tiorock joined #nim
00:08:20*tiorock quit (Changing host)
00:08:20*tiorock joined #nim
00:08:20*rockcavera is now known as Guest4310
00:08:20*Guest4310 quit (Killed (mercury.libera.chat (Nickname regained by services)))
00:08:20*tiorock is now known as rockcavera
00:10:26*tiorock joined #nim
00:10:26*tiorock quit (Changing host)
00:10:26*tiorock joined #nim
00:10:26*rockcavera is now known as Guest628
00:10:26*Guest628 quit (Killed (lead.libera.chat (Nickname regained by services)))
00:10:26*tiorock is now known as rockcavera
00:15:03*tiorock joined #nim
00:15:03*rockcavera quit (Killed (mercury.libera.chat (Nickname regained by services)))
00:15:03*tiorock is now known as rockcavera
00:32:42*rockcavera quit (Remote host closed the connection)
00:42:24FromDiscord<spaceshaman> In reply to @omareladly "are there any resources": What's your background?
00:57:13*lucasta joined #nim
01:15:18*alice quit (Ping timeout: 276 seconds)
01:16:16*alice joined #nim
01:54:58FromDiscord<janakali> In reply to @latchk3y "hi, probably just popping": look at my config at https://codeberg.org/janAkali/dotfiles/src/branch/main/config/nvim↵I'm using built-in neovim lsp + treesitter for syntax highlighting↵about LSP not recognising new packages -> you need to reload langserver after you install new package, `:LspRestart`
01:56:19FromDiscord<janakali> auto-complete and definitions generally work but can sometimes have problems with some macros or templates
01:57:25FromDiscord<omareladly> In reply to @spaceshaman "What's your background?": media engineering, 2 graphics course : 1. computer graphics 2. Visualization and Animation
01:58:07FromDiscord<janakali> If it can't find definition, I usually do searchWorkspace (binded to `<leader>sw`) and it finds the function this way.
02:00:01FromDiscord<janakali> (edit) "function" => "symbol"
02:06:24*def- quit (Quit: -)
02:06:36*def- joined #nim
02:51:17FromDiscord<spaceshaman> In reply to @omareladly "media engineering, 2 graphics": I mean like, what languages have you used extensively
02:56:37*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
02:57:02*SchweinDeBurg joined #nim
03:19:44FromDiscord<omareladly> In reply to @spaceshaman "I mean like, what": Mostly : ↵JavaScript, Java, Go and C ↵↵I have made an endless runner in C++ and OpenGl
03:20:23FromDiscord<omareladly> I have used python, but for some audio processing assignments
03:21:01FromDiscord<omareladly> Like numpy, scipy, Librosa…etc
03:42:30*lucasta quit (Quit: Leaving)
05:08:27*alexdaguy joined #nim
05:50:14*ntat joined #nim
06:40:47*xet7 quit (Quit: Leaving)
06:41:27*xet7 joined #nim
07:25:32*kenran joined #nim
07:37:46*Deadm0th joined #nim
08:27:13FromDiscord<demotomohiro> In reply to @omareladly "are there any resources": If you don't do graphics programming, CUDA is easier than OpenGL in my old experience and there are many learning resources.↵But you need to know C and your code works only with NVIDIA GPU.↵You might be interested in this recent Nimconf video: https://www.youtube.com/watch?v=j_J4yxntMe0&list=PLxLdEZg8DRwSkT93RIO-CoY-MxHOjYzs2&index=10
08:53:39FromDiscord<riku5543> Have concepts been implemented in nim? It used to be in the experimental section but now it's gone
08:54:32Amun-Rayes
08:55:02FromDiscord<riku5543> Is there documentation for them? It doesn't seem to come up in the doc search
08:55:22Amun-Rahttps://nim-lang.org/docs/manual_experimental.html#concepts
08:55:34Amun-Rastill in experimental :)
08:56:46FromDiscord<riku5543> I'm so confused, I thought I ctrl+f'd it but I guess I somehow missed it haha. Thanks
08:56:59FromDiscord<riku5543> (don't code at 2am)
08:57:10Amun-Rahehe, been that done that ;)
09:25:18Amun-Ras/that/there/
09:30:12FromDiscord<riku5543> sent a code paste, see https://play.nim-lang.org/#pasty=xocFflAM
09:33:42Amun-Rahttps://play.nim-lang.org/#pasty=DwKXbEMH
09:33:48FromDiscord<janakali> sent a code paste, see https://play.nim-lang.org/#pasty=xrbZeYEE
09:35:22Amun-Raor even https://play.nim-lang.org/#pasty=TYExUmnE
09:36:51FromDiscord<riku5543> sent a code paste, see https://play.nim-lang.org/#pasty=GBKbKNqK
09:37:21Amun-Rayou don't need let for compile-time constants, you can use when thanks to const and compile out unused code, and when does not change the scope
09:40:02Amun-Raand if you make that const booldefine you don't have to change the source at all when switching between dev/non-dev mode: nim "c file.nim" and "nim c -d=devMode=1 file.nim"
09:40:07FromDiscord<riku5543> Another solution for this type of problem is just having the "scan" proc actually just be part of the object you're making in case you want to change what it does depending on circumstances. Maybe useful for something really big idk
09:40:50FromDiscord<riku5543> Ooh yeah I love that you can just define things when compiling, would be good for program features
09:40:58Amun-Ramhm
09:42:05FromDiscord<riku5543> I'm not really building anything real atm but I was hoping to learn something from all this to maybe simplify the code I write, because sometimes I think I have a habit of over-abstracting or writing things in a more complicated way than it needs to be
09:44:50Amun-Rakeep it simple, nim is not rust, you won't have to change 90% of your code later because of a small change that has to be implemented ;)
09:44:55Amun-Rahave*
09:45:56FromDiscord<riku5543> I'd love to see Nim become even more mainstream haha. I absolutely love this language
09:46:31FromDiscord<odexine> Maybe a warning but most people’s pain point with Nim is tooling
09:47:49FromDiscord<Robyn [She/Her]> ^^^
09:48:19FromDiscord<riku5543> Yeah I struggled getting good syntax highlighting/error checking with vscode and stuff. I always figure it out but it can be complicated. I'm trying out Zed since it's way faster to open and stuff. It's missing a few language features like commenting and suggestions while typing procs, but it's enjoyable nevertheless
09:48:25FromDiscord<Robyn [She/Her]> also error messages can be unintuitive and Araq has no desire to improve them :p
09:49:16FromDiscord<riku5543> I've dabbled in C interop and yeah haha. Very fun stuff though, porting libraries can be fun
09:49:49Amun-RaI love writing lib wrappers :>
10:05:02*ntat quit (Quit: Leaving)
10:18:46FromDiscord<odexine> https://github.com/git/git/security/advisories/GHSA-8h77-4q3w-gfgv↵I think this is important enough to post in main
10:19:10FromDiscord<odexine> Seems like there is an RCE in git
10:19:31FromDiscord<odexine> Recommend to update, listed patched versions in webpage
10:19:47FromDiscord<odexine> If you CBA here: Patched versions: ↵v2.45.1 v2.44.1 v2.43.4 v2.42.2 v2.41.1 v2.40.2 v2.39.4
10:20:31FromDiscord<odexine> It’s quite old (half a year) I guess but maybe not everyone updated their version of git
10:40:38FromDiscord<albassort> how can i write a macro that iterates over an Object as a key val pair
10:41:03FromDiscord<albassort> and also write a function which generates an arbitrary object in the same vein
10:46:44FromDiscord<albassort> std/iterators field's
10:46:46FromDiscord<albassort> (edit) "std/iterators field's ... " added "does this"
10:46:49FromDiscord<albassort> 👁️
10:53:33FromDiscord<albassort> In reply to @albassort "and also write a": Is there a way to assign variables based on a string of their field name
10:55:35Amun-Rayes
10:56:48FromDiscord<albassort> In reply to @Amun-Ra "yes": sorry i misphrased, how do i do this?
10:57:37Amun-Raif I understand you correctly - you have a string that contains object field name and you want to set the value of that field, right?
10:58:53Amun-Rahttps://nim-lang.org/docs/iterators.html#fieldPairs.i%2CS%2CT
11:00:19Amun-Raand you can use "quote do" for object creation
11:01:46*kenran quit (Remote host closed the connection)
11:02:53Amun-Rathis is my (a somewhat large) example of using fieldPairs iterator: https://play.nim-lang.org/#pasty=aWOlHnFa
11:05:54FromDiscord<odexine> You can set values using the value part of field pairs
11:07:13FromDiscord<odexine> So if you iterate over an object using field pairs, the second half of the result (value) is essentially a “reference to the field” of that object which you can set, given the object is mutable of course
11:09:18FromDiscord<albassort> In reply to @odexine "So if you iterate": oh smart i didn't think of it as a ref
11:09:34Amun-Rahmm, same
11:10:15FromDiscord<odexine> It’s kind of obscure
11:11:26FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=hLrpAhDJ
11:11:32FromDiscord<albassort> :)
11:13:52FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=xgisMTRN
11:14:20FromDiscord<albassort> i will write a minimal aspnet clone with this
11:14:33FromDiscord<odexine> Have fun
11:36:52FromDiscord<ironic.v2> hey all, using nim for some tooling & having an issue with the `strenc` package. is there a known reason for why it doesn't encrypt all strings in longer files? https://media.discordapp.net/attachments/371759389889003532/1301510196987957318/image.png?ex=6724bd53&is=67236bd3&hm=65f5b758466c4b66d16771f5cd3c321c3c2b08409549456a7bb903d7335b2797&
11:37:51FromDiscord<ironic.v2> message auto deleted? kek
11:38:25FromDiscord<odexine> Not sure what you mean
11:38:33FromDiscord<ironic.v2> i posted a message and it got auto deleted
11:39:11FromDiscord<ironic.v2> ill ask again ig, it's regarding the `strenc` module that was made a couple of times. is there any known work-arounds to it not encrypting all strings in bigger projects?
11:39:14FromDiscord<ironic.v2> https://media.discordapp.net/attachments/371759389889003532/1301510791132090450/image.png?ex=6724bde1&is=67236c61&hm=94f865e3cea2219abf4d147ef78f99b9b3ae24b8a2e7dc712ba233a46f34be21&
11:39:51FromDiscord<ironic.v2> i tried messing around with the values, but that didn't do anything so curious if there's a known reason for this or if im missing something
11:40:18FromDiscord<odexine> It’s prolly a bug within Nim (specifically the term rewriting macros which is what it used to replace string literals)
11:40:25FromDiscord<odexine> No idea what it could be aside from that
11:40:35FromDiscord<ironic.v2> yeah that's what I thought, I saw a post on the nim forum about it but the guy never received an answer
11:41:03FromDiscord<ironic.v2> i'll look into manually writing the macro for each string instead of using the automatic string literal replacement, might work better i suppose
11:41:04FromDiscord<ironic.v2> thanks anyway
11:41:29FromDiscord<odexine> Think you don’t need to change anything if you want to use it manually? Not sure
11:42:59FromDiscord<ironic.v2> seems you're right yeah, cheers
13:41:38*beholders_eye joined #nim
13:42:02*alexdaguy quit (Quit: w)
13:42:27FromDiscord<Robyn [She/Her]> I wonder why zippy doesn't support streaming R/W for zipping and unzipping
14:49:39*lucasta joined #nim
15:01:10*ntat joined #nim
15:23:32FromDiscord<guzba8> In reply to @chronos.vitaqua "I wonder why zippy": the answer to this is basically always "i dont need it and its a big jump in complication"
15:23:51FromDiscord<guzba8> (edit) "In reply to @chronos.vitaqua "I wonder why zippy": the answer to this ... is" added "type of question"
15:34:48FromDiscord<gokr> @guzba8 Just wanted to say I love Mummy. I now have a nice fully websocket backend written with Mummy, a custom JSON based bidirectional protocol (using sunny), pubsub via Redis (just used your advanced example as base) and using Debby ontop of Tidbcloud.com (MySQL compatible serverless). Hosting backend in koyeb.com which is superb. Using whisky, ready as well.
15:53:09FromDiscord<Robyn [She/Her]> In reply to @guzba8 "the answer to this": that's a fair point honestly
16:34:43*alice quit (Read error: Connection reset by peer)
16:45:03*alice joined #nim
16:54:03FromDiscord<albassort> is it illegal to add a Channel to an array now?
16:56:43FromDiscord<albassort> sent a long message, see https://pasty.ee/oicZtSmj
16:56:52FromDiscord<albassort> (edit) "long message," => "code paste," | "https://pasty.ee/bZCASBZU" => "https://play.nim-lang.org/#pasty=DkaSfVDs"
16:56:55FromDiscord<albassort> i swear this was not undefined before
17:00:26FromDiscord<albassort> it works here
17:00:29FromDiscord<albassort> hmmmmMMMMMMMMMMMMMMM
17:00:36FromDiscord<albassort> probably an issue wiuth ref objects
17:02:31FromDiscord<albassort> eh whatever, fixed :)
17:07:11FromDiscord<Robyn [She/Her]> In reply to @albassort "eh whatever, fixed :)": how did you fix it?
17:07:53FromDiscord<albassort> i was fighting it but I just used create
17:08:37FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=RqoIjgbX
17:08:46FromDiscord<albassort> this works enough
17:08:55FromDiscord<albassort> if you dont do create it will break
17:19:35FromDiscord<plantjames230> https://i.imgur.com/mXnwVkg.png
17:20:39FromDiscord<albassort> In reply to @plantjames230 "https://i.imgur.com/mXnwVkg.png": hey what the fuck
17:21:14FromDiscord<albassort> @Phil is shitposting allowed in general
17:22:44Amun-RaI've never seen a soul more lost that this one
17:23:12FromDiscord<albassort> This is mental illness and is disconcerting
17:23:39Amun-Raone at the peak
17:23:43FromDiscord<albassort> also im not liking that nazis are co-opting Amerikkka can we have 1 fucking thing
17:25:04*Amun-Ra is polish and wouldn't recommend that system
17:25:24FromDiscord<albassort> huh
17:26:33Amun-Raadmins will sort that out, time to run for a while, later :>
17:30:46FromDiscord<Phil> In reply to @albassort "<@180601887916163073> is shitposting allowed": No
17:31:01FromDiscord<Phil> Man, when I'm right in the flow with Angular too 😄
17:31:07FromDiscord<albassort> Take a look at uhh... that there image
17:31:29FromDiscord<Phil> Already done, I banned their prior account as well, though you guys didn't see that one, this is like.. the 2nd at a minimum
17:33:02FromDiscord<Phil> Ban has been applied, deleted the message as well
18:35:01FromDiscord<albassort> createThread seems to be faster
18:56:36FromDiscord<TFed> GC-unsafe functions... is this a big problem?
18:56:50FromDiscord<TFed> shall i rewrite them? or i can keep them as it is
19:01:12FromDiscord<TFed> As far as I understand, it's a function where I reassign the return value more than once
19:03:25FromDiscord<TFed> sent a code paste, see https://play.nim-lang.org/#pasty=ugMsKENI
19:06:22*Artea quit (Quit: ZNC 1.9.1 - https://znc.in)
19:08:53Amun-Rathat's not a reassigning return value
19:10:30Amun-Rawhat makes a function not gc-safe is for example: accessing global variable using GC memory
19:38:25FromDiscord<TFed> I'll dive more deep into this, perhaps i know where i made public variables
19:39:34Amun-Rahaving non-gcsafe proc is fine - it's just you have to remember pros and cons
19:41:25FromDiscord<TFed> yup, i have made local variables, and issue is fixed, thanks
19:41:50FromDiscord<TFed> yup, i have added optional params for functions, and issue is fixed, thanks
19:43:39Amun-Rano worries :)
19:43:47Amun-Raglad I could help
19:47:26FromDiscord<Phil> In reply to @TFed "GC-unsafe functions... is this": Define gcunsafe
19:48:20FromDiscord<Phil> But yeah, accessing global variables is never gcsafe. If you know better than the compiler in this front (like you're having a global dictionary that never gets modified after some initialization phase) then you can just tell the compiler to shut up via declaring the proc gcsafe
19:48:51FromDiscord<Phil> (edit) "But yeah, accessing global variables is never gcsafe. If you know better than the compiler in this front ... (like" added "and require a proc to count as gcsafe"
19:52:48*lucasta quit (Quit: Leaving)
20:11:03FromDiscord<grumblygibson> Making memory-safe software with Nim: What are some recommended strategies to avoid problems like those memory problems that nimsuggest has? I haven't looked at nimsuggest code to know if there's much use of manual management.↵↵On the one hand, Nim has Arc/Orc and a GC. On the other hand, Nim's own tools exhibit memory issues. How can new programmers be directed to avoid this? Better unit tests? Use a memory profiler? What woul
20:19:36FromDiscord<Robyn [She/Her]> In reply to @albassort "if you dont do": weird
20:19:49FromDiscord<albassort> In reply to @chronos.vitaqua "weird": not weird
20:19:57FromDiscord<albassort> should be expected
20:25:14*ntat quit (Quit: Leaving)
20:50:23*lucasta joined #nim
21:37:12FromDiscord<Elegantbeef> @grumblygibson Do not use references directly and use `Option[ref]` 😄
21:37:52FromDiscord<Elegantbeef> Worth noting even if Nimsuggest has nil ref errors it is memory safe
21:45:48FromDiscord<albassort> i cant share a Request accross threads
21:46:00FromDiscord<albassort> (AsyncSocket)
21:46:16FromDiscord<Elegantbeef> Also for any list like data type you can do the rust thing of using `seq[int]` as 'pointers' and `seq[T]` for your data, then you have no reference issues cause it's only index issues! 😄
21:46:38FromDiscord<Elegantbeef> Gc'd memory being shared across threads will end badly
21:46:45FromDiscord<Elegantbeef> Especially async logic
21:47:10FromDiscord<albassort> its noot my fault they programmed it in async
21:49:37FromDiscord<albassort> do you think theres a way to both be waiting for new connections and also chec,king if a channel has a result that matches the FD that sent it
21:49:44FromDiscord<albassort> no?
21:49:54FromDiscord<albassort> i'd be better off making my own http server with blackjack and hookers
21:50:26FromDiscord<albassort> (in sync and not async)
21:53:37FromDiscord<Elegantbeef> I don't even know what you're asking about
21:54:07FromDiscord<albassort> i am simply sad by this developed
21:59:24*beholders_eye quit (Ping timeout: 265 seconds)
22:02:36FromDiscord<grumblygibson> sent a long message, see https://pasty.ee/dLLgbkIB
22:02:57FromDiscord<grumblygibson> (edit) "https://pasty.ee/fbaapDwj" => "https://pasty.ee/ZxSVJFeC"
22:03:46FromDiscord<Elegantbeef> well Nimsuggest is a compiler that is modified to be fast
22:03:56FromDiscord<Elegantbeef> So it skips some parts of the compilation process which causes bugs
22:04:16FromDiscord<Elegantbeef> NIR and IC allows you to instead query known data, so it's a different program
22:04:38FromDiscord<albassort> turns out i wrote an http server earlier this year
22:25:09*beholders_eye joined #nim
22:36:37*beholders_eye quit (Ping timeout: 252 seconds)
23:15:50*oprypin quit (Quit: Bye)
23:16:00*oprypin joined #nim
23:46:30FromDiscord<determiedmech1> lol