<< 13-05-2022 >>

00:04:26FromDiscord<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:45FromDiscord<Elegantbeef> Yea there's an issue it's related to new ubuntu updating ssl
00:04:56FromDiscord<Elegantbeef> The solution is a flatpak or more agressive maintance
00:06:29FromDiscord<⎝⪩﹏⪨⎠> There's a solution: use a previous version of OpenSSl.
00:06:47FromDiscord<Elegantbeef> Flatpak is a better solution imo as it makes it work everywhere
00:06:48FromDiscord<⎝⪩﹏⪨⎠> But the creator (like me) wants choosenim to work out of the box.
00:10:50FromDiscord<!Patitotective> In reply to @⎝⪩﹏⪨⎠ "Because choosenim buggy in": :[
00:18:32*duuude quit (Ping timeout: 252 seconds)
00:21:02FromDiscord<⎝⪩﹏⪨⎠> Solved.
00:21:22FromDiscord<⎝⪩﹏⪨⎠> I built it like the official page said.
00:21:40FromDiscord<⎝⪩﹏⪨⎠> And added the path to the binaries to my $PATH.
00:23:08FromDiscord<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:35FromDiscord<Elegantbeef> You need hash and `==`
00:23:44FromDiscord<Prestige> ah, thanks
00:24:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDe
00:24:22FromDiscord<Prestige> even easier
00:24:33FromDiscord<Elegantbeef> Borrow generally works, but for complex distincts it fails
00:24:45FromDiscord<⎝⪩﹏⪨⎠> Well, now I need 2 things:↵- A good programming tutorial↵- A good Nim tutorial
00:25:00FromDiscord<⎝⪩﹏⪨⎠> Because Nim's official "tutorials" suck.
00:25:00FromDiscord<Elegantbeef> I've fixed most issues with it, but there are edge cases i've not been able to fix
00:25:24FromDiscord<Elegantbeef> https://ssalewski.de/nimprogramming.html
00:27:38FromDiscord<Prestige> That really is a wall of text isn't it
00:29:56FromDiscord<Elegantbeef> It's but it explains Nim in quite some depth
00:31:04*vicfred quit (Quit: Leaving)
00:46:57FromDiscord<!Patitotective> sent a code paste, see https://paste.rs/4RJ
00:47:17FromDiscord<!Patitotective> ImTemplate v2.0 is closer
00:59:18*slowButPresent quit (Quit: arg)
01:00:40FromDiscord<!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:02FromDiscord<!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:08FromDiscord<Elegantbeef> Why are you compiling with the cstring conv warning off
01:12:28FromDiscord<!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:47FromDiscord<Elegantbeef> I'd say yes
01:12:59FromDiscord<!Patitotective> does it cause problems or? 🤨
01:14:07FromDiscord<Elegantbeef> Well it will eventually
01:15:26FromDiscord<!Patitotective> hehe thanks
01:22:56FromDiscord<!Patitotective> its really annoying for cases like `"##" & name` cause i need to put parenthesis :[
01:26:05FromDiscord<!Patitotective> like `("##" & name).cstring` (no `cstring("##" & name)`)
01:27:06FromDiscord<!Patitotective> why `del` does not support `BackwardsIndex`? https://nim-lang.org/docs/system.html#del%2Cseq%5BT%5D%2CNatural
01:29:20FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDo
01:30:04FromDiscord<!Patitotective> SmartBeef
01:37:44FromDiscord<Elegantbeef> My wasm knowledge is expanding eventually i'll actually know what i'm doing 😄
01:37:53FromDiscord<!Patitotective> for buffers i should define them as cstrings instead of converting them, right?
01:38:14FromDiscord<Elegantbeef> What are you doing?
01:38:26FromDiscord<Elegantbeef> Personally i avoid manually making Cstrings
01:38:57FromDiscord<!Patitotective> i mean for inputText buffers https://nimgl.dev/docs/imgui.html#igInputText%2Ccstring%2Ccstring%2Cuint%2CImGuiInputTextFlags%2CImGuiInputTextCallback%2Cpointer
01:39:15FromDiscord<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:30FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3XDp
01:44:44FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3XDp" => "https://paste.rs/Ybu"
01:47:15FromDiscord<Elegantbeef> Works fine
01:47:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDr
01:50:49FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDt
01:51:24FromDiscord<huantian> In reply to @Elegantbeef "My wasm knowledge is": no way beef knowing what he's doing
01:51:36FromDiscord<Elegantbeef> Yea it's hard to believe
01:51:55FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/974489132279664700/image.png
01:51:55FromDiscord<Elegantbeef> But look at this
01:52:19FromDiscord<Elegantbeef> It just works! 😛
01:52:20FromDiscord<huantian> that's a lot of getValue
01:52:32FromDiscord<Elegantbeef> Yea `global -> WasmValue`
01:52:53FromDiscord<Elegantbeef> I'm going to make a generic variant that means i can just do `getValue` once
01:54:40FromDiscord<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:53FromDiscord<Elegantbeef> What?
01:57:29FromDiscord<Andreas> In reply to @Elegantbeef "What?": `expression '' has no type (or is ambiguous)`
01:57:58FromDiscord<Elegantbeef> What's your code
01:57:58FromDiscord<Elegantbeef> I cannot play guess the code
01:57:58FromDiscord<Elegantbeef> It's the wrong time of the day for that
01:57:59FromDiscord<Andreas> (edit) "ambiguous)`" => "ambiguous)`↵Maybe i need to restart VScode ? strange msgs"
01:58:37FromDiscord<Andreas> sent a code paste, see https://paste.rs/7tU
01:58:51FromDiscord<Elegantbeef> And what's your `Node()` type?
01:59:02FromDiscord<Andreas> (edit) "https://paste.rs/v7c" => "https://play.nim-lang.org/#ix=3XDv"
02:00:35FromDiscord<Andreas> The one from above - it about the generic-body smth.. https://discord.com/channels/371759389889003530/371759389889003532/974485945921445898
02:01:38FromDiscord<Elegantbeef> Yes the issue is you dont have generic types
02:01:59FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDy
02:06:02FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3XDz
02:07:06*kayabaNerve joined #nim
02:08:17FromDiscord<Elegantbeef> The generics might cause an issue here
02:10:23FromDiscord<Zectbumo> how do you get the next/first from an iterator?
02:10:28FromDiscord<Zectbumo> (and discard the rest)
02:10:46FromDiscord<Elegantbeef> `break` if it's an inline iterator
02:10:46FromDiscord<Zectbumo> or rather, not consume them
02:10:54FromDiscord<Elegantbeef> Otherwise you steal code from my closures part of slicerator
02:11:18FromDiscord<Elegantbeef> https://github.com/beef331/slicerator/blob/master/src/closures.nim#L60-L103
02:12:28FromDiscord<Andreas> `object constructor needs an object type [genericInvocation]`↵what is meant here with , needs a `[proxy]`
02:12:38FromDiscord<Elegantbeef> It means you dont have generic parameters
02:12:56*vicfred joined #nim
02:13:51FromDiscord<Andreas> In reply to @Elegantbeef "It means you dont": greatm ty,,, concrete types did it :>
02:13:59FromDiscord<Andreas> (edit) "greatm" => "great"
02:14:14FromDiscord<Elegantbeef> It did?
02:16:23FromDiscord<Elegantbeef> I'm interested in seeing your code cause i cannot get it to work
02:17:01FromDiscord<Andreas> sent a code paste, see https://paste.rs/TLE
02:17:19FromDiscord<Elegantbeef> you shouldnt need the `kind:`
02:17:43FromDiscord<Elegantbeef> you should be able to do `typeof(Node[int, string]()[])`
02:22:27FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDB
02:22:36FromDiscord<Elegantbeef> But you have to use `NodeImpl` as a constructor sadly
02:52:14FromDiscord<Prestige> Elegantbeef you should do more nim tutorials/articles like the macros one
02:55:05FromDiscord<!Patitotective> BeefTuber
02:57:21*arkurious quit (Quit: Leaving)
02:59:13FromDiscord<Prestige> He's learned a lot of things about Nim that I don't even know where to look to find
03:01:39FromDiscord<Elegantbeef> I'll consider it if i can get you to write an AI for my WASM testing project 😛
03:02:14FromDiscord<Prestige> Perhaps, what do you need?
03:02:46FromDiscord<Elegantbeef> My wasm test project is going to be a programmer vs programmer AI project
03:03:13FromDiscord<Elegantbeef> With a bit of query logic try to make the best AI you can
03:04:38FromDiscord<Prestige> I'd be down to give it a shot
03:08:07FromDiscord<Zectbumo> I'm not understanding iterators. where am I going wrong? https://play.nim-lang.org/#ix=3XDG
03:08:25FromDiscord<Elegantbeef> The first is an inline iterator
03:08:46FromDiscord<Elegantbeef> The way inline iterators work means you treat them like templates
03:09:45FromDiscord<Elegantbeef> is the silly way we support this
03:09:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDH
03:19:21FromDiscord<Zectbumo> well, I haven't gotten to templates yet... :/
03:19:52FromDiscord<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:57FromDiscord<Zectbumo> I got that part, I just don't know what a template is. I'll have to study that now
03:22:42FromDiscord<Elegantbeef> It's code that is expanded at the callsite
03:22:51FromDiscord<Elegantbeef> So you can think of them as sophisticated copy paste
03:23:00FromDiscord<Zectbumo> wouldn't that be inline?
03:23:17FromDiscord<Elegantbeef> No, they're certainly pasted at the callsite and can be complex statements
03:23:23FromDiscord<Elegantbeef> It's akin to inline but not the same
03:23:39FromDiscord<Zectbumo> like const?
03:23:55FromDiscord<Elegantbeef> Sort of but they can be complex
03:24:08FromDiscord<Zectbumo> one day all this will come together for me
03:24:23FromDiscord<Elegantbeef> They're kinda like C's macros
03:24:34FromDiscord<Zectbumo> I get C macros
03:24:40FromDiscord<Zectbumo> templates are?
03:24:47FromDiscord<Elegantbeef> There we go, they're like those but smareter
03:25:18FromDiscord<Elegantbeef> Unlike C macros you can have templates that only accept specific types and also can take blocks of code
03:25:43FromDiscord<Zectbumo> very cool. I like smart macros. probably with better rules too. c macros get unruly
03:26:52FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDK
03:26:54FromDiscord<Elegantbeef> Damn it
03:27:30FromDiscord<Elegantbeef> There we go
03:27:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XDL
03:28:40FromDiscord<Zectbumo> that's what I imagined. c macros can't do
03:29:02FromDiscord<Elegantbeef> Yep they're type safe on dispatch which makes them more flexible
03:30:40FromDiscord<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:41FromDiscord<huantian> nim templates are also hygenic
03:30:53FromDiscord<Elegantbeef> procs cannot take `iterable`
03:31:14FromDiscord<Elegantbeef> Like i said inline iterators are practically pasted at the callsite so you cannot pass them to things at runtime
03:31:18FromDiscord<Zectbumo> oh that's one change you made I didn't realize
03:31:41FromDiscord<Zectbumo> I made it a {.closure.} is that not a non-inline?
03:32:00FromDiscord<Elegantbeef> Indeed
03:33:17FromDiscord<huantian> are closure iterators first class?
03:34:07FromDiscord<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:50FromDiscord<Elegantbeef> Yes they are huan
03:41:07FromDiscord<Zectbumo> sent a long message, see https://paste.rs/eNQ
03:41:11FromDiscord<Zectbumo> (edit) "long message," => "code paste," | "http://ix.io/3XDO" => "https://play.nim-lang.org/#ix=3XDN"
03:41:11FromDiscord<Zectbumo> how do you get nim syntax in discord?
03:41:26FromDiscord<Elegantbeef> nim after the three ticks
03:41:35FromDiscord<Zectbumo> oh after
03:41:50FromDiscord<Zectbumo> (edit) "https://play.nim-lang.org/#ix=3XDN" => "https://play.nim-lang.org/#ix=3XDP"
03:41:55FromDiscord<Zectbumo> (edit) "https://play.nim-lang.org/#ix=3XDP" => "https://paste.rs/dSN"
03:42:30FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=
03:42:42FromDiscord<demotomohiro> nvm
03:43:09FromDiscord<Zectbumo> oh I can : auto a proc. nice
03:43:36FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=3XDQ
03:44:42FromDiscord<demotomohiro> There is no way to show 3 ticks on discord?
03:50:20FromDiscord<Zectbumo> \`\`\`
03:51:03FromDiscord<Zectbumo> \\\`\\\`\\\`
03:55:38FromDiscord<demotomohiro> @Zectbumo Thank you!
03:56:10FromDiscord<demotomohiro> \`\`\`nim↵echo "test"↵\`\`\`
04:04:02FromDiscord<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:31FromDiscord<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:55FromDiscord<Elegantbeef> In most cases you want inline
04:06:39FromDiscord<Elegantbeef> Ideally the distinction isnt needed but alas
04:14:19FromDiscord<demotomohiro> Closure iterator has some limitation. It cannot be used at compile time and on JS backend.
04:18:49FromDiscord<SirElephant> is there a bot to run nim code in discord?
04:22:03FromDiscord<huantian> !eval echo “hi”
04:22:05NimBotCompile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: '“hi”'
04:22:17FromDiscord<huantian> Close enough
04:25:56FromDiscord<SirElephant> hmmm
04:26:08FromDiscord<SirElephant> In reply to @NimBot "Compile failed: /usercode/in.nim(1, 6)": why u gib eror
04:26:10FromDiscord<demotomohiro> !eval echo "hello nim"
04:26:13NimBothello nim
04:26:31FromDiscord<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:48FromDiscord<byt3bl33d3r> stuck on what to do with the PAM_EXTERN defition
04:26:53FromDiscord<byt3bl33d3r> (edit) "defition" => "definition"
04:26:54FromDiscord<SirElephant> sent a code paste, see https://paste.rs/zc7
04:27:04FromDiscord<SirElephant> bruh mometn
04:28:10FromDiscord<huantian> In reply to @SirElephant "why u gib eror": I’m on mobile lol
04:30:45FromDiscord<SirElephant> can't it run multiple line programs?
04:32:11FromDiscord<xflywind> !eval let x = 12; echo x
04:32:23FromDiscord<SirElephant> wierd
04:32:55FromDiscord<demotomohiro> @byt3bl33d3r What PAM_EXTERN do? Export the function from shared library?
04:33:27FromDiscord<byt3bl33d3r> sent a code paste, see https://paste.rs/uLY
04:34:45FromDiscord<byt3bl33d3r> not sure if this is the equivalent of exportc?
04:36:34FromDiscord<demotomohiro> It says it isn't needed anymore. So probably exportc pragma would be fine.
04:37:40FromDiscord<demotomohiro> !eval echo 4 shl -1
04:39:06FromDiscord<demotomohiro> In C, bit shift with negative width is undefined behavor. Maybe Nim should it compile/runtime error.
04:43:27FromDiscord<SirElephant> sent a long message, see https://paste.rs/muc
04:44:22FromDiscord<SirElephant> (edit) "http://ix.io/3XDX" => "https://paste.rs/jNH"
04:45:09FromDiscord<SirElephant> bruh
04:45:23FromDiscord<huantian> just use the nim playground and send us the link
04:45:44FromDiscord<SirElephant> In reply to @huantian "just use the nim": oke
04:46:23FromDiscord<SirElephant> https://play.nim-lang.org/#ix=3XDY
04:46:30FromDiscord<SirElephant> wow
04:46:42FromDiscord<SirElephant> how are these online compilers made?
04:48:38FromDiscord<demotomohiro> @SirElephant https://github.com/PMunch/nim-playground-frontend
04:53:47*slowButPresent quit (Quit: sleep)
05:05:41FromDiscord<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:13FromDiscord<huantian> oh cool i'll tray that
05:11:20*ltriant joined #nim
05:12:11*ltriant_ quit (Ping timeout: 246 seconds)
05:13:58FromDiscord<uncle jim> is there a documentation for `dimscord`?
05:16:53FromDiscord<huantian> https://krisppurg.github.io/dimscord/dimscord.html
05:17:06FromDiscord<huantian> you can find it here https://media.discordapp.net/attachments/371759389889003532/974540768180076564/unknown.png
05:18:30FromDiscord<uncle jim> In reply to @huantian "you can find it": thenks
05:21:25*rockcavera quit (Remote host closed the connection)
05:32:30FromDiscord<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:53FromDiscord<Prestige> Why can't you grep for it?
05:35:41FromDiscord<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:23FromDiscord<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:48FromDiscord<Rika> There’s a supplied tool nimgrep
05:48:43*sagax quit (Ping timeout: 256 seconds)
06:13:33FromDiscord<Prestige> In reply to @kaddkaka "If there is a": well same spelling but yeah, could just nimgrep. Or, use regex
06:15:20FromDiscord<Rika> Using regex would be relatively difficult because you would need to insert _? after every letter
06:15:28FromDiscord<Rika> Until the end of course
06:16:26FromDiscord<Prestige> Yeah but you could write a helper function for it
06:16:32FromDiscord<Prestige> but then again, one exists
06:33:05*GreaseMonkey quit (Remote host closed the connection)
06:40:00FromDiscord<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:13FromDiscord<kaddkaka> (edit) "o↵plug" => "plug"
06:41:39*jjido joined #nim
06:44:52*sagax joined #nim
06:46:02FromDiscord<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:11FromDiscord<Prestige> If something similar hasn't already been posted
06:52:05FromDiscord<uncle jim> In reply to @kaddkaka "But I would also": fish is the worst name for a shell
06:52:25FromDiscord<uncle jim> what were they thinking when they named it "fish"
06:52:38FromDiscord<Elegantbeef> It ends with sh
06:52:55FromDiscord<uncle jim> In reply to @Elegantbeef "It ends with sh": 0_0
06:53:43FromDiscord<Prestige> Fish kinda sucks too
06:53:49FromDiscord<Elegantbeef> Fuuuck something with destructors and wasmedge causes my framework not to work
06:54:02FromDiscord<uncle jim> In reply to @Avahe "Fish kinda sucks too": https://tenor.com/view/true-shorty-scary-movie-smoke-gif-15464844
06:54:02FromDiscord<Elegantbeef> Eh i've been using it and really enjoying it's auto complete
06:54:35FromDiscord<uncle jim> In reply to @Elegantbeef "Eh i've been using": huh thats nothing, even i auto-complete my PT teachers
06:55:32FromDiscord<uncle jim> `fish - the friendly interactive shell`'
06:55:37FromDiscord<uncle jim> (edit) "shell`'" => "shell`"
06:55:44FromDiscord<uncle jim> https://tenor.com/view/dies-from-cringe-pink-skull-cgi-render-gif-23154103
06:55:51FromDiscord<Prestige> You can get autocomplete in zsh
06:56:03FromDiscord<Elegantbeef> That's not really the point now is it
06:56:22FromDiscord<Prestige> I think so
06:56:26FromDiscord<Elegantbeef> It's got nice autocomplete out of the box is the benefit i proposed
06:56:49FromDiscord<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:01FromDiscord<Prestige> Having some nice features ootb is nice, but it falls short otherwise
06:57:10FromDiscord<Elegantbeef> Works fine for me
06:57:58FromDiscord<katlyn> aside from the posix stuff it works great for me too, I've had a hard time moving to other shells
06:58:48FromDiscord<Prestige> I'm a bit anal about my workflow
06:59:04FromDiscord<uncle jim> In reply to @katlyn "aside from the posix": pwsh
06:59:05FromDiscord<Prestige> I still need to write my own terminal but I haven't dedicated the time
06:59:33FromDiscord<uncle jim> In reply to @Avahe "I still need to": name it `pUwUsh`
06:59:40FromDiscord<Prestige> Oh god no
06:59:45FromDiscord<uncle jim> In reply to @Avahe "Oh god no": lol
07:00:18FromDiscord<Prestige> I'd probably call it nish, pronounced niche, Nim Interactive Shell
07:00:36FromDiscord<Prestige> Or maybe just make some crap up
07:00:36FromDiscord<uncle jim> In reply to @Avahe "I'd probably call it": naaaah, `pUwUsh` is still better
07:01:07FromDiscord<Elegantbeef> clearly you go nimpish
07:01:25FromDiscord<uncle jim> or `nimfish`
07:01:26FromDiscord<Prestige> That's good
07:01:36FromDiscord<Prestige> Beef's I mean
07:01:41FromDiscord<Elegantbeef> This sigabrt is going to make me axe people
07:01:56FromDiscord<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:19FromDiscord<Prestige> Lol
07:02:54FromDiscord<Elegantbeef> My destructors are not called but just the act of having them exist causes my program to crash
07:03:18FromDiscord<Prestige> At runtime?
07:03:26FromDiscord<Elegantbeef> Yes
07:03:31FromDiscord<Prestige> That's.. odd
07:03:39FromDiscord<Elegantbeef> I've clearly fucked something up with wasmedge methinks
07:03:43FromDiscord<uncle jim> In reply to @Avahe "That's.. odd": really....odd
07:04:42FromDiscord<Prestige> Elegantbeef I want your opinion on some API design for my custom input events in my game engine
07:04:48FromDiscord<Prestige> https://github.com/einheit-tech/shade/blob/input-callback-improvements/examples/platformer/platformer_example.nim#L175 thoughts?
07:04:51FromDiscord<Elegantbeef> Ruh roh
07:05:12FromDiscord<Prestige> I've tried a few different ways and I'm unsatisfied
07:05:15FromDiscord<Elegantbeef> My eyes might be decieving me but are those strings
07:06:00FromDiscord<Elegantbeef> I'm a simple man prestige i generally just do a poll in the main loop
07:07:13FromDiscord<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:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XEd
07:13:49FromDiscord<Rika> When it comes to fish, I think it being not posix compliant is both it’s best and worst feature
07:14:30FromDiscord<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:25FromDiscord<uncle jim> sent a code paste, see https://play.nim-lang.org/#ix=3XEe
07:19:37FromDiscord<uncle jim> i am getting the error at `discord.api.sendMessage`
07:22:06FromDiscord<Prestige> Not on my computer to check, but the example may be outdated
07:22:23FromDiscord<Elegantbeef> The error you're getting would help
07:23:32FromDiscord<uncle jim> https://media.discordapp.net/attachments/371759389889003532/974572588024102912/Screenshot_1309.png
07:23:34FromDiscord<uncle jim> DIS
07:23:47FromDiscord<Elegantbeef> give the compiler error
07:23:50FromDiscord<Elegantbeef> Not the list of errors
07:24:07FromDiscord<Elegantbeef> line 26 is the first error
07:24:10FromDiscord<Elegantbeef> Too many arguments
07:24:19FromDiscord<uncle jim> sent a long message, see http://ix.io/3XEf
07:24:29FromDiscord<uncle jim> (edit) "long message," => "code paste," | "http://ix.io/3XEf" => "https://paste.rs/UiR"
07:24:40FromDiscord<Elegantbeef> There you go
07:24:57FromDiscord<uncle jim> In reply to @Elegantbeef "line 26 is the": it's the only error
07:24:59FromDiscord<Elegantbeef> arg 3 should be `seq[Embed]` but you passed `Option[seq[Embed]]`
07:25:06FromDiscord<Elegantbeef> remove the `some` on that seq
07:25:09FromDiscord<Elegantbeef> Problem solved
07:25:11FromDiscord<uncle jim> In reply to @Elegantbeef "arg 3 should be": not me
07:25:22FromDiscord<Elegantbeef> Dont get defensive
07:25:34FromDiscord<uncle jim> In reply to @Elegantbeef "Dont get defensive": jk
07:27:36FromDiscord<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:42FromDiscord<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:51FromDiscord<Elegantbeef> You put the bot token in?
07:32:59FromDiscord<Elegantbeef> Ok so something fishy is going on here
07:33:13FromDiscord<uncle jim> In reply to @Elegantbeef "You put the bot": no i didnt
07:33:23FromDiscord<uncle jim> you get it from discord right?
07:34:19FromDiscord<Elegantbeef> Hmm i wonder if linking with `-l` is interfering with Nim's `dynlib` linking
07:36:11FromDiscord<Rika> In reply to @kaddkaka "Almost all tools have": I guess, but I don’t think it’s an issue personally
07:36:26FromDiscord<Rika> Opinion thing so eh
07:37:31FromDiscord<kaddkaka> Yeah. I don't have any strong opinion
07:42:57FromDiscord<uncle jim> @ElegantBeef ok so i have got the `bot token` and added it to the `newDiscordClient()`. What now?
07:43:50FromDiscord<uncle jim> how do i add it to my server
07:46:33FromDiscord<Elegantbeef> Through discord
07:47:02FromDiscord<uncle jim> In reply to @Elegantbeef "Through discord": bruh
07:49:26FromDiscord<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:22FromDiscord<uncle jim> 😢
07:51:27FromDiscord<uncle jim> 😢
07:51:28FromDiscord<uncle jim> 😢
07:52:36FromDiscord<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:42FromDiscord<uncle jim> In reply to @Elegantbeef "I'm not here to": i got it
07:53:21FromDiscord<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:26FromDiscord<Zectbumo> how does one convert a seq to a tuple?
08:03:44FromDiscord<Elegantbeef> There is not seq unpacking in vanilla nim you need to do it manually
08:03:53FromDiscord<Elegantbeef> There are macros that add it though
08:04:04FromDiscord<Zectbumo> aw
08:04:22FromDiscord<Zectbumo> well, this makes database not fun
08:04:55FromDiscord<Elegantbeef> Can always use https://metagn.github.io/assigns/assigns.html#examples
08:05:13*ltriant quit (Ping timeout: 260 seconds)
08:05:48FromDiscord<Zectbumo> that does look nice
08:05:55PMunchHmm, 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:26FromDiscord<Elegantbeef> I have not response to that pmunch, too busy trying to figure out this sigabrt bug
08:06:33FromDiscord<Elegantbeef> I blame you
08:06:47PMunchMe? What did I do to create a sigabtr?
08:07:18FromDiscord<Elegantbeef> I'm using the wasm runtime i wrapped with futhark and using it causes sdl2 to crash on window creation
08:07:22FromDiscord<Elegantbeef> So clearly it's a you problem
08:07:47PMunchHmm, certainly sounds like something that might be my problem :P
08:08:07PMunchIf Futhark has messed up the wrappers
08:08:09FromDiscord<Elegantbeef> I've tried to min repo it but it worked, so i dunno
08:08:23PMunchAh, that makes it slightly less likely
08:08:26FromDiscord<Elegantbeef> I'm not even using any of the code i'm using a single type def
08:08:41FromDiscord<Elegantbeef> The mere act of adding destructors to these types seems to causue it
08:08:42PMunchBut it could still be something like a type being slightly too large or too small
08:08:46FromDiscord<Elegantbeef> i remove the destructors it works
08:08:53FromDiscord<Elegantbeef> The destructors arent even called
08:09:04PMunchUhm, that sounds strange
08:09:36PMunchHow do you know that they are not called?
08:09:37FromDiscord<Elegantbeef> You're telling me
08:10:05FromDiscord<Elegantbeef> I have a global variable and an echo inside the destructor
08:10:19FromDiscord<Elegantbeef> The type outlives the code that's causing the issue
08:10:38FromDiscord<Elegantbeef> Like my program is super simple
08:10:40FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/974584450761523221/image.png
08:11:35*ltriant joined #nim
08:11:36PMunchAnd if you add a destructor at line 34 it crashes?
08:11:51FromDiscord<Elegantbeef> Well in my wasmedge module
08:12:02FromDiscord<Elegantbeef> If the wasm types have destructors it sigabrts
08:12:04FromDiscord<Elegantbeef> Otherwise it runs
08:12:11PMunchI assume that `initTruss` is a Nim procedure and not a C one
08:12:19FromDiscord<Elegantbeef> Correct
08:13:10PMunchAnd you're sure your destructor is registered correctly?
08:13:41PMunchNot that I'm sure how that would make a difference :P
08:15:27FromDiscord<Elegantbeef> Ok actually it might be the destructor
08:17:30FromDiscord<Elegantbeef> made it a noop and it worked
08:17:30FromDiscord<Elegantbeef> So it's not the mere act of it existing 😄
08:18:20PMunchWhat does the destructor look likE?
08:18:55FromDiscord<uncle jim> In reply to @PMunch "What does the destructor": https://tenor.com/view/reptar-city-rugrats-90s-gif-3481019
08:19:27FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XEr
08:20:01FromDiscord<Elegantbeef> that `isNil` isnt what it normall is
08:20:12FromDiscord<Elegantbeef> Just seeing things
08:24:21PMunchIs this correct? makeDestructor(ModuleContext, moduleInstanceDelete)
08:27:30FromDiscord<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:19PMunchI'm not sure that snippet came through the bridge unscathed..
08:29:35FromDiscord<Elegantbeef> https://hatebin.com/hjubsfyyvk
08:29:36PMunchI meant more is it correct to call moduleInstanceDelete on a ModuleContext
08:30:25FromDiscord<Elegantbeef> They call it on `WasmEdge_ModuleInstanceContext`
08:30:50FromDiscord<Elegantbeef> `type ModuleContext = distinct ptr WasmModuleInstanceContext`
08:31:11FromDiscord<Elegantbeef> So yea i think so, the thing is though the procedure is not being called
08:31:32PMunchRight, that should be fine then
08:31:45PMunchJust 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:12FromDiscord<Elegantbeef> Well i got it down to a sort of min repro
09:00:35FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3XEv
09:10:10PMunchJust give me a sec while I try to install wasmedge
09:11:59PMunchHmm, I get a undefined reference error
09:14:10FromDiscord<Elegantbeef> Uhh you probably have 0.9.1 or w/e
09:14:20FromDiscord<Elegantbeef> Here's a even less dependancy filled version https://play.nim-lang.org/#ix=3XED
09:14:34FromDiscord<Zectbumo> how do I get a bracket expression in a macro?
09:14:37PMunch0.9.0 even
09:14:52FromDiscord<Elegantbeef> I can use an older type pmunch
09:14:54FromDiscord<Elegantbeef> Sit tight
09:16:21FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3XEF
09:17:07FromDiscord<mratsim> In reply to @Zectbumo "how do I get": `nnkBracketExpr.newTree(a, b)`
09:18:20PMunch@Elegantbeef, that seems to work fine though
09:18:30PMunchShows a flash of a window before it quits
09:18:32FromDiscord<Elegantbeef> Shit i might have bad dlls
09:18:43FromDiscord<mratsim> In reply to @Elegantbeef "Shit i might have": You need pills
09:18:57FromDiscord<Elegantbeef> That's what i thought
09:22:44FromDiscord<Elegantbeef> So it just seems like an issue with my system then... the fuck
09:31:22FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3XEK
09:31:32FromDiscord<Elegantbeef> Congrats!
09:31:58FromDiscord<Zectbumo> guys... I'm in love with nim
09:32:28FromDiscord<enthus1ast> @Zectbumo for databases i've done https://github.com/enthus1ast/nisane
09:32:56FromDiscord<enthus1ast> 80-90% of the tasks are easy (at least how i do my database stuff)
09:33:31FromDiscord<enthus1ast> the "orm" features are just toys, but i really like the to macro
09:35:28FromDiscord<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:39FromDiscord<Zectbumo> (edit) "_." => "\_." | "_" => "\_"
09:35:51FromDiscord<enthus1ast> \_ was the first attempt
09:36:07FromDiscord<enthus1ast> but i got some issues (that i can't remember any more)
09:36:21FromDiscord<enthus1ast> so nil it is
09:36:26FromDiscord<Zectbumo> interesting. yes
09:36:46FromDiscord<Zectbumo> the manual does say special case
09:41:30*ltriant quit (Ping timeout: 240 seconds)
09:41:45*ltriant joined #nim
09:42:59FromDiscord<Zectbumo> so, you can make a macro that makes macros? but they are templates?
09:43:46FromDiscord<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:24FromDiscord<Zectbumo> I'm trying to make sense of this https://nim-lang.org/docs/macros.html#statements-macro-declaration
09:44:49FromDiscord<Elegantbeef> It's saying the ast is the same
09:44:51FromDiscord<Elegantbeef> just a different node
09:44:52FromDiscord<Elegantbeef> node kind
09:45:10FromDiscord<Elegantbeef> https://dev.to/beef331/demystification-of-macros-in-nim-13n8 is a nice writeup if i do say so myself
09:45:12FromDiscord<Elegantbeef> and i do
09:45:33FromDiscord<Zectbumo> oh nice I will read this
09:53:15FromDiscord<j-james> !eval type Terrible = concept x; x is string; x.len == 9; let a: Terrible = "terrible."
09:53:18NimBotCompile failed: /usercode/in.nim(1, 28) Error: undeclared identifier: 'x'
09:53:27FromDiscord<j-james> bluh
09:56:02FromDiscord<j-james> what's up with this: https://play.nim-lang.org/#ix=3XEO
09:56:11FromDiscord<j-james> an implementation bug?
10:08:15*xet7 quit (Remote host closed the connection)
10:09:53*xet7 joined #nim
10:11:05PMunch@j-james, concepts have to be evaluateable at compile-time
10:11:16PMunchBut it's a bug that it doesn't throw an error
10:13:48FromDiscord<Zectbumo> is x.len the source of the problem?
10:14:36PMunchYes, if you comment that out it works fine
10:15:23PMunchThe length of a string isn't known at compile-time
10:16:10FromDiscord<Zectbumo> unless if it's a constant?
10:16:30PMunchYeah it should theoretically be possible to do this with a static[string]
10:20:40om3gaGuys, and will be gcc11 suppurted in near future?
10:23:38FromDiscord<Yardanico> In reply to @om3ga "Guys, and will be": it is supported just fine
10:23:48FromDiscord<Yardanico> I've been using it in WSL and on Arch with no issues for Nim
10:24:44FromDiscord<Yardanico> can you paste somewhere the full output with the error you're presumably getting when using gcc 11 with Nim?
10:25:12FromDiscord<j-james> hmm, what's up with this then
10:25:14om3gaYardanico, hmm. strange. Something weird I have here. Sure, I will copy when that errors will appear again
10:25:26FromDiscord<j-james> sent a code paste, see https://play.nim-lang.org/#ix=3XEV
10:25:28FromDiscord<j-james> `Error: type mismatch: got 'int literal(1)' for '1' but expected 'Natural = t'`
10:25:46FromDiscord<Yardanico> In reply to @j-james "`Error: type mismatch: got": first of all, you can't assign concept types to variables
10:25:52FromDiscord<Yardanico> concept types can only be used in things like proc arguments
10:26:10FromDiscord<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:06FromDiscord<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:45FromDiscord<Yardanico> and yeah, anyway, x > 0 is a compile-time check, and you're doing it for a `let` variable
10:28:52FromDiscord<Yardanico> try using procs instead, you'll get much better errors for this case as well
10:30:53FromDiscord<j-james> sent a code paste, see https://play.nim-lang.org/#ix=3XEZ
10:31:02FromDiscord<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:19FromDiscord<j-james> it does look like the same error as before
10:31:21FromDiscord<Yardanico> yes, and it tells below in the error that the matching failed
10:32:05FromDiscord<j-james> but 1 should satisfy the concept's conditions, no
10:32:29FromDiscord<Yardanico> `d:\Projects\NimExperiments\main.nim(3, 3) Tiny: cannot evaluate at compile time: x` as PMunch said before
10:33:20FromDiscord<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:30FromDiscord<Yardanico> it's usually used as compile-time interfaces to check that a type has specific procs, etc
10:33:40FromDiscord<j-james> d'oh i missed the actual error message
10:33:53FromDiscord<j-james> yeah i was playing around to see if i could make it do very bad things
10:34:12FromDiscord<j-james> like create a type that only is valid for a specific string
10:35:20PMunchThat sounds like an enum
10:35:30FromDiscord<j-james> i would very much like to use it as a more powerful range type, though
10:35:34FromDiscord<j-james> yup 😄
10:36:41FromDiscord<Rika> Concepts are bolted on and not first class so right now you can’t do these
10:40:49FromDiscord<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:00om3gaYardanico, for now, I got segfault when trying to use sanitise=thread in gcc
10:46:46om3gamaybe that's because someone compiled custom asan, I should check that
10:51:08om3gano. seems it's not possible since sanitizers are part of gcc, and are builtin
10:52:50FromDiscord<Yardanico> sanitisers are disabled by default in GCC
10:53:00FromDiscord<Yardanico> Maybe your distro enabled them or something?
10:53:32FromDiscord<Yardanico> Or try disabling them yourself with -fno-sanitize=name
10:53:50FromDiscord<Yardanico> Like -fno-sanitize=undefined , not sure what's the name for the thread sanitizer
10:55:25om3gaYardanico, -fsanitize=thread
10:55:40FromDiscord<Yardanico> Then do -fno-sanitize=thread
10:55:53om3gayes. that's what I do
10:56:33om3gaand it segfauls. I have following options in config.nims: --passC:"-O0 -g3 -fsanitize=thread" --passL:"-lfcgi -fsanitize=thread"
10:57:16FromDiscord<Yardanico> but this was you enable the sanitizer
10:57:19FromDiscord<Yardanico> Not disable it
10:57:36FromDiscord<Yardanico> does it crash without fsanitize ?
10:58:49FromDiscord<Yardanico> (edit) "was" => "way"
11:01:00om3gaYardanico, without sanitizer it works, yeah
11:01:16om3gabut I need it for debug
11:02:10om3gaI would be happy to use clang, but on some machines they dont allow me to install it
11:02:19FromDiscord<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:23om3gaYardanico, orc specified already. looks like issue with compiler, or something else... maybe fcgi lib needs to be recompiled
11:03:48om3gaanyway thanks, I will try to exclude all possible interferences
11:06:20FromDiscord<Yardanico> but if it crashes due to the sanitizer, doesn't sanitizer show any error messages?
11:06:43om3gano.. 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:26PMunch!eval echo NimVersion & " 🥳"
12:17:28NimBot1.6.6 🥳
12:17:34*firq joined #nim
12:18:01PMunchTurns out I had disabled cron on the playground server :P So it didn't update the images
12:22:21FromDiscord<d4rckh> !eval echo NimVersion & " 🥳"
12:22:24NimBot1.6.6 🥳
12:22:39FromDiscord<d4rckh> is this secure? letting people run nim?
12:23:05FromDiscord<Rika> Yeah, I believe it’s virtualised anyway
12:24:59PMunch@d4rckh, define secure
12:25:22FromDiscord<d4rckh> safe?
12:26:34PMunchIt 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:35FromDiscord<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:32PMunchSure 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:13dithpri!eval echo exceProcess("/bin/rm", args=["-rf", "--no-preserve-root"])
12:28:15NimBot<no output>
12:28:20dithpriwhoops typo
12:28:27dithpri!eval echo execProcess("/bin/rm", args=["-rf", "--no-preserve-root"])
12:28:28NimBot<no output>
12:28:48PMunchYou can also run this on the playground by the way, it's the same machine
12:29:16FromDiscord<d4rckh> can you access global variables?
12:29:28PMunch@d4rckh, global variables?
12:29:31FromDiscord<d4rckh> like the bot object
12:29:46FromDiscord<Rika> No
12:29:57FromDiscord<Rika> The bot and the runner are independent
12:30:02FromDiscord<d4rckh> oh thats cool
12:30:03PMunchThe bot runs on a completely separate machine
12:30:13PMunchIt just uses the playground through the REST API
12:30:22FromDiscord<d4rckh> ah makes sense
12:30:23FromDiscord<d4rckh> thats cool
12:31:19FromDiscord<xflywind> Nice! Is the REST API public?
12:32:21PMunch@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:33PMunch@xflywind, well the entire code is public, so yes
12:32:56dithpriPMunch: yeah I just looked at the docs and I'd need to pass `options` or use execShellCommand
12:34:14FromDiscord<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:35:06PMunchLike a live tour kind of deal?
12:35:24FromDiscord<xflywind> Yeah, I can do it for all runnableExamples.
12:35:39PMunchThat would work
12:35:53PMunchMight need a bigger server if it gets popular though
12:36:13PMunchAnd most runnableExamples only have asserts anyways, so they wouldn't really output anything useful
12:36:38PMunchThey would have to be editable in order to be useful
12:36:56FromDiscord<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:09FromDiscord<Zoom> I made a FR for the forums with the same suggestion
12:38:25*vicfred_ quit (Quit: Leaving)
12:39:22FromDiscord<dithpri> In reply to @PMunch "<@233290600131067913>, as it runs": Huh I got pinged here too
12:40:01FromDiscord<Zoom> https://github.com/nim-lang/nimforum/issues/293
12:40:42FromDiscord<xflywind> Yeah, I agree.
12:41:32PMunchdithpri, yeah I pinged you. It was meant as a reply to your rm -rf commands
12:41:49dithpriYes, just interesting the bot pinged me on discord too
12:42:24PMunchWe've got some pretty nifty bots around here :)
12:44:34FromDiscord<xflywind> Hi. where is the code of the bot?
12:45:30FromDiscord<xflywind> I see
12:45:45FromDiscord<xflywind> Some code looks outdated though
12:46:01FromDiscord<xflywind> https://github.com/nim-lang/nimbot/blob/e37e337d4a78b44cf828ad1c9d51142ce3e96743/src/nimbot.nim#L42
12:46:35*slowButPresent joined #nim
12:48:44FromDiscord<Zoom> Magic strings in plain code! Disgusting!
12:49:19FromDiscord<xflywind> let's hunt all nimrod in the all Nim repos.
12:49:29FromDiscord<xflywind> (edit) removed "the" | "repos." => "repos!"
12:49:44NimEventerNew thread by Mardiyah: Compile time function use Nim metaprogramming feature, see https://forum.nim-lang.org/t/9154
12:51:15FromDiscord<Zoom> I bet half the code with `nimrod` is not used by this point and just waits to be removed altogether.↵(@xflywind)
12:54:37FromDiscord<xflywind> probably 😱
12:56:24PMunchOr the maintainer hasn't pushed in a while :P
12:56:54PMunchOh, apparently it was updated 11 months ago
12:57:56PMunchOh, NimBot is the irclogs server as well :P
12:58:07FromDiscord<xflywind> yeah, the link still works
12:59:47*mahlon quit (Ping timeout: 246 seconds)
13:00:18FromDiscord<xflywind> Anyway => https://github.com/nim-lang/nimbot/pull/16
13:03:19PMunchHmm, does anybody want to write a software serial implementation for Ratel?
13:04:10PMunchI'm working on adding the attiny85 to it, I think I've got the i2c working now
13:04:36PMunchI'm going to add ADC support soon as well
13:04:43PMunchAnd hopefully finally get around to do SPI
13:05:43PMunchI'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:43FromDiscord<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:35FromDiscord<Rika> The regular one or the pico
13:08:44PMunchI've been playing with the regular one
13:08:57PMunchThe Pico would of course be an obvious target as well
13:09:59FromDiscord<Rika> It’s very hard to make a general api for something like this I’d say
13:10:19FromDiscord<Rika> What happens when you want to use board specific stuff, I’m not sure
13:12:00PMunchThen you use a board specific library
13:12:41PMunchThe generalization is for the common interfaces (e.g. reading/writing pins, i2c, SPI, serial)
13:13:04FromDiscord<Rika> What if it’s like “do this on the pico, otherwise fall back to regular bit banging” kind of thing
13:13:30PMunchIf 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:04PMunchThen you can use `when` statements to check which board you're on
13:14:30FromDiscord<Rika> Would ratel mix well with let’s say that pico library?
13:15:05FromDiscord<Rika> Let’s say Ratel has the WS2812 protocol implemented in software
13:15:12PMunchIn 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:21FromDiscord<Rika> And that I have a pico and an Arduino as my target
13:15:44FromDiscord<Rika> On the pico, I’d use PIO naturally, on the Arduino I’d bit bang (using your implementation in Ratel)
13:15:47FromDiscord<Rika> How would I do so
13:16:11FromDiscord<Rika> Just a hypothetical of course
13:18:15PMunchWell 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:49PMunchIf 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:40FromDiscord<xflywind> The rest api works fine. I think I need to add "version" and "mm" switch.
13:19:53FromDiscord<xflywind> (edit) ""mm"" => ""gc""
13:20:55FromDiscord<xflywind> It seems to always use latest version now https://github.com/PMunch/nim-playground/blob/6ba37fdc07868b71734125eecc82b19d1bba13eb/src/nim_playground.nim#L202
13:21:22PMunch@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:24FromDiscord<xflywind> Sorry, i misread it.
13:21:30FromDiscord<Rika> In reply to @PMunch "Well with a Pico": Sorry I don’t understand this
13:21:42FromDiscord<Rika> Yeah that’s the thing
13:22:06PMunch@xflywind, it just defaults to latest: https://github.com/PMunch/nim-playground/blob/6ba37fdc07868b71734125eecc82b19d1bba13eb/src/nim_playground.nim#L228
13:22:29PMunchYou can switch the version on the playground, so obviously that's supported :)
13:22:33FromDiscord<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:57FromDiscord<xflywind> In reply to @PMunch "<@658563905425244160>, it just defaults": Thanks, I misread it.
13:24:02PMunch@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:55FromDiscord<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:11FromDiscord<Rika> But I don’t know
13:25:16FromDiscord<Rika> Just a thought
13:26:32PMunchNot entirely sure what you mean
13:27:47FromDiscord<Rika> I guess the thought is how would these pin things integrate with external libraries
13:31:52PMunchStill not entirely sure what you mean, sorry
13:32:56PMunchPin 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:30PMunchIf 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:59FromDiscord<Rika> Just never mind I guess, since I’m not really thinking of using this library
13:38:13FromDiscord<Rika> Wonder if a pico can do video decoding
13:39:16PMunchProbably can, depending on the format of course
13:39:42PMunchI 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:02FromDiscord<xflywind> !eval echo "works"
13:42:38FromDiscord<Rika> In reply to @PMunch "I mean the digispark": Was thinking of more crazy formats like AVC but it’s a stretch
13:44:46FromDiscord<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:53PMunch@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:50FromDiscord<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:00FromDiscord<ambient> @Rika try MJPEG
14:05:04FromDiscord<ambient> it's relatively fast way to encode/decode video signal
14:06:45FromDiscord<Rika> I’ll look into that
14:07:02FromDiscord<Rika> A more popular format would be nice though, still;
14:07:16FromDiscord<ambient> MJPEG is very well supported in pretty much everywhere
14:07:25FromDiscord<ambient> you can open a stream directly in browser from a web address
14:16:11*arkurious joined #nim
14:26:09FromDiscord<Rika> I mean popular as in used
14:26:18FromDiscord<Rika> Not necessarily just supported
14:28:35*vicecea quit (Remote host closed the connection)
14:29:06*vicecea joined #nim
14:33:10FromDiscord<mratsim> In reply to @Rika "I mean popular as": what was your question
14:34:35FromDiscord<Rika> Popular video format that can be decoded in a microcontroller on the level of a pico
14:35:53FromDiscord<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:43FromDiscord<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:38FromDiscord<demotomohiro> Is it mean `char` in clang is `unsigned` and `int(char(-1))` become 255?
14:38:56FromDiscord<ajusa> Weird question but is NPeg good? Like could it be used to parse HTML?
14:39:30FromDiscord<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:42FromDiscord<jmgomez> (edit) "work" => "works"
14:40:19FromDiscord<mratsim> In reply to @ajusa "Weird question but is": @zevv
14:40:56FromDiscord<Generic> wow til, char can indeed be signed and unsigned
14:41:51FromDiscord<Generic> you never stop learning C and C++
14:42:39FromDiscord<mratsim> In reply to @Generic "wow til, char can": I'm actually wondering what the hell is a signed char
14:42:53FromDiscord<demotomohiro> In reply to @jmgomez "Hey guys, Im clueless.": Did you get that error from Nim generated C code?
14:43:18FromDiscord<jmgomez> No, Im making Nim bindings to UE
14:43:46FromDiscord<jmgomez> I got those while trying to import some basics types
14:43:55FromDiscord<Generic> In reply to @mratsim "I'm actually wondering what": idk I always assumed char was signed
14:44:08FromDiscord<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:30FromDiscord<jmgomez> UBT == Unreal Build Tool
14:45:09FromDiscord<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:30FromDiscord<Generic> no shouldn't it be the other way around
14:46:01FromDiscord<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:20FromDiscord<Generic> ?
14:47:13FromDiscord<demotomohiro> !eval echo int(cuchar(-1))
14:47:15NimBotCompile failed: /usercode/in.nim(1, 16) Error: -1 can't be converted to cuchar
14:47:56FromDiscord<Generic> !eval echo int(cast[cuchar](-1))
14:48:03FromDiscord<jmgomez> yes! -fno-unsigned-char did the trick
14:48:37FromDiscord<jmgomez> thanks a bunch guys
15:13:15FromDiscord<jmgomez> sent a code paste, see https://paste.rs/2P4
15:28:44FromDiscord<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:50FromDiscord<xflywind> https://media.discordapp.net/attachments/371759389889003532/974694715997958184/unknown.png
15:29:03FromDiscord<xflywind> (edit) "toward" => "towards"
15:31:18FromDiscord<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:36FromDiscord<xflywind> Basically what the Rust docs do.
15:56:40FromDiscord<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:07FromDiscord<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:51FromDiscord<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:53FromDiscord<jmgomez> how can one know the current compiled file?
16:33:52FromDiscord<jmgomez> I mean, the target of the nim command i.e nim c --run MyFile.nim
16:35:14FromDiscord<xflywind> https://nim-lang.org/docs/os.html#getAppFilename getAppFileName()..changeFileExt("nim")
16:36:31FromDiscord<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:00FromDiscord<jmgomez> Also it isnt available in NimScript, is it?
16:37:01FromDiscord<Yardanico> https://nim-lang.org/docs/system.html#currentSourcePath.t is better
16:37:54FromDiscord<Yardanico> In reply to @jmgomez "Also it isnt available": Not sure how to do it in nimscript really
16:38:28FromDiscord<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:39FromDiscord<Yardanico> well I mean you can call this from the main file
16:39:23FromDiscord<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:50FromDiscord<Yardanico> why not just --nimcache:folder ?
16:39:58FromDiscord<Yardanico> It'll put folder in CWD
16:40:55FromDiscord<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:28FromDiscord<demotomohiro> https://nim-lang.org/docs/nimscript.html#projectPath
16:42:43FromDiscord<Zoom> Great!↵(@xflywind)
16:43:42FromDiscord<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:04FromDiscord<jmgomez> As a work around I could use either what @Yardanico said or the custom defined options
16:45:04FromDiscord<Yardanico> Hm, but won't projectPath return what you need?
16:45:29FromDiscord<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:40FromDiscord<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:25FromDiscord<xflywind> I believe nimib, nimibook, nim website, nim forum should benefit form it too.
16:49:58FromDiscord<jmgomez> In reply to @Yardanico "Hm, but won't projectPath": Oh yes, sorry I missread the output! Thanks for reiterating!
16:54:25FromDiscord<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:29FromDiscord<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:33FromDiscord<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:20FromDiscord<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:39FromDiscord<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:13FromDiscord<Yardanico> I think some runnableExamples are longer 🤔
17:07:45FromDiscord<xflywind> We can use post for bigger examples.
17:09:04FromDiscord<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:30FromDiscord<Forest> Now I'm gonna be attempting to make a character creator in Nim with Raylib, this'll be fun-
17:56:27FromDiscord<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:08FromDiscord<Rika> lol
18:05:19*stkrdknmibalz quit (Read error: Connection reset by peer)
18:18:14FromDiscord<Forest> Anyone know how to get Naylib working? :P
18:18:23FromDiscord<Forest> Cloned it from GitHub but Nake failed for some reason
18:23:40FromDiscord<eyecon> Why, why, why is it so hard to find anything in the official Nim docs /rant
18:24:20FromDiscord<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:51FromDiscord<eyecon> It's an array of 2-tuples IIRC, but wanted to look up
18:26:32FromDiscord<Forest> Says it has an invalid reference
18:26:37FromDiscord<Forest> "reference is not a tree"
18:30:22FromDiscord<Rika> In reply to @eyecon "Can anyone give me": https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor
18:31:04FromDiscord<planetis> In reply to @Forest ""reference is not a": is that a git error?
18:33:42FromDiscord<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:33FromDiscord<planetis> I am going to remove nake eventually
18:34:42FromDiscord<planetis> make it a simple nim program
18:35:07FromDiscord<Forest> Ah fair
18:35:14FromDiscord<Forest> Why not an sh script?
18:35:40FromDiscord<planetis> I dont know bash
18:35:44FromDiscord<Forest> Fair
18:37:05FromDiscord<Zectbumo> In reply to @mratsim "I'm actually wondering what": how else would you make a signed byte?
18:37:53FromDiscord<Forest> In reply to @planetis "can you run the": says reference isn't a tree
18:38:35FromDiscord<Rika> In reply to @Forest "Cloned it from GitHub": Did you actually clone it and not the download zip button
18:38:41FromDiscord<Forest> yeah
18:38:52FromDiscord<Forest> with git clone :p
18:38:54FromDiscord<Rika> Huh
18:40:31FromDiscord<Forest> definitely is a valid commit tho
18:40:37FromDiscord<Forest> https://github.com/raysan5/raylib/commit/4eb3d8857f1a8377f2cfa6e804183512cde5973e
18:41:04FromDiscord<planetis> Yeah I just checked the same
18:41:23FromDiscord<Forest> oh isn't there a flag for fetching branch-like objects?
18:41:56FromDiscord<planetis> No idea
18:42:01*jmdaemon joined #nim
18:44:22FromDiscord<planetis> Can you got pull and then git checkout?
18:44:24FromDiscord<Forest> doesn't seem like it
18:44:29FromDiscord<Forest> sure
18:44:53FromDiscord<Forest> nope
18:44:59FromDiscord<Forest> didn't work, same error
18:45:08FromDiscord<Forest> `fatal: reference is not a tree: 4eb3d8857f1a8377f2cfa6e804183512cde5973e`
18:45:56FromDiscord<planetis> I think I should remove depth 1 from git clone....
18:46:04FromDiscord<planetis> It must be it
18:46:07FromDiscord<Forest> lemme try that
18:46:45FromDiscord<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:59FromDiscord<Forest> this'll take ages rip
18:48:37FromDiscord<Forest> 70 mb and at 30%... yikes
18:49:54FromDiscord<planetis> You can do depth 20 or something
18:50:19FromDiscord<planetis> It used to work because I always kept it up to date
18:50:29FromDiscord<Forest> fair but not super reliable
18:50:39FromDiscord<planetis> But recently someone rewrote the parser
18:50:59FromDiscord<planetis> And I haven't updated it yet
18:52:07FromDiscord<Forest> understandable
18:53:03FromDiscord<Forest> git is taking too long holy crap
18:53:19FromDiscord<Forest> would downloading the zip from that commit work?
18:54:37FromDiscord<planetis> If you comment out fetchLatestRaylib
18:55:00FromDiscord<planetis> I should provide this option, good idea
18:55:12FromDiscord<Forest> In reply to @planetis "If you comment out": wdym?
18:57:39FromDiscord<Forest> figured it out i think
18:58:46FromDiscord<Forest> testing it rn
18:59:46FromDiscord<planetis> You don't need to call make wrap
18:59:51FromDiscord<planetis> Just make build
18:59:59FromDiscord<planetis> (edit) "make" => "nake"
19:00:05FromDiscord<planetis> (edit) "make" => "nake"
19:00:09FromDiscord<Forest> i don't do that :p
19:00:39FromDiscord<Forest> i haven't figured it out, by the love of god this takes forever
19:00:48FromDiscord<Forest> In reply to @planetis "If you comment out": i'll just do this
19:01:32FromDiscord<planetis> I should decouple what I use for development and the user install
19:01:37FromDiscord<Forest> fair
19:03:00FromDiscord<Forest> okay now this is working
19:03:13FromDiscord<Forest> to get the zip i used this url: https://github.com/raysan5/raylib/archive/4eb3d8857f1a8377f2cfa6e804183512cde5973e.zip
19:08:12FromDiscord<Forest> Btw the example on your readme with defer gives this: ` Error: defer statement not supported at top level`
19:20:11FromDiscord<planetis> Yeah I know
19:20:12FromDiscord<planetis> Always use main, aarc is buggy
19:20:12FromDiscord<Forest> `main` as the gc?
19:20:13FromDiscord<planetis> main proc
19:20:13FromDiscord<Forest> ah okay
19:20:13FromDiscord<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:14NimEventerNew 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:15FromDiscord<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:38FromDiscord<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:51FromDiscord<Andreas> (edit) "though" => "thought"
21:19:02FromDiscord<Elegantbeef> What
21:20:21FromDiscord<Andreas> In reply to @Elegantbeef "What": are u serious ? that my simple code-example, is a 'intemtional' limitation of the language ?
21:20:45FromDiscord<Andreas> (edit) "'intemtional' limitation" => "'intemtional-limitation'"
21:21:35FromDiscord<Elegantbeef> The language only allows destructors for `object` or `distinct T` which is a limitation
21:21:59FromDiscord<Andreas> In reply to @Elegantbeef "The language only allows": oh, ok i did not knew that.
21:22:22FromDiscord<Andreas> (edit) "In reply to @Elegantbeef "The language only allows": oh, ok i did not knew that. ... " added "ty"
21:22:30FromDiscord<Recruit_main707> assert is now also checked even with `-d:release/danger`?
21:22:44*duuude quit (Ping timeout: 248 seconds)
21:22:55FromDiscord<Elegantbeef> assert is checked in release
21:22:57FromDiscord<exelotl> wait you can make destructors for `distinct T` for any `T` ? :o
21:23:04FromDiscord<Elegantbeef> Yes
21:28:25FromDiscord<Prestige> I didn't expect that
21:28:46FromDiscord<Prestige> So you could do `type Foo = distinct reg object` ?
21:28:52FromDiscord<Prestige> (edit) "reg" => "ref"
21:29:19FromDiscord<Prestige> (and get a destructor for Foo)
21:29:19FromDiscord<Elegantbeef> Yes
21:29:22FromDiscord<Prestige> Wow
21:29:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XHf
21:30:03FromDiscord<exelotl> :(
21:30:11FromDiscord<Elegantbeef> Think it's a bug
21:30:36FromDiscord<Elegantbeef> But i'm 99.99% certain it's a bug
21:30:37FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/DiN
21:31:37FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XHi
21:31:50FromDiscord<Elegantbeef> So seems it's an issue with lambda lifting on builtin types
21:32:35FromDiscord<Elegantbeef> Yea distinct built in types does not seem to work, so probably a bug
21:33:38FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XHj
21:36:56FromDiscord<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:42FromDiscord<Alea> sent a code paste, see https://play.nim-lang.org/#ix=3XHv
22:46:14FromDiscord<Elegantbeef> Why not
22:46:37*noeontheend joined #nim
22:50:26FromDiscord<huantian> why does everyone hate on post def docstrings
22:50:35FromDiscord<Elegantbeef> Python
22:52:52FromDiscord<huantian> really just cus python uses it everyone thinks its bad
22:53:14FromDiscord<huantian> 😔
22:53:21FromDiscord<Elegantbeef> The big issue imo is the runnable examples imo
22:53:24FromDiscord<Elegantbeef> 😛
22:55:19FromDiscord<Prestige> I don't like runnable examples either
22:55:27FromDiscord<Prestige> imo they should just be backed by tests
22:55:46FromDiscord<Elegantbeef> Eh they're different things
23:02:04FromDiscord<Prestige> Indeed
23:02:37FromDiscord<Prestige> but unit tests should be sufficient enough to show you how to use a function
23:03:28*droidrage joined #nim
23:03:44FromDiscord<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:37FromDiscord<!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:46FromDiscord<!Patitotective> (edit) "it" => "a proc"
23:06:04FromDiscord<!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)