<< 08-10-2018 >>

00:10:58*rockcavera joined #nim
00:15:57*chemist69 quit (Ping timeout: 252 seconds)
00:17:40*stefanos82 quit (Quit: Quitting for now...)
00:18:11*chemist69 joined #nim
00:36:10FromGitter<zacharycarter> time to plug bgfx into the engine :D
00:36:19FromGitter<zacharycarter> if I haven't already - can't remember
00:36:25FromGitter<zacharycarter> I also need to finish my css logo for my website tonight
00:37:58FromGitter<zetashift> @zacharycarter how ironic I was lamenting that Nim only has nimgame2 has full nim only engines :P
00:38:10FromGitter<zetashift> Is it a total rewrite or are just working from where you leftoff?
00:38:23FromGitter<zacharycarter> no this is a total re-write focusing a parallelized workflow
00:38:27FromGitter<zacharycarter> with a job subsystem
00:38:55FromGitter<kayabaNerve> Good luck
00:39:00FromGitter<zacharycarter> I basically found - https://github.com/sheosi/tart
00:39:08FromGitter<zacharycarter> and got it working with 0.19.0
00:39:29FromGitter<zacharycarter> it uses lock free / concurrent data structures and atomics to get around Nim's current memory model and default GC
00:39:37FromGitter<zacharycarter> and actually works :)
00:39:52FromGitter<zacharycarter> I think when I left off I had the bgfx running with my fork of it
00:40:09FromGitter<zacharycarter> now it's time to start on an editor - I'm going to build the editor as I build the engine
00:40:16FromGitter<zacharycarter> so I have something cool to show off
00:40:37FromGitter<zacharycarter> I need to figure out the status of the nuklear bindings - or whether I should just focus on using imgui
00:44:17FromGitter<kayabaNerve> Nice
00:45:27FromGitter<zacharycarter> I have lots of good examples of bgfx projects to look at
00:45:42FromGitter<zacharycarter> and at this point I'm comfortable enough with BGFX and Nim (I think) to make a full PBR pipeline
00:45:58FromGitter<zacharycarter> and hopefully deliver unto Nim a decent game engine worth maintaining / contributing to
00:46:29FromGitter<zacharycarter> I've learned a ridiculous amount about game dev, 3d math, game engine programming etc via Nim - so I want to repay the favor
00:46:54FromGitter<zacharycarter> and also, for selfish reasons, I want my own game engine
00:54:47FromGitter<zetashift> Ooh even PBR planned? Noice. Will the editor + engine together work mean that they are only usable together or just a strong focus on the editor part?
00:55:50FromGitter<zetashift> your plan sounds like this engine I read about Banshee. Not sure if it's still developed anymore
00:57:48FromGitter<zacharycarter> https://github.com/nem0/LumixEngine and https://github.com/volcoma/EtherealEngine and https://hugoam.github.io/mud-io/ are projects I'm going to try to draw inspiration / learn from
01:03:22FromGitter<zacharycarter> ugh - I still seem to be running into this issue with 0.19.0 - https://github.com/nim-lang/Nim/issues/8616
01:03:23FromGitter<zetashift> Seems they all wrap up neatly coded libraries into a full editor
01:03:45FromGitter<zacharycarter> well yeah - they all use a lot of libraries to accomplish what they do
01:04:03FromGitter<zacharycarter> that's what I really did with frag - but I didn't know about Nim / native software in general to ease the build process
01:04:19FromGitter<zacharycarter> and I also didn't have a strong handle on writing idiomatic Nim at the time
01:06:06FromGitter<zacharycarter> TheLemonMan: do you think this is a regression? https://github.com/zacharycarter/frag/tree/a608060eace6397476c2764a015ffb62e5eeceea - or just maybe something still isn't right there?
01:06:17FromGitter<zacharycarter> I feel like there may have been two issues but only one got addressed?
01:08:14FromGitter<zacharycarter> err wait - it looks like the issue was just closed without any PR?
01:08:17FromGitter<zacharycarter> or am I seeing things?
01:09:13FromGitter<zacharycarter> dafuq?
01:13:45FromGitter<zacharycarter> welp - I dunno... going to spend my time on other things for a while I think
01:18:12FromGitter<zacharycarter> if anyone needs me get at me on twitter
01:40:54*dddddd quit (Remote host closed the connection)
01:45:54*vlad1777d quit (Ping timeout: 252 seconds)
02:00:47*zahary_ quit (Quit: Connection closed for inactivity)
02:04:21*banc quit (Quit: ZNC - http://znc.in)
02:07:08FromGitter<alehander42> mate, it's 3 am in europe
02:07:21FromGitter<zacharycarter> sorry - no i wasn't mad at you
02:08:02FromGitter<zacharycarter> and I didn't expect a reply from you - sorry if I woke you up by pinging - didn't think about how late it was
02:08:53FromGitter<alehander42> no problem, i am just coming back from a flight :D
02:09:01FromGitter<zacharycarter> ah - hope your travels went well
02:09:09FromGitter<alehander42> i am just saying a lot of people here are from europe, so they're probably not online
02:09:11FromGitter<zacharycarter> and hope you didn't have any long delays - those are the worst
02:09:31FromGitter<alehander42> oh i had >2 hours, but it was my first delay ever, so it was fun
02:09:37FromGitter<zacharycarter> ugh haha
02:10:05FromGitter<zacharycarter> yeah - it's usually just those of us in the US and Asia on at these hours
02:10:27FromGitter<zacharycarter> anyways - glad you got home safe
02:10:28FromGitter<alehander42> they moved 200 people between several gates, it was magnificient
02:10:37FromGitter<zacharycarter> hahaha - gotta love that
02:10:54FromGitter<alehander42> the wonders of lowcost airlines in europe
02:11:07FromGitter<zacharycarter> :)
02:11:12FromGitter<alehander42> (honestly, i think it was airport's problem this time, but i couldn't resist a dig :D )
02:11:15FromGitter<alehander42> ok, night
02:11:37FromGitter<zacharycarter> night!
02:12:12*btbytes quit (Quit: Leaving.)
02:20:50*banc joined #nim
02:46:41FromGitter<gogolxdong> How to invoke #ifdef __cplusplus in c from Nim?
02:48:21FromGitter<kayabaNerve> Compile using the C++ backend
02:48:45FromGitter<kayabaNerve> Or compile the file using G++ and link the object file.
02:51:25FromGitter<gogolxdong> Do I have to ⏎ ⏎ ```#ifdef __cplusplus ⏎ #include <stdarg.h> ⏎ extern "C" { ⏎ #endif``` ⏎ ⏎ to avoid error: unknown type name ‘va_list’ [https://gitter.im/nim-lang/Nim?at=5bbac62d64cfc273f9afa7ce]
02:51:43FromGitter<gogolxdong> it won't work on Windows I'm afraid.
02:52:28FromGitter<kayabaNerve> G++ runs on Windows via Mingw and TDM.
02:53:07FromGitter<kayabaNerve> No idea about that specific error. Using the C++ backend should compile all files as C++ (including ones in a compile pragma).
03:18:59FromGitter<gogolxdong> ah, <stdarg.h> can be included on Windows.
03:23:21*chemist69 quit (Ping timeout: 260 seconds)
03:25:25*chemist69 joined #nim
03:33:09*endragor joined #nim
03:35:56*leorize quit (Ping timeout: 252 seconds)
03:36:53*leorize joined #nim
03:44:47*alexnask_ joined #nim
03:46:17FromGitter<adam-r-kowalski> For the nim javascript backend, whats the recommended way to consume packages from nom?
04:21:23leorizeyou mean npm packages?
04:25:18FromGitter<gogolxdong> How to convert decimal to binary?
04:31:41FromGitter<seruum> Could someone point me to a reference on how to use {.experimental: "notnil"}?
04:33:33*alexnask_ quit (Ping timeout: 268 seconds)
05:09:19*Tortice quit (Ping timeout: 246 seconds)
05:26:02*leorize quit (Ping timeout: 244 seconds)
05:27:16*nsf joined #nim
05:44:37*darithorn quit ()
05:46:47*leorize joined #nim
05:50:31*krux02 joined #nim
06:08:28*Pisuke joined #nim
06:09:12*MyMind quit (Ping timeout: 272 seconds)
06:16:27*narimiran joined #nim
06:50:25FromGitter<krux02> @gogolxdong parseFloat
06:50:46FromGitter<krux02> @seruum better don't use it.
06:51:10FromGitter<krux02> just use non pointer types, that works better
06:58:52*arecaceae quit (Remote host closed the connection)
06:59:11*arecaceae joined #nim
06:59:46*slkmane joined #nim
06:59:57*slkmane left #nim (#nim)
07:07:45*Sembei joined #nim
07:08:19*Pisuke quit (Ping timeout: 246 seconds)
07:11:30*Vladar joined #nim
07:40:19*PMunch joined #nim
07:54:12*narimiran quit (Ping timeout: 252 seconds)
07:55:52*floppydh joined #nim
08:03:24*gmpreussner_ joined #nim
08:04:06*gmpreussner quit (Ping timeout: 252 seconds)
08:11:16krux02somebody awake?
08:12:58*banc quit (Ping timeout: 245 seconds)
08:13:04floppydhÍ'm awake
08:13:10floppydhdoes that count too?
08:19:28krux02yea it does
08:21:33*banc joined #nim
08:26:00krux02is somebody there with a computer from a company named by a fruit?
08:28:09FromGitter<survivorm> why so obscure& :D
08:28:27floppydhkrux02: I have one standing next to me yes
08:28:34floppydhbut I don't use it much
08:30:15krux02I need to run a test on it
08:30:18krux02I don't have one
08:30:24krux02it just a few lines
08:33:49krux02import nativesockets; echo sizeof(Sockaddr_in)
08:36:24FromGitter<dm1try> 16
08:39:55krux02ok, thank you
08:59:34*leorize quit (Quit: WeeChat 2.2)
09:51:06krux02yay, finally the tests run through, sizeof implemented in the compiler: https://github.com/nim-lang/Nim/pull/5664
09:58:53FromGitter<mratsim> woooooooooowwww
09:58:57FromGitter<mratsim> best news of the month
10:02:34FromGitter<andreaferretti> 👍
10:03:00FromGitter<andreaferretti> Hi all, I am having a little issue using AsyncStreams
10:04:09FromGitter<andreaferretti> What is a way to return an AsyncStream right away, making sure to send data to it after a while?
10:04:23FromGitter<andreaferretti> Say I have `var fs = newAsyncStreamstring ()`
10:04:50FromGitter<andreaferretti> and I need to send data to it, like `await fs.write("hi there")`
10:05:14FromGitter<andreaferretti> at the same time, I need to return fs now
10:05:30FromGitter<andreaferretti> I tried the obvious
10:06:54FromGitter<andreaferretti> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbb2c3d271506518dd5472b]
10:07:22FromGitter<andreaferretti> I guess this is supposed to return now and send data to fs later
10:07:51FromGitter<andreaferretti> but if I tried to `read()` from the returned fs, I never see any data coming
10:09:34FromGitter<andreaferretti> I guess I am using AsyncStreams wrong, but the API is so confusing
10:10:34FromGitter<andreaferretti> I seems that doing this, I only return *after* having placed all the data, so when I read from fs, I see it already in status completed
10:11:31FromGitter<krux02> @andreaferretti can you post an example that compiles?
10:12:02FromGitter<krux02> then I can try it, but I did not use async in Nim yet
10:13:16*alexnask_ joined #nim
10:13:49*alexnask_ is now known as alexnask
10:15:01alexnaskHey, I was looking into why the backend generated intermediary variables for proc calls in C mode but not in C++ and I found the following comment:
10:15:10alexnaskdo not generate spurious temporaries for C++! For C we're better off with them to prevent undefined behaviour and because the codegen is free to emit expressions multiple times!
10:15:56FromGitter<andreaferretti> @krux02 the issue is that this happens in Rosencrantz, so it might take a while to extract a (non) working example
10:16:13FromGitter<andreaferretti> I was just checking I am not doing anything plainly wrong
10:16:31alexnaskI don't really see how that is the case, does anyone have any idea?
10:16:54alexnaskBtw, great to see how far Nim has come, I remember checking it out way back in 2011/2012 when I was working on ooc
10:17:49krux02ooc?
10:18:42alexnaskhttps://ooc-lang.org/
10:18:50FromGitter<krux02> @andreaferretti I have tested akka in scala, because actors were kicked out of the standard library. I didn't like it a lot, it was so complicated.
10:19:18alexnaskDo IRC messages also get posted on gitter and discord btw, or is it just the opposite?
10:19:28FromGitter<andreaferretti> Dunno, I find the actor pattern very clear when doing asynchronous stuff
10:20:26krux02yea, but it is so overengineered.
10:21:05krux02so many actors, then it kills the type system, because actors just send messages as objects
10:21:40shashlickalexnask: yes they are bridges
10:21:58alexnask@shashlick cheers, thanks
10:22:15krux02a good model for some things, but for most applications it is enough to have a sigle computer with all the data and a single thread that does everything in sync.
10:22:31krux02but anyway, I am not here to judge
10:23:44krux02alexnask, I never heared of ooc, what is its feature that initiated the project?
10:24:51alexnaskIt started out as Java-like language that compiled to C, then I guess it just continued as a high level OO language with modern features
10:25:10FromGitter<bung87> looks like scala ruby combination...
10:25:13alexnaskI didn't start it, I just hacked on it for fun
10:28:37FromGitter<krux02> @mratsim since when can you implement the body of a generic with a macro?
10:28:48FromGitter<krux02> last time I tried it, it didn't work.
10:31:05FromGitter<andreaferretti> @krux02 sorry, it turns out it was a mistake on my part
10:31:21FromGitter<andreaferretti> I misinterpreted the return value of `fs.read()`
10:31:37FromGitter<andreaferretti> I thought the boolean meant the future is completed
10:31:44FromGitter<andreaferretti> it's the other way round
10:43:38*leorize joined #nim
10:45:30FromGitter<zacharycarter> if anyone is interested in taking on ownership of the playground - please let me know. I have a task to migrate it to a new VPS - which I'm fine doing, and I know there is a sec vuln that needs updating - but beyond doing those two things, if someone else would like to take the project over I'd appreciate it and can help with whatever.
10:46:50FromGitter<gogolxdong> How do I compile nim project to a .so library which will be built with Android APK?
10:50:12*elrood joined #nim
10:51:45*SenasOzys joined #nim
10:55:39PMunchzacharycarter, I've actually developed a thing similar to the Go tour based on the playground. I could have a go at maintaining the playground, that would make it a lot easier to integrate.
10:56:31FromGitter<zacharycarter> 👍 once dom is back we can talk about it in more depth - not sure where he is but I'm trying to focus on other languages atm besides Nim - so any help I can get in that department I'd appreciate it
10:57:04PMunchAre you moving on from Nim? Or just trying to see what's out there?
10:57:05FromGitter<zacharycarter> so thank you for the offer - I think what you're suggesting makes sense, if you're already planning on extending it, then you'd probably be the most likely to work on it
10:57:11FromGitter<zacharycarter> moving on from Nim atm
10:57:17PMunch:(
10:57:22FromGitter<zacharycarter> I mean I guess if you call going back to C/C++ moving on heh
10:57:31PMunchHaha
10:57:46PMunchYeah I'd say that was moving backwards
10:58:04FromGitter<zacharycarter> in a way it feels like it - in others it doesn't
10:58:08PMunchAny particular reason?
10:58:43FromGitter<zacharycarter> I feel hamstrung by Nim's memory model - and the alternatives / suggestions on how to work around it aren't good enough
10:58:57PMunchHmm, interesting
10:59:13FromGitter<mratsim> @krux02 since March, probably this PR: https://github.com/nim-lang/Nim/pull/7333
10:59:25PMunchWhat is it about the memory model you don't like?
10:59:27FromGitter<zacharycarter> Nim doesn't have enough documentation about all the new features that are supposed to help alleviate a lot of this
10:59:45PMunchYeah, Nim is lacking a bit in the documentation department
10:59:57PMunchActually one of the things I thought about improving for October
10:59:57FromGitter<zacharycarter> thread local heap gc makes sharing memory b/w threads problematic - and there aren't great work arounds besides channels
11:00:16FromGitter<zacharycarter> which are slow or are going to require you to manually manage a shared heap anyway
11:00:23FromGitter<zacharycarter> if you want to work around their inefficiencies
11:00:37FromGitter<zacharycarter> or I guess inherit flaws is a better way of terming that
11:00:52FromGitter<mratsim> How is moving to C/C++ a solution?
11:00:56FromGitter<zacharycarter> too often I say - I want to do XY or Z with Nim
11:01:15FromGitter<zacharycarter> well - I'll be able to rely on more learning resources and more code
11:01:16PMunchYeah the multithreading memory model is a bit confusing. It's so different from how it normally works
11:01:36FromGitter<zacharycarter> I'll be able to figure things out rather than having to guess or wonder what might be coming in the future
11:01:49FromGitter<mratsim> fI wanted to write a data parallel/task parallel lib yesterday to abstract away the multithreading inside arraymancer
11:01:52FromGitter<zacharycarter> I'm not saying it's an answer or a solution - I dont' know if it will be
11:01:59FromGitter<mratsim> unny I wanted*
11:02:10FromGitter<mratsim> funny, I think my keyboard is broken
11:02:36PMunchBroken keyboards are the worst..
11:02:48FromGitter<zacharycarter> I just think at this point - I'm going to benefit more from getting better at C/C++ than I will Nim
11:02:50FromGitter<zacharycarter> unfortunately
11:03:13PMunchI still shudder when thinking about the old keyboards at the university lab. They would give physical feedback but not register a keystroke unless you bottomed out the key.
11:03:14FromGitter<zacharycarter> so that's what I'm going to focus on - since I want to head that direction with my career anyway
11:03:15FromGitter<krux02> That is great, I remember that I needed exactly this, and it didn't work, now it does, that is great.
11:03:46FromGitter<zacharycarter> sounds like the new macbook pro keyboards
11:04:25FromGitter<krux02> @zacharycarter the thread local allocation in Nim is what makes Nim much more scaleable than almost all other programming languages, but of course sometimes it sucks that the memory is thread bound.
11:04:32PMunchzacharycarter, yeah I've been thinking a bit about that myself. Nim is still so small it's hard to justify getting really good in it from a job opportunity point of view
11:04:57FromGitter<zacharycarter> @krux02 yeah - it's a double edged sword
11:05:04FromGitter<mratsim> I think the upcoming destructors will be super helpful, and you can already use allocShared
11:05:21PMunchYeah, those could really help with this
11:05:30FromGitter<mratsim> but from a job PoV, yeah C/C++is of course much safer
11:05:31FromGitter<zacharycarter> they probably will be - but I have no idea when they'll be ready or when they'll be documented well enough for me to understand / use them
11:05:46FromGitter<zacharycarter> also - I spent a few weeks bringing a dead project to life
11:05:49PMunchI guess you could theoretically have a shared object kind of thing and use destructors to managed when to delete them
11:05:50FromGitter<mratsim> you can use them already, without special pragmas
11:06:04FromGitter<zacharycarter> and found an issue - and then the issue was closed w/o any explanation - and now the project is dead again
11:06:08FromGitter<mratsim> allocate your object with allocShared
11:06:17FromGitter<zacharycarter> so it's little things like this - which make me want a more stable path forward
11:06:28PMunchSpeaking of jobs, I've accepted a job offer at Status. So I'll be working full time with Nim in the near future :)
11:06:34FromGitter<zacharycarter> congrats!
11:06:39FromGitter<krux02> I want a stable path as well.
11:06:49FromGitter<mratsim> congrats! I wasn’t even aware you were joining :P
11:07:08FromGitter<zacharycarter> but until that stable path is found - I need to focus elsewhere I think
11:07:28FromGitter<mratsim> I’m pretty sure the team at nimTorch is looking for experienced C++ and Nim devs
11:07:40FromGitter<zacharycarter> it's a tearing decision - I want to keep working with / on Nim - but not till it's a smoother experience
11:08:28PMunchzacharycarter, I totally understand that. I find it interesting to work with a language in flux from a CS point of view. But when actually trying to create a stable project it's a bit of a pain
11:08:50krux02well, I would say any experienced c++ developer is easily trained to become a Nim dev, and maybe vice versa.
11:08:53PMunchI've thought about setting up a build server to check all my projects against new versions
11:09:59krux02going from c++ to Nim will be: "cool I can just skip all this boilerplate and junk code, and who package management" and the other way will be "why doesn't it compile here, uhr, and wtf man this problem wouldn't even exist with proper modules"
11:10:23krux02s/who/whohoo/
11:11:04PMunchkrux02, I'd say if you know one statically typed compiled imperative language it's easy to get into the others, and to go up in abstraction to dynamic and untyped languages. Going the other way might be a bit harder, more stuff to learn. But to reach a mastery level where you know all the side effects of everything you do it takes longer no matter the language.
11:11:21krux02zacharycarter[m], what is in your opinion the most important issue that should be fixed, better sooner than later?
11:12:15krux02PMunch I would say it takes you 10 years of experience to become a good c++ developer.
11:12:18FromGitter<zacharycarter> parallelism needs to be improved - these blanket solutions that aren't documented / have no examples need to be stop being tossed around - it's infinitely frustrating from a developers perspective who isn't as experience as the one making the recommendation
11:12:19FromGitter<zacharycarter> for instance
11:12:37FromGitter<zacharycarter> I'll say - I want to make a job system with Nim - something that doesn't block and I can parallelize
11:12:48FromGitter<zacharycarter> and I'll get told to look into a number of different things - most likely closure iterators
11:13:08FromGitter<zacharycarter> and then there are absolutely zero examples of doing anything beyond the basics with this construct
11:13:23FromGitter<zacharycarter> it definitely doesn't tell me how I might go about using them to accomplish such a task
11:13:48FromGitter<zacharycarter> but it's like just uttering the language feature, somehow imparts the user with wisdom to know how to accomplish said goal with said construct
11:14:18FromGitter<zacharycarter> often times Nim is cranking out new features designs that half the community isn't aware of
11:14:23Araqthe manual itself shows how to build a tasking system with these
11:14:25FromGitter<zacharycarter> and then when they're mentioned - only one or two people know how they work
11:14:36FromGitter<zacharycarter> well - I'm not going to get into that
11:14:54FromGitter<zacharycarter> yes it does -but we'd be aruing semantics if I did
11:15:04FromGitter<zacharycarter> if it*
11:15:25Araqok, you want to continue to rant, got it
11:15:34krux02Araq: I asked
11:15:38PMunchAraq, he's got a point though..
11:15:40FromGitter<zacharycarter> no - I wasn't ranting - I was answering a question
11:15:46FromGitter<zacharycarter> I'm done now - Im going to go to work
11:16:03krux02ok, bye
11:16:22Araqnothing wrong with ranting but some honesty is always nice
11:16:34Araqbut I probably read too few of this conversation, sorry
11:16:39Araq*too little
11:16:53FromGitter<zacharycarter> I'm not trying to insinuate you didn't point me in the right direction / didn't try to point me towards the right answer
11:17:00FromGitter<zacharycarter> I'm saying there's a knowledge gap b/w you and I
11:17:04PMunchThe manual is, for obvious reasons, fairly limited in it's explanation of concepts. Otherwise it would be crazy long. Sometimes you just can't find a good enough explanation for what you're trying to do and have to try and fail your way to understanding how it works.
11:17:05FromGitter<zacharycarter> and I can't fix that by reading a 25 line example
11:17:25FromGitter<zacharycarter> you have a certain idea in your head about how you'd use that feature to accomplish the thing I"m wondering about
11:17:30FromGitter<zacharycarter> I don't have that wisdom / knowledge
11:17:40PMunchHappens less and less, either because I'm getting better or because the documentation improves. But I still remember the scenario zacharycarter outlines
11:17:46FromGitter<zacharycarter> and saying - use this - and then having a small example to rely on to try to understand it - doesn't always work
11:17:54FromGitter<zacharycarter> anyway, sorry - off to work
11:18:03PMunchBye
11:18:43Araqwhat is 'async' if not a non-blocking tasking system?
11:19:12PMunchThat was just an example, the experience is still the same for other things
11:20:26Araqlike#ß
11:20:28Araq?
11:20:37PMunch?
11:20:49krux02when I look in the asyncdispatch module here: I am definitively confused by it. It lacks examples, has a lot of confusing types, and most confusing is sleepAsync, which returns a Future[void]
11:21:13Araqyeah ok, I read that 5 days ago, "async docs bad"
11:21:16Araqwhat else?
11:21:43Araq(at least it's covered by dom96's book though)
11:22:28krux02I think most importantly the asyc module needs examples.
11:22:41*enthus1ast joined #nim
11:23:37enthus1astfor me its macros
11:24:10krux02Araq: I think I can write a bit of documentation about the macro system
11:24:27krux02I think in the documentation is still the distinction between stmt and expr macros.
11:24:51enthus1asti find it hard to get information out of macros how to "really use it"
11:25:27krux02enthus1ast, what do you think would help to to understand macros?
11:25:52krux02more real world examples, or better explanation of how they work internally?
11:26:06enthus1astmaybe some example pre/after construction, how to debug them
11:26:37elroodit would probably make sense to have an easily accessible way for people to state what they are missing in nim or why they are dismissing it as their next project's language
11:27:05elroodcollecting that info from reddit/hn posts and chats is kinda ineffective
11:27:24enthus1astwhat i found always usefull is a q/a site
11:27:26krux02well most people that I asked dismiss it, because it is not c++.
11:27:34Araqwe also make regular surveys
11:27:49enthus1astwell most c coders have a fear of abstraction, as it seems
11:28:03krux02Araq: but with those surveys you only reach people who are already using Nim, you don't reach the people who refused Nim.
11:28:06FromGitter<alehander42> I think showing real-world macros with good explanations of their code would be best
11:28:20FromGitter<alehander42> something like literate programming examples maybe
11:28:36krux02enthus1ast, I don't think so, I have seen quite some interesting C macro magic.
11:30:03elroodmost c coders are wary of the costs of abstractions. that's not exactly fear
11:30:22enthus1asti found it funny cause it IS abstraction
11:30:26enthus1astIT
11:30:38FromGitter<alehander42> there was a site like that, which shows in left text explaining the code and in right the code itself, sideways, I find this a good ui for showcasing language features in practical situations
11:30:47FromGitter<alehander42> I can't find it tho
11:30:58enthus1astgo's tutorial?
11:31:41Araqkrux02: ok, do it
11:31:42FromGitter<alehander42> no, this is covered by PMunch's tour nim idea
11:31:50PMunchHmm yeah
11:32:06FromGitter<alehander42> my idea was for more complete examples e.g. 100-200 lines taken out of existing projects
11:32:06PMunchOnly thing missing there really is to write the content
11:32:12PMunchI have the whole system ready to go
11:32:18FromGitter<alehander42> btw congrats for Status
11:32:29PMunchThanks :)
11:34:09krux02Araq: I revisited the sizeof/alignof implementation, now the tests are passing.
11:35:07krux02I want it merged, the sooner the better. Fixing merge conflics is really horrible by now.
11:35:28Araqcan't. I'm writing an email to Alan Guth because his theory of inflation is missing good examples and docs
11:36:06krux02what theory of inflation?
11:36:30krux02does it have something to do with high memory consumption of pointer heavy data types?
11:37:09Araqlol
11:37:34krux02sorry
11:37:40krux02just looked up his name
11:38:22krux02I stop saying anything now
11:39:13FromGitter<alehander42> please don't invent your own standard model
11:39:52elroodfrom fragmentation of programming languages to fragmentation of standard models? ;)
11:42:38enthus1astah by the way, to tie in with the gui discussion lately, just found this libagar wrapper https://github.com/KeepCoolWithCoolidge/nimagar/
11:44:09*shashlick_ joined #nim
11:44:54*shashlick quit (Ping timeout: 264 seconds)
11:46:47PMunchHmm, I really should give genui a second go..
11:47:26enthus1astPMunch yesterday i've tried genui but it gave me an compile error (think nil checks)
11:47:50enthus1astwould be very cool to build guis for native and browser!
11:48:25PMunchDid you try one of the genui flavourcs or the pure genui thing
11:48:34enthus1astjust pulled your repo
11:48:43PMunchWhich one?
11:49:08enthus1asthttps://github.com/PMunch/genui
11:49:15FromGitter<zetashift> Seems the ui libs are being updated these days, nuklear and now genui!?
11:50:00enthus1astzetashift, have a look at libagar its really powerfull (and small) lib
11:50:46enthus1astwhen you trie to build libagar (at least on archlinux) use the develop branch
11:52:58PMunchenthus1ast, right. Yeah that one is still very much alpha grade
11:53:14PMunchIf I start work on it again it'll be a complete rewrite
11:53:49PMunchI think the idea is good, but doing all I wanted during compile-time proved to be surprisingly hard
11:54:34PMunchBut I think with my now improved knowledge of macros along with how Nim has evolved since I started that project that I should be able to get further with the idea
11:54:52enthus1astit surprising how "hard" it is to display tables in an ui... my nigui tables patch are rotting around...
11:58:11Araqgenui and nigui lack examples and documentation. See how precious my remarks are, you need to be thankful ;-)
11:58:56PMunchgenui isn't fit for use though..
11:59:19AraqAlso your docs lack a Japanese translation. I'm not a troll, it's all constructive criticism.
11:59:29enthus1astanother thing with nigui is that it includes code, so you must blindly code and the compiler is complaining all the time :)
12:01:33*kapil____ joined #nim
12:01:36AraqI just told Jen-Hsun Huang his graphic cards still require too much power, I'm smart
12:01:44Araqok, enough of this
12:07:25enthus1astAraq, the docs aren't "that" bad, but if your coding behavior does not include reading code then you often miss informations
12:09:40livcdI am lost in what gui lib should I use. I will probably use electron then!
12:10:07enthus1astmaybe webview could help
12:10:14PMunchlivcd what are the requirements for you project?
12:12:18FromDiscord_<PusiteGA> electron == suicide
12:13:52FromGitter<zetashift> electron ain't bad...it ain't great either
12:15:40livcdPMunch: look nice on Mac/Windows. basic controls
12:16:08PMunchwxWidgets?
12:16:51PMunchNative toolkits are used behind the scenes
12:16:55PMunchSo little bloat
12:27:02*fvs quit (Remote host closed the connection)
12:31:43enthus1astalehander42, PMunch another thing i thought about lately would be a "git driven" "show off your project"/"write a little blog entry" where everybody could make pull requests
12:32:23enthus1astwebsite i mean
12:33:48enthus1astmaybe even in the spirit of "python module of the week"
12:35:45PMunchHmm, I'm not sure if I understand how that would work
12:37:10enthus1astthe articles could be rst or markdown, then if one has done a cool hack or little project or just found out a new way to use nim they could make a pull request then, if accepted, the article would be published on the website
12:39:04enthus1astthe good think would be that it does not need the completness of a full documentation but would show off some modules or nim tricks
12:39:17federico3enthus1ast: like this? https://github.com/nim-lang/website/tree/master/jekyll/_posts
12:39:36enthus1ast:D
12:41:41enthus1astyeah but this is so "official"
12:41:57federico3then https://planet.nim-lang.org/
12:42:43enthus1astah nice
12:51:59*endragor quit (Remote host closed the connection)
12:56:49FromGitter<zacharycarter> sorry - I wasn't looking for an async task queueing system
12:56:53FromGitter<zacharycarter> I'm looking for a parallelized job system
12:56:57FromDiscord_<malkomalko> Scrolling up over this chat has been a little weird. I’m happy to give any honest feedback on my learning experience with nim and some ideas on improving it.
12:57:24FromGitter<zacharycarter> maybe we weren't speaking on one to one terms - I often lack the correct terminology when I refer to something - just out of inexperience and naivety
12:57:34FromGitter<zacharycarter> Araq ^
12:59:00FromGitter<zacharycarter> I haven't had issues with the async dispatch module - at least using it anyway
12:59:09FromGitter<zacharycarter> I wasn't intending to complain or start a fire about that
12:59:16FromGitter<zacharycarter> my departure time for work probably wasn't ideal
13:03:31Araqmalkomalko, and that is highly appreciated, but the complaints are better when they are precise
13:03:56Araq"docs are bad, fix them" is not that useful
13:04:08FromGitter<zacharycarter> I didn't say that
13:04:14FromGitter<zacharycarter> and I wasn't complaining - I was asked a question
13:04:18Araqand zacharycarter, I didn't mean to put words into your mouth
13:04:35FromGitter<zacharycarter> and I was giving my opinion - informed or not
13:04:51FromGitter<zacharycarter> ¯\_(ツ)_/¯
13:09:02*narimiran joined #nim
13:12:31*Vladar quit (Remote host closed the connection)
13:14:46FromGitter<malkomalko> I do agree that as a project creator it's better when getting specific feedback, but I think it's also important to have systems in place to make sure people aren't "feeling" like they are hitting a wall. That's generally where a drop-off can happen. Is the goal to drive the popularity of nim?
13:15:50FromGitter<malkomalko> Every opportunity can be turned into a better learning path for future people coming in, especially when we all feel empowered to collectively move the ball forward.
13:16:14FromGitter<mratsim> it’s to get more victims for his destructors =)
13:17:52FromGitter<zacharycarter> the docs are fine - I love Nim - if I didn't I wouldn't have spent the last two years with it and donated to the project or spent time in here trying to answer questions etc
13:18:02Araqyes, we want the popularity of Nim to grow. No, we don't want to replace indentation by braces. :-)
13:18:08FromGitter<zacharycarter> yes - they could always be better - but I'm not complaining about the docs - and I wasn't trying to do that
13:18:16FromGitter<malkomalko> > The purpose of the destructor is to free the resources that the object may have acquired during its lifetime.
13:18:22FromGitter<zacharycarter> I spend most of my time - when talking about programming - talking about Nim
13:18:38FromGitter<zacharycarter> my frustration comes from my lack of understanding, and lack of example code out there - to help me bridge that lack of understanding
13:18:48FromGitter<zacharycarter> I can go readily find tutorials and guides and examples of how to do things in C/C++
13:18:52FromGitter<zacharycarter> the can't always be said about Nim
13:19:30FromGitter<zacharycarter> and when I don't understand something - and I ask, and get an answer I only understand part of, or maybe not even at all, but I don't want to waste someone's time asking for elaboration or want to feel dumb by asking stupid questions etc
13:19:39FromGitter<malkomalko> Here's an idea Zachary: Is it possible to try to replicate something from another language with nim to give you a roadmap? I've also found opening up the source code has been quite eye opening for me to get past my learning roadblocks.
13:19:47FromGitter<zacharycarter> and yes there's all sorts of shit mixed up in there - pride, ego, being afraid to ask questions etc
13:20:02FromGitter<zacharycarter> but aside from that - it's not as easy to do it in a growing language, as it is an established one
13:20:05FromGitter<zacharycarter> that's all I was trying to say really
13:20:20FromGitter<zacharycarter> and that's been my frustration, and the reason I think that learning more C/C++ and spending a bit less time with Nim would benefit me
13:20:21FromGitter<zacharycarter> I could be wrong
13:20:28FromGitter<Bennyelg> @zacharycarter I agree.
13:20:38FromGitter<malkomalko> Yah, and I think openly that's one of the major downsides for any new language right? You don't nearly have the wealth of resources as in popular languages.
13:20:45FromGitter<zacharycarter> yes
13:20:48FromGitter<zacharycarter> it's not a Nim problem per se
13:21:07FromGitter<zacharycarter> and I don't have a ready answer as to how to solve it or make it better
13:21:12FromGitter<malkomalko> The benefit of something like Nim in it's approach though, is that you have a whole ecosystem of c and c++ tools in your arsenal
13:21:33FromGitter<zacharycarter> often times i want to do something and I don't even really know what I"m talking about fully - I just have a vague idea, but I need some guidance or direction from someone who does
13:21:45FromGitter<Bennyelg> Just need to be patient hard to make programming language a Buzz word if you not backed up by some big organization
13:21:46livcdPMunch: checking.
13:21:57FromGitter<zacharycarter> but even there - there can be a communication gap / assumption that we're talking about the same thing, when we'r really not
13:22:22narimiranPMunch: congrats on your new job!! (i just joined and have seen that in the history)
13:22:50FromGitter<zacharycarter> yes - but there are things that I often think I can do because I see them done in C/C++ - and I'm sure they can be done in Nim - it's just not done in the same way, or it needs to take XYZ into account etc
13:22:58FromGitter<zacharycarter> it's those edge cases
13:23:08livcdPMunch: i did not find a single good looking application :D
13:23:17FromGitter<zacharycarter> mostly when talking about threading and working with the default GC
13:24:01FromGitter<malkomalko> what's great is, if you run into that situation, is there anything stopping you from dropping down to write that library/component in c/c++?
13:24:35FromGitter<zacharycarter> I'm not sure
13:24:56FromGitter<zacharycarter> probably not
13:26:19FromGitter<zacharycarter> anyway - I don't want to derail chat with this issue, it's just something I need to figure out I guess, do more reading, etc
13:26:54FromGitter<malkomalko> Granted, I'm a complete nim newbie, so I'm not sure either :) but It'd obviously be a good idea to learn the language a compiler is generating. Meaning, I would urge you to look at nim, c, c++ as a total picture and not individual parts. Try to take the benefits from nim, and if you feel like you get stuck, try to reach out and "open up the hood".
13:32:37PMunchlivcd, you didn't find any good looking wxWidgets apps?
13:32:57PMunchOh, and thanks :)
13:33:12*floppydh quit (Quit: WeeChat 2.2)
13:33:13FromGitter<malkomalko> http://www.sihui.io/how-to-study-the-rails-guides/ these problems exist in every language/framework btw. I thought the above was a really good approach for picking up something new.
13:33:24*floppydh joined #nim
13:33:25FromGitter<malkomalko> Ok, time to start work, bbiab
13:41:21*abm joined #nim
13:42:04livcdPMunch: yes i did not
13:52:11PMunchHmm, depends on your preferences of course. But I like my applications looking native
13:52:19PMunchAnd that's what wxWidgets gives you
13:53:02*seni joined #nim
13:53:09enthus1astwxWidgets for nim?
13:54:29PMunchYeah, that's been working for a long time
13:54:56PMunchEven has my genui macro implemented for it :)
13:55:14FromGitter<zetashift> I like my applications with windows xp styling and unresponsive every 5 seconds. Also when you drag it it shows after-images
13:55:43enthus1asthttps://github.com/Araq/wxnim/ ?
13:56:02PMunchhttps://github.com/PMunch/wxnim/
13:56:06PMunchUpdated version
13:56:18PMunchI fix issues as I'm made aware of them
13:56:28enthus1astah nice will check it out
14:04:00*enthus1ast quit (Ping timeout: 252 seconds)
14:06:59*Vladar joined #nim
14:08:40*enthus1ast joined #nim
14:19:44*stefanos82 joined #nim
14:20:00*nsf quit (Quit: WeeChat 2.2)
14:21:35FromGitter<seruum> Could someone point me to a reference on how to use {.experimental: "notnil"}?
14:21:58narimiran@seruum what would you like to to with that?
14:23:03FromGitter<seruum> @narimiran Got a library that doesn't work with 0.19.0 (yaml). I thought I would "fix" it to keep using it, but I'm unclear where to begin.
14:23:41narimiranthis is because of nil strings and seqs?
14:23:56PMunchseruum, just compile with --nilseqs:on
14:24:11narimiranif it is, then what PMunch just said
14:24:30FromGitter<seruum> The library has 10 or so values with not nil in it.
14:24:50FromGitter<seruum> I tried --nilseqs:on in a nims file to no avail.
14:25:09narimiranbtw, i think somebody said here that he's working on the fix for yaml library
14:26:55*smitop joined #nim
14:30:28*smitop quit (Client Quit)
14:35:28FromGitter<mratsim> just tag @flyx ;)
14:36:02FromGitter<mratsim> oh it’s there: https://github.com/flyx/NimYAML/pull/64
14:37:34*vivus joined #nim
14:38:23vivusHi all
14:38:47FromDiscord_<treeform> Hi
14:40:39*kapil____ quit (Quit: Connection closed for inactivity)
14:41:29vivusI created a file path in my program: `var myfile = newFileStream("~/.myapp/test.yaml", fmRead)` but after making my binary program globally useable via exporting the PATH, I cannot run/open the YAML file. I believe the issue is with `~/.myapp/test.yaml` can someone tell me what the correct path should be?
14:42:35enthus1astvivus getAppDir() / "test.yaml" maybe
14:42:51enthus1astfrom the os module
14:42:53vivuswhen I do `/home/path/to/test.yaml` it works.
14:43:36vivusenthus1ast: does getAppDir() do a search each time for test.yaml?
14:43:55enthus1astno it returns the directory where your executable is located
14:44:22enthus1astor maybe i misunderstand
14:44:41vivusenthus1ast: I know where the test.yaml is, the issue is that: ~/.myapp/ is not recognized in Nim for some reason
14:45:49enthus1astgetHomeDir() from ospaths then
14:46:08FromGitter<mratsim> *cough* windows *cough*
14:47:16narimiranvivus: i guess nim does not expand `~` to `/home/vivus`
14:47:45FromGitter<kaushalmodi> narimiran: Nim not understanding `~` has been bugging me for a while
14:47:57enthus1astgetHomeDir() / ".myapp/test.yaml"
14:48:07FromGitter<kaushalmodi> vivus: If there isn't an issue for this already, do you want to open one?
14:48:33vivus@kaushalmodi I dont want araq to shout me if I do :D
14:49:00narimiranbut why *should* nim understand `~`? isn't this something that is related to your shell, and not something general?
14:50:03vivusnarimiran: it should be part of whichever OS lib handles path navigation. im pretty sure python and other languages support this
14:50:04FromGitter<kaushalmodi> vivus: "Fear of being shouted is directed related to lack of progress." - *Confucius*
14:50:42FromGitter<kaushalmodi> narimaran: I dwell in terminal (non GUI) apps most of the time
14:50:54FromGitter<kaushalmodi> Nim is the only place where `~` did not get interpreted
14:50:59vivus@kaushalmodi well at least its not Linus calling us "effing idiots" XD
14:53:07FromGitter<kaushalmodi> unrelated: `sequtils.filterIt` is awesome!
14:53:36narimiran@kaushalmodi anything specific, or it is just you discovering it? :)
14:54:52FromGitter<kaushalmodi> narimiran: I have been using the equivalent in Emacs-Lisp. I knew that sequtils had something like that, but was too lazy to use it the first time. But using it makes the code so much better: https://github.com/OrgTangle/ntangle/commit/e79e1033788c8896f1cb1380e8627700d30d98cd :)
14:55:11leorizethere's `expandTilde` in `os` for people who would like to use `~`
14:55:46FromGitter<kaushalmodi> leorize: noted. thanks!
14:55:58leorize!eval import os; echo expandTilde("~" / "path")
14:56:02NimBot/root/path
14:56:21leorizethat's rather surprising :P
14:56:43FromGitter<kaushalmodi> oh well ..
14:57:16leorizeserum: Try `--experimental:notnil`
14:57:28FromGitter<kaushalmodi> btw if anyone wants to quick-scan my latest project: https://github.com/OrgTangle/ntangle/blob/master/src/ntangle.nim ⏎ ⏎ (thought of sharing this now before I start breaking it up into submodules)
14:57:28leorizeseruum: ^
14:57:53vivusI just went with getHomeDir()
14:58:25narimiran@kaushalmodi why are you having spaces on both sides of `:`? :'(
14:58:46FromGitter<kaushalmodi> I use it only for table elements
14:58:53FromGitter<kaushalmodi> I thought that was the convention?
14:59:19FromGitter<kaushalmodi> everywhere else.. like `proc foo(a: string) =`, there's space only on the right
14:59:36narimiranyou have it on the line 87-91 too
14:59:59FromGitter<kaushalmodi> that's the same context
15:00:07FromGitter<kaushalmodi> those lines don't have `var: TYPE`
15:00:46FromGitter<kaushalmodi> I was reserving "no space on left of colon" only for `VAR: TYPE`
15:00:59narimiranyou said that was the convention? i've never seen it before
15:01:01leorize!eval import os; echo existsFile "/proc/sysrq-trigger"
15:01:19NimBottrue
15:01:36leorizeso NimBot is running as root, on a kernel with sysrq on...
15:02:58FromGitter<kaushalmodi> narimiran: .. and I don't have any notes on my statement
15:03:03FromGitter<kaushalmodi> .. may be I made my own convention?
15:03:10narimiran:D
15:03:31narimiranwell i've seen code `using :this`!
15:03:45narimiranso i guess it is up to the author :P
15:04:22FromGitter<kaushalmodi> I'll make it consistent.. change to `foo: bar`. Thanks!
15:04:32FromGitter<kaushalmodi> I'm open for more comments
15:05:35leorizeshouldn't a const array work here? https://github.com/OrgTangle/ntangle/blob/master/src/ntangle.nim#L97
15:05:40narimiransorry i'm only nitpicking and not commenting on the contents — i'm too busy going through the old issues in the nim repo and anoying maintainers with "this should be closed, right?" :D
15:06:40FromGitter<kaushalmodi> leorize: it should! thanks
15:06:44leorizekaushalmodi: also, why did you create a `perm` variable when `result` can be used?
15:06:46FromGitter<kaushalmodi> narimiran: no problem
15:07:47FromGitter<kaushalmodi> leorize: yeah, I can use result. That proc is 4 months old. At that time, I was trying to make the var names descriptive
15:08:58leorizenitpicking https://github.com/OrgTangle/ntangle/blob/master/src/ntangle.nim#L285
15:09:10FromGitter<kaushalmodi> narimiran: found the source of the `foo : bar` style: https://nim-by-example.github.io/types/objects/ (fixing that in my Nim notes too)
15:09:54narimiran@kaushalmodi and on the bottom of the page, the correct way is used :)
15:09:58FromGitter<kaushalmodi> leorize: yeah.. could have use an `or` there.. but left it like that as those 2 conditions aren't related
15:10:05leorizeI found some of your `let` statements can be one-liner https://github.com/OrgTangle/ntangle/blob/e79e1033788c8896f1cb1380e8627700d30d98cd/src/ntangle.nim#L308
15:10:26FromGitter<kaushalmodi> leorize: using my consistency card for those :)
15:10:39leorizekaushalmodi: I was nitpicking the space before the colon lol
15:11:03FromGitter<kaushalmodi> leorize: ah, thanks! yeah, I need to fix that
15:16:01*platoff joined #nim
15:17:04FromGitter<kaushalmodi> leorize, narimiran: fixed as per your suggestions in latest ntangle commit
15:18:47leorizehttps://github.com/OrgTangle/ntangle/blob/0ed9001d2c5bd291c1220e55b81fe1416ab2b332/src/ntangle.nim#L97
15:18:55leorizeI was expecting you to change this to `const`...
15:19:38leorizehmm it might not work with const
15:19:40leorizenvm
15:19:57FromGitter<kaushalmodi> yeah.. wasn't sure if const can work inside that proc
15:20:02FromGitter<kaushalmodi> had not tried that to be honest
15:20:19narimiranwell, const can be put outside of the proc
15:20:29leorizeconst can be inside proc
15:20:41leorizebut that was accessing the array in runtime
15:20:42vivusleorize: better start mining cryptoz on nimbot
15:20:47FromGitter<kaushalmodi> const works
15:20:50leorizeso I don't think it would work
15:20:56leorizeit actually works? cool
15:21:01FromGitter<kaushalmodi> nope, it works
15:21:06FromGitter<kaushalmodi> thanks
15:21:07leorizealso there's https://nim-lang.org/docs/system.html#incl%2Cset%5BT%5D%2CT
15:21:27FromGitter<kaushalmodi> .. because those const symbols are not changing based on when that proc is called
15:21:34FromGitter<kaushalmodi> the values are just enums
15:21:52*tay_ joined #nim
15:22:04*tay_ quit (Client Quit)
15:22:08FromGitter<kaushalmodi> yeah, `incl` looks better
15:23:37leorizevivus: check if it has ssh enabled. we can backdoor it then install some cryptoz :)))
15:24:49enthus1astcome on guys create not destroy ;)
15:25:08vivuswe're creating coinz here :D
15:25:19enthus1astno it creates hot air
15:25:25vivusfree dogecoins for all
15:26:02leorizeI think NimBot have some sort of isolation container thing already
15:26:47vivuscheck the PID, most likely running in Docker container
15:26:50FromGitter<Bennyelg> https://vimeo.com/292931307
15:27:01leorizeor you can just writeFile("/proc/sysrq-trigger", "o")
15:27:06leorizeand see if it crashes :P
15:27:54vivusleorize: I dont think dom96 will like you very much if you do that haha
15:28:44leorize!eval import posix; echo getpid()
15:28:47NimBot25
15:29:17leorizemost likely a container
15:29:23*PMunch quit (Quit: Leaving)
15:30:05enthus1astif you like to hack build byte range send file for asynchttp that i can use it .)
15:32:14*zurs joined #nim
15:39:44FromGitter<adam-r-kowalski> Is there a resource on incorporating nim with the js backend into the larger js ecosystem? I would like to use npm packages and be able to export my nim code as a es6 module so I can interop with other people using js/typescript/etc
15:39:50*zurs quit (Ping timeout: 244 seconds)
15:41:01leorizeI don't think anyone has tried that
15:41:11enthus1astwhat is the concrete issue adam-r-kowalski?
15:41:22leorizebut the jsffi module is rather handy when wrapping javascript stuff
15:43:15FromGitter<adam-r-kowalski> Well you can wrap js modules, and that definitely works well, but it’s how you get them I have an issue with. If you have a library that is hosted on a cdn or whatever, then you can include it in a script tag in your html file. But nobody uses js like this anymore, these days we have package managers, and loaders such as webpack/rollup/etc and this allows you to split your app into multiple entry points, lazy
15:43:15FromGitter... load dependancies as you visit various part of your web app, and hot load modules as they change
15:44:20FromGitter<adam-r-kowalski> So the current solution is great if you want to write your app using 100% nim. But most existing projects can’t get by off on that, and even greenfield projects tend to rely on libraries that exist in the wild. So in order to allow gradual adoption of nim into your js codebase, we have to be able to interop with existing solutions
15:44:45FromGitter<adam-r-kowalski> Ideally we can write just one module in nim, export it as a es6 module, and consume it in a typescript application
15:47:45enthus1asti've only rudimentary knowlege of nim's js backend but be aware that you can always emit plain js
15:48:35FromGitter<mratsim> The ill-named `importcpp` is also your friend for JS interop :P
15:48:48enthus1asti miss a exportcpp for js
15:48:56*noonien joined #nim
15:49:12FromGitter<vinodvinu> How to use SetWindowLongPtrW in nim ?
15:49:25FromGitter<vinodvinu> The third parameter is tricking me
15:49:26FromGitter<adam-r-kowalski> @mratsim actually I have another question for you, would arraymancer be able to compile down to webassembly?
15:49:33FromGitter<mratsim> yup
15:49:50FromGitter<adam-r-kowalski> Would the opencl calls turn into webgl?
15:49:55FromGitter<mratsim> not sure about the BLAS though
15:50:06FromGitter<mratsim> no OpenCL and Cuda would not work out of the box
15:50:16FromGitter<adam-r-kowalski> So it would be cpu accelerated for now?
15:50:18FromGitter<mratsim> I would need to bind something like cpu.js
15:50:20FromGitter<mratsim> gpu*
15:50:24FromGitter<vinodvinu> If i put wndProc function name as it is, then compiler says that it expects a LONG_PTR
15:50:45enthus1astit should exists a more userfriendly way for this: https://forum.nim-lang.org/t/4228#26331
15:51:04FromGitter<vinodvinu> when i put a LONG_PTR, compiler says that it expects a WNDPROC
15:51:04FromGitter<mratsim> @vinodvinu use `ptr clong`
15:51:38FromGitter<mratsim> wndproc is probably a callback to a function pointer
15:51:48FromGitter<vinodvinu> @mratsim , Thanks. Let me try
15:52:08FromGitter<adam-r-kowalski> since you need to call out to a js library to do gpu stuff anyway, would it make more sense to call out to tensorflow js?
15:52:58*mr_yogurt quit (Ping timeout: 246 seconds)
15:54:27FromGitter<vinodvinu> @mratsim , This is the result ⏎ got <LONG_PTR> but expected 'WNDPROC
15:55:08FromGitter<mratsim> tensorflow is too big of a dependency. Compiling it is hell.
15:55:19*mr_yogurt joined #nim
15:55:48FromGitter<mratsim> @vinodvinu what is the proc signature and what are those types. Otherwise I’m debugging blind :/
15:55:59FromGitter<adam-r-kowalski> Yeah compiling from source is a disaster. But they have a javascript library that uses webassembly with experimental simd support, and they utilize webgl for gpu accelerated tensors on the web
15:56:07FromGitter<seruum> @leorize That worked! Thank you. Sorry for the break in conversation, I had to step away for work...
15:56:20FromGitter<vinodvinu> @mratsim ,
15:56:32FromGitter<vinodvinu> This is the proc signature; ⏎ proc RED_WndProc(hwnd: HWND, message: UINT, wParam: WPARAM, lParam: LPARAM): LRESULT {.stdcall}
15:56:43FromGitter<mratsim> @adam-r-kowalski I’m also interested in WebGPU though it’s Apple only at the moment: https://github.com/mil-tokyo/webdnn
15:56:45FromGitter<adam-r-kowalski> I was wondering if your library can still work with that if I were to just fulfull some set of interfaces? What does it take to become a “tensor” in arraymancer
15:57:20FromGitter<mratsim> nothing much: an array for the shape, an array for the strides, an offset and a pointer to the data
15:58:12FromGitter<vinodvinu> @mratsim ⏎ This is the call site ⏎ OldWndProc = SetWindowLongPtrW(result, GWLP_WNDPROC, castclong (RED_WndProc))
15:58:27FromGitter<mratsim> You can refer to this discussion @adam-r-kowalski: https://github.com/mratsim/Arraymancer/issues/262
15:58:58FromGitter<arnetheduck> well, those bashing other-language-is-slow-to-compile, keep in mind that nim is likely to be even slower, for a comparable-size codebase
15:59:09FromGitter<adam-r-kowalski> And is that exposed as a concept? Because I think since there are so many different machine learning libraries coming out ever day, it would be amazing if we can have one common abstraction over all of them
15:59:24*endragor joined #nim
15:59:51FromGitter<mratsim> It’s not because when i started those didn’t exist, it’s compatible with Numpy, MxNet and Torch though
16:00:22FromGitter<mratsim> This is what the mxnet team proposed: https://github.com/dmlc/dlpack
16:01:15FromGitter<mratsim> @arnetheduck the thing is, I don’t need to write as much code in Nim. And the Nim compilation is quite fast.
16:03:03*platoff quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:03:34FromGitter<mratsim> Also while destructors are not there, I prefer to use seqs for backend at the moment but I do plan to introduce lower-level primitives in the future. ⏎ ⏎ 1) Some to refactor iteration on ndarrays, including variadic iterations + loopfusion. ⏎ 2) Primitives for data-parallel processing, similar to Intel TBB, Rust Rayon or Nvidia Cutlass with cache-blocking algorithms [https:/
16:03:34FromGitter... /gitter.im/nim-lang/Nim?at=5bbb7fd61c100a4f294e4a79]
16:03:37FromGitter<adam-r-kowalski> Thanks for all the resources! Could we brainstorm together a concept for a tensor? I would love to submit some PRs to gradually start replacing concrete Tensor types in the parameters of the functions to become concepts. That way we have no performance penalty but we can accept any kind of tensors, and new libraries just need to fulfull some minimum set of requirements
16:03:57*zurs joined #nim
16:05:33FromGitter<mratsim> shape: openarray\[int\], strides: openarray\[int\], offset: int, data: ptr UncheckedArray\[T\]. That’s the minimum.
16:06:08narimiran@seruum: completely unrelated, i just stumbled on an example where i must use that notnil pragma. you use it by putting it at the top of your file (not inside of your proc)
16:06:55*endragor quit (Remote host closed the connection)
16:07:07FromGitter<mratsim> Extra could be “Backends” (CPU, OpenCL, Cuda, can be a static) and memory ownership related stuff like ref counting or who should deallocate the memory.
16:07:58FromGitter<adam-r-kowalski> Perfect, I’ll get started soon then!
16:08:01*SenasOzys quit (Ping timeout: 246 seconds)
16:08:50FromGitter<mratsim> You can have a look into D ndslice and Rust Leaf/Parenchyma/Juice for some ideas in compiled modern language
16:09:04FromGitter<adam-r-kowalski> Yeah what do you think about using the move semantics and destructors for ownership? Then could we have value like tensors instead of ref based?
16:09:16FromGitter<mratsim> Plus those libraries are much easier to go through than something like NumPy
16:09:22FromGitter<mratsim> Check Facebook’s Aten as well.
16:09:51FromGitter<adam-r-kowalski> Yeah I’ve been looking at Aten a lot, it’s really nice, except I don’t like how they handle tensor types
16:09:55FromGitter<mratsim> I’ve started with value semantics tensors, tried copy-on-write tensors as well. Too many issues
16:10:17FromGitter<adam-r-kowalski> I think they should have used templates instead of their weird dtype thing. It seems like a pythonism that leaked through
16:10:41FromGitter<mratsim> the copy-on-write is till there btw: https://github.com/mratsim/Arraymancer/tree/copy-on-write
16:11:54FromGitter<adam-r-kowalski> Could you still have reference types, but have something that feels like a value? Because most tensors are immutable right? So that means you can share structure, even for operations like reshape, you just need a garuantee that the underlying tensor won’t mutate
16:12:05FromGitter<adam-r-kowalski> I think a lot of functional programming ideas could really help out in machine learning
16:12:42*platoff joined #nim
16:14:14FromGitter<mratsim> I know what you mean, but at the time I couldn’t: https://github.com/nim-lang/Nim/issues/6348 https://github.com/nim-lang/Nim/issues/6793
16:15:43FromGitter<mratsim> If write-tracking ever materialize I can probably make that work: https://nim-lang.org/araq/writetracking.html
16:16:13FromGitter<mratsim> or maybe with the new lent/sink borrow checker
16:16:36FromGitter<adam-r-kowalski> Yeah I was thinking about that. This seems like a lifetime issue right?
16:17:09FromGitter<adam-r-kowalski> But that still doens’t quite solve the problem
16:17:15FromGitter<adam-r-kowalski> You can’t return something that can only be borrowed
16:17:22FromGitter<adam-r-kowalski> Even in something like rust
16:17:23FromGitter<mratsim> yes
16:17:29FromGitter<mratsim> it’s ownership issue
16:19:41FromGitter<mratsim> in any case the plan is to get new low-level primitives that work on any buffer with a C/FOrtran like API where I expect those to be initialized by the caller. it should be super efficient as shown in https://github.com/edubart/arraymancer-demos
16:20:11FromGitter<adam-r-kowalski> I’ll take a look at the copy on write more in depth, because I feel like in practice that wouldn’t be inefficient. How many operations actually mutate the original tensor? I’ve seen some libraries mutate in place to save memory, but that is usually only for static graph libraries where the mutation is invisible to the caller anyway.
16:20:31FromGitter<adam-r-kowalski> Sorry if I completly hijacked this channel haha, is there a more arraymancer specific channel we can be on?
16:20:40FromGitter<mratsim> The current procs will be syntactic sugar on top of that. This will allow to use fixed size array for embbdded devices similar to uTensor
16:21:30FromGitter<mratsim> and it will allow to use an object pool for intermediate tensors heavy algorithms: https://github.com/mratsim/Arraymancer/tree/master/src/object_pool
16:22:10FromGitter<mratsim> on gitter mratsim/arraymancer
16:22:24FromGitter<mratsim> or Arraymancer/Lobby
16:23:03FromGitter<adam-r-kowalski> Thanks, I joined the lobby!
16:27:51*zurs quit (Quit: Leaving)
16:35:37*alynpost joined #nim
16:38:39FromGitter<iffy> Within a template, I'm trying to use `mystringval.strip(chars = {'-'})` but am getting `Error: attempting to call undeclared routine: 'strip'` How do I wrap my head around what can and can't be used from within a template?
16:39:17FromGitter<kaushalmodi> @iffy you need to import strutils?
16:39:26alynpostHello folks. My name is Alan Post, I'm the systems administrator for lobste.rs. One of our users, federico3 (https://lobste.rs/u/federico3) is asking for a Nim Core Team 'hat' as Federico Ceratto. Is someone from the core team here able to identify themselves and verify federico3's ask for a hat?
16:39:33FromGitter<iffy> @kaushalmodi it's imported (in the file where my template is defined)
16:39:48FromGitter<iffy> oh, do I need to import it in the file where the template is used?
16:39:52narimirancould this (@iffy) be the same behaviour as when you can't use `split` inside of `mapIt` (also template)?
16:40:12narimiranalynpost: yup, he is what he says he is :)
16:40:22FromGitter<Lite5h4dow> Hey guys. Anything new in the land of nim?
16:40:40federico3hi alynpost
16:41:08FromGitter<kaushalmodi> federico3: Cool! I didn't know you were part of the core Nim team
16:42:06alynpostHello federico3. What do you make of narimiran's claim there? ;-)
16:43:22federico3kaushalmodi: we don't have a formal definition of what is to be "core" other than being in the GH repo users
16:43:38alynpostthat is the material confusion I had on the matter, tbh.
16:43:54FromGitter<kaushalmodi> I would think of Core members as ones who have write access to the repo
16:44:18FromGitter<kaushalmodi> aka official Nim project spokesperson
16:44:45FromGitter<kaushalmodi> so if someone see someone say something about Nim while wearing a Nim hat, that word's to be taken as *the truth*.
16:45:53federico3kaushalmodi: we never had a spokesperson role
16:46:36FromGitter<kaushalmodi> @dom96 ? :)
16:47:25FromGitter<kaushalmodi> Or maybe it's just me interpreting the lobsters hats as too official
16:47:32FromGitter<kaushalmodi> may be they are just like reddit flairs
16:49:24alynpost"Hats are a more formal process of allowing users to post comments while "wearing such and such hat" to give their words more authority (such as an employee speaking for the company, or an open source developer speaking for the project)." from https://lobste.rs/about
16:50:07FromGitter<kaushalmodi> alynpost: Exactly, so the hats do sound more official.
16:50:28FromGitter<kaushalmodi> So probably a project's stakeholders can wear that. @mratsim ?
16:51:30*darithorn joined #nim
16:53:34*Trustable joined #nim
16:54:30federico3alynpost: I'm a bit confused: I'm seeing hats given to members of projects/companies who are not spokepersons, just contributors/employees
16:55:30FromGitter<alehander42> @adam-r-kowalski https://forum.nim-lang.org/t/3755#26047
16:57:00FromGitter<alehander42> on the other hand we still might rewrite the jsgeneration a bit in my sourcemap PR
16:57:13alynposthats are not just for a notional spokepersons role, they are also used for, excuse the lingo, expert testimony.
16:57:13FromGitter<alehander42> so maybe we can support that too if we do it
16:57:57alynpostIf all y'all find the Nim hat situation on lobste.rs inconsistent with your own organization we can get that identified and fixed.
16:58:36narimiranalynpost: having said that, i see no reason why federico3 shouldn't wear the nim-hat
17:01:02alynpostExcellent and done. i'll take my leave now. Does anyone need anything else or have any questions before I do?
17:01:06FromGitter<kaushalmodi> I agree with narimiran. federico3 is definitely recognized in Nim community with his awesome Nim package contributions
17:01:20federico3thanks guys
17:01:22*federico3 tips hat
17:01:26narimiran:)
17:02:40federico3(anyhow it's not like I'm going to make official-sounding statements or claim that 1.0 is out)
17:04:06FromGitter<kaushalmodi> :)
17:05:12*alynpost left #nim ("WeeChat 1.5")
17:08:02FromGitter<Lite5h4dow> I read 1.0..
17:08:12FromGitter<Lite5h4dow> Is it happening?
17:08:27FromGitter<kaushalmodi> lol
17:08:31narimiran...and you take a look at a calendar, and you see it is not 2038 yet
17:08:32enthus1astofficial statement?
17:09:12FromGitter<kaushalmodi> enthus1ast: there wasn't even an unofficial statement
17:10:03FromGitter<Lite5h4dow> L@ar
17:10:43federico3there should be something like "Streisand effect" for rumors started as a joke :)
17:12:25narimiranofftopic, but regarding slow PR resolving (https://forum.nim-lang.org/t/4285):
17:13:03narimiranVSCode september version: "we closed (either triaged or fixed) 3918 issues (...) In addition, we closed 212 pull requests."
17:13:13*TheLemonMan joined #nim
17:15:32FromGitter<kaushalmodi> narimiran: I agree.. there needs to be some delegation to bring down the issue/PR count
17:16:28TheLemonManslow and steady wins the race, work is progressing even though PRs are sitting there
17:16:49narimiranthere are open PRs from 2015 and 2016! this should be either merged (if they are applicable still) or closed
17:16:59FromGitter<alehander42> agree
17:17:03narimiranand we have open issues from 2012!!!
17:18:07TheLemonManso do the other projects, manpower is not infinite nor is time (nor willpower nor interest... you know the drill)
17:18:52narimirani've tried to go through these old issues, and IMO some of these should/could be immediately closed (as i said in the comments of these issues)
17:20:10*hzx joined #nim
17:21:14narimirangolang: 55 open PRs, rustlang: 136, kotlin: 111
17:21:42narimiranand if you say: they have more maintainers. well, they have more users (opening those PRs) too
17:21:49TheLemonManbacked by: Google, Mozilla & co, Jetbrains
17:22:50narimiranTheLemonMan: re manpower and time: i think the biggest problem here is the third thing you mention: willpower
17:23:14TheLemonManof course, sifting trough the issues is a boring and unrewarding job
17:23:40narimiranif there is a willpower to work on bugfixing and not daydreaming about nim v2 (yeah, not a typo), i'm sure those numbers of open issues/PRs could be much lower
17:24:04enthus1astnarimiran received *NECROMANCER* badge
17:24:10narimiran:D
17:25:02narimiranTheLemonMan: yeah, those 5 year old issues are not destructors (or whatever is now interesting), but they should be resolved
17:25:31narimiranwhy not use this hacktober opportunity to work, as a community, on all those boring things?
17:25:37TheLemonManI don't know who's daydreaming of Nim v2 but I see a steady stream of bugfixes incoming
17:26:16TheLemonManhacktoberfest is already giving us some interesting PRs (on interesting parts of the compiler :D)
17:26:38narimiranTheLemonMan: hopefully those PRs will be merged before 2024 ;)
17:27:49narimirantimothee is right, increasing the velocity of solving PRs would give more motivation to people to contribute (even) more
17:28:23federico3talking about my experience on other projects, delegating often helps by giving people a sense of responisibily over something
17:28:40TheLemonManyou're all making a fuss over a small delay, come on!
17:30:16Zevvl
17:30:25TheLemonManwell said!
17:30:59narimiranfederico3: agreed
17:31:39FromGitter<kaushalmodi> See how big projects like Emacs developed over time.
17:31:57FromGitter<kaushalmodi> There are dozens of committers. So getting things committed is not the bottleneck.
17:32:09FromGitter<kaushalmodi> The lead maintainer just oversees the commits happening
17:32:29FromGitter<kaushalmodi> they may email the committer in the emacs-devel mailing list if something needs to be improved
17:32:43Araqseriously guys, fyi
17:32:43FromGitter<kaushalmodi> in worst case, the maintainer can revert the bad commit too
17:33:01AraqI've been on vacation for the last 5 days
17:33:15TheLemonManHOW DARE YOU?!
17:33:27FromGitter<kaushalmodi> Araq: but that's not the issue here
17:33:29Araqbut I'm back now. and also
17:33:53Araqthe biggest problem right now with the PRs is the release/development cycle
17:34:07Araqeither we stop merging before 0.19.2 is out
17:34:16Araq-- or (and I know you will all vote for this)
17:34:26Araqwe backport the fixes to 0.19
17:34:32Araqand let 'devel' be 'devel'
17:34:37FromGitter<kaushalmodi> why not commit 0.19.2 commits to master branch?
17:34:38narimiranwelcome back Araq, hope you had a nice rest and you're ready for new victories :)
17:34:43FromGitter<kaushalmodi> and then merge them to devel as needed?
17:35:26Araqkaushalmodi: well it depends on the bugfix, the stdlib is easier in this regard than the compiler
17:35:42Araqthe compiler's development was pretty crazy the last months with the refactorings
17:35:47narimiranAraq: regarding 0.19.2: can this be postponed/scheduled after october has passed? lots of people are participating in hacktoberfest and this could result in lots of good contributions that could be in the 0.19.2
17:36:45narimiran0.19.2 could be seen as "the greatest bugfixing yet version"
17:36:52Araqnarimiran, good contributions != bugfixes
17:37:27*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
17:37:45narimiranbugfixes == not introducing any new features, fixing the existing issues, etc.
17:38:14Araqbugfix could also mean "we need to deprecate this, it's never gonna work" :-)
17:38:34narimiranand if it is explicitly said (not just here on IRC) that bugfixes is what is the main aim for 0.19.2, i don't see a problem
17:39:02Araqbugfixes are also tricky, often the most problematic regressions are due to bugfixes
17:39:37narimiranok, lets fix those regressions in 0.19.4 ;)
17:40:12AraqI'm pretty good at judging these nowadays, but the lack of a development process is something we need to sort out asap
17:40:30narimiran+1
17:42:09Araqso ... apart from that, what requires my immediate attention? ;-)
17:46:42FromGitter<kayabaNerve> Will we have 0.19.19 in 7 years before we release 1.0?
17:47:20FromGitter<kayabaNerve> I want the header pragma path thing to be in 1.0. I should submit a PR to guarantee that...
17:47:40FromGitter<kayabaNerve> If I can figure out how 0_o
17:49:06FromGitter<kayabaNerve> Damn I just pulled up my issue again. So many typos.
17:50:33Araqwhat's the problem with the header pragma?
17:51:34FromGitter<kayabaNerve> You were the one who accepted my RFC lol. Header file paths are relative to the nimcache, not the Nim module, unlike the compile pragma.
17:51:34*alexnask quit (Ping timeout: 240 seconds)
17:52:10FromGitter<kayabaNerve> It may have been fixed and the paths just happen to be the same in my code (with extra bloat of ../../a/b).
17:52:23FromGitter<kayabaNerve> https://github.com/nim-lang/Nim/issues/8408
17:52:49FromGitter<kayabaNerve> There's the issue.
17:55:24*rlr quit (Remote host closed the connection)
17:55:30narimiranAraq: re your immediate attention: if you asked me, i would say: explicitly (and in detail) say (on the forum, not here) what you expect and want for 0.19.2 and beyond (some kind of roadmap with clear goals); gather a trusted team that can work on triaging/solving/merging issues/PRs according to that roadmap
17:59:29Araqwe have a v1 roadmap and we're following it
17:59:45Araqwe don't have a roadmap for v0.19.2 though
18:04:46narimiranthe opportunity to profit from the momentum because of the hacktoberfest should not be missed! i'm sure (maybe i'm too optimistic) that people will be more motivate to contribute if they see there's an increased activity in closing the existing issues and merging PRs, knowing their work will not be left to rot for years (that started this discussion: very old, still open, issues and PRs)
18:09:16federico3I think hacktober-related PRs should be merged within the monts, so prioritizing them could encourage contributors
18:10:42elroodthere is a link to a roadmap to 1.0 in web/index.rst which leads nowhere (yet again), by the way
18:11:00narimiranbtw, 4 of 4 closed issues in last three days are because of me going through the old issues (trying to find something to work for hacktoberfest) and realizing they were already fixed :)
18:11:22*tzui joined #nim
18:11:43*tzui left #nim (#nim)
18:11:51narimiranelrood: that's what we have because this is not merged yet: https://github.com/nim-lang/Nim/pull/9233 ;)
18:20:50*Tortice joined #nim
18:27:38*alexnask joined #nim
18:38:49*nsf joined #nim
18:42:24*zurs joined #nim
18:44:39FromGitter<kdheepak> Are there examples of javascript nim repos?
18:45:06FromGitter<kdheepak> that show how to interface with existing Javascript libraries?
18:45:16FromGitter<kdheepak> Something that perhaps uses webpack etc.
18:47:36*alexnask quit (Ping timeout: 252 seconds)
18:53:42*nsf quit (Quit: WeeChat 2.2)
18:54:56*stefanos82 quit (Quit: Quitting for now...)
18:57:33*zurs quit (Ping timeout: 245 seconds)
19:04:45*zurs joined #nim
19:05:04*Tortice quit (Read error: Connection reset by peer)
19:05:09*zurs quit (Client Quit)
19:09:18FromGitter<zacharycarter> @kdheepak - I can help with that potentially
19:10:13FromGitter<zacharycarter> Araq: I know your job isn't to produce content like this, and my frustrations levied this morning weren't aimed at you or dom or Nim in general, they were related to my friction with not understanding how to do things in Nim, when I see them done in another language
19:10:41FromGitter<zacharycarter> also not understanding why certain things are done when and for what reason - I know this is because I'm trying to learn low-level programming concepts through Nim - but I don't think I'm alone in this frustration either
19:11:22FromGitter<zacharycarter> https://github.com/simonferquel/AwaitInGameLoopSample/wiki - is a great example of how a concept, that to a dummy like me, wouldn't really get in terms of how I could take nim's async programming model and apply it to what I'm trying to do
19:11:46FromGitter<zacharycarter> this author has broken it down though and explained it in very high level concepts that someone like me - who comes from Java or C# or NodeJS or Python etc - can understand
19:11:58FromGitter<zacharycarter> when they see like a parallelized fiber based job system in C++
19:12:18FromGitter<zacharycarter> and they want to achieve something similar using Nim - but struggle with the GC / default threading model
19:12:55FromGitter<zacharycarter> even related to destructors / RAII / etc - these are amazingly difficult concepts for a novice game programmer to grasp - my experience has been picking up Nim, learning OpenGL and libraries like BGFX and finding it to be amazing
19:13:04FromGitter<zacharycarter> but when I want to go deeper than that - I hit a wall I don't know how to get around
19:14:04Araqyeah I know and I know it's harder in Nim than in others because of the thread local heaps
19:14:21FromGitter<zacharycarter> finally - I will say that I also was very much at fault for letting my frustration boil over - and I apologize. I've been dealing with a lot personally, and I definitely let my emotions get in the way of making objective criticisms
19:14:33Araqessentially you need to deepCopy() the task
19:14:34FromGitter<zacharycarter> I love Nim - and don't want to stop using it - sometimes I just feel a bit helpless
19:15:02FromGitter<zacharycarter> well - with that insight - I'm going to try to understand destructors and RAII semantics more
19:15:18FromGitter<zacharycarter> it sounds like I can achieve what I want to do with what you're doing with the new runtime
19:15:33Araqdestructors and RAII are indirectly related to this
19:15:37FromGitter<zacharycarter> okay
19:16:25FromGitter<zacharycarter> well - I think that just shines a light on my level of understanding surrounding the new runtime in general, so I have some learning to do
19:17:19Araqwell I can explain it to you here in a couple of sentences, maybe they inspire somebody to improve the docs
19:18:39FromGitter<zacharycarter> that'd be wonderful - I've also read this - https://github.com/nim-lang/Nim/wiki/Destructors and https://github.com/nim-lang/Nim/wiki/NEP-2-Catching-up-with-Cpp--and-Rust:-Ownership,-destructors,-unique-pointers - I have yet to understand all of it, but I get the first few paragraphs in the first article which I think are the most important bits
19:19:42FromGitter<zacharycarter> err I meant the NEP doc - sorry
19:20:02FromGitter<zacharycarter> but I also understand some of the destructors doc - the sinks and ownership stuff is a bit over my head atm, but I think I get the basics
19:21:56*PMunch joined #nim
19:27:31*hoge99 joined #nim
19:27:36*PMunch quit (Ping timeout: 260 seconds)
19:27:58*PMunch joined #nim
19:28:14FromGitter<zacharycarter> I'm just slightly in the grey as to how this all works with threads - but I think that's my lack of C++ / low-level programming experience contributing in a massive way
19:28:16*hoge99 left #nim (#nim)
19:28:40planetis[m]hey is this https://github.com/nim-lang/Nim/issues/7996 unblocked? Will you accept PRs that make modules use concepts?
19:28:55FromDiscord_<smitop> Is it possible to use the opengl library with JS?
19:29:07planetis[m]i.e the parseutils use a String concept?
19:29:11FromGitter<zacharycarter> smitop: I don't think so
19:29:24FromGitter<zacharycarter> you want to target webgl right?
19:29:24Araqsmitop: nimx does that
19:29:33FromGitter<zacharycarter> ^
19:31:44*hzx quit (Quit: Going offline, see ya! (www.adiirc.com))
19:34:02planetis[m]It could be a nice Hactoberfest task
19:34:46*PMunch quit (Ping timeout: 252 seconds)
19:39:44*zachk joined #nim
19:40:22*zachk quit (Changing host)
19:40:22*zachk joined #nim
19:44:16*SenasOzys joined #nim
19:46:05FromGitter<zacharycarter> I will gladly contrib to docs - I just need to have an understanding of what I"m talking about
19:46:12FromGitter<zacharycarter> which I often don't :P
19:46:42FromGitter<mratsim> that’s indeed a showstopper :p
19:46:49FromGitter<zacharycarter> right?
19:47:09FromGitter<mratsim> but Nim async is reall similar to C# or Python async/await (from someone who only used them a little)
19:47:18FromGitter<zacharycarter> well I get that
19:47:35FromGitter<zacharycarter> but - I read naughty dog's presentation from GCC abut parallelizing a job system using fibers
19:47:43FromGitter<zacharycarter> then I get into lock free data structures / work stealing
19:47:59FromGitter<zacharycarter> then I already have a high level understanding of async await
19:48:23FromGitter<mratsim> lock free data structure and work stealing are not async, it’s about task parallelism
19:48:24FromGitter<zacharycarter> how all these concepts come together, or how one can potentially solve the same problem
19:49:04FromGitter<zacharycarter> okay so let me back up maybe - I initially was looking at game engines written in C++
19:49:15FromGitter<mratsim> Just use Intel TBB for task parallelism: https://www.threadingbuildingblocks.org/
19:49:20FromGitter<zacharycarter> and I saw may of them featured job systems - some using fibers, many saying they used coroutines
19:50:01FromGitter<zacharycarter> so I started looking into fibers and understood they only existed on windows and that they're a primitive for building coroutines with and that you can build coroutines with other primitives in other architectures
19:50:21FromGitter<zacharycarter> and then there are green threads - which are virtualized threads and not OS threads
19:50:54FromGitter<mratsim> No: coroutines = green threads = fibers in the grand scheme of things
19:51:05FromGitter<zacharycarter> and then I tried to understand a presentation by one of Naughty Dog's engineers about how they parallelized their game engine using fibers
19:51:07FromGitter<mratsim> i.e. this is for IO and it runs on the same OS threads
19:51:19FromGitter<zacharycarter> and all I really want - is some kind of job queueing system with Nim
19:51:34FromGitter<zacharycarter> but I mean - I barely understand any of the above - and I feel like it's spinning me in circles
19:51:42FromGitter<mratsim> tne in Nimx
19:51:42FromGitter<zacharycarter> and I don't know of a simple place to start and iterate from
19:51:46FromGitter<zacharycarter> okay
19:52:03FromGitter<mratsim> https://github.com/yglukhov/nimx/blob/master/nimx/private/worker_queue.nim
19:52:14*PMunch joined #nim
19:52:32FromGitter<zacharycarter> I have seen this - and I did play with it for one other task I had (not related to game programming)
19:53:23FromGitter<zacharycarter> but then the whole complication of GC comes into play right?
19:53:32FromGitter<mratsim> the first thing you need to be clear about is do you need concurrency or parallelism: https://cdn-images-1.medium.com/max/409/1*_4B2PKsJn9pUz3jbTnBnYw.png
19:53:41FromGitter<zacharycarter> like - I found - okay
19:54:11FromGitter<mratsim> async/await, coroutines, green threads and fibers are for concurrency. Use case IO, to avoid leaving your CPU idle while waiting for the network or the disk
19:54:13FromGitter<zacharycarter> so - yeah - I think it will depend on the task
19:54:28FromDiscord_<Shield> indeed, what are you trying to achieve exactly? there are many tools to achieve the same thing, each one comes with their own problems
19:55:04FromGitter<mratsim> task parallelism is to send different computations to different CPUs and data parallelism is to split complex computation (3D scene, geo stuff) on multiple CPUs
19:55:04FromGitter<zacharycarter> I think most important for me out of the gate would be parallelism
19:55:15FromGitter<zacharycarter> I'd like to be able to toss basic tasks at a queue - have them picked up and worked on
19:55:30FromGitter<zacharycarter> I understand there are SPSC queues and MPMC queues for this
19:55:32FromGitter<mratsim> so task parallelism.
19:55:35FromGitter<zacharycarter> yes
19:55:50FromDiscord_<Shield> nim already have coroutines which do use fiber on windows
19:55:58FromGitter<mratsim> I think can use nimx worker queue or wrap Intel thread building blocks
19:56:23FromGitter<mratsim> (if those task are compute, if it’s IO just use async/await)
19:57:04FromGitter<mratsim> async doesn’t have GC issues, while for task parallelism you would need to communicate vie channels (deep copy) or pointer (possible race conditions)
19:57:18FromGitter<zacharycarter> okay - I will take another stab at nimx's worker queue - thank you both for the insight and sorry to anyone who has already told me this ad nauseam - I think things have clicked a little better
19:57:40FromGitter<zacharycarter> ah - I think maybe that's what Araq was referring to earlier this afternoon when he mentioned what I needed was deepCopy
19:57:48FromGitter<mratsim> Concurrency and parallelism are not easy topics. Wait until you have to debug race conditions
19:58:05FromDiscord_<Shield> but you can achieve the same thing with async/closure iterators, in the end, they're only sugar syntax to make code readable, everything can boil down to a state machine
19:58:05FromGitter<zacharycarter> well - I'm not looking forward to it at all - but my struggle has been to learn the topic using Nim
19:58:27FromGitter<zacharycarter> or learn about all these topics while using Nim
19:58:51FromGitter<zacharycarter> because I really just started with HTML / JS and CSS when I was very young
19:59:14FromGitter<zacharycarter> and only took comp-sci in HS - and failed my AP exam with a 2 haha
19:59:35FromGitter<mratsim> @Shield it really depends if workload is IO or Compute. if it’s io, async is best but if your CPU is at 100% already you need to dispatch to a new one.
19:59:45FromGitter<mratsim> I’m a mechanical engineer ;)
19:59:51FromGitter<zacharycarter> I guess I need to understand state machines better as well then
19:59:55FromGitter<zacharycarter> I'm a history major haha!
20:00:01FromDiscord_<Shield> the simplest solution i've found with multithreading is to simply use data buffers and atomic operations, it avoids data races because no two threads are touching the same data
20:00:13FromGitter<zacharycarter> okay - so I tried to do that
20:00:18FromGitter<zacharycarter> but I'm not sure what went on here
20:00:40FromGitter<zacharycarter> like I found - https://github.com/sheosi/tart - which didn't compile with 0.18.1
20:01:41FromGitter<zacharycarter> so I opened this issue - https://github.com/nim-lang/Nim/issues/8616
20:01:45FromGitter<zacharycarter> not sure what happened
20:02:17FromGitter<zacharycarter> I have everything working - minus that being addressed - but I mean - I also don't understand the complexity behind the issue necessarily either
20:02:33FromDiscord_<Shield> @mratsim when it comes to games you only need async IO for loading resources, it's mostly a computation problem, a lot of time people will create a job queue for pathfinding, but you can just use channels or threadpools
20:04:07*rlr joined #nim
20:04:21FromGitter<rayman22201> @zacharycarter it looks like that issue was closed because theLemonBoy fixed it
20:05:52FromGitter<zacharycarter> oh weird - I thought that was the case as well, but when I was reviewing it last night I was under the impression it was closed
20:05:59FromGitter<mratsim> @zacharycarter I use ptr UncheckArray all over arraymancer without issues
20:06:08FromGitter<zacharycarter> maybe I need to re-open it then - I'm still having issues with it apparently
20:06:21FromGitter<mratsim> just use ptr uncheckedArray\[T\]
20:06:24FromGitter<zacharycarter> @mratsim - I know - I've used it quite a bit as well before
20:06:36FromGitter<zacharycarter> instead of what? all the static arrays?
20:06:48FromGitter<mratsim> instead of DynArray
20:06:51FromGitter<zacharycarter> oh
20:07:05FromGitter<zacharycarter> ah I see what you mean - okay
20:07:11FromDiscord_<Shield> trying to write a general solution for parallelism in video games is a really hard task, most of the time you can only render from the main thread, and to render it needs data that is always updated so you need to sync everything, which only adds overheads and makes everything complicated when you can avoid it by simply knowing your actual needs
20:08:25FromGitter<mratsim> Also `iterator mitems*T (self: var RtArray[T],maxIndex: Natural): var T {.inline.} =` you should remove the `var` in the input (and leave in the output) unless you plan to modify what self is pointing to
20:08:30FromGitter<zacharycarter> I think I just got done reading that sentiment
20:08:36FromGitter<tim-st> @mratsim does UncheckedArray support iteration over it?
20:08:56FromGitter<mratsim> it doesn’t have a length
20:09:26FromGitter<mratsim> it supports indexing though
20:09:31FromGitter<tim-st> Wasnt sure if the type was derived from an array of length 0 which I think is zero terminated
20:09:49*Tortice joined #nim
20:10:14FromGitter<mratsim> you can cast a ptr + len to openarray otherwise
20:10:17FromGitter<zacharycarter> @mratsim - thank you for the tips
20:10:22FromGitter<tim-st> so what happens if you write for x in unchecked..
20:10:26FromGitter<zacharycarter> I'll adapt them and see if things compile then
20:10:42FromGitter<mratsim> @tim-st nothing, no items proc
20:10:55FromGitter<tim-st> ok, good, thanks
20:11:47FromGitter<zacharycarter> Shield: I'm trying to kind of learn via exploration - and my route has been via building stupid little game engines with Nim, but this is one topic I really haven't delved into and I understand it is very complex - I think I need to probably find some good reading material that provides examples I can understand in C, and hopefully I can fill in the gaps from there
20:11:58FromGitter<mratsim> see: https://github.com/nim-lang/Nim/issues/5437#issuecomment-402462119 for casting ptr+len to openarray
20:12:01FromGitter<tim-st> when nim strings once work without gc, does it mean casting uncheckedArray with known length to string will work?
20:12:24Araqno, the string owns its data
20:12:48FromGitter<tim-st> ok, thanks
20:13:07FromGitter<tim-st> when I cast Unchecked to openArray and then openArray to string will this work^^ ? https://github.com/nim-lang/Nim/issues/5437#issuecomment-402462119
20:13:28FromGitter<mratsim> Are you building a Goldberg machine?
20:13:48FromGitter<zacharycarter> who?
20:13:49FromGitter<tim-st> just want to have the best performance I have very many reads
20:13:52FromGitter<zacharycarter> oh
20:14:39FromGitter<zacharycarter> me - probably in most cases haha
20:14:49FromGitter<zacharycarter> but I know you were talking to tim-st
20:15:14FromGitter<mratsim> Ah, I really not the best guy to work with strings. Just at the idea at all those heap allocations I shudder :P
20:16:05FromGitter<mratsim> Ok, I’m off writing a brainfuck parser :P
20:16:23FromGitter<tim-st> ok, have fun^^
20:19:49FromGitter<tim-st> Araq: I think allowing default values for static types should be available in v1 is this planned?
20:20:19FromGitter<tim-st> like proc test(t: static[int] = 2) = discard
20:22:56Araqhmm that's just a bug, I think?
20:23:01FromGitter<tim-st> oh, does it already work in 0.19.0
20:23:12FromGitter<tim-st> I just tried it, and it seems to work
20:23:21FromGitter<tim-st> I'm pretty sure this wasnt working in last version
20:24:20FromGitter<tim-st> wow, very nice, that's the thing I missed most
20:26:34FromGitter<mratsim> it works since end of June
20:26:39FromGitter<mratsim> (I raised the bug)
20:27:01Araq \o/
20:27:13FromGitter<tim-st> @mratsim perfect!
20:27:34FromGitter<tim-st> btw both `static[int]` and `static int` work; shouldnt only one (the first) work
20:27:52Araqthat was done for consistency :-)
20:27:56FromGitter<mratsim> the second was added because static is similar to var, ptr ref
20:28:06FromGitter<tim-st> hm
20:28:09FromGitter<tim-st> :D
20:28:35FromGitter<mratsim> type also works now insead of typedesc\[foo\] though it doesn’t work well with typedesc\[int or uint\]
20:28:57FromGitter<mratsim> Now regarding the static bug I’m mostly curious about this: https://github.com/nim-lang/Nim/issues/6343
20:29:09FromGitter<mratsim> for once static is a workaround for an openarray issue.
20:29:24*Trustable quit (Remote host closed the connection)
20:29:36FromGitter<mratsim> or generics
20:29:44*SenasOzys quit (Remote host closed the connection)
20:29:44FromGitter<tim-st> doesnt openArray require always a generic? like openArray[T]
20:29:55FromGitter<mratsim> a generic can be implied
20:30:06FromGitter<mratsim> you can do foo(x: seq) =
20:30:21*SenasOzys joined #nim
20:30:25*PMunch quit (Remote host closed the connection)
20:30:35FromGitter<tim-st> ok, also it would be inconsistent since the example after this works
20:33:32FromGitter<mratsim> don’t ask me how I thought of putting a static int as an extra param
20:34:06FromGitter<tim-st> yes, that's a good question :D
20:35:02FromGitter<tim-st> maybe you tried to return a variable length array auto created at compile time
20:36:08*Vladar quit (Remote host closed the connection)
20:38:01*Elronnd quit (Quit: leaving)
20:41:48planetis[m]hey is this https://github.com/nim-lang/Nim/issues/7996 unblocked? Will you guys accept PRs that make modules use concepts?
20:41:58Araqplanetis[m], yes
20:42:06planetis[m]cool
20:42:16Araqsorry for missing your question the first time
20:43:40planetis[m]np i was hoping someone would answer eventually
20:51:32*vlad1777d joined #nim
20:53:13planetis[m]btw @zacharycarter look at this example to understand destructors https://github.com/nim-lang/Nim/blob/devel/tests/destructor/tprevent_assign.nim When an object assignment is performed the compiler determines if it will copy the data held by the object or pass their ownership to the lhs, thus elimenating copies. The sink keyword in procs tells the compiler that the data held by the object are `consumed` by the proc and the
20:53:14planetis[m]original object is reset.
20:53:35FromGitter<tim-st> could it be supported in future that strutils also works on openArray[char]?
20:53:55FromGitter<tim-st> if so I wouldnt need to cast to string and could work with toOpenArray
20:54:31FromGitter<mratsim> in the past openarray\[char\] also matched string and it was creating a lot of bugs
20:55:11FromGitter<tim-st> and for a few read only procs for strutils? that would be really helpful
20:55:47FromGitter<mratsim> just copy paste strutils and customize it for your need if it’s only a few
20:56:34FromGitter<tim-st> hm, I also want that it works like a proc taking string, string would work with string, openArray[char]
20:56:42FromGitter<tim-st> commutative
20:57:33FromGitter<tim-st> btw what errors can appear if openArray[char] treated like string?
20:57:36FromGitter<mratsim> if it’s commutative you can use template to rewrite in “canonical” form, search for “canonical” in Nim manual
20:57:55FromGitter<tim-st> ah yes, that was the thing, I knew I read this before, thanks
20:58:32FromGitter<mratsim> on my side, this broke when string matched openarray char: https://github.com/mratsim/Arraymancer/blob/master/src/private/nested_containers.nim#L22-L30
20:58:50FromGitter<mratsim> hence the T: not char special casing
20:59:04FromGitter<tim-st> because you use auto?
20:59:25FromGitter<mratsim> no, openarray\[T\]
20:59:55FromGitter<tim-st> but why shouldnt this match string?
21:00:21FromGitter<tim-st> I ask because semantically string and openArray[char] is the same
21:00:54FromGitter<tim-st> ah, I see, above is a version for string
21:00:56FromGitter<mratsim> if your input is [‘foo’, ‘bar’] I don’t want a Tensor: [[‘f’, ’o’, ’o’],[‘b’, ’a’, ’r’]
21:01:26*xet7 quit (Remote host closed the connection)
21:01:37FromGitter<mratsim> implementation wise they are the same, semantically they are not
21:01:41FromGitter<tim-st> ok, but especially when wrapping c code and casting to string without copy dooesnt work it helps a lot
21:01:58FromGitter<mratsim> C code should come in cstring
21:02:35FromGitter<tim-st> no, cstring doesnt support zero byte, does compressed string data from database dont have zero byte in it?
21:02:49FromGitter<mratsim> I think destructors would allow to use cstring as string input without GC allocation
21:03:06FromGitter<tim-st> The problem is that I dont have cstring^^
21:03:15FromGitter<tim-st> it's buffer with given length
21:03:19FromGitter<mratsim> ah I see
21:03:26FromGitter<mratsim> a Pascal String ;)
21:04:05FromGitter<tim-st> thus toOpenArray would be a nice workaround if openArray[char] = string
21:04:10FromGitter<mratsim> yeah not sure how to deal with that. Maybe concepts
21:04:40FromGitter<mratsim> or a distinct openarray char
21:04:50FromGitter<tim-st> exactly what I wanted to say^^
21:05:05FromGitter<tim-st> together with a concept maybe
21:08:14FromGitter<mratsim> I wonder the impact of concepts on compile-time
21:08:30FromGitter<tim-st> I think it's bad
21:08:47FromGitter<tim-st> especially when I see the type Iterable for x in iter: discard
21:11:49*elronnd joined #nim
21:12:58*platoff quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:13:09*elronnd is now known as Elronnd
21:15:20*Tortice quit (Remote host closed the connection)
21:15:35FromGitter<tim-st> just learnt about the type `int{lit}` :)
21:16:36FromGitter<tim-st> (ok, seems to be the same like static[int])
21:24:39FromGitter<mratsim> mmm not exactly
21:27:16*narimiran quit (Quit: Konversation terminated!)
21:29:39FromGitter<adam-r-kowalski> Is there support for variadic templates?
21:35:38FromGitter<tim-st> @mratsim what is the difference?
21:35:55*Tortice joined #nim
21:36:00FromGitter<kdheepak> @zacharycarter that would be great!
21:36:12FromGitter<kdheepak> I did try to look through some of your repos.
21:36:37FromGitter<kdheepak> I guess what I'm struggling with is trying to figure out how to use Vue or some existing framework.
21:36:55FromGitter<kdheepak> Maybe I should just generate js to see what happens and learn that way?
21:36:59FromGitter<kdheepak> How did you do it?
21:37:06FromGitter<kdheepak> How did you learn?
21:39:23FromGitter<tim-st> ah I see, it cannot be evaluated at compile time, although it's constant
21:41:32FromGitter<adam-r-kowalski> @kdheepak if you find out I’d love to hear your results! So far I’ve had to consume the library by getting something which is hosted on a cdn like react. Then you have a script tag in your html file like normal. But that introduces bindings into the global scope. I don’t know how to install with yarn/npm and then use import/require syntax
21:42:57FromGitter<adam-r-kowalski> @mratsim about the impact of concepts on compile time, I recomend this video https://www.youtube.com/watch?v=HddFGPTAmtU Bjarne actually claims it will be reduced relative to templates and SFINAE
21:43:03FromGitter<kdheepak> @adam-r-kowalski sure, I'd be willing to post here or on a blog when I figure out details.
21:57:01*Gnjurac joined #nim
21:57:25Gnjurachi anyone using godot with nim, i just builded form source and i get this
21:57:26Gnjurac No valid library handle, can't get symbol from GDNative object
22:00:06*elrood quit (Quit: Leaving)
22:01:56Gnjurachmm i think i frogot to do nake build
22:02:14Gnjuracam trying now but is says
22:02:15Gnjurac Prompt: [email protected] already exists. Overwrite? [y/N]
22:02:15Gnjurac Answer: y
22:02:15Gnjurac Success: nake installed successfully.
22:02:15Gnjurac[me@me-pc myproject]$ nake build
22:02:15Gnjuracbash: nake: command not found
22:06:55*cozachk joined #nim
22:07:15Gnjurachmm found manualy where neke installed in pgks
22:07:20Gnjuracbut now got error
22:07:22GnjuracHint: cpuinfo [Processing]
22:07:22GnjuracHint: linux [Processing]
22:07:22Gnjuracnakefile.nim(5, 8) Error: cannot open 'godotapigen'
22:08:53*zachk quit (Ping timeout: 244 seconds)
22:08:54*krux02 quit (Remote host closed the connection)
22:10:51FromGitter<timotheecour> @adam-r-kowalski regarding integrating nim-javascript with react/npm, see also: how to integrate existing react components in karax? (and vice versa) - Nim forum (https://forum.nim-lang.org/t/4241#26402)
22:12:42FromGitter<timotheecour> I actually made a bit of progress on that, eg via some code that mixes karax (nim’s version of react) with react packages (obtained via npm) eg google maps, youtube. It kinda works but wondering if there’s a cleaner way
22:18:41AlexMaxwho even has access to the official nim github
22:19:32AlexMaxcuz yeah there's a lot of unclosed issues
22:21:25AlexMaxwish i could be more of a help but i'm a nim dummy mostly
22:23:04Gnjuracthey need to start making some Nim power up shakes so newbs like me and you can help :)
22:23:59FromGitter<iffy> I can use `dumpTree` to dump out stuff... but how can I dumpTree the results of my macros (to figure out what I'm producing?)
22:24:30FromGitter<iffy> even better: is there a way to print out the results of a macro as Nim code?
22:26:32FromGitter<rayman22201> @iffy it's https://nim-lang.org/docs/macros.html#expandMacros.m%2Ctyped
22:26:38FromGitter<rayman22201> expandMacros
22:27:33FromGitter<iffy> perfect; that's what I was looking for
22:27:37FromGitter<iffy> thanks, @rayman22201
22:27:41FromGitter<rayman22201> np
22:37:55*SenasOzys quit (Ping timeout: 246 seconds)
22:44:38FromGitter<zetashift> @timotheecour how are you liking karax? Pros/cons considering you also use react?
22:48:19FromDiscord_<exelotl> hey I'm looking for opinions on a shorthand I'd like to add to my engine
22:48:52FromDiscord_<exelotl> commonly you end up writing something like: proc init(x, y: float32)= self.x = x; self.y = y
22:50:17FromDiscord_<exelotl> the proc init() is being read by a macro so I can transform it in whatever way I want
22:50:24FromDiscord_<exelotl> so I was thinking of something like
22:50:27FromDiscord_<exelotl> proc init(x, y: _)
22:50:32FromDiscord_<exelotl> proc init(x, y: self)
22:50:39FromDiscord_<exelotl> or proc init(x*, y*)
22:52:01FromDiscord_<exelotl> as a way to say 'x and y are fields of self, please assign them for me'
23:00:48FromGitter<iffy> Is there a way to "evaluate" a macro from within another macro? For instance, I have two macros, `mkParser(body:untyped)` and `flag(opt:string)` which I use like this:
23:01:18FromGitter<iffy> ```mkParser: ⏎ flag("-a") ⏎ flag("-b")``` [https://gitter.im/nim-lang/Nim?at=5bbbe1be271506518ddaebad]
23:02:05FromGitter<iffy> I'm iterating over the children of `body` inside `mkParser` and I'd really like to get the results of each flag macro to add to the StmtList I return from `mkParser`
23:04:19FromGitter<iffy> oh, maybe it's already happening like that but the `hint(` debug output it out of order?
23:05:34*darithorn quit ()
23:06:11*darithorn joined #nim
23:06:12*Gnjurac quit (Remote host closed the connection)
23:10:32*stefanos82 joined #nim
23:15:26*darithorn quit ()
23:18:21FromDiscord_<exelotl> iffy: maybe getAst is what you want?
23:38:28*noonien quit (Quit: Connection closed for inactivity)
23:45:54flaviu@timotheecour re. compile-time parsing regexes in nre: not gonna happen. nre uses PCRE as the regex library, and Nim doesn't support compile-time FFI last time I checked
23:46:17flaviubut last time I checked was about a year ago, so idk
23:48:34*cozachk left #nim (#nim)