<< 14-08-2020 >>

00:11:09*Jjp137 joined #nim
00:17:43FromDiscord<SeanOMik> This output can't be right, right?
00:17:43FromDiscord<SeanOMik> https://play.nim-lang.org/#ix=2u6i
00:18:01FromDiscord<SeanOMik> String is 8 bytes but uint64 is also 8 bytes?
00:18:08disrupteksure.
00:18:14disruptekstrings are pointers.
00:18:27FromDiscord<SeanOMik> Oh yeah
00:18:43FromDiscord<SeanOMik> So the size changes as characters are added right?
00:18:48Yardanicosizeof - no
00:18:51Yardanicosizeof is compile-time
00:18:54disruptekhow could it?
00:18:54Yardanicostrings are heap allocated
00:18:57disruptekit's a pointer.
00:19:03Yardanicoit's length, capacity, and data
00:19:16FromDiscord<SeanOMik> What I mean, is the amount of memory is "uses" increases
00:19:21Yardanicoof course?
00:19:24FromDiscord<SeanOMik> What the `string` points to would increase in size
00:19:32Yardaniconim doesn't have a built-in black hole generator yet
00:19:41FromDiscord<SeanOMik> Yeah I was clarifying for disruptek
00:19:43Yardanicohttps://github.com/nim-lang/Nim/blob/devel/lib/system/strs_v2.nim#L12 that's how strings are defined in new runtime
00:19:49Yardanico(with arc, orc, etc)
00:20:09Yardanicoobject with length and pointer to "payload" which is capacity and the data itself
00:20:19FromDiscord<SeanOMik> Okay
00:20:30FromDiscord<SeanOMik> Thanks
00:20:32Yardanicoit's a bit different in old runtime
00:20:45Yardanicoalso btw, strings and seqs have the exact same memory layout
00:21:07Yardanicobut that's an implementation detail :D
00:28:52*D_ quit (Ping timeout: 260 seconds)
00:30:49disruptektell me what kinda baby you want and i'll give you pricing. bulk pricing for 3 or more.
00:32:04*D_ joined #nim
00:52:40*Pisuke joined #nim
00:54:02*MyMind quit (Ping timeout: 256 seconds)
01:03:17*D_ quit (Ping timeout: 260 seconds)
01:05:59*D_ joined #nim
01:08:37FromDiscord<drsensor👹> sent a code paste, see https://play.nim-lang.org/#ix=2u6p
01:12:28FromDiscord<Elegant Beef> use the push/pop pragma
01:12:50FromDiscord<Elegant Beef> https://nim-lang.org/docs/manual.html#pragmas-push-and-pop-pragmas
01:13:10FromDiscord<Elegant Beef> Actually on second thought that probably wont work here idk
01:13:35FromDiscord<Elegant Beef> *It probably will, but im daft so i second guess myself in a manner to make myself appear humble*
01:17:11Yardanico@drsensor you can always create templates
01:17:14Yardanicoif you borrow the same things
01:17:18Yardanicofor different types
01:35:01*audiofile quit (Quit: Default Quit Message)
01:56:07*apahl quit (Ping timeout: 260 seconds)
01:58:02*apahl joined #nim
02:03:11*waleee-cl quit (Quit: Connection closed for inactivity)
02:13:50FromDiscord<Varriount> Helooo
02:14:11FromDiscord<Varriount> Yardanico: Is 4raq back yet?
02:14:18Yardanicowhy do you ask me?
02:14:21Yardanicoand I don't think he's back yet :)
02:14:26Yardanicoyou'll clearly see when he will back
02:14:32Yardanicoby increased github activity
02:18:14FromDiscord<Varriount> Yardanico: How goes CPS?
02:18:33disruptekit's coming along.
02:18:35Yardanicoi don't know, ask Zevv and disruptek :) they're doing some `typed` changes afaik
02:19:31disruptekswitching to a typed macro will make it easier to use more of the language in cps procs.
02:37:39*muffindrake quit (Ping timeout: 246 seconds)
02:40:08*muffindrake joined #nim
02:53:50*apahl quit (*.net *.split)
02:53:51*Jjp137 quit (*.net *.split)
02:53:51*fredrikhr quit (*.net *.split)
02:53:51*ForumUpdaterBot quit (*.net *.split)
02:53:51*Cthalupa quit (*.net *.split)
02:53:52*hyiltiz quit (*.net *.split)
02:53:52*antranigv quit (*.net *.split)
02:53:52*GaveUp quit (*.net *.split)
02:53:52*disbot quit (*.net *.split)
02:53:52*federico3 quit (*.net *.split)
02:53:52*shashlick quit (*.net *.split)
02:55:24*vicfred quit (Quit: Leaving)
02:59:47*apahl joined #nim
02:59:47*Jjp137 joined #nim
02:59:47*fredrikhr joined #nim
02:59:47*ForumUpdaterBot joined #nim
02:59:47*Cthalupa joined #nim
02:59:47*hyiltiz joined #nim
02:59:47*antranigv joined #nim
02:59:47*GaveUp joined #nim
02:59:47*disbot joined #nim
02:59:47*federico3 joined #nim
02:59:47*shashlick joined #nim
03:01:56*endragor joined #nim
03:03:13*casaca quit (Ping timeout: 264 seconds)
03:16:31disruptekit smells like someone needs a walk.
03:25:22Zevvok ok I'm going
03:48:06*dulsi quit (Ping timeout: 260 seconds)
03:55:41Zevvand to be clearn, I'm doing just about nothing, I just listen to disruptek rambling and say "uhu uhu" at the appropriate moments
03:56:17Zevvand asking tons of stupid questions because I don't understand most of all this
03:56:35Zevvlike how disruptek is going to tell a cps call and inject the continuation
03:56:41Zevvyou hear me, disruptek?
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:10:26*supakeen_ joined #nim
04:10:26*snowolf quit (Remote host closed the connection)
04:10:26*snowolf joined #nim
04:10:26*snowolf quit (Changing host)
04:10:26*snowolf joined #nim
04:13:23*vicfred joined #nim
04:52:12*casaca joined #nim
04:56:30FromDiscord<Elegant Beef> Where is the documentation of what `do` does 😄
04:58:41Yardanicohttps://nim-lang.org/docs/manual_experimental.html#do-notation
05:04:52*rockcavera quit (Remote host closed the connection)
05:05:43FromDiscord<Elegant Beef> Ok im super confused by do, i can see in this case it seems to give the `pollEvents` function, but uncertain how exactly to use it↵https://github.com/liquid600pgm/aglet/blob/master/tests/tcloud.nim#L293
05:06:02Yardanicouse what?
05:06:28FromDiscord<Elegant Beef> do
05:06:33Yardanicowell read what I linked?
05:06:49Yardanicodo is just when you need to pass a proc to something
05:06:53Yardanicoor a code block
05:06:56Yardanicoif you do pure "do:"
05:27:11FromDiscord<Rika> The do notation
05:27:21FromDiscord<Rika> Oops, was underscrolled
05:27:27FromDiscord<Rika> Didn't see the extra messages
05:47:31*Pisuke quit (Read error: Connection reset by peer)
05:47:50*suchasurge quit (Quit: Ping timeout (120 seconds))
05:48:09*suchasurge joined #nim
05:48:41*Pisuke joined #nim
05:49:21*lbart quit (Read error: Connection reset by peer)
05:49:23*CcxWrk quit (Remote host closed the connection)
05:49:35*lbart joined #nim
05:49:35*lbart quit (Changing host)
05:49:36*lbart joined #nim
05:49:37*CcxWrk joined #nim
05:50:31*jken quit (Quit: ZNC - https://znc.in)
05:50:40*jken joined #nim
05:50:45*Vladar joined #nim
05:51:05*supakeen_ quit (Ping timeout: 240 seconds)
05:51:53*supakeen_ joined #nim
06:05:43*solitudesf joined #nim
06:35:42*PMunch joined #nim
07:09:36*s4mu3lbk joined #nim
07:09:47*s4mu3lbk quit (Remote host closed the connection)
07:10:56*krux02 joined #nim
07:26:47*JustASlacker joined #nim
08:28:31FromDiscord<Varriount> Bah. Darn pragma design. I really wish pragmas could be placed before the thing they modify, rather than somewhere inside
08:29:12FromDiscord<Rika> i mean technically they can
08:29:33FromDiscord<Varriount> Right now the syntax just doesn't lend itself to common usage
08:30:10FromDiscord<Varriount> Rika: not in such a way that they can modify the next statement/expression
08:31:32FromDiscord<Varriount> I honestly don't understand why Araq is against it so much
08:31:34FromDiscord<Rika> well i said technically 😛
08:31:43FromDiscord<Clyybber> Varriount: WDYM?
08:31:51FromDiscord<Clyybber> We have pragma blocks
08:31:52FromDiscord<Rika> you can always ask when he's back
08:32:07FromDiscord<Varriount> @Clyybber Like Python decorators
08:32:23FromDiscord<Clyybber> Ah, hmm. I prefer the current syntax
08:32:31FromDiscord<Clyybber> I think its a matter of acquired taste
08:33:37FromDiscord<Varriount> Would you prefer it if I designed a CLI library like this?
08:33:43FromDiscord<Varriount> https://click.palletsprojects.com/en/7.x/
08:34:39FromDiscord<Varriount> What if I want to provide a specification for how an object's fields are serialized?
08:35:40FromDiscord<Varriount> The current syntax works if you use 1 or 2 pragmas, or use a single large user defined pragma
08:36:05FromDiscord<Varriount> But it breaks down for use cases like that, which is a shame
08:49:06*Trustable joined #nim
09:02:00FromDiscord<Clyybber> I don't see the problem using pragma syntax here, the only difference is that the pragma comes after the header
09:03:39*dddddd_ is now known as dddddd
09:11:04*waleee-cl joined #nim
09:15:50*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:21:37*NimBot joined #nim
09:33:36*sschwarzer joined #nim
09:34:53*xace quit (Ping timeout: 260 seconds)
09:41:21*xace joined #nim
09:45:55*liblq-dev joined #nim
09:46:22*xace quit (Ping timeout: 256 seconds)
10:05:23*superbia joined #nim
10:19:57*PMunch quit (Quit: leaving)
10:25:27*Vladar quit (Remote host closed the connection)
10:42:08*xace joined #nim
11:10:56*arecacea1 quit (Remote host closed the connection)
11:11:29*arecacea1 joined #nim
11:17:35*awe00 joined #nim
11:18:24*sschwarzer quit (Quit: leaving)
11:26:01*letto quit (Quit: Konversation terminated!)
11:28:03*letto joined #nim
11:40:20FromDiscord<abisxir> Do we have also type forward declaration like what we have for proc?
11:40:49*Vladar joined #nim
11:41:17FromDiscord<lqdev> nope
11:41:29FromDiscord<lqdev> you have to declare mutually dependent types in one type section
11:43:04FromDiscord<abisxir> Hummm, then the implementation is going to get complicated :/
11:49:05*JustASlacker quit (Ping timeout: 240 seconds)
12:02:10*abm joined #nim
12:02:44*JustASlacker joined #nim
12:06:02*supakeen_ quit (Quit: WeeChat 2.8)
12:06:43*supakeen joined #nim
12:16:24FromDiscord<Kiloneie> sent a long message, see http://ix.io/2u8E
12:16:36FromDiscord<Rika> what?
12:18:00FromDiscord<Kiloneie> Scrap that, is there any way to iterate without a repr proc ?
12:18:11FromDiscord<Kiloneie> on ref objects in a sequence
12:21:00FromDiscord<Rika> wdym? just iterate over it normally?
12:21:50*rockcavera joined #nim
12:21:52FromDiscord<Kiloneie> How ? Everything i tried makes an illegal storage access
12:22:18FromDiscord<Zachary Carter> you need to initialize the members of your sequence if they're ref objects
12:22:31FromDiscord<Zachary Carter> remember ref objects are allocated on the heap, not the stack
12:22:50FromDiscord<Kiloneie> init as in make them ? like with new proc ?
12:22:57FromDiscord<Kiloneie> man let me just copy pasta some code
12:23:00FromDiscord<Zachary Carter> yes
12:23:14FromDiscord<Kiloneie> without my comment army for the video xD
12:28:26FromDiscord<Kiloneie> https://play.nim-lang.org/#ix=2u8J
12:29:04FromDiscord<Kiloneie> There is something fishy going on... if i remove every part of Person code, it goes whackado oO
12:30:00FromDiscord<Kiloneie> i might have removed too much
12:30:17FromDiscord<Kiloneie> https://play.nim-lang.org/#ix=2u8K
12:30:30FromDiscord<Kiloneie> i tried the last commented out part, and well no idea
12:34:47FromDiscord<Rika> you're not returning o
12:34:49FromDiscord<haxscramper> If I generate untyped nim node (expression) using macro, is there any way to check its type immediately or I have to generate `let res = <expr>; static: assert res is <target-type>; res` instead of original expression?
12:35:24FromDiscord<Zachary Carter> I don't understand what' so difficult here...
12:35:24FromDiscord<Zachary Carter> https://play.nim-lang.org/#ix=2u8M
12:35:29FromDiscord<Rika> @Kiloneie you're not returning o in the newPerson proc
12:35:40FromDiscord<Zachary Carter> use implicit result
12:36:10FromDiscord<Zachary Carter> some of your comments are misleading too - of course the stack allocated memory will be freed, it will be when the frame is popped off of the stack
12:36:14FromDiscord<Kiloneie> my bad on the implicit result xD...
12:36:18FromDiscord<gokr> Am I correct that in "current Nim" I can't pass nil to a string argument - nor return nil I guess? And the "new way" is to use Option if not "" is enough?
12:36:32FromDiscord<Zachary Carter> yes strings can no longer be nil
12:36:49FromDiscord<Zachary Carter> and yes you should use the option type if you want to represent the lack of a vlaue
12:36:52FromDiscord<Zachary Carter> (edit) 'vlaue' => 'value'
12:36:54FromDiscord<Kiloneie> oh... you can use repr anywhere ,oh xD
12:37:15FromDiscord<gokr> And are people... now designing APIs using Option instead? or other patterns?
12:37:37FromDiscord<Zachary Carter> sure - I mean Nim didn't invent the idea of an option type
12:37:45FromDiscord<Zachary Carter> I use it in m yproject
12:37:48FromDiscord<Zachary Carter> (edit) 'm yproject' => 'my project'
12:37:55FromDiscord<gokr> Just curious what the "Nim way" is.
12:38:01FromDiscord<Zachary Carter> yeah - use Option
12:38:11FromDiscord<Zachary Carter> of course if you're using pointers and ref objects you can still use nil
12:38:23FromDiscord<Zachary Carter> but some ref objects like strings and seqs have different semantics now
12:38:27FromDiscord<Zachary Carter> and can't be assigned nil values
12:38:33FromDiscord<gokr> Right, strings and seqs.
12:38:42FromDiscord<Zachary Carter> tables too maybe?
12:38:51FromDiscord<Zachary Carter> maybe all collections in the stdlib? I'm not sure
12:39:27FromDiscord<gokr> Is there some writeup about this change somewhere? blog article?
12:39:39FromDiscord<Zachary Carter> mm I think it's been around since Nim 1.0 actually
12:40:00FromDiscord<Zachary Carter> I can try to find something but I don't remember specifically if there was an official article about it
12:40:04FromDiscord<vieru> hi idk how to use macros can someone tell me if something that i want to do is possible using them ?
12:40:05FromDiscord<Zachary Carter> I think 4raq may have written about it on his blog
12:40:14*awe00 quit (Quit: WeeChat 2.9)
12:40:16FromDiscord<gokr> Yeah, I ... have sortof punted using nilseqs:on but... I realized I may have to "get with the program"
12:40:28FromDiscord<Zachary Carter> vieru: macros allow you to modify the AST of your program at compile time
12:40:47FromDiscord<Zachary Carter> https://nim-lang.org/araq/ownedrefs.html
12:40:55FromDiscord<Zachary Carter> @gokr ^ mentions it
12:41:44FromDiscord<vieru> @Zachary Carter thanks
12:42:57FromDiscord<Zachary Carter> also here @gokr https://nim-lang.org/araq/destructors.html
12:43:07FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2u8Q
12:43:16FromDiscord<Zachary Carter> so actually I think Nim's containers are now value types and not ref types
12:43:32FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2u8R
12:43:53FromDiscord<vieru> basically i just want to do something like this
12:44:03FromDiscord<Zachary Carter> @gokr - https://play.nim-lang.org/#ix=2u8S
12:44:14FromDiscord<vieru> ```nim↵let file = someMacro("file.html")↵```
12:44:17FromDiscord<Zachary Carter> you don't need a macro for that
12:44:23FromDiscord<vieru> oh
12:44:35FromDiscord<vieru> so what should i use
12:44:38FromDiscord<gokr> @Zachary Carter Yeah, I realize that's the "end goal" for string/seq - to make them "value types", or at least "more value typish".
12:44:41FromDiscord<Zachary Carter> you can use a template or a compile time proc
12:45:03FromDiscord<vieru> aah so templates do this sort of stuf ?
12:45:06FromDiscord<vieru> (edit) 'stuf' => 'stuff'
12:45:24FromDiscord<Zachary Carter> templates are akin to C's preprocessor macros but more powerful
12:45:26FromDiscord<alehander42> nil really shouldn't be a valid string value
12:45:31FromDiscord<alehander42> so it's a good change
12:45:33FromDiscord<Rika> yeah if the logic is simple you only need templates
12:45:49FromDiscord<alehander42> usually either the domain logic means that "" can be used instead
12:46:07FromDiscord<alehander42> or one needs a (bool, string) or Option[string]
12:46:15FromDiscord<vieru> @Zachary Carter thanks again, ill try it rn
12:46:26FromDiscord<gokr> @alehander42 Coming from Smalltalk where everything is an object, including strings and numbers - nil is a reasonable value 😉
12:46:27FromGitter<jorjun_twitter> not obvious how to put the equivalent of a compiler switch -d SYMBOL:val into a nim.cfg (where it belongs)
12:46:48FromDiscord<Zachary Carter> https://play.nim-lang.org/#ix=2u8T
12:46:59FromDiscord<alehander42> gokr smalltalk had good ideas, but everything being nilable .. is not great.
12:47:10FromDiscord<Zachary Carter> jorjun_twitter: `--define:SYMBOL=val`
12:47:12FromDiscord<alehander42> especially in a typesafe language
12:47:51FromDiscord<alehander42> the problem is that `nil` for different types becomes the same imho
12:48:04FromDiscord<alehander42> so even if you have flow typing i am not sure things are clear enough
12:48:30FromGitter<jorjun_twitter> Thankz Zachary… but still getting Error: undeclared identifier: ‘ARM_ARCH’ and I put it in nim.cfg exactly as you said: --define:ARM_ARCH=6
12:48:32FromDiscord<gokr> @alehander42 Languages are different - I agree that in a language like Nim, eliminating nil is reasonable. However, "nil really shouldn't be a valid string value" - you can replace "string" with "Customer" or "Invoice" or "Sprite", I don't see how strings are that special.
12:48:55FromDiscord<alehander42> yeah, don't get me wrong: I did use a lot of nilable refs instead of options
12:49:05FromDiscord<alehander42> when i was writing nim in my last job
12:49:10FromDiscord<Zachary Carter> jorjun_twitter: how are you accessing it?
12:49:11FromDiscord<alehander42> i see the appeal
12:49:26FromGitter<jorjun_twitter> when ARM_ARCH >= 7: ⏎ blah
12:49:35FromDiscord<Zachary Carter> hmm
12:49:44FromDiscord<alehander42> but actually i do agree that using nil as "existance" test wasn't cool
12:49:47FromDiscord<gokr> I worry that... eliminating nil completely can make Nim much less "comfy" to code in.
12:49:51FromDiscord<alehander42> and maybe i should have had more opts
12:50:04FromDiscord<alehander42> yeah, theoretically it should be very easy to use options
12:50:06FromDiscord<Zachary Carter> let me play around with this one sec
12:50:14*awe00 joined #nim
12:50:17FromDiscord<alehander42> one possible idea was to auto-fix the type in branches
12:50:24FromDiscord<Rika> perhaps options module should be assimilated into the system module?
12:50:34FromDiscord<alehander42> something like `if a.isSome: # here a is the actual type`
12:50:48FromDiscord<alehander42> or even `if a: # just use a normally`
12:51:02FromGitter<jorjun_twitter> (will try command line equiv..)
12:51:06FromDiscord<alehander42> but i guess this has some valid opposition
12:52:21FromDiscord<alehander42> i think there was something like `match maybeA expr a: # use a `
12:52:46FromDiscord<alehander42> but overally it shouldn't be a problem to get a nice way to use options in nim
12:53:41FromDiscord<alehander42> and maybe just mixing the ref+nil to opts in a hypothetical language
12:53:44FromDiscord<alehander42> can just work as well
12:53:51FromDiscord<Zachary Carter> jorjun_twitter - `nim c -d:ARM_ARCH:6 -r test.nim ` doesn't work for me
12:54:03FromDiscord<Zachary Carter> ohhhh
12:54:50FromDiscord<Zachary Carter> nevermind that doesn't work either 😛
12:59:38FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2u8Y
12:59:58*liblq-dev quit (Quit: WeeChat 2.9)
13:00:43FromDiscord<Zachary Carter> templates are not procs they're for code substitution
13:00:57FromDiscord<Zachary Carter> that's why in my example I used a compile time proc
13:01:34FromGitter<jorjun_twitter> @Zachary trying on mac… given no joy with --define on the raspberry pi ..
13:01:38FromDiscord<vieru> oo sry i didn't see that
13:01:46FromDiscord<Zachary Carter> no worries @vieru
13:01:59FromDiscord<Zachary Carter> jorjun_twitter: I swear I recently saw someone use defines with values but I'm struggling to find the repo where I saw it
13:02:34FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2u91
13:02:45FromDiscord<Rika> executes the block at compile time
13:03:11FromDiscord<vieru> thanks
13:06:01*Vladar quit (Quit: Leaving)
13:14:25*audiofile joined #nim
13:14:59FromGitter<jorjun_twitter> @zacharycarter Got it: const ARM_ARCH {.intdefine.}: int = 6
13:15:34FromGitter<jorjun_twitter> these get overriden by —define apparently.. but need to go in the source.. thanks for looking into it anyway
13:21:50*leorize quit (Remote host closed the connection)
13:22:15*leorize joined #nim
13:27:35*ehmry_ is now known as ehmry
13:36:38*ryanhowe quit (Quit: ZNC 1.8.1 - https://znc.in)
13:37:48*sacredfrog joined #nim
13:57:06*moerm joined #nim
13:57:14moermHello everyone ;)
13:57:25*JustASlacker quit (Ping timeout: 240 seconds)
13:57:27FromDiscord<Rika> hello
14:05:33FromDiscord<Kiloneie> Values created on the stack are scope based right ? Get freed once the scope finishes, therefore variables made normally(globally ???) will be freed once the program finishes, right ?
14:06:19FromDiscord<Kiloneie> While on the heap, is when all references to that memory are lost/gone, then GC frees them, right ?
14:06:40FromDiscord<lqdev> you're mostly right
14:07:04FromDiscord<lqdev> globals don't need to be freed as they live throughout the whole program so they won't be
14:07:37FromDiscord<lqdev> ofc it won't cause a memleak because the OS reclaims resources
14:09:04FromDiscord<Kiloneie> Okay, thanks.
14:13:00*JustASlacker joined #nim
14:18:10FromDiscord<Kiloneie> https://play.nim-lang.org/#ix=2u9l↵I don't really understand when to use normal/plain/non-reference objects...
14:18:26FromDiscord<Kiloneie> Also anything wrong in my comments ?
14:19:40FromDiscord<lqdev> > scales better↵i wouldn't say so
14:20:13FromDiscord<lqdev> also when doing inheritance you better make all your objects ref unless you know what you're doing
14:20:19FromDiscord<lqdev> it can cause weird bugs otherwise
14:22:22FromDiscord<lqdev> you should always use regular `object`s if you don't need reference semantics
14:23:03FromDiscord<lqdev> eg. when you want to share a resource between multiple objects, and not make copies of it
14:23:49FromDiscord<lqdev> it's actually better to use plain objects in lists as it's much faster because it reduces pointer derefs
14:24:25FromDiscord<lqdev> also `Banana = ref Fruit` doesn't make much sense
14:24:31FromDiscord<lqdev> more like `FruitRef = ref Fruit`
14:24:58FromDiscord<Kiloneie> I was just typing a whatever name xD
14:26:38FromDiscord<Kiloneie> Is it because objects in nim are not like objects are in other languages that normal objects perform just fine for say games of bullet hells?
14:27:49FromDiscord<Rika> objects in nim are structs in most other languages
14:28:24moermHave a nice day everyone
14:28:29*moerm quit (Quit: Leaving)
14:28:34FromDiscord<lqdev> ref objects *will* perform just fine in most non-complex games
14:28:56FromDiscord<lqdev> but regular objects arranged in the right way will always perform better
14:36:35FromDiscord<Kiloneie> When are normal objects freed?
14:39:25FromDiscord<lqdev> after they go out of scop
14:39:26FromDiscord<lqdev> (edit) 'scop' => 'scope'
14:41:38FromDiscord<Kiloneie> My bad xD, didnt have time to correct
14:45:54FromDiscord<Kiloneie> Just out of curiosity, how are objects like in cpp, i only did basic stuff there at school, since nim objects are structs, tuples are a bit different structs. In cpp objects have lots of prebuilt methods for them right? If you know this... They are slower and more memory hungry than nim objects right? What do they do differently!?
14:46:52FromDiscord<lqdev> > In cpp objects have lots of prebuilt methods for them right?↵actually, no
14:47:00FromDiscord<lqdev> that may be true for java or c# but not c++
14:47:22FromDiscord<lqdev> nim objects are like c structs
14:47:33FromDiscord<lqdev> but with inheritance
14:50:46FromDiscord<Kiloneie> Hmm okay, thanks
15:33:19FromDiscord<Kiloneie> So if say my hypothetical game had a "enemy" parent, that then had missiles(also other stuff), those missiles had children of different kinds of missiles. One should use reference objects instead of plain ones ?
15:45:55disruptekzachary: defines with values --define:name="value" or --define:name:"value"
15:47:01*rockcavera quit (Ping timeout: 264 seconds)
15:48:07disruptekZevv: we tell cps calls by the .cpsCall. pragma.
15:48:30disruptekwe inject that pragma inside .cps. or .cpsMagic.
15:48:50disruptekthis was impl yesterday.
15:52:04*liblq-dev joined #nim
15:55:14FromDiscord<Kiloneie> 4 videos to explain objects... how many will it take for macros lol D:...
16:04:03Zevvoh and the caller can tell? that is pretty cool
16:04:26Zevvwell, i got hit by circumstances a bit though
16:05:06Zevvthings like hammock, beer, beach and sea are complicating factors in efficient software development
16:05:25Zevvgood thing is that over the coming two weeks the weather will gradually get nor
16:05:30Zevvmore normal
16:05:52Zevvwhich is cold and wet and windy and sunny, four seasons in one day
16:09:23Zevvdo you know the brand "ticket to the moon"?
16:09:30ZevvI *so* recommend that
16:09:41*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
16:10:15*pbb joined #nim
16:29:06*solitudesf quit (Read error: Connection reset by peer)
16:29:52*solitudesf joined #nim
16:31:36FromDiscord<djazz> Trying to use nimqml and it fails to load a dynlib (wrong filename specified inside nimqml module). Is there a way to override dynlib lookups from my main code?
16:33:14FromDiscord<djazz> filcuc: DOtherside is now newer, so it tries to load wrong filename
16:33:35FromDiscord<djazz> (assuming 0.7.x is compatible with 0.6.x)
16:38:37disruptekZevv: and you ask why so many of us hate you?
16:41:26FromDiscord<djazz> hmm, looks like nimqml doesnt have webview support, which is what I planned to use. Oh well
16:41:55FromDiscord<djazz> What's an other way to build a gui app with webview/html rendering support with Nim, that's cross-platform?
16:48:22*liblq-dev quit (Ping timeout: 260 seconds)
16:50:18*liblq-dev joined #nim
16:50:45FromDiscord<djazz> found the webview package, let's try that
16:51:06FromDiscord<djazz> (i planned to build the ui with html and css anyway)
16:56:25FromDiscord<djazz> hmm, packaging it up seems like a pain though, it depends on GTK3 on Linux
16:56:34FromDiscord<djazz> and WebKit2
16:57:26*superbia1 joined #nim
16:58:38*Pisuke quit (Ping timeout: 260 seconds)
16:59:03*Sembei joined #nim
17:00:01disruptekticket to the moon parachute hammocks. this looks like a perfect accessory for my rv. i have a hammock but it's the shitty kind for skinny people, so i never use it.
17:00:13*superbia quit (Ping timeout: 264 seconds)
17:00:29FromDiscord<Zachary Carter> I want an RV
17:00:47disruptekdude. they aren't expensive.
17:01:01disrupteki mean, when you have gainful employment.
17:01:12*hnOsmium0001 joined #nim
17:01:30FromDiscord<Zachary Carter> yeah I need to buy another house first
17:01:38disruptekjust buy a house on wheel.
17:01:42disruptekwheels, too.
17:02:23FromDiscord<Zachary Carter> I don't think the fiance wants to raise kids in a mobile home
17:02:28FromDiscord<Zachary Carter> I'd be down for it but I think she has qualms about it
17:02:34disruptekhttps://www.youtube.com/watch?v=jCC8fPQOaxU
17:02:48FromDiscord<Zachary Carter> well not like a double wide
17:02:55FromDiscord<Zachary Carter> I meant like a tiny home or pimped out RV or something
17:03:22*natrys joined #nim
17:03:24FromDiscord<Zachary Carter> huh so I can't `move` a closure?
17:03:30disrupteki was planning on building a tiny house but it just doesn't make sense unless you literally just want a /tiny/ house.
17:03:38FromDiscord<mratsim> @Kiloneie , if plain object are not enough, use an object pool
17:06:25FromDiscord<Zachary Carter> https://play.nim-lang.org/#ix=2uab
17:07:10FromDiscord<Zachary Carter> why doesn't thinks work?
17:07:17FromDiscord<Zachary Carter> (edit) 'thinks' => 'this'
17:07:57disruptekstopping makes my pants tight.
17:08:02disruptekstropping, too.
17:08:08disruptekwtf man.
17:08:34FromDiscord<Zachary Carter> shouldn't it work?
17:08:59FromDiscord<Zachary Carter> you can do this with lambdas in C++
17:09:12disruptekdon't use var, for starters.
17:09:26FromDiscord<Zachary Carter> well I have to if I want to `move` right?
17:09:41FromDiscord<Zachary Carter> `move` only accepts `var` parameters right?
17:10:17disruptekyou're talking about a pointer, here.
17:10:25FromDiscord<Zachary Carter> a function pointer yes
17:10:29disruptekthere's no point to moving it.
17:10:33disruptekso to speak.
17:11:00FromDiscord<Zachary Carter> okay yeah that makes sense but then when I see a lambda being moved in C++ - what's actually happening?
17:11:05disruptekand there's no point to pretending it is or isn't mutable.
17:11:14Zevvdisruptek: these hammocks are really amazin. Make sure not to buy the smallest though, you need to lie diagonally so you need about 2m width
17:11:17disrupteki don't know anything about c++.
17:11:35FromDiscord<Zachary Carter> I guess I can google
17:11:48FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2uad
17:11:50Zevvi always thought hammocks were these shitty nets with two wooden ends which on purpose throw you out all the time
17:11:50disruptekZevv: no problem, i've worn a 2m for years.
17:12:14*superbia1 is now known as superbia
17:12:36disruptekwe always used to get the woven mayan hammocks, but they are heavy and don't suffer rain well.
17:12:45FromDiscord<Zachary Carter> I can recommend a hammock - one sec
17:12:55Zevvi have one of my ttms hanging outside 5m / year for the last 3 years
17:13:00Zevvits doing great
17:13:09FromDiscord<Zachary Carter> https://www.amazon.com/ENO-Outfitters-SingleNest-Hammock-Portable/dp/B003BIY7PM/ref=asc_df_B003BIY7PM/?tag=hyprod-20&linkCode=df0&hvadid=194838933099&hvpos=&hvnetw=g&hvrand=13092387309835488366&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9028306&hvtargid=pla-310268154150&psc=1
17:13:20FromDiscord<Zachary Carter> and then you get some of these bad boys
17:13:28FromDiscord<Zachary Carter> https://www.amazon.com/dp/B088T176B3/ref=sspa_dk_detail_6?psc=1&pd_rd_i=B088T176B3&pd_rd_w=RDiMM&pf_rd_p=f0355a48-7e73-489a-9590-564e12837b93&pd_rd_wg=8Yfxx&pf_rd_r=PTCZG5879A55N6APG2JS&pd_rd_r=f701ff00-1148-441c-b47c-c99c35c3d6b3&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExMEhEWlZXOVZMNTdFJmVuY3J5cHRlZElkPUExMDAyOTYyM0hHODJRWENNODBCUiZlbmNyeXB0ZWRBZElkPUEwNTUxNTM3MUswM0RTSEVFUTlaMCZ3aWRnZXROYW1lPXNwX2RldGFpbF90aGVtYXRpYyZhY3Rpb249Y2xpY2tSZWR
17:13:32Zevvyeah thats similar stuff as TTM
17:13:49disruptektoo pricey for me.
17:13:56disruptekmaybe i can steal one locally.
17:14:01disrupteki mean, borrow.
17:14:29FromDiscord<Zachary Carter> I want to get something like this though - https://www.treestuff.com/tentsile-connect-tree-tent/
17:14:58Zevvtoo pricey for me
17:15:00Zevvcool as hell tho
17:15:10FromDiscord<Zachary Carter> yeah - but one of the worst parts of camping is drying your shit out
17:15:19FromDiscord<Zachary Carter> with this you don't really have to worry about it
17:15:49Zevvfor 449 id rather dry my tent ou
17:15:49FromDiscord<Zachary Carter> and you don't have to worry about rocks / slopes / all the other annoying crap you need to normally worry about when you pitch a tent
17:16:04FromDiscord<Zachary Carter> meh good tents are already 150+
17:16:29FromDiscord<Zachary Carter> and I have a $120 cot from cabellas
17:16:32disruptekwhen i pitch a tent, the only thing i worry about is lube.
17:16:34FromDiscord<Zachary Carter> I should have just bought one of those things
17:16:45FromDiscord<Zachary Carter> you lube up your boners?
17:16:52disruptekhell yeah.
17:16:53FromDiscord<Zachary Carter> like when it's just you alone?
17:16:55FromDiscord<Zachary Carter> that's weird
17:17:33disruptekwell, otherwise i tend to get blood on the kitchen counter.
17:17:44FromDiscord<Zachary Carter> yeah but that's the fun part
17:18:04FromDiscord<Zachary Carter> btw once covid is over, we're doing a Nim meet up in the states
17:18:18FromDiscord<Zachary Carter> we're going to go camping and abuse substances and not talk about Nim the entire weekend
17:18:28disrupteki may be down to austin in just a few months.
17:18:36FromDiscord<Zachary Carter> niceeee
17:18:48FromDiscord<Zachary Carter> you can live in my backyard if you want
17:18:54FromDiscord<Zachary Carter> oh btw we're hiring aggresively af
17:18:58disruptekshitter's full!
17:18:58FromDiscord<Zachary Carter> (edit) 'aggresively' => 'aggressively'
17:19:16disruptekare you hiring anti-social assholes?
17:19:20FromDiscord<Zachary Carter> sure
17:19:25FromDiscord<Zachary Carter> everyone is 100% remote atm anyway
17:19:30disrupteknice. it's shipwell or something, right?
17:19:33FromDiscord<Zachary Carter> and we're "remote forward" now
17:19:35disruptekshipnice?
17:19:35FromDiscord<Zachary Carter> yeah shipwell
17:19:48disruptekokay, lemme see what's up.
17:20:00FromDiscord<Zachary Carter> they love me - so just tell them I referred you
17:20:07FromDiscord<Zachary Carter> we can start the nimolution
17:20:10disruptekomg i cannot even read this web-site. it's off-screen somehow.
17:20:23FromDiscord<Zachary Carter> I think they're paying some company to redo it
17:20:46disruptekat 90% zoom the nav gets misplaced.
17:20:50FromDiscord<Zachary Carter> honestly - as boring as the product we build is
17:20:55disruptekgah, i hate the web.
17:20:58FromDiscord<Zachary Carter> it's such a resilient vertical to be in right now
17:21:04disruptekmakes sense.
17:21:23FromDiscord<Zachary Carter> and not that I put ANY stock in this type of bs - but we've already been singled out as one of the 25 next unicorns by Forbes
17:21:29Zevvhttps://www.activevideo.com/our-careers#positions this is the gig i'm currently working in, also hiring a.f.
17:21:45FromDiscord<Zachary Carter> Zevv: I want to move back to Europe after I get maried
17:21:49FromDiscord<Zachary Carter> (edit) 'maried' => 'married'
17:21:53FromDiscord<Zachary Carter> so I might apply again
17:22:01Zevvnah you blew it dude
17:22:07FromDiscord<Zachary Carter> haha
17:22:23Zevvso, when is the party?
17:22:26disruptekyou want to get married /after/ you move to europe.
17:22:46disrupteksurely it's advantageous to your application to have a european spouse.
17:22:49Zevvyou want to do about anything /after/ you want to move to europe
17:22:57ZevvI dont have one
17:23:33disruptekyou don't have one?
17:23:48Zevvswiss
17:23:59Zevvalways good to have a backup plan
17:24:00disruptekfair point.
17:24:02disrupteklol
17:24:08Zevvif .eu blows up, i know where to go
17:24:11FromDiscord<djazz> Hmm, this seems interesting. Doesn't seem to have a Nim module though https://lcui.org/
17:25:17FromDiscord<Zachary Carter> well - I think if you're married it's easier to get your significant other overseas with you
17:25:35FromDiscord<Zachary Carter> if you're just partners and not by legal status - you both need to be sponsored
17:25:44FromDiscord<Zachary Carter> right to work and all of that is a whole nother deal
17:26:08FromDiscord<Zachary Carter> but the plan is to get married and then find a company to bring us over
17:26:26FromDiscord<Zachary Carter> and hopefully it's a gaming company that will bring us both over
17:26:50FromDiscord<djazz> Hmm, no macos support though... _keeps looking_
17:27:38disruptekhow come all the people on the shipwell web-site have fat faces?
17:27:56disruptekdo you only hire fat heads?
17:28:06FromDiscord<Zachary Carter> no pics of me
17:28:18FromDiscord<Zachary Carter> I do NOT have a fat head
17:28:37disruptekhmm. i'm going to have to reserve judgement on that.
17:29:06disruptek!last clyybber
17:29:07disbotclyybber spoke in 12#nim 8 hours ago 12https://irclogs.nim-lang.org/14-08-2020.html#09:02:00
17:29:12disrupteklazy.
17:34:28*liblq-dev quit (Ping timeout: 265 seconds)
17:35:01*endragor quit (Remote host closed the connection)
17:35:13*lritter joined #nim
17:35:28*endragor joined #nim
17:35:56*liblq-dev joined #nim
17:36:32FromDiscord<Varriount> @Zachary Carter Do you speak a second language?
17:36:50FromDiscord<Zachary Carter> Nope :/
17:36:56FromDiscord<Zachary Carter> I wouldn't mind learning one though
17:37:15FromDiscord<Varriount> German isn't too hard, relatively speaking
17:38:07FromDiscord<Varriount> If I had to pick a country to live in where I would have to learn another language, it would be Germany
17:38:07*kungtotte quit (Read error: Connection reset by peer)
17:39:01FromDiscord<Zachary Carter> yeah - I had an offer from Wargaming Berlin but turned it down to stay in Finland
17:39:12FromDiscord<Zachary Carter> I think if I had moved to Berlin I would have learned German or at least tried to
17:39:34FromDiscord<Zachary Carter> Finland's language reqs for citizenship were pretty lax though - you could learn Swedish instead of Finnish, which is way easier
17:41:12*kungtotte joined #nim
17:42:09FromDiscord<Zachary Carter> it's so much easier to get a gaming gig in Europe vs the US for some reason
17:42:12*endragor quit (Ping timeout: 265 seconds)
17:42:26FromDiscord<Zachary Carter> maybe we'll just go back to Finland
17:43:11*liblq-dev quit (Ping timeout: 246 seconds)
17:45:08*liblq-dev joined #nim
17:46:19*Jesin joined #nim
17:47:17disrupteknot with that attitude.
17:51:13FromDiscord<Clyybber> ay
17:51:25disrupteki'm hitting an assertion error in ccgexprs.
17:51:39disruptekbinary arithmetic, if you can believe it.
17:51:56FromDiscord<Clyybber> shpw me
17:52:06disruptekit's in the typed branch on cps.
17:52:53FromDiscord<Clyybber> ok i'll look at it once i'm home
17:53:44disrupteki developed the bug by taking typed input and changing all of a symbol, eg. `i`, into, eg. `continuation.i`.
17:54:21disruptekunhandled exception: ccgexprs.nim(576, 9) `e[1].typ != nil` [AssertionDefect] -- it's probably `==`()
18:09:10FromDiscord<haxscramper> What does `expression cannot be called` compilation error means in general? It was mentioned like two times in this channel and searching it verbatim on google gives 13 results, most of which are error output copy-pasted somewhere. And there is a message from 2016 about "The error message "expression '.' cannot be called" really should be improved"
18:09:51FromDiscord<haxscramper> Most of the time it occurs in generic code, but I fail to understand what *exactly* can lead to this error
18:09:54Zevvso, shall I hook up my laptop on the wifi
18:10:00Zevvor shall I linger in my hammock
18:10:09disruptekare you nuts?
18:10:19*vicfred quit (Quit: Leaving)
18:10:46*arecacea1 quit (Read error: Connection reset by peer)
18:11:11*arecacea1 joined #nim
18:11:15FromDiscord<haxscramper> Maybe someone can enlighten me on this one?
18:11:19FromDiscord<Kiloneie> @mratsim object pool? Wdym?
18:11:36FromDiscord<Recruit_main707> @haxscramper running nim check outputs any other errors?
18:12:46FromDiscord<haxscramper> There is a type mismatch error in call
18:13:09FromDiscord<haxscramper> Didn't know about `nim check`
18:13:55FromDiscord<Recruit_main707> can you show me the code?
18:14:16FromDiscord<Recruit_main707> (the call and the function definition)
18:14:26*endragor joined #nim
18:16:52Zevv/home/ico/sandbox/prjs/cps/cps.nim(508, 23) Error: internal error: expr(nkIdent); unknown node kind
18:16:55FromDiscord<haxscramper> That
18:16:56FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ual
18:17:08*Vladar joined #nim
18:17:21FromDiscord<haxscramper> That's just top parts - I wasn't able to get minimal code that produces error
18:18:01superbiahow to write if !variable: ?
18:18:04FromDiscord<haxscramper> Oh, `makeFunctors` is `func makeFunctor*[V, F](sym: F, subt: varargs[Term[V, F]]): Term[V, F] =`
18:19:30*torbencarstens[m joined #nim
18:20:34disruptekZevv: go back to the hammock.
18:20:40Zevvnope
18:20:47Zevvsun's behind the woods
18:20:52FromGitter<RecruitMain707> discord server died?
18:20:57Zevvmosquitos out
18:21:05disruptekoh shoot
18:21:46FromGitter<RecruitMain707> @Yardanico ?
18:22:02*endragor quit (Ping timeout: 256 seconds)
18:22:06FromDiscord<Recruit_main707> hmmm, i dont remember very well, what happens if you separate the generic arguments with `;` instead of `,`?
18:22:08Zevvthe netherlands is packed with people, really packed. So we have this little island with one single village, and that's pretty packed downtown. From there you bike 8 minutes to the widest beach in europe, in the middle of the holiday season
18:22:17FromGitter<RecruitMain707> ok its back :)
18:22:29Zevvand I have a 180deg view over the beach and I see 1 people
18:22:49FromDiscord<Recruit_main707> @haxscramper my last msg ^
18:23:14disruptekthat's nuts.
18:23:15FromDiscord<haxscramper> Just lots of syntax errors.
18:23:21disruptekwhat the hell is wrong with people?
18:23:35disruptekhow are you supposed to get infected with so few spreaders?
18:23:37Zevvi don't know. but they're all not here, so that's perfectly fine with me
18:23:51FromDiscord<Recruit_main707> hmmm, im gonna check some code that might be related, but if its not im out of ideas
18:23:58disrupteksend us a photo, Zevv.
18:24:00Zevvoh we did that on the ferry this afternoon
18:25:21*aenesidemus joined #nim
18:26:31FromDiscord<Recruit_main707> @haxscramper yeah, my error was related to something else, idk man
18:27:16Zevvdisruptek: this is a few years back, same place http://zevv.nl/div/CIMG00701.JPG. nothing to see, because it's an empty beach, right
18:27:39disruptekhow wide is that beach?
18:27:45Zevv2 km or so
18:27:47Zevvlet me check
18:28:14*Kaivo quit (Ping timeout: 260 seconds)
18:28:16disruptekthat's crazy.
18:28:28disruptekhow does that even work?
18:28:41Zevvit's amazingly flat
18:28:59Zevvbecause at high tide it's only 200m or so
18:28:59disruptekso it's dry half the time or what?
18:29:31Zevvabout 12 hours per day, yes
18:30:07FromDiscord<haxscramper> > There is a type mismatch error in call↵I fixed type mismatch error and `cannot be called` also disappeared. Maybe there nothing that actually causes **this exact** error - just it gets displayed first.
18:30:08disruptekand those little people come up for air when it gets wet?
18:30:40*Kaivo joined #nim
18:30:48FromDiscord<Recruit_main707> yeah, generic errors usually means there is something else wrong, thats why i told you to run nim check
18:31:59FromDiscord<wiremoons> Found a bug (or weird feature...) in document comments where if the first document comment is blank the HTML output is and the resulting documentation is treated as if it was quoted. Couple of examples here: https://play.nim-lang.org/#ix=2uan
18:32:38FromDiscord<wiremoons> Is it worth opening a bug report - is it that an Nim doc 'feature' ? 🙂
18:34:17disruptekit's worth a bug report.
18:34:35FromDiscord<wiremoons> OK - will do. Thanks @disruptek
18:34:57disruptekjust remember that doc comments are supposed to be valid RST.
18:35:08disruptekso, that'll be a criticism some may levy...
18:36:38FromDiscord<wiremoons> Fair enough - had me confussed for a while until I figured it out, but I dont use RST much, so maybe others would have known what was causing it...
18:56:35*vicfred joined #nim
18:58:05*Jjp137 quit (Read error: Connection reset by peer)
19:02:02*sschwarzer joined #nim
19:02:14sschwarzerHi :)
19:04:07sschwarzerI have a problem with `spawn` and a `FlowVar`: https://play.nim-lang.org/#ix=2uaB . The program doesn't run in the playground because it needs `--threads:on`. If I try to compile the program I get an error (see the comment in the code). Why do I get the error and how can I possibly fix it (or work around)?
19:07:13sschwarzer(The problem isn't the playground limitation. I get the error message in the code when trying to compile the program on my machine. :-) )
19:08:56disrupteki dunno anything about flowvars.
19:10:47sschwarzerdisruptek: They have a lot of limitations it seems. I also ran into https://github.com/nim-lang/Nim/issues/15167 .
19:10:50disbot(Re-)raise exceptions from the spawned proc when a `flowVar` is queried with `^flowVar` ; snippet at 12https://play.nim-lang.org/#ix=2uaF
19:11:33sschwarzerMaybe I should try channels?
19:12:05disruptekwhat are you trying to do?
19:12:06sschwarzerI also looked at Weave, but I didn't find information about handling exceptions in spawned tasks.
19:12:48*JustASlacker quit (Ping timeout: 256 seconds)
19:12:50FromDiscord<Recruit_main707> is stever in this server?↵https://github.com/stever
19:13:07sschwarzerdisruptek: I want to run two programs in the background (same program, with different inputs).
19:13:29disruptekuse asynctools
19:13:33sschwarzerThe program is very slow and it helps when the two invocations run in parallel.
19:14:51sschwarzerdisruptek: This one? https://github.com/cheatfate/asynctools
19:14:58disruptekyeah.
19:15:22sschwarzerdisruptek: Thanks, I'll have a look.
19:16:33stever@Recruit_main707 yes that's me
19:18:04FromDiscord<Recruit_main707> cool, would you rather me opening an issue for everything or just pinging you in here for quickfixes like the one i have just mentioned about apostrophes?
19:18:05sschwarzerHehe, my code example on the playground does compile with `--gc:arc` XD
19:18:22FromDiscord<Recruit_main707> arc leaks with async
19:18:35stever@Recruit_main707 open issues in github please
19:18:45FromDiscord<Recruit_main707> ok
19:19:02sschwarzerRecruit: also with "async" from the threadpool?
19:19:03Zevvdisruptek: so, where do I see an example of this new cps call mechanism
19:19:18stever@Recruit_main707 thanks
19:19:23disruptekZevv: typed branch?
19:19:27FromDiscord<Recruit_main707> np
19:19:32Zevvand then run waht?
19:19:48FromDiscord<Recruit_main707> sschwarzer: not sure, probably
19:19:53sschwarzerAnyway, I'll check asynctools
19:19:57*krux02_ joined #nim
19:20:10FromDiscord<Recruit_main707> try orc, although i have heard it might also leak still
19:20:26sschwarzerRecruit: yes, that's what I heard, too :)
19:20:50disruptekZevv: i use the taste test.
19:22:18*krux02 quit (Ping timeout: 260 seconds)
19:22:26FromDiscord<Clyybber> afaik it doesn't leak anymore
19:22:33Zevvuhm now this one again, error: ‘RootObj’ has no member named ‘Sup’
19:22:38FromDiscord<Clyybber> @Yardanico knows for sure
19:22:43Zevvi'm on a different machine, my bash history is gone
19:22:52disruptekuse refc not arc.
19:22:53FromDiscord<Recruit_main707> orc or arc? clyybber
19:22:57FromDiscord<Clyybber> orc
19:23:19disruptekorc is not fully leak-free under async.
19:23:25FromDiscord<Clyybber> ah ok
19:23:59disruptekZevv: i have a `when false:` just before the sleep_magic block.
19:24:12disrupteknoop is effectively the current test.
19:24:32disruptekalso you need --define:release and to run it with cpp.
19:24:41disruptekwhatfer nim bug reasons.
19:25:08Zevvah the cpp
19:25:28Zevv/home/ico/sandbox/prjs/cps/cps.nim(508, 23) Error: internal error: expr(nkIdent); unknown node kind
19:25:31Zevvnever a dull moment
19:26:00disrupteki'm on the 2020-08-13 build.
19:26:22Zevvnot on head typed?
19:26:42Zevv'swapping symbols and crashing compilers'
19:26:43disruptekthat's my nim build version.
19:26:48Zevvoh
19:26:50disruptekyeah, on typed.
19:26:55Zevvare we *that* bleeding edge
19:27:16disrupteki dunno; i don't get that error.
19:27:54Zevv nim cpp -r --path=testes --path=cutelog -d:cpsDebug -d:release tests/taste.nim
19:28:04disruptekyeah.
19:28:11disruptek--gc:refc
19:28:21Zevvisnt that implicit?
19:28:24disrupteksure.
19:29:07disruptekdid you when false out the rest of the test?
19:29:20Zevvsure, only up to line 34
19:29:34disruptekhmm.
19:30:16disruptektestes 0.1.7?
19:30:31disrupteksome say those are my finest testes.
19:30:44Zevvright on spot, 0.1.7
19:31:00Zevvnim 2020-08-13 957bf15a08d5443a50452909743747d19b5f29f8
19:31:11disruptekmine too.
19:32:48disruptekstrange.
19:33:07*sschwarzer quit (Quit: leaving)
19:35:19*awe001 joined #nim
19:36:40*awe00 quit (Ping timeout: 256 seconds)
19:39:21FromDiscord<Doof Doof> Does Nim have the ability to add meta-data to procs/types? Or what is the current way of doing this I suppose?
19:39:45disruptekwhat?
19:40:29ZevvI don't think there is a way to do that, but you should be able to store your data yourself and index it by proc?
19:41:28FromDiscord<Doof Doof> sent a code paste, see https://play.nim-lang.org/#ix=2uaM
19:42:09*JustASlacker joined #nim
19:43:19FromDiscord<Doof Doof> Right, I was thinking something similar Zevv - so you could just make a "meta" macro function that does a similar thing . . . It just won't know what it belongs to unless you pass it the target item I suppose
19:48:42disruptekZevv: see what tock does after pulling.
19:49:47Zevv=== .cps. on tock(original) === /home/ico/sandbox/prjs/cps/tests/tock.nim(4, 0)
19:49:47Zevv 4 proc tock(name: string; ms: int) =
19:49:48Zevv 5 var count: int = 10
19:49:48Zevv 6 while (
19:49:48Zevv 7 0 < count):
19:49:50Zevv 8 dec count, 1
19:49:52Zevv 9 sleep(ms)
19:49:55Zevv 10 echo [name, " ", count]
19:49:57Zevv 11
19:50:00Zevvlocal section nnkIdentDefs
19:50:02Zevvname: string
19:50:05Zevvlocal section nnkIdentDefs
19:50:07Zevvms: int
19:50:10Zevvlocal section nnkVarSection
19:50:12Zevvvar count: int = 10
19:50:15Zevvstack trace: (most recent call last)
19:50:17Zevvcps.nim(626, 19) cps
19:50:20Zevvcps.nim(616, 25) cpsXfrm
19:50:22Zevvcps.nim(586, 15) cpsXfrmProc
19:50:25Zevvcps.nim(399, 23) saften
19:50:27Zevvcps.nim(191, 19) makeTail
19:50:30Zevvenvironment.nim(657, 22) wrapProcBody
19:50:32Zevvspec.nim(58, 26) resym
19:50:35Zevv/home/ico/sandbox/prjs/cps/tests/tock.nim(4, 36) template/generic instantiation of `cps` from here
19:50:38Zevv/home/ico/sandbox/prjs/cps/cps/spec.nim(58, 26) Error: node is not a symbol
19:50:40Zevvico@mdoos:~/sandbox/prjs/cps(typed)$
19:50:43Zevvdang
19:50:45Zevvsorry
19:50:48disruptekso what you're saying is...
19:50:48Zevvhttp://ix.io/2uaQ
19:50:50Zevvmispaste
19:50:53Zevvflame me
19:51:06Zevvthings break in mysterious ways
19:51:38disruptekokay, i get the same error.
19:53:34FromDiscord<djazz> If I want to package my app for windows and ssl support, I need to bundle the openssl dlls next to it right? (I have only tested it in Wine so far)
19:54:07FromDiscord<djazz> there is no alternative to openssl for windows?
19:58:18disruptekis that important?
20:00:35FromDiscord<djazz> surely windows api has some crypto equivalent?
20:00:51disruptekprobably.
20:00:56disruptekand, don't call me shirley.
20:01:04FromDiscord<djazz> 😄
20:01:20FromDiscord<djazz> i dont want to bundle openssl libs that go out of date eventually..
20:01:27disrupteklunatic.
20:01:34Zevvsay disruptek
20:01:48Zevvyour noop() non-cps warning proc gets xfrmd without the 'result = c' body
20:02:00Zevvbut my iterator still gets the body put in
20:02:02Zevvhow come
20:03:24disruptekgot an ix?
20:03:37disrupteki just pushed a fix for tock. a fix-ish.
20:03:41*altarrel joined #nim
20:04:11disruptekmaybe there's some backwards logic?
20:04:35Zevvhttp://ix.io/2uaY
20:05:15Zevvsame signature, mine is proc jield(c: Iterator): Iterator {.cpsMagic.} =
20:05:29Zevvsame body: `result = c`
20:05:58disruptekwhat's your source look like?
20:06:27Zevvhttp://ix.io/2ub0
20:06:56Zevvtrying to get stash/iterator working
20:08:46disruptekthat looks troubling.
20:10:00Zevvwhat
20:11:05*altarrel quit (Quit: Konversation terminated!)
20:14:22disrupteki'm troubled. i admit it.
20:14:26disruptekdeeply troubled.
20:15:01*liblq-dev quit (Quit: WeeChat 2.9)
20:16:30Zevvgood.
20:16:32Zevvyou should be
20:16:51disruptekwhy don't you push that shit so i can enjoy it myself?
20:17:06disruptekit's not fair that you get to have all the bugs.
20:18:27Zevvpushed
20:26:20federico3and here I am using Python and yad instead of Nim and gtk
20:31:26*Vladar quit (Quit: Leaving)
20:40:52*audiofile quit (Quit: Default Quit Message)
20:41:38*awe002 joined #nim
20:42:58disruptekZevv: pushed
20:43:42*awe001 quit (Ping timeout: 256 seconds)
20:45:32*endragor joined #nim
20:46:00disruptekthese new loops we've created are ridiculously fast.
20:46:31disrupteki think we should call them /none more fast/ loops.
20:50:16FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2ub5
20:50:34FromDiscord<tomck> I've tried assigning x to a local var with `{.inject.}`, but that just copies the var, which isn't what i want
20:50:42FromDiscord<tomck> i guess i could copy it back after?
20:51:51disruptekwhere does the x come from?
20:51:59FromDiscord<tomck> the proc param
20:52:09FromDiscord<tomck> `proc(x...`
20:52:28disruptekyou tried proc(x {.inject.}: var int) ?
20:52:34FromDiscord<tomck> Yeah it's a parse error
20:52:38disrupteki think this was fixed in the last day or two.
20:52:54FromDiscord<tomck> oh really>
20:53:09disrupteklook for a pr from clyybber.
20:53:12FromDiscord<tomck> is a build for that out?
20:53:24disruptekthere's one from last night in gitnim.
20:53:24FromDiscord<tomck> or hsould i build myself?
20:53:26disruptek~gitnim
20:53:27disbotgitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek
20:53:52disruptek!pull inject author:clyybber
20:53:53disbothttps://github.com/nim-lang/Nim/pull/15178 -- 6Allow pragmas on parameters 7& 1 more...
20:53:55FromDiscord<tomck> is gitnim a nim cmopiler manager, like rustup for rust, or stack for haskell?
20:54:08FromDiscord<tomck> so i just install this & it'll manage the nim compiler build for me?
20:54:36disruptekit's a bit tough to explain because it's so simple it boggles the mind.
20:54:59disruptekit's a git repo that i update frequently. and it includes a simple app so you can run `git nim` and see which available versions exist.
20:55:27disruptekthe nims provided are statically-linked and generated by github actions nightly.
20:55:55FromDiscord<tomck> Ahhh wondered why it was taking so long to clone lol
20:55:58disruptekif you want to run your own distribution for your own platform or whatever, you just clone it.
20:56:38disruptekthe whole thing is 101 lines of code.
20:56:42FromDiscord<tomck> so is the latest build in master of gitnim?
20:57:18disruptekmaster holds docs. the different branches hold different versions. there are also tags.
20:57:38disruptekthe web-site should explain it, but essentially, it's just git.
20:58:03*Jjp137 joined #nim
21:01:19disruptekthe nightly from the 13th is in branch 1.3.5.
21:06:52FromDiscord<tomck> so i ran `git nim latest` and i now have 1.3.5, but it's still a parse error unfortunately
21:06:58FromDiscord<tomck> identifier expected, but found 'eParam {.inject.}'
21:07:19FromDiscord<tomck> for ↵ proc(eParam {.inject.}: var MyType) =
21:07:52disruptekhmm.
21:08:46disruptekdoes the test look like what you want?
21:08:50FromDiscord<benash> Does nim allow a type to share its name with the module it exists in (and is exported from)?
21:08:52disruptekbecause it looks like what i expect...
21:09:09disruptekhttps://github.com/nim-lang/Nim/pull/15178/commits/e73daf617fa709ff5f556923e7ff2b34194bbb48
21:09:10disbotAllow pragmas on parameters
21:09:17disruptekyes, thank you, disbot.
21:09:46disruptekbenash: yes, and also, that's a dumb idea.
21:11:04FromDiscord<tomck> errrr it's an anonymous proc maybe?
21:11:15FromDiscord<tomck> My param has no default value either
21:12:53disruptekthat shouldn't matter.
21:13:36FromDiscord<benash> @disruptek Excuse me, if you'd like to help, do so without an insult.
21:19:31*Trustable quit (Remote host closed the connection)
21:19:40FromDiscord<tomck> disruptek: Ahhh actually that works! I was on the wrong nim version, thanks for the help!
21:22:02disrupteknice.
21:22:08disruptekbenash: it's not an insult.
21:22:13*vicfred quit (Quit: Leaving)
21:22:34*vicfred joined #nim
21:24:05disrupteklook, i have plenty of stupid ideas. ask anyone here.
21:24:13disruptekproblem is, so few people let me know ahead of time.
21:24:29disruptekjust doing my part to help you avoid future regrets.
21:34:25FromDiscord<benash> @disruptek If your motivation is to help me avoid future regrets, my request would be that you do that in a more dignifying way.
21:34:48disruptekwelcome to teh interwebs, buddy.
21:48:53*endragor quit (Ping timeout: 246 seconds)
21:53:53leorize@benash make sure that your type name is not exactly same as the module name (as in "type foo" in module "foo")
21:54:48leorizethere are(were?) bugs in the compiler that would spew out hard to decipher errors when the two names collides
22:08:58FromDiscord<Recruit_main707> The fact that the compiler optimizes the code by passing objects bigger than 3 * float as a pointer can be avoided?
22:12:10*lritter quit (Quit: Leaving)
22:12:18solitudesfhttps://nim-lang.github.io/Nim/manual.html#foreign-function-interface-bycopy-pragma
22:12:53FromDiscord<Recruit_main707> Well, yes I know about bycopy, but I mean disable it directly
22:12:58*vicfred quit (Quit: Leaving)
22:14:39FromDiscord<Clyybber> why would you
22:14:46FromDiscord<Clyybber> and what do you mean with directly..
22:14:54FromDiscord<Clyybber> with a cli flag?
22:15:02FromDiscord<Recruit_main707> Something like that yes
22:15:03*leorize quit (Ping timeout: 240 seconds)
22:15:09FromDiscord<Clyybber> that would be stupid
22:15:26FromDiscord<Clyybber> because then you couldn't interface with other code
22:15:36FromDiscord<Clyybber> because one is compiled with --bycopy:off and one not
22:15:47FromDiscord<Clyybber> what are you trying to do?
22:15:57FromDiscord<Recruit_main707> Just thinking
22:16:04*natrys quit (Quit: natrys)
22:16:16FromDiscord<Recruit_main707> Essentially, trying to avoid writing bycopy :p
22:16:22FromDiscord<Clyybber> but why
22:16:30FromDiscord<Recruit_main707> Laziness
22:16:32FromDiscord<Clyybber> why do you think you need bycopy in the first place
22:16:50FromDiscord<Clyybber> try push: bycop
22:19:12FromDiscord<Recruit_main707> I am just trying to use Nim at a lower level, (essentially as a better c)↵Because I feel I am not used to enough to lower level concepts
22:19:40FromDiscord<Recruit_main707> And really want to know what my code is doing exactly
22:22:32*endragor joined #nim
22:26:23leorize[m]the only way to know is to read the resulting C/ASM :P
22:26:50*endragor quit (Ping timeout: 256 seconds)
22:31:29leorize[m]it's better to use `bycopy` to ensure C-compatible semantics. We might perform optimizations that automatically reorder object fields to ensure the best performance
22:31:31leorize[m]in the future
22:34:54FromDiscord<Recruit_main707> Then you will need a new pragma :P
22:34:56*arecacea1 quit (Remote host closed the connection)
22:35:29FromDiscord<Recruit_main707> Or just add a `raw` pragma or something like that
22:35:46*arecacea1 joined #nim
22:38:23leorize[m]@Clyybber can you review #14484M
22:38:24leorize[m] * @Clyybber can you review #14484?
22:38:25disbothttps://github.com/nim-lang/Nim/pull/14484 -- 3std/with support field assign
22:45:33disruptekclyybber: shhh there are no stupid ideas.
22:45:59disruptekuse more dignifying language, please.
22:46:46FromDiscord<Recruit_main707> This guy XD
22:49:14disrupteki agree.
22:50:30*solitudesf quit (Ping timeout: 260 seconds)
22:51:19FromDiscord<Clyybber> leorize: Will do
22:51:44FromDiscord<Clyybber> disruptek: Sorry, the idea is mentally challenged
22:51:52disrupteki'm sorry, too.
22:51:56disrupteklet's kiss.
22:53:07FromDiscord<Clyybber> smooch
22:53:18disruptek😘
22:55:55*endragor joined #nim
22:58:17FromDiscord<Clyybber> leorize: I don't think we should support this colon syntax
22:58:19FromDiscord<Clyybber> wdyt?
23:00:06leorize[m]what colon syntax?
23:00:16*endragor quit (Ping timeout: 246 seconds)
23:00:36FromDiscord<Clyybber> https://github.com/nim-lang/Nim/pull/14484/files#diff-7a3cb610cec719a402a45ec87c11a3e6R357
23:00:37disbotstd/with support field assign
23:01:02FromDiscord<Clyybber> (edit) 'https://github.com/nim-lang/Nim/pull/14484/files#diff-7a3cb610cec719a402a45ec87c11a3e6R357' => 'https://github.com/nim-lang/Nim/pull/14484/files#diff-7a3cb610cec719a402a45ec87c11a3e6360'
23:01:03disbotstd/with support field assign
23:01:18FromDiscord<Clyybber> (edit) 'https://github.com/nim-lang/Nim/pull/14484/files#diff-7a3cb610cec719a402a45ec87c11a3e6360' => 'https://github.com/nim-lang/Nim/pull/14484/files#diff-7a3cb610cec719a402a45ec87c11a3e6R360'
23:01:19disbotstd/with support field assign
23:02:14FromDiscord<Clyybber> , oh sorry for the spam
23:02:20FromDiscord<Clyybber> the last link should point to the right line
23:02:25leorize[m]oh, didn't spot that one
23:02:41leorize[m]yea it's better to be done outside of that PR
23:02:48FromDiscord<Clyybber> or not at all :P
23:02:58leorize[m]and the syntax is definitely not something we should support
23:03:02FromDiscord<Clyybber> yeah
23:06:33leorize[m]you're gonna wrap it up?
23:06:58leorize[m]if you got rid of that colon syntax then it's an approval from me
23:08:41*awe003 joined #nim
23:08:53FromDiscord<Clyybber> Yeah, I rebased and got rid of it
23:09:02FromDiscord<Clyybber> if its green then its good to go IMO
23:10:25*awe002 quit (Ping timeout: 240 seconds)
23:35:59FromDiscord<djazz> managed to recreate the stuff I made in electron into nim module webview ^^ uses IE's renderer on windows and WebKit on Linux and macOS https://media.discordapp.net/attachments/371759389889003532/743976223440502814/loe-launcher-nim-win.png
23:36:15FromDiscord<djazz> now with nim module webview*
23:37:05FromDiscord<Clyybber> nice!
23:37:22FromDiscord<Rika> ~~wonder if it can be made to use gecko
23:37:24FromDiscord<Rika> (edit) 'gecko' => 'gecko~~'
23:37:58FromDiscord<Clyybber> servo would be more interesting
23:38:07Yardanicobut servo is going away really
23:38:10FromDiscord<Clyybber> though it might die now
23:38:13Yardanicoyeah
23:38:47*vicfred joined #nim
23:40:33FromDiscord<Varriount> Servo is going away?
23:40:42Yardanicoafter layoffs - very probably yes
23:40:57disruptekthey wither and drop off after a couple weeks.
23:41:04Yardanicomost of the servo team was laid off
23:41:27Yardanicohttps://twitter.com/SimonSapin/status/1293231187167784960
23:41:31FromDiscord<Rika> think servo was dying before the team was laid off eve
23:41:32FromDiscord<Rika> (edit) 'eve' => 'even'
23:41:41FromDiscord<Rika> the layoff is probably the final blow
23:41:47Yardaniconot really, it's a cool project
23:42:41FromDiscord<Rika> nim web renderer when 😛
23:43:03YardanicoI just need to finish sciter bindings :P
23:43:04FromDiscord<djazz> If Mozilla made an alternative to Electron...
23:43:13Yardanicohow would it be better?
23:43:21Yardanicoif you still use the same browser tech, it won't get any better
23:46:41shashlickHow's sciter
23:47:25Yardanicoshashlick: I didn't have much progress, I was hitting some strange bug with getting utf16 strings from sciter
23:47:28Yardanicoit works with refc but doesn't with arc
23:49:33*krux02__ joined #nim
23:52:45*krux02_ quit (Ping timeout: 240 seconds)
23:53:22*awe004 joined #nim
23:55:13*awe003 quit (Ping timeout: 246 seconds)