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:10 | FromGitter | <zacharycarter> time to plug bgfx into the engine :D |
00:36:19 | FromGitter | <zacharycarter> if I haven't already - can't remember |
00:36:25 | FromGitter | <zacharycarter> I also need to finish my css logo for my website tonight |
00:37:58 | FromGitter | <zetashift> @zacharycarter how ironic I was lamenting that Nim only has nimgame2 has full nim only engines :P |
00:38:10 | FromGitter | <zetashift> Is it a total rewrite or are just working from where you leftoff? |
00:38:23 | FromGitter | <zacharycarter> no this is a total re-write focusing a parallelized workflow |
00:38:27 | FromGitter | <zacharycarter> with a job subsystem |
00:38:55 | FromGitter | <kayabaNerve> Good luck |
00:39:00 | FromGitter | <zacharycarter> I basically found - https://github.com/sheosi/tart |
00:39:08 | FromGitter | <zacharycarter> and got it working with 0.19.0 |
00:39:29 | FromGitter | <zacharycarter> it uses lock free / concurrent data structures and atomics to get around Nim's current memory model and default GC |
00:39:37 | FromGitter | <zacharycarter> and actually works :) |
00:39:52 | FromGitter | <zacharycarter> I think when I left off I had the bgfx running with my fork of it |
00:40:09 | FromGitter | <zacharycarter> now it's time to start on an editor - I'm going to build the editor as I build the engine |
00:40:16 | FromGitter | <zacharycarter> so I have something cool to show off |
00:40:37 | FromGitter | <zacharycarter> I need to figure out the status of the nuklear bindings - or whether I should just focus on using imgui |
00:44:17 | FromGitter | <kayabaNerve> Nice |
00:45:27 | FromGitter | <zacharycarter> I have lots of good examples of bgfx projects to look at |
00:45:42 | FromGitter | <zacharycarter> and at this point I'm comfortable enough with BGFX and Nim (I think) to make a full PBR pipeline |
00:45:58 | FromGitter | <zacharycarter> and hopefully deliver unto Nim a decent game engine worth maintaining / contributing to |
00:46:29 | FromGitter | <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:54 | FromGitter | <zacharycarter> and also, for selfish reasons, I want my own game engine |
00:54:47 | FromGitter | <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:50 | FromGitter | <zetashift> your plan sounds like this engine I read about Banshee. Not sure if it's still developed anymore |
00:57:48 | FromGitter | <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:22 | FromGitter | <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:23 | FromGitter | <zetashift> Seems they all wrap up neatly coded libraries into a full editor |
01:03:45 | FromGitter | <zacharycarter> well yeah - they all use a lot of libraries to accomplish what they do |
01:04:03 | FromGitter | <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:19 | FromGitter | <zacharycarter> and I also didn't have a strong handle on writing idiomatic Nim at the time |
01:06:06 | FromGitter | <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:17 | FromGitter | <zacharycarter> I feel like there may have been two issues but only one got addressed? |
01:08:14 | FromGitter | <zacharycarter> err wait - it looks like the issue was just closed without any PR? |
01:08:17 | FromGitter | <zacharycarter> or am I seeing things? |
01:09:13 | FromGitter | <zacharycarter> dafuq? |
01:13:45 | FromGitter | <zacharycarter> welp - I dunno... going to spend my time on other things for a while I think |
01:18:12 | FromGitter | <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:08 | FromGitter | <alehander42> mate, it's 3 am in europe |
02:07:21 | FromGitter | <zacharycarter> sorry - no i wasn't mad at you |
02:08:02 | FromGitter | <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:53 | FromGitter | <alehander42> no problem, i am just coming back from a flight :D |
02:09:01 | FromGitter | <zacharycarter> ah - hope your travels went well |
02:09:09 | FromGitter | <alehander42> i am just saying a lot of people here are from europe, so they're probably not online |
02:09:11 | FromGitter | <zacharycarter> and hope you didn't have any long delays - those are the worst |
02:09:31 | FromGitter | <alehander42> oh i had >2 hours, but it was my first delay ever, so it was fun |
02:09:37 | FromGitter | <zacharycarter> ugh haha |
02:10:05 | FromGitter | <zacharycarter> yeah - it's usually just those of us in the US and Asia on at these hours |
02:10:27 | FromGitter | <zacharycarter> anyways - glad you got home safe |
02:10:28 | FromGitter | <alehander42> they moved 200 people between several gates, it was magnificient |
02:10:37 | FromGitter | <zacharycarter> hahaha - gotta love that |
02:10:54 | FromGitter | <alehander42> the wonders of lowcost airlines in europe |
02:11:07 | FromGitter | <zacharycarter> :) |
02:11:12 | FromGitter | <alehander42> (honestly, i think it was airport's problem this time, but i couldn't resist a dig :D ) |
02:11:15 | FromGitter | <alehander42> ok, night |
02:11:37 | FromGitter | <zacharycarter> night! |
02:12:12 | * | btbytes quit (Quit: Leaving.) |
02:20:50 | * | banc joined #nim |
02:46:41 | FromGitter | <gogolxdong> How to invoke #ifdef __cplusplus in c from Nim? |
02:48:21 | FromGitter | <kayabaNerve> Compile using the C++ backend |
02:48:45 | FromGitter | <kayabaNerve> Or compile the file using G++ and link the object file. |
02:51:25 | FromGitter | <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:43 | FromGitter | <gogolxdong> it won't work on Windows I'm afraid. |
02:52:28 | FromGitter | <kayabaNerve> G++ runs on Windows via Mingw and TDM. |
02:53:07 | FromGitter | <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:59 | FromGitter | <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:17 | FromGitter | <adam-r-kowalski> For the nim javascript backend, whats the recommended way to consume packages from nom? |
04:21:23 | leorize | you mean npm packages? |
04:25:18 | FromGitter | <gogolxdong> How to convert decimal to binary? |
04:31:41 | FromGitter | <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:25 | FromGitter | <krux02> @gogolxdong parseFloat |
06:50:46 | FromGitter | <krux02> @seruum better don't use it. |
06:51:10 | FromGitter | <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:16 | krux02 | somebody awake? |
08:12:58 | * | banc quit (Ping timeout: 245 seconds) |
08:13:04 | floppydh | Í'm awake |
08:13:10 | floppydh | does that count too? |
08:19:28 | krux02 | yea it does |
08:21:33 | * | banc joined #nim |
08:26:00 | krux02 | is somebody there with a computer from a company named by a fruit? |
08:28:09 | FromGitter | <survivorm> why so obscure& :D |
08:28:27 | floppydh | krux02: I have one standing next to me yes |
08:28:34 | floppydh | but I don't use it much |
08:30:15 | krux02 | I need to run a test on it |
08:30:18 | krux02 | I don't have one |
08:30:24 | krux02 | it just a few lines |
08:33:49 | krux02 | import nativesockets; echo sizeof(Sockaddr_in) |
08:36:24 | FromGitter | <dm1try> 16 |
08:39:55 | krux02 | ok, thank you |
08:59:34 | * | leorize quit (Quit: WeeChat 2.2) |
09:51:06 | krux02 | yay, finally the tests run through, sizeof implemented in the compiler: https://github.com/nim-lang/Nim/pull/5664 |
09:58:53 | FromGitter | <mratsim> woooooooooowwww |
09:58:57 | FromGitter | <mratsim> best news of the month |
10:02:34 | FromGitter | <andreaferretti> 👍 |
10:03:00 | FromGitter | <andreaferretti> Hi all, I am having a little issue using AsyncStreams |
10:04:09 | FromGitter | <andreaferretti> What is a way to return an AsyncStream right away, making sure to send data to it after a while? |
10:04:23 | FromGitter | <andreaferretti> Say I have `var fs = newAsyncStreamstring ()` |
10:04:50 | FromGitter | <andreaferretti> and I need to send data to it, like `await fs.write("hi there")` |
10:05:14 | FromGitter | <andreaferretti> at the same time, I need to return fs now |
10:05:30 | FromGitter | <andreaferretti> I tried the obvious |
10:06:54 | FromGitter | <andreaferretti> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbb2c3d271506518dd5472b] |
10:07:22 | FromGitter | <andreaferretti> I guess this is supposed to return now and send data to fs later |
10:07:51 | FromGitter | <andreaferretti> but if I tried to `read()` from the returned fs, I never see any data coming |
10:09:34 | FromGitter | <andreaferretti> I guess I am using AsyncStreams wrong, but the API is so confusing |
10:10:34 | FromGitter | <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:31 | FromGitter | <krux02> @andreaferretti can you post an example that compiles? |
10:12:02 | FromGitter | <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:01 | alexnask | Hey, 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:10 | alexnask | do 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:56 | FromGitter | <andreaferretti> @krux02 the issue is that this happens in Rosencrantz, so it might take a while to extract a (non) working example |
10:16:13 | FromGitter | <andreaferretti> I was just checking I am not doing anything plainly wrong |
10:16:31 | alexnask | I don't really see how that is the case, does anyone have any idea? |
10:16:54 | alexnask | Btw, 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:49 | krux02 | ooc? |
10:18:42 | alexnask | https://ooc-lang.org/ |
10:18:50 | FromGitter | <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:18 | alexnask | Do IRC messages also get posted on gitter and discord btw, or is it just the opposite? |
10:19:28 | FromGitter | <andreaferretti> Dunno, I find the actor pattern very clear when doing asynchronous stuff |
10:20:26 | krux02 | yea, but it is so overengineered. |
10:21:05 | krux02 | so many actors, then it kills the type system, because actors just send messages as objects |
10:21:40 | shashlick | alexnask: yes they are bridges |
10:21:58 | alexnask | @shashlick cheers, thanks |
10:22:15 | krux02 | a 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:31 | krux02 | but anyway, I am not here to judge |
10:23:44 | krux02 | alexnask, I never heared of ooc, what is its feature that initiated the project? |
10:24:51 | alexnask | It 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:10 | FromGitter | <bung87> looks like scala ruby combination... |
10:25:13 | alexnask | I didn't start it, I just hacked on it for fun |
10:28:37 | FromGitter | <krux02> @mratsim since when can you implement the body of a generic with a macro? |
10:28:48 | FromGitter | <krux02> last time I tried it, it didn't work. |
10:31:05 | FromGitter | <andreaferretti> @krux02 sorry, it turns out it was a mistake on my part |
10:31:21 | FromGitter | <andreaferretti> I misinterpreted the return value of `fs.read()` |
10:31:37 | FromGitter | <andreaferretti> I thought the boolean meant the future is completed |
10:31:44 | FromGitter | <andreaferretti> it's the other way round |
10:43:38 | * | leorize joined #nim |
10:45:30 | FromGitter | <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:50 | FromGitter | <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:39 | PMunch | zacharycarter, 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:31 | FromGitter | <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:04 | PMunch | Are you moving on from Nim? Or just trying to see what's out there? |
10:57:05 | FromGitter | <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:11 | FromGitter | <zacharycarter> moving on from Nim atm |
10:57:17 | PMunch | :( |
10:57:22 | FromGitter | <zacharycarter> I mean I guess if you call going back to C/C++ moving on heh |
10:57:31 | PMunch | Haha |
10:57:46 | PMunch | Yeah I'd say that was moving backwards |
10:58:04 | FromGitter | <zacharycarter> in a way it feels like it - in others it doesn't |
10:58:08 | PMunch | Any particular reason? |
10:58:43 | FromGitter | <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:57 | PMunch | Hmm, interesting |
10:59:13 | FromGitter | <mratsim> @krux02 since March, probably this PR: https://github.com/nim-lang/Nim/pull/7333 |
10:59:25 | PMunch | What is it about the memory model you don't like? |
10:59:27 | FromGitter | <zacharycarter> Nim doesn't have enough documentation about all the new features that are supposed to help alleviate a lot of this |
10:59:45 | PMunch | Yeah, Nim is lacking a bit in the documentation department |
10:59:57 | PMunch | Actually one of the things I thought about improving for October |
10:59:57 | FromGitter | <zacharycarter> thread local heap gc makes sharing memory b/w threads problematic - and there aren't great work arounds besides channels |
11:00:16 | FromGitter | <zacharycarter> which are slow or are going to require you to manually manage a shared heap anyway |
11:00:23 | FromGitter | <zacharycarter> if you want to work around their inefficiencies |
11:00:37 | FromGitter | <zacharycarter> or I guess inherit flaws is a better way of terming that |
11:00:52 | FromGitter | <mratsim> How is moving to C/C++ a solution? |
11:00:56 | FromGitter | <zacharycarter> too often I say - I want to do XY or Z with Nim |
11:01:15 | FromGitter | <zacharycarter> well - I'll be able to rely on more learning resources and more code |
11:01:16 | PMunch | Yeah the multithreading memory model is a bit confusing. It's so different from how it normally works |
11:01:36 | FromGitter | <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:49 | FromGitter | <mratsim> fI wanted to write a data parallel/task parallel lib yesterday to abstract away the multithreading inside arraymancer |
11:01:52 | FromGitter | <zacharycarter> I'm not saying it's an answer or a solution - I dont' know if it will be |
11:01:59 | FromGitter | <mratsim> unny I wanted* |
11:02:10 | FromGitter | <mratsim> funny, I think my keyboard is broken |
11:02:36 | PMunch | Broken keyboards are the worst.. |
11:02:48 | FromGitter | <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:50 | FromGitter | <zacharycarter> unfortunately |
11:03:13 | PMunch | I 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:14 | FromGitter | <zacharycarter> so that's what I'm going to focus on - since I want to head that direction with my career anyway |
11:03:15 | FromGitter | <krux02> That is great, I remember that I needed exactly this, and it didn't work, now it does, that is great. |
11:03:46 | FromGitter | <zacharycarter> sounds like the new macbook pro keyboards |
11:04:25 | FromGitter | <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:32 | PMunch | zacharycarter, 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:57 | FromGitter | <zacharycarter> @krux02 yeah - it's a double edged sword |
11:05:04 | FromGitter | <mratsim> I think the upcoming destructors will be super helpful, and you can already use allocShared |
11:05:21 | PMunch | Yeah, those could really help with this |
11:05:30 | FromGitter | <mratsim> but from a job PoV, yeah C/C++is of course much safer |
11:05:31 | FromGitter | <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:46 | FromGitter | <zacharycarter> also - I spent a few weeks bringing a dead project to life |
11:05:49 | PMunch | I guess you could theoretically have a shared object kind of thing and use destructors to managed when to delete them |
11:05:50 | FromGitter | <mratsim> you can use them already, without special pragmas |
11:06:04 | FromGitter | <zacharycarter> and found an issue - and then the issue was closed w/o any explanation - and now the project is dead again |
11:06:08 | FromGitter | <mratsim> allocate your object with allocShared |
11:06:17 | FromGitter | <zacharycarter> so it's little things like this - which make me want a more stable path forward |
11:06:28 | PMunch | Speaking 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:34 | FromGitter | <zacharycarter> congrats! |
11:06:39 | FromGitter | <krux02> I want a stable path as well. |
11:06:49 | FromGitter | <mratsim> congrats! I wasn’t even aware you were joining :P |
11:07:08 | FromGitter | <zacharycarter> but until that stable path is found - I need to focus elsewhere I think |
11:07:28 | FromGitter | <mratsim> I’m pretty sure the team at nimTorch is looking for experienced C++ and Nim devs |
11:07:40 | FromGitter | <zacharycarter> it's a tearing decision - I want to keep working with / on Nim - but not till it's a smoother experience |
11:08:28 | PMunch | zacharycarter, 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:50 | krux02 | well, I would say any experienced c++ developer is easily trained to become a Nim dev, and maybe vice versa. |
11:08:53 | PMunch | I've thought about setting up a build server to check all my projects against new versions |
11:09:59 | krux02 | going 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:23 | krux02 | s/who/whohoo/ |
11:11:04 | PMunch | krux02, 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:21 | krux02 | zacharycarter[m], what is in your opinion the most important issue that should be fixed, better sooner than later? |
11:12:15 | krux02 | PMunch I would say it takes you 10 years of experience to become a good c++ developer. |
11:12:18 | FromGitter | <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:19 | FromGitter | <zacharycarter> for instance |
11:12:37 | FromGitter | <zacharycarter> I'll say - I want to make a job system with Nim - something that doesn't block and I can parallelize |
11:12:48 | FromGitter | <zacharycarter> and I'll get told to look into a number of different things - most likely closure iterators |
11:13:08 | FromGitter | <zacharycarter> and then there are absolutely zero examples of doing anything beyond the basics with this construct |
11:13:23 | FromGitter | <zacharycarter> it definitely doesn't tell me how I might go about using them to accomplish such a task |
11:13:48 | FromGitter | <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:18 | FromGitter | <zacharycarter> often times Nim is cranking out new features designs that half the community isn't aware of |
11:14:23 | Araq | the manual itself shows how to build a tasking system with these |
11:14:25 | FromGitter | <zacharycarter> and then when they're mentioned - only one or two people know how they work |
11:14:36 | FromGitter | <zacharycarter> well - I'm not going to get into that |
11:14:54 | FromGitter | <zacharycarter> yes it does -but we'd be aruing semantics if I did |
11:15:04 | FromGitter | <zacharycarter> if it* |
11:15:25 | Araq | ok, you want to continue to rant, got it |
11:15:34 | krux02 | Araq: I asked |
11:15:38 | PMunch | Araq, he's got a point though.. |
11:15:40 | FromGitter | <zacharycarter> no - I wasn't ranting - I was answering a question |
11:15:46 | FromGitter | <zacharycarter> I'm done now - Im going to go to work |
11:16:03 | krux02 | ok, bye |
11:16:22 | Araq | nothing wrong with ranting but some honesty is always nice |
11:16:34 | Araq | but I probably read too few of this conversation, sorry |
11:16:39 | Araq | *too little |
11:16:53 | FromGitter | <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:00 | FromGitter | <zacharycarter> I'm saying there's a knowledge gap b/w you and I |
11:17:04 | PMunch | The 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:05 | FromGitter | <zacharycarter> and I can't fix that by reading a 25 line example |
11:17:25 | FromGitter | <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:30 | FromGitter | <zacharycarter> I don't have that wisdom / knowledge |
11:17:40 | PMunch | Happens less and less, either because I'm getting better or because the documentation improves. But I still remember the scenario zacharycarter outlines |
11:17:46 | FromGitter | <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:54 | FromGitter | <zacharycarter> anyway, sorry - off to work |
11:18:03 | PMunch | Bye |
11:18:43 | Araq | what is 'async' if not a non-blocking tasking system? |
11:19:12 | PMunch | That was just an example, the experience is still the same for other things |
11:20:26 | Araq | like#ß |
11:20:28 | Araq | ? |
11:20:37 | PMunch | ? |
11:20:49 | krux02 | when 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:13 | Araq | yeah ok, I read that 5 days ago, "async docs bad" |
11:21:16 | Araq | what else? |
11:21:43 | Araq | (at least it's covered by dom96's book though) |
11:22:28 | krux02 | I think most importantly the asyc module needs examples. |
11:22:41 | * | enthus1ast joined #nim |
11:23:37 | enthus1ast | for me its macros |
11:24:10 | krux02 | Araq: I think I can write a bit of documentation about the macro system |
11:24:27 | krux02 | I think in the documentation is still the distinction between stmt and expr macros. |
11:24:51 | enthus1ast | i find it hard to get information out of macros how to "really use it" |
11:25:27 | krux02 | enthus1ast, what do you think would help to to understand macros? |
11:25:52 | krux02 | more real world examples, or better explanation of how they work internally? |
11:26:06 | enthus1ast | maybe some example pre/after construction, how to debug them |
11:26:37 | elrood | it 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:05 | elrood | collecting that info from reddit/hn posts and chats is kinda ineffective |
11:27:24 | enthus1ast | what i found always usefull is a q/a site |
11:27:26 | krux02 | well most people that I asked dismiss it, because it is not c++. |
11:27:34 | Araq | we also make regular surveys |
11:27:49 | enthus1ast | well most c coders have a fear of abstraction, as it seems |
11:28:03 | krux02 | Araq: but with those surveys you only reach people who are already using Nim, you don't reach the people who refused Nim. |
11:28:06 | FromGitter | <alehander42> I think showing real-world macros with good explanations of their code would be best |
11:28:20 | FromGitter | <alehander42> something like literate programming examples maybe |
11:28:36 | krux02 | enthus1ast, I don't think so, I have seen quite some interesting C macro magic. |
11:30:03 | elrood | most c coders are wary of the costs of abstractions. that's not exactly fear |
11:30:22 | enthus1ast | i found it funny cause it IS abstraction |
11:30:26 | enthus1ast | IT |
11:30:38 | FromGitter | <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:47 | FromGitter | <alehander42> I can't find it tho |
11:30:58 | enthus1ast | go's tutorial? |
11:31:41 | Araq | krux02: ok, do it |
11:31:42 | FromGitter | <alehander42> no, this is covered by PMunch's tour nim idea |
11:31:50 | PMunch | Hmm yeah |
11:32:06 | FromGitter | <alehander42> my idea was for more complete examples e.g. 100-200 lines taken out of existing projects |
11:32:06 | PMunch | Only thing missing there really is to write the content |
11:32:12 | PMunch | I have the whole system ready to go |
11:32:18 | FromGitter | <alehander42> btw congrats for Status |
11:32:29 | PMunch | Thanks :) |
11:34:09 | krux02 | Araq: I revisited the sizeof/alignof implementation, now the tests are passing. |
11:35:07 | krux02 | I want it merged, the sooner the better. Fixing merge conflics is really horrible by now. |
11:35:28 | Araq | can't. I'm writing an email to Alan Guth because his theory of inflation is missing good examples and docs |
11:36:06 | krux02 | what theory of inflation? |
11:36:30 | krux02 | does it have something to do with high memory consumption of pointer heavy data types? |
11:37:09 | Araq | lol |
11:37:34 | krux02 | sorry |
11:37:40 | krux02 | just looked up his name |
11:38:22 | krux02 | I stop saying anything now |
11:39:13 | FromGitter | <alehander42> please don't invent your own standard model |
11:39:52 | elrood | from fragmentation of programming languages to fragmentation of standard models? ;) |
11:42:38 | enthus1ast | ah 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:47 | PMunch | Hmm, I really should give genui a second go.. |
11:47:26 | enthus1ast | PMunch yesterday i've tried genui but it gave me an compile error (think nil checks) |
11:47:50 | enthus1ast | would be very cool to build guis for native and browser! |
11:48:25 | PMunch | Did you try one of the genui flavourcs or the pure genui thing |
11:48:34 | enthus1ast | just pulled your repo |
11:48:43 | PMunch | Which one? |
11:49:08 | enthus1ast | https://github.com/PMunch/genui |
11:49:15 | FromGitter | <zetashift> Seems the ui libs are being updated these days, nuklear and now genui!? |
11:50:00 | enthus1ast | zetashift, have a look at libagar its really powerfull (and small) lib |
11:50:46 | enthus1ast | when you trie to build libagar (at least on archlinux) use the develop branch |
11:52:58 | PMunch | enthus1ast, right. Yeah that one is still very much alpha grade |
11:53:14 | PMunch | If I start work on it again it'll be a complete rewrite |
11:53:49 | PMunch | I think the idea is good, but doing all I wanted during compile-time proved to be surprisingly hard |
11:54:34 | PMunch | But 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:52 | enthus1ast | it surprising how "hard" it is to display tables in an ui... my nigui tables patch are rotting around... |
11:58:11 | Araq | genui and nigui lack examples and documentation. See how precious my remarks are, you need to be thankful ;-) |
11:58:56 | PMunch | genui isn't fit for use though.. |
11:59:19 | Araq | Also your docs lack a Japanese translation. I'm not a troll, it's all constructive criticism. |
11:59:29 | enthus1ast | another 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:36 | Araq | I just told Jen-Hsun Huang his graphic cards still require too much power, I'm smart |
12:01:44 | Araq | ok, enough of this |
12:07:25 | enthus1ast | Araq, the docs aren't "that" bad, but if your coding behavior does not include reading code then you often miss informations |
12:09:40 | livcd | I am lost in what gui lib should I use. I will probably use electron then! |
12:10:07 | enthus1ast | maybe webview could help |
12:10:14 | PMunch | livcd what are the requirements for you project? |
12:12:18 | FromDiscord_ | <PusiteGA> electron == suicide |
12:13:52 | FromGitter | <zetashift> electron ain't bad...it ain't great either |
12:15:40 | livcd | PMunch: look nice on Mac/Windows. basic controls |
12:16:08 | PMunch | wxWidgets? |
12:16:51 | PMunch | Native toolkits are used behind the scenes |
12:16:55 | PMunch | So little bloat |
12:27:02 | * | fvs quit (Remote host closed the connection) |
12:31:43 | enthus1ast | alehander42, 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:23 | enthus1ast | website i mean |
12:33:48 | enthus1ast | maybe even in the spirit of "python module of the week" |
12:35:45 | PMunch | Hmm, I'm not sure if I understand how that would work |
12:37:10 | enthus1ast | the 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:04 | enthus1ast | the 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:17 | federico3 | enthus1ast: like this? https://github.com/nim-lang/website/tree/master/jekyll/_posts |
12:39:36 | enthus1ast | :D |
12:41:41 | enthus1ast | yeah but this is so "official" |
12:41:57 | federico3 | then https://planet.nim-lang.org/ |
12:42:43 | enthus1ast | ah nice |
12:51:59 | * | endragor quit (Remote host closed the connection) |
12:56:49 | FromGitter | <zacharycarter> sorry - I wasn't looking for an async task queueing system |
12:56:53 | FromGitter | <zacharycarter> I'm looking for a parallelized job system |
12:56:57 | FromDiscord_ | <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:24 | FromGitter | <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:34 | FromGitter | <zacharycarter> Araq ^ |
12:59:00 | FromGitter | <zacharycarter> I haven't had issues with the async dispatch module - at least using it anyway |
12:59:09 | FromGitter | <zacharycarter> I wasn't intending to complain or start a fire about that |
12:59:16 | FromGitter | <zacharycarter> my departure time for work probably wasn't ideal |
13:03:31 | Araq | malkomalko, and that is highly appreciated, but the complaints are better when they are precise |
13:03:56 | Araq | "docs are bad, fix them" is not that useful |
13:04:08 | FromGitter | <zacharycarter> I didn't say that |
13:04:14 | FromGitter | <zacharycarter> and I wasn't complaining - I was asked a question |
13:04:18 | Araq | and zacharycarter, I didn't mean to put words into your mouth |
13:04:35 | FromGitter | <zacharycarter> and I was giving my opinion - informed or not |
13:04:51 | FromGitter | <zacharycarter> ¯\_(ツ)_/¯ |
13:09:02 | * | narimiran joined #nim |
13:12:31 | * | Vladar quit (Remote host closed the connection) |
13:14:46 | FromGitter | <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:50 | FromGitter | <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:14 | FromGitter | <mratsim> it’s to get more victims for his destructors =) |
13:17:52 | FromGitter | <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:02 | Araq | yes, we want the popularity of Nim to grow. No, we don't want to replace indentation by braces. :-) |
13:18:08 | FromGitter | <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:16 | FromGitter | <malkomalko> > The purpose of the destructor is to free the resources that the object may have acquired during its lifetime. |
13:18:22 | FromGitter | <zacharycarter> I spend most of my time - when talking about programming - talking about Nim |
13:18:38 | FromGitter | <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:48 | FromGitter | <zacharycarter> I can go readily find tutorials and guides and examples of how to do things in C/C++ |
13:18:52 | FromGitter | <zacharycarter> the can't always be said about Nim |
13:19:30 | FromGitter | <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:39 | FromGitter | <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:47 | FromGitter | <zacharycarter> and yes there's all sorts of shit mixed up in there - pride, ego, being afraid to ask questions etc |
13:20:02 | FromGitter | <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:05 | FromGitter | <zacharycarter> that's all I was trying to say really |
13:20:20 | FromGitter | <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:21 | FromGitter | <zacharycarter> I could be wrong |
13:20:28 | FromGitter | <Bennyelg> @zacharycarter I agree. |
13:20:38 | FromGitter | <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:45 | FromGitter | <zacharycarter> yes |
13:20:48 | FromGitter | <zacharycarter> it's not a Nim problem per se |
13:21:07 | FromGitter | <zacharycarter> and I don't have a ready answer as to how to solve it or make it better |
13:21:12 | FromGitter | <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:33 | FromGitter | <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:45 | FromGitter | <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:46 | livcd | PMunch: checking. |
13:21:57 | FromGitter | <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:22 | narimiran | PMunch: congrats on your new job!! (i just joined and have seen that in the history) |
13:22:50 | FromGitter | <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:58 | FromGitter | <zacharycarter> it's those edge cases |
13:23:08 | livcd | PMunch: i did not find a single good looking application :D |
13:23:17 | FromGitter | <zacharycarter> mostly when talking about threading and working with the default GC |
13:24:01 | FromGitter | <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:35 | FromGitter | <zacharycarter> I'm not sure |
13:24:56 | FromGitter | <zacharycarter> probably not |
13:26:19 | FromGitter | <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:54 | FromGitter | <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:37 | PMunch | livcd, you didn't find any good looking wxWidgets apps? |
13:32:57 | PMunch | Oh, and thanks :) |
13:33:12 | * | floppydh quit (Quit: WeeChat 2.2) |
13:33:13 | FromGitter | <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:25 | FromGitter | <malkomalko> Ok, time to start work, bbiab |
13:41:21 | * | abm joined #nim |
13:42:04 | livcd | PMunch: yes i did not |
13:52:11 | PMunch | Hmm, depends on your preferences of course. But I like my applications looking native |
13:52:19 | PMunch | And that's what wxWidgets gives you |
13:53:02 | * | seni joined #nim |
13:53:09 | enthus1ast | wxWidgets for nim? |
13:54:29 | PMunch | Yeah, that's been working for a long time |
13:54:56 | PMunch | Even has my genui macro implemented for it :) |
13:55:14 | FromGitter | <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:43 | enthus1ast | https://github.com/Araq/wxnim/ ? |
13:56:02 | PMunch | https://github.com/PMunch/wxnim/ |
13:56:06 | PMunch | Updated version |
13:56:18 | PMunch | I fix issues as I'm made aware of them |
13:56:28 | enthus1ast | ah 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:35 | FromGitter | <seruum> Could someone point me to a reference on how to use {.experimental: "notnil"}? |
14:21:58 | narimiran | @seruum what would you like to to with that? |
14:23:03 | FromGitter | <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:41 | narimiran | this is because of nil strings and seqs? |
14:23:56 | PMunch | seruum, just compile with --nilseqs:on |
14:24:11 | narimiran | if it is, then what PMunch just said |
14:24:30 | FromGitter | <seruum> The library has 10 or so values with not nil in it. |
14:24:50 | FromGitter | <seruum> I tried --nilseqs:on in a nims file to no avail. |
14:25:09 | narimiran | btw, 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:28 | FromGitter | <mratsim> just tag @flyx ;) |
14:36:02 | FromGitter | <mratsim> oh it’s there: https://github.com/flyx/NimYAML/pull/64 |
14:37:34 | * | vivus joined #nim |
14:38:23 | vivus | Hi all |
14:38:47 | FromDiscord_ | <treeform> Hi |
14:40:39 | * | kapil____ quit (Quit: Connection closed for inactivity) |
14:41:29 | vivus | I 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:35 | enthus1ast | vivus getAppDir() / "test.yaml" maybe |
14:42:51 | enthus1ast | from the os module |
14:42:53 | vivus | when I do `/home/path/to/test.yaml` it works. |
14:43:36 | vivus | enthus1ast: does getAppDir() do a search each time for test.yaml? |
14:43:55 | enthus1ast | no it returns the directory where your executable is located |
14:44:22 | enthus1ast | or maybe i misunderstand |
14:44:41 | vivus | enthus1ast: I know where the test.yaml is, the issue is that: ~/.myapp/ is not recognized in Nim for some reason |
14:45:49 | enthus1ast | getHomeDir() from ospaths then |
14:46:08 | FromGitter | <mratsim> *cough* windows *cough* |
14:47:16 | narimiran | vivus: i guess nim does not expand `~` to `/home/vivus` |
14:47:45 | FromGitter | <kaushalmodi> narimiran: Nim not understanding `~` has been bugging me for a while |
14:47:57 | enthus1ast | getHomeDir() / ".myapp/test.yaml" |
14:48:07 | FromGitter | <kaushalmodi> vivus: If there isn't an issue for this already, do you want to open one? |
14:48:33 | vivus | @kaushalmodi I dont want araq to shout me if I do :D |
14:49:00 | narimiran | but why *should* nim understand `~`? isn't this something that is related to your shell, and not something general? |
14:50:03 | vivus | narimiran: it should be part of whichever OS lib handles path navigation. im pretty sure python and other languages support this |
14:50:04 | FromGitter | <kaushalmodi> vivus: "Fear of being shouted is directed related to lack of progress." - *Confucius* |
14:50:42 | FromGitter | <kaushalmodi> narimaran: I dwell in terminal (non GUI) apps most of the time |
14:50:54 | FromGitter | <kaushalmodi> Nim is the only place where `~` did not get interpreted |
14:50:59 | vivus | @kaushalmodi well at least its not Linus calling us "effing idiots" XD |
14:53:07 | FromGitter | <kaushalmodi> unrelated: `sequtils.filterIt` is awesome! |
14:53:36 | narimiran | @kaushalmodi anything specific, or it is just you discovering it? :) |
14:54:52 | FromGitter | <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:11 | leorize | there's `expandTilde` in `os` for people who would like to use `~` |
14:55:46 | FromGitter | <kaushalmodi> leorize: noted. thanks! |
14:55:58 | leorize | !eval import os; echo expandTilde("~" / "path") |
14:56:02 | NimBot | /root/path |
14:56:21 | leorize | that's rather surprising :P |
14:56:43 | FromGitter | <kaushalmodi> oh well .. |
14:57:16 | leorize | serum: Try `--experimental:notnil` |
14:57:28 | FromGitter | <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:28 | leorize | seruum: ^ |
14:57:53 | vivus | I just went with getHomeDir() |
14:58:25 | narimiran | @kaushalmodi why are you having spaces on both sides of `:`? :'( |
14:58:46 | FromGitter | <kaushalmodi> I use it only for table elements |
14:58:53 | FromGitter | <kaushalmodi> I thought that was the convention? |
14:59:19 | FromGitter | <kaushalmodi> everywhere else.. like `proc foo(a: string) =`, there's space only on the right |
14:59:36 | narimiran | you have it on the line 87-91 too |
14:59:59 | FromGitter | <kaushalmodi> that's the same context |
15:00:07 | FromGitter | <kaushalmodi> those lines don't have `var: TYPE` |
15:00:46 | FromGitter | <kaushalmodi> I was reserving "no space on left of colon" only for `VAR: TYPE` |
15:00:59 | narimiran | you said that was the convention? i've never seen it before |
15:01:01 | leorize | !eval import os; echo existsFile "/proc/sysrq-trigger" |
15:01:19 | NimBot | true |
15:01:36 | leorize | so NimBot is running as root, on a kernel with sysrq on... |
15:02:58 | FromGitter | <kaushalmodi> narimiran: .. and I don't have any notes on my statement |
15:03:03 | FromGitter | <kaushalmodi> .. may be I made my own convention? |
15:03:10 | narimiran | :D |
15:03:31 | narimiran | well i've seen code `using :this`! |
15:03:45 | narimiran | so i guess it is up to the author :P |
15:04:22 | FromGitter | <kaushalmodi> I'll make it consistent.. change to `foo: bar`. Thanks! |
15:04:32 | FromGitter | <kaushalmodi> I'm open for more comments |
15:05:35 | leorize | shouldn't a const array work here? https://github.com/OrgTangle/ntangle/blob/master/src/ntangle.nim#L97 |
15:05:40 | narimiran | sorry 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:40 | FromGitter | <kaushalmodi> leorize: it should! thanks |
15:06:44 | leorize | kaushalmodi: also, why did you create a `perm` variable when `result` can be used? |
15:06:46 | FromGitter | <kaushalmodi> narimiran: no problem |
15:07:47 | FromGitter | <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:58 | leorize | nitpicking https://github.com/OrgTangle/ntangle/blob/master/src/ntangle.nim#L285 |
15:09:10 | FromGitter | <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:54 | narimiran | @kaushalmodi and on the bottom of the page, the correct way is used :) |
15:09:58 | FromGitter | <kaushalmodi> leorize: yeah.. could have use an `or` there.. but left it like that as those 2 conditions aren't related |
15:10:05 | leorize | I found some of your `let` statements can be one-liner https://github.com/OrgTangle/ntangle/blob/e79e1033788c8896f1cb1380e8627700d30d98cd/src/ntangle.nim#L308 |
15:10:26 | FromGitter | <kaushalmodi> leorize: using my consistency card for those :) |
15:10:39 | leorize | kaushalmodi: I was nitpicking the space before the colon lol |
15:11:03 | FromGitter | <kaushalmodi> leorize: ah, thanks! yeah, I need to fix that |
15:16:01 | * | platoff joined #nim |
15:17:04 | FromGitter | <kaushalmodi> leorize, narimiran: fixed as per your suggestions in latest ntangle commit |
15:18:47 | leorize | https://github.com/OrgTangle/ntangle/blob/0ed9001d2c5bd291c1220e55b81fe1416ab2b332/src/ntangle.nim#L97 |
15:18:55 | leorize | I was expecting you to change this to `const`... |
15:19:38 | leorize | hmm it might not work with const |
15:19:40 | leorize | nvm |
15:19:57 | FromGitter | <kaushalmodi> yeah.. wasn't sure if const can work inside that proc |
15:20:02 | FromGitter | <kaushalmodi> had not tried that to be honest |
15:20:19 | narimiran | well, const can be put outside of the proc |
15:20:29 | leorize | const can be inside proc |
15:20:41 | leorize | but that was accessing the array in runtime |
15:20:42 | vivus | leorize: better start mining cryptoz on nimbot |
15:20:47 | FromGitter | <kaushalmodi> const works |
15:20:50 | leorize | so I don't think it would work |
15:20:56 | leorize | it actually works? cool |
15:21:01 | FromGitter | <kaushalmodi> nope, it works |
15:21:06 | FromGitter | <kaushalmodi> thanks |
15:21:07 | leorize | also there's https://nim-lang.org/docs/system.html#incl%2Cset%5BT%5D%2CT |
15:21:27 | FromGitter | <kaushalmodi> .. because those const symbols are not changing based on when that proc is called |
15:21:34 | FromGitter | <kaushalmodi> the values are just enums |
15:21:52 | * | tay_ joined #nim |
15:22:04 | * | tay_ quit (Client Quit) |
15:22:08 | FromGitter | <kaushalmodi> yeah, `incl` looks better |
15:23:37 | leorize | vivus: check if it has ssh enabled. we can backdoor it then install some cryptoz :))) |
15:24:49 | enthus1ast | come on guys create not destroy ;) |
15:25:08 | vivus | we're creating coinz here :D |
15:25:19 | enthus1ast | no it creates hot air |
15:25:25 | vivus | free dogecoins for all |
15:26:02 | leorize | I think NimBot have some sort of isolation container thing already |
15:26:47 | vivus | check the PID, most likely running in Docker container |
15:26:50 | FromGitter | <Bennyelg> https://vimeo.com/292931307 |
15:27:01 | leorize | or you can just writeFile("/proc/sysrq-trigger", "o") |
15:27:06 | leorize | and see if it crashes :P |
15:27:54 | vivus | leorize: I dont think dom96 will like you very much if you do that haha |
15:28:44 | leorize | !eval import posix; echo getpid() |
15:28:47 | NimBot | 25 |
15:29:17 | leorize | most likely a container |
15:29:23 | * | PMunch quit (Quit: Leaving) |
15:30:05 | enthus1ast | if you like to hack build byte range send file for asynchttp that i can use it .) |
15:32:14 | * | zurs joined #nim |
15:39:44 | FromGitter | <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:01 | leorize | I don't think anyone has tried that |
15:41:11 | enthus1ast | what is the concrete issue adam-r-kowalski? |
15:41:22 | leorize | but the jsffi module is rather handy when wrapping javascript stuff |
15:43:15 | FromGitter | <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:15 | FromGitter | ... load dependancies as you visit various part of your web app, and hot load modules as they change |
15:44:20 | FromGitter | <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:45 | FromGitter | <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:45 | enthus1ast | i've only rudimentary knowlege of nim's js backend but be aware that you can always emit plain js |
15:48:35 | FromGitter | <mratsim> The ill-named `importcpp` is also your friend for JS interop :P |
15:48:48 | enthus1ast | i miss a exportcpp for js |
15:48:56 | * | noonien joined #nim |
15:49:12 | FromGitter | <vinodvinu> How to use SetWindowLongPtrW in nim ? |
15:49:25 | FromGitter | <vinodvinu> The third parameter is tricking me |
15:49:26 | FromGitter | <adam-r-kowalski> @mratsim actually I have another question for you, would arraymancer be able to compile down to webassembly? |
15:49:33 | FromGitter | <mratsim> yup |
15:49:50 | FromGitter | <adam-r-kowalski> Would the opencl calls turn into webgl? |
15:49:55 | FromGitter | <mratsim> not sure about the BLAS though |
15:50:06 | FromGitter | <mratsim> no OpenCL and Cuda would not work out of the box |
15:50:16 | FromGitter | <adam-r-kowalski> So it would be cpu accelerated for now? |
15:50:18 | FromGitter | <mratsim> I would need to bind something like cpu.js |
15:50:20 | FromGitter | <mratsim> gpu* |
15:50:24 | FromGitter | <vinodvinu> If i put wndProc function name as it is, then compiler says that it expects a LONG_PTR |
15:50:45 | enthus1ast | it should exists a more userfriendly way for this: https://forum.nim-lang.org/t/4228#26331 |
15:51:04 | FromGitter | <vinodvinu> when i put a LONG_PTR, compiler says that it expects a WNDPROC |
15:51:04 | FromGitter | <mratsim> @vinodvinu use `ptr clong` |
15:51:38 | FromGitter | <mratsim> wndproc is probably a callback to a function pointer |
15:51:48 | FromGitter | <vinodvinu> @mratsim , Thanks. Let me try |
15:52:08 | FromGitter | <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:27 | FromGitter | <vinodvinu> @mratsim , This is the result ⏎ got <LONG_PTR> but expected 'WNDPROC |
15:55:08 | FromGitter | <mratsim> tensorflow is too big of a dependency. Compiling it is hell. |
15:55:19 | * | mr_yogurt joined #nim |
15:55:48 | FromGitter | <mratsim> @vinodvinu what is the proc signature and what are those types. Otherwise I’m debugging blind :/ |
15:55:59 | FromGitter | <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:07 | FromGitter | <seruum> @leorize That worked! Thank you. Sorry for the break in conversation, I had to step away for work... |
15:56:20 | FromGitter | <vinodvinu> @mratsim , |
15:56:32 | FromGitter | <vinodvinu> This is the proc signature; ⏎ proc RED_WndProc(hwnd: HWND, message: UINT, wParam: WPARAM, lParam: LPARAM): LRESULT {.stdcall} |
15:56:43 | FromGitter | <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:45 | FromGitter | <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:20 | FromGitter | <mratsim> nothing much: an array for the shape, an array for the strides, an offset and a pointer to the data |
15:58:12 | FromGitter | <vinodvinu> @mratsim ⏎ This is the call site ⏎ OldWndProc = SetWindowLongPtrW(result, GWLP_WNDPROC, castclong (RED_WndProc)) |
15:58:27 | FromGitter | <mratsim> You can refer to this discussion @adam-r-kowalski: https://github.com/mratsim/Arraymancer/issues/262 |
15:58:58 | FromGitter | <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:09 | FromGitter | <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:51 | FromGitter | <mratsim> It’s not because when i started those didn’t exist, it’s compatible with Numpy, MxNet and Torch though |
16:00:22 | FromGitter | <mratsim> This is what the mxnet team proposed: https://github.com/dmlc/dlpack |
16:01:15 | FromGitter | <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:34 | FromGitter | <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:34 | FromGitter | ... /gitter.im/nim-lang/Nim?at=5bbb7fd61c100a4f294e4a79] |
16:03:37 | FromGitter | <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:33 | FromGitter | <mratsim> shape: openarray\[int\], strides: openarray\[int\], offset: int, data: ptr UncheckedArray\[T\]. That’s the minimum. |
16:06:08 | narimiran | @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:07 | FromGitter | <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:58 | FromGitter | <adam-r-kowalski> Perfect, I’ll get started soon then! |
16:08:01 | * | SenasOzys quit (Ping timeout: 246 seconds) |
16:08:50 | FromGitter | <mratsim> You can have a look into D ndslice and Rust Leaf/Parenchyma/Juice for some ideas in compiled modern language |
16:09:04 | FromGitter | <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:16 | FromGitter | <mratsim> Plus those libraries are much easier to go through than something like NumPy |
16:09:22 | FromGitter | <mratsim> Check Facebook’s Aten as well. |
16:09:51 | FromGitter | <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:55 | FromGitter | <mratsim> I’ve started with value semantics tensors, tried copy-on-write tensors as well. Too many issues |
16:10:17 | FromGitter | <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:41 | FromGitter | <mratsim> the copy-on-write is till there btw: https://github.com/mratsim/Arraymancer/tree/copy-on-write |
16:11:54 | FromGitter | <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:05 | FromGitter | <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:14 | FromGitter | <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:43 | FromGitter | <mratsim> If write-tracking ever materialize I can probably make that work: https://nim-lang.org/araq/writetracking.html |
16:16:13 | FromGitter | <mratsim> or maybe with the new lent/sink borrow checker |
16:16:36 | FromGitter | <adam-r-kowalski> Yeah I was thinking about that. This seems like a lifetime issue right? |
16:17:09 | FromGitter | <adam-r-kowalski> But that still doens’t quite solve the problem |
16:17:15 | FromGitter | <adam-r-kowalski> You can’t return something that can only be borrowed |
16:17:22 | FromGitter | <adam-r-kowalski> Even in something like rust |
16:17:23 | FromGitter | <mratsim> yes |
16:17:29 | FromGitter | <mratsim> it’s ownership issue |
16:19:41 | FromGitter | <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:11 | FromGitter | <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:31 | FromGitter | <adam-r-kowalski> Sorry if I completly hijacked this channel haha, is there a more arraymancer specific channel we can be on? |
16:20:40 | FromGitter | <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:30 | FromGitter | <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:10 | FromGitter | <mratsim> on gitter mratsim/arraymancer |
16:22:24 | FromGitter | <mratsim> or Arraymancer/Lobby |
16:23:03 | FromGitter | <adam-r-kowalski> Thanks, I joined the lobby! |
16:27:51 | * | zurs quit (Quit: Leaving) |
16:35:37 | * | alynpost joined #nim |
16:38:39 | FromGitter | <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:17 | FromGitter | <kaushalmodi> @iffy you need to import strutils? |
16:39:26 | alynpost | Hello 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:33 | FromGitter | <iffy> @kaushalmodi it's imported (in the file where my template is defined) |
16:39:48 | FromGitter | <iffy> oh, do I need to import it in the file where the template is used? |
16:39:52 | narimiran | could this (@iffy) be the same behaviour as when you can't use `split` inside of `mapIt` (also template)? |
16:40:12 | narimiran | alynpost: yup, he is what he says he is :) |
16:40:22 | FromGitter | <Lite5h4dow> Hey guys. Anything new in the land of nim? |
16:40:40 | federico3 | hi alynpost |
16:41:08 | FromGitter | <kaushalmodi> federico3: Cool! I didn't know you were part of the core Nim team |
16:42:06 | alynpost | Hello federico3. What do you make of narimiran's claim there? ;-) |
16:43:22 | federico3 | kaushalmodi: we don't have a formal definition of what is to be "core" other than being in the GH repo users |
16:43:38 | alynpost | that is the material confusion I had on the matter, tbh. |
16:43:54 | FromGitter | <kaushalmodi> I would think of Core members as ones who have write access to the repo |
16:44:18 | FromGitter | <kaushalmodi> aka official Nim project spokesperson |
16:44:45 | FromGitter | <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:53 | federico3 | kaushalmodi: we never had a spokesperson role |
16:46:36 | FromGitter | <kaushalmodi> @dom96 ? :) |
16:47:25 | FromGitter | <kaushalmodi> Or maybe it's just me interpreting the lobsters hats as too official |
16:47:32 | FromGitter | <kaushalmodi> may be they are just like reddit flairs |
16:49:24 | alynpost | "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:07 | FromGitter | <kaushalmodi> alynpost: Exactly, so the hats do sound more official. |
16:50:28 | FromGitter | <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:30 | federico3 | alynpost: I'm a bit confused: I'm seeing hats given to members of projects/companies who are not spokepersons, just contributors/employees |
16:55:30 | FromGitter | <alehander42> @adam-r-kowalski https://forum.nim-lang.org/t/3755#26047 |
16:57:00 | FromGitter | <alehander42> on the other hand we still might rewrite the jsgeneration a bit in my sourcemap PR |
16:57:13 | alynpost | hats are not just for a notional spokepersons role, they are also used for, excuse the lingo, expert testimony. |
16:57:13 | FromGitter | <alehander42> so maybe we can support that too if we do it |
16:57:57 | alynpost | If 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:36 | narimiran | alynpost: having said that, i see no reason why federico3 shouldn't wear the nim-hat |
17:01:02 | alynpost | Excellent and done. i'll take my leave now. Does anyone need anything else or have any questions before I do? |
17:01:06 | FromGitter | <kaushalmodi> I agree with narimiran. federico3 is definitely recognized in Nim community with his awesome Nim package contributions |
17:01:20 | federico3 | thanks guys |
17:01:22 | * | federico3 tips hat |
17:01:26 | narimiran | :) |
17:02:40 | federico3 | (anyhow it's not like I'm going to make official-sounding statements or claim that 1.0 is out) |
17:04:06 | FromGitter | <kaushalmodi> :) |
17:05:12 | * | alynpost left #nim ("WeeChat 1.5") |
17:08:02 | FromGitter | <Lite5h4dow> I read 1.0.. |
17:08:12 | FromGitter | <Lite5h4dow> Is it happening? |
17:08:27 | FromGitter | <kaushalmodi> lol |
17:08:31 | narimiran | ...and you take a look at a calendar, and you see it is not 2038 yet |
17:08:32 | enthus1ast | official statement? |
17:09:12 | FromGitter | <kaushalmodi> enthus1ast: there wasn't even an unofficial statement |
17:10:03 | FromGitter | <Lite5h4dow> L@ar |
17:10:43 | federico3 | there should be something like "Streisand effect" for rumors started as a joke :) |
17:12:25 | narimiran | offtopic, but regarding slow PR resolving (https://forum.nim-lang.org/t/4285): |
17:13:03 | narimiran | VSCode 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:32 | FromGitter | <kaushalmodi> narimiran: I agree.. there needs to be some delegation to bring down the issue/PR count |
17:16:28 | TheLemonMan | slow and steady wins the race, work is progressing even though PRs are sitting there |
17:16:49 | narimiran | there are open PRs from 2015 and 2016! this should be either merged (if they are applicable still) or closed |
17:16:59 | FromGitter | <alehander42> agree |
17:17:03 | narimiran | and we have open issues from 2012!!! |
17:18:07 | TheLemonMan | so do the other projects, manpower is not infinite nor is time (nor willpower nor interest... you know the drill) |
17:18:52 | narimiran | i'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:14 | narimiran | golang: 55 open PRs, rustlang: 136, kotlin: 111 |
17:21:42 | narimiran | and if you say: they have more maintainers. well, they have more users (opening those PRs) too |
17:21:49 | TheLemonMan | backed by: Google, Mozilla & co, Jetbrains |
17:22:50 | narimiran | TheLemonMan: re manpower and time: i think the biggest problem here is the third thing you mention: willpower |
17:23:14 | TheLemonMan | of course, sifting trough the issues is a boring and unrewarding job |
17:23:40 | narimiran | if 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:04 | enthus1ast | narimiran received *NECROMANCER* badge |
17:24:10 | narimiran | :D |
17:25:02 | narimiran | TheLemonMan: yeah, those 5 year old issues are not destructors (or whatever is now interesting), but they should be resolved |
17:25:31 | narimiran | why not use this hacktober opportunity to work, as a community, on all those boring things? |
17:25:37 | TheLemonMan | I don't know who's daydreaming of Nim v2 but I see a steady stream of bugfixes incoming |
17:26:16 | TheLemonMan | hacktoberfest is already giving us some interesting PRs (on interesting parts of the compiler :D) |
17:26:38 | narimiran | TheLemonMan: hopefully those PRs will be merged before 2024 ;) |
17:27:49 | narimiran | timothee is right, increasing the velocity of solving PRs would give more motivation to people to contribute (even) more |
17:28:23 | federico3 | talking about my experience on other projects, delegating often helps by giving people a sense of responisibily over something |
17:28:40 | TheLemonMan | you're all making a fuss over a small delay, come on! |
17:30:16 | Zevv | l |
17:30:25 | TheLemonMan | well said! |
17:30:59 | narimiran | federico3: agreed |
17:31:39 | FromGitter | <kaushalmodi> See how big projects like Emacs developed over time. |
17:31:57 | FromGitter | <kaushalmodi> There are dozens of committers. So getting things committed is not the bottleneck. |
17:32:09 | FromGitter | <kaushalmodi> The lead maintainer just oversees the commits happening |
17:32:29 | FromGitter | <kaushalmodi> they may email the committer in the emacs-devel mailing list if something needs to be improved |
17:32:43 | Araq | seriously guys, fyi |
17:32:43 | FromGitter | <kaushalmodi> in worst case, the maintainer can revert the bad commit too |
17:33:01 | Araq | I've been on vacation for the last 5 days |
17:33:15 | TheLemonMan | HOW DARE YOU?! |
17:33:27 | FromGitter | <kaushalmodi> Araq: but that's not the issue here |
17:33:29 | Araq | but I'm back now. and also |
17:33:53 | Araq | the biggest problem right now with the PRs is the release/development cycle |
17:34:07 | Araq | either we stop merging before 0.19.2 is out |
17:34:16 | Araq | -- or (and I know you will all vote for this) |
17:34:26 | Araq | we backport the fixes to 0.19 |
17:34:32 | Araq | and let 'devel' be 'devel' |
17:34:37 | FromGitter | <kaushalmodi> why not commit 0.19.2 commits to master branch? |
17:34:38 | narimiran | welcome back Araq, hope you had a nice rest and you're ready for new victories :) |
17:34:43 | FromGitter | <kaushalmodi> and then merge them to devel as needed? |
17:35:26 | Araq | kaushalmodi: well it depends on the bugfix, the stdlib is easier in this regard than the compiler |
17:35:42 | Araq | the compiler's development was pretty crazy the last months with the refactorings |
17:35:47 | narimiran | Araq: 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:45 | narimiran | 0.19.2 could be seen as "the greatest bugfixing yet version" |
17:36:52 | Araq | narimiran, good contributions != bugfixes |
17:37:27 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
17:37:45 | narimiran | bugfixes == not introducing any new features, fixing the existing issues, etc. |
17:38:14 | Araq | bugfix could also mean "we need to deprecate this, it's never gonna work" :-) |
17:38:34 | narimiran | and 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:02 | Araq | bugfixes are also tricky, often the most problematic regressions are due to bugfixes |
17:39:37 | narimiran | ok, lets fix those regressions in 0.19.4 ;) |
17:40:12 | Araq | I'm pretty good at judging these nowadays, but the lack of a development process is something we need to sort out asap |
17:40:30 | narimiran | +1 |
17:42:09 | Araq | so ... apart from that, what requires my immediate attention? ;-) |
17:46:42 | FromGitter | <kayabaNerve> Will we have 0.19.19 in 7 years before we release 1.0? |
17:47:20 | FromGitter | <kayabaNerve> I want the header pragma path thing to be in 1.0. I should submit a PR to guarantee that... |
17:47:40 | FromGitter | <kayabaNerve> If I can figure out how 0_o |
17:49:06 | FromGitter | <kayabaNerve> Damn I just pulled up my issue again. So many typos. |
17:50:33 | Araq | what's the problem with the header pragma? |
17:51:34 | FromGitter | <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:10 | FromGitter | <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:23 | FromGitter | <kayabaNerve> https://github.com/nim-lang/Nim/issues/8408 |
17:52:49 | FromGitter | <kayabaNerve> There's the issue. |
17:55:24 | * | rlr quit (Remote host closed the connection) |
17:55:30 | narimiran | Araq: 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:29 | Araq | we have a v1 roadmap and we're following it |
17:59:45 | Araq | we don't have a roadmap for v0.19.2 though |
18:04:46 | narimiran | the 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:16 | federico3 | I think hacktober-related PRs should be merged within the monts, so prioritizing them could encourage contributors |
18:10:42 | elrood | there is a link to a roadmap to 1.0 in web/index.rst which leads nowhere (yet again), by the way |
18:11:00 | narimiran | btw, 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:51 | narimiran | elrood: 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:39 | FromGitter | <kdheepak> Are there examples of javascript nim repos? |
18:45:06 | FromGitter | <kdheepak> that show how to interface with existing Javascript libraries? |
18:45:16 | FromGitter | <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:18 | FromGitter | <zacharycarter> @kdheepak - I can help with that potentially |
19:10:13 | FromGitter | <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:41 | FromGitter | <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:22 | FromGitter | <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:46 | FromGitter | <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:58 | FromGitter | <zacharycarter> when they see like a parallelized fiber based job system in C++ |
19:12:18 | FromGitter | <zacharycarter> and they want to achieve something similar using Nim - but struggle with the GC / default threading model |
19:12:55 | FromGitter | <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:04 | FromGitter | <zacharycarter> but when I want to go deeper than that - I hit a wall I don't know how to get around |
19:14:04 | Araq | yeah I know and I know it's harder in Nim than in others because of the thread local heaps |
19:14:21 | FromGitter | <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:33 | Araq | essentially you need to deepCopy() the task |
19:14:34 | FromGitter | <zacharycarter> I love Nim - and don't want to stop using it - sometimes I just feel a bit helpless |
19:15:02 | FromGitter | <zacharycarter> well - with that insight - I'm going to try to understand destructors and RAII semantics more |
19:15:18 | FromGitter | <zacharycarter> it sounds like I can achieve what I want to do with what you're doing with the new runtime |
19:15:33 | Araq | destructors and RAII are indirectly related to this |
19:15:37 | FromGitter | <zacharycarter> okay |
19:16:25 | FromGitter | <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:19 | Araq | well I can explain it to you here in a couple of sentences, maybe they inspire somebody to improve the docs |
19:18:39 | FromGitter | <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:42 | FromGitter | <zacharycarter> err I meant the NEP doc - sorry |
19:20:02 | FromGitter | <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:14 | FromGitter | <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:40 | planetis[m] | hey is this https://github.com/nim-lang/Nim/issues/7996 unblocked? Will you accept PRs that make modules use concepts? |
19:28:55 | FromDiscord_ | <smitop> Is it possible to use the opengl library with JS? |
19:29:07 | planetis[m] | i.e the parseutils use a String concept? |
19:29:11 | FromGitter | <zacharycarter> smitop: I don't think so |
19:29:24 | FromGitter | <zacharycarter> you want to target webgl right? |
19:29:24 | Araq | smitop: nimx does that |
19:29:33 | FromGitter | <zacharycarter> ^ |
19:31:44 | * | hzx quit (Quit: Going offline, see ya! (www.adiirc.com)) |
19:34:02 | planetis[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:05 | FromGitter | <zacharycarter> I will gladly contrib to docs - I just need to have an understanding of what I"m talking about |
19:46:12 | FromGitter | <zacharycarter> which I often don't :P |
19:46:42 | FromGitter | <mratsim> that’s indeed a showstopper :p |
19:46:49 | FromGitter | <zacharycarter> right? |
19:47:09 | FromGitter | <mratsim> but Nim async is reall similar to C# or Python async/await (from someone who only used them a little) |
19:47:18 | FromGitter | <zacharycarter> well I get that |
19:47:35 | FromGitter | <zacharycarter> but - I read naughty dog's presentation from GCC abut parallelizing a job system using fibers |
19:47:43 | FromGitter | <zacharycarter> then I get into lock free data structures / work stealing |
19:47:59 | FromGitter | <zacharycarter> then I already have a high level understanding of async await |
19:48:23 | FromGitter | <mratsim> lock free data structure and work stealing are not async, it’s about task parallelism |
19:48:24 | FromGitter | <zacharycarter> how all these concepts come together, or how one can potentially solve the same problem |
19:49:04 | FromGitter | <zacharycarter> okay so let me back up maybe - I initially was looking at game engines written in C++ |
19:49:15 | FromGitter | <mratsim> Just use Intel TBB for task parallelism: https://www.threadingbuildingblocks.org/ |
19:49:20 | FromGitter | <zacharycarter> and I saw may of them featured job systems - some using fibers, many saying they used coroutines |
19:50:01 | FromGitter | <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:21 | FromGitter | <zacharycarter> and then there are green threads - which are virtualized threads and not OS threads |
19:50:54 | FromGitter | <mratsim> No: coroutines = green threads = fibers in the grand scheme of things |
19:51:05 | FromGitter | <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:07 | FromGitter | <mratsim> i.e. this is for IO and it runs on the same OS threads |
19:51:19 | FromGitter | <zacharycarter> and all I really want - is some kind of job queueing system with Nim |
19:51:34 | FromGitter | <zacharycarter> but I mean - I barely understand any of the above - and I feel like it's spinning me in circles |
19:51:42 | FromGitter | <mratsim> tne in Nimx |
19:51:42 | FromGitter | <zacharycarter> and I don't know of a simple place to start and iterate from |
19:51:46 | FromGitter | <zacharycarter> okay |
19:52:03 | FromGitter | <mratsim> https://github.com/yglukhov/nimx/blob/master/nimx/private/worker_queue.nim |
19:52:14 | * | PMunch joined #nim |
19:52:32 | FromGitter | <zacharycarter> I have seen this - and I did play with it for one other task I had (not related to game programming) |
19:53:23 | FromGitter | <zacharycarter> but then the whole complication of GC comes into play right? |
19:53:32 | FromGitter | <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:41 | FromGitter | <zacharycarter> like - I found - okay |
19:54:11 | FromGitter | <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:13 | FromGitter | <zacharycarter> so - yeah - I think it will depend on the task |
19:54:28 | FromDiscord_ | <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:04 | FromGitter | <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:04 | FromGitter | <zacharycarter> I think most important for me out of the gate would be parallelism |
19:55:15 | FromGitter | <zacharycarter> I'd like to be able to toss basic tasks at a queue - have them picked up and worked on |
19:55:30 | FromGitter | <zacharycarter> I understand there are SPSC queues and MPMC queues for this |
19:55:32 | FromGitter | <mratsim> so task parallelism. |
19:55:35 | FromGitter | <zacharycarter> yes |
19:55:50 | FromDiscord_ | <Shield> nim already have coroutines which do use fiber on windows |
19:55:58 | FromGitter | <mratsim> I think can use nimx worker queue or wrap Intel thread building blocks |
19:56:23 | FromGitter | <mratsim> (if those task are compute, if it’s IO just use async/await) |
19:57:04 | FromGitter | <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:18 | FromGitter | <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:40 | FromGitter | <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:48 | FromGitter | <mratsim> Concurrency and parallelism are not easy topics. Wait until you have to debug race conditions |
19:58:05 | FromDiscord_ | <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:05 | FromGitter | <zacharycarter> well - I'm not looking forward to it at all - but my struggle has been to learn the topic using Nim |
19:58:27 | FromGitter | <zacharycarter> or learn about all these topics while using Nim |
19:58:51 | FromGitter | <zacharycarter> because I really just started with HTML / JS and CSS when I was very young |
19:59:14 | FromGitter | <zacharycarter> and only took comp-sci in HS - and failed my AP exam with a 2 haha |
19:59:35 | FromGitter | <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:45 | FromGitter | <mratsim> I’m a mechanical engineer ;) |
19:59:51 | FromGitter | <zacharycarter> I guess I need to understand state machines better as well then |
19:59:55 | FromGitter | <zacharycarter> I'm a history major haha! |
20:00:01 | FromDiscord_ | <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:13 | FromGitter | <zacharycarter> okay - so I tried to do that |
20:00:18 | FromGitter | <zacharycarter> but I'm not sure what went on here |
20:00:40 | FromGitter | <zacharycarter> like I found - https://github.com/sheosi/tart - which didn't compile with 0.18.1 |
20:01:41 | FromGitter | <zacharycarter> so I opened this issue - https://github.com/nim-lang/Nim/issues/8616 |
20:01:45 | FromGitter | <zacharycarter> not sure what happened |
20:02:17 | FromGitter | <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:33 | FromDiscord_ | <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:21 | FromGitter | <rayman22201> @zacharycarter it looks like that issue was closed because theLemonBoy fixed it |
20:05:52 | FromGitter | <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:59 | FromGitter | <mratsim> @zacharycarter I use ptr UncheckArray all over arraymancer without issues |
20:06:08 | FromGitter | <zacharycarter> maybe I need to re-open it then - I'm still having issues with it apparently |
20:06:21 | FromGitter | <mratsim> just use ptr uncheckedArray\[T\] |
20:06:24 | FromGitter | <zacharycarter> @mratsim - I know - I've used it quite a bit as well before |
20:06:36 | FromGitter | <zacharycarter> instead of what? all the static arrays? |
20:06:48 | FromGitter | <mratsim> instead of DynArray |
20:06:51 | FromGitter | <zacharycarter> oh |
20:07:05 | FromGitter | <zacharycarter> ah I see what you mean - okay |
20:07:11 | FromDiscord_ | <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:25 | FromGitter | <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:30 | FromGitter | <zacharycarter> I think I just got done reading that sentiment |
20:08:36 | FromGitter | <tim-st> @mratsim does UncheckedArray support iteration over it? |
20:08:56 | FromGitter | <mratsim> it doesn’t have a length |
20:09:26 | FromGitter | <mratsim> it supports indexing though |
20:09:31 | FromGitter | <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:14 | FromGitter | <mratsim> you can cast a ptr + len to openarray otherwise |
20:10:17 | FromGitter | <zacharycarter> @mratsim - thank you for the tips |
20:10:22 | FromGitter | <tim-st> so what happens if you write for x in unchecked.. |
20:10:26 | FromGitter | <zacharycarter> I'll adapt them and see if things compile then |
20:10:42 | FromGitter | <mratsim> @tim-st nothing, no items proc |
20:10:55 | FromGitter | <tim-st> ok, good, thanks |
20:11:47 | FromGitter | <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:58 | FromGitter | <mratsim> see: https://github.com/nim-lang/Nim/issues/5437#issuecomment-402462119 for casting ptr+len to openarray |
20:12:01 | FromGitter | <tim-st> when nim strings once work without gc, does it mean casting uncheckedArray with known length to string will work? |
20:12:24 | Araq | no, the string owns its data |
20:12:48 | FromGitter | <tim-st> ok, thanks |
20:13:07 | FromGitter | <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:28 | FromGitter | <mratsim> Are you building a Goldberg machine? |
20:13:48 | FromGitter | <zacharycarter> who? |
20:13:49 | FromGitter | <tim-st> just want to have the best performance I have very many reads |
20:13:52 | FromGitter | <zacharycarter> oh |
20:14:39 | FromGitter | <zacharycarter> me - probably in most cases haha |
20:14:49 | FromGitter | <zacharycarter> but I know you were talking to tim-st |
20:15:14 | FromGitter | <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:05 | FromGitter | <mratsim> Ok, I’m off writing a brainfuck parser :P |
20:16:23 | FromGitter | <tim-st> ok, have fun^^ |
20:19:49 | FromGitter | <tim-st> Araq: I think allowing default values for static types should be available in v1 is this planned? |
20:20:19 | FromGitter | <tim-st> like proc test(t: static[int] = 2) = discard |
20:22:56 | Araq | hmm that's just a bug, I think? |
20:23:01 | FromGitter | <tim-st> oh, does it already work in 0.19.0 |
20:23:12 | FromGitter | <tim-st> I just tried it, and it seems to work |
20:23:21 | FromGitter | <tim-st> I'm pretty sure this wasnt working in last version |
20:24:20 | FromGitter | <tim-st> wow, very nice, that's the thing I missed most |
20:26:34 | FromGitter | <mratsim> it works since end of June |
20:26:39 | FromGitter | <mratsim> (I raised the bug) |
20:27:01 | Araq | \o/ |
20:27:13 | FromGitter | <tim-st> @mratsim perfect! |
20:27:34 | FromGitter | <tim-st> btw both `static[int]` and `static int` work; shouldnt only one (the first) work |
20:27:52 | Araq | that was done for consistency :-) |
20:27:56 | FromGitter | <mratsim> the second was added because static is similar to var, ptr ref |
20:28:06 | FromGitter | <tim-st> hm |
20:28:09 | FromGitter | <tim-st> :D |
20:28:35 | FromGitter | <mratsim> type also works now insead of typedesc\[foo\] though it doesn’t work well with typedesc\[int or uint\] |
20:28:57 | FromGitter | <mratsim> Now regarding the static bug I’m mostly curious about this: https://github.com/nim-lang/Nim/issues/6343 |
20:29:09 | FromGitter | <mratsim> for once static is a workaround for an openarray issue. |
20:29:24 | * | Trustable quit (Remote host closed the connection) |
20:29:36 | FromGitter | <mratsim> or generics |
20:29:44 | * | SenasOzys quit (Remote host closed the connection) |
20:29:44 | FromGitter | <tim-st> doesnt openArray require always a generic? like openArray[T] |
20:29:55 | FromGitter | <mratsim> a generic can be implied |
20:30:06 | FromGitter | <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:35 | FromGitter | <tim-st> ok, also it would be inconsistent since the example after this works |
20:33:32 | FromGitter | <mratsim> don’t ask me how I thought of putting a static int as an extra param |
20:34:06 | FromGitter | <tim-st> yes, that's a good question :D |
20:35:02 | FromGitter | <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:48 | planetis[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:58 | Araq | planetis[m], yes |
20:42:06 | planetis[m] | cool |
20:42:16 | Araq | sorry for missing your question the first time |
20:43:40 | planetis[m] | np i was hoping someone would answer eventually |
20:51:32 | * | vlad1777d joined #nim |
20:53:13 | planetis[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:14 | planetis[m] | original object is reset. |
20:53:35 | FromGitter | <tim-st> could it be supported in future that strutils also works on openArray[char]? |
20:53:55 | FromGitter | <tim-st> if so I wouldnt need to cast to string and could work with toOpenArray |
20:54:31 | FromGitter | <mratsim> in the past openarray\[char\] also matched string and it was creating a lot of bugs |
20:55:11 | FromGitter | <tim-st> and for a few read only procs for strutils? that would be really helpful |
20:55:47 | FromGitter | <mratsim> just copy paste strutils and customize it for your need if it’s only a few |
20:56:34 | FromGitter | <tim-st> hm, I also want that it works like a proc taking string, string would work with string, openArray[char] |
20:56:42 | FromGitter | <tim-st> commutative |
20:57:33 | FromGitter | <tim-st> btw what errors can appear if openArray[char] treated like string? |
20:57:36 | FromGitter | <mratsim> if it’s commutative you can use template to rewrite in “canonical” form, search for “canonical” in Nim manual |
20:57:55 | FromGitter | <tim-st> ah yes, that was the thing, I knew I read this before, thanks |
20:58:32 | FromGitter | <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:50 | FromGitter | <mratsim> hence the T: not char special casing |
20:59:04 | FromGitter | <tim-st> because you use auto? |
20:59:25 | FromGitter | <mratsim> no, openarray\[T\] |
20:59:55 | FromGitter | <tim-st> but why shouldnt this match string? |
21:00:21 | FromGitter | <tim-st> I ask because semantically string and openArray[char] is the same |
21:00:54 | FromGitter | <tim-st> ah, I see, above is a version for string |
21:00:56 | FromGitter | <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:37 | FromGitter | <mratsim> implementation wise they are the same, semantically they are not |
21:01:41 | FromGitter | <tim-st> ok, but especially when wrapping c code and casting to string without copy dooesnt work it helps a lot |
21:01:58 | FromGitter | <mratsim> C code should come in cstring |
21:02:35 | FromGitter | <tim-st> no, cstring doesnt support zero byte, does compressed string data from database dont have zero byte in it? |
21:02:49 | FromGitter | <mratsim> I think destructors would allow to use cstring as string input without GC allocation |
21:03:06 | FromGitter | <tim-st> The problem is that I dont have cstring^^ |
21:03:15 | FromGitter | <tim-st> it's buffer with given length |
21:03:19 | FromGitter | <mratsim> ah I see |
21:03:26 | FromGitter | <mratsim> a Pascal String ;) |
21:04:05 | FromGitter | <tim-st> thus toOpenArray would be a nice workaround if openArray[char] = string |
21:04:10 | FromGitter | <mratsim> yeah not sure how to deal with that. Maybe concepts |
21:04:40 | FromGitter | <mratsim> or a distinct openarray char |
21:04:50 | FromGitter | <tim-st> exactly what I wanted to say^^ |
21:05:05 | FromGitter | <tim-st> together with a concept maybe |
21:08:14 | FromGitter | <mratsim> I wonder the impact of concepts on compile-time |
21:08:30 | FromGitter | <tim-st> I think it's bad |
21:08:47 | FromGitter | <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:35 | FromGitter | <tim-st> just learnt about the type `int{lit}` :) |
21:16:36 | FromGitter | <tim-st> (ok, seems to be the same like static[int]) |
21:24:39 | FromGitter | <mratsim> mmm not exactly |
21:27:16 | * | narimiran quit (Quit: Konversation terminated!) |
21:29:39 | FromGitter | <adam-r-kowalski> Is there support for variadic templates? |
21:35:38 | FromGitter | <tim-st> @mratsim what is the difference? |
21:35:55 | * | Tortice joined #nim |
21:36:00 | FromGitter | <kdheepak> @zacharycarter that would be great! |
21:36:12 | FromGitter | <kdheepak> I did try to look through some of your repos. |
21:36:37 | FromGitter | <kdheepak> I guess what I'm struggling with is trying to figure out how to use Vue or some existing framework. |
21:36:55 | FromGitter | <kdheepak> Maybe I should just generate js to see what happens and learn that way? |
21:36:59 | FromGitter | <kdheepak> How did you do it? |
21:37:06 | FromGitter | <kdheepak> How did you learn? |
21:39:23 | FromGitter | <tim-st> ah I see, it cannot be evaluated at compile time, although it's constant |
21:41:32 | FromGitter | <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:57 | FromGitter | <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:03 | FromGitter | <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:25 | Gnjurac | hi anyone using godot with nim, i just builded form source and i get this |
21:57:26 | Gnjurac | No valid library handle, can't get symbol from GDNative object |
22:00:06 | * | elrood quit (Quit: Leaving) |
22:01:56 | Gnjurac | hmm i think i frogot to do nake build |
22:02:14 | Gnjurac | am trying now but is says |
22:02:15 | Gnjurac | Prompt: [email protected] already exists. Overwrite? [y/N] |
22:02:15 | Gnjurac | Answer: y |
22:02:15 | Gnjurac | Success: nake installed successfully. |
22:02:15 | Gnjurac | [me@me-pc myproject]$ nake build |
22:02:15 | Gnjurac | bash: nake: command not found |
22:06:55 | * | cozachk joined #nim |
22:07:15 | Gnjurac | hmm found manualy where neke installed in pgks |
22:07:20 | Gnjurac | but now got error |
22:07:22 | Gnjurac | Hint: cpuinfo [Processing] |
22:07:22 | Gnjurac | Hint: linux [Processing] |
22:07:22 | Gnjurac | nakefile.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:51 | FromGitter | <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:42 | FromGitter | <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:41 | AlexMax | who even has access to the official nim github |
22:19:32 | AlexMax | cuz yeah there's a lot of unclosed issues |
22:21:25 | AlexMax | wish i could be more of a help but i'm a nim dummy mostly |
22:23:04 | Gnjurac | they need to start making some Nim power up shakes so newbs like me and you can help :) |
22:23:59 | FromGitter | <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:30 | FromGitter | <iffy> even better: is there a way to print out the results of a macro as Nim code? |
22:26:32 | FromGitter | <rayman22201> @iffy it's https://nim-lang.org/docs/macros.html#expandMacros.m%2Ctyped |
22:26:38 | FromGitter | <rayman22201> expandMacros |
22:27:33 | FromGitter | <iffy> perfect; that's what I was looking for |
22:27:37 | FromGitter | <iffy> thanks, @rayman22201 |
22:27:41 | FromGitter | <rayman22201> np |
22:37:55 | * | SenasOzys quit (Ping timeout: 246 seconds) |
22:44:38 | FromGitter | <zetashift> @timotheecour how are you liking karax? Pros/cons considering you also use react? |
22:48:19 | FromDiscord_ | <exelotl> hey I'm looking for opinions on a shorthand I'd like to add to my engine |
22:48:52 | FromDiscord_ | <exelotl> commonly you end up writing something like: proc init(x, y: float32)= self.x = x; self.y = y |
22:50:17 | FromDiscord_ | <exelotl> the proc init() is being read by a macro so I can transform it in whatever way I want |
22:50:24 | FromDiscord_ | <exelotl> so I was thinking of something like |
22:50:27 | FromDiscord_ | <exelotl> proc init(x, y: _) |
22:50:32 | FromDiscord_ | <exelotl> proc init(x, y: self) |
22:50:39 | FromDiscord_ | <exelotl> or proc init(x*, y*) |
22:52:01 | FromDiscord_ | <exelotl> as a way to say 'x and y are fields of self, please assign them for me' |
23:00:48 | FromGitter | <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:18 | FromGitter | <iffy> ```mkParser: ⏎ flag("-a") ⏎ flag("-b")``` [https://gitter.im/nim-lang/Nim?at=5bbbe1be271506518ddaebad] |
23:02:05 | FromGitter | <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:19 | FromGitter | <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:21 | FromDiscord_ | <exelotl> iffy: maybe getAst is what you want? |
23:38:28 | * | noonien quit (Quit: Connection closed for inactivity) |
23:45:54 | flaviu | @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:17 | flaviu | but last time I checked was about a year ago, so idk |
23:48:34 | * | cozachk left #nim (#nim) |