<< 19-08-2021 >>

00:47:47FromDiscord<Ayy Lmao> Is there a way to get the generic type from a generic?
00:48:52FromDiscord<Ayy Lmao> As in get `float` from `Foo[float]`
00:49:49nrds<ComputerTech99> hai
00:50:23FromDiscord<konsumlamm> In reply to @Ayy Lmao "Is there a way": https://nim-lang.github.io/Nim/typetraits.html#genericParams.t%2Ctypedesc
00:53:06FromDiscord<Ayy Lmao> In reply to @konsumlamm "https://nim-lang.github.io/Nim/typetraits.html#gene": Awesome, thanks!
00:54:18FromDiscord<Ayy Lmao> Neat, there's elementType too. I was wondering about that as well.
01:09:00madpropshow can I pass an int to a proc by reference?
01:09:14madpropsi just want the proc to modify the int
01:09:14FromDiscord<Elegantbeef> `someInt: var int`
01:09:21madpropsi tried that
01:09:34madpropshttps://play.nim-lang.org/#ix=3wp7
01:10:14FromDiscord<Elegantbeef> It replaces all `` at the same time
01:13:20FromDiscord<konsumlamm> it doesn't call `insertnum_rep` multiple times, if you thought that
01:15:17madpropsah right
01:21:05madpropscan't seem to find if re replace can replace one by one
01:23:06FromDiscord<Elegantbeef> Me disliking regex\: https://play.nim-lang.org/#ix=3wp9
01:25:04madprops:o
01:25:57madpropsthat's p complex
01:26:35*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
01:26:43madpropswhat if you liked re though ?
01:26:50FromDiscord<Elegantbeef> I wouldnt
01:27:18madprops\w+
01:27:24FromDiscord<Elegantbeef> Probably use the modern api https://nim-lang.org/docs/nre.html#replace%2Cstring%2CRegex%2Cproc%28RegexMatch%29
01:27:25*stkrdknmibalz joined #nim
01:27:58madpropsthought nre was deprecated? https://github.com/nim-lang/RFCs/issues/31
01:28:48madpropsor idk what the decision was
01:29:43FromDiscord<Elegantbeef> Ah maybe i'm wrong which is modern, but it has more functionality 😀
01:30:31FromDiscord<konsumlamm> there's no real consensus on re vs nre vs regex vs ... afaik
01:30:35FromDiscord<Elegantbeef> Could also use the `nim-regex` package
01:33:07FromDiscord<Elegantbeef> Yea idk use whatever module you prefer
01:33:07FromDiscord<Elegantbeef> Sure my logic has an issue somewhere
01:51:34madpropswell here's another way https://play.nim-lang.org/#ix=3wpe
01:52:56*_KurtGodel_ is now known as KurtGodel
02:08:46*arkurious quit (Quit: Leaving)
02:25:47madpropssmaller version https://dpaste.org/q6vL
03:07:13FromDiscord<rxx> whats the IRC channel
03:09:02FromDiscord<Elegantbeef> libera.chat#nim
03:20:03*rockcavera quit (Remote host closed the connection)
03:40:00*xet7 quit (Remote host closed the connection)
03:40:42*xet7 joined #nim
04:00:05madpropswhat happens when 2 libs have the same proc name?
04:00:15madpropssince everything is auto-imported
04:00:42FromDiscord<Elegantbeef> If there is ambiguity you have to remove it somehow
04:00:49madpropsyou get warned?
04:00:58FromDiscord<Elegantbeef> You get a compiler warning
04:01:04madpropsah that's good
04:01:18FromDiscord<Elegantbeef> There isnt often ambiguity since it's rather rare for two procedures to match parameters and types
04:02:27FromDiscord<Elegantbeef> But then you can do multiple things to resolve ambiguity do `import someModule except ambigousSym` or do `someOtherModule.ambigousSym(arg1, arg2...)`
04:02:42FromDiscord<Elegantbeef> The former works if you dont need the symbol whatsoever, the latter works if you need both
04:04:14madpropsyeah makes sense
04:06:02*supakeen quit (Quit: WeeChat 3.2)
04:06:31*supakeen joined #nim
04:07:40*dmu quit (Quit: leaving)
04:13:28*Mister_Magister quit (Ping timeout: 268 seconds)
04:13:43FromDiscord<Rika> If two things have the same name, no issue if they have different argument signatures
04:14:25FromDiscord<Rika> If they further do have the same argument signatures, you don’t just get a warning, the code doesn’t compile
04:15:52FromDiscord<Elegantbeef> Yea i corrected myself but matrix -\> discord doesnt propagate edits apparently
04:19:20madpropsdiscord to irc edits do propagate :)
04:24:33FromDiscord<Rika> Beef is not on discord
04:30:01FromDiscord<InventorMatt> he is. he just usually uses matrix these days
04:32:43FromDiscord<Rika> That’s not what I mean
04:33:10FromDiscord<Rika> I know he used discord but he rarely does nowadays. I mean that he did not use discord when the compiler warning message was sent
04:33:20FromDiscord<Rika> And when he edited it, the edit did not show because of that
04:34:49FromDiscord<InventorMatt> I realized that more after i actually sent the message
04:36:16FromDiscord<Rika> Haha that’s fine
04:36:34*flynn quit (Read error: Connection reset by peer)
04:37:42*flynn joined #nim
04:41:23FromDiscord<Elegantbeef> Matt checks if i'm on discord daily!
04:41:24FromDiscord<Elegantbeef> "That beef fucker is still here?!"
04:41:42FromDiscord<Rika> Nah that’s me I just don’t say it
04:44:57FromDiscord<Elegantbeef> Dont blame you
06:12:15NimEventerNew post on r/nim by 1985Ronald: Is it possible to create a standalone exe using nim?, see https://reddit.com/r/nim/comments/p796zq/is_it_possible_to_create_a_standalone_exe_using/
06:53:50*jjido joined #nim
07:16:42*Mister_Magister joined #nim
07:22:02*tdc_ joined #nim
07:51:20*max22- joined #nim
07:55:44FromDiscord<j-james> Is there any way to specify file imports from a certain directory, instead of using a bunch of relative paths?
07:59:54*PMunch joined #nim
08:01:04FromDiscord<Elegantbeef> Macros can get all of them in a specific directory, but there is nothing built in
08:01:57FromDiscord<Elegantbeef> An example of this is this mess https://github.com/GaryM-exkage/GDGW-Maverick-Bot/blob/master/src/nimcordbot/utils.nim#L3-L21
08:04:59FromDiscord<j-james> Oh, that wasn't quite what I meant, but I found what I was looking for with `nim.cfg`
08:06:46*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:09:26FromDiscord<Elegantbeef> Ah yea that makes more sense
08:12:40*jjido joined #nim
08:21:06*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:22:23FromDiscord<Yardanico> In reply to @Elegantbeef "An example of this": i mean it's not that messy :P
08:23:13FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3wqu
08:24:25FromDiscord<Yardanico> it can be pretty useful if you have some kind of a module system in your bot
08:24:59NimEventerNew thread by Bitstorm: Is it possible to mix c and c++ backend?, see https://forum.nim-lang.org/t/8343
08:25:17FromDiscord<Elegantbeef> Yea havnet touched the bot in a while so it's mostly just my fancy command handler
08:25:29FromDiscord<Yardanico> how fancy? :P
08:25:34FromDiscord<Yardanico> oh I see
08:25:41FromDiscord<Yardanico> lol you did almost the same thing as I did in the past for my social network bot
08:25:56FromDiscord<Yardanico> great minds think alike
08:26:00FromDiscord<Elegantbeef> Parse test is best example of it
08:26:40FromDiscord<Yardanico> yeah mine was a bit worse in that regard since I didn't have argument listing, the modules were just getting an argument list of strings
08:27:23FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3wqv
08:27:34FromDiscord<Elegantbeef> Ah mine also has fewer russian string lits 😛
08:27:38FromDiscord<Yardanico> lol
08:27:48FromDiscord<Yardanico> well this one was written for a russian social network, so I used russian for commands :P
08:32:34*Helios quit (Quit: Bridge terminating on SIGTERM)
08:32:35*nixfreak_nim[m] quit (Quit: Bridge terminating on SIGTERM)
08:32:37*happycorsair[m] quit (Quit: Bridge terminating on SIGTERM)
08:35:55*nixfreak_nim[m] joined #nim
08:48:58*Helios joined #nim
08:48:58*happycorsair[m] joined #nim
09:14:14*Vladar joined #nim
09:56:58*jjido joined #nim
10:10:59*flynn quit (Read error: Connection reset by peer)
10:11:22*kayabaNerve quit (Ping timeout: 252 seconds)
10:12:07*flynn joined #nim
10:12:48FromDiscord<enthus1ast> what is a good way to make an iterator to a No Op? currently in my "no op when case" i iterate through the param and yield it, but is there a better way?
10:22:57*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
10:23:11FromDiscord<Rika> huh? im unsure of what you mean
10:25:20FromDiscord<enthus1ast> i have an iterator that transforms the input to something else, but this can be deactivated by a define, when the define is set i want to just use the input
10:25:30FromDiscord<enthus1ast> and not have a runtime impact
10:26:56*kayabaNerve joined #nim
10:27:44FromDiscord<Rika> is the input another iterators
10:27:45FromDiscord<Rika> (edit) "iterators" => "iterator\"
10:28:46FromDiscord<enthus1ast> ah i got the solution i guess
10:29:27FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3wqV
10:29:37FromDiscord<enthus1ast> seems to work
10:32:53FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wqX
10:35:41FromDiscord<haxscramper> Otherwise, you have different symbol kinds based on define, and `iterator` sometimes behaves differently from `template` etc.
10:35:45FromDiscord<haxscramper> for example `mapIt` has issues with terators, but it would work with tempalte
10:35:53FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wr0
10:36:00FromDiscord<haxscramper> and putting everything in one implementation allows you to make `noCondenseStrings` a parameter instead of a global whole-project configuration swtich
10:36:28FromDiscord<haxscramper> that is - if you will need this at some point
10:40:11FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3wr1
10:40:50FromDiscord<enthus1ast> in theory it should result in less overall string concatinations
10:41:40FromDiscord<enthus1ast> but more compile time \:)
10:41:53FromDiscord<enthus1ast> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/877864679286902825): in theory it should result in less overall string concatinations on runtime/production
10:43:15FromDiscord<haxscramper> Wwe have `std/ropes` for O(1) concatenation of strings
10:44:02FromDiscord<enthus1ast> i tried ropes in my tests (the user actually can decide) but it was much slower
10:44:26FromDiscord<enthus1ast> only faster for huge strings (but this is kinda expected)
10:46:10FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3wr2
10:48:10FromDiscord<haxscramper> Except for strings (which has it implemented via magic) `&=` is an alias for `add`
10:48:18FromDiscord<haxscramper> Just like `notin`, `in` etc
10:48:22FromDiscord<haxscramper> `!=`
10:48:45FromDiscord<haxscramper> In most cases you don't write these operators, but rather defined `==`, `contains` and `add`
10:49:23FromDiscord<haxscramper> So if you require `.add` instead, you would get both
10:50:06FromDiscord<enthus1ast> i was even thinking about also give the user the option to have the template compile macro generates an iterator body, yielding every string etc, then it would also work for a later "streaming template"
10:50:31FromDiscord<enthus1ast> an template that never finish rendering
10:55:10FromDiscord<enthus1ast> and it would also use less memory, if the underlying httpserver can send data in chunks
11:12:04*tdc joined #nim
11:14:39*tdc_ quit (Ping timeout: 268 seconds)
11:16:15FromDiscord<PsychoClay> is there a way to do this `TypeReg = TableRef[uint32, typedesc]` without making TypeReg generic?
11:16:53FromDiscord<Rika> No, that makes no sense
11:16:58FromDiscord<Rika> How would that work?
11:17:08FromDiscord<PsychoClay> i just want a table to map ints to types
11:17:36FromDiscord<Rika> For what?
11:17:43FromDiscord<Rika> You can’t use types in runtime anyway
11:18:29FromDiscord<PsychoClay> for ecs
11:23:29FromDiscord<haxscramper> types does not exist at runtime and cannot be used as a value
11:23:47FromDiscord<PsychoClay> hmm
11:23:48FromDiscord<haxscramper> The best you can do is `Table[uint32, NimNode]` where nim node has a symbol of a type
11:37:10FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3wrd
11:37:49FromDiscord<PsychoClay> In reply to @enthus1ast "<@596976507033747466>\: in my (toy)": oh nice tnx
11:37:55FromDiscord<enthus1ast> but idk if the speed is comparable to real ecs \:)
11:40:04FromDiscord<enthus1ast> it was fast enough for my purpose, though
11:44:01*jjido joined #nim
11:46:09FromDiscord<planetis> do you need something comparable to rust anymap?
11:52:04FromDiscord<haxscramper> you can write a macro that uses https://nim-lang.org/docs/macros.html#symBodyHash%2CNimNode and accepts `typedesc`
11:52:18FromDiscord<haxscramper> And then do `const typeHash = getTypeHash(T)`
11:53:57FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wrm
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:32*supakeen joined #nim
12:08:38*max22- quit (Ping timeout: 256 seconds)
12:12:53*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
12:22:39*rockcavera joined #nim
12:22:39*rockcavera quit (Changing host)
12:22:39*rockcavera joined #nim
12:31:41FromDiscord<PsychoClay> sent a code paste, see https://play.nim-lang.org/#ix=3wrB
12:36:08*arkurious joined #nim
12:40:01FromDiscord<PsychoClay> sent a code paste, see https://play.nim-lang.org/#ix=3wrC
12:47:18PMunchå/query #federico
12:47:24PMunchWhoops
12:47:33federico3:D
12:47:52PMunchJust a small question about SBCs
12:54:55*xet7 quit (Remote host closed the connection)
12:56:06*xet7 joined #nim
12:56:57FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wrF
12:57:11FromDiscord<haxscramper> As usual, working with types in macro would involve random numbero of `getype()` and typedesc unwraps that are placed around the code
12:58:11FromDiscord<PsychoClay> sent a code paste, see https://paste.rs/cLF
12:58:29FromDiscord<NumLock> Hello
12:59:38*xet7 quit (Read error: Connection reset by peer)
13:00:48*xet7 joined #nim
13:01:38FromDiscord<haxscramper> Well, it uses actual tool designed for that kind of task (mapping types to hashes), but if you are fine with `hash($T)` then ok↵(@PsychoClay)
13:07:19FromDiscord<haxscramper> also you can just do `const h = hash($typeof(T))`
13:09:41FromDiscord<PsychoClay> isnt `typeof T == T`?
13:10:43*Vladar quit (Quit: Leaving)
13:43:31FromDiscord<gerwy> how do i know if threads are on or off?↵i tried using `defined(threads)` but it works for -d symbol, not the threads option
13:43:44FromDiscord<Rika> compileoption
13:43:46FromDiscord<Rika> ?
13:43:49FromDiscord<gerwy> :o
13:44:19FromDiscord<Rika> https://nim-lang.org/docs/system.html#compileOption%2Cstring
13:44:20FromDiscord<gerwy> oooh in system module
13:44:29FromDiscord<gerwy> thaaank you<3
13:50:23*Vladar joined #nim
13:59:17*PMunch quit (Quit: Leaving)
14:01:52*rockcavera quit (Remote host closed the connection)
14:13:57*max22- joined #nim
14:16:19*jjido joined #nim
14:18:13*jjido quit (Client Quit)
14:25:20FromDiscord<TechnoRazor> Is there such thing as an `else when` statement, similar to `else if`?
14:25:57FromDiscord<TechnoRazor> (edit) "`else if`?" => "`elif`?"
14:31:19FromDiscord<Rika> Exactly that
14:31:25FromDiscord<Rika> You can use those with when statements
14:34:05FromDiscord<TechnoRazor> Oh, I didn't realize, thanks
14:36:08*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
15:06:43FromDiscord<enthus1ast> can i test if i'm in a compiletime or runtime context?
15:07:29FromDiscord<enthus1ast> like\:`when compileTime:`
15:08:06FromDiscord<xflywind> `when nimvm`?
15:09:05FromDiscord<enthus1ast> let me try
15:11:14FromDiscord<enthus1ast> yes seems to work, thanks @xflywind
15:11:27FromDiscord<xflywind> np
15:59:33FromDiscord<gerwy> Made Julia set today, that is optimized like mandelbrot version :D
16:00:23*xxov joined #nim
16:26:06*Pyautogui joined #nim
16:27:43PyautoguiI am trying to assign the maximum value of a uint64 as a constant to a uint64. However, I keep getting a value out of range error. I can do it by decrementing the uint at zero, but not by assigning it. Is this a bug?
16:30:35FromDiscord<moein> hi is it possible to get a key value from object?↵like in javascript i can do Object['key'] and the value of 'key' will return
16:33:37FromDiscord<linux user> In reply to @Pyautogui "I am trying to": no u cant
16:33:59FromDiscord<linux user> you have to stop beofre it resets
16:34:34PyautoguiCould you clarify? I am a beginner at using Nim.
16:35:30FromDiscord<exelotl> Sounds like a bug to me
16:35:40FromDiscord<linux user> ...
16:36:03FromDiscord<exelotl> Unless you're trying to assign 2^64
16:36:09FromDiscord<undersquire> ^
16:36:11FromDiscord<linux user> sent a code paste, see https://play.nim-lang.org/#ix=3wtg
16:36:19FromDiscord<undersquire> there is a stdlib thing for max values
16:36:52PyautoguiGot it
16:37:06Pyautogui2^64 - 1 was the value I was trying to assign.
16:37:12FromDiscord<linux user> (edit) "https://play.nim-lang.org/#ix=3wtg" => "https://play.nim-lang.org/#ix=3wth"
16:37:29Pyautoguithanks
16:37:41FromDiscord<linux user> 😃>
16:37:45FromDiscord<linux user> (edit) "😃>" => "😃."
16:37:47FromDiscord<konsumlamm> well, that would require evaluating 2^64 first, which would overflow
16:37:55FromDiscord<linux user> ohyes lol
16:38:26PyautoguiNo, I was writing it out as a explicit number
16:38:32PyautoguiNo evaluation required
16:38:52Pyautogui18446744073709551615
16:40:11FromDiscord<exelotl> I guess it would work if you included the type postfix like 18446744073709551615'u64
16:40:40PyautoguiYes, thanks, that works.
16:40:52PyautoguiI was trying to do uint64(18446744073709551615)
16:43:35FromDiscord<moein> In reply to @moein "hi is it possible": hash table is my answer apparently
16:59:11FromDiscord<enthus1ast> is there a runtime replacement of parseStmt that returns PNode?
17:06:09*Pyautogui quit (Ping timeout: 248 seconds)
17:10:44FromDiscord<linux user> In reply to @Pyautogui "I was trying to": is this a proc
17:15:13FromDiscord<enthus1ast> maybe https://nim-lang.org/docs/compiler/parser.html#parseString%2Cstring%2CIdentCache%2CConfigRef%2Cstring%2Cint%2CErrorHandler
17:31:35FromDiscord<haxscramper> yes. or `parseAll` https://github.com/haxscramper/hnimast/blob/master/src/hnimast/pnode_parse.nim#L44
17:31:51*rockcavera joined #nim
17:31:51*rockcavera quit (Changing host)
17:31:51*rockcavera joined #nim
17:51:45FromDiscord<gerwy> does c2nim works on C code that uses SDL?
17:54:06FromDiscord<haxscramper> SDL is a c simple C library, so there should be no issues
17:59:25*jjido joined #nim
18:06:40*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
18:28:37FromDiscord<moein> when i'm returning a hash table using table module what should i set my return in proc?
18:29:11FromDiscord<enthus1ast> Table[Hash, YourStuff]
18:29:15FromDiscord<moein> sent a code paste, see https://play.nim-lang.org/#ix=3wtR
18:29:39FromDiscord<enthus1ast> ok then Table[string, int]
18:31:13FromDiscord<enthus1ast> nope newTable is TableRef[string, int]
18:31:44FromDiscord<moein> nice thanks
18:32:00FromDiscord<enthus1ast> but, there is also toTable
18:32:15FromDiscord<enthus1ast> do you want a Table\_Ref\_ ?
18:33:43FromDiscord<moein> I'm not sure i need a map that i can iterate on it. maybe there is better options i'm not aware of
18:33:59FromDiscord<enthus1ast> yeah then better use toTable
18:35:15FromDiscord<moein> thanks
18:37:37*Vladar quit (Quit: Leaving)
18:40:23FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3wtT
18:40:49FromDiscord<enthus1ast> he wants to iterate
18:42:38FromDiscord<moein> In reply to @Yardanico "also, just so you": yes keys won't change but i need to iterate over them
19:00:26*idf quit (*.net *.split)
19:00:27*mjsir911 quit (*.net *.split)
19:00:27*Amun-Ra quit (*.net *.split)
19:00:38*idf joined #nim
19:01:09*Amun-Ra joined #nim
19:03:15*mjsir911 joined #nim
19:08:21FromDiscord<moein> does nim support || operator?
19:08:39FromDiscord<moein> in a if statement i need to check variable against two values
19:08:49FromDiscord<moein> like this: if goal == "weightLoss" || goal == "weightGain":
19:09:17FromDiscord<enthus1ast> `or`?
19:10:04FromDiscord<moein> yeah exactly
19:10:24FromDiscord<moein> nice
19:20:43FromDiscord<haxscramper> In reply to @moein "like this: if goal": IIRC You can also do `goal in ["weightGain", "weightLoss"]`
19:23:09FromDiscord<enthus1ast> yes
19:23:34FromDiscord<enthus1ast> `for goal in ["weightGain", "weightLoss"]: ` you mean?
19:25:09FromDiscord<enthus1ast> but yes
19:36:07*Amun-Ra quit (Quit: Gdyby mi się chciało tak jak mi się nie chce...)
19:36:27*Amun-Ra joined #nim
19:44:27FromDiscord<haxscramper> No, as condition, instead of repeating goal ==
19:44:43FromDiscord<enthus1ast> yes
19:44:47*cyraxjoe joined #nim
19:56:49*xxov quit (Ping timeout: 246 seconds)
20:12:46*xet7 quit (Remote host closed the connection)
20:13:52*xet7 joined #nim
20:32:08*jjido joined #nim
20:34:54*tdc quit (Quit: Leaving)
20:36:23madpropss &= if (m and vf) or (not m and not vf):
20:36:26madpropsis that allowed?
20:36:30madprops(it also has an else)
20:36:46madpropsI mean can I append &= from an if like that?
20:37:19FromDiscord<Elegantbeef> You can
20:38:19FromDiscord<Elegantbeef> You could also do https://play.nim-lang.org/#ix=3wue but this is getting into bikeshed territory
20:39:15madpropsinteresting
20:39:56madpropsit's just that im getting
20:39:57madpropsError: expression expected, but found 'keyword if'
20:40:09FromDiscord<Elegantbeef> full code example?
20:40:11madpropshttps://dpaste.org/vx1L
20:40:23madpropsor i can post fuller
20:40:38madpropsns_vowels and ns_constants are arrays of chars
20:41:31madpropsif i use an intermediary variable to store the result
20:41:34madpropsi then can append it to s
20:41:54FromDiscord<Elegantbeef> Fuller code would be nicer, something i can run
20:42:09madpropsok
20:43:34madpropshttps://play.nim-lang.org/#ix=2sSr
20:43:54madpropsok forgot to add n
20:44:02madpropsn can be 4 for example
20:44:39madpropsalso that returns shouldn't be there
20:44:59FromDiscord<Elegantbeef> ix.io didnt like that url, only getting a C file
20:45:47madpropshttps://dpaste.org/LWQ4
20:48:09madpropshttps://play.nim-lang.org/#ix=3wuf
20:48:20FromDiscord<Elegantbeef> Ah ok so the issue seems to be with the `&=` operator you need to enclose the expression in `()` otherwise it doesnt work
20:49:11madpropsthe whole if else or just the if ?
20:50:15madpropsok it's the full if else
20:50:16madpropswhy is that though
20:51:58FromDiscord<Elegantbeef> Seems assignment operators do not like unwrapped expressions
20:53:44FromDiscord<j-james> How is this project able to reference files from a containing directory?
20:53:44FromDiscord<j-james> https://github.com/pragmagic/godot-nim/blob/master/godot/core/aabb.nim#L6
20:55:45FromDiscord<⃟⃟> can you make a `++` operator like `a ++ b`
20:56:07FromDiscord<Elegantbeef> You can make binary and infix operators
20:56:14FromDiscord<Elegantbeef> no postfix
20:56:53FromDiscord<j-james> In reply to @j-james "How is this project": Ah, never mind, I missed the sneaky `nim.cfg` file
20:57:45FromDiscord<Elegantbeef> i mean infix and prefix, no postfix operators
21:01:29FromDiscord<⃟⃟> wait
21:01:36FromDiscord<⃟⃟> what type are strings
21:02:01FromDiscord<Elegantbeef> Strings
21:02:02FromDiscord<Elegantbeef> `string` exactly
21:02:18FromDiscord<⃟⃟> so they arent some char[] type or something?
21:02:28FromDiscord<Elegantbeef> No they're pascal style strings
21:02:34FromDiscord<Elegantbeef> if you want a C string use `cstring`
21:03:05FromDiscord<⃟⃟> i dont
21:03:47FromDiscord<⃟⃟> i was just expecting them to be some sort of arraylist of characters
21:03:50FromDiscord<⃟⃟> not a special type
21:04:21FromDiscord<Elegantbeef> Well they're internally the same as `seq[char]` with some caveats
21:04:38FromDiscord<⃟⃟> like what
21:04:39FromDiscord<Elegantbeef> the character after the last one is always a `\0` so you can do `.cstring` for free
21:14:27*supakeen quit (Remote host closed the connection)
21:14:51*supakeen joined #nim
21:23:11*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
21:44:42madpropshow should I doc-comment this? https://dpaste.org/OAkv
21:45:29FromDiscord<Elegantbeef> well you shouldnt use a table for a start
21:47:29FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3wuv is just better 😀
21:47:58madpropsah nice
21:48:43FromDiscord<Elegantbeef> also could've used `array['a'..'c', int]` but not overly needed since this is a simple conversion
21:49:20madpropsso by implementing toAlphabetPos you get a toIndex method ?
21:49:39FromDiscord<Elegantbeef> Nah i just changed the name
21:49:43FromDiscord<Elegantbeef> I'm a dumb dumb
21:50:21FromDiscord<Elegantbeef> it was `toIndex` but that wasnt a good name so changed it to `toAlphabetPos` and forgot to change the calling code
21:50:24madpropsso that's faster than a table?
21:50:35FromDiscord<Elegantbeef> Vastly
21:50:59FromDiscord<Elegantbeef> Well it doesnt need to hash a byte, so it's not "vastly" but is faster
21:51:33madpropsi see
21:51:38FromDiscord<Elegantbeef> You can always benchmark it, i imagine it'll be faster in larger numbers, but it's more of a case of not using a useless table and using more memory
21:52:51madpropsok using that also got rid of 2 imports
21:52:56madpropstables and enumerate
22:01:04*max22- quit (Quit: Leaving)
22:10:39madpropshmm having some issue not sure why https://dpaste.org/KPT1
22:15:22madpropsok seems it was a strformat issue again
22:15:28madpropshad to precalculate a var
22:17:25*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
22:18:52FromDiscord<enthus1ast> yeah first runtime evaluated nimja templates \:D
22:21:27madpropshow can I specify output for nim docs?
22:21:46madpropsinstead of putting it in src/
22:22:29madpropsor should I move the output manually
22:22:42FromDiscord<enthus1ast> ` -o:docs/`
22:23:13FromDiscord<enthus1ast> nim doc --project -o\:docs/ src/nimja.nim
22:23:19madpropswhy --project ?
22:23:51FromDiscord<enthus1ast> this also generates docs for all imported modules
22:24:16madpropsoh
22:24:25madpropsincluding std modules?
22:24:48FromDiscord<enthus1ast> ähm
22:25:01FromDiscord<enthus1ast> i don't think so
22:25:20madpropslocal modules yeah
22:25:24madpropsit's just that i have a single file
22:26:18FromDiscord<enthus1ast> then you dont need --project i suppose
22:27:20madpropsweird thing is that it creates theindex.html
22:27:28madpropsand thelibname.html
22:27:48FromDiscord<enthus1ast> this you can disable
22:28:21madpropsok I see
22:28:25madpropsusing --indexs
22:28:29madprops--index
22:28:38FromDiscord<Elegantbeef> Mad you may want to use `strformat.%`
22:29:13FromDiscord<Elegantbeef> Actually why are you even using formatting there
22:30:26madpropsto avoid & " " & ?
22:33:05FromDiscord<Elegantbeef> Sure but https://play.nim-lang.org/#ix=3wuE
22:33:58FromDiscord<Elegantbeef> sorry forgot the `import std/strformat`
22:34:25madpropsyou're right
22:34:53FromDiscord<Elegantbeef> Jesus today is not my day, cannot right any usable code today 😀
22:36:56madpropshttps://dpaste.org/xnom
22:37:10*xet7 quit (Remote host closed the connection)
22:37:27FromDiscord<Elegantbeef> Why are you writing to a temp variable then returning?!
22:39:09madpropsbecause i might add to the s variable
22:39:24FromDiscord<Elegantbeef> But result exists
22:41:03madpropsyou mean the if result?
22:41:08FromDiscord<Elegantbeef> The uppityness about result is mostly joking, but https://play.nim-lang.org/#ix=3wuF
22:41:19FromDiscord<Elegantbeef> Nim has the explict result variable, no reason to make your own
22:41:25FromDiscord<Elegantbeef> implicit\
22:41:30FromDiscord<Elegantbeef> I really cannot do anything right today
22:42:26madpropsoh i forgot nim had the result thing
22:47:46madpropscleaned up some lines using result, nice
22:57:16FromDiscord<QueenFuckingAdrielle> hulloh
22:58:54FromDiscord<QueenFuckingAdrielle> Its been a while since I've been here, still my favorite programming discord
22:59:00FromDiscord<Elegantbeef> Hello
22:59:07FromDiscord<QueenFuckingAdrielle> Hey elegant
22:59:36FromDiscord<QueenFuckingAdrielle> changed my name, used to be gyllou, im the robot chick
23:00:24FromDiscord<Elegantbeef> Ah
23:00:49FromDiscord<QueenFuckingAdrielle> you gave me a bunch of advice a while back lol
23:00:50*flynn quit (Read error: Connection reset by peer)
23:01:12FromDiscord<QueenFuckingAdrielle> i have a new consulting job i might be able to use nim for so im excited
23:01:43FromDiscord<Elegantbeef> Nice, becoming a more common phrase to hear
23:01:56*flynn joined #nim
23:02:00FromDiscord<QueenFuckingAdrielle> yea im in a good spot to push for it now thankfully
23:02:31FromDiscord<QueenFuckingAdrielle> still working on our robotics platform as well. not sure what sort of bd we are headed for though
23:03:04FromDiscord<QueenFuckingAdrielle> im hopefully going to be using in this biotech contract i have though
23:03:37FromDiscord<QueenFuckingAdrielle> are you in the us elegant?
23:04:37*xet7 joined #nim
23:08:59nrds<Prestige99> Hope you get to use Nim, that would be awesome
23:10:08FromDiscord<Elegantbeef> Nope
23:10:19FromDiscord<Elegantbeef> Slightly north of that land
23:11:00FromDiscord<ynfle (ynfle)> Canada! No way!
23:11:24FromDiscord<Elegantbeef> Very much so
23:12:31*stkrdknmibalz joined #nim
23:12:50FromDiscord<Elegantbeef> ynfle what's so impressive with RNGing myself here? 😛
23:13:32FromDiscord<QueenFuckingAdrielle> O_o
23:16:22FromDiscord<ynfle (ynfle)> I'm from Canada too
23:16:45FromDiscord<QueenFuckingAdrielle> not far off here, upstate ny
23:17:09FromDiscord<Elegantbeef> I mean i'm far from NY so yes i am
23:17:44FromDiscord<QueenFuckingAdrielle> lol well yes, i imagine not everyone lives that close to nys
23:18:26FromDiscord<QueenFuckingAdrielle> i just wanted to live somewhere decent thats as far away without needing a visa
23:18:40FromDiscord<ynfle (ynfle)> Alaska?
23:18:58FromDiscord<ynfle (ynfle)> Hawaii?
23:18:59FromDiscord<QueenFuckingAdrielle> i thought about it, but they arent very nice to gay people there for the most part
23:19:12FromDiscord<QueenFuckingAdrielle> no thanks on hawaii, too hot
23:19:54FromDiscord<QueenFuckingAdrielle> It was between main and nys, decided on nys because of the economy
23:20:09FromDiscord<QueenFuckingAdrielle> (edit) "main" => "maine"
23:24:29FromDiscord<Elegantbeef> Where you located ynfle, i'm in bumfuck nowhere alberta? \:D
23:27:33FromDiscord<ynfle (ynfle)> Lol, sounds like it
23:27:36FromDiscord<ynfle (ynfle)> Ontario
23:27:53FromDiscord<ynfle (ynfle)> Well not now. I'm a student elsewhere