<< 21-09-2020 >>

00:12:17*gmaggior quit (Quit: Leaving)
00:27:28*a_chou quit (Ping timeout: 258 seconds)
00:32:45*Tanger joined #nim
00:39:48*a_chou joined #nim
00:40:46*abm quit (Read error: Connection reset by peer)
00:42:26*Tlangir joined #nim
00:44:48*Tanger quit (Ping timeout: 260 seconds)
00:50:06FromDiscord<ThothLoki> is there any software out there that has been written in nim that is being used professionally?
00:50:23FromDiscord<19> hello, stupid question: im binding to a dll it compiles nicely but it says `could not import: Win32LoadXInput` when i run the exe
00:52:06FromDiscord<Nisha (LGBTQ+)> Is that the dll?
00:52:27FromDiscord<Nisha (LGBTQ+)> @19
00:52:50FromDiscord<19> thats the name of the c function
00:52:58FromDiscord<Nisha (LGBTQ+)> Oh alright
00:53:08FromDiscord<19> nim bind:↵```proc win32loadxinput(){. importc:"Win32LoadXInput", dynlib:"win32_njin.dll" .}```↵compiler command:↵```cl ..\code\win32_njin.cpp user32.lib gdi32.lib -Zi /LD /link /EXPORT:Win32LoadXInput```
00:53:16FromDiscord<Nisha (LGBTQ+)> Hm
00:53:38FromDiscord<Nisha (LGBTQ+)> Try putting the dll inside of the same folder that the exe is is just to check something please
00:54:18FromDiscord<19> it worked
00:54:25FromDiscord<19> thank you @Nisha (LGBTQ+)
00:54:39FromDiscord<Nisha (LGBTQ+)> No worries!
00:55:58FromDiscord<19> @ThothLoki there are some banks that use Nim
00:56:11disruptekwhich?
00:57:46FromDiscord<Rika> wtf? banks using nim?
00:57:48FromDiscord<Rika> that sounds insane
00:57:57FromDiscord<Rika> considering the shit i hear about banks and programming
00:57:57FromDiscord<ThothLoki> what do they use it for?
00:58:59disruptekthere's unicredit i guess.
01:00:10FromDiscord<exelotl> I wonder what's the overlap between the banks that use Nim and the banks that just got exposed for illegal activity
01:00:18FromDiscord<ThothLoki> ok, so if i wanted to do a for loop to loop through a list, how would i do it?↵`let drives = (r"C:", r"F:", r"J:")`↵this is my list
01:00:21FromDiscord<ThothLoki> i am stumped
01:00:25FromDiscord<ThothLoki> i keep fucking it up
01:00:53*kenran joined #nim
01:01:02FromDiscord<exelotl> You probably want to use a seq or array instead of a tuple
01:01:10FromDiscord<Rika> that is not a list
01:01:42FromDiscord<ThothLoki> ok, i am coming from python, so these will be different
01:01:59FromDiscord<Rika> no, its the same in python
01:03:45FromDiscord<ThothLoki> i did a seq
01:04:17FromDiscord<ThothLoki> i saw i used ( ) instead of [ ]
01:04:20FromDiscord<ThothLoki> oops
01:04:31FromDiscord<ThothLoki> stupid laptop not being able to see in the dark
01:05:21PrestigeAny recommendations for tui libs? Just found illwill, looks decent
01:06:08*kenran quit (Ping timeout: 272 seconds)
01:06:20FromDiscord<slonik_az> +1 to illwill
01:06:41FromDiscord<ThothLoki> awesome., thanks @exelotl and @Rika got it to work
01:06:46FromDiscord<ThothLoki> stupid fingers
01:07:43FromDiscord<Rika> illwill is a good choice if you already know how to use imgui
01:07:55FromDiscord<Rika> though it has less widgets than imgui
01:07:58FromDiscord<Rika> if you care about that
01:08:22Prestigenever used it
01:09:22FromDiscord<ThothLoki> terminal "gui" huh?
01:09:31*a_chou quit (Quit: a_chou)
01:09:41Prestigeterminal ui
01:13:09Prestigehm so are there no predefined widgets? Was hoping for a couple, but I could make my own I suppose
01:14:01FromDiscord<Rika> there are essentailly none but you can prolly gut the demo for some
01:27:32PrestigeGoing to be some work, will have fun playing with it
01:31:00FromDiscord<ThothLoki> does nim have a messagebox ui where you dont need a 3rd party gui library
01:31:28*apahl quit (Ping timeout: 244 seconds)
01:33:22*oculux quit (Ping timeout: 256 seconds)
01:33:41*apahl joined #nim
01:39:11FromDiscord<juan_carlos> You can hack one with terminal module. :P
01:42:54disruptekbentley and i were just talking about how criminally difficult iteration is.
01:48:26Prestige?
02:09:09*lritter quit (Ping timeout: 260 seconds)
02:21:17disruptek~bentley
02:21:18disbotbentley: 11https://imgur.com/gallery/yEXiWWG -- disruptek
02:21:18disbotbentley: 11a good boy
02:21:34disruptekc'mon, everyone knows bentley.
02:28:15FromDiscord<19> thats a nice dawg
02:28:42Prestigemore curious about the iteration comment
02:29:26disrupteki know, right?
02:29:55*waleee-cl quit (Quit: Connection closed for inactivity)
02:30:17FromDiscord<19> i have a main function in C where it does some funky win32 stuff. what is a nice way to inject nim code into that function?
02:31:00FromDiscord<19> callbacks?
02:32:08Prestigeinjecting nim code into c? :o
02:33:02FromDiscord<19> maybe i phrased it wrong
02:34:19FromDiscord<19> just need a way to call nim functions from that function, it basically has a game loop.
02:34:46FromDiscord<19> or should i break it down into smaller functions and move the loop to nim?
02:35:16FromDiscord<19> sorry just thinking out loud here
02:35:18FromDiscord<Antacon> you can wrap the funky C function in Nim, maybe?
02:35:26FromDiscord<Antacon> https://nim-lang.org/docs/backends.html#nim-code-calling-the-backend-c-invocation-example
02:37:08FromDiscord<19> thanks for the cool link. im already calling the C func from nim. but i want to add stuff to it's body and not just call it.
02:37:24disruptekjust exportc your shit and call it from c.
02:38:27FromDiscord<19> i just noticed the exportc, didnt know it existed. thanks guys
02:39:03FromDiscord<19> damn that's cool
02:49:45*rockcavera joined #nim
03:01:43*kenran joined #nim
03:05:59*bunbunbunbunny joined #nim
03:08:14bunbunbunbunny3/wc
03:08:15*bunbunbunbunny left #nim (#nim)
03:09:15*oculux joined #nim
03:14:29*a_chou joined #nim
03:28:15disruptekchurch.
03:28:36FromDiscord<flywind> What's the use of `{.gcsafe.}`? It prevents global variables from be copying by thread-local? Is is just an optimization strategy. It is hard for me to learn `gcsafe` even after reading Nim manual.
03:30:16*a_chou quit (Quit: a_chou)
03:33:07*apahl quit (Ping timeout: 260 seconds)
03:33:26FromDiscord<acek7> whats up
03:33:57*apahl joined #nim
03:35:09disruptekit's a guard that you opt out of, basically. flywind ^
03:35:34FromDiscord<acek7> disruptek
03:36:05disruptekdude.
03:36:15FromDiscord<acek7> are you my dad
03:36:34disruptekprestige: it will be illwill? or fidget?
03:37:02disruptekacek7; depends on who your mom is, son.
03:38:09FromDiscord<acek7> whats your main use for nim
03:38:54disruptek!repo nakabonne/ali
03:38:55disbothttps://github.com/nakabonne/ali -- 9ali: 11Generate HTTP load and plot the results in real-time 15 167⭐ 4🍴 7& 1 more...
03:39:53FromDiscord<acek7> what made you want to make this
03:40:13disrupteki mainly use nim to escape a skillset that might earn the stable income i desperately need to support you anf the many other siblings i have yet to meet.
03:40:38disrupteki didn't make it, junior.
03:40:50FromDiscord<acek7> damn dad that blows
03:41:35disrupteknah; i think you'll like your sisters if your mom is any ibdication.
03:41:55FromDiscord<acek7> lmao
03:42:09FromDiscord<acek7> you really like the go language
03:42:40disruptekis that a question?
03:42:55FromDiscord<acek7> no i think its a statement
03:42:56FromDiscord<Elegant Beef> That's not disruptek
03:43:08FromDiscord<acek7> imposter
03:44:02disrupteknot enough douchebag?
03:44:13Prestigedisruptek: illwill, want it to be tui
03:44:25disrupteki'm not a fan of go.
03:44:43disruptekthe domain is nim.fan. go.fan was taken.
03:46:04FromDiscord<acek7> was gonna say man
03:46:16FromDiscord<acek7> you in the wrong place
03:47:24*thomasross quit (Ping timeout: 260 seconds)
03:57:06FromGitter<matrixbot> `Jaypatelani` Hello all.
03:57:24FromDiscord<Elegant Beef> Hello
03:58:38FromDiscord<acek7> sup dude
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:38*rockcavera quit (Remote host closed the connection)
04:06:39*supakeen joined #nim
04:09:10FromGitter<awr1> hello
04:09:39FromDiscord<Rika> hello
04:10:08FromGitter<matrixbot> `Jaypatelani` This is official room?
04:10:13FromGitter<awr1> yes
04:10:25FromGitter<matrixbot> `Jaypatelani` Thanks for confirmation :)
04:15:15FromGitter<awr1> is @alehander92 in here? i just wanted to say i've been using zerofunctional for a while now and i think it is an absolutely superb library
04:17:20FromDiscord<Elegant Beef> They're around occasionally so they might see that
04:27:05*narimiran joined #nim
05:39:46*solitudesf joined #nim
05:56:37*apahl quit (Ping timeout: 260 seconds)
06:04:32*apahl joined #nim
06:20:51alehander92i am here
06:21:00alehander92thanks! but credits to michael72
06:21:20alehander92he really did a lot of good stuff to make it stable and extensible and quallity, i mostly started the project
06:24:47*PMunch joined #nim
06:31:29FromGitter<awr1> i extend my thanks to him as well, then! i prefer it to sequtils lol
06:33:02alehander92we should see if something even better can be done
06:33:07alehander92these days
06:34:36FromGitter<awr1> what did you have in mind?
06:34:55alehander92well, maybe first class views
06:35:08alehander92might help with that as mratsim said
06:35:34alehander92because it might be easier to chain operations while reusing
06:35:38alehander92the same underlying data
06:42:15*kungtotte quit (Read error: Connection reset by peer)
06:43:11alehander92what do you guys think of
06:43:15alehander92`...` in ruby 3
06:43:47alehander92it forwards args i think there was an idea to somehow think of a solution for that in nim (a version of it is from ruby 2.7 tho)
06:44:50*kungtotte joined #nim
06:44:59*shad0w_ joined #nim
06:59:34*Vladar joined #nim
07:01:07PMunchalehander92, how does it work?
07:10:10FromDiscord<zetashift> And what does it do haha, it's hard to google `ruby 3 ...`
07:11:19PMunchYeah that's what I found out as well :P
07:23:28FromDiscord<Rika> think its ruby 3 destructuring
07:23:35FromDiscord<Rika> no
07:23:36FromDiscord<Rika> idk
07:23:58FromDiscord<Rika> `In Ruby the ... operator denotes a half-open range, i.e. that includes the start value but not the end value`
07:24:12FromDiscord<Rika> ?
07:27:14PMunchSo ..< in Nim..
07:27:49FromDiscord<Rika> im confused
07:28:01FromDiscord<Rika> theyre talking about something in arguments
07:28:36FromDiscord<Rika> ```↵Alternatively, if you do not need compatibility with Ruby 2.6 or prior and you don’t alter any arguments, you can use the new delegation syntax (...) that is introduced in Ruby 2.7.↵```
07:28:37FromDiscord<Rika> ???
07:28:52FromDiscord<Rika> oh, it forwards args to another function
07:29:03FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=2ygB
07:31:18*NimBot joined #nim
07:32:07PMunchOh, so it just forwards all arguments from the function to a sub-function
07:33:30FromDiscord<zetashift> oh that could be nice
07:33:40FromDiscord<zetashift> I haven't had any problems like that tbh
07:34:07FromDiscord<zetashift> Is there a Nim bencode parser?
07:34:55FromDiscord<Elegant Beef> there is this https://github.com/FedericoCeratto/nim-bencode
07:36:02FromDiscord<zetashift> huh weird that didn't pop up on Github
07:36:48FromDiscord<Elegant Beef> I'm weird and check nimble first 😄
07:47:49FromDiscord<zetashift> I was following nim days, day 2 and stumbled on some code haha
07:57:12*krux02 joined #nim
07:57:13FromDiscord<Avatarfighter> What is up everyone
07:57:56Araqasync orc is leak and crash free (to the best of my knowledge)
07:58:52Araqand it supports the old marshal.nim and deepcopy, it's 100% compatible to Nim v1
08:00:31FromDiscord<Rika> nice
08:00:34FromDiscord<Rika> congrats
08:01:13FromDiscord<flywind> If I use arc/orc, is still `gcsafe` necessary?
08:02:02Araqyeah it is, I wrote an RFC how to remove .gcsafe from Nim
08:02:26Araqwas rather unsuccessful ...
08:03:01Araqhttps://github.com/nim-lang/RFCs/issues/142
08:03:03disbotProposal to remove the `.gcsafe` effect from Nim ; snippet at 12https://play.nim-lang.org/#ix=26qX
08:03:30FromDiscord<flywind> Oh, I see. It is a pity.
08:04:49*Zectbumo joined #nim
08:05:55Araqflywind: well write down your arguments/experiences please (add it to the RFC)
08:07:21FromDiscord<flywind> Ok, I will. I don't know how to use `gcsafe` and how dangerous it is.
08:07:23FromDiscord<flywind> https://github.com/planety/prologue/blob/443b2aa23564b9c4248e7a7e079c526364968326/src/prologue/middlewares/sessions/redissession.nim#L56
08:17:41Araqto see if it really is, add assert isMainThread() inside the .gcsafe block
08:17:56Araqprobably we don't have isMainThread though :D
08:22:30FromDiscord<flywind> I just use the variables in closure environments, and it will be copied in every threads, is it still dangerous?
08:22:45FromDiscord<flywind> in refc
08:23:19Araqclosure environments are the number one for data races
08:25:57*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:26:30FromDiscord<flywind> https://play.nim-lang.org/#ix=2ygI
08:26:52FromDiscord<flywind> Well, my framework just does something like this.
08:27:37FromDiscord<flywind> (edit) 'https://play.nim-lang.org/#ix=2ygI' => 'https://play.nim-lang.org/#ix=2ygJ'
08:29:38Araqyour snippet is safe
08:31:32FromDiscord<flywind> Thanks!
08:37:18PMunchI really feel there should be a built-in way to do string -> seq[char|uint8]
08:37:29PMunchThese casts just feels so dirty
08:41:50FromDiscord<Elegant Beef> Clearly just leave it as a string but when accessing from it convert to and ord 😛
08:44:17PMunchWell I wanted to concatenate some string data onto a sequence of bytes
08:44:58PMunchBecause Wireshark has a "copy escaped string" feature, and I had built part of my query as a Nim sequence :P
08:45:20PMunchhttp://ix.io/2ygN <- is there a better way of reading everything from a socket?
08:45:37PMunchI guess UDP doesn't have a concept of everything..
08:45:54FromDiscord<Elegant Beef> Couldnt you use a string stream?
08:46:18PMunchWell I need the final product to be a sequence
08:46:24PMunchAnd there is no SequenceStream
08:46:34PMunchIn fact we miss all kinds of streams..
08:47:22PMunchShould also have SocketStream: https://github.com/PMunch/binaryparse/issues/6
08:47:23disbotHow to use a socket as input
08:49:00FromDiscord<acek7> how is everyone
08:49:10Araqyeah I never understood why dom96 didn't *start out* with socket streams
08:52:23PMunchI mean setPosition is a potential issue
08:52:40PMunchI guess it could just throw an error if you try to go backwards though..
09:04:11*arecacea1 quit (Remote host closed the connection)
09:04:35*arecacea1 joined #nim
09:07:16disrupteki've been going backwards for years; the errors don't help.
09:09:53AraqPMunch, you can buffer it but it would be bad for when you've lots of data
09:10:03PMunchExactly
09:10:15Araqhttps://github.com/nim-lang/RFCs/issues/104#issuecomment-694767095 we have a winner.
09:10:15disbotNim's mascot proposal
09:10:23Araqmy daugther likes this one best
09:11:50FromDiscord<Elegant Beef> I now wanna see an animation with a bigger crown that falls over it's face and it fights with to take off 😄
09:15:33PMunch#badgercrew https://uploads.peterme.net/nim-mascot-head.png
09:18:49FromDiscord<flywind> Is it better to mark all procs in redis.nim as `gcsafe` or `nosideEffect` (or `func`)? https://github.com/nim-lang/redis/blob/master/src/redis.nim
09:19:42FromDiscord<Elegant Beef> Pmunch i still cant take that seriously
09:20:32FromDiscord<flywind> (edit) 'all' => 'some'
09:25:05*Vladar quit (Quit: Leaving)
09:26:59PMunch@Elegant, what part about that says joking to you!
09:27:50FromDiscord<dom96> Araq: looks awesome, but is that image original?
09:31:13AraqI don't know :-)
09:32:36FromDiscord<Rika> its not
09:32:44FromDiscord<Rika> seems to be a stock photo
09:33:13FromDiscord<Rika> https://www.dreamstime.com/isolated-cute-hand-drawn-lion-crown-isolated-cute-hand-drawn-lion-crown-king-animal-scandinavian-style-baby-image160855113
09:38:17*apahl quit (Ping timeout: 260 seconds)
09:39:06Oddmongeri think i have missed something in arrays… can i assign their members in a for loop ?
09:39:16*Trustable joined #nim
09:39:17Oddmongerlike: for light in light_array:
09:39:26Oddmonger light.color.alpha = 0
09:39:40Oddmongerit seems that i cannot assign this way
09:39:49*apahl joined #nim
09:40:01Oddmongermay i need to ref light_array ?
09:40:45FromDiscord<haxscramper> Use `for item in mitems(light_array)` to iterate over mutable elements
09:40:49FromDiscord<Vindaar> ^
09:41:27Oddmongerthank you
09:42:07FromDiscord<exelotl> > stock photo↵aw dangit
09:42:59*sagax joined #nim
09:43:56Araqyeah that's bad
09:58:24*sealmove joined #nim
09:58:40sealmovehey what's up with that nimwc?
10:01:35*PMunch quit (Quit: leaving)
10:02:39*PMunch joined #nim
10:05:25sealmoveseems fancy :D
10:07:05FromDiscord<haxscramper> How can I convert body of `nnkAccQuoted` to node? For things like `ident("..")` I just get list of identifiers, not the body itself
10:07:25FromDiscord<haxscramper> For example https://play.nim-lang.org/#ix=2yh9
10:07:29*Zectbumo quit (Remote host closed the connection)
10:08:15FromDiscord<haxscramper> And I can't even convert it to string `parseExpr` it
10:16:31FromDiscord<lqdev> use repr
10:18:21FromDiscord<Clyybber> @haxscramper Do you want the result to be "Ident "hello""?
10:20:56FromDiscord<haxscramper> Yes, I expected to see `(Call (Ident "ident") (StrLit "hello"))` inside quoted part
10:23:23FromDiscord<haxscramper> > use repr↵@lqdev https://play.nim-lang.org/#ix=2yhc same result - I put in `` `ident("213")` `` and get `` `ident ( 213 )` `` as result
10:26:37FromDiscord<Clyybber> @haxscramper Why do you expect to get that? Its invalid code.
10:27:06FromDiscord<Clyybber> But I understand the use case, it would allow to use inline-expressions inside `` for quote
10:28:41FromDiscord<Clyybber> @flywind Is there any reason you specify so much in the testament spec of your test PRs?
10:31:42FromDiscord<shashlick> Araq: do you think https://github.com/nim-lang/Nim/issues/15202 is also fixed? I'll try in a few hours but curious on that one.
10:31:43disbot--gc:arc segfaults if dll modifies object owned by main executable ; snippet at 12https://play.nim-lang.org/#ix=2xUj
10:37:07*letto quit (Quit: Konversation terminated!)
10:39:51Oddmongeris it ok to cast a cstring to string, for a case ?
10:40:13Oddmongercase cast[string](payload.param_name): …
10:40:24FromDiscord<lqdev> nope
10:40:29FromDiscord<lqdev> you need to do `$myCstring`
10:40:32*letto joined #nim
10:40:36FromDiscord<lqdev> if it's null-terminated
10:40:43Oddmongeroh
10:41:02Oddmongerthank you
10:45:03FromDiscord<flywind> @Clyybber no, just for future changes easily.
10:48:03Araqshashlick: there never was such a bug as far as I'm concerned, your config setup was to blame
10:54:37FromDiscord<Clyybber> @flywind I think its better to not overspecify, so that we can change defaults easily
10:56:15FromDiscord<Clyybber> And to keep it more simple
10:59:23FromDiscord<flywind> Ok, I agree with you.
11:04:22Yardanicolol, didn't expect this https://github.com/Yardanico/posthog-nim/issues/1
11:04:23disbotPostHog Team Appreciation
11:04:27Yardanicowrote that small library a few months ago
11:08:51FromDiscord<Vindaar> that's pretty nice of them!
11:14:36Yardanicothey gave me a $25 coupon for https://merch.posthog.com/ and also said "Also, I have a personal interest in supporting the Nim community. " :P
11:15:16FromDiscord<lqdev> nice
11:17:17FromDiscord<Vindaar> now they just need to replace python under "Designed for your stack" here https://posthog.com/ and we're golden!
11:17:33FromDiscord<Vindaar> *by nim of course, haha
11:18:34FromDiscord<ShalokShalom> Is Nim's func already purely functional?
11:18:43Yardanicowell, not really
11:18:50Yardanicodepends on what you mean by that
11:18:59Yardanicothere's a new feature in devel - strictFuncs - which gives you deep immutability in funcs
11:19:10Yardanicobut even then you can always explicitly state "var MyType" and modify stuff in funcs
11:19:59FromDiscord<flywind> http://nim-lang.github.io/Nim/manual_experimental.html#strict-funcs
11:20:36Yardanicoexactly
11:23:12*oculux quit (Ping timeout: 256 seconds)
11:26:00*pyrobitz joined #nim
11:32:45*superbia1 joined #nim
11:35:25*superbia quit (Ping timeout: 240 seconds)
11:43:58*superbia1 is now known as superbia
11:49:51*oculux joined #nim
12:04:24FromDiscord<dom96> ooh, post hog looks like a nice google analytics alternative
12:04:27*rockcavera joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:38*supakeen joined #nim
12:12:12*waleee-cl joined #nim
12:15:25Araqdom96: please review https://github.com/nim-lang/Nim/pull/15336
12:15:26disbotfix #15333
12:23:21FromDiscord<lqdev> /home/daknus/Coding/Nim/rapid/src/rapid/game/tilemap.nim(205, 53) Error: cannot instantiate Tilemap↵got: <type T: TilemapTile, type FlatTileContainer[FlatTilemap.T]>↵but expected: <T: TilemapTile, C: TileContainer>
12:23:24FromDiscord<lqdev> this is odd
12:24:35FromDiscord<lqdev> so i have two concepts
12:24:41FromDiscord<lqdev> `TilemapTile` and `TileContainer`
12:24:47FromDiscord<lqdev> defined here https://github.com/liquid600pgm/rapid/blob/master/src/rapid/game/tilemap.nim#L11
12:25:05FromDiscord<lqdev> and then i have a `Tilemap[T: TilemapTile, C: TileContainer]`
12:25:20*shad0w_ quit (Read error: Connection reset by peer)
12:25:27FromDiscord<lqdev> and i get the above error when trying to instantiate Tilemap
12:26:01FromDiscord<lqdev> any ideas?
12:26:09FromDiscord<lqdev> attaching .explain to my concepts doesn't work
12:26:41*shad0w_ joined #nim
12:29:33AraqI think the syntax is
12:29:43Araqtype T {.explain.} = concept ...
12:31:37FromDiscord<lqdev> that doesn't work either
12:31:42FromDiscord<Clyybber> @lqdev FlatTileContainer doesn't have a isSolid
12:31:53FromDiscord<lqdev> T must have it
12:31:59FromDiscord<Clyybber> ah
12:32:04*superbia quit (Ping timeout: 246 seconds)
12:32:49*superbia joined #nim
12:35:33*Kaivo quit (Quit: WeeChat 2.9)
12:53:54FromDiscord<lqdev> so, any ideas?
13:20:10*sealmove quit (Ping timeout: 272 seconds)
13:29:48YardanicoAraq: so 1.4 will have refc by default, but the release after 1.4 will have orc?
13:31:18narimiranYardanico: ORC as a default will come later
13:31:21Yardanicookay
13:32:05*clyybber joined #nim
13:32:13AraqYardanico: I brought up changing the default to markAndSweep but that would just be more friction
13:33:04*pyrobitz quit (Remote host closed the connection)
13:34:02narimiranYardanico: are you alluding that https://forum.nim-lang.org/t/6549#42774 might be confusing?
13:34:24Yardanicono? i was referring to the comment in the unifying GCs RFC
13:34:30narimiranok
13:34:52*Kaivo joined #nim
13:35:20Yardanicowe need to advertise orc heavier so people actually test it on 1.4 :)
13:35:40Yardanicoeven as a hint maybe?
13:35:57AraqYardanico: I need a break, we should release 1.4.0 this week and then 1.4.2 later with more ORC fixes
13:36:01*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
13:36:07Yardanicoit's okay, I understand
13:36:15FromDiscord<Vindaar> for what it's worth I did try arraymancer and ggplotnim again after the latest changes yesterday and unfortunately still a no go 😦
13:36:23Yardanicoarraymancer needs nodestroy changes
13:36:26Yardanicoat the very least
13:36:55AraqVindaar: it's not always our fault, people do strange things with Nim's inner workings
13:36:59*muffindrake joined #nim
13:37:09Yardanicowhen not defined(gcOrc): {.hint: "Current default GC (refc) is getting phased out, please test your code with --gc:orc".}
13:37:11Yardanicoor something like that
13:37:16Yardanicoit would be pretty annoying though
13:37:56FromDiscord<Vindaar> @Araq: oh, I'm not necessarily saying it's your fault!
13:37:59Araqif we had a working version system 1.4 would be 2.0
13:39:01YardanicoI still need to track a few more issues with ORC - NiGui crash in some examples and nimly SIGSEGV in one of its tests
13:43:05FromDiscord<Clyybber> Araq: Should we enable valgrind for those async tests?
13:43:31Araqtry it, was green for me. I fear the CI overheads
13:43:39Araqas valgrind is so slow...
13:46:13clyybberI think if we disable --track-origins it should be a lot faster
13:47:26Araqthere are also clang sanitizer options
13:47:46Araqand the gcc copycats
13:47:52Yardanicoso would it make sense to add that hint about refc being phased out or not?
13:48:01PMunchIs there a prettier way of doing this? https://play.nim-lang.org/#ix=2yic
13:48:26YardanicoPMunch: oh I see that you read the reddit post too
13:48:44PMunchHaha, guilty as charged :P
13:48:55FromDiscord<Rika> what reddit post
13:48:57YardanicoI just feel like people shouldn't try to port Python code like that 1:1 to Python
13:49:00Yardanicoto NIm*
13:49:09PMunch@Rika: https://www.reddit.com/r/nim/comments/ix09y5/can_an_iterator_iterate_an_iterator/
13:49:13Yardanico@Rika nim subreddit
13:49:57PMunchYardanico, tbf they didn't ask for a 1:1, they just asked if it was possible
13:50:22FromDiscord<Rika> pmunch https://play.nim-lang.org/#ix=2yid
13:51:29PMunchWait, why is that `items` iterator even needed then?
13:51:39FromDiscord<Rika> i dont know with you
13:51:41AraqYardanico: too early, 1.4 *adds* --gc:orc and then 1.6 should phase out cruft
13:52:21PMunchOh it isn't actually: https://play.nim-lang.org/#ix=2yie
13:52:24FromDiscord<Rika> because you need to add parentheses to the closure iterators when using for loop
13:52:30FromDiscord<Rika> otherwise its not
13:52:37PMunchI swear I tried that..
13:52:47FromDiscord<Rika> hmmmmm
13:52:58PMunchBut you're right
13:54:20PMunchBit annoying though that this doesn't work: https://play.nim-lang.org/#ix=2yig
13:55:05FromDiscord<Rika> because items is inline
13:55:22FromDiscord<Rika> are closure iterators really that slow
13:55:22PMunchAh
13:55:29PMunchWhat da you mean?
13:55:52FromDiscord<Rika> i keep on hearing yall nim devs saying closure( iterator)s are slow
13:56:15PMunchThey're not that slow AFAIK
14:00:13*superbia1 joined #nim
14:00:42*superbia quit (Ping timeout: 272 seconds)
14:02:53Araqthey are slower than they should be
14:04:15Oddmongercan «string» be used as a module name with Nim ?
14:04:33Yardanicoyes
14:04:36Oddmongeri use a lib which contains a string.nim, with a «toU64» proc inside
14:05:05Oddmongerand even when including string, «toU64» is refused at compilation
14:05:08*Tlangir quit (Ping timeout: 272 seconds)
14:05:21Yardanicowell, give us the error
14:05:24Araqyou probably need to write system.string for the type then
14:05:28Yardanicoah right
14:05:33Araqbetter give your modules sane names
14:05:43Oddmongerit's not a system.string function
14:06:12*clyybber quit (Quit: WeeChat 2.9)
14:06:12Oddmongerit's defined inside the string.nim of the API i'm using
14:06:22Yardanicowell, give us the error
14:06:28Yardanicoand code maybe
14:06:34Araqbetter name it tanga.nim
14:06:50Oddmongerthe error is : Error: undeclared identifier: 'toU64'
14:07:02Yardanicowell, can you show the definition of toU64?
14:07:17Oddmongerof course
14:07:17FromDiscord<Rika> araq: why "tanga.nim"?
14:07:21Oddmongerproc toU64*(zString: cstring; pu64OutValue: ptr orxU64;
14:07:27OddmongerpzRemaining: cstringArray): orxSTATUS {.inline, cdecl.} =
14:07:49supakeenRika: because a tanga is a string.
14:08:01*PMunch facepalms
14:08:21Oddmongerand my call: var CRC:orxU64 = toU64( texture.getName( payload.ano_orxShader_127.pstValue), addr CRC )
14:08:23FromDiscord<Rika> :?
14:08:51YardanicoOddmonger: but your toU64 proc has 3 arguments
14:08:53Yardanicoand you call it with two
14:09:00Oddmongerah
14:09:06Oddmongeryou got a point /o\
14:09:13Yardanicothat's why you should look at the whole error log
14:09:16Yardaniconot just at the error message line
14:09:45Oddmongeryes
14:09:55Yardanicoit should tell you that it tried to match toU64
14:10:02Yardanicobut the call didn't have enough arguments
14:11:49Oddmongerhttp://ix.io/2yim
14:12:16Yardanicotry with "nim"
14:12:43Oddmongerwith nim ?
14:13:01Yardaniconim c -r
14:13:01Yardanicoetc
14:13:11Yardanicoah wait you did this with nim already
14:13:21Yardanicowell then I don't know, maybe you forgot to export it or something
14:13:30Yardanicoare you sure that you import string in S12_lighting.nim ?
14:13:48Oddmongeryes
14:14:05Oddmongerimport norx, norx/[incl, config, viewport, obj, input, keyboard, mouse, clock, math, vector, render, event, anim, camera, display, memory, string, hashTable, shader]
14:14:40Yardanicowell idk then, I need code to reproduce the same issue so I can then help :P
14:15:15Oddmongerwell all code is public, but you'll neet norx too, and maybe it's a little too much to ask to you :)
14:15:22Yardanicowell it's okay, but a bit later
14:15:24Oddmongerbut thank you for the help :)
14:15:41Yardanicowell well well well
14:15:44Yardanicowellllllllll
14:20:19FromDiscord<haxscramper> Has anyone tried using cling (c++ code interpreter) for nim codegen? Is it possible to convert new nim code to C++ on the fly or I need whole program before I can generate something?
14:22:44*superbia1 is now known as superbia
14:25:49FromDiscord<shashlick> Need to bump nimble for 1.4
14:39:18FromGitter<Knaque> How can I tell a Nimble binary to compile with certain flags, namely `-d:ssl`?
14:40:09FromDiscord<shashlick> You mean nimble build? Or the project in general
14:40:38FromDiscord<shashlick> You can use a nim.cfg file or even the new {.define.} pragma
14:43:25FromGitter<Knaque> Did it with the nim.cfg. On a tangentially related note, does Nim have documentation for its pragmas? If so, I've never seen it.
14:43:42FromDiscord<shashlick> ~manual
14:43:42disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html
14:44:25FromGitter<Knaque> Huh, guess I've just only ever looked at The Index.
14:44:38Yardanico@Knaque -d:ssl can be done in the config, yes
14:44:48Yardanicobut don't forget that -d:release and -d:danger can only be used from command line
14:45:31Yardanicoand if you would've liked to provide -d:ssl through command line as well, it's something like
14:45:34Yardaniconimble build -d:ssl
14:46:09FromGitter<Knaque> I plan on publishing this to Nimble, so I would imagine that nim.cfg would cover all my bases.
14:54:09*hnOsmium0001 joined #nim
14:56:27*apahl quit (Ping timeout: 240 seconds)
14:57:00FromDiscord<shashlick> nim.cfg is only used by the project when it is compiled as the top level
14:57:12FromDiscord<shashlick> not if it is a library - in that case, the consuming project has to set the defines
14:58:37*apahl joined #nim
15:20:34FromDiscord<krisppurg> where do I locate my find my pkgs directory in nimble?
15:21:29FromDiscord<Vindaar> they are located in `~/.nimble/pkgs`. but for each package you can just run `nimble path <name>`
15:22:50*synshroud joined #nim
15:23:02FromDiscord<krisppurg> thank you
15:31:47*Vladar joined #nim
15:33:12*PMunch quit (Quit: leaving)
15:43:18*kenran quit (Ping timeout: 256 seconds)
15:47:50disruptekthe bastardfish rides again.
15:49:04krux02haxscramper: Regarding cling. The Probles isn't that the generated code doesn't work with cling, the problem is the nim compiler infrastructure isn't made for live updates. Generating for cling would be comparable to generating to js, you compile to c++ and then interpret the generated c++. That doesn't provide you the "advantage" of an interpreted language.
15:52:01disruptekshashlick: that's not true. nim.cfg is used when it is in a parent.
15:52:46krux02I went to use git submodules and nim.cfg over nimble.
15:54:10disruptekyeah; i'm sold on submodules. they are super fast and will work great with nimph.
15:55:41FromDiscord<shashlick> I cannot be bought
15:58:42FromDiscord<UNIcodeX> I'm getting an "Attempt to read from nil?" message when trying to serve static files with Prologue. Anyone know what's up with that?
15:59:44FromDiscord<UNIcodeX> (edit) 'I'm getting an "Attempt to read from nil?" message when trying to serve static files with Prologue. Anyone know what's up with that? ... ' => 'I'm getting an "Attempt to read from nil?" message when trying to serve static files with Prologue. Anyone know what's up with that?staticDirs is set to `[env.get("staticDir"]` which is `staticDir=/static` and all files are under that.'
15:59:53FromDiscord<UNIcodeX> (edit) '`[env.get("staticDir"]`' => '`[env.get("staticDir")]`'
16:02:02disruptekshashlick: it's just a matter of time.
16:04:21disruptekrika: you should mess with cps.
16:05:45FromDiscord<alehander42> ?
16:05:52FromDiscord<alehander42> i plan on using discord
16:05:55FromDiscord<alehander42> to stream a bit
16:06:04FromDiscord<alehander42> has someone done this
16:06:55FromDiscord<Clyybber> sure, its pretty easy
16:10:14*shad0w__ joined #nim
16:10:30*gmaggior joined #nim
16:11:52*shad0w_ quit (Ping timeout: 246 seconds)
16:11:53*shad0w__ is now known as shad0w_
16:26:01*Vladar quit (Quit: Leaving)
16:26:18*a_chou joined #nim
16:26:49*thomasross joined #nim
16:39:03*kenran joined #nim
16:43:07FromDiscord<InventorMatt> i am trying to create a macro for easily converting xml into objects but I am getting a weird error and I'm not sure what it means https://play.nim-lang.org/#ix=2yje
16:43:13FromDiscord<InventorMatt> any help would be appreciated
16:44:44*kenran quit (Ping timeout: 272 seconds)
16:47:25FromDiscord<Vindaar> @InventorMatt https://play.nim-lang.org/#ix=2yjg
16:47:47FromDiscord<Vindaar> quote needs to receive valide NimNodes
16:47:55FromDiscord<Vindaar> *valid
16:48:17Zevvinterestingly enough, "valide" is a valid word in dutch, meaning - guess what - "valid"
16:48:54FromDiscord<Vindaar> haha, it is a German word as well
16:49:09FromDiscord<InventorMatt> awesome, that works. thanks so much
16:49:17FromDiscord<Vindaar> 🙂
16:50:40*Vladar joined #nim
16:54:34FromDiscord<acek7> this whole xbox buying bethesda things really got me hyped
16:58:27*jacereda joined #nim
17:00:15Prestigethink it's a good thing?
17:03:15ZevvSure, Fallout 76 will serve them right
17:07:31FromDiscord<acek7> i think so
17:07:44FromDiscord<acek7> the board members didnt care anymore and i guess trumps brother that died owned a stake in it
17:08:04FromDiscord<acek7> and i dont think phil spencer can do them wrong
17:10:26PrestigeI just worry after banjo threeie was borked
17:17:43alehander92maybe 1 hour work
17:17:44alehander92today
17:17:46alehander92on alias stuff
17:17:52alehander92now some tests run fine
17:17:58alehander92i'll take a look at adding a bit more
17:18:06alehander92do we have .. ref sets ?
17:19:27FromDiscord<acek7> maybe im just dumb but im having a hard time learning some of this beginner stuff of nim
17:20:25Prestigehave any questions?
17:21:26FromDiscord<acek7> i think having a simple cheatsheet with like the common terms/syntax etc and their meanings and functionality would help me wrap my head around some stuff more
17:21:49FromDiscord<acek7> i always have struggled reading documentation and nims is kinda unfriendly
17:21:50narimirando you have experience in some other language?
17:22:27FromDiscord<acek7> mainly just some basics in python
17:22:42FromDiscord<acek7> ive never built any complicated programs or anything though. Just done simple stuff
17:23:48narimiranmaybe this helps: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers
17:23:50voidpiacek7: this book is being very helpful to me http://ssalewski.de/nimprogramming.html#_arrays_and_sequences
17:23:56Oddmongeris it possible to have profiles with a .nim.cfg ?
17:23:57Prestigehttps://narimiran.github.io/nim-basics/ is good too
17:24:14Oddmongerlike a debug profile, a release profile…
17:24:24narimiranPrestige: thanks for not having to promote myself :)
17:24:50Prestigeyw haha
17:31:29FromDiscord<acek7> i feel kinda silly because its taken me kinda long to get where i am with programming ya know understanding a few of the basics. but nim seems pretty similar to python with a lot of the functionality and speed and such of the c languages and that seems like a good thing to learn as well.
17:35:19alehander92Araq
17:35:35alehander92i use ref sets in my data structure to represent the disjoint ones
17:35:51alehander92did you use handles & seq-s instead in varpartitions
17:36:06alehander92because they are a bit more obvious, no hidden ref links?
17:43:08FromDiscord<lqdev> maybe someone more knowledgable is online, so let me ask my question from before one more time↵i'm having a bit of an issue with concepts and generics, for some strange reason i cannot instantiate `Tilemap[FlatTileContainer[T]]` (definitions here https://github.com/liquid600pgm/rapid/blob/master/src/rapid/game/tilemap.nim#L10). concept diagnostics via .explain don't seem to work, it just throws an error "cannot instantiate Tilemap"
17:43:32FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2yjx
17:48:51*waleee-cl quit (Quit: Connection closed for inactivity)
17:49:33FromDiscord<lqdev> Oddmonger: wdym?
17:49:36Prestige@acek7 it's okay to learn slowly if you keep learning. It's taken me a lot of time, too
17:51:45Oddmongerlqdev : is it possible to have a .nim.cfg with conditions ? For exemple, having debuginfo set or not
17:52:22FromDiscord<lqdev> Oddmonger: sure. https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L55
17:53:05Oddmongernice ! Thank you !
18:00:56FromDiscord<shashlick> Araq: I tested #15202 again with the latest devel and it still segfaults - why is it an issue with my config?
18:00:57disbothttps://github.com/nim-lang/Nim/issues/15202 -- 3--gc:arc segfaults if dll modifies object owned by main executable ; snippet at 12https://play.nim-lang.org/#ix=2xUj
18:06:28*opal joined #nim
18:09:01FromDiscord<shashlick> using `-d:useMalloc` helps pass the test, without it, my program segfaults - I've updated the issue
18:20:51FromDiscord<exelotl> Yooo I just figured out a really cool optimisation that can help with matrices in GBA dev
18:20:56FromDiscord<exelotl> https://play.nim-lang.org/#ix=2yjJ
18:22:30FromDiscord<exelotl> Using term rewriting macros to allow `a = b` where `a` and `b` are different types, without the cost of calling a converter on `b`
18:23:28solitudesfcool
18:28:43*shad0w_ quit (Remote host closed the connection)
18:36:25*a_chou quit (Ping timeout: 246 seconds)
18:42:35*waleee-cl joined #nim
18:47:21*Zectbumo joined #nim
18:48:09*arecacea1 quit (Remote host closed the connection)
18:48:28*arecacea1 joined #nim
18:51:02*vicfred quit (Quit: Leaving)
19:10:10FromDiscord<Avatarfighter> What does -d:useMalloc with arc do?
19:12:16FromDiscord<shashlick> Makes Nim use C's malloc instead of Nim's own memory manager, albeit prefixing each allocation with its size to support clearing memory on reallocation
19:12:27FromDiscord<shashlick> from https://nim-lang.org/docs/nimc.html#additional-compilation-switches
19:14:11*vicfred joined #nim
19:17:15*Vladar quit (Quit: Leaving)
19:21:10*kungtotte quit (Ping timeout: 272 seconds)
19:29:09FromDiscord<exelotl> in the devel manual: "Since version 1.4 Nim allows view types to be used as local variables. This feature needs to be enabled via {.experimental: "views".}."
19:29:51FromDiscord<exelotl> does this mean I can do `var x: var int = y` ?
19:30:19FromDiscord<Clyybber> AFAIK it only applies to openArray for now
19:30:24FromDiscord<Clyybber> but the infrastructure for more is there
19:31:48FromDiscord<exelotl> ah I see, yeah that's the main thing to be excited about anyways :)
19:32:44FromDiscord<Clyybber> slicing returning views is one step that should be cool
19:33:14FromDiscord<exelotl> I can already achieve mutable hidden pointers using something like `iterator mutate[T](a: var T): var T = a`
19:33:38FromDiscord<Clyybber> heh, smart hack
19:34:01FromDiscord<Clyybber> did you see timothees {.byaddr.} ?
19:34:05FromDiscord<shashlick> even with -d:useMalloc --gc:orc, my plugins package still segfaults
19:36:19FromDiscord<Clyybber> are you using rtl for your dlls?
19:36:25*gmaggior quit (Ping timeout: 260 seconds)
19:36:50*narimiran quit (Ping timeout: 256 seconds)
19:36:56FromDiscord<Clyybber> ping @shashlick ?
19:37:29FromDiscord<acek7> so if i wanted to design a map making program, that just like does some simple fractal line map drawing i can do with a drawing tool similar to photoshop wouldnt anyone have any kind of tutorials or tips on how i could get to something like that with Nim
19:37:58FromDiscord<exelotl> ah I forgot about byaddr
19:38:30FromDiscord<shashlick> @Clyybber - i cannot compile nimrtl with --gc:arc
19:38:54FromDiscord<Clyybber> @acek7 Heh, if they were a tutorial for that the program you want to make would already exist, no ? :D
19:39:02FromDiscord<Clyybber> @shashlick Hmm, why?
19:40:06FromDiscord<shashlick> nim c --gc:orc nimrtl.nim => Error: system module needs: nimErrorFlag
19:41:12FromDiscord<acek7> i dont mind a little figuring it out myself i just kinda want a basic guide with some tips from someone who may have already built some desktop software. I know what i want is unique lol and i will figure it out but its a challenge and can be really frustrating. I know im still learning the language but why cant i learn and put what im learning into my project as well.
19:41:20FromDiscord<Clyybber> @shashlick Hmm, please add it to the issue
19:41:55FromDiscord<Clyybber> @acek7 I haven't coded any non-game UI heavy stuff, but fidget might be up your alley
19:42:27FromDiscord<Clyybber> And for rendering custom stuff OpenGL
19:42:31FromDiscord<Clyybber> which is language agnostic
19:47:07FromDiscord<shashlick> @Clyybber - https://github.com/nim-lang/Nim/issues/15202#issuecomment-696333281
19:47:08disbot--gc:arc segfaults if dll modifies object owned by main executable ; snippet at 12https://play.nim-lang.org/#ix=2xUj
19:48:49*lritter joined #nim
19:48:53*gmaggior joined #nim
19:49:17FromDiscord<exelotl> `var x {.byaddr.} = y` seems weirdly inconsistent considering `var T` is used for the same thing in function parameters - though I appreciate that the later could lead to weird invalid combinations if used in a variable declaration
19:49:34FromDiscord<exelotl> like out of `var x: var[int] = y`, `var x: lent[int] = y`, `let x: var[int] = y`, `let x: lent[int] = y`, which ones would be valid?
19:50:45FromDiscord<exelotl> (edit) 'later' => 'latter'
19:54:28FromDiscord<Clyybber> 1, 2, 4 would be valid
19:54:37FromDiscord<Clyybber> ah nope
19:54:40FromDiscord<Clyybber> sorry
19:54:44FromDiscord<Clyybber> 1 and 4
19:55:28FromDiscord<Clyybber> 2 and 3 don't make too much sense do they?
19:55:50FromDiscord<exelotl> indeed they don't but I wasn't quite sure haha
20:05:44*a_chou joined #nim
20:10:31FromGitter<deech_twitter> I have a closure I'm passing to C++ as a function pointer + void pointer, when the class destructor is called I'd like to notify arc/orc. `GC_unRef` only takes `ref`s so I'm wrapping the closure in an object. Is there a better way of doing this?
20:14:16*hnOsmium0001 quit (Killed (Sigyn (Spam is off topic on freenode.)))
20:17:13FromDiscord<Clyybber> deech: If possible `move` the closure into the C++ class
20:17:51FromDiscord<Clyybber> and then to destroy call this proc from the Cpp side: proc destroy(a: sink T) = discard
20:20:14FromDiscord<Clyybber> @deech_twitter see above
20:20:54FromDiscord<haxscramper> What is the recommended way of wrapping explicit C++ template instantiations into nim? E.g. `std::string` is a `typedef basic_string<char> string`. Just making `type StdString = BasicString[cchar]` is enough or there is some codegen interaction that I need to be aware of?
20:21:46FromDiscord<Clyybber> I
20:22:39FromDiscord<Clyybber> @haxscramper Nim generics don't translate to Cpp templates
20:23:14FromDiscord<Clyybber> So for wrapping this approach won't work, for porting sure, they are equivalent in terms of functionality
20:23:55FromDiscord<haxscramper> I'm specifically talking about wrapping
20:24:35FromDiscord<Zachary Carter> @shashlick - question: how does `getHeader` work if the header file is in a subdirectory?
20:24:41FromDiscord<haxscramper> Because C++ library uses `std::string` which is a typedef or another class which I can wrap, but I don't know how to connect two wrappers together
20:25:11FromDiscord<Clyybber> Maybe use emit?
20:25:25FromDiscord<Clyybber> I'm not sure, @Zachary Carter is the one to ask when it comes to cpp wrapping
20:25:41FromDiscord<shashlick> @Zachary Carter - it should find it - just give the header name
20:25:44FromDiscord<Clyybber> But the Nim compiler definitely doesn't translate nim generics to Cpp generics/templates
20:25:52FromDiscord<Zachary Carter> @shashlick hmm okay
20:26:48FromDiscord<shashlick> that's if you download the stuff, if you use -d:xxxStd you need to specify sub-path
20:26:58FromDiscord<haxscramper> I don't really like the idea. I'm writing automatic wrapper too so I'd rather not use hacks like that from the start. There is a https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-objects which should work for regular objects. Now I'm doing `StdString* {.importcpp: r"std::string", header: cxheader.} = object`
20:27:24FromDiscord<Zachary Carter> gotcha
20:27:49FromDiscord<haxscramper> But because all methods are declared in base class I need to port them somehow to alias too, which is why I thought about doing the same (aliasing) in nim
20:30:02FromDiscord<Zachary Carter> I don't really understand the question @haxscramper - you're trying to wrap std::string?
20:30:22FromDiscord<haxscramper> tl;dr - yes
20:30:42FromDiscord<Zachary Carter> should be easy - should just be `{.importcpp: "std::string".}
20:30:45FromDiscord<Zachary Carter> (edit) '"std::string".}' => '"std::string".}`'
20:31:07FromDiscord<haxscramper> But this is question about wrapping shit like methods for typedefs of template instantiations of another class
20:31:28FromDiscord<haxscramper> I also need to have all methods wrapped too
20:32:22FromDiscord<Zachary Carter> you need to wrap them then
20:32:45*a_chou quit (Quit: a_chou)
20:33:36*kungtotte joined #nim
20:34:25FromDiscord<Zachary Carter> @shashlick - okay I just was doing something dumb setting up the cache directory for nimterop to build to - what if the static library that gets built is in a folder like `target/debug` - do I need to do anything specific besides defining `libStatic` to tell the linker where the built library is?
20:34:58FromDiscord<haxscramper> Yes, but base class is generic, so wrappers should also be generics. But than I have to declare std string wrapper as alias in nim so I can use methods, and I'm not sure how to handle this at all
20:35:08FromDiscord<shashlick> it will get linked automatically
20:35:31FromDiscord<shashlick> as long as header name matches - else you can use altNames
20:35:38FromDiscord<Zachary Carter> thanks
20:35:39FromDiscord<shashlick> getHeader will find and link the static lib
20:36:03FromDiscord<Zachary Carter> @haxscramper can you provide me with some example code?
20:36:19FromDiscord<Zachary Carter> not really sure what you're trying to do...
20:38:43FromGitter<deech> Clyybber: Thanks!
20:39:11*Kaivo quit (Ping timeout: 258 seconds)
20:41:39*Kaivo joined #nim
20:43:28FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ykA
20:44:42FromDiscord<haxscramper> Compiled with `nim cpp -r --nimcache:cache.d nim_user.nim`
20:44:54FromDiscord<Zachary Carter> \o/
20:45:22FromDiscord<Recruit_main707> noice
20:52:11FromDiscord<Clyybber> @haxscramper Damn that works? Guess thats the power of import patterns
21:08:58*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
21:09:48*lritter quit (Ping timeout: 260 seconds)
21:10:13*lritter joined #nim
21:13:06*solitudesf quit (Ping timeout: 256 seconds)
21:14:03*uvegbot joined #nim
21:14:48FromGitter<ynfle> Where in the manual does it talk about implicit returning? (not implicit `result`)
21:16:09FromDiscord<Recruit_main707> might be because its late, but how do you implicitly return something without result?
21:16:45*bra-ket quit (Ping timeout: 260 seconds)
21:16:55FromGitter<ynfle> ```proc t: string = "hello"```
21:21:27*NimBot joined #nim
21:22:13FromDiscord<Recruit_main707> Yep, my brain idles already :P
21:24:03jaceredaI'm intrigued by https://forum.nim-lang.org/t/6549, it says "Independent of the stack size, large arrays on the stack do not cause slowdowns.". Is that because large arrays need to be initialized or due to the stupid stack-extension mechanism on Windows where it touches every stack page involved upon function entry?
21:25:32FromDiscord<UNIcodeX> Is there a quick way to reverse a seq?
21:27:21FromDiscord<Vindaar> @UNIcodeX `algorithm.reverse`
21:27:26*arecacea1 quit (Remote host closed the connection)
21:27:44*arecacea1 joined #nim
21:30:15*apahl quit (Ping timeout: 272 seconds)
21:30:52*apahl joined #nim
21:32:13*Trustable quit (Remote host closed the connection)
21:32:50FromDiscord<dom96> hmmm, it would be nice if Nim's strformat supported thousands separators
21:32:55FromDiscord<dom96> from what I can see that isn't the case
21:35:28FromDiscord<dom96> love that for JS the most popular solution is to use regex
21:36:12FromDiscord<Avatarfighter> What is up party people
21:37:24FromDiscord<Vindaar> too much work to do. too unproductive it times 🙂
21:37:28FromDiscord<Vindaar> *at
21:37:52FromDiscord<dom96> Screw it, no reason I can't use {.emit.} here to get a nice locale specific formatting in the browser 😄
21:41:32alehander92hmm
21:41:37alehander92escape hatchess
21:41:50alehander92haxscramper
21:43:49alehander92online?
21:44:27FromDiscord<Vindaar> proper ping for him: @haxscramper
21:54:47alehander92thanks!
22:04:05FromGitter<ynfle> > Where in the manual does it talk about implicit returning? (not implicit `result`) ⏎ ⏎ Anyone?
22:08:23FromDiscord<Elegant Beef> Are you just talking about returning undiscarded values?
22:09:08FromGitter<ynfle> Ya
22:09:16FromGitter<ynfle> The last line of a routine
22:10:38FromDiscord<Vindaar> @ynfle read the statements and expressions part of the manual and specifically the ones about statement list expressions and the void context ↵https://nim-lang.github.io/Nim/manual.html#statements-and-expressions-statement-list-expression
22:10:47FromDiscord<Vindaar> not sure if there is a more explicit part in the manual
22:12:08FromDiscord<Vindaar> sent a code paste, see https://play.nim-lang.org/#ix=2ykK
22:12:43FromDiscord<Vindaar> that block returns the value of the last line
22:13:43FromDiscord<Elegant Beef> Any undiscarded without the discardable pragma is passed up
22:13:56FromDiscord<Elegant Beef> Unless there is a branch i guess
22:14:16FromDiscord<Elegant Beef> *There is a condition in a proc where you can make it not like you using undiscarded values iirc*
22:16:20FromGitter<ynfle> I know that it happens
22:16:28FromGitter<ynfle> Just want to give someone a reference
22:16:31FromGitter<ynfle> Thanks anyways
22:19:01*a_chou joined #nim
22:36:29FromGitter<ynfle> I gave the Pmuch's blog post about it https://peterme.net/tips-and-tricks-with-implicit-return-in-nim.html
22:37:27FromDiscord<Vindaar> good choice!
22:37:43FromDiscord<Avatarfighter> I wish someone made an openmediavault alternative in nim
22:38:05FromDiscord<Avatarfighter> i have an old NAS that can barely run oopenmediavault but my nim programs run fine on it
22:47:00*a_chou quit (Ping timeout: 272 seconds)
23:00:00FromDiscord<dom96> I just set up a NAS using a barebones Ubuntu Server
23:00:12FromDiscord<dom96> Dunno what openmediavault provides but you likely don't need it
23:02:27FromDiscord<Avatarfighter> it just provides an interface for managing things like file shares, and SMART monitoring
23:10:14FromDiscord<dom96> yeah, it's trivial to set this up yourself
23:10:26FromDiscord<Avatarfighter> Yeah I assume so, I just dont have experience doing that stuff
23:10:42FromDiscord<Avatarfighter> I can probably write my own version of OpenMediaVault tbh
23:10:45FromDiscord<dom96> you don't need experience, just google
23:10:52FromDiscord<Avatarfighter> words to stand by 😛
23:11:08FromDiscord<Avatarfighter> Deadass this NAS probably needs Lubuntu on it lmao
23:13:15*jacereda quit (Remote host closed the connection)
23:13:38FromDiscord<Avatarfighter> Its just a beefy processor zooming at 1200 MHz with 256MB of RAM 😎
23:42:29*abm joined #nim
23:58:50*queen joined #nim