<< 15-07-2021 >>

00:01:49FromDiscord<theangryepicbanana> ...
00:20:43*Jjp137 quit (Quit: Leaving)
00:23:10*Jjp137 joined #nim
01:12:08FromDiscord<gogolxdong (liuxiaodong)> Is there any threadPool implementation in Nim?
01:14:13FromDiscord<ElegantBeef> There is `threadPool` in the stdlib, though there may be other implementations
01:16:24FromDiscord<gogolxdong (liuxiaodong)> Does spawn or parallel work well?
01:17:03FromDiscord<gogolxdong (liuxiaodong)> What about CPS?
01:20:42FromDiscord<gogolxdong (liuxiaodong)> Any other recommanded implementations?
01:21:59FromDiscord<konsumlamm> In reply to @gogolxdong (liuxiaodong) "Does spawn or parallel": not really afaik
01:22:19FromDiscord<konsumlamm> In reply to @gogolxdong (liuxiaodong) "What about CPS?": CPS is still experimental/WIP
01:23:22FromDiscord<konsumlamm> In reply to @gogolxdong (liuxiaodong) "Any other recommanded implementations?": there's weave, but that's quite low level (so not super useful unless you're making a high level wrapper for it), other thab that idk of any
01:23:50FromDiscord<konsumlamm> i heard there are plans to eventually rewrite the stdlib threadpool
01:25:23FromDiscord<leorize> cps is working, but it's not a threadpool, it's merely a backbone that you can build a pool on
01:25:57FromDiscord<konsumlamm> ah, is it finished now?
01:26:28FromDiscord<leorize> yea, you can check out the collection of examples in cps repo
01:26:32FromDiscord<konsumlamm> and yeah, it's by no means a threadpool implementation (it isn't even inherently concurrent or anything)
01:26:44FromDiscord<leorize> currently we are focused in actually using cps to see what can be improved
01:26:50FromDiscord<konsumlamm> nice
01:29:13FromDiscord<leorize> if you're interested in playing with cps, zevv is making a tutorial\: https://github.com/zevv/cpstut
01:29:15fn<R2D299> itHub: 7"<No Description>"
01:30:54FromDiscord<konsumlamm> will take a look
01:38:44FromDiscord<gogolxdong (liuxiaodong)> Why didn't we heard any news about CPS?
01:41:32FromDiscord<ElegantBeef> Cause you havent been looking closely
01:42:04FromDiscord<ElegantBeef> It was in last month's this month with nim 😄
01:47:52FromDiscord<gogolxdong (liuxiaodong)> Anyone played Chia?
01:56:37FromDiscord<gogolxdong (liuxiaodong)> What's the essential of Continuations ?
01:59:02FromDiscord<leorize> I think this describes it best\: https://github.com/disruptek/cps/tree/master/docs
02:28:55FromDiscord<@bracketmaster-5a708063d73408ce4> Can you change the default values of an initialized types?
02:29:19FromDiscord<@bracketmaster-5a708063d73408ce4> an object with integer members for example defaults the integers to 0
02:29:30FromDiscord<ElegantBeef> You cannot override defaults
02:30:08FromDiscord<ElegantBeef> https://github.com/beef331/constructor#defaults you can checkout that for a macro solution for a default constructor
02:30:10fn<R2D299> itHub: 7"Nim macros to aid in object construction including event programming, and constructors."
02:31:51FromDiscord<@bracketmaster-5a708063d73408ce4> of course there a macro solution 😛
02:32:01FromDiscord<Elegantbeef> Well there always are macros
02:39:47FromDiscord<Elegantbeef> @Bung\: so i do now support ref objects and sequences, so there is a chance that atleast Nimscript -\> Nim for jsonnodes will work 😀
02:40:16*Figworm quit (Quit: Figworm)
02:46:24FromDiscord<Bung> why is one way direction
02:54:17FromDiscord<Bung> hmm , like before use compiler package directly will face compatible problem `Error: undeclared identifier: 'nativeStackTraceSupported'`
02:55:55FromDiscord<Elegantbeef> Cause i havent got the other way done yet
02:56:02FromDiscord<Elegantbeef> And yea make sure you're using 1.5.1
02:57:17FromDiscord<Elegantbeef> I had the same issue but adding compiler as a dep fixed it
02:57:19FromDiscord<Bung> in this situation the version number does not enough
02:57:26FromDiscord<Elegantbeef> Yea i know
03:06:18FromDiscord<Elegantbeef> what's "like before use compiler package directly " about though, not like this can work any other way that i know of \:D
03:07:58FromDiscord<ajusa> In reply to @ajusa "Is there a zero": Do I need view types for this?
03:10:27*arkurious quit (Quit: Leaving)
03:10:46FromDiscord<Elegantbeef> Well you might be able to use https://nim-lang.org/docs/system.html#toOpenArray%2Ccstring%2Cint%2Cint but it doesnt return a string
03:13:58FromDiscord<Bung> `Error: expression 'multiplyBy10(a)' is of type 'int' and has to be used `
03:14:08FromDiscord<Elegantbeef> Yea tests dont work yet
03:14:26FromDiscord<Elegantbeef> `example.nim` is the only thing that presently works
03:15:38FromDiscord<Elegantbeef> That whole not handling return types is in effect there
03:30:12FromDiscord<Bung> how to construct argBuffer when call invoke @ElegantBeef
03:30:21FromDiscord<Elegantbeef> You cannot presently \:D
03:30:41FromDiscord<Elegantbeef> Like i said only Nimscript -\> Nim is done
03:31:42FromDiscord<Bung> okay, I'll wait for nim -> nims then
04:06:02*supakeen quit (Quit: WeeChat 3.2)
04:06:36*supakeen joined #nim
04:36:25FromDiscord<gogolxdong (liuxiaodong)> Is it possible to build thread pool based on CPS?
04:38:02FromDiscord<gogolxdong (liuxiaodong)> I found one in the example.
04:46:34FromDiscord<gogolxdong (liuxiaodong)> What is jield?
04:48:26FromDiscord<Rika> A weirder way to say yield I assume
04:50:42FromDiscord<ElegantBeef> well yield is a keyword so they used jield as their "keyword"
05:11:54*rockcavera quit (Remote host closed the connection)
05:30:08fn<ForumUpdaterBot99> New Nimble package! morepretty - Morepretty - Does more than nimpretty., see https://github.com/treeform/morepretty
05:30:09fn<R2D299> itHub: 7"Morepretty - like nimpretty but with more stuff."
06:06:53FromDiscord<gogolxdong (liuxiaodong)> Is there radix sort in stdlib?
06:48:30*max22- joined #nim
07:40:01FromDiscord<Tux> wanting to try to learn this language, does anyone know of an ncurses library? im gonna port some old code to nim if possible
07:40:11FromDiscord<Tux> @ElegantBeef hi
07:41:55FromDiscord<InventorMatt> https://github.com/johnnovak/illwill
07:41:57fn<R2D299> itHub: 7"<No Description>"
07:42:06FromDiscord<Tux> pog, this will work fine
07:42:14FromDiscord<Tux> thank ^w^
07:42:32FromDiscord<ElegantBeef> There are also ncurses bindings of course
07:42:42FromDiscord<Tux> In reply to @ElegantBeef "There are also ncurses": i see
07:42:48FromDiscord<Tux> nim looks like python but good
07:42:54FromDiscord<Tux> so hopefully it wont take too long to understand
07:44:50FromDiscord<Rika> It’s not similar in usage
07:44:50FromDiscord<Rika> So do not expect it to be like Python other than in look
07:45:18FromDiscord<Tux> i see
07:45:23FromDiscord<Tux> it doesnt have any complex stuff like borrowing from rust does it?
07:45:55FromDiscord<Tux> if its a normal, sane GC language i should not have too much trouble w/ it
07:45:55FromDiscord<Rika> It does but not in the same way rust implements it
07:46:03FromDiscord<Tux> oh god
07:46:10FromDiscord<Rika> It’s easier
07:46:10FromDiscord<Rika> And optional
07:46:10FromDiscord<ElegantBeef> Well it has move semantics but they're not in your face, and also there is a borrow checker as an opt in feature for view types
07:46:11FromDiscord<Tux> ah
07:46:11FromDiscord<Tux> ok
07:47:18FromDiscord<Tux> does it support global vars
07:47:18FromDiscord<Rika> Yes
07:47:18FromDiscord<Rika> Not in threaded code though
07:47:18FromDiscord<Rika> (You shouldn’t do it in threaded code anyway but yeah)
07:47:21FromDiscord<Tux> ok
07:50:59FromDiscord<Tux> is nimble fast / powerful
07:51:03FromDiscord<Tux> or nim
07:51:05FromDiscord<Tux> sorry
07:52:01FromDiscord<ElegantBeef> Yes
07:52:23FromDiscord<Tux> am i in the special club now
07:52:25FromDiscord<Tux> for using this
07:52:30FromDiscord<ElegantBeef> An obscure club
07:52:41FromDiscord<Tux> it looks cool tho
07:52:50FromDiscord<Tux> imma watch a. vid on it and read the online tutorial maybe
07:52:58FromDiscord<ElegantBeef> have fun
07:53:02FromDiscord<Tux> it looks actually usable unlike rust
07:53:20FromDiscord<Tux> also what's when
07:53:27FromDiscord<Tux> is it like a special if?
07:54:02FromDiscord<ElegantBeef> It's compile time if
07:54:12FromDiscord<ElegantBeef> So anything inside the body is changed based off the conditions
07:54:57FromDiscord<ElegantBeef> So for generics you can use it for types to change the body of a function, or you can import a specific module based of OS
07:55:48FromDiscord<Tux> o
07:55:56FromDiscord<Tux> that's sounds like static if in D
07:56:09FromDiscord<ElegantBeef> Yea probably is
07:56:17FromDiscord<Tux> nim looks like if python and d had a baby
07:57:01FromDiscord<ElegantBeef> They do have some overlap
08:01:00*fredrikhr joined #nim
08:02:36FromDiscord<Tux> can i send a shitty meme i made
08:02:50FromDiscord<Tux> https://media.discordapp.net/attachments/371759389889003532/865141336252743680/image0.png
08:03:56FromDiscord<Tux> anyway
08:04:06FromDiscord<Tux> i'm off to read the docs and stuff
08:04:08FromDiscord<Tux> and yeah
08:11:57FromDiscord<Rika> Isn’t Nim older than D
08:12:35FromDiscord<ElegantBeef> Nah D first released in 2001
08:12:37FromDiscord<ynfle (ynfle)> Which `--cpu` option do I use for cross compilling for Linux on a x86\_64 Intel Xeon?
08:13:05FromDiscord<Rika> In reply to @ElegantBeef "Nah D first released": Funny how we’re more popular from what I recall then
08:13:42FromDiscord<Tux> sadly d isn't popular which sucks bc it's a nice language
08:18:04FromDiscord<ElegantBeef> isnt it just `--os:linux`?
08:18:30FromDiscord<ElegantBeef> `--cpu` is only important for targeting different archs
08:21:17FromDiscord<richard stallmen(crazy GNU guy)> @Tux helo tox
08:26:35FromDiscord<ynfle (ynfle)> Oh ok
08:26:36FromDiscord<ynfle (ynfle)> I'll try that
08:32:20FromDiscord<richard stallmen(crazy GNU guy)> the eraseScreen() is a bit wrong , like , it does print \n a lot , but doesnt reset the cursor to home
08:32:30FromDiscord<richard stallmen(crazy GNU guy)> or is it becuase i am in android?
08:34:51FromDiscord<ynfle (ynfle)> sent a code paste, see https://play.nim-lang.org/#ix=3t3H
08:37:11FromDiscord<richard stallmen(crazy GNU guy)> i had to use this proc:↵↵proc setCursorPos(f: File; x, y: int) {...}
08:38:20FromDiscord<Tux> In reply to @richard stallmen(crazy GNU guy) "<@800941608560230441> helo tox": hello rms
08:51:27FromDiscord<richard stallmen(crazy GNU guy)> hehe
08:51:29*neceve joined #nim
09:32:29FromDiscord<System64 ~ Flandre Scarlet> In reply to @Tux "or nim": It uses a C backend so you have C speed
10:02:36*Vladar joined #nim
10:03:33arkanoidI'm refactoring a project and I'm trying to apply some proper effect tracking. Do you know if it is possible to detect which procs are undercover funcs (noSideEffect)?
10:11:47FromDiscord<haxscramper> https://nim-lang.org/docs/effecttraits.html#hasNoSideEffects%2CNimNode
10:12:21FromDiscord<haxscramper> Or some other procedures from this module (empty tag list)
10:12:47FromDiscord<Rika> oh man a new module to read about
10:14:02arkanoidwill this work even even proc is declared as "proc" and "noSideEffect" pragma is present, but proc really has no side effects?
10:14:45arkanoidfrom the docs seems that it just detects if pragma is present or not ("Return true if the func/proc/etc fn has noSideEffect")
10:17:28FromDiscord<ynfle (ynfle)> The compiler automatically generates it
10:17:29FromDiscord<haxscramper> No, compiler does not automatically add `.noSideEffect.`
10:17:29FromDiscord<haxscramper> It was added in `1.4.0`↵(@Rika)
10:17:51FromDiscord<haxscramper> Instead procedure symbol has tag effects store in it's type/definition, and when other procedure calls it the effects are callucated based on
10:18:09FromDiscord<haxscramper> so you can have `proc test() = discard`, and use it in `func()`
10:18:38FromDiscord<haxscramper> But if you decide to add some side effect in `test()` then it will break func's compilation
10:19:11FromDiscord<haxscramper> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/865175321019023380): Instead, a procedure symbol has tag effects stored in its type/definition, and when other procedure calls it the effects are calculated based on
10:20:00FromDiscord<haxscramper> And some procedures like `echo` are not properly tracked by their side effects alone - they have additional `sideEffect` annotation
10:20:11*xet7 quit (Remote host closed the connection)
10:20:19arkanoidok, so if I have a project with a tons of procs and I want to refactor them by splitting between total pure {.noSideEffect, raises: [].} procs and others (where I'd use tags) I have to to this manually
10:20:26FromDiscord<haxscramper> I'm still not sure whether it is a bug or I've missed something in the compiler, but using `echo` does not add `WriteIOEffect`
10:21:00*xet7 joined #nim
10:21:11FromDiscord<haxscramper> And annotate your procs with `.clean.`
10:21:12FromDiscord<haxscramper> More or less. You can create `{.pragma clean: noSideEffect, raises: [].}`↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>)
10:21:28FromDiscord<haxscramper> I think you can even `{.push clean.}` so you don't have to manually go over to each procedure and annotate it
10:21:50arkanoidinteresting
10:21:52FromDiscord<haxscramper> Or `{.push noSideEffect.}`, `{.push: raises: [].}`
10:22:54FromDiscord<ynfle (ynfle)> How come I can't import effecttraits but `defined(nimHasEffectTraitsModule)` is true
10:23:07arkanoidI'm not fond of .push as it doesn't go over all proc definitions in the block. In particular it doesn't cover the callback proc types
10:24:00FromDiscord<Rika> ynfle what issues are you getting
10:24:42FromDiscord<ynfle (ynfle)> importtest.nim(1, 16) Error\: cannot open file\: effecttraits
10:25:25FromDiscord<Rika> requires std/ prefix apparently but not shown on docs...
10:28:33arkanoidI think the pragma definition syntax you suggested is wrong, I'm getting "Error: invalid pragma: {.pragma, clean: noSideEffect, raises: [].}" (but the code really contains "{.pragma clean: noSideEffect, raises: [].}" without the comma after pragma)
10:29:41FromDiscord<haxscramper> Yes, I don't always remember correct syntax
10:30:47FromDiscord<Rika> no comma
10:30:49FromDiscord<Rika> you added a comma
10:30:59FromDiscord<Rika> pragma clean vs pragma, clean
10:31:04FromDiscord<Rika> oh
10:31:08FromDiscord<Rika> i didnt see the next part lmao
10:31:16FromDiscord<Rika> thats odd then
10:31:44FromDiscord<Rika> let me see
10:32:23FromDiscord<Rika> it's `pragma: clean, nosideeffect...`
10:37:39FromDiscord<ynfle (ynfle)> @haxscramper\:matrix.org @\_discord\_709044657232936960\_arkanoid=5b=49=52=43=5d\:t2bot.io this works↵\`\`\`nim
10:38:06FromDiscord<ynfle (ynfle)> The compiler does generate `noSideEffect` for procs
10:38:17arkanoidwhoa! I get "Error: recursive dependency: clean" if I use "{.push clean.}"
10:39:29FromDiscord<ynfle (ynfle)> sent a long message, see http://ix.io/1L1p
10:39:53FromDiscord<ynfle (ynfle)> (Not sure if the edits came through)↵\`\`\`nim
10:40:07FromDiscord<ynfle (ynfle)> sent a code paste, see https://play.nim-lang.org/#ix=1MUs
10:42:17arkanoidplay.nim-lang is not working to me
10:42:47FromDiscord<haxscramper> https://wandbox.org/
10:43:27arkanoidthis is cool!
10:44:34arkanoidhttps://wandbox.org/permlink/AfmBxA9oFtpGHByS
10:45:16arkanoidit really seems that the compiler is capable of tag noSideEffect automatically
10:45:29FromDiscord<ynfle (ynfle)> It does
10:46:09arkanoidI would greatly benefit from this if there's a way to apply that macro to a module full of procs
10:47:49FromDiscord<ynfle (ynfle)> You can use this to get you started
10:47:50FromDiscord<ynfle (ynfle)> https://rosettacode.org/wiki/Reflection/List_methods#Nim
10:48:27FromDiscord<ynfle (ynfle)> Also, ar4q had a script that did this
10:48:56FromDiscord<Rika> someone told me this, its fine to say araq as it is because he is on discord now
10:49:20FromDiscord<ynfle (ynfle)> \:thumbsup\:
10:49:40FromDiscord<ynfle (ynfle)> araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq, araq
10:50:29arkanoid? was it a rule to don't disturb the great leader?
10:52:40FromDiscord<ynfle (ynfle)> https://github.com/nim-lang/Nim/pull/14728/files#diff-ffac2d093d390ecc2878eaf5a01b509dda270516f0c1853e8ac5a0229fcbcf46 @\_discord\_709044657232936960\_arkanoid=5b=49=52=43=5d\:t2bot.io see this not merged file
10:53:26FromDiscord<Rika> arkanoid informally
10:53:45FromDiscord<ynfle (ynfle)> It says that clybber came up with a better solution
10:56:48*neceve quit (Ping timeout: 268 seconds)
11:00:12arkanoidthanks
11:02:21arkanoidbtw, here's the minimal exaple that shows the pragma recursive dependency problem: https://wandbox.org/permlink/tG1xHMgAcOE3AYZr
11:03:30arkanoidit works by pushing the two pragmas separately: https://wandbox.org/permlink/tv9TCkuUUgTjb3cV
11:25:24*beshr joined #nim
11:25:24*beshr quit (Changing host)
11:25:24*beshr joined #nim
11:28:23*aeverr quit (Ping timeout: 255 seconds)
11:30:33*beshr quit (Read error: Connection reset by peer)
11:52:55*max22- quit (Ping timeout: 268 seconds)
12:03:17*beshr joined #nim
12:03:17*beshr quit (Changing host)
12:03:17*beshr joined #nim
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:23arkanoidisn't gcsafe enforced just like noSideEffect? https://wandbox.org/permlink/9BD4kLUk32dwQWNu
12:06:38*supakeen joined #nim
12:08:46FromDiscord<ynfle (ynfle)> What's the issue?
12:09:00FromDiscord<ynfle (ynfle)> It's only not gcsafe if it would modify a global variable
12:09:06FromDiscord<ynfle (ynfle)> This is just passed by pointer
12:09:08FromDiscord<hugogranstrom> arkanoid: if you accessed foo directly in add4 it complains
12:12:52arkanoidyou're right, but it's not a compile error, but a warning https://wandbox.org/permlink/2NqAqCBLSzp0xC4j
12:13:26FromDiscord<haxscramper> I think you can turn warnings to errors
12:13:29arkanoidI can enforce warnings as errors, I know, but I was expecting a compiler error just like noSideEffect
12:13:57arkanoidno problem anyway. What's important is that safety belts are working correctly
12:17:42*TakinOver quit (Ping timeout: 255 seconds)
12:18:43*neceve joined #nim
12:38:46*TakinOver joined #nim
13:06:20*arkurious joined #nim
13:16:54*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
13:31:42arkanoidif I concat strings and values manually with & like in "value(" & $self.value & ")" I successfully compile with {.noSideEffects, raises: [].}, if I use strformat and &".." operator it complains "can raise unlisted exception: ref ValueError"
13:32:56FromDiscord<haxscramper> See what strformat generates with `std/macros.expandMacro`
13:33:12FromDiscord<haxscramper> `expandMacro(< your macro code here >)`
13:35:08arkanoidgot it, it is here: https://github.com/nim-lang/Nim/blob/44e653a9314e1b8503f0fa4a8a34c3380b26fff3/lib/pure/strformat.nim#L552
13:36:41FromDiscord<haxscramper> In general stdlib does raise
13:37:08FromDiscord<haxscramper> oh, I know what you can use
13:38:04FromDiscord<haxscramper> https://wandbox.org/permlink/BcQ2tkpuJBawBmmK
13:38:11*rockcavera joined #nim
13:38:11*rockcavera quit (Changing host)
13:38:11*rockcavera joined #nim
13:38:12FromDiscord<haxscramper> I used this code to convert exception to result
13:38:29FromDiscord<haxscramper> wandbox does not have any packages installed, so it does not compile
13:38:52FromDiscord<haxscramper> But I create temporary procedure and use it in order to get full list of sice effects for a single block of code
13:40:19arkanoidthis is ninja level
13:40:30FromDiscord<haxscramper> Something like `exceptionalCall(<some expression>) except Handle`
13:41:13arkanoidI'll implement the same in monad flavour
13:41:16arkanoidthanks
13:41:20FromDiscord<haxscramper> But if you are aiming to completely get rid of exceptions you would need something like that
13:41:52FromDiscord<haxscramper> By the way, do you have your experiments somewhere public/will publish later?
13:43:21arkanoidno, but is far far from advanced code. Is just some playground around a reimplementation of Option to achieve some common FP pattern (monad chain). It is already present in std/Option with flatMap
13:45:25arkanoidI just want to learn how to control side effects in nim by applying some FP. So basically I've just to add some monads to catch exceptions and tags I use for functions with sideEffects
13:46:58arkanoidthe nice part (sci-fi from my actual knowledge) would be to use metaprogramming to pick the right monad according to proc tags. For example if a proc as tag "IO" it would be wrapped automatically in a Writer monad to perform the side effect safely in the monad world
13:47:30FromDiscord<haxscramper> It is possible
13:47:51FromDiscord<haxscramper> `std/effecttraits` is the go-to module for that
13:48:08FromDiscord<haxscramper> And you can define your own effects as well
13:48:09arkanoidit's the main driver that is taking me studying FP side-by-side nim experiments
13:51:12arkanoidI bet there's already a nim programmer out there that has already implemented this in a rainy afternoon, but let's surf the flow mood
13:52:06arkanoidbtw, I'm trying to use "expandMacros:" block. It compiles but it doesn't print anything
13:53:22arkanoidI'm using like this: "expandMacros:\n echo some(5).flatMap(add1).flatMap(isEven).toString" where toString is func "if self.isSome: &"some({self.value})" else: &"none({$T})"" that should trigger expandMacros
13:53:58arkanoidI've tried moving the expandMacros inside the toString func but I get zero addictional output at compile time
14:04:11FromDiscord<dom96> PMunch: you around? playground is down
14:05:30FromDiscord<haxscramper> `import std/[macros, strformat]; expandMacros(echo &"{1 + 2}")`
14:05:54FromDiscord<haxscramper> sent a code paste, see https://paste.rs/xeC
14:06:38FromDiscord<haxscramper> `formatValue` can be made into `static[string]` btw
14:07:07FromDiscord<haxscramper> At least in most sane use cases you don't need runtime format specifier
14:07:24FromDiscord<haxscramper> Or it can be an overload
14:07:33FromDiscord<haxscramper> Would check format specifier at compile-time, which is IMO better than runtime
14:07:42FromDiscord<haxscramper> And no `ValueError` exception
14:15:22*max22- joined #nim
14:16:34*aeverr joined #nim
14:31:33FromDiscord<theangryepicbanana> wait so does nobody know what the operator precedence is of the deref operator?
14:32:40FromDiscord<Rika> deref operator? []?
14:32:54FromDiscord<theangryepicbanana> yes
14:33:51FromDiscord<Rika> its not an operator perse
14:34:11FromDiscord<theangryepicbanana> wait, is it literally just an empty subscript?
14:34:49FromDiscord<Rika> i dont see how there can be a precedence to []
14:34:54FromDiscord<theangryepicbanana> well like
14:35:00FromDiscord<theangryepicbanana> `@a[]`
14:35:04FromDiscord<theangryepicbanana> how is that grouped
14:45:24FromDiscord<theangryepicbanana> ?
14:48:26*fn quit (Remote host closed the connection)
14:48:39*fn joined #nim
14:58:58arkanoidhaxscramper, could you please rephrase "`formatValue` can be made into `static[string]` btw" for me?
14:59:50fn<Prestige99> @theangryepicbanana in that case `@a[]` I think it would deref a, then try to convert to a sequence with @
15:00:34FromDiscord<haxscramper> This procedure could've accepted `static[string]` as a format specifier, and performed parsing at compile time
15:00:53FromDiscord<theangryepicbanana> In reply to @fn "<Prestige> <@356108561232953344> in that": yeah but there's still no docs about it lol
15:01:00FromDiscord<haxscramper> This is not something you can change, I just said it could be fixed in the strformat
15:01:33FromDiscord<haxscramper> You can try to implement and overload for this one, probably and in that case strformat won't raise exception for invalid format values
15:02:46fn<Prestige99> I see some stuff in https://nim-lang.org/docs/manual.html#syntax-precedence about it
15:04:35FromDiscord<theangryepicbanana> yeah but it doesn't mention the subscript operator
15:05:16fn<Prestige99> subscript operator?
15:05:25FromDiscord<theangryepicbanana> []
15:07:01fn<Prestige99> It's not super clear but I also see https://nim-lang.org/docs/manual.html#lexical-analysis-other-tokens
15:07:11fn<Prestige99> maybe a good place to improve the docs
15:07:17FromDiscord<Rika> yes
15:08:02FromDiscord<Rika> also actually huh, nim says there are no postfix operators but is [] not a postfix op?
15:08:16FromDiscord<@bracketmaster-5a708063d73408ce4> how many hours do you think araq has put into developing nim so far?
15:08:37fn<Prestige99> at least 5
15:08:53fn<Prestige99> @Rika that's a good point
15:09:00fn<Prestige99> probably a special exception?
15:09:06FromDiscord<Rika> {}
15:09:14FromDiscord<Rika> is also a possible "operator"
15:09:36fn<Prestige99> 🤔
15:10:06FromDiscord<@bracketmaster-5a708063d73408ce4> I mean, `.` is also an operator...
15:11:34FromDiscord<Rika> that's a binary operator
15:12:08FromDiscord<no name fits> I'm not sure if this is the right place to ask, but is there a way to practice getting better at prototyping and doing it faster? I think my main problem is scoping and my definition of done, but I have no idea how to fix it
15:12:47FromDiscord<Rika> wdym
15:13:18FromDiscord<Rika> better at prototyping? idk, i just write down the general idea of the base of what i'm making
15:13:24FromDiscord<Rika> on like a whiteboard or whatever
15:13:30FromDiscord<Rika> then i code those components up
15:15:48*fredrikhr quit (Quit: Disconnecting)
15:16:04FromDiscord<no name fits> Yeah but I struggle with scoping correctly when it's personal projects
15:16:40fn<Prestige99> just have to decide if X feature is actually required, and remove it
15:31:00FromDiscord<haxscramper> I just dump all design plans in the markdown/org-mode. Sort of personal RFC where I also go over some implementation details
15:31:26FromDiscord<haxscramper> Rubber duck debugging, except I feel stupid actually talking aloud, so write things down
15:31:57FromDiscord<haxscramper> And paste tons of links there as well, then it becomes Todo list that I track things in
15:55:50FromDiscord<enthus1ast> Also a kanban (kanboard?) can help.↵Also set yourself a deadline.↵(@no name fits)
15:57:32FromDiscord<no name fits> Yeah I know deadlines for myself help, but I guess it's hard to cut corners on personal projects. I guess it's a skill. Less hard at work because I have a clearer idea of the end product, so I know what can be cut.
15:58:37FromDiscord<no name fits> Maybe I need to get better at having a clearer end product in mind for personal stuff
16:05:52*pro joined #nim
16:09:38*stkrdknmibalz joined #nim
16:25:17FromDiscord<ynfle (ynfle)> Is there an equivalent of `-d:` & `when defined(...):` in C?
16:26:06FromDiscord<haxscramper> `#ifdef`
16:26:25FromDiscord<haxscramper> well, there is no direct equivalent, but `#ifdef DEBUG` is what people use
16:28:42FromDiscord<ynfle (ynfle)> How do i define debug? just -g for gcc etc?
16:29:10FromDiscord<leorize> `-DDEBUG`
16:30:13FromDiscord<ynfle (ynfle)> thx
16:34:12*TakinOver quit (Ping timeout: 252 seconds)
16:49:33FromDiscord<TurtleP> @ElegantBeef remember that issue with the `echo` I was having yesterday? Well turns out I was returning an object in a method that is called from `cligen`'s `dispatchMulti`.. 🤦‍♂️
16:52:23*TakinOver joined #nim
17:00:59FromDiscord<Schelz> is there a way to create a function that return a variable that i can use later in python
17:01:00FromDiscord<Schelz> ?
17:01:43FromDiscord<Rika> python? this is a nim server
17:01:51FromDiscord<Schelz> so i need to use nim
17:01:55FromDiscord<Rika> huh?
17:02:02FromDiscord<Schelz> and after i compile it in python
17:02:10FromDiscord<Schelz> but thats not the point
17:02:38FromDiscord<Schelz> the point is how to create a function that return a variable as an argument
17:03:12FromDiscord<Schelz> or if nim can read from a link source code some values
17:05:18FromDiscord<Schelz> In reply to @Rika "python? this is a": this was the best tip ever thx for your info i didnt know that :)
17:05:42FromDiscord<Rika> i do not understand what you are even saying
17:06:15FromDiscord<Schelz> i know for some peoples programming is very hard to understand
17:07:19FromDiscord<Rika> i will not help you for you are rude, wait for someone else
17:09:00FromDiscord<Schelz> nvm i found it on google :feelsOk:
17:42:02FromDiscord<jfmonty2> How do you compare BackwardsIndexes? `^1 == ^1` produces a type mismatch.
17:42:13FromDiscord<jfmonty2> (edit) "mismatch." => "mismatch, apparently `==` is not defined for that type."
17:42:27FromDiscord<ynfle (ynfle)> Why do you need to compare them?
17:42:39FromDiscord<haxscramper> `index1.int == index2.int`
17:42:41FromDiscord<haxscramper> Or define `==` overload for them
17:42:50FromDiscord<jfmonty2> special-casing a specific backwards index in a container that I'm working on
19:52:08FromDiscord<iffy (Matt Haggard)> How do I build choosenim on Windows so I can test some changes to choosenim? I'm getting `pkg.version in data` LibArchive v3.4.3 not found as the current error while doing `nimble build`
20:06:02*neceve quit (Ping timeout: 250 seconds)
20:27:45FromDiscord<dom96> @iffy sadly last time I tried I haven't even been able to build it :/
20:28:02FromDiscord<dom96> best point of call is the CI, I'll likely end up gutting the libarchive out of there though eventually
20:30:05FromDiscord<iffy (Matt Haggard)> oh rats \:) k, I'll figure something out. I'm running into this issue again and trying to figure out what's going on\: [dom96/choosenim#251](https://github.com/dom96/choosenim/issues/251)
20:30:18FromDiscord<iffy (Matt Haggard)> @\_discord\_132595483838251008\:t2bot.io ^
20:43:21fn<ForumUpdaterBot99> New question by SLWW: Using Nim to generate a DLL for use in C#/VB6, see https://stackoverflow.com/questions/68400536/using-nim-to-generate-a-dll-for-use-in-c-vb6
20:49:53FromDiscord<Ayy Lmao> Is there some way other than `echo` to print messages for debugging purposes? I've purposefully used `proc` instead of `func` for everything since `echo` apparently causes side effects.
20:50:44FromDiscord<Hi02Hi> `system.debugEcho`
20:51:29FromDiscord<Ayy Lmao> Ah cool, thanks!
20:57:05*max22- quit (Remote host closed the connection)
20:57:23*max22- joined #nim
21:01:07FromDiscord<dom96> @iffy: thanks for looking into it 🙂
21:06:36FromDiscord<iffy (Matt Haggard)> @dom96 for sure! At this point, I can't do much looking without being to build a custom choosenim. I submitted an untested PR that adds more debugging output to perhaps shed light going forward
21:12:47FromDiscord<dom96> oh we only have travis there :/
21:15:27FromDiscord<System64 ~ Flandre Scarlet> when I interop with C source code do I need the header file too?
21:48:59*max22- quit (Quit: Leaving)
21:57:59*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
22:02:12*Lord_Nightmare joined #nim
22:02:51FromDiscord<Ayy Lmao> In reply to @System64 "when I interop with": I believe so, I think the FFI code you do in Nim is just so Nim can check your work
22:04:12FromDiscord<Ayy Lmao> I could be wrong though, I haven't gotten too deep into FFI yet
22:22:54FromDiscord<exelotl> You don't usually need the header, unless it has `inline` functions and funky preprocessor macros that you want to use as-is from Nim.
22:22:57FromDiscord<System64 ~ Flandre Scarlet> I should try tomorrow
22:23:27FromDiscord<System64 ~ Flandre Scarlet> wait let me send what I want to interop with
22:23:52FromDiscord<System64 ~ Flandre Scarlet> https://github.com/dmitrysmagin/a2t_play↵That
22:27:27*Vladar quit (Quit: Leaving)
22:38:11*mst quit (Ping timeout: 258 seconds)
22:38:53*mst joined #nim
22:47:31FromDiscord<exelotl> @System64 ~ Flandre Scarlet ah right my bad, I guess the headers are necessary because the C code #includes it
22:48:47FromDiscord<exelotl> if you had a precompiled version of the library (static lib, DLL or similar) then you wouldn't need the headers, because they just have simple function declarations and some integer #defines - once you translate that to Nim, the header becomes redundant, as the Nim module has all the same declarations
22:51:18FromDiscord<exelotl> but for this kind of library I guess it's best to keep the source with the .h and .c files, and use the {.compile.} pragma to ensure the C files get compiled and linked into your project