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:24 | FromDiscord | <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:58 | FromDiscord | <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:19 | FromDiscord | <janakali> auto-complete and definitions generally work but can sometimes have problems with some macros or templates |
01:57:25 | FromDiscord | <omareladly> In reply to @spaceshaman "What's your background?": media engineering, 2 graphics course : 1. computer graphics 2. Visualization and Animation |
01:58:07 | FromDiscord | <janakali> If it can't find definition, I usually do searchWorkspace (binded to `<leader>sw`) and it finds the function this way. |
02:00:01 | FromDiscord | <janakali> (edit) "function" => "symbol" |
02:06:24 | * | def- quit (Quit: -) |
02:06:36 | * | def- joined #nim |
02:51:17 | FromDiscord | <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:44 | FromDiscord | <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:23 | FromDiscord | <omareladly> I have used python, but for some audio processing assignments |
03:21:01 | FromDiscord | <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:13 | FromDiscord | <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:39 | FromDiscord | <riku5543> Have concepts been implemented in nim? It used to be in the experimental section but now it's gone |
08:54:32 | Amun-Ra | yes |
08:55:02 | FromDiscord | <riku5543> Is there documentation for them? It doesn't seem to come up in the doc search |
08:55:22 | Amun-Ra | https://nim-lang.org/docs/manual_experimental.html#concepts |
08:55:34 | Amun-Ra | still in experimental :) |
08:56:46 | FromDiscord | <riku5543> I'm so confused, I thought I ctrl+f'd it but I guess I somehow missed it haha. Thanks |
08:56:59 | FromDiscord | <riku5543> (don't code at 2am) |
08:57:10 | Amun-Ra | hehe, been that done that ;) |
09:25:18 | Amun-Ra | s/that/there/ |
09:30:12 | FromDiscord | <riku5543> sent a code paste, see https://play.nim-lang.org/#pasty=xocFflAM |
09:33:42 | Amun-Ra | https://play.nim-lang.org/#pasty=DwKXbEMH |
09:33:48 | FromDiscord | <janakali> sent a code paste, see https://play.nim-lang.org/#pasty=xrbZeYEE |
09:35:22 | Amun-Ra | or even https://play.nim-lang.org/#pasty=TYExUmnE |
09:36:51 | FromDiscord | <riku5543> sent a code paste, see https://play.nim-lang.org/#pasty=GBKbKNqK |
09:37:21 | Amun-Ra | you 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:02 | Amun-Ra | and 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:07 | FromDiscord | <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:50 | FromDiscord | <riku5543> Ooh yeah I love that you can just define things when compiling, would be good for program features |
09:40:58 | Amun-Ra | mhm |
09:42:05 | FromDiscord | <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:50 | Amun-Ra | keep 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:55 | Amun-Ra | have* |
09:45:56 | FromDiscord | <riku5543> I'd love to see Nim become even more mainstream haha. I absolutely love this language |
09:46:31 | FromDiscord | <odexine> Maybe a warning but most people’s pain point with Nim is tooling |
09:47:49 | FromDiscord | <Robyn [She/Her]> ^^^ |
09:48:19 | FromDiscord | <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:25 | FromDiscord | <Robyn [She/Her]> also error messages can be unintuitive and Araq has no desire to improve them :p |
09:49:16 | FromDiscord | <riku5543> I've dabbled in C interop and yeah haha. Very fun stuff though, porting libraries can be fun |
09:49:49 | Amun-Ra | I love writing lib wrappers :> |
10:05:02 | * | ntat quit (Quit: Leaving) |
10:18:46 | FromDiscord | <odexine> https://github.com/git/git/security/advisories/GHSA-8h77-4q3w-gfgv↵I think this is important enough to post in main |
10:19:10 | FromDiscord | <odexine> Seems like there is an RCE in git |
10:19:31 | FromDiscord | <odexine> Recommend to update, listed patched versions in webpage |
10:19:47 | FromDiscord | <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:31 | FromDiscord | <odexine> It’s quite old (half a year) I guess but maybe not everyone updated their version of git |
10:40:38 | FromDiscord | <albassort> how can i write a macro that iterates over an Object as a key val pair |
10:41:03 | FromDiscord | <albassort> and also write a function which generates an arbitrary object in the same vein |
10:46:44 | FromDiscord | <albassort> std/iterators field's |
10:46:46 | FromDiscord | <albassort> (edit) "std/iterators field's ... " added "does this" |
10:46:49 | FromDiscord | <albassort> 👁️ |
10:53:33 | FromDiscord | <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:35 | Amun-Ra | yes |
10:56:48 | FromDiscord | <albassort> In reply to @Amun-Ra "yes": sorry i misphrased, how do i do this? |
10:57:37 | Amun-Ra | if 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:53 | Amun-Ra | https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CS%2CT |
11:00:19 | Amun-Ra | and you can use "quote do" for object creation |
11:01:46 | * | kenran quit (Remote host closed the connection) |
11:02:53 | Amun-Ra | this is my (a somewhat large) example of using fieldPairs iterator: https://play.nim-lang.org/#pasty=aWOlHnFa |
11:05:54 | FromDiscord | <odexine> You can set values using the value part of field pairs |
11:07:13 | FromDiscord | <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:18 | FromDiscord | <albassort> In reply to @odexine "So if you iterate": oh smart i didn't think of it as a ref |
11:09:34 | Amun-Ra | hmm, same |
11:10:15 | FromDiscord | <odexine> It’s kind of obscure |
11:11:26 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=hLrpAhDJ |
11:11:32 | FromDiscord | <albassort> :) |
11:13:52 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=xgisMTRN |
11:14:20 | FromDiscord | <albassort> i will write a minimal aspnet clone with this |
11:14:33 | FromDiscord | <odexine> Have fun |
11:36:52 | FromDiscord | <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:51 | FromDiscord | <ironic.v2> message auto deleted? kek |
11:38:25 | FromDiscord | <odexine> Not sure what you mean |
11:38:33 | FromDiscord | <ironic.v2> i posted a message and it got auto deleted |
11:39:11 | FromDiscord | <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:14 | FromDiscord | <ironic.v2> https://media.discordapp.net/attachments/371759389889003532/1301510791132090450/image.png?ex=6724bde1&is=67236c61&hm=94f865e3cea2219abf4d147ef78f99b9b3ae24b8a2e7dc712ba233a46f34be21& |
11:39:51 | FromDiscord | <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:18 | FromDiscord | <odexine> It’s prolly a bug within Nim (specifically the term rewriting macros which is what it used to replace string literals) |
11:40:25 | FromDiscord | <odexine> No idea what it could be aside from that |
11:40:35 | FromDiscord | <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:03 | FromDiscord | <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:04 | FromDiscord | <ironic.v2> thanks anyway |
11:41:29 | FromDiscord | <odexine> Think you don’t need to change anything if you want to use it manually? Not sure |
11:42:59 | FromDiscord | <ironic.v2> seems you're right yeah, cheers |
13:41:38 | * | beholders_eye joined #nim |
13:42:02 | * | alexdaguy quit (Quit: w) |
13:42:27 | FromDiscord | <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:32 | FromDiscord | <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:51 | FromDiscord | <guzba8> (edit) "In reply to @chronos.vitaqua "I wonder why zippy": the answer to this ... is" added "type of question" |
15:34:48 | FromDiscord | <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:09 | FromDiscord | <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:03 | FromDiscord | <albassort> is it illegal to add a Channel to an array now? |
16:56:43 | FromDiscord | <albassort> sent a long message, see https://pasty.ee/oicZtSmj |
16:56:52 | FromDiscord | <albassort> (edit) "long message," => "code paste," | "https://pasty.ee/bZCASBZU" => "https://play.nim-lang.org/#pasty=DkaSfVDs" |
16:56:55 | FromDiscord | <albassort> i swear this was not undefined before |
17:00:26 | FromDiscord | <albassort> it works here |
17:00:29 | FromDiscord | <albassort> hmmmmMMMMMMMMMMMMMMM |
17:00:36 | FromDiscord | <albassort> probably an issue wiuth ref objects |
17:02:31 | FromDiscord | <albassort> eh whatever, fixed :) |
17:07:11 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "eh whatever, fixed :)": how did you fix it? |
17:07:53 | FromDiscord | <albassort> i was fighting it but I just used create |
17:08:37 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=RqoIjgbX |
17:08:46 | FromDiscord | <albassort> this works enough |
17:08:55 | FromDiscord | <albassort> if you dont do create it will break |
17:19:35 | FromDiscord | <plantjames230> https://i.imgur.com/mXnwVkg.png |
17:20:39 | FromDiscord | <albassort> In reply to @plantjames230 "https://i.imgur.com/mXnwVkg.png": hey what the fuck |
17:21:14 | FromDiscord | <albassort> @Phil is shitposting allowed in general |
17:22:44 | Amun-Ra | I've never seen a soul more lost that this one |
17:23:12 | FromDiscord | <albassort> This is mental illness and is disconcerting |
17:23:39 | Amun-Ra | one at the peak |
17:23:43 | FromDiscord | <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:24 | FromDiscord | <albassort> huh |
17:26:33 | Amun-Ra | admins will sort that out, time to run for a while, later :> |
17:30:46 | FromDiscord | <Phil> In reply to @albassort "<@180601887916163073> is shitposting allowed": No |
17:31:01 | FromDiscord | <Phil> Man, when I'm right in the flow with Angular too 😄 |
17:31:07 | FromDiscord | <albassort> Take a look at uhh... that there image |
17:31:29 | FromDiscord | <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:02 | FromDiscord | <Phil> Ban has been applied, deleted the message as well |
18:35:01 | FromDiscord | <albassort> createThread seems to be faster |
18:56:36 | FromDiscord | <TFed> GC-unsafe functions... is this a big problem? |
18:56:50 | FromDiscord | <TFed> shall i rewrite them? or i can keep them as it is |
19:01:12 | FromDiscord | <TFed> As far as I understand, it's a function where I reassign the return value more than once |
19:03:25 | FromDiscord | <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:53 | Amun-Ra | that's not a reassigning return value |
19:10:30 | Amun-Ra | what makes a function not gc-safe is for example: accessing global variable using GC memory |
19:38:25 | FromDiscord | <TFed> I'll dive more deep into this, perhaps i know where i made public variables |
19:39:34 | Amun-Ra | having non-gcsafe proc is fine - it's just you have to remember pros and cons |
19:41:25 | FromDiscord | <TFed> yup, i have made local variables, and issue is fixed, thanks |
19:41:50 | FromDiscord | <TFed> yup, i have added optional params for functions, and issue is fixed, thanks |
19:43:39 | Amun-Ra | no worries :) |
19:43:47 | Amun-Ra | glad I could help |
19:47:26 | FromDiscord | <Phil> In reply to @TFed "GC-unsafe functions... is this": Define gcunsafe |
19:48:20 | FromDiscord | <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:51 | FromDiscord | <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:03 | FromDiscord | <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:36 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "if you dont do": weird |
20:19:49 | FromDiscord | <albassort> In reply to @chronos.vitaqua "weird": not weird |
20:19:57 | FromDiscord | <albassort> should be expected |
20:25:14 | * | ntat quit (Quit: Leaving) |
20:50:23 | * | lucasta joined #nim |
21:37:12 | FromDiscord | <Elegantbeef> @grumblygibson Do not use references directly and use `Option[ref]` 😄 |
21:37:52 | FromDiscord | <Elegantbeef> Worth noting even if Nimsuggest has nil ref errors it is memory safe |
21:45:48 | FromDiscord | <albassort> i cant share a Request accross threads |
21:46:00 | FromDiscord | <albassort> (AsyncSocket) |
21:46:16 | FromDiscord | <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:38 | FromDiscord | <Elegantbeef> Gc'd memory being shared across threads will end badly |
21:46:45 | FromDiscord | <Elegantbeef> Especially async logic |
21:47:10 | FromDiscord | <albassort> its noot my fault they programmed it in async |
21:49:37 | FromDiscord | <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:44 | FromDiscord | <albassort> no? |
21:49:54 | FromDiscord | <albassort> i'd be better off making my own http server with blackjack and hookers |
21:50:26 | FromDiscord | <albassort> (in sync and not async) |
21:53:37 | FromDiscord | <Elegantbeef> I don't even know what you're asking about |
21:54:07 | FromDiscord | <albassort> i am simply sad by this developed |
21:59:24 | * | beholders_eye quit (Ping timeout: 265 seconds) |
22:02:36 | FromDiscord | <grumblygibson> sent a long message, see https://pasty.ee/dLLgbkIB |
22:02:57 | FromDiscord | <grumblygibson> (edit) "https://pasty.ee/fbaapDwj" => "https://pasty.ee/ZxSVJFeC" |
22:03:46 | FromDiscord | <Elegantbeef> well Nimsuggest is a compiler that is modified to be fast |
22:03:56 | FromDiscord | <Elegantbeef> So it skips some parts of the compilation process which causes bugs |
22:04:16 | FromDiscord | <Elegantbeef> NIR and IC allows you to instead query known data, so it's a different program |
22:04:38 | FromDiscord | <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:30 | FromDiscord | <determiedmech1> lol |