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