00:04:26 | FromDiscord | <exelotl> In reply to @⎝⪩﹏⪨⎠ "Because choosenim buggy in": That's the 2nd time I heard about this, has someone filed an issue for it? |
00:04:45 | FromDiscord | <Elegantbeef> Yea there's an issue it's related to new ubuntu updating ssl |
00:04:56 | FromDiscord | <Elegantbeef> The solution is a flatpak or more agressive maintance |
00:06:29 | FromDiscord | <⎝⪩﹏⪨⎠> There's a solution: use a previous version of OpenSSl. |
00:06:47 | FromDiscord | <Elegantbeef> Flatpak is a better solution imo as it makes it work everywhere |
00:06:48 | FromDiscord | <⎝⪩﹏⪨⎠> But the creator (like me) wants choosenim to work out of the box. |
00:10:50 | FromDiscord | <!Patitotective> In reply to @⎝⪩﹏⪨⎠ "Because choosenim buggy in": :[ |
00:18:32 | * | duuude quit (Ping timeout: 252 seconds) |
00:21:02 | FromDiscord | <⎝⪩﹏⪨⎠> Solved. |
00:21:22 | FromDiscord | <⎝⪩﹏⪨⎠> I built it like the official page said. |
00:21:40 | FromDiscord | <⎝⪩﹏⪨⎠> And added the path to the binaries to my $PATH. |
00:23:08 | FromDiscord | <Prestige> How do I properly create a hash function for a distinct string? I was attempting to just call the hash function for string, but something's not working: https://play.nim-lang.org/#ix=3XDd |
00:23:35 | FromDiscord | <Elegantbeef> You need hash and `==` |
00:23:44 | FromDiscord | <Prestige> ah, thanks |
00:24:13 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDe |
00:24:22 | FromDiscord | <Prestige> even easier |
00:24:33 | FromDiscord | <Elegantbeef> Borrow generally works, but for complex distincts it fails |
00:24:45 | FromDiscord | <⎝⪩﹏⪨⎠> Well, now I need 2 things:↵- A good programming tutorial↵- A good Nim tutorial |
00:25:00 | FromDiscord | <⎝⪩﹏⪨⎠> Because Nim's official "tutorials" suck. |
00:25:00 | FromDiscord | <Elegantbeef> I've fixed most issues with it, but there are edge cases i've not been able to fix |
00:25:24 | FromDiscord | <Elegantbeef> https://ssalewski.de/nimprogramming.html |
00:27:38 | FromDiscord | <Prestige> That really is a wall of text isn't it |
00:29:56 | FromDiscord | <Elegantbeef> It's but it explains Nim in quite some depth |
00:31:04 | * | vicfred quit (Quit: Leaving) |
00:46:57 | FromDiscord | <!Patitotective> sent a code paste, see https://paste.rs/4RJ |
00:47:17 | FromDiscord | <!Patitotective> ImTemplate v2.0 is closer |
00:59:18 | * | slowButPresent quit (Quit: arg) |
01:00:40 | FromDiscord | <!Patitotective> yoooooo its working https://github.com/Patitotective/ImTemplate/releases/tag/test↵if any cool windows user wants to help me to test it, please download `ImExample.exe` (from the releases) and try to run it (windows will tell you its a virus :[) |
01:01:02 | FromDiscord | <!Patitotective> (edit) "yoooooo its working https://github.com/Patitotective/ImTemplate/releases/tag/test↵if any cool windows user wants to help me to test it, please download `ImExample.exe` (from the releases) and try to run it (windows will tell you its a virus :[) ... " added ":]" |
01:11:08 | FromDiscord | <Elegantbeef> Why are you compiling with the cstring conv warning off |
01:12:28 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Why are you compiling": cause i get lots of those warnings↵should i make them cstrings instead of ignoring them? :p↵hehe |
01:12:47 | FromDiscord | <Elegantbeef> I'd say yes |
01:12:59 | FromDiscord | <!Patitotective> does it cause problems or? 🤨 |
01:14:07 | FromDiscord | <Elegantbeef> Well it will eventually |
01:15:26 | FromDiscord | <!Patitotective> hehe thanks |
01:22:56 | FromDiscord | <!Patitotective> its really annoying for cases like `"##" & name` cause i need to put parenthesis :[ |
01:26:05 | FromDiscord | <!Patitotective> like `("##" & name).cstring` (no `cstring("##" & name)`) |
01:27:06 | FromDiscord | <!Patitotective> why `del` does not support `BackwardsIndex`? https://nim-lang.org/docs/system.html#del%2Cseq%5BT%5D%2CNatural |
01:29:20 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDo |
01:30:04 | FromDiscord | <!Patitotective> SmartBeef |
01:37:44 | FromDiscord | <Elegantbeef> My wasm knowledge is expanding eventually i'll actually know what i'm doing 😄 |
01:37:53 | FromDiscord | <!Patitotective> for buffers i should define them as cstrings instead of converting them, right? |
01:38:14 | FromDiscord | <Elegantbeef> What are you doing? |
01:38:26 | FromDiscord | <Elegantbeef> Personally i avoid manually making Cstrings |
01:38:57 | FromDiscord | <!Patitotective> i mean for inputText buffers https://nimgl.dev/docs/imgui.html#igInputText%2Ccstring%2Ccstring%2Cuint%2CImGuiInputTextFlags%2CImGuiInputTextCallback%2Cpointer |
01:39:15 | FromDiscord | <Elegantbeef> I'd use a string cause it lets use get all the functionality of a string |
01:40:03 | * | slowButPresent joined #nim |
01:44:30 | FromDiscord | <Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3XDp |
01:44:44 | FromDiscord | <Andreas> (edit) "https://play.nim-lang.org/#ix=3XDp" => "https://paste.rs/Ybu" |
01:47:15 | FromDiscord | <Elegantbeef> Works fine |
01:47:19 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDr |
01:50:49 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDt |
01:51:24 | FromDiscord | <huantian> In reply to @Elegantbeef "My wasm knowledge is": no way beef knowing what he's doing |
01:51:36 | FromDiscord | <Elegantbeef> Yea it's hard to believe |
01:51:55 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/974489132279664700/image.png |
01:51:55 | FromDiscord | <Elegantbeef> But look at this |
01:52:19 | FromDiscord | <Elegantbeef> It just works! 😛 |
01:52:20 | FromDiscord | <huantian> that's a lot of getValue |
01:52:32 | FromDiscord | <Elegantbeef> Yea `global -> WasmValue` |
01:52:53 | FromDiscord | <Elegantbeef> I'm going to make a generic variant that means i can just do `getValue` once |
01:54:40 | FromDiscord | <Andreas> In reply to @Elegantbeef "You may want to": `Error: object constructor needs an object type [genericBody declared in /Users/asc/sw/nim/ctrie/hamt_gen.nim(12, 3)]`↵Maybe we should start with a constructor - which i don"t have ? Do i need one ? |
01:54:53 | FromDiscord | <Elegantbeef> What? |
01:57:29 | FromDiscord | <Andreas> In reply to @Elegantbeef "What?": `expression '' has no type (or is ambiguous)` |
01:57:58 | FromDiscord | <Elegantbeef> What's your code |
01:57:58 | FromDiscord | <Elegantbeef> I cannot play guess the code |
01:57:58 | FromDiscord | <Elegantbeef> It's the wrong time of the day for that |
01:57:59 | FromDiscord | <Andreas> (edit) "ambiguous)`" => "ambiguous)`↵Maybe i need to restart VScode ? strange msgs" |
01:58:37 | FromDiscord | <Andreas> sent a code paste, see https://paste.rs/7tU |
01:58:51 | FromDiscord | <Elegantbeef> And what's your `Node()` type? |
01:59:02 | FromDiscord | <Andreas> (edit) "https://paste.rs/v7c" => "https://play.nim-lang.org/#ix=3XDv" |
02:00:35 | FromDiscord | <Andreas> The one from above - it about the generic-body smth.. https://discord.com/channels/371759389889003530/371759389889003532/974485945921445898 |
02:01:38 | FromDiscord | <Elegantbeef> Yes the issue is you dont have generic types |
02:01:59 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDy |
02:06:02 | FromDiscord | <Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3XDz |
02:07:06 | * | kayabaNerve joined #nim |
02:08:17 | FromDiscord | <Elegantbeef> The generics might cause an issue here |
02:10:23 | FromDiscord | <Zectbumo> how do you get the next/first from an iterator? |
02:10:28 | FromDiscord | <Zectbumo> (and discard the rest) |
02:10:46 | FromDiscord | <Elegantbeef> `break` if it's an inline iterator |
02:10:46 | FromDiscord | <Zectbumo> or rather, not consume them |
02:10:54 | FromDiscord | <Elegantbeef> Otherwise you steal code from my closures part of slicerator |
02:11:18 | FromDiscord | <Elegantbeef> https://github.com/beef331/slicerator/blob/master/src/closures.nim#L60-L103 |
02:12:28 | FromDiscord | <Andreas> `object constructor needs an object type [genericInvocation]`↵what is meant here with , needs a `[proxy]` |
02:12:38 | FromDiscord | <Elegantbeef> It means you dont have generic parameters |
02:12:56 | * | vicfred joined #nim |
02:13:51 | FromDiscord | <Andreas> In reply to @Elegantbeef "It means you dont": greatm ty,,, concrete types did it :> |
02:13:59 | FromDiscord | <Andreas> (edit) "greatm" => "great" |
02:14:14 | FromDiscord | <Elegantbeef> It did? |
02:16:23 | FromDiscord | <Elegantbeef> I'm interested in seeing your code cause i cannot get it to work |
02:17:01 | FromDiscord | <Andreas> sent a code paste, see https://paste.rs/TLE |
02:17:19 | FromDiscord | <Elegantbeef> you shouldnt need the `kind:` |
02:17:43 | FromDiscord | <Elegantbeef> you should be able to do `typeof(Node[int, string]()[])` |
02:22:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDB |
02:22:36 | FromDiscord | <Elegantbeef> But you have to use `NodeImpl` as a constructor sadly |
02:52:14 | FromDiscord | <Prestige> Elegantbeef you should do more nim tutorials/articles like the macros one |
02:55:05 | FromDiscord | <!Patitotective> BeefTuber |
02:57:21 | * | arkurious quit (Quit: Leaving) |
02:59:13 | FromDiscord | <Prestige> He's learned a lot of things about Nim that I don't even know where to look to find |
03:01:39 | FromDiscord | <Elegantbeef> I'll consider it if i can get you to write an AI for my WASM testing project 😛 |
03:02:14 | FromDiscord | <Prestige> Perhaps, what do you need? |
03:02:46 | FromDiscord | <Elegantbeef> My wasm test project is going to be a programmer vs programmer AI project |
03:03:13 | FromDiscord | <Elegantbeef> With a bit of query logic try to make the best AI you can |
03:04:38 | FromDiscord | <Prestige> I'd be down to give it a shot |
03:08:07 | FromDiscord | <Zectbumo> I'm not understanding iterators. where am I going wrong? https://play.nim-lang.org/#ix=3XDG |
03:08:25 | FromDiscord | <Elegantbeef> The first is an inline iterator |
03:08:46 | FromDiscord | <Elegantbeef> The way inline iterators work means you treat them like templates |
03:09:45 | FromDiscord | <Elegantbeef> is the silly way we support this |
03:09:45 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDH |
03:19:21 | FromDiscord | <Zectbumo> well, I haven't gotten to templates yet... :/ |
03:19:52 | FromDiscord | <demotomohiro> You can pass an inline iterator to templates or macros but not procedures: https://nim-lang.org/docs/manual.html#overload-resolution-iterable |
03:21:57 | FromDiscord | <Zectbumo> I got that part, I just don't know what a template is. I'll have to study that now |
03:22:42 | FromDiscord | <Elegantbeef> It's code that is expanded at the callsite |
03:22:51 | FromDiscord | <Elegantbeef> So you can think of them as sophisticated copy paste |
03:23:00 | FromDiscord | <Zectbumo> wouldn't that be inline? |
03:23:17 | FromDiscord | <Elegantbeef> No, they're certainly pasted at the callsite and can be complex statements |
03:23:23 | FromDiscord | <Elegantbeef> It's akin to inline but not the same |
03:23:39 | FromDiscord | <Zectbumo> like const? |
03:23:55 | FromDiscord | <Elegantbeef> Sort of but they can be complex |
03:24:08 | FromDiscord | <Zectbumo> one day all this will come together for me |
03:24:23 | FromDiscord | <Elegantbeef> They're kinda like C's macros |
03:24:34 | FromDiscord | <Zectbumo> I get C macros |
03:24:40 | FromDiscord | <Zectbumo> templates are? |
03:24:47 | FromDiscord | <Elegantbeef> There we go, they're like those but smareter |
03:25:18 | FromDiscord | <Elegantbeef> Unlike C macros you can have templates that only accept specific types and also can take blocks of code |
03:25:43 | FromDiscord | <Zectbumo> very cool. I like smart macros. probably with better rules too. c macros get unruly |
03:26:52 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDK |
03:26:54 | FromDiscord | <Elegantbeef> Damn it |
03:27:30 | FromDiscord | <Elegantbeef> There we go |
03:27:36 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDL |
03:28:40 | FromDiscord | <Zectbumo> that's what I imagined. c macros can't do |
03:29:02 | FromDiscord | <Elegantbeef> Yep they're type safe on dispatch which makes them more flexible |
03:30:40 | FromDiscord | <Zectbumo> @ElegantBeef I'm trying to play around with your example and I changed to using a proc and now a closure instead of inline. now where did I go wrong? https://play.nim-lang.org/#ix=3XDM↵"Error: invalid type: 'iterable' in this context: 'proc (i: iterable): untyped' for proc" |
03:30:41 | FromDiscord | <huantian> nim templates are also hygenic |
03:30:53 | FromDiscord | <Elegantbeef> procs cannot take `iterable` |
03:31:14 | FromDiscord | <Elegantbeef> Like i said inline iterators are practically pasted at the callsite so you cannot pass them to things at runtime |
03:31:18 | FromDiscord | <Zectbumo> oh that's one change you made I didn't realize |
03:31:41 | FromDiscord | <Zectbumo> I made it a {.closure.} is that not a non-inline? |
03:32:00 | FromDiscord | <Elegantbeef> Indeed |
03:33:17 | FromDiscord | <huantian> are closure iterators first class? |
03:34:07 | FromDiscord | <demotomohiro> example code to pass a closure iterator to a proc: https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-firstminusclass-iterators |
03:36:50 | FromDiscord | <Elegantbeef> Yes they are huan |
03:41:07 | FromDiscord | <Zectbumo> sent a long message, see https://paste.rs/eNQ |
03:41:11 | FromDiscord | <Zectbumo> (edit) "long message," => "code paste," | "http://ix.io/3XDO" => "https://play.nim-lang.org/#ix=3XDN" |
03:41:11 | FromDiscord | <Zectbumo> how do you get nim syntax in discord? |
03:41:26 | FromDiscord | <Elegantbeef> nim after the three ticks |
03:41:35 | FromDiscord | <Zectbumo> oh after |
03:41:50 | FromDiscord | <Zectbumo> (edit) "https://play.nim-lang.org/#ix=3XDN" => "https://play.nim-lang.org/#ix=3XDP" |
03:41:55 | FromDiscord | <Zectbumo> (edit) "https://play.nim-lang.org/#ix=3XDP" => "https://paste.rs/dSN" |
03:42:30 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix= |
03:42:42 | FromDiscord | <demotomohiro> nvm |
03:43:09 | FromDiscord | <Zectbumo> oh I can : auto a proc. nice |
03:43:36 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=3XDQ |
03:44:42 | FromDiscord | <demotomohiro> There is no way to show 3 ticks on discord? |
03:50:20 | FromDiscord | <Zectbumo> \`\`\` |
03:51:03 | FromDiscord | <Zectbumo> \\\`\\\`\\\` |
03:55:38 | FromDiscord | <demotomohiro> @Zectbumo Thank you! |
03:56:10 | FromDiscord | <demotomohiro> \`\`\`nim↵echo "test"↵\`\`\` |
04:04:02 | FromDiscord | <Zectbumo> In reply to @huantian "nim templates are also": when you said "hygenic" I took it to mean high on the list of what you should use but in this blog it's #3 (second to last). https://hookrace.net/blog/introduction-to-metaprogramming-in-nim/ |
04:05:31 | FromDiscord | <Zectbumo> I feel like iterators should default to {.closure.} since it seems like the inline iterators are for speed. I want ease of use and when needed I can ask for speed with tradeoffs. |
04:05:55 | FromDiscord | <Elegantbeef> In most cases you want inline |
04:06:39 | FromDiscord | <Elegantbeef> Ideally the distinction isnt needed but alas |
04:14:19 | FromDiscord | <demotomohiro> Closure iterator has some limitation. It cannot be used at compile time and on JS backend. |
04:18:49 | FromDiscord | <SirElephant> is there a bot to run nim code in discord? |
04:22:03 | FromDiscord | <huantian> !eval echo “hi” |
04:22:05 | NimBot | Compile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: '“hi”' |
04:22:17 | FromDiscord | <huantian> Close enough |
04:25:56 | FromDiscord | <SirElephant> hmmm |
04:26:08 | FromDiscord | <SirElephant> In reply to @NimBot "Compile failed: /usercode/in.nim(1, 6)": why u gib eror |
04:26:10 | FromDiscord | <demotomohiro> !eval echo "hello nim" |
04:26:13 | NimBot | hello nim |
04:26:31 | FromDiscord | <byt3bl33d3r> heyo, quick q: anyone try to write a pam_module in nim before? ↵Trying to port something like this https://github.com/fedetask/pam-tutorials/blob/master/pam-module/src/main.c To nim |
04:26:48 | FromDiscord | <byt3bl33d3r> stuck on what to do with the PAM_EXTERN defition |
04:26:53 | FromDiscord | <byt3bl33d3r> (edit) "defition" => "definition" |
04:26:54 | FromDiscord | <SirElephant> sent a code paste, see https://paste.rs/zc7 |
04:27:04 | FromDiscord | <SirElephant> bruh mometn |
04:28:10 | FromDiscord | <huantian> In reply to @SirElephant "why u gib eror": I’m on mobile lol |
04:30:45 | FromDiscord | <SirElephant> can't it run multiple line programs? |
04:32:11 | FromDiscord | <xflywind> !eval let x = 12; echo x |
04:32:13 | NimBot | 12 |
04:32:23 | FromDiscord | <SirElephant> wierd |
04:32:55 | FromDiscord | <demotomohiro> @byt3bl33d3r What PAM_EXTERN do? Export the function from shared library? |
04:33:27 | FromDiscord | <byt3bl33d3r> sent a code paste, see https://paste.rs/uLY |
04:34:45 | FromDiscord | <byt3bl33d3r> not sure if this is the equivalent of exportc? |
04:36:34 | FromDiscord | <demotomohiro> It says it isn't needed anymore. So probably exportc pragma would be fine. |
04:37:40 | FromDiscord | <demotomohiro> !eval echo 4 shl -1 |
04:37:43 | NimBot | 0 |
04:39:06 | FromDiscord | <demotomohiro> In C, bit shift with negative width is undefined behavor. Maybe Nim should it compile/runtime error. |
04:43:27 | FromDiscord | <SirElephant> sent a long message, see https://paste.rs/muc |
04:44:22 | FromDiscord | <SirElephant> (edit) "http://ix.io/3XDX" => "https://paste.rs/jNH" |
04:45:09 | FromDiscord | <SirElephant> bruh |
04:45:23 | FromDiscord | <huantian> just use the nim playground and send us the link |
04:45:44 | FromDiscord | <SirElephant> In reply to @huantian "just use the nim": oke |
04:46:23 | FromDiscord | <SirElephant> https://play.nim-lang.org/#ix=3XDY |
04:46:30 | FromDiscord | <SirElephant> wow |
04:46:42 | FromDiscord | <SirElephant> how are these online compilers made? |
04:48:38 | FromDiscord | <demotomohiro> @SirElephant https://github.com/PMunch/nim-playground-frontend |
04:53:47 | * | slowButPresent quit (Quit: sleep) |
05:05:41 | FromDiscord | <Zectbumo> In reply to @huantian "I’m on mobile lol,": try holding down the quote key and you may get regular quote as an option |
05:06:13 | FromDiscord | <huantian> oh cool i'll tray that |
05:11:20 | * | ltriant joined #nim |
05:12:11 | * | ltriant_ quit (Ping timeout: 246 seconds) |
05:13:58 | FromDiscord | <uncle jim> is there a documentation for `dimscord`? |
05:16:53 | FromDiscord | <huantian> https://krisppurg.github.io/dimscord/dimscord.html |
05:17:06 | FromDiscord | <huantian> you can find it here https://media.discordapp.net/attachments/371759389889003532/974540768180076564/unknown.png |
05:18:30 | FromDiscord | <uncle jim> In reply to @huantian "you can find it": thenks |
05:21:25 | * | rockcavera quit (Remote host closed the connection) |
05:32:30 | FromDiscord | <kaddkaka> In reply to @Elegantbeef "I think a lot": Of course not, that's just playing stupid. The reason I don't like case insensitivity is because I can't grep for symbols in the source code with my normal tools.↵↵Searching in my editor works if there is a plugin or LSP, but otherwise? |
05:33:53 | FromDiscord | <Prestige> Why can't you grep for it? |
05:35:41 | FromDiscord | <kaddkaka> In reply to @ambient "So has anyone considered": We have a "happy hacky week" at work coming up soon, and one is I had was a Jupyter Nim kernel. Are you saying this already exist? ^^ |
05:42:23 | FromDiscord | <kaddkaka> In reply to @Avahe "Why can't you grep": If there is a mix, I would have to grep for more than 1 spelling to find all occurrences, right? |
05:42:42 | * | NanXiao[m] joined #nim |
05:43:29 | * | NanXiao[m] left #nim (#nim) |
05:47:48 | FromDiscord | <Rika> There’s a supplied tool nimgrep |
05:48:43 | * | sagax quit (Ping timeout: 256 seconds) |
06:13:33 | FromDiscord | <Prestige> In reply to @kaddkaka "If there is a": well same spelling but yeah, could just nimgrep. Or, use regex |
06:15:20 | FromDiscord | <Rika> Using regex would be relatively difficult because you would need to insert _? after every letter |
06:15:28 | FromDiscord | <Rika> Until the end of course |
06:16:26 | FromDiscord | <Prestige> Yeah but you could write a helper function for it |
06:16:32 | FromDiscord | <Prestige> but then again, one exists |
06:33:05 | * | GreaseMonkey quit (Remote host closed the connection) |
06:40:00 | FromDiscord | <kaddkaka> But I would also have to o↵plug in nimgrep into all my other tools. Vim, vim functions, bash functions, fish abbreviations, tig searching, pager searching (with `/`). Some are easier, some I don't know. All of them incur some setup. ↵↵This is why I would prefer to avoid the need for something like nimgrep. |
06:40:13 | FromDiscord | <kaddkaka> (edit) "o↵plug" => "plug" |
06:41:39 | * | jjido joined #nim |
06:44:52 | * | sagax joined #nim |
06:46:02 | FromDiscord | <Prestige> There's a forum posting (or open issue) to discuss why you'd prefer to have this language feature, could add your comments to it |
06:46:11 | FromDiscord | <Prestige> If something similar hasn't already been posted |
06:52:05 | FromDiscord | <uncle jim> In reply to @kaddkaka "But I would also": fish is the worst name for a shell |
06:52:25 | FromDiscord | <uncle jim> what were they thinking when they named it "fish" |
06:52:38 | FromDiscord | <Elegantbeef> It ends with sh |
06:52:55 | FromDiscord | <uncle jim> In reply to @Elegantbeef "It ends with sh": 0_0 |
06:53:43 | FromDiscord | <Prestige> Fish kinda sucks too |
06:53:49 | FromDiscord | <Elegantbeef> Fuuuck something with destructors and wasmedge causes my framework not to work |
06:54:02 | FromDiscord | <uncle jim> In reply to @Avahe "Fish kinda sucks too": https://tenor.com/view/true-shorty-scary-movie-smoke-gif-15464844 |
06:54:02 | FromDiscord | <Elegantbeef> Eh i've been using it and really enjoying it's auto complete |
06:54:35 | FromDiscord | <uncle jim> In reply to @Elegantbeef "Eh i've been using": huh thats nothing, even i auto-complete my PT teachers |
06:55:32 | FromDiscord | <uncle jim> `fish - the friendly interactive shell`' |
06:55:37 | FromDiscord | <uncle jim> (edit) "shell`'" => "shell`" |
06:55:44 | FromDiscord | <uncle jim> https://tenor.com/view/dies-from-cringe-pink-skull-cgi-render-gif-23154103 |
06:55:51 | FromDiscord | <Prestige> You can get autocomplete in zsh |
06:56:03 | FromDiscord | <Elegantbeef> That's not really the point now is it |
06:56:22 | FromDiscord | <Prestige> I think so |
06:56:26 | FromDiscord | <Elegantbeef> It's got nice autocomplete out of the box is the benefit i proposed |
06:56:49 | FromDiscord | <katlyn> the only thing that makes fish a bit of a pain is that it's not fully posix compliant, other than that it's really nice out of the box |
06:57:01 | FromDiscord | <Prestige> Having some nice features ootb is nice, but it falls short otherwise |
06:57:10 | FromDiscord | <Elegantbeef> Works fine for me |
06:57:58 | FromDiscord | <katlyn> aside from the posix stuff it works great for me too, I've had a hard time moving to other shells |
06:58:48 | FromDiscord | <Prestige> I'm a bit anal about my workflow |
06:59:04 | FromDiscord | <uncle jim> In reply to @katlyn "aside from the posix": pwsh |
06:59:05 | FromDiscord | <Prestige> I still need to write my own terminal but I haven't dedicated the time |
06:59:33 | FromDiscord | <uncle jim> In reply to @Avahe "I still need to": name it `pUwUsh` |
06:59:40 | FromDiscord | <Prestige> Oh god no |
06:59:45 | FromDiscord | <uncle jim> In reply to @Avahe "Oh god no": lol |
07:00:18 | FromDiscord | <Prestige> I'd probably call it nish, pronounced niche, Nim Interactive Shell |
07:00:36 | FromDiscord | <Prestige> Or maybe just make some crap up |
07:00:36 | FromDiscord | <uncle jim> In reply to @Avahe "I'd probably call it": naaaah, `pUwUsh` is still better |
07:01:07 | FromDiscord | <Elegantbeef> clearly you go nimpish |
07:01:25 | FromDiscord | <uncle jim> or `nimfish` |
07:01:26 | FromDiscord | <Prestige> That's good |
07:01:36 | FromDiscord | <Prestige> Beef's I mean |
07:01:41 | FromDiscord | <Elegantbeef> This sigabrt is going to make me axe people |
07:01:56 | FromDiscord | <uncle jim> In reply to @Avahe "Beef's I mean": https://tenor.com/view/spongebob-stabbing-himself-minul-mirdha-spongebob-suicide-gif-19249830 |
07:02:19 | FromDiscord | <Prestige> Lol |
07:02:54 | FromDiscord | <Elegantbeef> My destructors are not called but just the act of having them exist causes my program to crash |
07:03:18 | FromDiscord | <Prestige> At runtime? |
07:03:26 | FromDiscord | <Elegantbeef> Yes |
07:03:31 | FromDiscord | <Prestige> That's.. odd |
07:03:39 | FromDiscord | <Elegantbeef> I've clearly fucked something up with wasmedge methinks |
07:03:43 | FromDiscord | <uncle jim> In reply to @Avahe "That's.. odd": really....odd |
07:04:42 | FromDiscord | <Prestige> Elegantbeef I want your opinion on some API design for my custom input events in my game engine |
07:04:48 | FromDiscord | <Prestige> https://github.com/einheit-tech/shade/blob/input-callback-improvements/examples/platformer/platformer_example.nim#L175 thoughts? |
07:04:51 | FromDiscord | <Elegantbeef> Ruh roh |
07:05:12 | FromDiscord | <Prestige> I've tried a few different ways and I'm unsatisfied |
07:05:15 | FromDiscord | <Elegantbeef> My eyes might be decieving me but are those strings |
07:06:00 | FromDiscord | <Elegantbeef> I'm a simple man prestige i generally just do a poll in the main loop |
07:07:13 | FromDiscord | <Prestige> I'm setting it up so you could have any input event trigger a custom event. E.g. up arrow or W or X on a controller.. any of them would fire the "jump" event |
07:07:19 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XEd |
07:13:49 | FromDiscord | <Rika> When it comes to fish, I think it being not posix compliant is both it’s best and worst feature |
07:14:30 | FromDiscord | <Rika> In reply to @kaddkaka "But I would also": I think it’s a matter of tooling being bad, I wouldn’t remove a feature because tooling doesn’t support it; I’d add support for it to the tooling |
07:18:25 | FromDiscord | <uncle jim> sent a code paste, see https://play.nim-lang.org/#ix=3XEe |
07:19:37 | FromDiscord | <uncle jim> i am getting the error at `discord.api.sendMessage` |
07:22:06 | FromDiscord | <Prestige> Not on my computer to check, but the example may be outdated |
07:22:23 | FromDiscord | <Elegantbeef> The error you're getting would help |
07:23:32 | FromDiscord | <uncle jim> https://media.discordapp.net/attachments/371759389889003532/974572588024102912/Screenshot_1309.png |
07:23:34 | FromDiscord | <uncle jim> DIS |
07:23:47 | FromDiscord | <Elegantbeef> give the compiler error |
07:23:50 | FromDiscord | <Elegantbeef> Not the list of errors |
07:24:07 | FromDiscord | <Elegantbeef> line 26 is the first error |
07:24:10 | FromDiscord | <Elegantbeef> Too many arguments |
07:24:19 | FromDiscord | <uncle jim> sent a long message, see http://ix.io/3XEf |
07:24:29 | FromDiscord | <uncle jim> (edit) "long message," => "code paste," | "http://ix.io/3XEf" => "https://paste.rs/UiR" |
07:24:40 | FromDiscord | <Elegantbeef> There you go |
07:24:57 | FromDiscord | <uncle jim> In reply to @Elegantbeef "line 26 is the": it's the only error |
07:24:59 | FromDiscord | <Elegantbeef> arg 3 should be `seq[Embed]` but you passed `Option[seq[Embed]]` |
07:25:06 | FromDiscord | <Elegantbeef> remove the `some` on that seq |
07:25:09 | FromDiscord | <Elegantbeef> Problem solved |
07:25:11 | FromDiscord | <uncle jim> In reply to @Elegantbeef "arg 3 should be": not me |
07:25:22 | FromDiscord | <Elegantbeef> Dont get defensive |
07:25:34 | FromDiscord | <uncle jim> In reply to @Elegantbeef "Dont get defensive": jk |
07:27:36 | FromDiscord | <kaddkaka> In reply to @Rika "I think it’s a": Almost all tools have some form of searching. Nimgrep/underscore insensitivity is a thing that would have to go i to ALL tools (google/stack overflow search?) , and also all _future_ tools.↵↵Sure it _can_ be done, I'm just not convinced the feature is worth the cost. |
07:30:42 | FromDiscord | <uncle jim> @ElegantBeef soooo how do i actually use it in discrod? |
07:31:03 | * | PMunch joined #nim |
07:32:12 | * | cyraxjoe quit (Ping timeout: 240 seconds) |
07:32:51 | FromDiscord | <Elegantbeef> You put the bot token in? |
07:32:59 | FromDiscord | <Elegantbeef> Ok so something fishy is going on here |
07:33:13 | FromDiscord | <uncle jim> In reply to @Elegantbeef "You put the bot": no i didnt |
07:33:23 | FromDiscord | <uncle jim> you get it from discord right? |
07:34:19 | FromDiscord | <Elegantbeef> Hmm i wonder if linking with `-l` is interfering with Nim's `dynlib` linking |
07:36:11 | FromDiscord | <Rika> In reply to @kaddkaka "Almost all tools have": I guess, but I don’t think it’s an issue personally |
07:36:26 | FromDiscord | <Rika> Opinion thing so eh |
07:37:31 | FromDiscord | <kaddkaka> Yeah. I don't have any strong opinion |
07:42:57 | FromDiscord | <uncle jim> @ElegantBeef ok so i have got the `bot token` and added it to the `newDiscordClient()`. What now? |
07:43:50 | FromDiscord | <uncle jim> how do i add it to my server |
07:46:33 | FromDiscord | <Elegantbeef> Through discord |
07:47:02 | FromDiscord | <uncle jim> In reply to @Elegantbeef "Through discord": bruh |
07:49:26 | FromDiscord | <uncle jim> In reply to @Elegantbeef "Through discord": pls elegant you gotta help me. My wife will leave me if i dont add this discord bot the our server |
07:51:22 | FromDiscord | <uncle jim> 😢 |
07:51:27 | FromDiscord | <uncle jim> 😢 |
07:51:28 | FromDiscord | <uncle jim> 😢 |
07:52:36 | FromDiscord | <Elegantbeef> I'm not here to help you with your discord bot, you can use a search engine "how to develop a discord bot" to find out how to add it |
07:52:42 | FromDiscord | <uncle jim> In reply to @Elegantbeef "I'm not here to": i got it |
07:53:21 | FromDiscord | <uncle jim> i added it |
07:53:43 | * | duuude joined #nim |
07:58:43 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:03:26 | FromDiscord | <Zectbumo> how does one convert a seq to a tuple? |
08:03:44 | FromDiscord | <Elegantbeef> There is not seq unpacking in vanilla nim you need to do it manually |
08:03:53 | FromDiscord | <Elegantbeef> There are macros that add it though |
08:04:04 | FromDiscord | <Zectbumo> aw |
08:04:22 | FromDiscord | <Zectbumo> well, this makes database not fun |
08:04:55 | FromDiscord | <Elegantbeef> Can always use https://metagn.github.io/assigns/assigns.html#examples |
08:05:13 | * | ltriant quit (Ping timeout: 260 seconds) |
08:05:48 | FromDiscord | <Zectbumo> that does look nice |
08:05:55 | PMunch | Hmm, I wonder if it would be possible to do raw writes to the X11 socket in order to create a small window and write pixels within it |
08:06:26 | FromDiscord | <Elegantbeef> I have not response to that pmunch, too busy trying to figure out this sigabrt bug |
08:06:33 | FromDiscord | <Elegantbeef> I blame you |
08:06:47 | PMunch | Me? What did I do to create a sigabtr? |
08:07:18 | FromDiscord | <Elegantbeef> I'm using the wasm runtime i wrapped with futhark and using it causes sdl2 to crash on window creation |
08:07:22 | FromDiscord | <Elegantbeef> So clearly it's a you problem |
08:07:47 | PMunch | Hmm, certainly sounds like something that might be my problem :P |
08:08:07 | PMunch | If Futhark has messed up the wrappers |
08:08:09 | FromDiscord | <Elegantbeef> I've tried to min repo it but it worked, so i dunno |
08:08:23 | PMunch | Ah, that makes it slightly less likely |
08:08:26 | FromDiscord | <Elegantbeef> I'm not even using any of the code i'm using a single type def |
08:08:41 | FromDiscord | <Elegantbeef> The mere act of adding destructors to these types seems to causue it |
08:08:42 | PMunch | But it could still be something like a type being slightly too large or too small |
08:08:46 | FromDiscord | <Elegantbeef> i remove the destructors it works |
08:08:53 | FromDiscord | <Elegantbeef> The destructors arent even called |
08:09:04 | PMunch | Uhm, that sounds strange |
08:09:36 | PMunch | How do you know that they are not called? |
08:09:37 | FromDiscord | <Elegantbeef> You're telling me |
08:10:05 | FromDiscord | <Elegantbeef> I have a global variable and an echo inside the destructor |
08:10:19 | FromDiscord | <Elegantbeef> The type outlives the code that's causing the issue |
08:10:38 | FromDiscord | <Elegantbeef> Like my program is super simple |
08:10:40 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/974584450761523221/image.png |
08:11:35 | * | ltriant joined #nim |
08:11:36 | PMunch | And if you add a destructor at line 34 it crashes? |
08:11:51 | FromDiscord | <Elegantbeef> Well in my wasmedge module |
08:12:02 | FromDiscord | <Elegantbeef> If the wasm types have destructors it sigabrts |
08:12:04 | FromDiscord | <Elegantbeef> Otherwise it runs |
08:12:11 | PMunch | I assume that `initTruss` is a Nim procedure and not a C one |
08:12:19 | FromDiscord | <Elegantbeef> Correct |
08:13:10 | PMunch | And you're sure your destructor is registered correctly? |
08:13:41 | PMunch | Not that I'm sure how that would make a difference :P |
08:15:27 | FromDiscord | <Elegantbeef> Ok actually it might be the destructor |
08:17:30 | FromDiscord | <Elegantbeef> made it a noop and it worked |
08:17:30 | FromDiscord | <Elegantbeef> So it's not the mere act of it existing 😄 |
08:18:20 | PMunch | What does the destructor look likE? |
08:18:55 | FromDiscord | <uncle jim> In reply to @PMunch "What does the destructor": https://tenor.com/view/reptar-city-rugrats-90s-gif-3481019 |
08:19:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XEr |
08:20:01 | FromDiscord | <Elegantbeef> that `isNil` isnt what it normall is |
08:20:12 | FromDiscord | <Elegantbeef> Just seeing things |
08:24:21 | PMunch | Is this correct? makeDestructor(ModuleContext, moduleInstanceDelete) |
08:27:30 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XEs |
08:27:36 | * | caliente22 joined #nim |
08:29:03 | * | caliente22 quit (Client Quit) |
08:29:19 | PMunch | I'm not sure that snippet came through the bridge unscathed.. |
08:29:35 | FromDiscord | <Elegantbeef> https://hatebin.com/hjubsfyyvk |
08:29:36 | PMunch | I meant more is it correct to call moduleInstanceDelete on a ModuleContext |
08:30:25 | FromDiscord | <Elegantbeef> They call it on `WasmEdge_ModuleInstanceContext` |
08:30:50 | FromDiscord | <Elegantbeef> `type ModuleContext = distinct ptr WasmModuleInstanceContext` |
08:31:11 | FromDiscord | <Elegantbeef> So yea i think so, the thing is though the procedure is not being called |
08:31:32 | PMunch | Right, that should be fine then |
08:31:45 | PMunch | Just looked like you might've called the wrong proc there |
08:32:12 | * | piapiac quit (Quit: ZNC 1.8.2 - https://znc.in) |
08:38:20 | * | piapiac joined #nim |
08:38:21 | * | piapiac quit (Changing host) |
08:38:22 | * | piapiac joined #nim |
08:39:48 | * | toluene quit (Ping timeout: 260 seconds) |
08:42:30 | * | toluene joined #nim |
08:59:12 | FromDiscord | <Elegantbeef> Well i got it down to a sort of min repro |
09:00:35 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3XEv |
09:10:10 | PMunch | Just give me a sec while I try to install wasmedge |
09:11:59 | PMunch | Hmm, I get a undefined reference error |
09:14:10 | FromDiscord | <Elegantbeef> Uhh you probably have 0.9.1 or w/e |
09:14:20 | FromDiscord | <Elegantbeef> Here's a even less dependancy filled version https://play.nim-lang.org/#ix=3XED |
09:14:34 | FromDiscord | <Zectbumo> how do I get a bracket expression in a macro? |
09:14:37 | PMunch | 0.9.0 even |
09:14:52 | FromDiscord | <Elegantbeef> I can use an older type pmunch |
09:14:54 | FromDiscord | <Elegantbeef> Sit tight |
09:16:21 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3XEF |
09:17:07 | FromDiscord | <mratsim> In reply to @Zectbumo "how do I get": `nnkBracketExpr.newTree(a, b)` |
09:18:20 | PMunch | @Elegantbeef, that seems to work fine though |
09:18:30 | PMunch | Shows a flash of a window before it quits |
09:18:32 | FromDiscord | <Elegantbeef> Shit i might have bad dlls |
09:18:43 | FromDiscord | <mratsim> In reply to @Elegantbeef "Shit i might have": You need pills |
09:18:57 | FromDiscord | <Elegantbeef> That's what i thought |
09:22:44 | FromDiscord | <Elegantbeef> So it just seems like an issue with my system then... the fuck |
09:31:22 | FromDiscord | <Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3XEK |
09:31:32 | FromDiscord | <Elegantbeef> Congrats! |
09:31:58 | FromDiscord | <Zectbumo> guys... I'm in love with nim |
09:32:28 | FromDiscord | <enthus1ast> @Zectbumo for databases i've done https://github.com/enthus1ast/nisane |
09:32:56 | FromDiscord | <enthus1ast> 80-90% of the tasks are easy (at least how i do my database stuff) |
09:33:31 | FromDiscord | <enthus1ast> the "orm" features are just toys, but i really like the to macro |
09:35:28 | FromDiscord | <Zectbumo> In reply to @enthus1ast "<@157415492812800000> for databases i've": very neat. I can learn from this. one thing I'm wondering is in tuple unpacking one can do _. would you be able to do _ instead of nil? |
09:35:39 | FromDiscord | <Zectbumo> (edit) "_." => "\_." | "_" => "\_" |
09:35:51 | FromDiscord | <enthus1ast> \_ was the first attempt |
09:36:07 | FromDiscord | <enthus1ast> but i got some issues (that i can't remember any more) |
09:36:21 | FromDiscord | <enthus1ast> so nil it is |
09:36:26 | FromDiscord | <Zectbumo> interesting. yes |
09:36:46 | FromDiscord | <Zectbumo> the manual does say special case |
09:41:30 | * | ltriant quit (Ping timeout: 240 seconds) |
09:41:45 | * | ltriant joined #nim |
09:42:59 | FromDiscord | <Zectbumo> so, you can make a macro that makes macros? but they are templates? |
09:43:46 | FromDiscord | <Elegantbeef> Macros as you've probably noticed run code at compile time and emit AST, they're akin to templates but they differ in that the body can change drastically from a single macro |
09:44:24 | FromDiscord | <Zectbumo> I'm trying to make sense of this https://nim-lang.org/docs/macros.html#statements-macro-declaration |
09:44:49 | FromDiscord | <Elegantbeef> It's saying the ast is the same |
09:44:51 | FromDiscord | <Elegantbeef> just a different node |
09:44:52 | FromDiscord | <Elegantbeef> node kind |
09:45:10 | FromDiscord | <Elegantbeef> https://dev.to/beef331/demystification-of-macros-in-nim-13n8 is a nice writeup if i do say so myself |
09:45:12 | FromDiscord | <Elegantbeef> and i do |
09:45:33 | FromDiscord | <Zectbumo> oh nice I will read this |
09:53:15 | FromDiscord | <j-james> !eval type Terrible = concept x; x is string; x.len == 9; let a: Terrible = "terrible." |
09:53:18 | NimBot | Compile failed: /usercode/in.nim(1, 28) Error: undeclared identifier: 'x' |
09:53:27 | FromDiscord | <j-james> bluh |
09:56:02 | FromDiscord | <j-james> what's up with this: https://play.nim-lang.org/#ix=3XEO |
09:56:11 | FromDiscord | <j-james> an implementation bug? |
10:08:15 | * | xet7 quit (Remote host closed the connection) |
10:09:53 | * | xet7 joined #nim |
10:11:05 | PMunch | @j-james, concepts have to be evaluateable at compile-time |
10:11:16 | PMunch | But it's a bug that it doesn't throw an error |
10:13:48 | FromDiscord | <Zectbumo> is x.len the source of the problem? |
10:14:36 | PMunch | Yes, if you comment that out it works fine |
10:15:23 | PMunch | The length of a string isn't known at compile-time |
10:16:10 | FromDiscord | <Zectbumo> unless if it's a constant? |
10:16:30 | PMunch | Yeah it should theoretically be possible to do this with a static[string] |
10:20:40 | om3ga | Guys, and will be gcc11 suppurted in near future? |
10:23:38 | FromDiscord | <Yardanico> In reply to @om3ga "Guys, and will be": it is supported just fine |
10:23:48 | FromDiscord | <Yardanico> I've been using it in WSL and on Arch with no issues for Nim |
10:24:44 | FromDiscord | <Yardanico> can you paste somewhere the full output with the error you're presumably getting when using gcc 11 with Nim? |
10:25:12 | FromDiscord | <j-james> hmm, what's up with this then |
10:25:14 | om3ga | Yardanico, hmm. strange. Something weird I have here. Sure, I will copy when that errors will appear again |
10:25:26 | FromDiscord | <j-james> sent a code paste, see https://play.nim-lang.org/#ix=3XEV |
10:25:28 | FromDiscord | <j-james> `Error: type mismatch: got 'int literal(1)' for '1' but expected 'Natural = t'` |
10:25:46 | FromDiscord | <Yardanico> In reply to @j-james "`Error: type mismatch: got": first of all, you can't assign concept types to variables |
10:25:52 | FromDiscord | <Yardanico> concept types can only be used in things like proc arguments |
10:26:10 | FromDiscord | <Yardanico> and it's exactly as PMunch said - that len thing should also be a compile-time error instead of a compiler crash |
10:28:06 | FromDiscord | <Yardanico> In reply to @Yardanico "first of all, you": hmm, apparently you can, but I guess it only works for simple cases like this for int |
10:28:45 | FromDiscord | <Yardanico> and yeah, anyway, x > 0 is a compile-time check, and you're doing it for a `let` variable |
10:28:52 | FromDiscord | <Yardanico> try using procs instead, you'll get much better errors for this case as well |
10:30:53 | FromDiscord | <j-james> sent a code paste, see https://play.nim-lang.org/#ix=3XEZ |
10:31:02 | FromDiscord | <j-james> `Error: type mismatch: got <int literal(1), int literal(2)>↵but expected one of:↵proc example(a: Tiny; b: int): Tiny` |
10:31:19 | FromDiscord | <j-james> it does look like the same error as before |
10:31:21 | FromDiscord | <Yardanico> yes, and it tells below in the error that the matching failed |
10:32:05 | FromDiscord | <j-james> but 1 should satisfy the concept's conditions, no |
10:32:29 | FromDiscord | <Yardanico> `d:\Projects\NimExperiments\main.nim(3, 3) Tiny: cannot evaluate at compile time: x` as PMunch said before |
10:33:20 | FromDiscord | <Yardanico> but honestly I'm not sure, although I've never seen code to use concepts for things like checking length of stuff or values |
10:33:30 | FromDiscord | <Yardanico> it's usually used as compile-time interfaces to check that a type has specific procs, etc |
10:33:40 | FromDiscord | <j-james> d'oh i missed the actual error message |
10:33:53 | FromDiscord | <j-james> yeah i was playing around to see if i could make it do very bad things |
10:34:12 | FromDiscord | <j-james> like create a type that only is valid for a specific string |
10:35:20 | PMunch | That sounds like an enum |
10:35:30 | FromDiscord | <j-james> i would very much like to use it as a more powerful range type, though |
10:35:34 | FromDiscord | <j-james> yup 😄 |
10:36:41 | FromDiscord | <Rika> Concepts are bolted on and not first class so right now you can’t do these |
10:40:49 | FromDiscord | <Andreas> @ElegantBeef https://play.nim-lang.org/#ix=3XF1↵Hi again, i re-worked what you suggested, regarding the NodeImpl. I'm not sure if i can make use of the playground solution. And i have no idea, why such a 'complicated' re-declaration is needed ? greetz & beatz |
10:41:47 | * | jmdaemon joined #nim |
10:46:00 | om3ga | Yardanico, for now, I got segfault when trying to use sanitise=thread in gcc |
10:46:09 | om3ga | *sanitize |
10:46:46 | om3ga | maybe that's because someone compiled custom asan, I should check that |
10:46:56 | om3ga | *tsan |
10:51:08 | om3ga | no. seems it's not possible since sanitizers are part of gcc, and are builtin |
10:52:50 | FromDiscord | <Yardanico> sanitisers are disabled by default in GCC |
10:53:00 | FromDiscord | <Yardanico> Maybe your distro enabled them or something? |
10:53:32 | FromDiscord | <Yardanico> Or try disabling them yourself with -fno-sanitize=name |
10:53:50 | FromDiscord | <Yardanico> Like -fno-sanitize=undefined , not sure what's the name for the thread sanitizer |
10:55:25 | om3ga | Yardanico, -fsanitize=thread |
10:55:40 | FromDiscord | <Yardanico> Then do -fno-sanitize=thread |
10:55:53 | om3ga | yes. that's what I do |
10:56:33 | om3ga | and it segfauls. I have following options in config.nims: --passC:"-O0 -g3 -fsanitize=thread" --passL:"-lfcgi -fsanitize=thread" |
10:57:16 | FromDiscord | <Yardanico> but this was you enable the sanitizer |
10:57:19 | FromDiscord | <Yardanico> Not disable it |
10:57:36 | FromDiscord | <Yardanico> does it crash without fsanitize ? |
10:58:49 | FromDiscord | <Yardanico> (edit) "was" => "way" |
11:01:00 | om3ga | Yardanico, without sanitizer it works, yeah |
11:01:16 | om3ga | but I need it for debug |
11:02:10 | om3ga | I would be happy to use clang, but on some machines they dont allow me to install it |
11:02:19 | FromDiscord | <Yardanico> I'm not sure it'll work with Nim correctly at all, but at least try compiling with --mm:orc as ARC/ORC generally play better with threads |
11:03:23 | om3ga | Yardanico, orc specified already. looks like issue with compiler, or something else... maybe fcgi lib needs to be recompiled |
11:03:48 | om3ga | anyway thanks, I will try to exclude all possible interferences |
11:06:20 | FromDiscord | <Yardanico> but if it crashes due to the sanitizer, doesn't sanitizer show any error messages? |
11:06:43 | om3ga | no.. just segfault right after start |
11:11:17 | * | tk quit (Quit: Well, this is unexpected.) |
11:11:41 | * | tk joined #nim |
11:16:33 | * | jmdaemon quit (Ping timeout: 260 seconds) |
12:04:44 | * | vicfred_ joined #nim |
12:07:30 | * | vicfred quit (Ping timeout: 240 seconds) |
12:09:27 | * | xet7 quit (Remote host closed the connection) |
12:10:58 | * | xet7 joined #nim |
12:17:26 | PMunch | !eval echo NimVersion & " 🥳" |
12:17:28 | NimBot | 1.6.6 🥳 |
12:17:34 | * | firq joined #nim |
12:18:01 | PMunch | Turns out I had disabled cron on the playground server :P So it didn't update the images |
12:22:21 | FromDiscord | <d4rckh> !eval echo NimVersion & " 🥳" |
12:22:24 | NimBot | 1.6.6 🥳 |
12:22:39 | FromDiscord | <d4rckh> is this secure? letting people run nim? |
12:23:05 | FromDiscord | <Rika> Yeah, I believe it’s virtualised anyway |
12:24:59 | PMunch | @d4rckh, define secure |
12:25:22 | FromDiscord | <d4rckh> safe? |
12:26:34 | PMunch | It runs on a virtual machine, and each snippet of code is run in a constrained docker container with limitation on CPU, RAM, running time, and without internet connections. Sure, it can be used to generate some extra heat in a datacentre somewhere, but even if it broke out of the container there isn't anything on the virtual machine it could take. |
12:26:35 | FromDiscord | <Rika> Safe in what sense? |
12:27:04 | * | rockcavera joined #nim |
12:27:04 | * | rockcavera quit (Changing host) |
12:27:05 | * | rockcavera joined #nim |
12:27:32 | PMunch | Sure if something got access to the rest of the server (which has happened in the past, and been properly disclosed and fixed) they could use it for some nefarious network purpose. |
12:28:13 | dithpri | !eval echo exceProcess("/bin/rm", args=["-rf", "--no-preserve-root"]) |
12:28:15 | NimBot | <no output> |
12:28:20 | dithpri | whoops typo |
12:28:27 | dithpri | !eval echo execProcess("/bin/rm", args=["-rf", "--no-preserve-root"]) |
12:28:28 | NimBot | <no output> |
12:28:48 | PMunch | You can also run this on the playground by the way, it's the same machine |
12:29:16 | FromDiscord | <d4rckh> can you access global variables? |
12:29:28 | PMunch | @d4rckh, global variables? |
12:29:31 | FromDiscord | <d4rckh> like the bot object |
12:29:43 | PMunch | Huh? |
12:29:46 | FromDiscord | <Rika> No |
12:29:57 | FromDiscord | <Rika> The bot and the runner are independent |
12:30:02 | FromDiscord | <d4rckh> oh thats cool |
12:30:03 | PMunch | The bot runs on a completely separate machine |
12:30:13 | PMunch | It just uses the playground through the REST API |
12:30:22 | FromDiscord | <d4rckh> ah makes sense |
12:30:23 | FromDiscord | <d4rckh> thats cool |
12:31:19 | FromDiscord | <xflywind> Nice! Is the REST API public? |
12:32:21 | PMunch | @dithpri, as it runs in its own container the worst that command could do (if it was written properly) is to delete the compilation and output logs |
12:32:33 | PMunch | @xflywind, well the entire code is public, so yes |
12:32:56 | dithpri | PMunch: yeah I just looked at the docs and I'd need to pass `options` or use execShellCommand |
12:33:46 | dithpri | *execShellCmd |
12:34:14 | FromDiscord | <xflywind> In reply to @PMunch "<@658563905425244160>, well the entire": I see, I would like to embed Nim code on the HTML and execute it via the rest api. |
12:34:35 | dithpri | why? |
12:35:06 | PMunch | Like a live tour kind of deal? |
12:35:24 | FromDiscord | <xflywind> Yeah, I can do it for all runnableExamples. |
12:35:39 | PMunch | That would work |
12:35:53 | PMunch | Might need a bigger server if it gets popular though |
12:36:13 | PMunch | And most runnableExamples only have asserts anyways, so they wouldn't really output anything useful |
12:36:38 | PMunch | They would have to be editable in order to be useful |
12:36:56 | FromDiscord | <Zoom> For starters, it would be nice to have a button for all code blocks to just send the contents to the playground.↵(@xflywind) |
12:37:09 | FromDiscord | <Zoom> I made a FR for the forums with the same suggestion |
12:38:25 | * | vicfred_ quit (Quit: Leaving) |
12:39:22 | FromDiscord | <dithpri> In reply to @PMunch "<@233290600131067913>, as it runs": Huh I got pinged here too |
12:40:01 | FromDiscord | <Zoom> https://github.com/nim-lang/nimforum/issues/293 |
12:40:42 | FromDiscord | <xflywind> Yeah, I agree. |
12:41:32 | PMunch | dithpri, yeah I pinged you. It was meant as a reply to your rm -rf commands |
12:41:49 | dithpri | Yes, just interesting the bot pinged me on discord too |
12:42:24 | PMunch | We've got some pretty nifty bots around here :) |
12:44:34 | FromDiscord | <xflywind> Hi. where is the code of the bot? |
12:45:30 | FromDiscord | <xflywind> I see |
12:45:45 | FromDiscord | <xflywind> Some code looks outdated though |
12:46:01 | FromDiscord | <xflywind> https://github.com/nim-lang/nimbot/blob/e37e337d4a78b44cf828ad1c9d51142ce3e96743/src/nimbot.nim#L42 |
12:46:35 | * | slowButPresent joined #nim |
12:48:44 | FromDiscord | <Zoom> Magic strings in plain code! Disgusting! |
12:49:19 | FromDiscord | <xflywind> let's hunt all nimrod in the all Nim repos. |
12:49:29 | FromDiscord | <xflywind> (edit) removed "the" | "repos." => "repos!" |
12:49:44 | NimEventer | New thread by Mardiyah: Compile time function use Nim metaprogramming feature, see https://forum.nim-lang.org/t/9154 |
12:51:15 | FromDiscord | <Zoom> I bet half the code with `nimrod` is not used by this point and just waits to be removed altogether.↵(@xflywind) |
12:54:37 | FromDiscord | <xflywind> probably 😱 |
12:56:24 | PMunch | Or the maintainer hasn't pushed in a while :P |
12:56:54 | PMunch | Oh, apparently it was updated 11 months ago |
12:57:56 | PMunch | Oh, NimBot is the irclogs server as well :P |
12:58:07 | FromDiscord | <xflywind> yeah, the link still works |
12:59:47 | * | mahlon quit (Ping timeout: 246 seconds) |
13:00:18 | FromDiscord | <xflywind> Anyway => https://github.com/nim-lang/nimbot/pull/16 |
13:03:19 | PMunch | Hmm, does anybody want to write a software serial implementation for Ratel? |
13:04:10 | PMunch | I'm working on adding the attiny85 to it, I think I've got the i2c working now |
13:04:36 | PMunch | I'm going to add ADC support soon as well |
13:04:43 | PMunch | And hopefully finally get around to do SPI |
13:05:43 | PMunch | I've also been playing around with getting it to run on the raspberry pi, that way libraries could be shared between the microcontroller and RPi which would be cool |
13:05:43 | FromDiscord | <xflywind> It seems https://github.com/nim-lang/nimbot/blob/e37e337d4a78b44cf828ad1c9d51142ce3e96743/src/playground.nim#L18 breaks on devel since `=`(string, HttpCode) is removed from devel. |
13:06:35 | FromDiscord | <Rika> The regular one or the pico |
13:08:44 | PMunch | I've been playing with the regular one |
13:08:57 | PMunch | The Pico would of course be an obvious target as well |
13:09:59 | FromDiscord | <Rika> It’s very hard to make a general api for something like this I’d say |
13:10:19 | FromDiscord | <Rika> What happens when you want to use board specific stuff, I’m not sure |
13:12:00 | PMunch | Then you use a board specific library |
13:12:41 | PMunch | The generalization is for the common interfaces (e.g. reading/writing pins, i2c, SPI, serial) |
13:13:04 | FromDiscord | <Rika> What if it’s like “do this on the pico, otherwise fall back to regular bit banging” kind of thing |
13:13:30 | PMunch | If you then write a library for an i2c sensor, and only use the common interface of i2c operations, then that library could be used on all boards which had that interface implemented |
13:14:04 | PMunch | Then you can use `when` statements to check which board you're on |
13:14:30 | FromDiscord | <Rika> Would ratel mix well with let’s say that pico library? |
13:15:05 | FromDiscord | <Rika> Let’s say Ratel has the WS2812 protocol implemented in software |
13:15:12 | PMunch | In Ratel you do `import board` and then in your config.nims file you do `import boardConf; board "teensy"` for example. That sets the imports such that board now imports teensy.nim and `board/i2c` imports `teensy/i2c.nim` |
13:15:21 | FromDiscord | <Rika> And that I have a pico and an Arduino as my target |
13:15:44 | FromDiscord | <Rika> On the pico, I’d use PIO naturally, on the Arduino I’d bit bang (using your implementation in Ratel) |
13:15:47 | FromDiscord | <Rika> How would I do so |
13:16:11 | FromDiscord | <Rika> Just a hypothetical of course |
13:18:15 | PMunch | Well with a Pico implementation for Ratel you would have a Pin that would map to some commands to write to the PIO, the WS2812 library would be written with the Pin interface |
13:18:49 | PMunch | If the Pico has a smarter way of interfacing with WS2812 in particular then that library could check if you're on a Pico and implement that logic |
13:19:40 | FromDiscord | <xflywind> The rest api works fine. I think I need to add "version" and "mm" switch. |
13:19:53 | FromDiscord | <xflywind> (edit) ""mm"" => ""gc"" |
13:20:02 | PMunch | Version? |
13:20:55 | FromDiscord | <xflywind> It seems to always use latest version now https://github.com/PMunch/nim-playground/blob/6ba37fdc07868b71734125eecc82b19d1bba13eb/src/nim_playground.nim#L202 |
13:21:22 | PMunch | @Rika, looking into PIO I see that it's quite different from the way AVR chips and such does things. That would certainly be it's own library |
13:21:24 | FromDiscord | <xflywind> Sorry, i misread it. |
13:21:30 | FromDiscord | <Rika> In reply to @PMunch "Well with a Pico": Sorry I don’t understand this |
13:21:42 | FromDiscord | <Rika> Yeah that’s the thing |
13:22:06 | PMunch | @xflywind, it just defaults to latest: https://github.com/PMunch/nim-playground/blob/6ba37fdc07868b71734125eecc82b19d1bba13eb/src/nim_playground.nim#L228 |
13:22:29 | PMunch | You can switch the version on the playground, so obviously that's supported :) |
13:22:33 | FromDiscord | <Zoom> @ShalokShalom\: In regards to all-caps consts.> Its something, I never understood why people are doing it.↵Well, constants are often used to parametrize the logic of the code. It could literally be the most important values in the program. It helps to clearly see from a short glance where all the uses are. Especially, if the rest of the code is the mix of caMel/PasCal case, and not just snake\_case, where even one PascalCase symbol pops up |
13:22:57 | FromDiscord | <xflywind> In reply to @PMunch "<@658563905425244160>, it just defaults": Thanks, I misread it. |
13:24:02 | PMunch | @Rika, the PIO system seems to be pretty novel and Pico specific. So either someone would write a ws2812-pio library, or a generic ws2812 library with `when ratelBoard == "pico"` and then have a PIO mode, otherwise default to a Pin based mode |
13:24:55 | FromDiscord | <Rika> In reply to @PMunch "<@259277943275126785>, the PIO system": It’s pico specific and you don’t really kinda need to write a library just for a protocol, usually a Nim file (to interface with the PIO machine) and a PIO assembly file would do |
13:25:11 | FromDiscord | <Rika> But I don’t know |
13:25:16 | FromDiscord | <Rika> Just a thought |
13:26:32 | PMunch | Not entirely sure what you mean |
13:27:47 | FromDiscord | <Rika> I guess the thought is how would these pin things integrate with external libraries |
13:31:52 | PMunch | Still not entirely sure what you mean, sorry |
13:32:56 | PMunch | Pin is literally just an object (which is passed around as static[Pin] so it never enters the code) which gets converted to low-level instructions on how to make pins low/high/input/output/pullup |
13:34:30 | PMunch | If you write a library that uses ratel you would program against these Pin objects and use high/low/input/output/pullup to do the things you needed to do. Then the definition of what actually happens when you call somePin.high() depends on the board you target, but the logic of the library should all be the same. |
13:35:59 | FromDiscord | <Rika> Just never mind I guess, since I’m not really thinking of using this library |
13:38:13 | FromDiscord | <Rika> Wonder if a pico can do video decoding |
13:39:16 | PMunch | Probably can, depending on the format of course |
13:39:42 | PMunch | I mean the digispark can also do "video decoding" as long as the video is encoded as a series of bytes to put into the buffer of a screen :P |
13:42:02 | FromDiscord | <xflywind> !eval echo "works" |
13:42:04 | NimBot | works |
13:42:38 | FromDiscord | <Rika> In reply to @PMunch "I mean the digispark": Was thinking of more crazy formats like AVC but it’s a stretch |
13:44:46 | FromDiscord | <demotomohiro> In reply to @federico3 "<@288750616510201856>\: you might want": I have added some questions/answers to Unofficial-FAQ from my Nim FAQ:↵https://internet-of-tomohiro.netlify.app/nim/faq.en.html |
13:46:53 | PMunch | @Rika, yeah I figured you meant something like that, I was just messing with you. I guess it might be possible, but probably not in realtime, and you wouldn't have enough storage to store much anyways |
13:47:03 | * | PMunch quit (Quit: Leaving) |
13:49:50 | FromDiscord | <demotomohiro> I think this question need to be fixed as Nim's standard libraries doesn't contains GUI or multi-media libraries.↵https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ#how-can-i-help |
14:04:00 | FromDiscord | <ambient> @Rika try MJPEG |
14:05:04 | FromDiscord | <ambient> it's relatively fast way to encode/decode video signal |
14:06:45 | FromDiscord | <Rika> I’ll look into that |
14:07:02 | FromDiscord | <Rika> A more popular format would be nice though, still; |
14:07:16 | FromDiscord | <ambient> MJPEG is very well supported in pretty much everywhere |
14:07:25 | FromDiscord | <ambient> you can open a stream directly in browser from a web address |
14:16:11 | * | arkurious joined #nim |
14:26:09 | FromDiscord | <Rika> I mean popular as in used |
14:26:18 | FromDiscord | <Rika> Not necessarily just supported |
14:28:35 | * | vicecea quit (Remote host closed the connection) |
14:29:06 | * | vicecea joined #nim |
14:33:10 | FromDiscord | <mratsim> In reply to @Rika "I mean popular as": what was your question |
14:34:35 | FromDiscord | <Rika> Popular video format that can be decoded in a microcontroller on the level of a pico |
14:35:53 | FromDiscord | <jmgomez> Hey guys, Im clueless. Any idea what can make this assertion to pass in clang? error: static_assert failed due to requirement 'int(char(-1)) == -1' ? |
14:36:43 | FromDiscord | <jmgomez> (edit) "Hey guys, Im clueless. Any idea what can make this assertion to pass in clang? error: static_assert failed due to requirement 'int(char(-1)) == -1' ?" => "sent a code paste, see https://play.nim-lang.org/#ix=3XFY" |
14:38:38 | FromDiscord | <demotomohiro> Is it mean `char` in clang is `unsigned` and `int(char(-1))` become 255? |
14:38:56 | FromDiscord | <ajusa> Weird question but is NPeg good? Like could it be used to parse HTML? |
14:39:30 | FromDiscord | <jmgomez> In reply to @demotomohiro "Is it mean `char`": No idea. Im trying to import a type from UE in Mac. It windows it work though |
14:39:42 | FromDiscord | <jmgomez> (edit) "work" => "works" |
14:40:19 | FromDiscord | <mratsim> In reply to @ajusa "Weird question but is": @zevv |
14:40:56 | FromDiscord | <Generic> wow til, char can indeed be signed and unsigned |
14:41:51 | FromDiscord | <Generic> you never stop learning C and C++ |
14:42:39 | FromDiscord | <mratsim> In reply to @Generic "wow til, char can": I'm actually wondering what the hell is a signed char |
14:42:53 | FromDiscord | <demotomohiro> In reply to @jmgomez "Hey guys, Im clueless.": Did you get that error from Nim generated C code? |
14:43:18 | FromDiscord | <jmgomez> No, Im making Nim bindings to UE |
14:43:46 | FromDiscord | <jmgomez> I got those while trying to import some basics types |
14:43:55 | FromDiscord | <Generic> In reply to @mratsim "I'm actually wondering what": idk I always assumed char was signed |
14:44:08 | FromDiscord | <jmgomez> I know it must be a either a Macro that Im skipping with UBT or a compiler option because it does work fine in win |
14:44:30 | FromDiscord | <jmgomez> UBT == Unreal Build Tool |
14:45:09 | FromDiscord | <mratsim> In reply to @jmgomez "I know it must": looks like a compiler test to make sure that char are unsigned, so use cschar instead of cuchar i think |
14:45:30 | FromDiscord | <Generic> no shouldn't it be the other way around |
14:46:01 | FromDiscord | <Generic> if int(char(-1)) == -1 is the assertion, it should fail if the sign extension doesn't happen i.e. the char type is unsigned |
14:46:20 | FromDiscord | <Generic> ? |
14:47:13 | FromDiscord | <demotomohiro> !eval echo int(cuchar(-1)) |
14:47:15 | NimBot | Compile failed: /usercode/in.nim(1, 16) Error: -1 can't be converted to cuchar |
14:47:56 | FromDiscord | <Generic> !eval echo int(cast[cuchar](-1)) |
14:47:59 | NimBot | 255 |
14:48:03 | FromDiscord | <jmgomez> yes! -fno-unsigned-char did the trick |
14:48:37 | FromDiscord | <jmgomez> thanks a bunch guys |
15:13:15 | FromDiscord | <jmgomez> sent a code paste, see https://paste.rs/2P4 |
15:28:44 | FromDiscord | <xflywind> In reply to @Zoom "For starters, it would": I don't know whether the function already exists. Anyway I make a first step toward that. |
15:28:50 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/974694715997958184/unknown.png |
15:29:03 | FromDiscord | <xflywind> (edit) "toward" => "towards" |
15:31:18 | FromDiscord | <xflywind> In reply to @PMunch "They would have to": I will add a run button for runnableexamples and it redirects to playground.nim.org/?code=... |
15:31:36 | FromDiscord | <xflywind> Basically what the Rust docs do. |
15:56:40 | FromDiscord | <jmgomez> In reply to @jmgomez "The linker gave me": Removed the linked library but it seems the project got into an inconsistent state and the error keep happening. is there a cache for the linker or somehing? (I did remove the .cache/nim dir) |
16:10:18 | * | joast joined #nim |
16:15:53 | * | duuude quit (Ping timeout: 248 seconds) |
16:22:07 | FromDiscord | <xflywind> In reply to @flywind "I don't know whether": Here is the PR => https://github.com/PMunch/nim-playground-frontend/pull/31 |
16:23:16 | * | duuude joined #nim |
16:26:51 | FromDiscord | <kiell> why is nim doc formatting being fat https://media.discordapp.net/attachments/371759389889003532/974709318710624366/Screen_Shot_2022-05-13_at_11.26.00_AM.png |
16:32:53 | FromDiscord | <jmgomez> how can one know the current compiled file? |
16:33:52 | FromDiscord | <jmgomez> I mean, the target of the nim command i.e nim c --run MyFile.nim |
16:35:14 | FromDiscord | <xflywind> https://nim-lang.org/docs/os.html#getAppFilename getAppFileName()..changeFileExt("nim") |
16:36:31 | FromDiscord | <Yardanico> In reply to @flywind "https://nim-lang.org/docs/os.html#getAppFilename ge": That's not going to work if you move the executable though |
16:37:00 | FromDiscord | <jmgomez> Also it isnt available in NimScript, is it? |
16:37:01 | FromDiscord | <Yardanico> https://nim-lang.org/docs/system.html#currentSourcePath.t is better |
16:37:54 | FromDiscord | <Yardanico> In reply to @jmgomez "Also it isnt available": Not sure how to do it in nimscript really |
16:38:28 | FromDiscord | <jmgomez> In reply to @Yardanico "https://nim-lang.org/docs/system.html#currentSource": but that gives you the actual source file where you are in what I need is the main file |
16:38:39 | FromDiscord | <Yardanico> well I mean you can call this from the main file |
16:39:23 | FromDiscord | <jmgomez> oh but I need it on config.nims because I have different targets and I moving the NimCache as part of the debugging Im doing for the post above |
16:39:50 | FromDiscord | <Yardanico> why not just --nimcache:folder ? |
16:39:58 | FromDiscord | <Yardanico> It'll put folder in CWD |
16:40:55 | FromDiscord | <jmgomez> Im trying to have all the options together in the conf file but I guess if there is no other option that could work.. |
16:41:28 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/nimscript.html#projectPath |
16:42:43 | FromDiscord | <Zoom> Great!↵(@xflywind) |
16:43:42 | FromDiscord | <jmgomez> In reply to @demotomohiro "https://nim-lang.org/docs/nimscript.html#projectPat": Thanks but that gives you the nimble file. Im using the same nimble file but different tasks and sharing the config file |
16:44:04 | FromDiscord | <jmgomez> As a work around I could use either what @Yardanico said or the custom defined options |
16:45:04 | FromDiscord | <Yardanico> Hm, but won't projectPath return what you need? |
16:45:29 | FromDiscord | <Yardanico> It returns path to the root of the project, so I assume it'll return the root of the project currently being compiled |
16:46:40 | FromDiscord | <xflywind> In reply to @Zoom "Great! (<@658563905425244160>)": Though I am not familar with js. It is so painful for me to patch nim docs. |
16:47:25 | FromDiscord | <xflywind> I believe nimib, nimibook, nim website, nim forum should benefit form it too. |
16:49:58 | FromDiscord | <jmgomez> In reply to @Yardanico "Hm, but won't projectPath": Oh yes, sorry I missread the output! Thanks for reiterating! |
16:54:25 | FromDiscord | <Yardanico> In reply to @flywind "Though I am not": There are also limits on how long a query string can be in different browsers and HTTP servers themselves |
16:54:29 | FromDiscord | <jmgomez> How nim uses the json that it generates? Im seeing linking options there but it doesnt seem to link with the linkcmd what caused the error in the first place |
16:54:33 | FromDiscord | <Yardanico> about playground links |
16:55:03 | * | tiorock joined #nim |
16:55:03 | * | tiorock quit (Changing host) |
16:55:03 | * | tiorock joined #nim |
16:55:03 | * | rockcavera is now known as Guest9055 |
16:55:03 | * | Guest9055 quit (Killed (mercury.libera.chat (Nickname regained by services))) |
16:55:03 | * | tiorock is now known as rockcavera |
17:05:20 | FromDiscord | <xflywind> In reply to @Yardanico "There are also limits": Yeah, I think that is less of a problem => https://stackoverflow.com/questions/812925/what-is-the-maximum-possible-length-of-a-query-string#:~:text=Although%20officially%20there%20is%20no,a%20max%20of%202048%20characters. |
17:05:39 | FromDiscord | <xflywind> (edit) "https://stackoverflow.com/questions/812925/what-is-the-maximum-possible-length-of-a-query-string#:~:text=Although%20officially%20there%20is%20no,a%20max%20of%202048%20characters." => "https://stackoverflow.com/questions/812925/what-is-the-maximum-possible-length-of-a-query-string" |
17:06:13 | FromDiscord | <Yardanico> I think some runnableExamples are longer 🤔 |
17:07:45 | FromDiscord | <xflywind> We can use post for bigger examples. |
17:09:04 | FromDiscord | <xflywind> I don't know how rust handle them, they seem to use query string for small example at least => https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Afn%20foo(n%3A%20usize)%20%7B%0A%20%20%20%20if%20let%20Some(_)%20%3D%20dbg!(n.checked_sub(4))%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20...%0A%20%20%20%20%7D%0A%7D%0A%0Afoo(3)%0A%7D&edition=2021 |
17:40:30 | FromDiscord | <Forest> Now I'm gonna be attempting to make a character creator in Nim with Raylib, this'll be fun- |
17:56:27 | FromDiscord | <hmmm> make sure your lib represents me well: red eyes, black hair, 1.95m, title: duke of the north, stats are maxed + plot armor |
17:58:08 | FromDiscord | <Rika> lol |
18:05:19 | * | stkrdknmibalz quit (Read error: Connection reset by peer) |
18:18:14 | FromDiscord | <Forest> Anyone know how to get Naylib working? :P |
18:18:23 | FromDiscord | <Forest> Cloned it from GitHub but Nake failed for some reason |
18:23:40 | FromDiscord | <eyecon> Why, why, why is it so hard to find anything in the official Nim docs /rant |
18:24:20 | FromDiscord | <eyecon> Can anyone give me a hint what exactly the {a: b} syntax does, maybe a link to the right page in the documentation? |
18:24:51 | FromDiscord | <eyecon> It's an array of 2-tuples IIRC, but wanted to look up |
18:26:32 | FromDiscord | <Forest> Says it has an invalid reference |
18:26:37 | FromDiscord | <Forest> "reference is not a tree" |
18:30:22 | FromDiscord | <Rika> In reply to @eyecon "Can anyone give me": https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor |
18:31:04 | FromDiscord | <planetis> In reply to @Forest ""reference is not a": is that a git error? |
18:33:42 | FromDiscord | <planetis> can you run the commands manually like:↵mkdir -p dist/raylib↵git clone --depth 1 https://github.com/raysan5/raylib.git↵git fetch && git checkout 4eb3d8857f1a8377f2cfa6e804183512cde5973e |
18:34:33 | FromDiscord | <planetis> I am going to remove nake eventually |
18:34:42 | FromDiscord | <planetis> make it a simple nim program |
18:35:07 | FromDiscord | <Forest> Ah fair |
18:35:14 | FromDiscord | <Forest> Why not an sh script? |
18:35:40 | FromDiscord | <planetis> I dont know bash |
18:35:44 | FromDiscord | <Forest> Fair |
18:37:05 | FromDiscord | <Zectbumo> In reply to @mratsim "I'm actually wondering what": how else would you make a signed byte? |
18:37:53 | FromDiscord | <Forest> In reply to @planetis "can you run the": says reference isn't a tree |
18:38:35 | FromDiscord | <Rika> In reply to @Forest "Cloned it from GitHub": Did you actually clone it and not the download zip button |
18:38:41 | FromDiscord | <Forest> yeah |
18:38:52 | FromDiscord | <Forest> with git clone :p |
18:38:54 | FromDiscord | <Rika> Huh |
18:40:31 | FromDiscord | <Forest> definitely is a valid commit tho |
18:40:37 | FromDiscord | <Forest> https://github.com/raysan5/raylib/commit/4eb3d8857f1a8377f2cfa6e804183512cde5973e |
18:41:04 | FromDiscord | <planetis> Yeah I just checked the same |
18:41:23 | FromDiscord | <Forest> oh isn't there a flag for fetching branch-like objects? |
18:41:56 | FromDiscord | <planetis> No idea |
18:42:01 | * | jmdaemon joined #nim |
18:44:22 | FromDiscord | <planetis> Can you got pull and then git checkout? |
18:44:24 | FromDiscord | <Forest> doesn't seem like it |
18:44:29 | FromDiscord | <Forest> sure |
18:44:53 | FromDiscord | <Forest> nope |
18:44:59 | FromDiscord | <Forest> didn't work, same error |
18:45:08 | FromDiscord | <Forest> `fatal: reference is not a tree: 4eb3d8857f1a8377f2cfa6e804183512cde5973e` |
18:45:56 | FromDiscord | <planetis> I think I should remove depth 1 from git clone.... |
18:46:04 | FromDiscord | <planetis> It must be it |
18:46:07 | FromDiscord | <Forest> lemme try that |
18:46:45 | FromDiscord | <Forest> iirc there's also a command to pull from a branch while cloning, i'll try that next if this doesn't work |
18:46:59 | FromDiscord | <Forest> this'll take ages rip |
18:48:37 | FromDiscord | <Forest> 70 mb and at 30%... yikes |
18:49:54 | FromDiscord | <planetis> You can do depth 20 or something |
18:50:19 | FromDiscord | <planetis> It used to work because I always kept it up to date |
18:50:29 | FromDiscord | <Forest> fair but not super reliable |
18:50:39 | FromDiscord | <planetis> But recently someone rewrote the parser |
18:50:59 | FromDiscord | <planetis> And I haven't updated it yet |
18:52:07 | FromDiscord | <Forest> understandable |
18:53:03 | FromDiscord | <Forest> git is taking too long holy crap |
18:53:19 | FromDiscord | <Forest> would downloading the zip from that commit work? |
18:54:37 | FromDiscord | <planetis> If you comment out fetchLatestRaylib |
18:55:00 | FromDiscord | <planetis> I should provide this option, good idea |
18:55:12 | FromDiscord | <Forest> In reply to @planetis "If you comment out": wdym? |
18:57:39 | FromDiscord | <Forest> figured it out i think |
18:58:46 | FromDiscord | <Forest> testing it rn |
18:59:46 | FromDiscord | <planetis> You don't need to call make wrap |
18:59:51 | FromDiscord | <planetis> Just make build |
18:59:59 | FromDiscord | <planetis> (edit) "make" => "nake" |
19:00:05 | FromDiscord | <planetis> (edit) "make" => "nake" |
19:00:09 | FromDiscord | <Forest> i don't do that :p |
19:00:39 | FromDiscord | <Forest> i haven't figured it out, by the love of god this takes forever |
19:00:48 | FromDiscord | <Forest> In reply to @planetis "If you comment out": i'll just do this |
19:01:32 | FromDiscord | <planetis> I should decouple what I use for development and the user install |
19:01:37 | FromDiscord | <Forest> fair |
19:03:00 | FromDiscord | <Forest> okay now this is working |
19:03:13 | FromDiscord | <Forest> to get the zip i used this url: https://github.com/raysan5/raylib/archive/4eb3d8857f1a8377f2cfa6e804183512cde5973e.zip |
19:08:12 | FromDiscord | <Forest> Btw the example on your readme with defer gives this: ` Error: defer statement not supported at top level` |
19:20:11 | FromDiscord | <planetis> Yeah I know |
19:20:12 | FromDiscord | <planetis> Always use main, aarc is buggy |
19:20:12 | FromDiscord | <Forest> `main` as the gc? |
19:20:13 | FromDiscord | <planetis> main proc |
19:20:13 | FromDiscord | <Forest> ah okay |
19:20:13 | FromDiscord | <planetis> No since I use destructors it's basically the same |
19:22:54 | * | duuude quit (Ping timeout: 252 seconds) |
19:30:48 | * | duuude joined #nim |
19:44:47 | * | omanom left #nim (The Lounge - https://thelounge.chat) |
20:06:14 | NimEventer | New Nimble package! emitter - Supranim's Event Emitter - Subscribe & listen for various events within your application, see https://github.com/supranim/emitter |
20:21:58 | * | jmd_ joined #nim |
20:21:59 | * | jmdaemon quit (Ping timeout: 240 seconds) |
21:15:15 | FromDiscord | <Elegantbeef> @Andreas\: the reason you need to do all the work about with types + destructors is cause of intentional limitations, i dont know why they exist but they do |
21:18:38 | FromDiscord | <Andreas> @ElegantBeef as we speak - thats excatly what i though - ok, lets stop making fun of each other - i'm doing smth. stupid, at least i assume that, so pls. help improve myself on this problem 🙂 |
21:18:51 | FromDiscord | <Andreas> (edit) "though" => "thought" |
21:19:02 | FromDiscord | <Elegantbeef> What |
21:20:21 | FromDiscord | <Andreas> In reply to @Elegantbeef "What": are u serious ? that my simple code-example, is a 'intemtional' limitation of the language ? |
21:20:45 | FromDiscord | <Andreas> (edit) "'intemtional' limitation" => "'intemtional-limitation'" |
21:21:35 | FromDiscord | <Elegantbeef> The language only allows destructors for `object` or `distinct T` which is a limitation |
21:21:59 | FromDiscord | <Andreas> In reply to @Elegantbeef "The language only allows": oh, ok i did not knew that. |
21:22:22 | FromDiscord | <Andreas> (edit) "In reply to @Elegantbeef "The language only allows": oh, ok i did not knew that. ... " added "ty" |
21:22:30 | FromDiscord | <Recruit_main707> assert is now also checked even with `-d:release/danger`? |
21:22:44 | * | duuude quit (Ping timeout: 248 seconds) |
21:22:55 | FromDiscord | <Elegantbeef> assert is checked in release |
21:22:57 | FromDiscord | <exelotl> wait you can make destructors for `distinct T` for any `T` ? :o |
21:23:04 | FromDiscord | <Elegantbeef> Yes |
21:28:25 | FromDiscord | <Prestige> I didn't expect that |
21:28:46 | FromDiscord | <Prestige> So you could do `type Foo = distinct reg object` ? |
21:28:52 | FromDiscord | <Prestige> (edit) "reg" => "ref" |
21:29:19 | FromDiscord | <Prestige> (and get a destructor for Foo) |
21:29:19 | FromDiscord | <Elegantbeef> Yes |
21:29:22 | FromDiscord | <Prestige> Wow |
21:29:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XHf |
21:30:03 | FromDiscord | <exelotl> :( |
21:30:11 | FromDiscord | <Elegantbeef> Think it's a bug |
21:30:36 | FromDiscord | <Elegantbeef> But i'm 99.99% certain it's a bug |
21:30:37 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/DiN |
21:31:37 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XHi |
21:31:50 | FromDiscord | <Elegantbeef> So seems it's an issue with lambda lifting on builtin types |
21:32:35 | FromDiscord | <Elegantbeef> Yea distinct built in types does not seem to work, so probably a bug |
21:33:38 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XHj |
21:36:56 | FromDiscord | <planetis> I know it works for distinct pointer |
21:47:19 | * | jjido joined #nim |
22:02:43 | * | duuude joined #nim |
22:20:58 | * | firq quit (Ping timeout: 260 seconds) |
22:33:22 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
22:38:28 | * | ltriant quit (Ping timeout: 260 seconds) |
22:40:42 | FromDiscord | <Alea> sent a code paste, see https://play.nim-lang.org/#ix=3XHv |
22:46:14 | FromDiscord | <Elegantbeef> Why not |
22:46:37 | * | noeontheend joined #nim |
22:50:26 | FromDiscord | <huantian> why does everyone hate on post def docstrings |
22:50:35 | FromDiscord | <Elegantbeef> Python |
22:52:52 | FromDiscord | <huantian> really just cus python uses it everyone thinks its bad |
22:53:14 | FromDiscord | <huantian> 😔 |
22:53:21 | FromDiscord | <Elegantbeef> The big issue imo is the runnable examples imo |
22:53:24 | FromDiscord | <Elegantbeef> 😛 |
22:55:19 | FromDiscord | <Prestige> I don't like runnable examples either |
22:55:27 | FromDiscord | <Prestige> imo they should just be backed by tests |
22:55:46 | FromDiscord | <Elegantbeef> Eh they're different things |
23:02:04 | FromDiscord | <Prestige> Indeed |
23:02:37 | FromDiscord | <Prestige> but unit tests should be sufficient enough to show you how to use a function |
23:03:28 | * | droidrage joined #nim |
23:03:44 | FromDiscord | <Elegantbeef> Eh unit tests can be but, it's still much better imo to have runnable examples as the idea is to show the entire way of using it |
23:04:48 | * | qwestion joined #nim |
23:05:37 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Eh unit tests can": i think runnableExamples are the best thing nim documentation has↵contrary to most docs you can see how to use it and since they're ran when creating the docs they must work |
23:05:46 | FromDiscord | <!Patitotective> (edit) "it" => "a proc" |
23:06:04 | FromDiscord | <!Patitotective> In reply to @Alea "why on earth are": both should be valid |
23:10:28 | * | duuude quit (Ping timeout: 248 seconds) |
23:14:32 | * | ltriant joined #nim |
23:23:01 | * | duuude joined #nim |
23:37:45 | * | mahlon joined #nim |
23:45:20 | * | rockcavera quit (Remote host closed the connection) |
23:51:32 | * | duuude quit (Ping timeout: 248 seconds) |