<< 04-07-2021 >>

00:00:07FromDiscord<⃟⃟> i mean that depends
00:00:09FromDiscord<ElegantBeef> Not to say it's not possible since `unicode` does have `toLower`
00:00:23FromDiscord<ElegantBeef> So it could always be possible
00:00:26FromDiscord<⃟⃟> i would probably use π in certain libraries
00:00:40FromDiscord<codic> no, just use `pi`
00:00:54FromDiscord<⃟⃟> i would have pi and π
00:00:59FromDiscord<codic> so that a non greek keyboard can easily type it
00:01:15FromDiscord<⃟⃟> actually in that case i guess it wouldnt matter since the first character is excluded
00:01:19FromDiscord<ElegantBeef> But that's a single character so doesnt benefit from style insenstivity
00:01:21FromDiscord<ElegantBeef> Yep
00:01:29FromDiscord<codic> would you want the symbols `Π` `π` `ϖ` to be equivalent
00:01:37FromDiscord<codic> assuming they werent used as the first character
00:01:51FromDiscord<ElegantBeef> It's more about style insensitivity between libraries and your code
00:01:59FromDiscord<ElegantBeef> So if you want to usue snake case with the stdlib for instance
00:02:05FromDiscord<⃟⃟> i would not, but i would not want `p` and `P` to be treated the same either
00:02:35FromDiscord<ElegantBeef> Well then do `--styleCHeck:error`
00:02:38FromDiscord<ElegantBeef> (edit) "`--styleCHeck:error`" => "`--styleCheck:error`"
00:02:55FromDiscord<ElegantBeef> Style insensitivity is lovely to have, but to each their own
00:03:07FromDiscord<⃟⃟> but also you said "symbols" but for some they are letters used in their language
00:03:33FromDiscord<ElegantBeef> Letters are symbols
00:04:14FromDiscord<⃟⃟> but not all symbols are letters
00:04:25FromDiscord<⃟⃟> for example `>`
00:04:43FromDiscord<ElegantBeef> Ok i'm loosing the point of this conversation now
00:05:10FromDiscord<⃟⃟> the point is i find it not consistent that it only supports latin letters
00:05:17FromDiscord<ElegantBeef> Well congrats it's not
00:06:03FromDiscord<ElegantBeef> making an RFC is probably the best you can do in this case
00:06:26FromDiscord<codic> i think the current style using latin letters is fine
00:06:51FromDiscord<codic> i have not seen any code (except something trying to be obfuscated) where names are not written in the latin script
00:07:04FromDiscord<ElegantBeef> Well there is some merit using unicode in math libraries
00:07:23FromDiscord<ElegantBeef> But i generally dislike unicode since i'm not overly competent of inputing it
00:07:59FromDiscord<⃟⃟> one use case is in math so you can copy a formula more closely to how it is usually written
00:08:17FromDiscord<⃟⃟> and that is for programmers who are english speakers
00:08:38FromDiscord<⃟⃟> if you speak greek for example you might use greek for names
00:09:33FromDiscord<ElegantBeef> Fun unicode conversation can be found here https://github.com/nim-lang/RFCs/issues/388
00:10:55FromDiscord<codic> i can already imagine it
00:11:00FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3rSl
00:11:20FromDiscord<codic> ellenika demokratia arithmos!
00:12:28FromDiscord<⃟⃟> wait does it allow me to define custom operators?
00:12:47FromDiscord<ElegantBeef> Not presently using unicode
00:12:54FromDiscord<ElegantBeef> That's what that RFC is addressing
00:13:15FromDiscord<ElegantBeef> unicode is just taken as the string presently since it's not in 0..255
00:14:02FromDiscord<ElegantBeef> I've seen clyybber start writting like 3 messages now just to dismiss me ;P
00:15:36FromDiscord<⃟⃟> why does it have that restriction
00:16:25FromDiscord<clyybber> In reply to @ElegantBeef "I've seen clyybber start": haha I was just using the textbox to find out what funky unicode chars make up @⃟⃟ 's name :D
00:16:37FromDiscord<ElegantBeef> Cause operators presently can only be made with a specific set of characters
00:17:02FromDiscord<clyybber> theres an RFC for unicode operators
00:17:07FromDiscord<clyybber> oh
00:17:07FromDiscord<ElegantBeef> I linked it!
00:17:10FromDiscord<clyybber> Haha
00:17:42FromDiscord<⃟⃟> wait does the previous rule apply to operators too
00:17:50FromDiscord<⃟⃟> `and = aNd`?
00:17:58FromDiscord<ElegantBeef> yes
00:18:11FromDiscord<ElegantBeef> It applies to all identifiers
00:21:06FromDiscord<⃟⃟> could i overload an operator so that it could work like `30 operator`
00:21:43FromDiscord<ElegantBeef> postfix is generally no
00:22:12FromDiscord<ElegantBeef> The only postfix operator i can think of is the export marker
00:23:27FromDiscord<⃟⃟> also
00:23:38FromDiscord<⃟⃟> since it dosent use `{}` for blocks
00:24:08FromDiscord<ElegantBeef> Have you just read a "Nim in X seconds" and decided to give insight on features you've never used? 😄
00:24:59FromDiscord<⃟⃟> couldn't it have used `[]` for function call, `{}` for lists, and `()` for equations
00:25:19FromDiscord<codic> whatd you use for generics
00:25:19FromDiscord<ElegantBeef> `{}` is for sets/table constructors
00:25:46FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3rSo
00:25:51FromDiscord<⃟⃟> maybe `{}`
00:25:52FromDiscord<ElegantBeef> and `()` works for equations
00:26:03FromDiscord<codic> `proc x{T}(arg: T)`
00:26:06FromDiscord<codic> meh, dont like it
00:26:08FromDiscord<codic> rather have <>
00:26:11FromDiscord<codic> but [] is superior
00:26:15FromDiscord<⃟⃟> wait i forgot
00:26:20FromDiscord<ElegantBeef> Well we presently have `{}` which mirrors mathematical set construction
00:26:38FromDiscord<⃟⃟> there is also `<>` but i would probably not use it since it is also used for comparison
00:26:51FromDiscord<ElegantBeef> I mean it theoretically could use anything, but it doesnt
00:26:56FromDiscord<⃟⃟> `proc f{T}[a T]`
00:27:10FromDiscord<⃟⃟> `f{int}[5]`
00:27:14FromDiscord<codic> no thank you
00:27:20FromDiscord<⃟⃟> it looks kind of bad
00:27:33FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3rSp
00:27:55FromDiscord<codic> (edit) "https://play.nim-lang.org/#ix=3rSp" => "https://play.nim-lang.org/#ix=3rSq"
00:27:58FromDiscord<ElegantBeef> Go does it right with `proc(T)(args)` no confusion whatsoever it's so clear that Go language design is i nthe trash!
00:28:02FromDiscord<codic> (edit) "https://play.nim-lang.org/#ix=3rSq" => "https://play.nim-lang.org/#ix=3rSp"
00:28:04FromDiscord<ElegantBeef> (edit) "i nthe" => "in the"
00:28:14FromDiscord<codic> lmao
00:28:17FromDiscord<codic> no generics lol
00:28:22FromDiscord<ElegantBeef> They have generics soon
00:28:25FromDiscord<codic> ™️
00:28:25FromDiscord<ElegantBeef> That's the RFC for it
00:28:32FromDiscord<ElegantBeef> Or w/e their process is
00:28:33FromDiscord<codic> they dont have proc they have func
00:28:34FromDiscord<codic> 🤔
00:28:46FromDiscord<ElegantBeef> proc is in place of the functionname dingo
00:28:48FromDiscord<codic> generics are set to ship in 2022
00:29:02FromDiscord<codic> zig has it right, no generics, but every type has the type `type`
00:29:06FromDiscord<ElegantBeef> lol
00:29:09FromDiscord<codic> therefore you can write
00:29:20FromDiscord<codic> `fn genericFunction(comptime T: type, x: T)`
00:29:37FromDiscord<codic> c++ does it right because everyone loves writing c++
00:29:45FromDiscord<ElegantBeef> I feel like > is just suggesting things based off reading the description of features still, not realizing nim is presently 1.0'd and these suggestions would go right into the shredder
00:29:52FromDiscord<⃟⃟> i like that idea
00:30:00FromDiscord<⃟⃟> it means a new syntax is not needed
00:30:05FromDiscord<ElegantBeef> Well it works in nim
00:30:06FromDiscord<ElegantBeef> So be happy
00:30:10FromDiscord<codic> it does/
00:30:11FromDiscord<codic> (edit) "does/" => "does?"
00:30:13FromDiscord<codic> very interesting
00:30:14FromDiscord<ElegantBeef> yes
00:30:19FromDiscord<codic> how do you acept a parameter of type type
00:30:24FromDiscord<ElegantBeef> `proc name(yourType: typedesc, args)`
00:30:29FromDiscord<ElegantBeef> (edit) "args)`" => "args: yourType)`"
00:30:30FromDiscord<codic> 🤔
00:30:31FromDiscord<codic> nice
00:30:34FromDiscord<codic> not as nice as
00:31:13FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3rSr
00:31:14FromDiscord<codic> as some silly style guides want you to write
00:31:21FromDiscord<codic> embrace the whitespace
00:31:21FromDiscord<ElegantBeef> Ah the sarcasm is in full force today
00:31:44FromDiscord<codic> lol
00:31:50FromDiscord<codic> ive seen real code that looks like that
00:32:10FromDiscord<ElegantBeef> Ah you mean shit, yea that's just how C++ looks 😛
00:33:01FromDiscord<⃟⃟> can all forms of automatic resource management be disabled and be made compile errors?
00:33:09FromDiscord<⃟⃟> is there a flag for it?
00:33:11FromDiscord<codic> --gc:none
00:33:15FromDiscord<codic> plus
00:33:21FromDiscord<codic> --warningAsError:on
00:33:35FromDiscord<ElegantBeef> Now any use of gc memory will stop compilation
00:33:43FromDiscord<ElegantBeef> Though still uncertain why you'd really want that
00:33:46FromDiscord<codic> or you can do --warningAsError[thespecifcerroriforgetthename]:on
00:35:07FromDiscord<⃟⃟> if i do this will it make most of the standard library not work?
00:35:13FromDiscord<ElegantBeef> Yes
00:36:23FromDiscord<ElegantBeef> Anything that deals with `seq` or `string` will stop working
00:36:28FromDiscord<⃟⃟> in c++ certain things support using custom memory allocation, does this language not do this?
00:36:41FromDiscord<ElegantBeef> You can change the global allocator or allocate on your own
00:37:28FromDiscord<⃟⃟> if i did that would the standard library work but i just have to manually free?
00:38:09FromDiscord<ElegantBeef> Well with a different global allocator it'd just free as normal, but with manual allocations it's like using `malloc`, you're the memory management
00:38:22FromDiscord<aleclarson> Is there a special term for `{ "foo": bar }` data structure?
00:38:29FromDiscord<codic> set
00:38:30FromDiscord<ElegantBeef> table constructor
00:38:37FromDiscord<codic> oh
00:38:38FromDiscord<ElegantBeef> set is `{a, b}`
00:39:06FromDiscord<aleclarson> It evaluates to an array of tuples
00:39:41FromDiscord<aleclarson> Don't tables need `toTable`?
00:39:49FromDiscord<ElegantBeef> Well it's called a table constructor internally
00:39:58FromDiscord<ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/861043624795045898/unknown.png
00:40:20FromDiscord<ElegantBeef> https://nim-lang.org/docs/macros.html#the-ast-in-nim if you want to read about the entire AST
00:40:36FromDiscord<fleud> can you use strformat to round a float64?
00:41:52FromDiscord<⃟⃟> round to what
00:42:00FromDiscord<ElegantBeef> !eval import std/strformat;echo fmt"{3.14156: .3}"
00:42:04NimBot 3.14
00:42:25FromDiscord<ElegantBeef> If you mean round to specific decimal
00:42:47FromDiscord<ElegantBeef> if you mean round to nearest just
00:42:58FromDiscord<ElegantBeef> !eval import std/strformat;echo 3.14156.round.int
00:43:00NimBotCompile failed: /usercode/in.nim(1, 34) Error: undeclared field: 'round' for type system.float64 [declared in /playground/nim/lib/system.nim(28, 3)]
00:43:10FromDiscord<ElegantBeef> it's in math isnt it
00:43:10FromDiscord<⃟⃟> !eval echo hi
00:43:11NimBotCompile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: 'hi'
00:43:21FromDiscord<⃟⃟> !eval echo "hi"
00:43:23NimBothi
00:43:46FromDiscord<⃟⃟> !eval echo ("a" 2)
00:43:47NimBotCompile failed: /usercode/in.nim(1, 11) Error: invalid token: (\29)
00:44:17FromDiscord<ElegantBeef> !eval echo ('a'.ord 2)
00:44:18NimBotCompile failed: /usercode/in.nim(1, 15) Error: invalid token: (\29)
00:44:20FromDiscord<ElegantBeef> But quit spamming it 😄
00:44:49FromDiscord<ElegantBeef> Ah this bastard using unicode
00:45:18FromDiscord<⃟⃟> its not
00:45:39FromDiscord<ElegantBeef> Odd
00:45:45FromDiscord<fleud> this is the line im using, i just need answer rounded to the 10th decimal place. sorry im kinda new lol↵`return &"[{n}, {answer}]"`
00:46:07FromDiscord<ElegantBeef> yea so it's `{yourfloat: .1}`
00:46:14FromDiscord<ElegantBeef> `.number` is how many decimals
00:46:33FromDiscord<ElegantBeef> https://nim-lang.org/docs/strformat.html#formatting-floats
00:46:43FromDiscord<fleud> yea i saw it in there im just bad at interpreting it lol
00:46:58FromDiscord<⃟⃟> but do you want it as a float or string?
00:47:03FromDiscord<fleud> string
00:47:10FromDiscord<fleud> is there a way to remove this space thing https://media.discordapp.net/attachments/371759389889003532/861045432087478272/unknown.png
00:47:10FromDiscord<⃟⃟> how would you round a float im curious
00:47:12FromDiscord<ElegantBeef> Well they're string formatting
00:47:38FromDiscord<ElegantBeef> By not putting it in your strformat
00:47:51FromDiscord<fleud> trueeeee
00:47:53FromDiscord<fleud> lmfao
00:48:13FromDiscord<ElegantBeef> Well the easiest is `round(yourFloat / nearest) nearest`
00:48:25FromDiscord<ElegantBeef> but floats are fickle so that will not work exactly
00:49:51FromDiscord<ElegantBeef> But assuming you dont need exact decimals, it's fine
00:49:51FromDiscord<fleud> apparently they dont always want it round this far if it ends in a 0 https://media.discordapp.net/attachments/371759389889003532/861046113141391400/unknown.png
00:50:31FromDiscord<⃟⃟> can your application be changed to use fractions?
00:50:36FromDiscord<fleud> no
00:51:31FromDiscord<fleud> its just a codewars question lol i have the answer right they just want it in this format
00:53:01FromDiscord<ElegantBeef> Can also use https://nim-lang.org/docs/strutils.html#formatEng%2CBiggestFloat%2Crange%5B%5D%2Cbool%2Cbool%2Cstring%2Cchar
00:53:17FromDiscord<⃟⃟> can i make a packed struct
00:53:19FromDiscord<ElegantBeef> But wrong one 😄
00:53:28FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual.html#foreign-function-interface-packed-pragma
00:53:29FromDiscord<ElegantBeef> Yes
00:53:39FromDiscord<⃟⃟> would it then be safe to used simd operations on it?
00:53:56FromDiscord<ElegantBeef> Here's the proper one https://nim-lang.org/docs/strutils.html#formatFloat%2Cfloat%2CFloatFormatMode%2Crange%5B%5D%2Cchar
00:54:11FromDiscord<ElegantBeef> No clue, there are nim libraries that use simd
00:55:32FromDiscord<dan> @ElegantBeef You deserve a raise ... really workin overtime here
00:55:59FromDiscord<⃟⃟> two more questions
00:56:31FromDiscord<fleud> formatEng worked thank you 😄
00:56:33FromDiscord<ElegantBeef> In reply to @dan "<@!145405730571288577> You deserve a": Well i'll throw down a hat and people can throw pennies in
00:56:35FromDiscord<⃟⃟> can i use `{}` for blocks, and can i use C libraries automatically without having to re define every function
00:56:43FromDiscord<ElegantBeef> No you cannot use `{}`
00:57:05FromDiscord<ElegantBeef> You also cannot use C libraries automatically, you need bindings, but nimterop and c2nim exist to make it easier
00:57:26FromDiscord<ElegantBeef> In reply to @ElegantBeef "Well i'll throw down": Though i'm Canadian and we dont have pennies so hey say amount!
00:57:51FromDiscord<ElegantBeef> (edit) "say" => "same"
00:59:48FromDiscord<ElegantBeef> You can use `()` for blocks though, but it's fugly
01:04:28*bkay joined #nim
01:04:42*beshr quit (Ping timeout: 252 seconds)
01:32:07*arkurious quit (Quit: Leaving)
01:45:47fn<ForumUpdaterBot99> New thread by Stu002: Compiler error: "... is T too nested for type matching", see https://forum.nim-lang.org/t/8192
01:46:25FromDiscord<stu002> Can someone advise on this compiler error `... is T too nested for type matching` https://forum.nim-lang.org/t/8192#52694
01:46:45FromDiscord<stu002> Can I change the limit for "too nested"?
01:46:53FromDiscord<ElegantBeef> Can we get the full concepts?
01:48:30FromDiscord<stu002> Very similar to https://github.com/andreaferretti/emmy/blob/master/emmy/structures.nim but will collate them into one file and put up a gist (they're across seven different files ATM
01:48:35FromDiscord<ElegantBeef> Cause in the example you dont need `B or C`
01:48:45FromDiscord<ElegantBeef> Since they're jus aliases of `A`
01:48:48FromDiscord<ElegantBeef> (edit) "jus" => "just"
01:49:00FromDiscord<stu002> B and C have B and C specific functions
01:51:52FromDiscord<ElegantBeef> The alternative is to compose your concepts like this https://play.nim-lang.org/#ix=3rSE
01:54:37FromDiscord<stu002> In reply to @ElegantBeef "The alternative is to": That's interesting thanks. I guess my Field concept would be like `Field is AddMagma and MulMagma and AddSemigroup and MulSemigroup and AddMonoid and MulMonoid and AddGroup and Mulgroup...` for a 14 element type definition.
01:55:15FromDiscord<stu002> Or I could build up each with a type definition at each level for 7 types I think.
01:58:05FromDiscord<ElegantBeef> Well couldnt you make `Semigroup` which is `MulSemigroup and AddSemigroup` and basically break these into easily composable concepts?
01:58:10FromDiscord<stu002> Interestingly if I combine all modules in one file https://play.nim-lang.org/#ix=3rSI the error goes away
01:58:52FromDiscord<ElegantBeef> Odd, havent used concepts enough to give any reason to why
01:59:19FromDiscord<stu002> In reply to @ElegantBeef "Well couldnt you make": Yes -- but with parallel hierarchies of types for additive, multiplicative, abstract etc
01:59:36FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3rSJ
01:59:50FromDiscord<stu002> Can I change the magic number 7?
02:00:13FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3rSK
02:00:26FromDiscord<stu002> In reply to @ElegantBeef "Like these are just": Yes -- these will have semigroup specific axioms that take (x, y, z: Semigroup) parameters
02:00:32FromDiscord<ElegantBeef> ah ok
02:00:34FromDiscord<stu002> But I haven't written them yet
02:01:11FromDiscord<stu002> Not sure why the error goes away for all-in-one-file code
02:01:31FromDiscord<ElegantBeef> No clue, either maybe check nim's issues or hope someone with a brain can help you 😛
02:42:52FromDiscord<Bung> @treeform can I simply detete a deep json key use `jsony`?
02:46:48FromDiscord<stu002> In reply to @ElegantBeef "No clue, either maybe": Your brain looks very useful from here 👍
02:47:38FromDiscord<ElegantBeef> In reply to @stu002 "Your brain looks very": Ah your optometrist called time for your annual checkup 😛
03:00:38FromDiscord<Varriount> Zevv: Out of curiosity, why does NPeg require using an asterisk to join identifiers? Wouldn't command syntax have allowed doing without them?
03:04:15FromDiscord<@bracketmaster-5a708063d73408ce4> @narimiran - just started looking at the BigInt codebase - I think I'll add support for bitwise operators myself as this seems fairly trivial? Is there anything I'm missing?
04:06:02*supakeen quit (Quit: WeeChat 3.2)
04:06:37*supakeen joined #nim
04:25:52*xet7 joined #nim
04:56:31FromDiscord<treeform> In reply to @Bung "<@!107140179025735680> can I simply": I don't understand, jsony ignores keys that are not part of num objects.
04:59:49FromDiscord<Bung> nvm, I thought omit one deep field if the key exists from json obj or json string, not needed anymore.
06:05:27FromDiscord<Bung> It seems I can't get ref object from dll proc returns
06:15:07FromDiscord<saem> Is the syntax highlighting for nim as part of github derived from this repo?
06:15:08FromDiscord<saem> https://github.com/nim-lang/NimLime
06:15:11fn<R2D299> itHub: 7"Super Nim Plugin for Sublime Text 2/3"
06:17:34*kots quit (Quit: leaving)
06:18:29*xet7 quit (Remote host closed the connection)
06:19:03FromDiscord<Bung> std module? no
06:19:48*kots joined #nim
06:20:19FromDiscord<Bung> NimLime is plugin for sublime, it use tmLanguage file
06:21:25FromDiscord<Bung> oh, wait ,you mean github site use?
06:21:29FromDiscord<saem> I realize what it is. IIRC github's syntax highlighting used to derive from that.
06:21:32FromDiscord<saem> Yes
06:22:17FromDiscord<saem> found it\: https://github.com/github/linguist/tree/master/vendor/grammars
06:22:28FromDiscord<Bung> that can be improve I think, pragmaigic's tmLanguage seems fine.
06:23:00FromDiscord<saem> yeah, not really
06:23:14FromDiscord<saem> It's old, doesn't support recent features like user defined literals.
06:23:52FromDiscord<Bung> better than github current looking
06:24:07FromDiscord<saem> how so?
06:24:16FromDiscord<Bung> that's smart , github use all sublime plugin.
06:25:28FromDiscord<saem> OK, so you don't have any reason for why it looks better than github.... or?
06:26:25FromDiscord<Bung> I use that tmlanguage for my vscode plugin, looking is better
06:27:14FromDiscord<saem> so, which one do you use?
06:27:30FromDiscord<saem> nimlime's or pragmagics?
06:28:21FromDiscord<Bung> pragmagics
06:30:24FromDiscord<Bung> if you want alternative to std highlite module , check https://github.com/bung87/rehighlite
06:30:27fn<R2D299> itHub: 7"<No Description>"
06:51:15*aeverr quit (Ping timeout: 258 seconds)
07:01:30FromDiscord<zevv> Varriount#0883\: npeg grammar is Nim AST, so it is limited by what Nim can parse
07:02:12*max22- joined #nim
07:09:33*max22- quit (Ping timeout: 268 seconds)
07:18:14*bkay quit (Remote host closed the connection)
07:18:36*bkay joined #nim
07:41:52*max22- joined #nim
08:01:39*Vladar joined #nim
08:08:42FromDiscord<Quantumly> Is it possible to specify the proc name in the compilation result?
08:10:19FromDiscord<Rika> What do you mean?
08:10:26FromDiscord<Rika> Compilation result as in the binary?
08:32:48*pgimeno left #nim (This is the default part message)
08:36:20*Vladar quit (Quit: Leaving)
08:42:58fn<ForumUpdaterBot99> New thread by Mantielero: Fixing dependencies, see https://forum.nim-lang.org/t/8193
08:46:15FromDiscord<vindaar> who of you broke nimble? 😛 I can't install any of my packages anymore
08:46:39FromDiscord<vindaar> and `nimble list` only shows 311 packages
08:48:45FromDiscord<ElegantBeef> You did it
08:49:09FromDiscord<vindaar> then tell me how so I can fix it 😉
08:49:24FromDiscord<ElegantBeef> Very carefully
08:50:09FromDiscord<vindaar> niiiice
08:50:23FromDiscord<vindaar> and btw we allow packages in nimble with the license "proprietary"?
08:50:55FromDiscord<vindaar> https://github.com/nim-lang/packages/pull/1954
08:52:49*max22- quit (Remote host closed the connection)
08:55:19*max22- joined #nim
08:56:07FromDiscord<haxscramper> https://github.com/al6x/pl0t/blob/main/license#L9
08:56:20FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rTS
08:57:09FromDiscord<vindaar> lovely. so why do I need to be able to `nimble install` that?
08:58:04FromDiscord<haxscramper> No idea. And I don't quite understand what this package does anyway
09:00:34FromDiscord<ElegantBeef> Oh yay i get to insult his software even more!
09:03:28FromDiscord<ElegantBeef> Based off his forum posts is a plotting library to replicate TS code
09:04:11FromDiscord<haxscramper> which post?
09:04:37FromDiscord<vindaar> https://forum.nim-lang.org/t/8169
09:04:39FromDiscord<ElegantBeef> This joyous one https://forum.nim-lang.org/t/8169
09:05:02FromDiscord<ElegantBeef> doesnt want to talk about his code anymore to prevent actually insulting him
09:05:30FromDiscord<vindaar> yeah, I didn't comment any further for good reasons
09:05:39FromDiscord<ElegantBeef> cheers
09:06:29FromDiscord<haxscramper> nice, we have another 83-line module https://github.com/nim-lang/Nim/blob/devel/lib/std/genasts.nim#L3
09:06:45FromDiscord<haxscramper> that could perfectly well be placed in macros or whatever
09:07:48FromDiscord<saem> Yeah....
09:08:12FromDiscord<ElegantBeef> Excuse me whilst i cross my fingers and hope no one mentions setutils
09:08:56FromDiscord<haxscramper> `std/enumerate`
09:09:18FromDiscord<haxscramper> maybe we could clean this up in 2.0
09:09:43FromDiscord<vindaar> yes please
09:11:47FromDiscord<Rika> Y’all so rude sometimes I swear
09:12:17FromDiscord<saem> For the new stuff at least raising the bar on docs and tests would be nice. The docs for genasts are insufficient and the tests are really really hard to follow.
09:12:41FromDiscord<ElegantBeef> Do think we should have a module RFC process for new modules to make them larger at the start instead of a gradual growth
09:12:56FromDiscord<ElegantBeef> Like setutils started off cause i though `toSet` was needed 😄
09:13:08FromDiscord<ElegantBeef> (edit) "though" => "thought"
09:13:11FromDiscord<haxscramper> I think every new module should be mentioned in RFC somewhere
09:13:20FromDiscord<haxscramper> or at least have some tracking issue
09:13:34FromDiscord<haxscramper> because I constantly find new random one-two proc modules that pop up at random
09:13:53FromDiscord<haxscramper> "oh, now devel has <random module> that does add <literally one proc>"
09:14:05FromDiscord<dom96> Until this makes it into a release we can still fix it. So let’s do so
09:14:29FromDiscord<haxscramper> yes, but the argument was "it would break someone's `enumerate` implementation"
09:14:41FromDiscord<haxscramper> though genast could be moved to macros for sure
09:15:06FromDiscord<saem> Would be nice to have some API design guidelines. Things like naming conventions and the usual bits, but also how to make APIs so they're less likely to require breaking changes.
09:16:20FromDiscord<ElegantBeef> Yea, also using an RFC would make them less barren hopefully due to having more people to provide "What should it contain"
09:17:09FromDiscord<vindaar> @dom96 since you're around could you check if `nimble` is kinda broken for you locally as well? after pulling the latest packages.json, the file only has \~4200 lines with \~310 packages
09:17:11FromDiscord<haxscramper> then we get into fusion situation where people start pulling it apart
09:17:17FromDiscord<haxscramper> because "too much stuff in stdlib"
09:17:30FromDiscord<saem> The docs could just be the RFC. \:D
09:17:32FromDiscord<haxscramper> just add this one convenience proc,
09:17:36FromDiscord<saem> And tests
09:17:44FromDiscord<haxscramper> or whatever you need
09:17:57FromDiscord<dom96> In reply to @vindaar "<@132595483838251008> since you're around": On mobile. So no. But can check later once I get out of bed 🙂
09:17:59FromDiscord<haxscramper> we have this "stdlib evolution" RFCs and then crap creeps into anyway
09:18:04FromDiscord<haxscramper> (edit) "we have this "stdlib evolution" RFCs and then crap creeps into ... anyway" added "stdlib"
09:18:08FromDiscord<haxscramper> just in small pieces
09:18:15FromDiscord<vindaar> thanks!↵(@dom96)
09:21:07FromDiscord<haxscramper> https://github.com/nim-lang/RFCs/issues/398 nimble RFC published
09:21:24FromDiscord<saem> I haven't looked at the data, but if memory serves those paper cuts have only a few culprits.
09:21:35FromDiscord<haxscramper> Still not sure whether that's exactly how I want to present some of the ideas
09:21:46FromDiscord<haxscramper> but I don't think I would do much better anywa
09:22:24FromDiscord<haxscramper> there is a tl;dr recap at the end
09:23:18FromDiscord<vindaar> thanks for putting in the time for that!
09:24:14FromDiscord<ElegantBeef> Seems good to me so far 😄
09:24:18*Schnouki joined #nim
09:24:41FromDiscord<haxscramper> yeah, I think we are not in the situation where breaking changes would be accepted
09:24:51FromDiscord<haxscramper> so kept everything to bare minimum
09:25:02FromDiscord<haxscramper> though leorize would probably disagree on that
09:25:45FromDiscord<vindaar> I think breaking changes should at least be discussed in terms of what value they may provide
09:25:56FromDiscord<vindaar> but I understand you kept it simple for now
09:26:19FromDiscord<haxscramper> true, but breaking package management system is probably bad idea all around
09:26:24FromDiscord<haxscramper> also
09:26:36FromDiscord<haxscramper> if we keep PM and compiler largely separate we can experiment
09:27:18FromDiscord<dom96> I am curious what you’d break if you could
09:27:20FromDiscord<haxscramper> RFC puts some focus on that - formalize communication between PM and compiler so others can plug in their stuff if they want
09:28:18*neceve joined #nim
09:30:18*Schnouki quit (Ping timeout: 240 seconds)
09:30:24FromDiscord<ElegantBeef> hax your one line diff doesnt have a url 😄
09:31:17FromDiscord<haxscramper> I've removed large portion of the diff because in cargo it is quite long
09:31:47FromDiscord<haxscramper> actually cargo does not use url
09:31:59FromDiscord<ElegantBeef> Then how does it know where to go?
09:32:55FromDiscord<haxscramper> they store all packages as well
09:33:01FromDiscord<haxscramper> I will fix that
09:33:45FromDiscord<ElegantBeef> Changing things to accommodate my small brain, noice 😛
09:37:27*aeverr joined #nim
09:39:04FromDiscord<haxscramper> `> Total commit count 203328`
09:39:54*max22- quit (Remote host closed the connection)
09:41:35FromDiscord<ElegantBeef> Is that how many edits i've done for fixing typos?
10:01:06FromDiscord<saem> If I was up for breaking nimble, I would completely redo the file format. It should focus on the artifacts and everything else should follow from that. Their common, shared, and unique dependencies. Key and relevant tasks, and their dependencies. Where to get things and how. But it needs to focus on the goal. Right now they're declared poorly in one place and all relationship information is lost.
10:01:42FromDiscord<haxscramper> saem\: by artifacts you mean specifically library/binary build results?
10:01:48FromDiscord<saem> Yes
10:02:09FromDiscord<haxscramper> Also, I don't quite understand the "dependencies are common to all artifacts of which there can be many, you mention intra task dependencies but I might have missed it for artifacts" part - I haven't mentioned build artifacts anywhere, but
10:02:32FromDiscord<haxscramper> but mainly because I don't really deal with them. If you can expand your comment with suggestion it would be nice
10:03:02FromDiscord<haxscramper> like what is the current problem, and how you propose to solve it
10:03:25fn<ForumUpdaterBot99> New thread by Mratsim: Announcing Arraymancer v0.7.0 "Memories of Ice", see https://forum.nim-lang.org/t/8194
10:04:58FromDiscord<saem> I'll see about writing it up tomorrow
10:06:23FromDiscord<saem> Simple version, it should be a hierarchy, Foo the artifact should list its dependencies, and Bar its own. They can put common stuff in a common area.
10:06:55FromDiscord<haxscramper> so like makefile build graph?
10:07:17FromDiscord<saem> This is more just requires.
10:07:46FromDiscord<saem> So data dependency vs task, there are some differences. But sure
10:08:51FromDiscord<haxscramper> ?
10:08:55FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rU9
10:09:06FromDiscord<saem> Putting tasks under an artifact are too indicate they're contextual/related.
10:11:31*Vladar joined #nim
10:12:41FromDiscord<saem> sent a long message, see http://ix.io/3rUa
10:13:00FromDiscord<saem> That's didn't quite work, but hope it rendered ok for you.
10:13:21FromDiscord<saem> Can't believe I did that on my phone.
10:13:31FromDiscord<Rika> sounds cool
10:14:43FromDiscord<haxscramper> yes, that sounds really nice
10:15:00FromDiscord<saem> Right now if I have a frontend and backend in a web app, there is only one place to specify backends. Dependencies for one are mixed up with the other. Could make a bunch of nimble files, kinda sucks.
10:16:05FromDiscord<saem> Or if I just want to pull something down and only build the cli version and not the daemon.
10:17:06FromDiscord<haxscramper> or don't build anything if I use hybrid package as a library
10:17:50FromDiscord<saem> Just put the point of the whole thing first. The library(s) or binary(s). Everything else is supporting cast.
10:17:57FromDiscord<haxscramper> artifacts can be mapped to package features as well, and it would be easier to have bigger packages that provide optional features
10:19:54FromDiscord<saem> Yup, nobody wants dependencies, tasks, versions, ... it's all secondary. So as long as nimble focuses on the point and the file, which is the key doesn't lose sight if it, most everything else follows.
10:20:49*max22- joined #nim
10:21:07*max22- quit (Remote host closed the connection)
10:21:28*max22- joined #nim
10:22:18FromDiscord<saem> Anyhow, it doesn't need to be perfect, but could nudge that way. I think the first step would be a version number so automated migration can happen.
10:23:49FromDiscord<haxscramper> The version number is necessary to migrate from old `bin =` to better-designed artifact approac?
10:24:43FromDiscord<saem> Yeah, a file format version to show migration.
10:24:44FromDiscord<haxscramper> Out of 2013
10:24:45FromDiscord<haxscramper> `namedBin` used in 9 packages right now
10:24:54FromDiscord<haxscramper> `bin` is in 124
10:25:10FromDiscord<saem> It's not the worst, the json output can be fixed so it reveals the napping.
10:26:09FromDiscord<haxscramper> No, it's even less. `nimble` had some tests with `bin =`, so right now it's exactly 100 packages
10:26:30FromDiscord<saem> Ha
10:27:46FromDiscord<haxscramper> Only two has unusual `bin =` `nwsync stFiles(thisDir())`
10:27:59FromDiscord<planetis> So whats your opinions on nake? Could it be better than nims
10:30:35FromDiscord<haxscramper> Less than 40% out of binary or hybrid packages don't have matching "package name" and "bin"
10:30:59FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rUc
10:31:30FromDiscord<saem> Not at all surprising.
10:31:37FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rUd
10:31:59FromDiscord<haxscramper> so we can really just jump to new version and PR fixes to these packages, I think this can be automated
10:32:25FromDiscord<haxscramper> similar to how yardanico was helping with ARC fixes
10:32:31FromDiscord<saem> Honestly imperative stuff like Nake is absolutely and positively uninteresting to be and that's the kindest I can be about it.
10:33:29FromDiscord<saem> I'd still put in a version number, won't always be able to do this.
10:33:31FromDiscord<haxscramper> yes, it is really hard to reason about dependencies and all that kind of stuff if you just have nondeclarative code
10:33:39*sagax joined #nim
10:33:54FromDiscord<saem> Version your data formats, it's a rule of distributed computing.
10:34:28FromDiscord<saem> \:D
10:46:12FromDiscord<haxscramper> after we finish initial discussion of things I've missed (like artifacts) and settle on some final plan I'm going to write a finished roadmap/spec, similar to what I did for #245 https://github.com/nim-lang/RFCs/issues/245#issuecomment-697897542
10:59:31*max22- quit (Ping timeout: 246 seconds)
11:04:32FromDiscord<vindaar> just received a lesson in hash collisions \:P in a `seq[string]` of \~160,000 elements I produce 4 collisions. TIL don't just use stdlib hashing without thinking
11:05:11FromDiscord<vindaar> (this is for a uniqueness test)
11:05:58*Schnouki joined #nim
11:09:32FromDiscord<Rika> hash is meant for tables i believe so collisions arent a concern
11:11:03FromDiscord<vindaar> yeah, I'm aware. Initially this wasn't a problem in my application because I didn't think I'd ever deal with N \> 10 elements in practice. Then one starts to (ab)use things and suddenly those "ah, collisions shouldn't matter" bite you in the ass
11:12:08FromDiscord<vindaar> not quite sure what a good solution is though. I can't properly add an additional `==` check for collisions, because I'm only using hashes to work around the problem of dealing with different types
11:27:06*Schnouki quit (Ping timeout: 240 seconds)
11:27:34fn<ForumUpdaterBot99> New thread by Ingo: Float or iterator choise --> template?, see https://forum.nim-lang.org/t/8195
11:49:32FromDiscord<ynfle (ynfle)> Can someone help me with using pthread in nim? The thread just hang
11:50:39FromDiscord<ynfle (ynfle)> \threads
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:18*neceve quit (Ping timeout: 240 seconds)
12:06:37*supakeen joined #nim
12:24:56FromDiscord<deech> Why does is an empty `cstring` not `isNil`? eg. `let c : cstring = ""; echo c.isNil()` is `false`
12:25:20FromDiscord<haxscramper> that's not empty cstring, it has nul terminaltor
12:25:26FromDiscord<haxscramper> `nil` means `NULL` pointer
12:25:33FromDiscord<deech> Ah, thanks!
12:29:48FromDiscord<TheBiggestNubThun> sent a code paste, see https://play.nim-lang.org/#ix=3rUQ
12:31:15FromDiscord<TheBiggestNubThun> (edit) "https://play.nim-lang.org/#ix=3rUQ" => "https://play.nim-lang.org/#ix=3rUR"
12:36:20FromDiscord<haxscramper> devel has it https://github.com/nim-lang/Nim/pull/18274
12:39:10FromDiscord<TheBiggestNubThun> ah cool, thanks, I'll check it out
12:39:19*arkurious joined #nim
12:48:04FromDiscord<dom96> In reply to @saem "Right now if I": multiple nimble files is how this should be done. The simpler things are the better
12:49:00FromDiscord<dom96> but I think we should consider the problem we are trying to solve instead of just looking at the solution
12:54:34FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=3rUV
12:54:41FromDiscord<dom96> (edit)
12:59:33FromDiscord<dom96> (the problem this solves is: it's not easy to tell Nimble how to build a `bin` binary)
13:08:48FromDiscord<haxscramper> `build` is probably better than `bin` since it's generic. also we can move `bin = @[...]` to different build sections
13:09:07FromDiscord<Bung> how to create set conains a enum type all fields?
13:09:12FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rV1
13:09:21FromDiscord<haxscramper> `{ low(Enum} .. high(Enum) }`
13:09:33FromDiscord<Bung> ooh, cool
13:11:12FromDiscord<haxscramper> In reply to @haxscramper "`build` is probably better": I mean `bin ... : requires ... `
13:11:17FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=3rV2
13:11:53FromDiscord<haxscramper> also saem mentioned matrix testing
13:11:57*max22- joined #nim
13:12:10FromDiscord<haxscramper> not sure if this can be considered a `build`,
13:26:42*max22- quit (Remote host closed the connection)
13:34:42*max22- joined #nim
14:19:36FromDiscord<gerwy> omg, does anyone know how the name is of that one module? Im looking for it and i can't find it in nimble or on github↵It was basically some framework that has useful macros/procedures to create some terminal stuff, like progress bar, question with yes or not, multiple option question, colorful text etc.
14:19:50FromDiscord<gerwy> i know i saw it, im not insane
14:22:44FromDiscord<dom96> `nimble search terminal` might help
14:22:55FromDiscord<gerwy> i tried that already
14:23:23FromDiscord<gerwy> a looked at all 76 packages i saw and i didn't saw that one package, maybe it was one of them but don't think so
14:23:37FromDiscord<vindaar> @dom96\: did you check whether nimble does any weird things for you?
14:25:48FromDiscord<dom96> what weird things should I look for?
14:26:02FromDiscord<vindaar> how many packages are in your local `packages.json` after updating?
14:26:17FromDiscord<gerwy> for a moment i thought it was ncurses but no, i remember that it was something specifically made for nim, maybe it isn't published in nimble
14:28:28*Vladar quit (Quit: Leaving)
14:29:06FromDiscord<gerwy> YES FOUND IT
14:29:27FromDiscord<gerwy> termui
14:29:27FromDiscord<gerwy> https://github.com/jjv360/nim-termui
14:29:29fn<R2D299> itHub: 7"Simple UI widgets for the terminal."
14:29:31FromDiscord<dom96> In reply to @vindaar "how many packages are": a lot, I think they're all there
14:29:38FromDiscord<gerwy> it was in nimble, idk i didn't saw it
14:31:33FromDiscord<Rika> what's better in termui vs illwill?
14:32:42FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=3rVr
14:32:46FromDiscord<dom96> (obviously not the real count)
14:33:38FromDiscord<vindaar> this is after a nimble refresh?
14:34:37FromDiscord<gerwy> In reply to @Rika "what's better in termui": probably illwill now because termui gives me errors even if i don't do anything just import it
14:35:29FromDiscord<gerwy> > /Users/mihau/.nimble/pkgs/termui-0.1.8/termui/inputfield.nim(9, 7) template/generic instantiation of `class` from here↵> ↵> /Users/mihau/.nimble/pkgs/termui-0.1.8/termui/inputfield.nim(34, 12) Error: method is not a base↵Yeah im on OSX
14:35:38FromDiscord<gerwy> literally just imported it
14:35:46*xet7 joined #nim
14:41:06FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=3rVu
14:42:48FromDiscord<dom96> In reply to @vindaar "this is after a": yep
14:43:07FromDiscord<dom96> In reply to @vindaar "I'm sorry, but nimble": can you do `nimble refresh --debug`?
14:43:30FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=3rVw
14:43:47FromDiscord<dom96> well there you go
14:43:50FromDiscord<vindaar> trying `google.com`?
14:43:52FromDiscord<vindaar> what
14:44:07FromDiscord<dom96> it sounds like you ran nimble's test suite at some point and it didn't clear the nimble config properly
14:44:14FromDiscord<dom96> modify `/home/basti/.config/nimble/nimble.ini`
14:44:30FromDiscord<dom96> I should probably remove `http://nim-lang.org/nimble/packages.json`
14:44:32FromDiscord<ajusa> sent a long message, see http://ix.io/3rVx
14:44:38FromDiscord<dom96> or update it 🙂
14:46:02FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=3rVy
14:46:14FromDiscord<dom96> (edit) "https://play.nim-lang.org/#ix=3rVy" => "https://play.nim-lang.org/#ix=3rVz"
14:46:24FromDiscord<vindaar> that fixed it indeed. Thanks. That's not something that should happen so silently 😪
14:46:50FromDiscord<Bung> json module not work for set typee?
14:47:02FromDiscord<ajusa> In reply to @dom96 "use an object variant:": Cool, thanks! That's what I figured I'd have to do probably, wasn't sure if that was the cleanest or easiest way. 😄
14:59:03*neceve joined #nim
15:50:41*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
16:09:51*lucerne quit (Remote host closed the connection)
16:24:31FromDiscord<tomck> When setting the `--lib` flag (to specify a different stdlib directory), it works when directly specified on the command line: `nim c --lib:foo/bar ...`, but it doesn't seem to work when put in the `nim.cfg` file. Instead, the normal stdlib is used when compiling.
16:24:35FromDiscord<tomck> Any way around this?
16:34:21FromDiscord<dom96> strange, maybe try config.nims
16:35:08FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=3rWp
16:35:10FromDiscord<dom96> and use `nimble compile` to run
16:35:29FromDiscord<dom96> (You can also do this with nimscript if you prefer to use `nim compile`)
16:39:24FromDiscord<tomck> what's config.nims
16:41:34*vicfred joined #nim
16:44:41*stkrdknmibalz joined #nim
16:54:24FromDiscord<demotomohiro> https://nim-lang.org/docs/nims.html
16:58:07*greyrat quit (Quit: Bye)
17:30:59*greyrat joined #nim
17:31:57*lucerne joined #nim
17:56:23FromDiscord<Quantumly> sent a code paste, see https://play.nim-lang.org/#ix=3rWO
18:21:27FromDiscord<haxscramper> In reply to @Quantumly "Im trying to translate": it is really necessary to do this one-by-one?
18:21:43FromDiscord<haxscramper> I think you could just loop through array
18:21:47FromDiscord<haxscramper> in C and in nim
18:22:18FromDiscord<Quantumly> Atm Im just trying to get a 1-1 replica since the original C code was bootstrapped by the simulator
18:23:25FromDiscord<Quantumly> I tried making the types `ptr seq[cint]` but that made the types in the header be `tySequence9apztJSmgERYU8fZOjI4pOg AIOut`
18:27:04FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rWW
18:27:29FromDiscord<haxscramper> if you really need `volatile int` you might try to use `ptr UnckedArray[cint]`
18:27:45FromDiscord<haxscramper> maybe something else, I don't know how this maps to nim exactly
18:28:33*supakeen quit (Remote host closed the connection)
18:28:56*supakeen joined #nim
18:50:15*bkay quit (Quit: Leaving)
18:50:30*beshr joined #nim
18:53:04FromDiscord<@bracketmaster-5a708063d73408ce4> @\_discord\_145405730571288577\:t2bot.io - git an interesting problem for ya
18:53:43FromDiscord<@bracketmaster-5a708063d73408ce4> sent a code paste, see https://play.nim-lang.org/#ix=3rX3
18:53:56FromDiscord<@bracketmaster-5a708063d73408ce4> I meant to type @ElegantBeef
18:54:47FromDiscord<@bracketmaster-5a708063d73408ce4> I'd want to do this without having to do `var a = Module(name="a")`
18:54:55FromDiscord<@bracketmaster-5a708063d73408ce4> Perhaps I'm looking for a Macro?
19:04:35FromDiscord<aleclarson> Can a generic proc use varargs, what is the syntax?
19:05:01FromDiscord<aleclarson> (edit) "Can a generic proc ... use" added "type"
19:05:55FromDiscord<timotheecour> read system.echo
19:06:33FromDiscord<timotheecour> (edit) "system.echo" => "system.echo. only non-variadic varargs until someone implements variadics"
19:07:19FromDiscord<leorize> note that only echo can use `varargs[typed]`
19:09:39FromDiscord<timotheecour> sent a code paste, see https://play.nim-lang.org/#ix=3rXc
19:10:03FromDiscord<@bracketmaster-5a708063d73408ce4> essentially, earlier, I was wondering how can I instantiate a type using the name of the variable to the left of a var statement in Nim
19:10:29FromDiscord<timotheecour> (edit) "https://play.nim-lang.org/#ix=3rXc" => "https://play.nim-lang.org/#ix=3rXe"
19:11:42FromDiscord<timotheecour> see how byaddr is implemented
19:16:11FromDiscord<aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3rXh
19:16:17FromDiscord<aleclarson> i want my macro to take any proc type
19:17:06FromDiscord<aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3rXi
19:20:13FromDiscord<aleclarson> where `myproc` is a macro
19:21:06FromDiscord<timotheecour> `Impl[any, any]` is not a concrete type
19:25:17FromDiscord<timotheecour> sent a code paste, see https://play.nim-lang.org/#ix=3rXj
19:41:14FromDiscord<zevv> What is the reason deepcopy is not default enabled for arc/orc?
20:22:06*xet7 quit (Remote host closed the connection)
20:23:02*xet7 joined #nim
20:30:36FromDiscord<@bracketmaster-5a708063d73408ce4> After a macro rewrite, is there a way to have nim print the rewritten file?
20:34:13FromDiscord<ElegantBeef> You can do `--expandMacro:macroName`
20:34:33FromDiscord<ElegantBeef> or do `echo result.repr` in the nim macro
20:42:47FromDiscord<@bracketmaster-5a708063d73408ce4> thx
20:44:03FromDiscord<saem> Bah, tried to reuse NimLime's syntax highlighting definitions in vscdoe... and sadly it doesn't work. \:( If any motivated individual wants to take a peek\: https://github.com/saem/vscode-nim/tree/trial-nimlime-syntax-highlighting
20:44:53*xet7 quit (Remote host closed the connection)
20:46:08FromDiscord<dom96> why are you trying to reuse them?
20:57:14FromDiscord<saem> Consistency, consolidation of effort, etc...
20:57:44FromDiscord<saem> they're the ones that are "officially" used on github.
21:25:36FromDiscord<dom96> ahh, of course, GitHub uses tm syntax highlighting now. I remember when linguist used Pygments
21:32:17FromDiscord<hugogranstrom> Ugh tm syntax highlighting is nasty, it works until it doesn't and then you have to search through a jungle of regex to find the errors \:(
21:32:42FromDiscord<saem> I know, it's why I don't want to maintain yet another one.
21:32:48FromDiscord<saem> I don't want to maintain the current one.
21:35:02FromDiscord<hugogranstrom> OK yeah that's reasonable 👍️
21:35:42FromDiscord<hugogranstrom> How bad is it currently? (the ported version)
21:36:00FromDiscord<hugogranstrom> A total mess or just a few odd cases?
21:42:19FromDiscord<Bung> why does not work ? https://github.com/bung87/vscode-nim-lsp/commits/master/syntaxes/nim.json same thing
21:43:35FromDiscord<Bung> package json file `contributes.grammars.path` to nim.json
21:58:02FromDiscord<saem> I'm not going to bother answering that.
21:58:52FromDiscord<saem> [hugogranstrom](https://matrix.to/#/@hugogranstrom:matrix.org)\: the current one has bugs, see filed against the github repo. They're a bother to fix, not huge, but still annoying. There also isn't a great way to compare this stuff, so I can't tell how bad.
22:18:54FromDiscord<dom96> shouldn't this work? https://play.nim-lang.org/#ix=3rY0
22:19:09FromDiscord<dom96> I'm getting `Error: invalid type: 'UncheckedArray[int]' in this context: 'Payload' for var`
22:19:58FromDiscord<clyybber> no, you need ptr UncheckedArray
22:20:50*max22- quit (Quit: Leaving)
22:20:51FromDiscord<dom96> ahh, I thought `UncheckedArray` was already implicitly a `ptr`
22:22:23FromDiscord<clyybber> nope, it's consistent with array :)
22:23:57FromDiscord<dom96> is it? non-ptr `array` works just fine
22:24:14*arkanoid joined #nim
22:24:46arkanoidwhat's the difference of const variable and {.global.} pragma?
22:25:05FromDiscord<ElegantBeef> global is scoped to the procedure and can be mutable
22:25:32FromDiscord<clyybber> In reply to @dom96 "is it? non-ptr `array`": because a non-ptr array has a length, an UncheckedArray doesn't
22:27:24arkanoidElegantBeef, but aren't consts scoped to procedure too, when declared within them?
22:27:40FromDiscord<ElegantBeef> Consts arent mutable
22:28:00arkanoidalso, global seems unrelated to mutability.
22:28:11FromDiscord<ElegantBeef> Well it's unrelated to consts
22:28:26arkanoidI'm confused
22:28:38FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3rY1
22:28:39FromDiscord<ElegantBeef> Run that
22:29:19FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3rY2
22:29:23arkanoidok, I got it, but you declared it as var
22:29:37FromDiscord<ElegantBeef> Well what's the point any other way
22:29:50FromDiscord<ElegantBeef> `let` or `var` only make sense with global
22:29:58FromDiscord<ElegantBeef> a global const is useless since it cannot be mutated
22:30:47arkanoidI mean. a let {.global.} is same as constant, from compiler point of view, or not?
22:31:17FromDiscord<ElegantBeef> Nope since the let is intialized at runtime
22:31:53arkanoidyes, correct, apart from code execute at compile time
22:32:07FromDiscord<ElegantBeef> I'm sorry is this a test? 😄
22:32:31arkanoidno, I'm just trying to find out if I got it correctly by spotting the overlapping points
22:32:39FromDiscord<ElegantBeef> global is meant for having scoped global variables which do not reset in between calls nor escape scope, unrelated const 😄
22:33:29arkanoidgot it. Thanks
22:35:56FromDiscord<talaing> sent a code paste, see https://play.nim-lang.org/#ix=3rY4
22:36:04FromDiscord<talaing> (edit) "https://play.nim-lang.org/#ix=3rY4" => "https://play.nim-lang.org/#ix=3rY5"
22:36:19FromDiscord<talaing> is there any way to somehow transform this array into sequence to be able to modify its size at the runtime?
22:37:20FromDiscord<timotheecour> toSeq
22:37:30FromDiscord<ElegantBeef> or `newSeq`
22:40:07arkanoidnew question: the manual on the NoDecl pragma says "Note: This will not work for the LLVM backend". Is there an official LLVM backend for nim?
22:40:26FromDiscord<ElegantBeef> nlvm exists but dont think it's "official"
22:43:22arkanoidso why is NoDecl so special to get a Note about future?
22:43:26FromDiscord<talaing> sent a code paste, see https://paste.rs/sNY
22:44:27FromDiscord<ElegantBeef> You left out `()`
22:45:43FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3rY7
22:45:53FromDiscord<ElegantBeef> (edit) "https://play.nim-lang.org/#ix=3rY7" => "https://play.nim-lang.org/#ix=3rY8"
22:48:44FromDiscord<ElegantBeef> As that error message pointed out the reason it was not letting you do it was cause you were not doing `Thread[HttpClient]()` an as such you were passing a type of `Thread[HttpClient]`, which is kinda like `int` vs `int(100)`
22:49:25FromDiscord<dom96> anybody else wishing Nim's `echo` behaved like Python's `print` (with regards to adding spaces implicitly between args)?
22:49:42FromDiscord<ElegantBeef> Not really
22:50:10FromDiscord<ElegantBeef> If i did i would've made a variant that did as such 😄
22:50:12FromDiscord<dom96> every time I use it I have to add the darn `" ",` manually
22:50:31FromDiscord<dom96> and I'm getting tempted to create a PR to add a `print` that does this
22:50:42FromDiscord<ElegantBeef> Or you know `[$a, $b, $c, $d].join(" ")` 😛
22:51:08FromDiscord<talaing> In reply to @ElegantBeef "Though you can just": Works like a charm! Thanks!
22:51:26FromDiscord<ElegantBeef> Alternative you could do `echo (a, b, c, d)` and let the tuple formatting do it
22:51:31FromDiscord<ElegantBeef> (edit) "Alternative" => "Alternatively"
22:51:37FromDiscord<ElegantBeef> No problem
22:51:39FromDiscord<dom96> In reply to @ElegantBeef "Or you know `[$a,": far too much writing to do for echo debugging
22:51:41FromDiscord<talaing> (edit) "Thanks!" => "Thanks!↵(also, thanks for explanation :))"
22:51:43FromDiscord<dom96> In reply to @ElegantBeef "Alternatively you could do": that's a good idea
22:52:44FromDiscord<ElegantBeef> My laziness knows no bounds
22:53:11FromDiscord<dom96> hah, we need to put this in some sort of Nim's tricks guide
22:55:26FromDiscord<dom96> `repr` giving `[...]` for UncheckedArray
22:55:33FromDiscord<dom96> I guess I can't expect more than that
22:55:45FromDiscord<ElegantBeef> Well ofc not
22:58:02FromDiscord<dom96> anddd compiler bug https://play.nim-lang.org/#ix=3rYy
23:02:37FromDiscord<ElegantBeef> that's not a `ptr array[5, byte]`
23:04:23FromDiscord<dom96> yes, it doesn't matter, Nim shouldn't ever generate broken C
23:11:19*nozza joined #nim
23:14:54*nozza quit (Client Quit)
23:39:58FromDiscord<@bracketmaster-5a708063d73408ce4> sent a code paste, see https://play.nim-lang.org/#ix=3rZu
23:47:30*neceve quit (Ping timeout: 240 seconds)
23:49:54FromDiscord<ElegantBeef> That's CSS, so no clue what you're asking
23:50:55FromDiscord<ElegantBeef> Jesus i'm dumb today
23:50:58FromDiscord<ElegantBeef> Xml
23:51:05FromDiscord<ElegantBeef> Someone shoot me before i say something even dumber
23:52:25FromDiscord<exelotl> seems like it was valid nim but somehow got output as HTML for syntax highlighting
23:53:15FromDiscord<ElegantBeef> Ah yea
23:53:54FromDiscord<ElegantBeef> It's a non holey set so you can just do `last.high.ord` adding +1 if needed
23:54:44FromDiscord<ElegantBeef> With a holey set you would want to probably use `setutils` from devel and do `fullSet(YourEnum).card`
23:55:22FromDiscord<ElegantBeef> At the very least stealing the macro to generate a fullset for holey enums 😄