<< 24-06-2021 >>

00:37:51*aeverr joined #nim
01:39:30*xet7 quit (Ping timeout: 265 seconds)
01:44:25FromDiscord<demotomohiro> thx
02:06:26*arkurious quit (Quit: Leaving)
03:14:02*Gustavo6046 quit (Ping timeout: 250 seconds)
03:15:22*Gustavo6046 joined #nim
03:32:11rockcaverashould the two cases compile? https://play.nim-lang.org/#ix=3qWw
03:34:27FromDiscord<checkersai> Can I not make a generic distinct type?
03:34:43FromDiscord<checkersai> sent a code paste, see https://play.nim-lang.org/#ix=3qWx
03:40:50FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=3qWz
03:40:58FromDiscord<Elegant Beef> It's a static type so it needs to be `static int`
03:42:14FromDiscord<Elegant Beef> Generics expect types so without it passing in a value causes an error
03:42:30FromDiscord<checkersai> ah that'll do it
03:42:31FromDiscord<checkersai> thanks
03:51:12*Prestige joined #nim
03:51:28*fn joined #nim
03:51:30FromDiscord<checkersai> sent a code paste, see https://play.nim-lang.org/#ix=3qWC
03:51:38FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3qWD
03:51:56fn<Prestige> Hello
03:52:19*Prestige quit (Quit: Client closed)
03:56:12*Prestige joined #nim
03:56:16*Prestige left #nim (#nim)
03:58:00*fn quit (Remote host closed the connection)
03:58:18*fn joined #nim
04:01:21FromDiscord<Elegant Beef> The reason the second thing doesnt work i think is it's a generic so there is not exact place "borrow" from i think
04:03:27FromDiscord<Elegant Beef> Oh you got your irc forwarding working prestige?
04:05:10*sagax joined #nim
04:05:30FromDiscord<checkersai> sent a code paste, see https://play.nim-lang.org/#ix=3qWK
04:06:02*supakeen quit (Quit: WeeChat 3.2)
04:06:40*supakeen joined #nim
04:08:08FromDiscord<Elegant Beef> That's cause it's a typeclass so you cannot borrow that
04:09:37FromDiscord<checkersai> I can't borrow array access operators?
04:09:52FromDiscord<Elegant Beef> Seems it only works for concrete types
04:10:05FromDiscord<checkersai> So I just have to implement a hack where I cast the distinct array into an array?
04:10:12FromDiscord<Elegant Beef> `openarray[T]` isnt concrete
04:10:30FromDiscord<checkersai> sent a code paste, see https://paste.rs/weV
04:11:15FromDiscord<Elegant Beef> Why cast just do `array[N,int](arr)[i]`
04:13:06FromDiscord<Elegant Beef> May also want to checkout `typetraits.distinctBase` think it can be used to make this not need the generic always
04:14:17FromDiscord<checkersai> In reply to @Elegant Beef "Why cast just do": Wouldn't a cast be more efficient?
04:14:35FromDiscord<Elegant Beef> Distinct conversion to base is free
04:14:55FromDiscord<checkersai> ah
04:15:01FromDiscord<Rika> In reply to @checkersai "Wouldn't a cast be": Not necessarily, but it is always more dangerous
04:15:17FromDiscord<Rika> Be more wary of using cast
04:15:26FromDiscord<checkersai> I am generally wary
04:15:38FromDiscord<checkersai> I'm just looking for a way to make a distinct array work
04:24:43*rockcavera quit (Remote host closed the connection)
04:29:23fn<Prestige> Yep @Elegant Beef
04:29:36fn<Prestige> seems to be working decently so far, I think
04:30:48fn<Prestige> Maybe I should put in a special case for the FromDiscord bot to not show <FromDiscord>, clutters up the messages a bit
04:59:37FromDiscord<checkersai> y'know I've never seen an ECS implementation in any language that didn't involve hacking around the type system
04:59:49FromDiscord<checkersai> makes me wonder if it's worth the trouble of trying to make my own
05:00:01FromDiscord<Elegant Beef> polymorph is pretty nice
05:00:03FromDiscord<checkersai> because damn it's tough
05:00:15FromDiscord<checkersai> In reply to @Elegant Beef "polymorph is pretty nice": it is, yeah
05:00:57fn<Prestige> I agree checkersai
05:16:23FromDiscord<checkersai> I'm not even in it for the performance I just like the organizational aspect of ecs
05:27:34*fn quit (Remote host closed the connection)
05:28:00*fn joined #nim
05:32:44fn<Prestige> Yeah. I think having a good ecs implementation or multiple inheritance would be nice
06:47:37fn<ForumUpdaterBot> New thread by Arnetheduck: Nim-ws - websockets for Nim, see https://forum.nim-lang.org/t/8153
06:50:10FromDiscord<planetis> maybe you'll like this? https://github.com/planetis-m/goodluck↵(@checkersai)
06:56:33fn<Prestige> I'll check that out, thanks
07:19:31FromDiscord<checkersai> In reply to @planetis "maybe you'll like this?": thanks
07:39:34*max22- joined #nim
07:47:24FromDiscord<hamidb80> hey
07:47:43FromDiscord<hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3qXm
07:47:53FromDiscord<hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3qXn
07:49:35FromDiscord<hamidb80> (edit) "https://play.nim-lang.org/#ix=3qXn" => "https://play.nim-lang.org/#ix=3qXo"
07:49:51FromDiscord<hamidb80> (edit) "https://play.nim-lang.org/#ix=3qXo" => "https://play.nim-lang.org/#ix=3qXp"
07:55:18fn<Prestige> maybe just make it a template?
07:55:58FromDiscord<hamidb80> yeah, good idea
08:01:59FromDiscord<gerwy> Do anyone know how can i cross-compile from OSX to Linux?
08:02:20FromDiscord<gerwy> Is it as easy as with Windows with only mingw or does i need to deploy docker and compile it there
08:08:16FromDiscord<Varriount> In reply to @Life Sucks "Do anyone know how": Getting the compiler to generate the correct source code is fairly straightforward (it's just a command-line switch). Invoking the C compiler correctly might be a bit more tricky.
08:08:45FromDiscord<Varriount> (edit) "In reply to @Life Sucks "Do anyone know how": Getting the compiler to generate the correct ... source" added "C"
08:09:27FromDiscord<gerwy> that doesn't say to me anything
08:10:18fn<Prestige> Check https://nim-lang.org/docs/nimc.html --os
08:11:20FromDiscord<gerwy> yeah
08:11:28FromDiscord<gerwy> i tried `--os:linux`
08:12:08FromDiscord<gerwy> https://media.discordapp.net/attachments/371759389889003532/857533537879851008/Zrzut_ekranu_2021-06-24_o_10.12.04.png
08:12:16FromDiscord<gerwy> thats why im asking
08:16:37fn<Prestige> I've never cross compiled so idk, sorry can't help much on this
08:17:15FromDiscord<gerwy> hmm i just need to know if i need to install it↵linker says i need
08:17:31FromDiscord<gerwy> i always has docker as my plan B, but i prefer easier way
09:06:34*PMunch joined #nim
09:09:18*PMunch quit (Client Quit)
09:17:35*SebastianM joined #nim
09:20:56*PMunch joined #nim
09:51:41*SebastianM quit (Quit: Bye)
09:56:25*xet7 joined #nim
10:01:51*xet7 quit (Remote host closed the connection)
10:02:56*xet7 joined #nim
10:15:00*Arrrrrrrrr joined #nim
10:20:23*Torro joined #nim
12:00:43*max22- quit (Ping timeout: 246 seconds)
12:04:47*Arrrrrrrrr quit (Quit: Arrrrrrrrr)
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:38*supakeen joined #nim
12:12:15FromDiscord<tomck> Hello, the `alloc` function - is this equivalent to `malloc` in C, or is it doing some garbage collection funny business behind the scenes?
12:12:25FromDiscord<tomck> I just want to manually manage some block of memory, is `alloc` the way to go here
12:16:00FromDiscord<Rika> Yes but there is a kinda better proc to use (`create`)
12:16:20FromDiscord<Rika> Alloc is roughly equivalent but not equal to malloc
12:18:29FromDiscord<tomck> what's the difference between alloc & create
12:22:49FromDiscord<no name fits> In reply to @tomck "what's the difference between": Alloc is a template and create is a proc
12:23:53FromDiscord<no name fits> Also alloc just gives a pointer and create gives a typed pointer
12:24:03FromDiscord<no name fits> From what I can see
12:24:11*rockcavera joined #nim
12:24:11*rockcavera quit (Changing host)
12:24:11*rockcavera joined #nim
12:26:04FromDiscord<no name fits> I just looked at the docs though
12:33:39FromDiscord<no name fits> So, how would you guys make a GUI app for mobile and Windows, that can easily fill out the contents for a shipping container? It's basically just what the thing is, how many of the thing, what the thing weighs, how much the thing is worth. Like as a big list. And then a container serial number and a from and to. Right now my boss is using paper and then writing it into a word document, but he asked if I could come up with something
12:34:22FromDiscord<zetashift> with Nim? use fidget I'd say
12:34:31FromDiscord<no name fits> I'm still just ass at doing GUI in Nim
12:34:38FromDiscord<no name fits> Fidget? Will look into it
12:34:46FromDiscord<zetashift> you can also do a PWA
12:34:49FromDiscord<zetashift> using karax
12:35:01FromDiscord<zetashift> but I have very to no experience with PWA
12:35:08FromDiscord<zetashift> very little\
12:35:24FromDiscord<no name fits> No server. It has to be native
12:36:11FromDiscord<no name fits> I'll start with fidget I guess, thanks
12:36:42FromDiscord<zetashift> PWA are still cliennt side↵(@no name fits)
12:37:11FromDiscord<zetashift> I think?
12:37:44FromDiscord<no name fits> I thought PWA was just a normal web page with some offline webworkers?
12:38:14FromDiscord<System64 ~ Flandre Scarlet> is there a simple audio framework with an audio callback proc please?
12:38:35FromDiscord<no name fits> But my backup is making an electron app
12:41:33fn<ForumUpdaterBot> New Nimble package! exporttosqlite3 - Export Nim functions to sqlite3, see https://github.com/niklaskorz/nim-exporttosqlite3
12:41:33fn<R2D2> itHub: 7"<No Description>"
12:41:51FromDiscord<hamidb80> hey
12:43:07FromDiscord<hamidb80> do you think it's a bug?↵https://play.nim-lang.org/#ix=3qYk
12:44:50PMunchYou find he weirdest bugs..
12:45:22PMunchIt seems to eagerly set point.x to y before it does - point.x
12:45:46PMunchIf you rename the variable on line 6 to something other than point it works
12:45:54FromDiscord<hamidb80> haha, i fear if i open another issue `@timotheecour` kill me
12:45:57PMunchBut I'd say this is definitely a bug
12:46:14FromDiscord<hamidb80> (edit) "haha, i fear if i open another issue `@timotheecour` ... kill" added "would"
12:46:36PMunchSeems like an optimisation that didn't take everything into account
12:46:44FromDiscord<hamidb80> yeah
12:46:59PMunchOh wow, this is going to get annoying fast..
12:47:23PMunchThere is apparently now a bot that bridges this and the old Freenode channel. And whenever I talk here I ping myself in that channel..
12:47:45FromDiscord<hamidb80> what is your opinion about clojure?
12:47:53PMunchI kinda like it
12:47:53FromDiscord<hamidb80> versus Nim
12:48:05PMunchWell, it's a lot less versatile than Nim
12:48:07FromDiscord<vindaar> clojure is awesome
12:48:17FromDiscord<vindaar> and their docs are amazing. But I wouldn't trade Nim for it
12:48:23FromDiscord<hamidb80> do you think learning clojure worth it?
12:48:29PMunchFor example writing a small script in it wouldn't work great since the JVM would have to spin up first
12:48:48PMunchAnd yeah, the Clojure docs are amazing
12:48:58FromDiscord<zetashift> THere is babashka nowadays for that
12:49:13PMunchI'd say it's worth it if for nothing else you'll learn a functional language
12:49:19FromDiscord<vindaar> Personally I think it is worth learning. Or any lisp really (yea, yeah, that old comment). But clojure in particular because of its functional focus
12:49:41FromDiscord<zetashift> I'm learning Lisp by configuring my neovim with Fennel
12:49:49FromDiscord<hamidb80> ok, thank you both
12:50:19PMunchI can greatly recommend this resource for learning Clojure: https://www.braveclojure.com/introduction/
12:51:32FromDiscord<zetashift> +1 I've read a few pages it's solid↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
12:51:52FromDiscord<hamidb80> does interactive REPL in clojure help much ?
12:52:04FromDiscord<hamidb80> how often do you use ut?
12:52:06FromDiscord<hamidb80> (edit) "ut?" => "it?"
12:52:51PMunchCan't remember, it's been ages since I tried Clojure
12:53:04FromDiscord<vindaar> yup, also a thumbs up from me for clojure for the brave and true. Own the physical book as well. I also own the joy of clojure, but haven't read much from it so far 🙈
12:53:15PMunchIt's actually a roundabout way how I found Nim
12:53:35FromDiscord<vindaar> In the last \~2 years not at all really. Somewhat of a similar story as PMunch's for me↵(@hamidb80)
12:54:28FromDiscord<vindaar> I do keep thinking about using it again for something just for fun though
12:55:00FromDiscord<hamidb80> In reply to @hamidb80 "do you think it's": i wanna open an issue for it, what title do you suggest?
12:56:22FromDiscord<System64 ~ Flandre Scarlet> Is there simple audio framework / lib with callback proc please?
12:59:43fn<ForumUpdaterBot> New post on r/nim by richardd08: Does the Nim Jetbrains plugin not work for anyone else? It keeps telling me that the Nim executable is not added to PATH even though it is., see https://reddit.com/r/nim/comments/o70d9d/does_the_nim_jetbrains_plugin_not_work_for_anyone/
13:00:54FromDiscord<haxscramper> In reply to @System64 "Is there simple audio": No need to spam a question, try to formulate the requirements better. I don't have the slightest idea what you are trying to find.
13:01:44fn<ForumUpdaterBot> New post on r/nim by miran1: NimConf 2021 (June 26th), see https://reddit.com/r/nim/comments/o70eg0/nimconf_2021_june_26th/
13:02:10FromDiscord<zetashift> Even in other languages like Scala or Elixir I don't really use their REPL that much, so people consider it a serious must-have for fast prototyping though
13:05:38FromDiscord<System64 ~ Flandre Scarlet> In reply to @haxscramper "No need to spam": sorry, I'll try to formulate it in a better way↵I'm looking for an audio lib, easy to use which have a callback function↵I hope it's formulated in a better way
13:06:03FromDiscord<haxscramper> ...
13:06:24PMunchThat's the same way, just with slightly more words..
13:07:06PMunchWhen do you want it to call your callback?
13:07:09FromDiscord<haxscramper> Callback function for what? Just any random lib that has a callback functions? Can you describe what do you want it to do, or how you want to use it (e.g. what you are working on and what you are trying to figure out)?
13:07:18PMunchWhat kind of audio, what platform(s)
13:07:31FromDiscord<haxscramper> Don't be afraid to provide more info
13:07:36FromDiscord<System64 ~ Flandre Scarlet> crossplatform, audio buffer
13:08:03PMunchHave you had a look here? https://nimble.directory/search?query=audio
13:08:14FromDiscord<vindaar> [haxscramper](https://matrix.to/#/@haxscramper:matrix.org)\: just saw your comment about the pretty printing of types things. Is your `pprint` thing in your `hpprint`? It looks like something I want 🙃
13:09:12FromDiscord<System64 ~ Flandre Scarlet> I'm having right now
13:09:51FromDiscord<hamidb80> In reply to @hamidb80 "i wanna open an": https://github.com/nim-lang/Nim/issues/18342
13:09:52FromDiscord<haxscramper> https://github.com/haxscramper/hpprint
13:09:54fn<R2D2> itHub: 7"Generic configurable pretty-printer with partial auto-layout. Correctly handles unicode text and ANSI escape codes in text."
13:10:30FromDiscord<haxscramper> But I'm currently writing v2.0 that would be included with `hmisc` (because I don't want it to be a separate package since I do have some issues with dependencies)
13:10:49FromDiscord<vindaar> ok, cool!
13:11:08FromDiscord<haxscramper> v2.0 would be full rewrite using google's global layout optimization, 256-color styling support etc
13:11:55FromDiscord<haxscramper> Well, it is mostly done, since I don't have to write layouter and most of the `T` -\> `PPrintTree` conversion is already implemented
13:12:32FromDiscord<vindaar> sounds great
13:14:32FromDiscord<haxscramper> But hpprint is fully usable even now, I just want to have a cleaner reimplementation and some additional features
13:14:42FromDiscord<haxscramper> And cut out some things I didn't need
13:18:09FromDiscord<vindaar> I'll give it a try. Will get back to you if I stumble somewhere
13:24:21FromDiscord<gerwy> guys, is anyone able to make one-liner out of that? https://media.discordapp.net/attachments/371759389889003532/857612104239153172/Zrzut_ekranu_2021-06-24_o_15.24.06.png
13:24:26FromDiscord<gerwy> like using `;` etc.
13:29:19FromDiscord<vindaar> just put the if statement into parenthesis and and it should work in one line
13:29:20FromDiscord<vindaar> not sure why you'd want that of course
13:30:23FromDiscord<gerwy> i don't
13:30:26FromDiscord<gerwy> its just for fun
13:30:36FromDiscord<vindaar> haha, ok \:)
13:30:47FromDiscord<gerwy> don't you know 10 PRINT pattern from C64?
13:31:05FromDiscord<gerwy> https://media.discordapp.net/attachments/371759389889003532/857613800047247360/iu.png
13:31:25FromDiscord<gerwy> basically it randomly places / or \ into entire screen
13:31:35FromDiscord<gerwy> and it was remade in sooo many languages
13:32:00FromDiscord<vindaar> yeah, I've seen it before. Doesn't explain why it should be in one line though 😅
13:34:49FromDiscord<gerwy> its fun to experminent
13:34:53FromDiscord<gerwy> (edit) "experminent" => "experiment"
13:35:09*tiorock joined #nim
13:35:09*tiorock quit (Changing host)
13:35:09*tiorock joined #nim
13:35:09*rockcavera is now known as Guest5631
13:35:09*Guest5631 quit (Killed (copper.libera.chat (Nickname regained by services)))
13:35:09*tiorock is now known as rockcavera
13:44:34FromDiscord<gogolxdong (liuxiaodong)> Any recommended gaming framework in Nim ?
13:45:15FromDiscord<gerwy> raylib
13:45:16FromDiscord<gerwy> nico
13:47:05FromDiscord<haxscramper> Does anyone have a quick example on how to use `gprof` with nim? I've searched for mentions, and I've seen several people (like leorize, arnetheduck and Araq saying that it works and could/should be used)?
13:47:45FromDiscord<haxscramper> I've added `-pg` options to both linker and parser and nim (checked whether they were correctly added in `.json` compilation script)
13:48:11FromDiscord<haxscramper> But after running the profiled application it should supposedly generate `gmon.out`, which does not happen
13:49:08FromDiscord<leorize> it does happen, but remember that the profile data is stored on the same folder as the C files↵(@haxscramper)
13:49:18*arkurious joined #nim
13:52:08FromDiscord<leorize> oh wait that's gcov
13:52:11FromDiscord<haxscramper> Thanks, found it. Though it was not in the C files directory in in the directory from where I was running compiler
13:52:17FromDiscord<haxscramper> not where application was stored
13:52:21FromDiscord<leorize> lol
13:52:27FromDiscord<leorize> yea, gcc is weird
13:52:34FromDiscord<haxscramper> Now I feel stupid for not just doing `fd gmon.out`
13:53:05FromDiscord<haxscramper> is `nimFrame` using `10.65` of the time normal?
13:53:20FromDiscord<haxscramper> It means i have a function call overhead, correct?
13:53:31FromDiscord<haxscramper> a lot of function call overhead
13:53:34FromDiscord<leorize> disable stacktrace
13:54:02FromDiscord<leorize> nimFrame is inserted by `--stacktrace:on` and prevents inlining
13:54:59FromDiscord<haxscramper> Good, `1337ms` down to `530ms`
13:55:16FromDiscord<leorize> lol, 1337ms
13:55:49FromDiscord<haxscramper> Any options for function name demangling and getting positional information?
13:56:10FromDiscord<leorize> read the .ndi files
13:56:41FromDiscord<leorize> that's the only option til Araq implements actual name mangling for Nim
13:57:12FromDiscord<leorize> for positional \`--linedir\:on\`\`
13:58:41fn<georgia> hi all
13:58:44FromDiscord<haxscramper> to get `.ndi` I have to enable `--debugger:native` as well
13:58:54FromDiscord<haxscramper> Alright, this is good enough, I can work with that
14:00:00FromDiscord<haxscramper> I assume that means getting function signatures is not possible?
14:00:32FromDiscord<leorize> ndi should get you where they are at
14:00:33FromDiscord<haxscramper> Nim function signatures
14:00:42FromDiscord<leorize> but it's inconvenient, right
14:02:25FromDiscord<haxscramper> Does `nim-gdb.py` demangle things differently somehow?
14:03:18FromDiscord<haxscramper> From what I can tell after briefly looking it just matches strings all over the place with regex and reformats for better appearance?
14:03:27FromDiscord<haxscramper> Or there is more going on and I should look deeper into this?
14:04:13FromDiscord<leorize> it doesn't the last time I checked, but maybe [saem](https://matrix.to/#/@saem:matrix.org) knows more
14:14:18*fn quit (Remote host closed the connection)
14:14:34*fn joined #nim
14:15:50*rockcavera quit (Remote host closed the connection)
14:23:10FromDiscord<Avahe> Test
14:23:38fn<Prestige> Cool, it's working
14:24:02FromDiscord<leorize> hmm, what bridge is that?
14:24:30fn<Prestige> My bridge between the freenode and libera #nim channels
14:25:47FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3qYJ
14:25:50FromDiscord<Rika> wdym?
14:25:57FromDiscord<Rika> no
14:26:01FromDiscord<Rika> i believe not
14:26:05FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3qYK
14:27:50FromDiscord<vindaar> you can write a macro for it if you really want it. But it's not really a good idea to abuse that for this
14:29:41FromDiscord<vindaar> wrote this a couple of years ago, because someone asked the same thing https://gist.github.com/Vindaar/b008cf68819bb87e497b2c24ba84b6a1
14:30:02FromDiscord<Smarc> Thanks for your help guys!
14:30:12FromDiscord<Smarc> Is it somehow bad practice or why should I not do it anyway?
14:30:55*PMunch quit (Quit: leaving)
14:31:02FromDiscord<vindaar> I mean you shouldn't use a macro just because you want to avoid an `and` or similar in my opinion
14:31:40FromDiscord<vindaar> macros are great, but you can easily break them, add quite a few lines of code for barely any win, make you have to put the expression into some macro scope etc
14:33:57FromDiscord<Rika> its much work for little gain
14:37:36FromDiscord<haxscramper> In this case you can implement `a OP b OP c` using TRM macros
14:38:15FromDiscord<haxscramper> So no new scope
14:39:31FromDiscord<zetashift> Maybe this is one of these cases that just because you can it doesn't mean you should :P
14:40:17FromDiscord<Rika> maybe? it pretty much is
14:42:32FromDiscord<vindaar> oh, good point! I've still never used term rewriting macros. Always forget about them 😁
14:44:02FromDiscord<haxscramper> I also don't use them
14:44:19*max22- joined #nim
14:44:21FromDiscord<haxscramper> I don't think I've seen anyone really use them
14:45:02FromDiscord<haxscramper> But the idea of TRM macros is absolutely great, there just some hiccups in the implementation, and you need to be very careful with transformations
14:45:53*al1ranger joined #nim
14:46:17FromDiscord<Rika> theyre great but its kinda scary to think about isnt it? its very very very implicit, might send a lot of people for a loop trying to find whats wrong with their code
14:46:25FromDiscord<Rika> just to realise its because of a TRM
14:49:03FromDiscord<haxscramper> Implicit code transformations are not great, but there are other applications, for example I showed https://forum.nim-lang.org/t/7837 example of how one can implement user-defined warnings
14:50:20FromDiscord<hugogranstrom> TRM as of now is basically useless as well as it has an upper limit for how many substitutions it makes in the code 😛
14:50:37*al1ranger quit (Remote host closed the connection)
14:54:12FromDiscord<haxscramper> You mean per-invocation limit or there is a global one?
14:54:32FromDiscord<haxscramper> Biggest issue is that `{.noRewrite.}` is broken
14:54:47FromDiscord<haxscramper> Everything else is tolerable
14:55:05FromDiscord<haxscramper> But `noRewrite` is a showstopper for the most applications
15:34:36*Gustavo6046 quit (Ping timeout: 250 seconds)
15:35:30*Schnouki quit (*.net *.split)
15:35:30*GreaseMonkey quit (*.net *.split)
15:35:30*[R] quit (*.net *.split)
15:35:30*notchris quit (*.net *.split)
15:35:31*flynn quit (*.net *.split)
15:35:33*[RMS] joined #nim
15:35:35*notchris_ joined #nim
15:35:37*greaser|q joined #nim
15:36:03*Schnouki joined #nim
15:36:51*flynn joined #nim
15:37:03FromDiscord<hugogranstrom> In reply to @haxscramper "Biggest issue is that": Yes a global one, at least a year ago when I tried it out. It worked for like 30-50 invocations and then it didn't trigger anymore
15:37:08*[RMS] quit (Client Quit)
15:38:05*[R] joined #nim
15:38:38*Gustavo6046 joined #nim
15:40:30FromDiscord<etothepiiminus1> I’m curious about agent based programming in Nim due to some niceties and metafeatures—coming from Py. Does anyone know of any suggested libraries etc ? Thanks as always
15:41:56FromDiscord<Rika> agent based?
15:43:38*vicfred joined #nim
15:49:16FromDiscord<etothepiiminus1> In reply to @Rika "agent based?": https://en.wikipedia.org/wiki/Agent-based_model?wprov=sfti1
16:04:06*stkrdknmibalz quit (Ping timeout: 258 seconds)
16:06:39*supakeen quit (Remote host closed the connection)
16:07:03*supakeen joined #nim
16:14:52FromDiscord<arne> @haxscramper nim-gdb.py doesn't demangle anything afaik.
16:15:36*rockcavera joined #nim
16:15:36*rockcavera quit (Changing host)
16:15:36*rockcavera joined #nim
16:15:46FromDiscord<arne> The version that I wrote just matching with regex on types, so that string and seq types are property detected as such by the debugger and can be explored with interactive debuggers.
16:16:55FromDiscord<arne> if you want to break on function `foo` but it is called foo123abcdef instead, you can use `rbreak foo`
16:17:21FromDiscord<arne> it matching every function with `foo` as part of its name
16:32:34FromDiscord<Kermithos> sent a code paste, see https://play.nim-lang.org/#ix=3qZK
16:33:43FromDiscord<Kermithos> I only found multipart and json posts in the httpclient docs but I have no idea how I would do this
16:44:57*springb0k quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
16:46:27FromDiscord<gerwy> Pls i need help quickly↵does anyone know how to cross-compile nim with raylib to windows?↵i used -d:mingw but it didn't worked
16:46:56FromDiscord<zetashift> What's your error
16:48:26FromDiscord<gerwy> it seems that nim uses \ instead of / when i want to use mingw
16:50:27FromDiscord<gerwy> greenfork recommends me to use docker...
16:55:01FromDiscord<gerwy> but i got emscripten to work so i will get it to work tooo
16:55:02FromDiscord<gerwy> (edit) "tooo" => "to"
16:55:05FromDiscord<gerwy> (edit) "to" => "too"
17:07:00FromDiscord<Kermithos> sent a code paste, see https://play.nim-lang.org/#ix=3r0P
17:08:11*Torro quit (Quit: leaving)
17:08:56FromDiscord<haxscramper> vindaar\: btw if you have any requests for features, on pretty-printing since I'm currently rewriting things and it would be pretty easy to account for additional features
17:09:18FromDiscord<haxscramper> While it might be harder to do after I finish main implementation parts
17:12:11FromDiscord<vindaar> I fully understand the sentiment, but from the top of my head...↵Well, I don't know what features are there in the first place right now. I mainly want to be able to print all types (including refs, so that printing of `NimNodes` works fine without `repr`). And what's already there\: multiple colors + smart indentation
17:39:27*SebastianM joined #nim
17:49:20FromDiscord<bloatoo> bitcoin fraud
17:49:22FromDiscord<bloatoo> 😄
17:51:44FromDiscord<de_inferno> yay bot
17:57:10FromDiscord<fl> ayup just got the bot↵Sympathetic#8466
18:20:14FromDiscord<Alea> Alright why is there no consistency between != And not?
18:20:26FromDiscord<Alea> Is ! used for something else?
18:22:54FromDiscord<haxscramper> `!=` is a template that expands to `not(a == b)`
18:23:16FromDiscord<haxscramper> https://github.com/nim-lang/Nim/blob/version-1-4/lib/system/comparisons.nim#L130
18:23:27FromDiscord<Alea> Hmm
18:23:46FromDiscord<Alea> So I could make my own template that extends to not(a)
18:23:57FromDiscord<Alea> (edit) "extends" => "expands"
18:24:26FromDiscord<haxscramper> You mean `template !`?
18:24:49FromDiscord<Alea> Yes
18:24:53FromDiscord<Alea> Or is that already in use
18:25:42FromDiscord<haxscramper> I don't think it is already in use, but I would advise you to not define `untyped` templates for such basic operators because at some point it will clash with other proc
18:26:12FromDiscord<haxscramper> For example some library might implement `!`, and IIRC `untyped` template always wins in overload resolution, so it would be problematic
18:26:20FromDiscord<haxscramper> To use this library
18:26:43FromDiscord<haxscramper> Also, nim mostly uses keywords for logic, so better to stick with `not/and/or/xor` etc.
18:31:53FromDiscord<timotheecour> sent a code paste, see https://play.nim-lang.org/#ix=3r1t
18:33:23FromDiscord<timotheecour> (edit) "https://play.nim-lang.org/#ix=3r1t" => "https://play.nim-lang.org/#ix=3r1v"
18:36:26*greaser|q quit (Changing host)
18:36:26*greaser|q joined #nim
18:36:29*greaser|q is now known as GreaseMonkey
18:36:45*petrj joined #nim
18:39:13*kasperk81 joined #nim
18:44:27kasperk81hi, when running nim unit tests, i am getting an error like ".cache/nim/trepr_d/stdlib_repr_v2.nim.c:270:51: error: invalid use of incomplete typedef 'FILE'". i am not too familiar with nim, but i couldn't figure out what / where should i add missing linkage?
18:45:12FromDiscord<Canelhas> sent a long message, see http://ix.io/3r1y
19:05:42kasperk81any tips how to resolve it would be appreciated. :)
19:05:59kasperk81detailed logs are at: https://paste2.org/bEOI3Awv
19:06:08FromDiscord<dom96> kasperk81: need more info, it sounds like your nim install is borked. Did you try just compiling hello world?
19:07:15kasperk81dom96: it's a unit test run of nim-lang/nim repo. it doesn't seem like an installation problem, as thousand of other tests are passing. it is specific to how this test is set up.
19:10:52*fputs joined #nim
19:11:56*SebastianM quit (Quit: Bye)
19:15:00petrjkasperk81: it does look like some linker flag is missing in this test setup. if most programs and tests are working fine, then this test requires some update https://github.com/nim-lang/Nim/blob/devel/tests/arc/trepr.nim (but i'm not sure how the typical fix for the linker/include errors look like in nim).
19:17:47kasperk81same, i read that test code a few times, but nothing is immediately jumping at me. someone familiar with nim internals might be able to spot the issue.
19:23:48*rockcavera quit (Remote host closed the connection)
19:37:05*rockcavera joined #nim
19:37:05*rockcavera quit (Changing host)
19:37:05*rockcavera joined #nim
19:42:03*xet7 quit (Remote host closed the connection)
19:43:25*xet7 joined #nim
19:58:59*supakeen quit (Remote host closed the connection)
19:59:23*supakeen joined #nim
20:08:33*beshr joined #nim
20:08:59*max22- quit (Remote host closed the connection)
20:10:50*max22- joined #nim
20:16:33*stkrdknmibalz joined #nim
20:25:06*rockcavera quit (Ping timeout: 252 seconds)
20:49:01*rockcavera joined #nim
20:49:01*rockcavera quit (Changing host)
20:49:01*rockcavera joined #nim
21:26:29FromDiscord<treeform> In the nim type system can you say all types but `ref` types but `object` type? Like `ref array`, `ref string` `ref enum` but not ref object?
21:29:29FromDiscord<clyybber> `ref[not object]`
21:29:31FromDiscord<treeform> this appears to work `type NotObject = tuple | enum | proc | ptr | distinct | array | set | seq` not sure if there is a better way
21:30:18FromDiscord<treeform> In reply to @Clyybber "`ref[not object]`": `ref[not object]` works thanks!
21:33:17*max22- quit (Quit: Leaving)
21:44:15FromDiscord<Ricky Spanish> how do you check length/size of table?
21:46:37FromDiscord<treeform> In reply to @Ricky Spanish "how do you check": `table.len()`
21:47:03FromDiscord<treeform> Is it just me or is `Option` is basically same thing as a `ref` ?
21:47:27FromDiscord<vindaar> huh?↵(@treeform)
21:47:53FromDiscord<vindaar> if you abuse a ref such that `nil` is `none` then i suppose it's a poor man's `Option`?
21:48:53FromDiscord<treeform> a simpler option? no imports, nil easier to work with?
21:48:57FromDiscord<checkersai> In reply to @treeform "Is it just me": No?
21:49:12FromDiscord<vindaar> reference semantics vs. value semantics, access give SIGSEGV vs. raises an exception etc
21:49:41FromDiscord<dom96> You can't modify the value that's inside an Option
21:49:44FromDiscord<vindaar> they might share similarities, but their intention / use case is very different
21:51:32FromDiscord<checkersai> In reply to @dom96 "You can't modify the": Yes you can
21:52:48FromDiscord<dom96> oh you're right, there is a `get` that returns a `var`
21:54:24FromDiscord<treeform> https://media.discordapp.net/attachments/371759389889003532/857740465239097394/unknown.png
21:54:37FromDiscord<treeform> Nearly identical API
21:56:13FromDiscord<vindaar> except that the `Option` case is↵● clearer to the reader↵● you don't have to deal with `nil` checks (which are now ambiguous between pointer types from a wrapped lib for instance and this)↵● you still have reference semantics when copying the object
21:56:18FromDiscord<checkersai> Options are safer because they do more to force you to check
21:56:25FromDiscord<checkersai> Its purpose is clearer
21:56:33FromDiscord<vindaar> and if you ever forget to check if it's nil you get an exception in the `Option` case
21:56:42FromDiscord<checkersai> And an Option[int] is allocated on the stack
22:00:05FromDiscord<checkersai> Side note, I'm not a big fan of how you can ommit parenthesis when calling functions with `x.f`↵Like with `x.get` vs `x.get()`
22:00:42FromDiscord<checkersai> Makes it easy to confuse between field access and calling a function
22:01:06FromDiscord<checkersai> (edit) "field" => "variable"
22:01:33FromDiscord<treeform> but also allows you to start with a field and promote it to a getter/setter later on.
22:02:04FromDiscord<checkersai> If it looks like a field it should be a field and if it's a function it should look like a function imo
22:02:16FromDiscord<checkersai> C# does this too and I don't like it there either
22:02:46FromDiscord<gerwy> then make it look like a function , parenthesis are optional, so you can put them if you prefer it
22:03:34FromDiscord<checkersai> But others might not which makes looking at their source code a bit harder
22:06:00FromDiscord<dom96> `obj.field = 42` is this a function call? 🙂
22:07:38FromDiscord<treeform> ^ that's a macro for sure
22:09:02FromDiscord<checkersai> In reply to @dom96 "`obj.field = 42` is": It could be
22:09:53FromDiscord<checkersai> Since functions can return vars↵`someOption.get() = 42` is valid
22:11:08FromDiscord<dom96> not only that, Nim allows you to define setters: https://nim-lang.org/docs/manual.html#procedures-properties
22:15:37FromDiscord<Ricky Spanish> sent a code paste, see https://play.nim-lang.org/#ix=3r2d
22:18:44FromDiscord<treeform> you probably need to `import tables`
22:19:08*stkrdknmibalz quit (*.net *.split)
22:19:08*Schnouki quit (*.net *.split)
22:19:08*GreaseMonkey quit (*.net *.split)
22:19:08*notchris_ quit (*.net *.split)
22:19:09*sagax quit (*.net *.split)
22:19:09*Epsilon quit (*.net *.split)
22:19:10*vicfred quit (*.net *.split)
22:19:10*flynn quit (*.net *.split)
22:19:11*federico3 quit (*.net *.split)
22:19:11*fputs quit (*.net *.split)
22:19:11*kasperk81 quit (*.net *.split)
22:19:11*arkurious quit (*.net *.split)
22:19:12*FromDiscord quit (*.net *.split)
22:19:12*aeverr quit (*.net *.split)
22:19:12*kots quit (*.net *.split)
22:19:13*arkanoid quit (*.net *.split)
22:19:13*koltrast quit (*.net *.split)
22:19:13*rockcavera quit (*.net *.split)
22:19:13*beshr quit (*.net *.split)
22:19:13*supakeen quit (*.net *.split)
22:19:13*Gustavo6046 quit (*.net *.split)
22:19:13*[R] quit (*.net *.split)
22:19:13*ozzz quit (*.net *.split)
22:19:14*mjsir911 quit (*.net *.split)
22:19:14*emery quit (*.net *.split)
22:19:14*joast quit (*.net *.split)
22:19:14*joshbaptiste quit (*.net *.split)
22:19:14*Jjp137 quit (*.net *.split)
22:19:14*redj quit (*.net *.split)
22:19:14*crem quit (*.net *.split)
22:19:14*ormiret quit (*.net *.split)
22:19:15*Helios quit (*.net *.split)
22:19:15*ayyy_lmao quit (*.net *.split)
22:19:15*petrj quit (*.net *.split)
22:19:15*mikko quit (*.net *.split)
22:19:15*Ekho quit (*.net *.split)
22:19:16*def- quit (*.net *.split)
22:19:16*systemdsucks quit (*.net *.split)
22:19:16*Onionhammer quit (*.net *.split)
22:19:16*nixfreak_nim[m] quit (*.net *.split)
22:19:16*saem[m] quit (*.net *.split)
22:19:16*DrWhax quit (*.net *.split)
22:19:16*euantorano quit (*.net *.split)
22:19:16*robertmeta quit (*.net *.split)
22:19:17*Zoom[m] quit (*.net *.split)
22:19:17*dmu quit (*.net *.split)
22:19:17*jfinkhaeuser quit (*.net *.split)
22:19:17*blackbeard420 quit (*.net *.split)
22:19:17*dbohdan quit (*.net *.split)
22:19:17*Clonkk[m] quit (*.net *.split)
22:19:17*mal`` quit (*.net *.split)
22:19:17*Oddmonger quit (*.net *.split)
22:19:17*dom96 quit (*.net *.split)
22:19:18*Amun-Ra quit (*.net *.split)
22:19:18*mahlon quit (*.net *.split)
22:19:18*greyrat quit (*.net *.split)
22:19:18*oprypin quit (*.net *.split)
22:19:18*nisstyre quit (*.net *.split)
22:19:18*snowolf quit (*.net *.split)
22:19:19*oz quit (*.net *.split)
22:23:33*aeverr joined #nim
22:23:33*Onionhammer joined #nim
22:23:33*systemdsucks joined #nim
22:23:33*def- joined #nim
22:23:33*Ekho joined #nim
22:23:33*mikko joined #nim
22:23:33*ayyy_lmao joined #nim
22:23:33*petrj joined #nim
22:23:33*sagax joined #nim
22:23:33*notchris_ joined #nim
22:23:33*GreaseMonkey joined #nim
22:23:33*Schnouki joined #nim
22:23:33*ozzz joined #nim
22:23:33*[R] joined #nim
22:23:33*Gustavo6046 joined #nim
22:23:33*supakeen joined #nim
22:23:33*beshr joined #nim
22:23:33*rockcavera joined #nim
22:23:33*Epsilon joined #nim
22:23:33*FromDiscord joined #nim
22:23:33*federico3 joined #nim
22:23:33*arkurious joined #nim
22:23:33*flynn joined #nim
22:23:33*vicfred joined #nim
22:23:33*kasperk81 joined #nim
22:23:33*fputs joined #nim
22:23:33*Amun-Ra joined #nim
22:23:33*dom96 joined #nim
22:23:33*Oddmonger joined #nim
22:23:33*mal`` joined #nim
22:23:33*mahlon joined #nim
22:23:33*Clonkk[m] joined #nim
22:23:33*dbohdan joined #nim
22:23:33*koltrast joined #nim
22:23:33*arkanoid joined #nim
22:23:33*crem joined #nim
22:23:33*redj joined #nim
22:23:33*joshbaptiste joined #nim
22:23:33*Jjp137 joined #nim
22:23:33*joast joined #nim
22:23:33*emery joined #nim
22:23:33*mjsir911 joined #nim
22:23:33*oz joined #nim
22:23:33*snowolf joined #nim
22:23:33*nisstyre joined #nim
22:23:33*oprypin joined #nim
22:23:33*greyrat joined #nim
22:24:01*Helios joined #nim
22:24:01*lucerne quit (Max SendQ exceeded)
22:24:07*blackbeard420 joined #nim
22:24:07*Zoom[m] joined #nim
22:24:07*dmu joined #nim
22:24:07*jfinkhaeuser joined #nim
22:24:10*DrWhax joined #nim
22:24:10*nixfreak_nim[m] joined #nim
22:24:10*saem[m] joined #nim
22:24:10*euantorano joined #nim
22:24:10*robertmeta joined #nim
22:24:24*ormiret joined #nim
22:24:37*kots joined #nim
22:25:04*stkrdknmibalz joined #nim
22:27:44*Clonkk[m] quit (Ping timeout: 252 seconds)
22:27:53*Zoom[m] quit (Ping timeout: 244 seconds)
22:28:03*nixfreak_nim[m] quit (Ping timeout: 272 seconds)
22:28:03*saem[m] quit (Ping timeout: 272 seconds)
22:28:26*Helios quit (Ping timeout: 272 seconds)
22:32:19FromDiscord<konsumlamm> In reply to @treeform "Is it just me": the main difference is that with options, you can do something like `some(none(int))` which would just be `nil` for refs
22:32:47*Gustavo6046 quit (Ping timeout: 265 seconds)
22:36:01fn<ForumUpdaterBot> New thread by IvanS: Windows : how to get active window title, see https://forum.nim-lang.org/t/8154
22:37:54*Jjp137 quit (Ping timeout: 244 seconds)
22:38:12*Jjp137 joined #nim
22:38:56*joshbaptiste quit (Ping timeout: 244 seconds)
22:40:22*joshbaptiste joined #nim
22:43:19*Gustavo6046 joined #nim
22:43:55*fputs quit (Ping timeout: 258 seconds)
22:52:39fn<ForumUpdaterBot> New post on r/nim by RattleyCooper: Any nim tutorials for people coming from python?, see https://reddit.com/r/nim/comments/o7atjk/any_nim_tutorials_for_people_coming_from_python/
23:02:15FromDiscord<Phytolizer> i just realized how similar Nim is to Pascal after learning the latter. really cool seeing a modern take on that syntax
23:15:30*Gustavo6046 quit (Ping timeout: 240 seconds)
23:30:42FromDiscord<checkersai> Well Araq did model many parts of the language after Pascal
23:31:02FromDiscord<checkersai> And he was a Pascal programmer
23:36:49FromDiscord<checkersai> Also didn't he start writing Nim(rod) in Pascal?
23:49:26*Gustavo6046 joined #nim
23:52:57FromDiscord<Phytolizer> interesting