<< 18-12-2021 >>

00:00:43FromDiscord<Elegantbeef> Run the nim command yourself and see what the error is
00:01:25FromDiscord<spazzy> weird
00:01:34FromDiscord<spazzy> it compiels with nim c but not nimble rund
00:01:45FromDiscord<spazzy> (edit) "compiels" => "compile↵s"
00:01:47FromDiscord<Elegantbeef> Ok so what does your `rund` task do
00:02:31FromDiscord<spazzy> wait it compiles but doesnt run
00:02:35FromDiscord<spazzy> with nim c
00:02:59FromDiscord<Elegantbeef> See it's a runtime error
00:03:08FromDiscord<Elegantbeef> So run it and it should give more info
00:03:08FromDiscord<spazzy> https://github.com/ftsf/nico
00:03:19FromDiscord<spazzy> im just running the example from that
00:04:03FromDiscord<Elegantbeef> I mean this will probably work for me, so what does it say when you run the binary?
00:04:07FromDiscord<Elegantbeef> Cause it should give more information
00:04:46FromDiscord<spazzy> its not loading sdl even though its installed
00:05:16FromDiscord<spazzy> nvm im dumb
00:05:20FromDiscord<spazzy> its not installed on the system
00:05:23FromDiscord<spazzy> lol
00:05:32FromDiscord<spazzy> its a fresh install and i forgot about it
00:05:33FromDiscord<Elegantbeef> We did it! 😀
00:06:00FromDiscord<spazzy> thats a really nice library btw
00:06:05FromDiscord<spazzy> its way more extensive than it looks
00:06:30FromDiscord<Elegantbeef> Hey i havent done much to it so i can only say pass the compliment to impbox
00:07:26FromDiscord<spazzy> btw what do you guys use as an ide
00:07:35FromDiscord<spazzy> this being a fresh install gives me an excuse to try new things
00:11:18FromDiscord<Elegantbeef> I use Vscode as an editor for serious things and nvim for one offs
00:11:36FromDiscord<leorize> i use nvim for everything
00:14:03FromDiscord<spazzy> i usually use vim for everything but ive had a lot of problems with the autocomplete
00:14:37FromDiscord<spazzy> at least with nim
00:14:53FromDiscord<spazzy> it doesnt always recognize imports
00:14:57pippinis there an easier way than 'write stdout, "string"' to get the effect of echo without the trailing newline?
00:15:18FromDiscord<Elegantbeef> Nope
00:15:29FromDiscord<Elegantbeef> Not that i know of atleast
00:15:43FromDiscord<Elegantbeef> You also have to remember that `echo` flushes the stdout
00:16:13pippinand hmm.. echo is available in nimscript while stdout isnt
00:20:19FromDiscord<Elegantbeef> Leorize do you know if there is a nvim plugin that renders the background of scopes different colours? Seems like a simple silly way to tell people that moan about whitespace significant to "sod off"?
00:21:04FromDiscord<leorize> nope
00:21:31FromDiscord<leorize> @spazzy\: you use vanilla vim or neovim?
00:21:49FromDiscord<spazzy> usually vanilla
00:27:20FromDiscord<spazzy> im switching now that i found out about nim.nvim lol
00:27:30FromDiscord<spazzy> it just werks
00:37:00*krux02 quit (Remote host closed the connection)
00:46:17FromDiscord<leorize> neovim is just better
00:48:08FromDiscord<Rosen> kinda wish neovim had a graphical interface a la gvim when I'm on windows, but that's my only real "complaint"
00:48:34FromDiscord<Rosen> it's just one extra step to launch a term when I'm used to not using one on the windows box
00:58:42FromDiscord<leorize> there are a few attempts but they're not very popular
01:07:39FromDiscord<spazzy> just install gentoo
01:11:41FromDiscord<spazzy> sent a code paste, see https://play.nim-lang.org/#ix=3IIb
01:12:08FromDiscord<spazzy> thats not something from 1.2 by any chance is it
01:13:17FromDiscord<spazzy> (edit) "https://play.nim-lang.org/#ix=3IIb" => "https://play.nim-lang.org/#ix=3IIc"
01:30:14FromDiscord<demotomohiro> I'm using neovim-qt on windows↵https://github.com/equalsraf/neovim-qt
01:53:25FromDiscord<Rosen> hey this doesn't look that bad
02:15:57*neurocyte0132889 quit (Ping timeout: 240 seconds)
02:41:49*lumo_e quit (Quit: Quit)
03:00:32FromDiscord<sharpcdf> this is how i check for git, correct?
03:00:40FromDiscord<sharpcdf> sent a code paste, see https://play.nim-lang.org/#ix=3IIz
03:08:41FromDiscord<Elegantbeef> It's a way
03:08:54FromDiscord<jfmonty2> won't `== 1` only evaluate to true if the command fails?
03:09:33FromDiscord<Elegantbeef> Yea 0 is success and non zero is an issue
03:10:36FromDiscord<Elegantbeef> Depending on the application you may want to use libgit instead, but it indeed depends
03:12:28FromDiscord<Rosen> I also feel like it's slightly evil to check for commands by running them, maybe using "command -v git" instead of git?
03:13:11FromDiscord<Rika> Isn’t command a shell function
03:13:42FromDiscord<Rosen> That's true I'm assuming posix
03:13:50FromDiscord<sharpcdf> In reply to @jfmonty2 "won't `== 1` only": yes
03:14:15FromDiscord<sharpcdf> In reply to @Rika "Isn’t command a shell": theres a seperate functions for shell commands
03:14:25FromDiscord<Rosen> Oh my bad then
03:14:52FromDiscord<sharpcdf> https://nim-lang.org/docs/os.html#execShellCmd%2Cstring
03:15:57FromDiscord<Elegantbeef> There is also `findExe`
03:17:01FromDiscord<Rosen> ooh findExe looks best
03:19:08FromDiscord<sharpcdf> In reply to @Elegantbeef "There is also `findExe`": yea ill use that
03:20:09FromDiscord<sharpcdf> do you know if you have to provide the extension?
03:20:29*arkurious quit (Quit: Leaving)
03:20:43FromDiscord<Elegantbeef> `extensions: openArray[string] = ExeExts`
03:20:59FromDiscord<Elegantbeef> You can provide them if you want but it uses the const \`ExeExts
03:21:19FromDiscord<Elegantbeef> Which on posix is nothing
03:21:32FromDiscord<sharpcdf> alright
03:21:46FromDiscord<sharpcdf> for now my only target is windows
03:25:17*noeontheend joined #nim
03:46:16FromDiscord<that_dude> sent a code paste, see https://play.nim-lang.org/#ix=3IIF
03:50:38NimEventerNew thread by Xioren: Looking for some insight into HttpClient and proxy authorization, see https://forum.nim-lang.org/t/8721
03:53:16FromDiscord<Rika> `quote do:` returns a NimNode that you arent using
03:54:52*src quit (Quit: Leaving)
03:55:42FromDiscord<that_dude> how would I discard that?
03:55:59FromDiscord<Elegantbeef> damn it
03:56:02FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3IIH
03:56:06FromDiscord<that_dude> do I do something like `discard quote do:`?
03:56:24FromDiscord<Rika> no
03:56:25FromDiscord<Rika> that wont work
03:56:29FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3III
03:56:29FromDiscord<Rika> beef moment
03:56:30FromDiscord<Elegantbeef> And there is a better way to do this
03:56:44FromDiscord<Rika> hes gonna say macrocache
03:56:46FromDiscord<Rika> im betting
03:56:48FromDiscord<Rika> a dollar
03:56:51FromDiscord<Elegantbeef> It's a better way
03:56:54FromDiscord<that_dude> lol
03:57:26FromDiscord<Rika> look into it i recommend
03:57:29FromDiscord<Rika> its a neat module
03:58:28FromDiscord<that_dude> I may use it, I think it's a bit more powerful than I think I need right now
03:58:42FromDiscord<that_dude> Well see if I reach any other snags that may need them
04:00:56FromDiscord<that_dude> I got a new error, but I gtg for now
04:01:00FromDiscord<that_dude> Will ask later
04:06:01*supakeen quit (Quit: WeeChat 3.3)
04:06:30*supakeen joined #nim
04:29:15FromDiscord<sharpcdf> when you call a command with `execCmd()` is the wd the directory of the exe
04:29:41FromDiscord<Elegantbeef> Nope what ever your present working dir is
04:29:54FromDiscord<sharpcdf> oh ok so just home
04:29:58FromDiscord<Elegantbeef> you can do `getAppDir` and `setCurrentDir` if you need to
04:30:13FromDiscord<sharpcdf> yea i was just thinking that
04:30:14FromDiscord<Elegantbeef> Not "just home", but whatever your environment set the directory to
04:30:30FromDiscord<sharpcdf> does `getAppDir` return the app exe in the path
04:30:33FromDiscord<sharpcdf> or just the directory
04:30:47FromDiscord<Elegantbeef> What do you think `dir` means?
04:30:59FromDiscord<sharpcdf> lol
04:31:03FromDiscord<Elegantbeef> dirppalication?
04:31:16FromDiscord<sharpcdf> well im pretty sure i used it before and it including the exe in the directory
04:31:20FromDiscord<Elegantbeef> there is `getAppFilename` for the exe
04:52:40FromDiscord<Yardanico> apparently total compilation time with clang is 32% faster for me when compiling a nim hello world with `nim c -d:danger --gc:orc --cc:clang -f test.nim` rather than with gcc
04:52:54FromDiscord<Yardanico> 520ms
04:56:17*noeontheend quit (Ping timeout: 240 seconds)
04:57:41*noeontheend joined #nim
05:00:15FromDiscord<sharpcdf> i want to check if a repository is in either github, gitlab, or bitbucket, how would i go about doing that?
05:00:32FromDiscord<sharpcdf> right now i just have git clones for all of them but it doesnt work at all
05:00:50FromDiscord<Yardanico> In reply to @sharpcdf "i want to check": in what context?
05:01:15FromDiscord<Yardanico> by URL? from the cloned repo tree? or something else?
05:01:21FromDiscord<sharpcdf> by the url
05:01:32FromDiscord<Yardanico> just check the hostname?
05:01:37FromDiscord<sharpcdf> what i have right now is appending the base ur(github, bitbucket, etc.) to the suer/repo
05:01:42FromDiscord<sharpcdf> (edit) "suer/repo" => "user/repo"
05:01:47FromDiscord<Yardanico> where do you get user/repo from
05:01:53FromDiscord<sharpcdf> command line args
05:01:57FromDiscord<Yardanico> and why do you want to check if it's from github/gitlab/bitbucked
05:01:58FromDiscord<Yardanico> (edit) "github/gitlab/bitbucked" => "github/gitlab/bitbucket"
05:02:03FromDiscord<Yardanico> In reply to @sharpcdf "command line args": then let the user specify?
05:02:14FromDiscord<Yardanico> or set the default as `gh` and allow the user to specify if it's not github
05:02:22FromDiscord<Yardanico> or allow to also specify the full url if it's not github
05:02:32FromDiscord<sharpcdf> i want it to specifically infer the base url
05:02:37FromDiscord<Yardanico> but why
05:02:41FromDiscord<sharpcdf> of course unless theres no way to do so
05:02:44FromDiscord<sharpcdf> just because
05:02:45FromDiscord<Yardanico> i mean if you really want to, just do it
05:02:47FromDiscord<Yardanico> I don't see the issue
05:02:55FromDiscord<sharpcdf> well thats my question, how would i do it
05:03:00FromDiscord<Yardanico> std/httpclient
05:03:14FromDiscord<sharpcdf> and then just check if it returns a 404?
05:03:39FromDiscord<Yardanico> well, you'll have to check what the websites return on a wrong URL, but generally yeah
05:03:46FromDiscord<Yardanico> i just don't see how it's specifically a nim problem :)
05:03:49FromDiscord<sharpcdf> alright thanks
05:04:01FromDiscord<Yardanico> and what if the same repo exists in more than 1 website?
05:04:14FromDiscord<sharpcdf> ill probably default it to github like you said
05:04:32FromDiscord<sharpcdf> and then gitlab
05:04:47FromDiscord<sharpcdf> and then bitbucket because i never use it and it seems the least popular 👍
05:05:03FromDiscord<Yardanico> there's also sourcehut, gitea and more
05:05:14FromDiscord<Yardanico> https://sr.ht
05:05:30FromDiscord<sharpcdf> gitea is self-hosted which makes it a little trickier imo, and ive never heard of sourcehut
05:05:32FromDiscord<sharpcdf> ill check it out
05:05:41FromDiscord<sharpcdf> i just want the most popular/common ones
05:05:41FromDiscord<Yardanico> In reply to @sharpcdf "gitea is self-hosted which": not exactly
05:05:48FromDiscord<Yardanico> well yeah it is, sorry
05:05:53FromDiscord<Yardanico> i forgot, though they have a main instance
05:05:57FromDiscord<Yardanico> (edit) "though" => "thought"
05:06:13FromDiscord<sharpcdf> lol yeah no
05:06:16FromDiscord<sharpcdf> they have an example page
05:06:18FromDiscord<sharpcdf> but thats about it
05:06:33FromDiscord<sharpcdf> ill add source hut
05:08:10FromDiscord<Yardanico> also i've seen codeberg a few times
05:08:19FromDiscord<Yardanico> repo.or.cz too
05:08:30FromDiscord<sharpcdf> In reply to @Yardanico "also i've seen codeberg": only popular websites
05:08:37FromDiscord<Yardanico> eh
05:08:47FromDiscord<Yardanico> that's not how it works with open source software :))
05:09:00FromDiscord<Yardanico> it's about what people who use your tool use, not about what's generally popular
05:09:54FromDiscord<sharpcdf> true
05:10:04FromDiscord<sharpcdf> but for me the first priority is the more common ones
05:10:12FromDiscord<sharpcdf> i might get to them later
06:15:04NimEventerNew thread by Xioren: Issues with proxy authentication, see https://forum.nim-lang.org/t/8722
07:47:24FromDiscord<joe733> Hi what's the equivalent of Python's `os.read(fd: int, n: int) -> bytes` in nim?
07:50:35FromDiscord<Elegantbeef> Does that read n number of bytes and return it?
07:50:56FromDiscord<Elegantbeef> If so https://nim-lang.org/docs/io.html#readBytes%2CFile%2CopenArray%5B%5D%2CNatural%2CNatural
08:24:01NimEventerNew post on r/nim by miran1: Nim 1.6.2 is out!, see https://reddit.com/r/nim/comments/rj30uu/nim_162_is_out/
08:40:58FromDiscord<valerga> is gdb a proper debugger for nim code?
08:41:05FromDiscord<valerga> i want to ascend from echo debugging lol
08:41:11FromDiscord<Elegantbeef> You can use it yes
08:41:15FromDiscord<Elegantbeef> Do you use vscode?
08:41:19FromDiscord<valerga> yeah
08:41:31FromDiscord<valerga> i see it has breakpoints
08:41:33FromDiscord<valerga> but i never use them
08:41:39FromDiscord<Elegantbeef> https://github.com/saem/vscode-nim#debugging
08:41:55FromDiscord<Elegantbeef> There is a bit of preamble with Nim debugging in vscode, but this'll get you going
08:42:02*xet7 quit (Ping timeout: 240 seconds)
08:42:10FromDiscord<valerga> ok, thanks
08:42:44FromDiscord<Elegantbeef> I dont often use breakpoint debugging though
08:42:55FromDiscord<Elegantbeef> So if you need help i'm not the person to ask probably 😀
08:55:14*xet7 joined #nim
09:48:57*Colt quit (Quit: Leaving)
09:49:14*Colt joined #nim
10:28:03FromDiscord<TryAngle> is the official youtube channel dead or halted? (no uploads for >5 months now)
10:29:33FromDiscord<Rika> We have an official YouTube channel?
10:29:47FromDiscord<Elegantbeef> It's where nimconf is posted
10:29:49FromDiscord<TryAngle> https://www.youtube.com/channel/UCDAYn_VFt0VisL5-1a5Dk7Q
10:30:22FromDiscord<Elegantbeef> The online meetups havent happened for whatever reason and there hasnt been any events
10:30:46FromDiscord<Elegantbeef> What's supposed to posted tiktok esque "how to"s? 😛
10:31:01FromDiscord<TryAngle> imagine a Nim Tik Tok Account
10:31:23FromDiscord<Elegantbeef> I'm sure after FOSDEM there might be another video or two, though i dont know
10:33:58FromDiscord<valerga> animals
11:21:14*xet7 quit (Remote host closed the connection)
11:22:24*xet7 joined #nim
11:27:34*xet7 quit (Ping timeout: 260 seconds)
11:39:53*xet7 joined #nim
12:06:02*supakeen quit (Quit: WeeChat 3.3)
12:06:31*supakeen joined #nim
12:26:17*noeontheend quit (Ping timeout: 240 seconds)
12:27:24FromDiscord<joe733> sent a code paste, see https://play.nim-lang.org/#ix=3IKk
12:27:38FromDiscord<joe733> (edit) "https://play.nim-lang.org/#ix=3IKk" => "https://play.nim-lang.org/#ix=3IKl"
12:27:57FromDiscord<joe733> (edit) "https://play.nim-lang.org/#ix=3IKl" => "https://play.nim-lang.org/#ix=3IKm"
12:28:12FromDiscord<Solitude> stop trying to write python
12:28:13FromDiscord<joe733> (edit) "https://play.nim-lang.org/#ix=3IKm" => "https://play.nim-lang.org/#ix=3IKn"
12:29:16FromDiscord<joe733> In reply to @Solitude "stop trying to write": Well, can't help much when I'm porting a script from python.
12:31:32FromDiscord<Rika> Use an object variant
12:31:56FromDiscord<Rika> If you do not know the types ahead of time then there is no trivial solution
12:41:30FromDiscord<fenrave> In reply to @TryAngle "imagine a Nim Tik": Nim seems like a great language for that sort of thing
12:44:25FromDiscord<fenrave> Not much point in typing a table if you don't know the types ahead of time, usually you type a table so it only contains on or two types
12:44:38FromDiscord<fenrave> Just don't type it unless you really need it
12:48:37FromDiscord<konsumlamm> you can't not type it though
12:51:15FromDiscord<garuse> @joe733 perhaps you can use a Table[string, string] instead and convert the values to int with parseInt() depending on what you need.
12:51:52FromDiscord<joe733> In reply to @garuse "<@656116929102086147> perhaps you can": Thanks, I did something similar.
12:53:59FromDiscord<konsumlamm> or you use `JsonNode` (from `std/json`)
13:02:35*src joined #nim
13:02:36FromDiscord<fenrave> In reply to @konsumlamm "you can't not type": haven't had the ability to play around with nim so I was speaking from experience with other languages
13:02:51FromDiscord<fenrave> good to know that you need to though
13:06:24FromDiscord<konsumlamm> you don't need to write down the type, but that doesn't mean that it doesn't have a type, it'll be inferred
13:07:15FromDiscord<fenrave> yeah
13:44:43FromDiscord<Rika> In reply to @konsumlamm "or you use `JsonNode`": there should be a better default "semi-any" type that isnt a ref so that we dont need to refer to JsonNode anymore for non-json purposes...
13:44:55FromDiscord<Rika> i guess one that doesnt store itself
13:50:17FromDiscord<Rad> Hi! I'm a bit of a noob when it comes to Nim, I've recently picked it up and just installed a package with nimble. How do I use that package? It is the Moe editor and I am using Debian. I might have missed a step or don't have something in my path.
13:51:16FromDiscord<Rika> ~/.nimble/bin/
13:51:19FromDiscord<Rika> in path
13:51:55FromDiscord<Rad> oh nice, thank you. I should have checked around there 😅
13:52:14FromDiscord<Rika> idk, its not obvious imo
13:54:22FromDiscord<Rad> I was checking in the tooling documentation and I couldn't see anything, so it might not have been obvious. Thank you again.
13:56:15FromDiscord<Rad> The debian package for nim isn't up to date either, is it an official source? I think it's on 1.4.x?
13:57:15FromDiscord<Solitude> is any debian package up to date?
13:57:36FromDiscord<Rad> This is true 😂
13:59:53FromDiscord<Rad> I try to use Arch, but I needed a 32-bit OS...I believe arch has one but idk if it's official or not. But it's not a daily driver, it's just for testing on (very) low-end specs.
14:02:13FromDiscord<konsumlamm> In reply to @Rika "there should be a": honestly, people just shouldn't try to store different types in the same table
14:04:21FromDiscord<ajusa> In reply to @konsumlamm "honestly, people just shouldn't": Sometimes you need to do this though
14:09:28FromDiscord<Rika> try not to do it as much as possible
14:23:01FromDiscord<konsumlamm> often you just think you need to do this
14:25:44*arkurious joined #nim
14:44:43FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3IKR
14:44:49FromDiscord<Rika> thats something else
14:44:59FromDiscord<Rika> its the one with case of in the object declaration
14:45:05FromDiscord<TryAngle> ah I see
14:45:15FromDiscord<TryAngle> In reply to @TryAngle "what is that? is": what is this thing then?
14:45:29FromDiscord<Rika> generic union is what id call it but i dont know the real term
14:45:44FromDiscord<Rika> compile time only so its the same as auto essentially
14:45:50FromDiscord<Rika> except restricted to those types
14:46:11FromDiscord<TryAngle> ah I see and the normal usecase is to restrict generic procs?
14:46:25FromDiscord<Rika> implicit generics yes
14:46:30FromDiscord<Rika> or explicit too i guess
14:47:46FromDiscord<IsaacPaul> In reply to @konsumlamm "honestly, people just shouldn't": I do it all the time when displaying a list of items to a user. Like say you have a list of orders. One could be a special kind of gift card purchase, one could be a package, one could be physical product, one could be a digital product. They are all being displayed as one list. They are all _not_ the same. It makes sense that the list contains different types.
14:48:10FromDiscord<IsaacPaul> And they are all displayed differently
14:48:14FromDiscord<Rika> technically theyre the same type
14:48:19FromDiscord<Rika> just with variands
14:48:20FromDiscord<Rika> (edit) "variands" => "variants"
14:48:29FromDiscord<Rika> and thats an appropriate use case
14:48:30FromDiscord<IsaacPaul> They all have an id 🙂
14:48:44FromDiscord<IsaacPaul> lol
14:48:47FromDiscord<Rika> wdym? variants can have outside fields
14:49:06FromDiscord<Rika> object; field: type; case field: type of kind: field: ...
14:49:51FromDiscord<IsaacPaul> package is a group of orders, a gift card purchase doesn't fall into the same category in our system and has its own table in the database..
14:50:17FromDiscord<Rika> still completely possible for that to be a variant
14:50:46FromDiscord<IsaacPaul> I also add items like Seperator and header. But for example purposes imagine a few of these items just being an Ad
14:50:48FromDiscord<Rika> if JSON can be represented with an object variant then im pretty sure your described system can too..
14:51:14FromDiscord<IsaacPaul> > if JSON can be represented with an object variant ↵Oh that's what you mean
14:51:15FromDiscord<Rika> string representation is decoupled from internal data representation
14:51:20FromDiscord<Rika> same with database representation
14:51:25FromDiscord<Rika> wdym thats what i mean
14:51:38FromDiscord<Rika> lol what did we misunderstand each other with
14:51:53FromDiscord<IsaacPaul> Is a variant some kind of special nim thing or a pattern?
14:53:09FromDiscord<Rika> its a "tagged union" in more common terms
14:55:25FromDiscord<IsaacPaul> In reply to @Rika "and thats an appropriate": I missed this line lol, and thought you were arguing against it lol
14:55:42FromDiscord<IsaacPaul> I just woke up my bad lol
14:56:02FromDiscord<Rika> It’s whatever
15:00:20FromDiscord<TryAngle> what is more idiomatic?↵Big variadic types or OOP ?
15:01:48FromDiscord<TryAngle> for example building a graph that is made out of nodes that have different purposes (one stores int, another string and another one stores subnodes etc.)
15:05:43FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3ILa
15:07:31FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3ILc
15:07:49FromDiscord<Solitude> тщ
15:07:52FromDiscord<Solitude> (edit) "тщ" => "no"
15:08:14FromDiscord<IsaacPaul> It's kinda the same imo.. Essentially, you're just attaching type info to an obj.
15:08:43FromDiscord<TryAngle> ah I see so when it gets compiled they are partially different types anyways?
15:08:55FromDiscord<Solitude> its not the same
15:09:18FromDiscord<IsaacPaul> I meant in an abstract sense
15:09:20FromDiscord<Solitude> you can achieve similiar functionality but its not the same
15:09:30FromDiscord<Solitude> and its more idiomatic to use variants
15:10:45FromDiscord<TryAngle> but why is that? I have never really used OOP anyways so it's not a big deal for me... just curious
15:11:15NimEventerNew thread by Konsumlamm: A rant about Nim bugs, see https://forum.nim-lang.org/t/8723
15:11:44FromDiscord<IsaacPaul> because OOP support isn't exactly first class with nim
15:12:19FromDiscord<IsaacPaul> OOP also implies more things (inheritence, etc)
15:12:29FromDiscord<konsumlamm> why is my name capitalized by NimEventer? 🤔
15:13:20FromDiscord<IsaacPaul> (edit) "OOP also implies more things (inheritence, ... etc)" added "dynamic dispatch table,"
15:13:38FromDiscord<Solitude> In reply to @konsumlamm "why is my name": @Yardanico explain yourself
15:14:04FromDiscord<Yardanico> In reply to @Solitude "<@!177365113899057152> explain yourself": idk it looked betger
15:14:09FromDiscord<Yardanico> (edit) "betger" => "better"
15:14:37FromDiscord<Yardanico> As some people say
15:14:41FromDiscord<Yardanico> PRs welcome
15:14:43FromDiscord<Yardanico> https://github.com/Yardanico/nimeventer/blob/master/src/nimeventer/nimforum.nim#L124
15:15:07FromDiscord<TryAngle> @Yardanico how did you implement the profile picture changes of the discord bot?
15:16:05FromDiscord<Yardanico> In reply to @TryAngle "<@!177365113899057152> how did you": https://github.com/Yardanico/ircord/blob/master/src/ircord.nim#L56
15:16:09FromDiscord<Yardanico> Hash of the username
15:16:37FromDiscord<TryAngle> oh no, I mean on the discord side
15:17:02FromDiscord<TryAngle> I've looked through the code but I couldn't find it 🤔 ↵I think I'm overlooking idk
15:18:05FromDiscord<TryAngle> I mean where you tell the discord bot to use that picture
15:19:30FromDiscord<Yardanico> In reply to @TryAngle "I mean where you": Literally the line I sent you
15:19:37FromDiscord<Yardanico> I'm using webhooks to send messages
15:19:44FromDiscord<TryAngle> o_O
15:19:46FromDiscord<Yardanico> You can specify the avatar URL in a webhook
15:20:10FromDiscord<Yardanico> You can't send as different users with the normal bot API obviously
15:20:14FromDiscord<Yardanico> You need webhooks for that
15:20:23FromDiscord<TryAngle> ah now I understand
15:20:57FromDiscord<TryAngle> I do not know what webhooks are / they exist↵thought this was just a name you gave that "operation"
15:21:01FromDiscord<TryAngle> thanks!
15:22:56FromDiscord<TryAngle> (edit) "they exist↵thought" => "didn't know of their existance↵thought"
15:30:30*xet7 quit (Quit: Leaving)
15:43:07*snow joined #nim
15:43:31*snow is now known as Guest4484
15:44:01*Guest4484 quit (Client Quit)
15:52:39*src_ joined #nim
15:52:40*src_ quit (Remote host closed the connection)
15:55:32*src quit (Ping timeout: 240 seconds)
16:00:59FromDiscord<konsumlamm> In reply to @Yardanico "PRs welcome": https://github.com/Yardanico/nimeventer/pull/3 :P
16:10:07FromDiscord<haxscramper> In reply to @NimEventer "New thread by Konsumlamm:": @konsumlamm the solution is to have a proper specification
16:10:25FromDiscord<haxscramper> Proper executable specification that people can referer to
16:10:28FromDiscord<haxscramper> (edit) "referer" => "refer"
16:10:56FromDiscord<haxscramper> And that is not written in the current compile test suite style
16:11:27FromDiscord<konsumlamm> executable as in "says how to implement it"?
16:11:42FromDiscord<haxscramper> executable as in tests that you can execute
16:11:55FromDiscord<haxscramper> and test suite that covers all possible loopholes and details
16:12:15FromDiscord<haxscramper> like damn, we started writing it for nimskull, and I got like five different bugs from closed as fixed issue
16:12:21FromDiscord<haxscramper> Simply by digging around
16:12:31FromDiscord<haxscramper> codegen bugs, sem bugs, outright compiler crashes
16:12:44FromDiscord<ajusa> In reply to @NimEventer "New thread by Konsumlamm:": I've only ran into a couple bugs during 4 years of using Nim for hobby and side projects. Unfortunately, none of those bugs have been fixed and I was forced to rely on workarounds. The Nim tracker is overflowing with nearly 2000 open issues.
16:12:45FromDiscord<haxscramper> I just sat down to write a spec
16:13:53FromDiscord<haxscramper> https://github.com/nim-works/nimskull/pull/59
16:15:32FromDiscord<haxscramper> In reply to @ajusa "I've only ran into": - 2021: According to the votes, fixing compiler bugs should be our first priority: 55% of our users find it very important
16:15:43FromDiscord<konsumlamm> In reply to @haxscramper "<@!312654963694108674> the solution is": in general i'd agree
16:16:05FromDiscord<haxscramper> - 2019: fixing compiler bugs: According to the votes, this should be our first priority; 55% find it very
16:16:28FromDiscord<konsumlamm> In reply to @haxscramper "And that is not": what's the problem with the current style?
16:16:59FromDiscord<haxscramper> it is an assorted pile of random tests that is riddled with `echo` checks
16:17:19FromDiscord<haxscramper> it is not even possible to accurately accertain something is fixed correctly
16:17:27FromDiscord<haxscramper> tested correctly
16:17:37FromDiscord<ajusa> I don't know how to feel about Nimskull - on one hand I like the idea of the project and the spirit of modernizing some of the std library and compiler. On the other hand, the Nim community is too small to have a schism like this end well, and libraries published for Nimskull may not work for Nim, and vice versa.
16:18:34FromDiscord<haxscramper> https://github.com/nim-works/nimskull/issues/41
16:19:45FromDiscord<haxscramper> people just come in, throw a couple of tests here and there and call it a day
16:20:23FromDiscord<haxscramper> and oh now, this `t239048` checks for some RWC thing that status had five years ago, we can't remove it
16:20:33FromDiscord<haxscramper> (edit) "now," => "no,"
16:21:50FromDiscord<haxscramper> It is hardly possible to test for proper structured compiler diagnostics as well
16:22:03FromDiscord<haxscramper> Or rather, `nimout/errmsg` is an abysmal way of testing things like that
16:24:48FromDiscord<haxscramper> In reply to @ajusa "I don't know how": Sure, but I would prefer to work with even smaller set of people that value correctness and clear, laid out milestones that are necessary to achieve that
16:25:30FromDiscord<haxscramper> even if the correctness comes at a cost of incompatibilities
16:26:25FromDiscord<haxscramper> and by correctness I mean specifically - fully thought through suite of validations that describe interactions between different parts of the language
16:31:45FromDiscord<enthus1ast> can i set the gcsafe pragma also for stuff i call?
16:31:57FromDiscord<enthus1ast> i tried {.push gcsafe.} but it still complains
16:32:43FromDiscord<enthus1ast> i want to make sure it is gcsafe by useing locks
16:32:57FromDiscord<hmmm> I fail to see why good testing can't be done in nim directly, form a workgroup make a paper, get carte blanche from araq and then improve it inside nim
16:33:04FromDiscord<Rika> Isn’t it cast(gcsafe) if you want to fool the compiler
16:33:17FromDiscord<Rika> In reply to @hmmm "I fail to see": Guess the bottleneck
16:33:56FromDiscord<hmmm> there isnt 🤨
16:34:42FromDiscord<enthus1ast> yes that works, thanks @Rika
16:35:16FromDiscord<konsumlamm> In reply to @hmmm "I fail to see": afaiu the problem is that the whole test suite would need to be revamped from the ground up
16:36:16FromDiscord<haxscramper> Current compiler codebase also drags down development
16:37:01FromDiscord<haxscramper> In reply to @hmmm "I fail to see": > , get carte blanche from araq ↵Like that would ever happen
16:37:21FromDiscord<haxscramper> And we either end up with mountains of `knownIssue` things
16:37:39FromDiscord<haxscramper> or we have that crooked spec a-la C++ where things are hacked in because of RWC
16:38:13FromDiscord<haxscramper> for example, correct spec does require (at least if you want to preserve maintainer's sanity) a structured report refactor
16:38:26FromDiscord<haxscramper> This is a whole-compiler refactor, by definitino
16:38:29FromDiscord<haxscramper> (edit) "definitino" => "definitipm"
16:38:31FromDiscord<haxscramper> (edit) "definitipm" => "definition"
16:39:18FromDiscord<haxscramper> How many monts will it take before we agree that https://github.com/nim-lang/RFCs/issues/324 and "json is not suitable" need to be revived
16:39:24FromDiscord<haxscramper> (edit) "monts" => "months"
16:39:55FromDiscord<haxscramper> In reply to @haxscramper "This is a **whole-compiler**": https://github.com/nim-works/nimskull/pull/94
16:41:01FromDiscord<konsumlamm> what does RWC mean?
16:41:11FromDiscord<haxscramper> "Real World Code (TM)"
16:41:16FromDiscord<hmmm> well if it can be done without hurting or slowing araq work on features he will give you the keys of the empire, otherwise yea you can do it outside nim but is there even a way to bring home the good stuff back?
16:41:29FromDiscord<haxscramper> aka "it breaks important packages therefore it is incorrect nim"
16:41:52FromDiscord<haxscramper> or we have compiler devs PR fixes to external packages to fix them
16:43:51FromDiscord<haxscramper> In reply to @hmmm "well if it can": Specification is written explicitly to be abstracted from shortcomings of a particular implementation https://github.com/nim-works/nimskull/pull/125/files#diff-6af95d23509b3d3e819c6dd6d422298d829cfd94023e753b4c95f9bbf43f235bR152-R155
16:44:35FromDiscord<haxscramper> Of course, when I implement structured reports it would no longer be fully portable
16:45:35FromDiscord<Rika> In reply to @hmmm "well if it can": that is up to araq and co
16:46:14FromDiscord<haxscramper> There is a question of
16:46:16FromDiscord<Rika> changes can prolly be upstreamed if they want it to
16:46:42FromDiscord<haxscramper> why so many people decided it is better for them to do a hard fork instead of trying to reason with mainline
16:46:50FromDiscord<haxscramper> but I probably should leave this out of the discussion
16:49:20FromDiscord<Solitude> In reply to @haxscramper "why so many people": d word
16:50:12FromDiscord<Rika> 8 bytes?
16:50:46FromDiscord<konsumlamm> D lang?
16:50:59FromDiscord<Rika> sorry that was a bad joke and i think i got it wrong also
16:51:07FromDiscord<Rika> prolly shoulda said 16 bytes
16:51:13FromDiscord<Rika> i dont remember anymore really
16:51:16FromDiscord<haxscramper> According to the urban dictionary I should be offended
16:51:16FromDiscord<konsumlamm> you got it right for 32 bit architectures
16:51:17FromDiscord<haxscramper> I think
16:51:24FromDiscord<haxscramper> Not sure though
16:51:26FromDiscord<Rika> In reply to @konsumlamm "you got it right": good enough
16:51:52FromDiscord<konsumlamm> though i think intel also uses word to mean 32 bit regardless of the arch?
16:52:00FromDiscord<Rika> huh
16:52:05*src joined #nim
16:52:13FromDiscord<Rika> maybe thats what i remember
16:52:32FromDiscord<Solitude> discussion = derailed
16:53:44FromDiscord<enthus1ast> int32 is superior to dword, no questions left
16:53:44FromDiscord<Rika> thats two d words
16:53:59FromDiscord<konsumlamm> ah no, it's 16 bits
16:54:21FromDiscord<Rika> maybe its windows that dword = 32b
16:54:44FromDiscord<enthus1ast> i always have to google \:D
17:13:49FromDiscord<VVX7> can someone remind me how to get nimsuggest working in vscode on windows? the update to 1.6.2 seems to have broken it
17:19:31FromDiscord<VVX7> using nim-saem. saw this https://github.com/saem/vscode-nim#code-completion already
17:20:09FromDiscord<dom96> did something change with how procs that have a typed pragma macros applied are evaluated in 1.4.0 and 1.6.0?
17:22:31ozzzHi! strange stuff here. I enabled libsanitizer - thread one (in linux), and found that it hangs if I use lock for digit increments, or printing to the std out
17:25:23ozzzwhat it may be? or acquiring and releasing locks should be done differently? binary crashes with err ../nptl/pthread_mutex_lock.c:81: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
17:52:27NimEventerNew post on r/nim by Pcarbonn: Building a simple room-based chat application in Nim (using HTMX), see https://reddit.com/r/nim/comments/rjcn9s/building_a_simple_roombased_chat_application_in/
18:07:32FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3IMk
18:09:13FromDiscord<TryAngle> I know nim is generally more open when it comes to conventions like this but what would be used if it was in the compiler?
18:09:21FromDiscord<TryAngle> (edit) "I know nim is generally more open when it comes to conventions like this ... but" added "by design"
18:09:38FromDiscord<TryAngle> or is this more context dependent?
18:12:46FromDiscord<IsaacPaul> > what would be used if it was in the compiler?↵btrees.nim makes use of the #1
18:13:14FromDiscord<IsaacPaul> ccgexprs uses #2
18:13:21FromDiscord<konsumlamm> In reply to @TryAngle "I know nim is": it really depends on who would write that compiler code
18:13:40FromDiscord<konsumlamm> there is no consent
18:14:08FromDiscord<IsaacPaul> (edit) "ccgexprs" => "ccgexprs.nim" | "#2" => "#2↵and ropes.nim uses #3"
18:14:11FromDiscord<TryAngle> ok that is indeed very open by design then 😂 ↵thanks
18:15:22FromDiscord<IsaacPaul> I prefer #3 as I've never seen inc in any other language that I've worked in
18:15:39FromDiscord<IsaacPaul> but its not big deal either way
18:15:45FromDiscord<IsaacPaul> (edit) "not" => "no"
18:17:04FromDiscord<el__maco> inc is from Pascal isn't it
18:23:55FromDiscord<Rika> i use 1 and 3 depending on my mood xddddddd
18:26:46FromDiscord<Hamid_Bluri> i prefre `a.inc b`
18:26:51FromDiscord<Hamid_Bluri> (edit) "prefre" => "prefer"
18:28:18FromDiscord<Hamid_Bluri> i do whatever i can yo avoid parentheses
18:29:23FromDiscord<Recruit_main707> In reply to @hamidb80 "i prefer `a.inc b`": i also do a.inc b
18:29:34FromDiscord<TryAngle> In reply to @hamidb80 "i prefer `a.inc b`": ah true I forgot about that 😬
18:30:49FromDiscord<Solitude> zamn, people use `inc` with >1 increments?
18:32:02FromDiscord<Hamid_Bluri> with what?
18:32:30FromDiscord<TryAngle> In reply to @Solitude "zamn, people use `inc`": that was what I was wondering XD↵I'm using inc only for += 1 ↵but I just "discovered" that it can also be used for any number and 1 is just the default lol
18:32:52FromDiscord<Hamid_Bluri> there is also `dec` for `-=`
18:33:17FromDiscord<hmmm> In reply to @hamidb80 "i prefer `a.inc b`": I think b doesn't feel respected when you do that so I don't do that 🤨
19:12:17*kayabaNerve quit (Ping timeout: 240 seconds)
19:14:24*yann-kaelig joined #nim
19:15:06yann-kaeligHello
19:21:51yann-kaeligI got as a 200% programming beginner a great idea because I was hesitating in the langauge to learn between C++ and Nim. I'm going to learn both and compare them is all aspect, from their installation, through setting up a workflow, to their documentation, courses and writing the code from scratch.
19:23:40FromDiscord<sheerluck> In reply to @yann-kaelig "I got as a": also learn Python3 and compare all 3 of them
19:25:03yann-kaeligThx for the proposal but I was not attracted by python
19:34:10yann-kaeligI have pedagogical skills that I acquired in school put into practice as a musical teacher which could be useful for Nim language beginners, I will see
19:38:22yann-kaeligI am going to have questions and to start with the 'nim-basics' documentation I already have a first question. Even before writing a 'Hello world' what is a valid Nim program that does nothing which match a C++ code like "int main() { // Write your code here } ?
19:39:33FromDiscord<el__maco> empty document?
19:41:03FromDiscord<el__maco> Nim code doesn't have to exist inside a function like C does, so I think you don't need any boilerplate at all
19:51:46*xet7 joined #nim
19:55:17*xet7 quit (Remote host closed the connection)
19:55:39*xet7 joined #nim
20:28:16yann-kaeligCan I really said that a program does nothing if the code source is only a single-line comments ? In my point of view the program does something but print nothing. What happening behind the scene in this case ? Also I can not find the explanation of the compilation output https://dpaste.com/76R2FLS2Q starting from CC line to the end.
20:29:35yann-kaeligThe program runs, but print nothing, how can I debug this software and see what's going on in this case
20:32:57FromDiscord<Yardanico> CC is when the C compiler is compiling the C code that was compiled by the Nim compiler from the Nim code :)
20:33:03FromDiscord<Yardanico> also not sure what you mean about debug
20:33:09FromDiscord<Yardanico> it's an empty program, there's nothing to debug
20:35:28yann-kaeligYardanico: I don't understand, how the progrma can be empty if I put in it a line which is in this case a comment ?
20:35:46FromDiscord<Yardanico> a comment does not affect the program's runtime
20:35:50FromDiscord<Yardanico> it's simply a hint for the programmer
20:35:57FromDiscord<Yardanico> the compiler just discards it as useless information
20:36:17FromDiscord<Yardanico> unless you use doc comments, those are saved by the compiler for documenting stuff, but they still don't change the result of compilation
20:38:38yann-kaeligYardanico: https://nim-lang.org/docs/docgen.html ?
20:39:03yann-kaeligYou'r talkign about that
20:40:09FromDiscord<Yardanico> yes, nim has a doc generator, `nim doc`, but I don't think we should really discuss comments regarding empty programs :)
20:41:04*noeontheend joined #nim
20:55:16FromDiscord<TryAngle> what are new-style concepts?
20:56:00FromDiscord<Yardanico> https://github.com/nim-lang/RFCs/issues/168
20:57:49FromDiscord<TryAngle> ah with that they look almost identical to Rust traits, interesting
20:58:26FromDiscord<Yardanico> In reply to @TryAngle "ah with that they": still different though :)
20:58:33FromDiscord<Yardanico> if you want something similar there's https://github.com/yglukhov/iface
20:58:37FromDiscord<Yardanico> concepts are a compile time thing only
20:59:12FromDiscord<TryAngle> what are the differences exactly?↵The nim concepts look a bit more flexible 🤔
20:59:13FromDiscord<gandalfs_socks> anybody know if there's a nice way to create an ebook in nim like I would with r and plotly?
20:59:20FromDiscord<Yardanico> In reply to @TryAngle "what are the differences": Nim concepts are a compile time only thing
20:59:20FromDiscord<TryAngle> (edit) "exactly?↵The" => "for example?↵The"
20:59:27FromDiscord<Yardanico> Rust traits are like interfaces
20:59:41yann-kaeligI don't understand what's going on. the first time I compiled my doesnothing.nim program I got 4 CC: output ( my dpaste ), I removed the executable and build the source code a second time, but this time the CC: doesnothing.nim line disappeared and a third time compilation all of the CC: disappeared
20:59:43FromDiscord<TryAngle> ah I see while rust traits can be used for "dyn"
21:00:22FromDiscord<Yardanico> In reply to @yann-kaelig "I don't understand what's": Because Nim keeps a cache of compiled C code
21:00:28FromDiscord<Yardanico> so it doesn't have to fully recompile the C parts each time
21:00:53FromDiscord<Recruit_main707> and if the file doesnt change it doesnt recompile either (?) afaik
21:01:31FromDiscord<Yardanico> not really
21:01:42FromDiscord<Yardanico> nim always does the Nim compilation part
21:02:29FromDiscord<Recruit_main707> but not the c part right?
21:04:22FromDiscord<el__maco> apparently yes. If the intermediate c file did not change, the c compiler is not invoked again
21:04:38FromDiscord<Yardanico> In reply to @Recruit_main707 "but not the c": yes
21:07:08*neurocyte0132889 joined #nim
21:07:08*neurocyte0132889 quit (Changing host)
21:07:08*neurocyte0132889 joined #nim
21:07:53FromDiscord<TryAngle> sent a long message, see http://ix.io/3IN7
21:09:56FromDiscord<TryAngle> i'm getting suprised day by day by these little features
21:13:38yann-kaeligYardanico: Well, I can have something stupid questions like a noob, you saying that Nim compiler "convert/translate/?" nim code to C code then the C compiler compile this C code. Can I see this intermediate code somewhere or it's useless ?
21:14:03FromDiscord<Yardanico> you can, by default it's stored in the cache folder specific to your user and OS, but you can instruct the nim compiler to save it somewhere you want
21:14:05FromDiscord<Yardanico> with `--nimcache:folder`
21:14:19FromDiscord<Yardanico> but just be advised, that code isn't really supposed to be very human readable, especially for beginners
21:14:46FromDiscord<Yardanico> you almost never need to look at it, maybe only if you use Nim and want to debug some compiler issue that involves the backend (the part that compiles Nim code to C)
21:15:05FromDiscord<Yardanico> (edit) "backend" => "codegen"
21:16:25FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3IN9
21:16:46FromDiscord<TryAngle> (let's ignore the practicality)
21:17:17*noeontheend quit (Ping timeout: 240 seconds)
21:17:41FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3IN9" => "https://play.nim-lang.org/#ix=3INa"
21:21:51*xet7 quit (Remote host closed the connection)
21:25:36*xet7 joined #nim
21:35:27FromDiscord<TryAngle> in VSC in a new project nim suddeny uses 2 spaces instead of 4↵how do I set it to 4 (VSC uses 4 on User, Remote and Workspace)?
21:35:39FromDiscord<konsumlamm> In reply to @TryAngle "so something like this:": that would work
21:36:10FromDiscord<Solitude> !eval import macros; dumpTree: let poly = 1.x1² + 1.x2² - 4
21:36:10NimBotCompile failed: <no output>
21:37:03FromDiscord<Solitude> `Ident "x2²"`
21:37:17*xet7 quit (Remote host closed the connection)
21:37:36FromDiscord<Solitude> `²` is part of the identifier, not an operator
21:38:03FromDiscord<Solitude> !eval import macros; dumpTree: (let poly = 1.x1² + 1.x2² - 4)
21:38:03NimBotCompile failed: <no output>
21:38:23FromDiscord<Solitude> nvm, its compiler output...
21:38:55FromDiscord<TryAngle> In reply to @Solitude "`²` is part of": that was the idea 🤔 ↵you can't just add x^2 with x anyways
21:38:57yann-kaeligwell, so looking inside my .cache/nim/doesnothing_d/ folder I can see three differents type of files: '.c' which is pretty clear to understand thanks to the comments. a type '.c.o' No idea what's this file, and a '.json' which look like a log of the compilation with some info ( Is this file used somewhere ? can I use/parse this file to output some values somewhere else ? ) And finally from where all the
21:38:58yann-kaeligse std libs comes from, generated/downloaded/... by whom ?
21:40:05FromDiscord<Yardanico> In reply to @yann-kaelig "well, so looking inside": your message got cut off
21:40:11FromDiscord<Yardanico> .c.o is the compiled .c files
21:40:14FromDiscord<Yardanico> they're object files
21:40:26FromDiscord<Yardanico> the stdlib is written in Nim, it comes preinstalled with your Nim installation
21:40:43FromDiscord<Yardanico> https://nim-lang.org/docs/lib.html
21:42:56FromDiscord<qb> any fancy idea to parse any type string to a type? eg.: "int32" -> int32 - Not a huge fan of having a case there for all types
21:43:15FromDiscord<qb> (edit) "case" => "`case`"
21:44:19*xet7 joined #nim
21:45:14yann-kaeligYardanico: and what about the .json file, sry if I'm asking again about it
21:45:31FromDiscord<Yardanico> it's just a description of the commands Nim used to compile the C files
21:45:43FromDiscord<Yardanico> In reply to @qb "any fancy idea to": you mean at compile time?
21:45:54FromDiscord<qb> At runtime
21:46:02FromDiscord<Solitude> lol
21:46:27FromDiscord<Solitude> any snippets?
21:47:26FromDiscord<Yardanico> In reply to @qb "At runtime": I don't think you can simplify it really
21:47:36FromDiscord<Yardanico> you can make it "look" simpler by moving the complexity elsewhere
21:47:41FromDiscord<Yardanico> like making a template or a macro
21:47:46FromDiscord<Yardanico> but that doesn't make it simpler
21:57:16*mal`` quit (Quit: Leaving)
21:58:26FromDiscord<qb> alright
22:10:14FromDiscord<Elegantbeef> @qb\: what're the types though, is it any type or just integers?
22:11:05*mal`` joined #nim
22:12:32FromDiscord<Elegantbeef> Regardless there will be a case statement, i'm just interested 😀
22:12:37yann-kaeligAll of this is very interesting even if I have a lot of things to learn, among other things the config files and I found a documentation about nim's memory management which is at high level for now for me. Really, thank you very much Yardanico for your help, finally I spent all the time on nim, that a good sign :)
22:12:49FromDiscord<qb> um any I guess. Why does that actually return a `void`? https://play.nim-lang.org/#ix=3INl
22:15:17FromDiscord<Elegantbeef> This wont work as you expect anyway
22:15:42FromDiscord<Elegantbeef> But `typedesc` as a return type defaults to void it seems
22:16:46FromDiscord<Elegantbeef> Also you know `int` and `uint` are platform specific?
22:17:35FromDiscord<Elegantbeef> And `float` is 64bit regardless
22:18:52FromDiscord<qb> In reply to @Elegantbeef "Also you know `int`": You mean the bytesize of 4 or 8 bytes on x86/x64? If so yes
22:19:19FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3INp something like this will be what you want i think
22:19:35FromDiscord<Elegantbeef> typedesc is a compile time only thing
22:19:48FromDiscord<Elegantbeef> You cannot use it at runtime like you wanted
22:20:04FromDiscord<qb> Oh okay. Thank you
22:20:54FromDiscord<Elegantbeef> Depending on what you're doing you may need an object variant
22:21:04FromDiscord<Elegantbeef> Either way case statement galore 😛
22:34:09*yann-kaelig left #nim (#nim)
22:43:20NimEventerNew Nimble package! wavecore - Client and server database and networking utils, see https://github.com/ansiwave/wavecore
23:09:48FromDiscord<TryAngle> how would I implement a concept that abstracts over multiple Operators?
23:14:07FromDiscord<TryAngle> sent a code paste, see https://paste.rs/80g
23:14:18FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3INE" => "https://play.nim-lang.org/#ix=3IND"
23:17:16*Guest2 joined #nim
23:17:55Guest2I just intalled 1.6.0 and csfml stopped working
23:18:19Guest21.6.2
23:18:30Guest2SIGSEGV: Illegal storage access. (Attempt to read from nil?)
23:18:41Guest2someone knows why this could be?
23:19:41Guest2csfml links to dlls and I think there is a problem trying to load them
23:23:13NimEventerNew thread by BarrOff25: Check nim compiler version during compilation, see https://forum.nim-lang.org/t/8724
23:43:59FromDiscord<theangryepicbanana> In reply to @TryAngle "this is what I": `[Add]` declares `Add` as a new type variable, you should try doing `proc operate[T: Add](x, y: T): T = ...`
23:44:38FromDiscord<theangryepicbanana> (alternatively, you could just do `proc operate(x, y: Add): Add = ...` and you'll get the same effect)
23:45:44*xet7 quit (Quit: Leaving)
23:46:27*xet7 joined #nim
23:50:11FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3INL
23:50:36FromDiscord<theangryepicbanana> In reply to @TryAngle "thanks, sadly I'm getting": yeah that's because `int` supports `+` and ``
23:50:48FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3INL" => "https://play.nim-lang.org/#ix=3INM"
23:51:28FromDiscord<TryAngle> what would be the way to keep using int but restrict the operation to only one?
23:51:40FromDiscord<theangryepicbanana> you could use a distinct type
23:52:41FromDiscord<theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=3INN
23:53:53FromDiscord<TryAngle> the issue I'd have then is being restricted to int.↵What I'd like to accomplish is algebra over any type and operator 🤔
23:54:17FromDiscord<theangryepicbanana> well you need some way to distinguish which operator you want to use