00:02:15 | * | FromDiscord quit (Remote host closed the connection) |
00:02:30 | * | FromDiscord joined #nim |
00:06:11 | * | konradmb quit (Read error: Connection reset by peer) |
00:06:49 | * | konradmb joined #nim |
00:08:32 | * | Tyresc quit (Quit: WeeChat 2.9-dev) |
00:09:46 | * | konradmb2 joined #nim |
00:09:59 | * | konradmb quit (Read error: Connection reset by peer) |
00:10:23 | * | konradmb2 quit (Read error: Connection reset by peer) |
00:11:29 | * | konradmb joined #nim |
00:13:20 | * | konradmb2 joined #nim |
00:13:20 | * | konradmb quit (Read error: Connection reset by peer) |
00:13:35 | * | konradmb2 quit (Read error: Connection reset by peer) |
00:13:49 | * | konradmb2 joined #nim |
00:15:41 | * | konradmb2 quit (Read error: Connection reset by peer) |
00:16:09 | * | konradmb joined #nim |
00:18:10 | * | fredrikhr quit (Ping timeout: 256 seconds) |
00:20:47 | * | konradmb2 joined #nim |
00:20:57 | * | konradmb quit (Read error: Connection reset by peer) |
00:21:22 | * | konradmb2 quit (Read error: Connection reset by peer) |
00:37:46 | * | blueberrypie left #nim ("leaving") |
00:39:41 | * | Tlongir joined #nim |
00:50:41 | * | Tongir joined #nim |
00:53:04 | * | Tlongir quit (Ping timeout: 246 seconds) |
00:56:16 | * | fredrikhr joined #nim |
01:12:14 | * | r4vi quit (Ping timeout: 240 seconds) |
01:21:22 | * | surma quit (Ping timeout: 256 seconds) |
01:22:45 | * | r4vi joined #nim |
01:24:22 | * | surma joined #nim |
01:28:08 | * | fredrikhr quit (Read error: Connection reset by peer) |
01:34:06 | * | oddp quit (Ping timeout: 256 seconds) |
01:34:46 | * | brainbomb joined #nim |
01:37:32 | * | tiorock joined #nim |
01:37:32 | * | rockcavera is now known as Guest54017 |
01:37:32 | * | tiorock quit (Changing host) |
01:37:32 | * | tiorock joined #nim |
01:37:32 | * | Guest54017 quit (Killed (hitchcock.freenode.net (Nickname regained by services))) |
01:37:32 | * | tiorock is now known as rockcavera |
01:45:44 | FromDiscord | <Technisha Circuit> How would i have NimScript and Nim interact with eachother? |
01:54:56 | disruptek | why? |
01:56:26 | FromDiscord | <Rika> why not? |
01:56:33 | FromDiscord | <Rika> not that id condone this |
01:58:02 | FromDiscord | <Elegant Beef> https://peterme.net/using-nimscript-as-a-configuration-language-embedding-nimscript-pt-1.html |
01:58:10 | FromDiscord | <Elegant Beef> Pmunch has the basis of what needs to be done |
02:01:49 | * | chemist69 quit (Ping timeout: 272 seconds) |
02:03:31 | * | chemist69 joined #nim |
02:13:17 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:15:21 | * | muffindrake joined #nim |
02:19:15 | FromDiscord | <Technisha Circuit> Thanks! |
02:29:51 | * | bung joined #nim |
02:31:16 | bung | `switch(IFM_TYPE(ifm_active))` where is `IFM_TYPE` comming from ? I searched 2 repos contains this didnot see its definition. |
02:42:29 | bung | never mind. |
03:07:34 | * | brainbomb quit (Quit: Leaving.) |
03:09:19 | Prestige | Just got emojis working in nimdow's status bar: https://0x0.st/iV5p.png |
03:10:03 | FromDiscord | <Rika> congrats |
03:10:37 | * | tefter joined #nim |
03:10:48 | * | endragor joined #nim |
03:11:04 | disruptek | cute. what is that bottom-left? |
03:11:06 | FromDiscord | <Zed> looks good prestige |
03:11:25 | Prestige | Thanks :) disruptek that's cordless, a discord tui (Written in go) |
03:12:12 | disruptek | interesting. |
03:37:24 | * | opDispatch quit (Quit: Konversation terminated!) |
03:47:51 | * | theelous3 quit (Read error: Connection reset by peer) |
04:03:25 | * | chemist69 quit (Ping timeout: 272 seconds) |
04:04:00 | * | chemist69 joined #nim |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:35 | * | supakeen joined #nim |
04:21:16 | voltist | Prestige: Please tell me that is your Nim WM. It looks SOOOOO good |
04:25:18 | FromDiscord | <JSGrant> voltist: Considering how close that screenshot is to the image in the README -- I think that's a safe bet. :^) |
04:26:20 | FromDiscord | <Elegant Beef> yea it is nimdow |
04:26:36 | FromDiscord | <Elegant Beef> Speaking as prestiges advisor 😄 |
04:29:29 | * | nsf joined #nim |
04:29:49 | voltist | Wow looks neat |
04:29:49 | FromDiscord | <JSGrant> Re: That blog-link posted; Still really excited about the prospect of using Nimscript as a config-lang for a WM -- all I REALLY WANT isAwesomeWM but in Nim tbh. lol |
04:30:09 | FromDiscord | <Elegant Beef> Hey my WM looked ok too 😛 |
04:30:16 | FromDiscord | <Elegant Beef> Just couldnt be arsed to continue |
04:31:02 | FromDiscord | <JSGrant> Your's looked actually practical & not my ideal, which is basically a "ricer's dream" |
04:31:15 | FromDiscord | <Elegant Beef> Huh |
04:31:19 | FromDiscord | <JSGrant> I'm a big fan of farting around / not getting actual work done ... lol |
04:31:36 | FromDiscord | <Elegant Beef> Ah |
04:31:45 | voltist | Why do work when you can optimize your workflow instead? |
04:32:01 | voltist | It makes work *later on* easier |
04:32:18 | voltist | Defi not procrastinating |
04:32:51 | FromDiscord | <Elegant Beef> Im now just using regolith linux which ships with a preconfigured i3-gaps |
04:32:54 | FromDiscord | <Elegant Beef> Cant be arsed |
04:33:36 | FromDiscord | <JSGrant> The largest 'codebase' I maintained ... for YEARS was my emacs config -- like it's a double-edged sword and one of those things where it can be very rewarding, but ultimately you get to a point of diminshing-returns but still have that urge to 'optimize more' and the like |
04:33:45 | FromDiscord | <JSGrant> I think it all depends on your personality |
04:35:15 | FromDiscord | <JSGrant> I'm mostly happy on GNOME3; I know there's some stuff that System76 are trying to do to add semi-complete tiling -- but after years of Stumpwm use, I don't miss it "that much" tbh |
04:35:35 | FromDiscord | <JSGrant> I don't even need to quater-tile that often in my day-to-day |
04:35:55 | FromDiscord | <Rika> still dont understand tiling wms |
04:36:35 | FromDiscord | <Elegant Beef> What about them? |
04:36:39 | FromDiscord | <Rika> i tried using something "similar enough that emulates the feeling" called split window lol, and i didnt like the experience, having anything smaller than "basically full screen" is very irritating |
04:37:11 | FromDiscord | <Rika> in fact i dont have any smaller-than-maximized windows right now |
04:37:21 | FromDiscord | <Elegant Beef> For me not having windows overlap and be created in a constant pattern is just nice, and cleaner to wokr |
04:37:35 | FromDiscord | <Elegant Beef> (edit) 'wokr' => 'work with' |
04:37:55 | FromDiscord | <Elegant Beef> Obvious exceptions with windows requesting to be floating |
04:38:21 | FromDiscord | <JSGrant> @Rika I mean, I don't buy that it's an inherently superior paradigm as some people like to position themselves as -- but the appeal is often more-so that they give you a lot more freedom in the size, location, and workspace /tag of the given window than traditional-wms rather than everything HAS to be tiled |
04:39:01 | FromDiscord | <Rika> doesnt kwin have that functionality as well |
04:39:08 | FromDiscord | <Rika> though that is a compositor |
04:40:14 | FromDiscord | <JSGrant> @Rika I mean, really any decent wm should be able to support the transformations / movement of a given window -- I think it's more-so the ease of use of manipulating them (often times even by scripting certain behaviors) |
04:40:37 | FromDiscord | <Rika> i dont know, i have no use for changing size other than auto-maxing windows |
04:40:55 | FromDiscord | <Rika> as ive said above i cant bear anything not maximised lol |
04:42:02 | disruptek | i plan to use my swayipc project to write a little app that tiles out-of-focus windows according to the golden ratio; windows i spend less time in will be smaller. |
04:43:11 | disruptek | iirc, Rika doesn't use a tiling wm. |
04:43:32 | FromDiscord | <JSGrant> @Rika I mean, in my Emacs / Stumpwm era; That's basically what I did most of the time -- have a bunch of maximized Emacs 'frames' and use it as a 'improved alt-tab' to some degree |
04:44:15 | FromDiscord | <Rika> i mean i do use splits but i only have max 1 split; 2 buffers visible |
04:44:18 | * | Tongir quit (Remote host closed the connection) |
04:44:21 | FromDiscord | <Rika> for vim |
04:44:43 | * | Tongir joined #nim |
04:45:02 | disruptek | i almost never use anything but 2up. |
04:46:00 | disruptek | 1up is 3840x2160; no decoration or status bars or anything. |
04:46:05 | FromDiscord | <Rika> perhaps its because of my screen size lol |
04:46:14 | FromDiscord | <JSGrant> Dude, it was a problem for me back then ... before 'EXWM' was even a thing -- I was basically using Emacs as a WM in-itself already. Like I would honestly have a dedicated Emacs frame with like 20 irc channels split between it, a dedicated emms (media-player frontend) frame, a dedicated scheduling / notebook (org-mode) frame, etc, etc |
04:46:32 | FromDiscord | <Rika> screen's only 24 inches and i sit relatively far from my screen |
04:46:48 | FromDiscord | <Rika> emacs as an os :SonoYay: |
04:46:52 | disruptek | i hear coding on mobile is the new hotness. |
04:47:12 | FromDiscord | <Rika> @Techni |
04:48:46 | FromDiscord | <JSGrant> @Rika There was a time in my late-teens-early-20s where I spent a few months trying to roll out a 'desktop-environment' with Stumpwm & Emacs... and since then, I've basically nuked everything under the guise of "needing to be more productive"; Which of-course, I haven't |
04:49:35 | FromDiscord | <Rika> i'm on my late teens so :RengeShrug: |
04:50:24 | FromDiscord | <Rika> i dont know, im not on some epic to attain the highest productivity |
04:51:28 | FromDiscord | <Rika> i think i'm as productive as i want to be with my setup; i think what i do want to attain is less "productivity" more "lazy ways to do things", which does have a distinction as far as i know |
04:53:05 | FromDiscord | <JSGrant> @Rika Good; I wish I could shake my past-self sometimes -- idealism to the point I was at is not at-all productive and I see young-guys/gals fall into that all the time. |
04:53:40 | FromDiscord | <Rika> you sound like someone who's very, uh, hardworking. i'm in the other extreme |
04:56:01 | FromDiscord | <JSGrant> Well it's good at your age you seem to be able discern that that's not always the best virtue "working hard"; And generally the opposite often makes better programs (assuming they put enough consideraiton into 'not working hard') lol |
04:56:26 | FromDiscord | <Rika> yeah i dont know if i fall into that |
04:56:34 | FromDiscord | <Rika> some people say i do |
04:57:09 | FromDiscord | <Rika> also just discovered making an {.async.} `[]` and `[]=` proc wont work with async's await T_T |
05:00:17 | FromDiscord | <JSGrant> Yeah, let's get back to Nim in here-- lol ; Circling back to Nimscript I am curious what it's performance would be to something like Lua. I see them compared a lot, but haven't seen any benchmarks. |
05:01:05 | FromDiscord | <Rika> luajit will still prolly smack its ass |
05:01:27 | FromDiscord | <Rika> sounds like you should be the one to make the benchmarks 😛 |
05:02:35 | FromDiscord | <Elegant Beef> Clearly we just need to convert the AST of the nimscript to a runtime callable AST 😄 |
05:03:42 | FromDiscord | <JSGrant> _cant wait till we compete with smalltalk lol_ |
05:03:44 | FromDiscord | <Elegant Beef> Hopefully it's clear im joking |
05:03:57 | FromDiscord | <JSGrant> unless ... ? :^) |
05:04:36 | * | bung_ joined #nim |
05:05:08 | FromDiscord | <JSGrant> @Rika I mean, I'm certainly interested in Nim as an avenue to learn game-dev / game-engine architecture -- so I think it'll eventually "naturally" come up to compare to the two |
05:05:36 | FromDiscord | <Elegant Beef> I mean pmunch mentioned something about loading nim files dynamically so idk |
05:05:59 | FromDiscord | <Elegant Beef> No need for the VM version if you can dynamically load code somehow |
05:06:50 | Prestige | voltist: yep! That's my window manager |
05:07:07 | * | rockcavera quit (Remote host closed the connection) |
05:07:09 | FromDiscord | <JSGrant> @Elegant Beef Like in a way different from HCR, or? |
05:07:16 | FromDiscord | <Elegant Beef> Yea |
05:07:30 | Prestige | A few things left for the status bar and it will be ready for a beta release |
05:07:44 | * | bung quit (Ping timeout: 256 seconds) |
05:07:47 | FromDiscord | <Elegant Beef> I dont know how, or the exact name, but he did mention it |
05:09:03 | FromDiscord | <JSGrant> I'm always caustiously optimistic / excited for any coad-reloaded-blackmagic |
05:09:11 | FromDiscord | <Rika> coad? |
05:09:13 | FromDiscord | <Rika> code? |
05:09:19 | FromDiscord | <JSGrant> yup, that one lol |
05:09:31 | FromDiscord | <Elegant Beef> coade? |
05:09:37 | FromDiscord | <Rika> toad |
05:10:00 | FromDiscord | <JSGrant> coade, you mean https://github.com/jameysharp/corrode ? |
05:10:18 | FromDiscord | <Rika> ~~such a fitting name~~ |
05:12:01 | FromDiscord | <Zed> How small of a binary can nim compile to? wanting to try out some embedded stuff |
05:12:16 | FromDiscord | <Rika> ~~latest commit 2017, damn rip repo~~ |
05:12:35 | FromDiscord | <Rika> that depends on a lot of factors @Zed |
05:12:51 | FromDiscord | <Rika> what do you need? a gc? etc.etc. |
05:13:06 | FromDiscord | <JSGrant> Honestly though one of the coolest bits for me about Common-Lisp was the fact things like CEPL [https://www.youtube.com/watch?v=a2tTpjGOhjw] were possible -- it's very exciting for me that there seems to be a real / general focus on in-instance code reloading in Nim |
05:13:13 | FromDiscord | <Zed> not exactly sure yet |
05:13:14 | FromDiscord | <Rika> of course, the more modules imported and the more procs used the larger the binary |
05:13:28 | FromDiscord | <Zed> im just trying to geta . fell with what i have to worl with |
05:13:34 | FromDiscord | <Rika> to... what? |
05:13:37 | FromDiscord | <Rika> oh |
05:13:40 | FromDiscord | <Zed> (edit) 'geta .' => 'get a' | 'worl' => 'work' |
05:13:41 | FromDiscord | <Rika> io see |
05:13:43 | FromDiscord | <Rika> (edit) 'io' => 'i' |
05:13:48 | FromDiscord | <Zed> (edit) 'fell' => 'feel' |
05:14:12 | FromDiscord | <Rika> well i remember there was something like a 5kb hello world in nim but that was super heavily stripped and optimized so lol |
05:14:43 | FromDiscord | <JSGrant> Oh, forgot timestamp ... https://youtu.be/a2tTpjGOhjw?t=433 lol |
05:15:08 | FromDiscord | <Zed> does nim compile the entire stdlib within a binary or just what it uses? |
05:15:45 | FromDiscord | <Rika> just what it uses afaik, nim has dead code elimination |
05:16:39 | FromDiscord | <Zed> ok that's good, gives me a bit of room |
05:18:23 | FromDiscord | <Elegant Beef> Nim is rather compact |
05:22:43 | FromDiscord | <Zed> does file count matter in a binary? say i had 5 files and compiled it is that binary going to be larger then a single long file with the contents of those 5 files? |
05:24:02 | FromDiscord | <InventorMatt> I think it'll treat it like it was all one file. I'm pretty sure him doesn't care about quantity of files when compiling |
05:27:14 | * | zama quit (Ping timeout: 256 seconds) |
05:27:47 | FromDiscord | <Rika> him lol |
05:28:10 | * | kenran joined #nim |
05:32:18 | FromDiscord | <Elegant Beef> The new Mascular language Him |
05:33:10 | FromDiscord | <JSGrant> I was thinking more of the 'Powerpuff Girls' Villian |
05:44:17 | * | marnix joined #nim |
05:44:27 | FromDiscord | <InventorMatt> nim version 1.3 will be renamed to him |
05:44:48 | FromDiscord | <Rika> for a moment the word "mascular" wasnt in my mind's dictionary |
05:46:56 | * | solitudesf joined #nim |
06:07:03 | * | tdc joined #nim |
06:08:37 | * | dddddd quit (Remote host closed the connection) |
06:37:36 | * | tefter quit (Quit: WeeChat 2.8) |
06:55:26 | * | PMunch joined #nim |
06:59:07 | FromDiscord | <Zed> Hey Prestige, How many completions does your coc config show? |
07:34:19 | * | Vladar joined #nim |
07:34:39 | * | fredrikhr joined #nim |
08:24:19 | FromDiscord | <exelotl> @Zed I'm using Nim to develop for GBA, it's very good for it! |
08:24:40 | FromDiscord | <Zed> Game boy? |
08:24:40 | FromDiscord | <mratsim> @Zed https://hookrace.net/blog/nim-binary-size/ |
08:25:09 | FromDiscord | <exelotl> Hello world is 15kb, including the font data, text rendering library, etc. |
08:25:22 | FromDiscord | <Zed> Thanks @mratsim I'll check it out |
08:26:19 | livcd | mratsim: excited about the QML endeavor |
08:26:26 | FromDiscord | <Zed> That's pretty small @exelotl |
08:26:48 | FromDiscord | <Zed> Are you doing an optimisations in your code or letting him do it all? |
08:26:50 | livcd | mratsim: did you look at any other alternatives? |
08:27:04 | FromDiscord | <Zed> Do you have a git repo? |
08:27:23 | FromDiscord | <Zed> (edit) 'him' => 'nim' |
08:28:22 | FromDiscord | <exelotl> https://github.com/exelotl/natu/blob/master/examples/hello_world/config.nims |
08:29:36 | FromDiscord | <mratsim> @livcd, the original desktop client was Typescript + React + QT so reusing QT is better |
08:29:43 | FromDiscord | <Zed> Thanks, I'll be back with questions lol |
08:30:01 | FromDiscord | <mratsim> we can't change everything and I guess changing to Nim is already quite a big change for a Go/Clojure/Typescript team |
08:30:21 | FromDiscord | <mratsim> i.e. it's completely different people from the Nimbus team, they have no prior Nim experience |
08:30:42 | FromDiscord | <exelotl> Importantly I'm using --os:standalone --gc:none and various flags such as --checks:off --stackTrace:off (though I think some of these could be replaced by a single -d:danger ? If someone knows please tell me lol) |
08:31:20 | * | Vladar quit (Quit: Leaving) |
08:31:40 | FromDiscord | <mratsim> put them in a nim.cfg so you don't have to type them all the time |
08:32:04 | FromDiscord | <mratsim> in Weave automatically puts threads:on for example: https://github.com/mratsim/weave/blob/master/nim.cfg |
08:32:22 | FromDiscord | <exelotl> Me? They're in a config.nims :P |
08:32:32 | FromDiscord | <mratsim> ah |
08:32:32 | FromDiscord | <mratsim> I see |
08:33:01 | FromDiscord | <mratsim> One day I'll finish my SNES emulator :p |
08:33:22 | FromDiscord | <exelotl> Works out super nicely because I can do `nim build` and it compiles and then uses extra tools to strip the elf and fix the GBA header |
08:34:00 | FromDiscord | <exelotl> Previously I was using a makefile to do all that, and just using nim with --compileOnly x) |
08:36:28 | FromDiscord | <Zachary Carter> @JSGrant - I already have shader reflection and code hot reloading in my engine |
08:36:32 | FromDiscord | <Zachary Carter> working on asset hot reloading now |
08:36:37 | livcd | mratsim: ahh makes sense |
08:37:42 | FromDiscord | <exelotl> @Zed if you have a slightly beefier platform and want to have access to more language features such as seqs, strings, ref objects (and anything else that requires heap allocation), you can try --gc:arc --os:any instead |
08:40:11 | FromDiscord | <exelotl> For GBA that stuff is overkill, performance is crucial so I'm best off with static allocation and avoiding most of the standard library |
08:45:28 | FromDiscord | <exelotl> A nice thing is though, you can still use all those high level features in macros at compile-time. So if you ever need to 'write code that generates code' (pretty useful on embedded), it's not particularly harder than if you were doing so for a desktop program |
08:54:55 | FromDiscord | <mratsim> oh yeah I love my staticFor macros |
09:00:16 | Zevv | tell us about your staticFor macros mratsim |
09:07:37 | * | rnrwashere joined #nim |
09:08:41 | * | kungtotte quit (Ping timeout: 265 seconds) |
09:08:59 | * | rnrwashere quit (Client Quit) |
09:09:56 | * | rnrwashere joined #nim |
09:11:37 | * | neceve_ joined #nim |
09:11:41 | * | rnrwashere quit (Client Quit) |
09:13:20 | * | oddp joined #nim |
09:17:38 | FromDiscord | <mratsim> I wrote more for loop macros than RNGs :p |
09:18:46 | FromDiscord | <mratsim> sent a long message, see https://discordapp.com/channels/371759389889003530/371759389889003532/720930066816565309 |
09:19:35 | FromDiscord | <mratsim> anyway, staticFor is quite simple and quite useful: https://github.com/mratsim/constantine/blob/master/helpers/static_for.nim#L3-L42↵↵Especially in bigint |
09:20:39 | FromDiscord | <mratsim> in bigint you need to to an add with carry, in the core loop, but with a regular for, incrementing the counter will interact with the carry flag as well and would lead to bad code where the internal loop needs to save and restore the carry |
09:20:55 | FromDiscord | <mratsim> for simple loops, the compiler will unroll to avoid that |
09:21:14 | FromDiscord | <mratsim> but more complex loops, like bigint multiplication will still suffer |
09:22:18 | FromDiscord | <mratsim> My other use cases is for testing types that depends on static int or static enums, you can't use a runtime for loop for that |
09:22:39 | Zevv | ah right |
09:23:32 | Zevv | I will steal that I think |
09:24:25 | FromDiscord | <mratsim> I didn't use the "staticFor i in a ..< b:" because I couldn't be bothered with dealing with Nim early symbol resolution |
09:25:05 | FromDiscord | <mratsim> the `in` keywords gets rewritten to ``contains`` in a generic or static proc |
09:25:22 | FromDiscord | <mratsim> so you need to deal with that or rebuild the untyped AST |
09:25:33 | FromDiscord | <mratsim> - rebuild untyped AST canb e done like this: https://github.com/mratsim/weave/blob/master/weave/parallel_macros.nim#L19-L71 |
09:27:14 | FromDiscord | <mratsim> dealing with contains: https://github.com/numforge/loop-fusion/blob/master/loopfusion.nim#L308-L321↵or https://github.com/numforge/laser/blob/master/laser/strided_iteration/foreach_common.nim#L30-L45 |
09:27:55 | Zevv | dude. |
09:27:57 | FromDiscord | <mratsim> I also had an old forLoopStmt rewriting macros somewhere |
09:28:35 | * | vikfret joined #nim |
09:28:44 | FromDiscord | <mratsim> here: https://github.com/status-im/nim-stint/pull/54/files#diff-03195743eb6e5c08e17657455937d697R118 |
09:28:47 | disbot | ➥ Uint - allow compile-time evaluation for all procs ; snippet at 12https://play.nim-lang.org/#ix=2oYj |
09:29:00 | Zevv | it's pretty cool that this is even at all possible, but isn't it all just fragile? |
09:29:47 | FromDiscord | <mratsim> the one in Weave is pretty well tested |
09:30:10 | FromDiscord | <mratsim> in static proc, in generic proc, in normal proc .... |
09:30:25 | FromDiscord | <mratsim> the one in constantine is tested in static/generic/normal and in the VM as well |
09:32:36 | FromDiscord | <mratsim> i.e. I would recommend either one of them: rebuild untyped from the typed AST (i;e. retransform contains back to "in") or just forget the "for i in a ..< b" syntax for simplicity |
09:36:21 | Zevv | the latter :) |
09:47:39 | Araq | so ... what shall I talk about at NimConf? |
09:47:55 | Yardanico | it's obvious isn't it :P |
09:48:19 | Araq | arc/orc? |
09:48:52 | Yardanico | well yeah most people would be interested in that I guess, and how will it affect their code |
09:54:06 | FromDiscord | <Zachary Carter> I'd be interested specifically in how arc makes writing multithreaded code in Nim easier |
09:54:46 | Yardanico | threading with arc still has some bugs left though :P |
09:54:54 | Yardanico | but yeah, it would be nice to talk about that |
09:55:41 | FromGitter | <zetashift> could always talk about yourself Araq, Q&A with the BDFL |
09:56:23 | Araq | Yardanico, which bugs? |
09:58:02 | FromDiscord | <mratsim> I would be interested in DrNim and also the schedule, because it may seem like you are going all over the place |
09:58:07 | Yardanico | https://github.com/nim-lang/Nim/issues/13936 and https://github.com/nim-lang/Nim/issues/13935 still hangs or crashes for me on linux |
09:58:08 | disbot | ➥ SIGSEV encountered when creating threads in a loop w/ --gc:arc ; snippet at 12https://play.nim-lang.org/#ix=2ioe |
09:58:12 | FromDiscord | <mratsim> and openarray as values |
09:58:32 | FromDiscord | <Zachary Carter> does schedule == roadmap? |
09:58:50 | FromDiscord | <mratsim> this: https://github.com/nim-lang/RFCs/milestone/1 |
09:58:59 | FromDiscord | <mratsim> we are 6 months in 2020 |
09:59:29 | Araq | 6 months left :-) |
09:59:36 | FromDiscord | <mratsim> if DrNim is for 2020 it should be added in |
10:00:01 | Araq | it's not for the reason that you just noticed |
10:02:55 | * | abm joined #nim |
10:12:21 | FromDiscord | <exelotl> Will openarrays as values mean I can do e.g. |
10:12:31 | FromDiscord | <exelotl> sent a code paste, see http://ix.io/2oYo |
10:12:47 | FromDiscord | <exelotl> and the generated C structure will be roughly the same? |
10:21:58 | * | haxscramper joined #nim |
10:23:38 | FromDiscord | <Arend | ᛗᚨᚢᚱᛁᛖᛋ> so is the whole borrow checker thing off the table for Nim? |
10:23:53 | FromDiscord | <Rika> ? what do you mean |
10:23:59 | * | monokrom joined #nim |
10:24:51 | * | krux02 joined #nim |
10:25:58 | * | xet7 quit (Quit: Leaving) |
10:26:50 | * | xet7 joined #nim |
10:28:39 | * | NimBot joined #nim |
10:29:31 | * | krux02 quit (Remote host closed the connection) |
10:40:37 | Yardanico | @Arend ^ |
10:43:40 | * | lritter joined #nim |
10:44:54 | Araq | exelotl: exactly |
10:46:51 | FromDiscord | <exelotl> Epic, looking forward to that :D |
10:59:53 | FromDiscord | <Recruit_main707> thats really cool |
11:13:43 | * | Tlanger joined #nim |
11:16:04 | * | Tongir quit (Ping timeout: 256 seconds) |
11:22:56 | * | opal quit (Remote host closed the connection) |
11:24:36 | * | opal joined #nim |
11:29:48 | skrylar[m] | so websockets are kind of annoying |
11:39:42 | * | muffindrake quit (Ping timeout: 260 seconds) |
11:41:33 | * | muffindrake joined #nim |
11:43:33 | skrylar[m] | still poking around with mudstuff. but a lot of people are doing these fancy web clients now, and you need websocket for that, so had to go fiddle around with doing websocket proxying with nim/async |
11:49:57 | Zevv | well, if you abstract them away enough, websockets can be pretty ok |
11:50:12 | Zevv | it's just like machine language, that's pretty annoying as well |
11:51:20 | skrylar[m] | eh. there's some stupid things like 'masking' where they run a useless xor cipher over text, including text over ssl |
11:51:59 | skrylar[m] | the new-ish thing where you can gzip packets is kind of neat |
11:52:38 | Zevv | yeah that masking is funny. Any I always wondered what the hell that magic key in the handshake is for |
11:52:41 | CcxWrk | That particular thing is not there to encrypt but to prevent attacker-chosen plaintext attacks against non-websocket protocols FWIU. |
11:52:49 | * | tane joined #nim |
11:52:55 | Araq | I wonder how often we end up with compression on top of compression |
11:54:02 | skrylar[m] | well i had been looking in to running zlib via wasm before i read you can just do it through a flag |
11:54:15 | * | CcxWrk .o( Or was that WebRTC? I think I'm slightly lost in this mess. ) |
11:54:23 | skrylar[m] | muds have this MCCP thing where you do a telnet negociation and then it compresses server output; some of the bigger mu*s it helps a lot |
11:55:56 | Zevv | I recenly made this for my collueges when I found out they did three layers of encryption: http://zevv.nl/div/dawg.jpg |
11:56:12 | PMunch | Haha :P |
11:56:20 | skrylar[m] | that can be okay if the algs are different |
11:56:27 | Zevv | and they still did it just plain wrong. The keys living in the wrong place |
11:56:46 | Zevv | Now they're rolling out 500K units, all with the same SSL key/cert pair |
11:56:52 | Zevv | because IKE is hard |
11:56:59 | skrylar[m] | hmmh |
11:57:06 | skrylar[m] | client certs i guess |
11:57:12 | Zevv | sure, but still |
11:57:28 | skrylar[m] | server-wise of course it would be the same pair :laugh: |
11:57:51 | Zevv | How do these get provisioned? I don't understand enough about encryption, so I try to follow a few simple rules to be on the same side. #1: private keys should never leave a device or be sent over the network. |
11:58:32 | skrylar[m] | it really varies |
11:58:35 | Zevv | #2: encrypt and store stuff so that I as the engineer do not know how I would access my clients data. Because if I can do this, someone with bad intentions can as well. |
11:58:57 | Zevv | sure, it all varies. |
11:59:18 | skrylar[m] | i've always kinda wanted to play with Vault but i never find the care to |
12:00:30 | skrylar[m] | though i did mess with client cert auth exactly once if i recall; i had a user in a tiny community who had a 0% chance to remember his password and we looked in to just getting him a browser cert |
12:01:11 | skrylar[m] | well and openvpn requires you to mint new keys because the cn on the key is the name on the server |
12:01:26 | bung_ | can I require a js module as proc ? currently it is JsObject |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:35 | * | supakeen joined #nim |
12:12:13 | * | kenran quit (Ping timeout: 264 seconds) |
12:22:20 | * | haxscramper quit (Remote host closed the connection) |
12:22:50 | * | Senny quit (Ping timeout: 260 seconds) |
12:28:27 | * | rockcavera joined #nim |
12:39:48 | FromDiscord | <Technisha Circuit> Why as a proc bung? |
12:40:29 | FromDiscord | <Technisha Circuit> Is there ant specific reason for needing it as a proc? |
12:42:07 | FromDiscord | <Technisha Circuit> (edit) 'ant' => 'a' |
12:42:49 | alehander92_ | you can cast it |
12:43:29 | alehander92_ | using `proc jsAsFunction*[T](handler: js): T {.importcpp: "#".}` |
12:43:50 | alehander92_ | sorry, `handler: JsObject` |
12:44:08 | FromDiscord | <djazz> is it possible to "unexport" a symbol? |
12:44:12 | alehander92_ | and `jsAsFunction[proc: myrettype](..)` |
12:44:34 | alehander92_ | maybe normal `cast` works? i am not sure why i needed this helper but try |
12:45:39 | * | Vladar joined #nim |
12:47:38 | bung_ | Error: cannot instantiate: 'T' |
12:47:46 | bung_ | proc jsAsFunction*[T](handler: js): T {.importcpp: "#".} |
12:47:47 | bung_ | var Container = require("@material-ui/core/Container").default.jsAsFunction |
12:48:54 | bung_ | Technisha Circuit it's normal module exports just one function |
12:54:12 | alehander92_ | bung |
12:54:15 | alehander92_ | please read what write |
12:56:07 | bung_ | oh , I see |
12:58:26 | alehander92_ | sorry man! |
12:58:33 | alehander92_ | so its easy |
12:58:53 | bung_ | you found another way ? |
12:59:00 | alehander92_ | basically this error |
12:59:08 | alehander92_ | happens when you have a generic function |
12:59:16 | alehander92_ | and it can't understand |
12:59:20 | alehander92_ | what is the actual type |
12:59:42 | alehander92_ | if your generic T *only* appears in return |
13:00:00 | alehander92_ | nim can't guess what T is i think |
13:00:09 | alehander92_ | so you need to *always* write it |
13:00:13 | alehander92_ | and they way you do is |
13:00:15 | bung_ | I use your syntax it works |
13:00:25 | alehander92_ | functionname[mytype](arg) |
13:00:29 | alehander92_ | yeah thats cool |
13:00:35 | alehander92_ | but try to understand it |
13:00:38 | alehander92_ | why it happens |
13:01:02 | alehander92_ | e.g. if you define proc a(b: int): T = T.default |
13:01:07 | alehander92_ | you cant call a(2) |
13:01:17 | alehander92_ | you need to call a[string](2) or a[int](2) |
13:02:11 | bung_ | thanks ! got it |
13:02:34 | alehander92_ | but if its proc a[T](b: T): T = b |
13:02:44 | alehander92_ | then you can do a(2) because T appears in *args( |
13:02:58 | alehander92_ | ok man |
13:04:14 | * | PMunch quit (Quit: leaving) |
13:05:41 | bung_ | am thinking it could be as template |
13:06:23 | * | Senny joined #nim |
13:08:00 | FromDiscord | <djazz> working on a nim module for libmpv, the MPV media player (which can be embedded and used with an OpenGL context) https://github.com/daniel-j/nim-mpv/blob/master/examples/simple.nim |
13:08:08 | FromDiscord | <djazz> using nimterop |
13:09:30 | FromDiscord | <djazz> so if you want to make a game and render some video with hardware acceleration, go ahead 😄 |
13:15:05 | * | nsf quit (Quit: WeeChat 2.8) |
13:17:00 | FromDiscord | <djazz> Atleast that is what I am going to do |
13:17:48 | * | Vladar quit (Quit: Leaving) |
13:25:13 | FromDiscord | <mratsim> MPV is GPL so no one would use MPV for a closed source game |
13:25:29 | * | dddddd joined #nim |
13:25:55 | team\andinus | i'm setting up nimforum |
13:27:36 | team\andinus | https://paste.debian.net/1151756/ |
13:28:05 | team\andinus | ^ running "nimble devdb" fails with this, any idea whats wrong? |
13:31:06 | alehander92_ | bung_ maybe! not sure |
13:48:09 | * | nekits quit (Quit: The Lounge - https://thelounge.chat) |
13:49:42 | * | nekits joined #nim |
13:55:14 | Araq | team\andinus: you need to use some special nimble command |
13:55:20 | Araq | but I forgot which one |
13:55:44 | Araq | "nimble --latest" or "nimble --devel", no idea, sorry |
13:57:19 | FromGitter | <phdye> Has anyone been successful using -d:useNimRtl with nimpy ? |
13:58:53 | FromGitter | <phdye> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ee38a1da85de303940c9639] |
14:01:02 | FromGitter | <phdye> Or is there another forum where I should ask nimpy questions ? |
14:02:19 | FromDiscord | <Zachary Carter> why are you using `-d:useNimRtl`? |
14:05:58 | FromGitter | <phdye> Because I am building multiple shared libraries which I wish to use together. |
14:07:44 | FromGitter | <kaushalmodi> @phdye I stumbled upon a similar situation where I wanted to used multiple Nim projects compiled as .so libs to be used with a C tool |
14:08:00 | * | kenran joined #nim |
14:08:14 | FromGitter | <kaushalmodi> I ended up have a wrapper.nim in which I imported all those separate Nim projects and then just compiling one .so for that wrapper.nim |
14:08:39 | FromGitter | <kaushalmodi> To confirm, `nm wrapper.so | rg '\bT '` will show all the procs I intended to export from all those imported libs |
14:08:40 | FromDiscord | <Zachary Carter> okay - what GC are you using phdye? |
14:09:40 | FromDiscord | <Zachary Carter> and what that error means is - nimpy wasn't compiled with those compile options |
14:11:53 | FromGitter | <phdye> Ah, that would make perfect sense. I need to rebuild nimpy with the same options. |
14:12:05 | FromDiscord | <Zachary Carter> yup |
14:12:51 | FromGitter | <phdye> And with respect to GC, I was using the default for now. |
14:13:25 | * | kenran quit (Ping timeout: 264 seconds) |
14:18:58 | FromGitter | <phdye> That doesn't appear to be the issue. nimpy is being compiled based on the import into my file. There are no binaries under ~/.nimble/pkgs/nimpy-0.1.0. |
14:19:37 | FromDiscord | <Zachary Carter> what about ~/.nimble/bin ? |
14:19:44 | FromDiscord | <Zachary Carter> I think that's where nimble sticks binaries anyway |
14:20:05 | FromDiscord | <Zachary Carter> I mean - I imagine it's being compiled with your project if it is a library |
14:20:26 | FromDiscord | <Zachary Carter> and all I can attest to is what the error is reporting happened - but I don't know why it's doing what it's doing |
14:21:38 | FromDiscord | <Zachary Carter> it's happening here it looks like: https://github.com/yglukhov/nimpy/blob/db7d1250cc014541070ec9bd5c1858da5a0f1ecc/nimpy.nim#L217-L220 |
14:22:11 | FromGitter | <phdye> No binaries under ~/.nimble : ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ee38f9224a3382d5d61d316] |
14:23:12 | FromDiscord | <Zachary Carter> well - I have no idea - maybe try to compile one of the nimpy tests with those options and see if the same error gets thrown |
14:23:24 | FromDiscord | <Zachary Carter> I can't see your code so it's hard for me to try to reproduce |
14:26:05 | FromGitter | <phdye> Code is now simply: |
14:26:13 | FromGitter | <phdye> ```import nimpy``` |
14:26:27 | FromGitter | <phdye> just the one line |
14:28:26 | FromGitter | <phdye> Based on gc_common.nim, it seems that threadType is not declared. |
14:30:00 | FromDiscord | <Zachary Carter> maybe file an issue in the nimpy repo? |
14:30:24 | FromDiscord | <Zachary Carter> or ping Yuriy - I think he is in gitter or irc or something |
14:31:23 | alehander92_ | open an issue |
14:31:39 | alehander92_ | he maintains the repo very well |
14:32:27 | bung_ | https://github.com/vitejs/vite |
14:32:46 | FromGitter | <phdye> I shall. Thank you. |
14:32:48 | bung_ | everybody building new bundle tool.. |
14:33:04 | FromDiscord | <Zachary Carter> joy more JS bundlers |
14:33:14 | FromDiscord | <Zachary Carter> /sarcasm |
14:34:27 | bung_ | if not js as default browser language maybe no need these bundle tools. |
14:34:42 | FromDiscord | <Zachary Carter> they're not needed period |
14:34:50 | FromDiscord | <Zachary Carter> regardless of JS |
14:35:06 | FromDiscord | <Zachary Carter> JS doesn't need to be built |
14:35:53 | bung_ | I kind of tired about the frontend ecosystem |
14:35:54 | FromDiscord | <Zachary Carter> I think JS devs just get bored and feel useless so they invent crap to make their lives more difficult |
14:36:32 | FromDiscord | <Zachary Carter> ah! now you're getting int bung_! |
14:37:31 | bung_ | sometimes I feel am not programing but configuring, manage resources. |
14:38:08 | FromDiscord | <Zachary Carter> yeah, that's pretty accurate |
14:38:49 | bung_ | the most horibble thing is change site to this looking or that looking. |
14:39:35 | FromDiscord | <mratsim> frontend dev :/ |
14:40:35 | bung_ | someone feel like that looking , another feel like another looking , that's sad. |
14:41:01 | FromDiscord | <mratsim> I know that from powerpoint presentations :p |
14:41:11 | FromDiscord | <Zachary Carter> all of web dev sucks - backend as well as frontend |
14:41:11 | FromDiscord | <mratsim> this red should be vermillion or Fushia |
14:41:35 | FromDiscord | <Zachary Carter> especially when you work with people that don't have much experience |
14:41:48 | FromDiscord | <Zachary Carter> and love buzz words |
14:43:05 | bung_ | sometimes they just found another site, says lets change to this style, one sentence your week work gone. |
14:44:53 | FromDiscord | <mratsim> charge more so that they think twice efore asking for a style |
14:45:28 | bung_ | ok,I cant say more. |
14:46:23 | bung_ | idk, some kind of power, maybe I just need more power avoiding this kind of thing. |
14:47:24 | bung_ | backend dev seems more pure to me. |
14:49:27 | FromDiscord | <mratsim> In the JS world, one day it's MySQL, another day it's Mongo, another day Cassandra, and then Puppet, Marionnette, Vagrant, Kubernetes :p |
14:57:59 | FromDiscord | <Zachary Carter> IMO just get out of web dev all together if possible |
14:58:20 | FromDiscord | <Zachary Carter> backend isn't much better |
14:59:05 | FromDiscord | <Zachary Carter> it's not that it can't be done well and made exciting |
14:59:21 | FromDiscord | <Zachary Carter> it's that most of the time you have someone who doesn't know much about what their talking about making decisions and your life hell |
15:00:19 | FromDiscord | <Zachary Carter> I think if you get into systems programming or game dev or go work for an amazon, microsoft, google, etc... |
15:00:26 | FromDiscord | <Zachary Carter> you're less likely to encounter those frustrations |
15:00:32 | FromDiscord | <Zachary Carter> but I mean -t here will always be some no matter what |
15:00:44 | FromDiscord | <Zachary Carter> I think webdev just has the most of them |
15:01:27 | bung_ | maybe just because people can easy get into webdev |
15:01:52 | FromDiscord | <Zachary Carter> yup that is definitely one factor - low barrier for entry |
15:02:00 | FromDiscord | <Zachary Carter> and there are a lot more webdev jobs |
15:02:38 | FromGitter | <phdye> Always tons of B.S. in nearly every working environment. Managers do not get to where they are because they are technically competent. That is entirely tangential. |
15:03:17 | FromDiscord | <Zachary Carter> well some moreso than others for sure |
15:03:25 | FromDiscord | <Zachary Carter> I ran into very little at Frogmind |
15:04:45 | FromGitter | <phdye> FYI: with respect to nimpy and -d:useNimRtl, it was a bug in nimpy. I'm submitting a PR. |
15:05:15 | FromDiscord | <Zachary Carter> nice |
15:15:46 | Araq | phdye: please also push for --gc:arc working with nimpy (if it doesn't work already) |
15:21:49 | * | marnix quit (Ping timeout: 265 seconds) |
15:28:06 | * | mwbrown quit (Ping timeout: 265 seconds) |
15:29:26 | FromDiscord | <mratsim> that would be nice, not to have to manage PyObject_incref and friends |
15:30:15 | * | mwbrown joined #nim |
15:39:01 | disruptek | zacharycarter: dude, did you see that both bethesda and take two are hiring? |
15:40:55 | * | endragor quit (Remote host closed the connection) |
15:41:26 | * | endragor joined #nim |
15:46:25 | * | endragor quit (Ping timeout: 264 seconds) |
15:47:19 | * | endragor joined #nim |
15:52:37 | FromDiscord | <Zachary Carter> I've known Bethesda has been hiring for a while - not sure I'd enjoy working there |
15:52:40 | FromDiscord | <Zachary Carter> I should check out take two |
15:52:55 | * | a_chou joined #nim |
15:53:01 | * | endragor quit (Ping timeout: 264 seconds) |
15:53:12 | skrylar[m] | i used arc for a while, but then the compiler went in to a death spiral with my postbox macros in conjunction with async |
15:53:13 | FromDiscord | <Zachary Carter> One of my former bosses is starting a new UK based studio and said that if they get funded he wants to bring me on board |
15:53:20 | FromDiscord | <Zachary Carter> they're talking to investors now - so hopefully that works out |
15:53:44 | FromDiscord | <Zachary Carter> well that's why there's `orc` now |
15:53:46 | skrylar[m] | the polite way to phrase begging for money |
15:54:36 | skrylar[m] | i don't see how orc has anything to do with the compiler crashing. i don't have circuitous references. actually, skpostbox was designed for arc with weak references |
15:54:37 | FromDiscord | <Zachary Carter> I mean, it's not like it's an uncommon practice |
15:54:47 | FromDiscord | <Zachary Carter> yeah but async does |
15:55:08 | skrylar[m] | beg for money on the street, you're a louse and a vagrant. beg for money in a suit, it's entertaining series a funding |
15:55:51 | FromGitter | <bung87> lol |
15:57:16 | skrylar[m] | anyway nothing against your bossman. i just enjoy refusing euphemisms. |
16:04:46 | planetis[m] | hi, does the align pragma doesn't work with uncheckedarray, right? |
16:08:16 | planetis[m] | I have a field declared as ``data {.align(16).}: UncheckedArray[T]`` and when I try to allocate the object, gcc errors "flexible array member in a struct with no named members" |
16:08:26 | * | a_chou quit (Quit: a_chou) |
16:08:42 | FromDiscord | <Recruit_main707> it should be ptr UncheckedArray iirc |
16:08:49 | FromDiscord | <Recruit_main707> nothing to do with align |
16:08:55 | * | kenran joined #nim |
16:08:58 | planetis[m] | doesn't matter |
16:09:10 | planetis[m] | its the last member |
16:09:40 | planetis[m] | my question is related with https://github.com/nim-lang/Nim/issues/14642 |
16:09:42 | disbot | ➥ seq[T] does not respect alignof(T) ; snippet at 12https://play.nim-lang.org/#ix=2oZK |
16:11:06 | * | endragor joined #nim |
16:13:34 | * | kenran quit (Ping timeout: 246 seconds) |
16:18:21 | * | bung_ quit (Quit: Lost terminal) |
16:25:19 | * | nikita` quit () |
16:27:43 | planetis[m] | you are right though, thats the error you would get if you try to put an uncheckedarray anywhere but the end of the struct |
16:29:45 | planetis[m] | wow, I put an dummy field in front and it compiles! |
16:31:38 | * | Vladar joined #nim |
16:33:05 | * | nerthus joined #nim |
16:33:16 | * | nikita` joined #nim |
16:37:46 | * | nerthus quit (Quit: ZNC 1.8.0 - https://znc.in) |
16:41:00 | team\andinus | Araq: both options say unknown option |
16:41:19 | team\andinus | is there a channel for nimforum? |
16:41:29 | Araq | team\andinus: ping dom96 |
16:41:54 | team\andinus | ok thanks |
16:45:24 | * | nerthus joined #nim |
16:46:27 | * | tane quit (Quit: Leaving) |
17:04:01 | planetis[m] | does nim's allocator always align by 16 btw? |
17:04:26 | Araq | yes, since 1.2, I think |
17:19:26 | * | nikita` quit (Quit: leaving) |
17:27:59 | disruptek | everybody is the world is bent. |
17:30:25 | * | vikfret quit (Quit: Leaving) |
17:35:55 | * | nikita` joined #nim |
17:38:49 | * | krux02 joined #nim |
17:42:37 | disruptek | Araq: a tuple result turns into "Result" but then in the proc body we refer to it as `result`. what gives? |
17:47:17 | * | bung joined #nim |
18:09:45 | * | kenran joined #nim |
18:14:33 | * | kenran quit (Ping timeout: 258 seconds) |
18:51:56 | * | kenran joined #nim |
18:54:55 | * | abm quit (Ping timeout: 246 seconds) |
18:57:23 | * | bung quit (Ping timeout: 265 seconds) |
18:57:49 | * | kenran quit (Ping timeout: 264 seconds) |
18:59:41 | Araq | disruptek: I don't understand the question |
19:00:12 | disruptek | when return type is invalid, we add a Result param (not "result"). |
19:01:50 | skrylar[m] | woo. ws->tcp proxy works |
19:02:53 | * | kenran joined #nim |
19:26:30 | * | rockcavera quit (Remote host closed the connection) |
19:29:43 | * | bung joined #nim |
19:34:24 | * | bung quit (Ping timeout: 256 seconds) |
19:38:10 | FromDiscord | <Recruit_main707> might have asked his before, but why setting --header doesnt output the header at the directory instead of in the cache? |
19:39:08 | * | Trustable joined #nim |
19:45:48 | FromDiscord | <KrispPurg> When I await for the body in httpclient, I sometimes get `Error: unhandled exception: No handles or timers registered in dispatcher. [ValueError]`. |
19:46:05 | FromDiscord | <KrispPurg> Any solutions to prevent this? |
19:57:39 | * | brainbomb joined #nim |
20:02:02 | * | vicfred joined #nim |
20:04:04 | * | vikfret joined #nim |
20:11:24 | dom96 | KrispPurg: are you using waitFor in async procs? |
20:24:10 | * | nikita` quit (Quit: leaving) |
20:24:44 | FromDiscord | <KrispPurg> no, I'm using await. |
20:36:03 | * | nikita` joined #nim |
20:40:08 | * | kenran quit (Ping timeout: 256 seconds) |
21:07:34 | * | neceve_ quit (Ping timeout: 240 seconds) |
21:17:57 | * | bung joined #nim |
21:19:00 | * | nikita` quit (Ping timeout: 265 seconds) |
21:22:52 | * | bung quit (Ping timeout: 265 seconds) |
21:30:34 | * | tdc quit (Ping timeout: 256 seconds) |
21:34:34 | * | solitudesf quit (Ping timeout: 240 seconds) |
21:34:47 | Araq | http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1881r0.html#make-functions-nodiscard-by-default C++ is turning into Nim ;-) |
21:40:05 | FromDiscord | <--HA--> sent a long message, see http://ix.io/2p1e |
21:50:44 | * | lritter quit (Quit: Leaving) |
22:05:37 | Araq | strange thing, --HA-- |
22:18:54 | * | Vladar quit (Quit: Leaving) |
22:31:43 | * | NimBot joined #nim |
22:32:14 | * | krux02 quit (Remote host closed the connection) |
22:40:02 | zedeus | I'm working on fixing httpbeast's crosstalk issue that causes serious security issues. It's all working now but some request futures never complete, leading to stalled sockets |
22:40:08 | zedeus | How would I go about troubleshooting that? |
22:42:29 | FromDiscord | <--HA--> I tried to make the most simple example I could to show the behaviour but in the example it worked. That helped me see now that it is not writeFile that is the problem, writeFile is just where I notice the error. It is files being opened in the library I'm using. I'll investigate further. |
22:46:34 | * | fredrikhr quit (Ping timeout: 256 seconds) |
22:48:42 | * | Trustable quit (Remote host closed the connection) |
22:52:32 | * | bung joined #nim |
22:53:59 | FromDiscord | <--HA--> I was able to figure it out. Sorry for the unneccessary messages, I tried for hours without success but putting it here helped. So, thank you for listening 😉 it's resolved now. |
22:56:34 | * | bung quit (Ping timeout: 240 seconds) |
23:35:37 | FromDiscord | <Technisha Circuit> How do i sleep for a few seconds in Nim? |
23:35:50 | FromDiscord | <Technisha Circuit> I also need to make sure it doesn't block the rest of my bot |
23:35:50 | zedeus | call sleep |
23:35:55 | zedeus | call sleepAsync |
23:36:00 | FromDiscord | <Technisha Circuit> Thanks! |
23:36:13 | FromDiscord | <Technisha Circuit> How would i do it in a loop that's not in an asynchronous proc? |
23:36:33 | zedeus | you can't |
23:36:45 | FromDiscord | <Technisha Circuit> Or how would i call an asynchronous proc in a non asynchronous environment |
23:36:47 | FromDiscord | <Technisha Circuit> Oh |
23:36:58 | zedeus | use waitFor, but that blocks |
23:38:07 | FromDiscord | <Technisha Circuit> Hm |
23:38:31 | FromDiscord | <Technisha Circuit> Would it block a discord bot if i put it after the start client? |
23:39:00 | zedeus | it's single-threaded and waitFor blocks the thread for completion |
23:39:10 | FromDiscord | <Technisha Circuit> Hm |
23:39:18 | FromDiscord | <Elegant Beef> Do you have a main loop running infinitely? |
23:39:29 | FromDiscord | <Technisha Circuit> Wdym? |
23:39:29 | FromDiscord | <Elegant Beef> If so just use a non blocking timer |
23:39:42 | FromDiscord | <Technisha Circuit> The loop i want to use is gonna run forever :P |
23:39:44 | FromDiscord | <Elegant Beef> Do you have a `while isRunning` |
23:39:47 | zedeus | why is it not async? |
23:40:36 | FromDiscord | <Technisha Circuit> I wss gonna use `while true` |
23:40:39 | FromDiscord | <Technisha Circuit> :p |
23:40:43 | FromDiscord | <Technisha Circuit> (edit) 'wss' => 'was' |
23:40:48 | zedeus | that's fine |
23:40:48 | FromDiscord | <Elegant Beef> Well then use cpuTime to delay operations |
23:40:56 | FromDiscord | <Technisha Circuit> zedeus wdym? |
23:41:06 | FromDiscord | <Technisha Circuit> How do i use it ;-; |
23:41:18 | zedeus | you can use while true with async, call `asyncCheck` on the proc to make it "run in the background" |
23:41:44 | FromDiscord | <Elegant Beef> I dont know the design but store the time of the last invoktion, then if the current time - time of last invoktion > delay. Run the code |
23:42:03 | FromDiscord | <Rika> do you know of the runForever proc? |
23:42:04 | zedeus | if you need a proc that runs periodically, use asyncdispatch.addTimeer |
23:42:08 | FromDiscord | <Technisha Circuit> No? |
23:42:22 | FromDiscord | <Technisha Circuit> Oh that's useful |
23:42:28 | FromDiscord | <Rika> you can do `asyncCheck someprocthatssupposedtorunforever` then `runForever` no? |
23:42:32 | FromDiscord | <Technisha Circuit> Is it in seconds? |
23:43:02 | zedeus | milliseconds |
23:43:10 | FromDiscord | <Technisha Circuit> ```nim↵asyncdispatch.addTimer = proc() {.async.} =↵ # Code``` |
23:43:15 | FromDiscord | <Technisha Circuit> Is that how it works? |
23:43:24 | zedeus | did you read the documentation? |
23:43:40 | FromDiscord | <Technisha Circuit> Nope, but it's probably a good idea that i do so 😅 |
23:43:43 | FromDiscord | <Technisha Circuit> I'll do it rn |
23:43:44 | zedeus | https://nim-lang.org/docs/asyncdispatch.html#addTimer%2Cint%2Cbool%2CCallback |
23:43:49 | FromDiscord | <Technisha Circuit> Thanks :p |
23:44:07 | zedeus | actually nevermind, Callback is a non-async proc |
23:44:15 | zedeus | but.. your proc wasn't async to begin with, so I guess it's fine |
23:45:04 | FromDiscord | <Technisha Circuit> Oh okay |
23:45:06 | FromDiscord | <Technisha Circuit> Thanks! |
23:45:22 | FromDiscord | <Elegant Beef> But do learn non blocking main loop timers 😄 |
23:45:39 | FromDiscord | <Technisha Circuit> Yeah, I'll have to read up on them later 😅 |
23:46:11 | zedeus | those are great if you want to waste cpu cycles :) |
23:46:24 | zedeus | disruptek: are you around? I could use some help |
23:46:35 | FromDiscord | <Elegant Beef> I mean i tend to do game related stuff, so that's not a waste since im using cpu cycles |
23:46:46 | FromDiscord | <Elegant Beef> And also they work well if you have any other logic on the cpu you dont want to freeze |
23:46:50 | FromDiscord | <Elegant Beef> IE arduino like stuff |
23:46:52 | zedeus | yeah, but in that case you usually have some other event loop that calls your function |
23:46:59 | FromDiscord | <Elegant Beef> This is the basis↵https://play.nim-lang.org/#ix=2p1X |
23:47:11 | FromDiscord | <Technisha Circuit> Does `sleep` accept milliseconds too? |
23:47:12 | FromDiscord | <Elegant Beef> I mean not for delays and the life |
23:47:31 | zedeus | don't call sleep if you're using async on the same thread |
23:47:32 | FromDiscord | <Elegant Beef> Only allow double jumps after X seconds |
23:47:39 | FromDiscord | <Technisha Circuit> Oh okay |
23:47:52 | zedeus | that example is quite bad for performance lol |
23:48:16 | FromDiscord | <Elegant Beef> Yea depends on use case though, plus you can always sleep the cpu for the hz you need |
23:48:22 | FromDiscord | <Technisha Circuit> Should i use osProc for calling system functions? |
23:48:59 | FromDiscord | <Elegant Beef> depends on what you need |
23:49:13 | FromDiscord | <Rika> nice, got parsing a file down from 650 milliseconds to 50-ish milliseconds |
23:49:14 | FromDiscord | <Elegant Beef> Believe OS has only error codes, whilst osProc has stdout |
23:49:25 | zedeus | os has execShellCmd |
23:49:46 | FromDiscord | <Technisha Circuit> Hmmm |
23:49:51 | zedeus | osproc supports that and everything else, like process communication |
23:50:16 | FromDiscord | <Elegant Beef> So if you only need to call something execshellcmd will work, but if you care the response you need to use osproc |
23:50:28 | FromDiscord | <Technisha Circuit> Well, if I'm just calling `git add .;git commit -am "Autocommit";git push`, then I'm assuming execShellCmd would be the best |
23:50:34 | FromDiscord | <Technisha Circuit> Thanks! |
23:50:49 | FromDiscord | <Elegant Beef> Uhh why are you automating commits |
23:50:57 | FromDiscord | <Technisha Circuit> Because data storage |
23:51:13 | FromDiscord | <Technisha Circuit> I'm keeping a backup of all of my data files |
23:51:18 | FromDiscord | <Technisha Circuit> Like JSON data |
23:51:25 | FromDiscord | <Elegant Beef> You're using a git repo to back up your data? |
23:51:34 | FromDiscord | <Technisha Circuit> First I'll have to cd somewhere :P |
23:51:36 | FromDiscord | <Technisha Circuit> Yeah |
23:51:39 | FromDiscord | <Technisha Circuit> A private repi |
23:51:40 | FromDiscord | <Technisha Circuit> Repo* |
23:51:42 | FromDiscord | <Elegant Beef> But.. why |
23:51:49 | FromDiscord | <Technisha Circuit> Because idk where else ;-; |
23:52:14 | FromDiscord | <Elegant Beef> Google drive |
23:52:16 | FromDiscord | <Rika> uh its normal |
23:52:17 | FromDiscord | <Elegant Beef> Dropbox |
23:52:37 | FromDiscord | <Elegant Beef> I mean it's normal for .files for whatever reason |
23:52:40 | FromDiscord | <Elegant Beef> Doesnt mean it's anyless weird |
23:54:17 | FromDiscord | <Technisha Circuit> :P |
23:55:33 | shashlick | Conan only has osx binaries for 10.14 |
23:55:45 | shashlick | What do you do on older osx |
23:56:08 | FromDiscord | <Elegant Beef> Install a good OS |
23:56:10 | FromDiscord | <Elegant Beef> 😄 |
23:56:19 | Prestige | ^ true |
23:57:04 | shashlick | I'm not deciding what others should do - I need to support cross platform |
23:57:24 | FromDiscord | <Rika> what is conan? |
23:57:31 | shashlick | http://Conan.io |
23:57:32 | FromDiscord | <Rika> can you build it for older osx? |
23:57:50 | shashlick | The point is for nimterop to download pre-built binaries from Conan |
23:57:55 | FromDiscord | <Rika> if not, can you use another similar program for older oses if necessary? |
23:58:53 | shashlick | It works but clang complains |