<< 04-02-2025 >>

00:16:17*arkanoid quit (Ping timeout: 248 seconds)
00:29:36*arkanoid joined #nim
01:09:25*alexdaguy joined #nim
01:29:58*m5zs7k quit (Ping timeout: 252 seconds)
01:30:20FromDiscord<heysokam> In reply to @treeform "I am not a": based on what I see as arguments against unit tests in your post, the issue sounds like badly architected tests that are written after the fact for code that was never written to be tested↵in short, friction everywhere, that would be solved by learning to write testable code↵if tests cannot be deleted and/or midified easily, thats a big symptom of a much bigger problem that is not coming from tes
01:33:46FromDiscord<umi_l> sent a code paste, see https://play.nim-lang.org/#pasty=fzZXdSCx
01:33:59FromDiscord<umi_l> however it doesn't seem possible to pass an array of typedesc to a macro
01:34:27FromDiscord<umi_l> (edit) "https://play.nim-lang.org/#pasty=NVMktyTy" => "https://play.nim-lang.org/#pasty=JjjCsogt"
01:35:12FromDiscord<umi_l> the idea would be to loop through each type and generate its constructor to allow scripts to be instantiated at runtime via their name
01:36:28FromDiscord<Elegantbeef> `varargs[typed]`
01:37:06FromDiscord<treeform> In reply to @heysokam "based on what I": I am speaking from expense here. Adjacent project end up being really badly tested. While my project using my philosophy are way better tested.
01:37:20FromDiscord<treeform> I think this is mainly that every one sucks at writing tests, no one wants to do it.
01:37:38FromDiscord<treeform> I found a way to make test writing take way less effort. So I do it more.
01:37:45FromDiscord<heysokam> ic
01:37:48FromDiscord<treeform> So I get more tests.
01:38:52*m5zs7k joined #nim
01:39:10FromDiscord<treeform> Architecting a project is hard. Making it so its also easily testable introduces another constraint on it. This makes project harder.
01:39:44FromDiscord<treeform> With my print testing hopefully the constraint on making the code testable is less. So you can make it more readable or faster etc... other constraints.
01:40:41FromDiscord<treeform> Print testing is not very invasive technique so hopefully the other code does not have to suffer from being tastible.
01:42:42FromDiscord<treeform> From my stint at Google and their overbearing testing practices left code basically fossilized. It was hard to change anything, because the amount of test rewriting you had to do made a lot of code kind of append only. Very strange place.
01:43:09FromDiscord<treeform> And the strange thing app was still really buggy for the end user. Have you used Google products?
01:44:34*disso-peach quit (Quit: Leaving)
02:31:54FromDiscord<lainlaylie> In reply to @summarity "I did. I'm sure": looks like it could easily be made to be generic over all table-like types
02:39:06*xet7 quit (Remote host closed the connection)
02:49:44*cnx quit (Remote host closed the connection)
02:50:34*cnx joined #nim
07:36:24FromDiscord<arnetheduck> In reply to @treeform "I have a draft": nice idea! there's certainly something here
08:18:30Amun-Rasince proc owner(sym: NimNode): NimNode is now deprecated what's the alternative?
08:21:03*beholders_eye joined #nim
08:25:18FromDiscord<ret_bld_engr_35092> sent a long message, see https://pasty.ee/ZcNExlbU
08:36:24*beholders_eye quit (Ping timeout: 252 seconds)
08:38:06FromDiscord<nnsee> In reply to @ret_bld_engr_35092 "on MacOS, Nim libraries": does this issue not disappear when you install gmp via eg gmp?
08:39:06FromDiscord<nnsee> alternatively, can you link to the details page you mention?
08:40:28FromDiscord<ret_bld_engr_35092> I don't use brew; it conflicts with MacPorts.
08:41:00FromDiscord<ret_bld_engr_35092> https://rosettacode.org/wiki/Category_talk:Nim
08:41:36FromDiscord<ret_bld_engr_35092> I'm able to use gmp with other languages (gmp also comes from MacPorts).
08:41:56FromDiscord<nnsee> In reply to @ret_bld_engr_35092 "I don't use brew;": does it? I had MacPorts and brew installed on my M1 mac at the same time and didn't notice any problems
08:42:04FromDiscord<nnsee> they seemed to be using different paths
08:43:03FromDiscord<ret_bld_engr_35092> MacPorts strongly discurages using both concurrently on the same machine. I've run into weird build issues that went away when I uninstalled brew.
08:43:25FromDiscord<nnsee> In reply to @ret_bld_engr_35092 "MacPorts strongly discurages using": fair enough
08:43:43FromDiscord<nnsee> where is libgmp on the system when installed via macports?
08:45:23FromDiscord<ret_bld_engr_35092> Loks like /opt/local/lib
08:45:39FromDiscord<ret_bld_engr_35092> Looks like
08:46:14FromDiscord<nnsee> In reply to @ret_bld_engr_35092 "https://rosettacode.org/wiki/Category_talk:Nim": essentially, nim does dlopen("libgmp.dylib") (without specifying the full path at all) at runtime if it's in the correct place, it should find and load it with no issues
08:47:26FromDiscord<ret_bld_engr_35092> Perhaps I should forward parts of the email thread I had on the MacPort list regarding this. In essence, they say that Linux-style linking is not correct on MacOS.
08:47:36FromDiscord<nnsee> currently, it's looking at './libgmp.dylib', '/System/Volumes/Preboot/Cryptexes/OSlibgmp.dylib' and '/usr/lib/libgmp.dylib'
08:47:53FromDiscord<nnsee> In reply to @ret_bld_engr_35092 "Perhaps I should forward": yes please
08:49:35FromDiscord<ret_bld_engr_35092> Here is part of one email:
08:49:37FromDiscord<ret_bld_engr_35092> sent a long message, see https://pasty.ee/GcTYaovh
08:59:29*beholders_eye joined #nim
09:06:22FromDiscord<nnsee> In reply to @ret_bld_engr_35092 "I agree, on my": this is tracked here: https://github.com/nim-lang/rfcs/issues/58
09:07:03FromDiscord<nnsee> sorry, not _this_, but the linux variant of this
09:07:13FromDiscord<nnsee> which, overall, encompasses the same problem
09:08:42FromDiscord<nnsee> one of the comments also mentions that you can use `--dynlibOverrideAll` and link the required libraries
09:09:06FromDiscord<nnsee> which, while i haven't tried it on macos myself, i think should work just fine
09:11:54FromDiscord<nnsee> MacPorts might be able to ship this as a default configuration with nim, but I'm not 100% confident about this, someone smarter will have to chime in
10:06:39*rockcavera quit (Remote host closed the connection)
10:24:16FromDiscord<nnsee> sent a long message, see https://pasty.ee/SzqEkKaJ
11:06:39*beholders_eye quit (Ping timeout: 245 seconds)
11:29:42*m5zs7k quit (Ping timeout: 246 seconds)
11:35:48*m5zs7k joined #nim
12:10:26*pmp-p quit (Ping timeout: 244 seconds)
12:25:45*pmp-p joined #nim
13:35:50*beholders_eye joined #nim
13:41:35*pmp-p quit (Ping timeout: 260 seconds)
13:44:40*pmp-p joined #nim
14:31:44FromDiscord<matt_07672> sent a code paste, see https://play.nim-lang.org/#pasty=xmdFQJxX
14:31:53FromDiscord<matt_07672> how do i solve this
14:41:46FromDiscord<nnsee> In reply to @matt_07672 "how do i solve": silly suggestion but try reordering the statement
14:42:05FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=VpDENZXQ
14:42:22FromDiscord<matt_07672> same error
14:42:29FromDiscord<matt_07672> its using vmath
14:42:38FromDiscord<nnsee> well it shouldn't have the _same_ error
14:42:49FromDiscord<nnsee> [1] and [2] should be swapped at the very least
14:43:10FromDiscord<matt_07672> sent a code paste, see https://play.nim-lang.org/#pasty=NXKIMtCN
14:43:23FromDiscord<nnsee> have you imported `shady`?
14:43:32FromDiscord<matt_07672> yes
14:43:40FromDiscord<matt_07672> its not my lib
14:44:02FromDiscord<matt_07672> https://github.com/treeform/boxy/blob/94db8b259530cbc1243566e24fe52592b8394535/src/boxy/blends.nim#L180
14:44:35FromDiscord<fabric.input_output> I think the uniform should be a param of the proc
14:44:43FromDiscord<fabric.input_output> or maybe not hm
14:44:55FromDiscord<nnsee> In reply to @matt_07672 "https://github.com/treeform/boxy/blob/94db8b259530c": this file compiles for me
14:45:26FromDiscord<matt_07672> hm
14:45:37FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=VSdoqzjs
14:47:07FromDiscord<matt_07672> the minimal example doesnt work for me
14:47:13FromDiscord<matt_07672> how are you compiling
14:47:22*valms19901 joined #nim
14:47:32FromDiscord<matt_07672> @nnsee
14:47:57FromDiscord<nnsee> literally just `nim r test.nim`
14:49:43FromDiscord<matt_07672> im reinstalling boxy
14:50:28FromDiscord<matt_07672> are you uning the latest version
14:50:46FromDiscord<nnsee> i installed it from `master`
14:50:52FromDiscord<nnsee> ie, cloned it and did `nimble install` in the directory
14:51:31FromDiscord<nnsee> maybe there's some changes that haven't been "pushed to nimble" so to speak
14:54:21*xet7 joined #nim
14:59:18*valms19901 quit (Ping timeout: 252 seconds)
15:17:11FromDiscord<arkanoid> this piece of code https://play.nim-lang.org/#pasty=BRayoaup used to work, but now it doesn't (2.2.0\: `Error: recursive dependency: 'encrypt'`). It comes from this thread https://forum.nim-lang.org/t/1305#38353I'm interested in how it works. Non strictly what it does, but how it does something at compile time and reverts it at runtime in a single macro. How is it possible?
15:20:18FromDiscord<odexine> oh its this again
15:22:37FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#pasty=MPyLTeJj
15:30:47FromDiscord<arkanoid> ok, but if so, why is it recursive? after a pass on a constant string it becomes`let foo = decodeString("the encoded string", "encoded key vX")`there's no recursive call on encrypt
15:35:03FromDiscord<arkanoid> it actually says "recursive dependency" not "recursive call", so it must be something else
15:42:08FromDiscord<arkanoid> well the issue seems that the term rewriting macros are no more https://play.nim-lang.org/#pasty=IeLiGbUy
16:06:31FromDiscord<pmunch> In reply to @arkanoid "well the issue seems": What?! I had just found a very useful application for them!
16:10:44FromDiscord<arkanoid> I'm curious, can you share the idea?
16:13:41FromDiscord<fabric.input_output> on latest I get this tho https://media.discordapp.net/attachments/371759389889003532/1336369093934321715/image.png?ex=67a38e34&is=67a23cb4&hm=43759dfb833402415809892e2aeda9af718bb9a471a9f1718c6da118c2ff1777&
16:14:10FromDiscord<fabric.input_output> I doubt I would be getting that if they were removed
16:15:52FromDiscord<arkanoid> not removed, but apparently what used to work now doesn't
16:17:34FromDiscord<fabric.input_output> used to? I can't find a version where this works
16:19:02FromDiscord<arkanoid> well in 2020 apparently used to\: https://forum.nim-lang.org/t/1305#38353
16:19:17*alexdaguy quit (Quit: w)
16:30:17FromDiscord<eebahn> wkat
16:30:19*ntat joined #nim
16:31:55FromDiscord<eebahn> https://github.com/nim-lang/Nim/blob/devel/doc/grammar.txt↵what grammar language is the file `doc/grammar.txt` using?↵is it peg, ebnf, or something else entirely?↵it seems to be using weird constructs, and unsure of what syntax it is exactly
16:33:08FromDiscord<eebahn> _(weird meaning that I haven't seen them before myself, and that I'm having trouble pin-pointing them to one grammar lang in particular)_
16:46:19*arkanoid quit (Ping timeout: 260 seconds)
16:57:08FromDiscord<arkanoid> how can I call a function from a nnkNode inside a macro?
17:04:43*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
17:05:09*SchweinDeBurg joined #nim
17:13:11*kenran joined #nim
17:16:40*ntat quit (Quit: Leaving)
17:24:14FromDiscord<arkanoid> I mean the node is of kind nnkCall and is const-time runnable, so I want to run it, grab the value and use it inside the macro
17:35:04*pbsds35 quit (Quit: The Lounge - https://thelounge.chat)
17:38:06*pbsds35 joined #nim
17:56:13FromDiscord<pmunch> In reply to @arkanoid "I'm curious, can you": Replacing all `echo` statements in code with a custom log command. Could be used to replace any other function as well though.
19:10:06*ntat joined #nim
19:20:06*beholders_eye quit (Ping timeout: 246 seconds)
19:29:42FromDiscord<nasuray> sent a code paste, see https://play.nim-lang.org/#pasty=yhxBJBOf
19:46:47FromDiscord<Robyn [She/Her]> Runs on the playground fine it seems
19:52:47FromDiscord<pmunch> Ah nice, my project is saved!
19:53:21FromDiscord<pmunch> It's of course more than just that, but it's a part of it
20:02:04*m5zs7k quit (Ping timeout: 252 seconds)
20:06:32*m5zs7k joined #nim
21:04:34*ntat quit (Quit: Leaving)
21:09:29*kenran quit (Remote host closed the connection)
21:38:50*beholders_eye joined #nim
22:11:57*rockcavera joined #nim