00:00:14 | * | tk quit (Quit: Well, this is unexpected.) |
00:00:38 | * | tk joined #nim |
00:00:41 | FromDiscord | <Elegantbeef> Correct me if i'm wrong but isnt the issue the same even in C? |
00:05:21 | arkanoid | Elegantbeef, no, you can use LGPL libraries inside closed source project, you just need to deliver LGPL'd source code. Dynamic linkage between closed source and LGPL one is suggested for this. To accomplish this, you include LGPL'd headers in closed source project and then dynamic link it |
00:06:13 | arkanoid | with nim there are no separate headers and implementation, your compiled nim code includes all the nim dependencies, no matter the license |
00:06:20 | FromDiscord | <Elegantbeef> I meant that even in C you need the library author to support it, otherwise you have to make the headers? |
00:06:58 | FromDiscord | <Elegantbeef> I mean Nim still has the same capabilities, the author just needs to support it afaict |
00:08:21 | arkanoid | yes but when writing C you generally write headers .h and .c files separately, the main reason is that you use your own .h inside the project itself |
00:09:12 | arkanoid | so the library naturally support delivering headers and compiled binaries separately, just like any package and package-dev in any linux distro |
00:10:24 | arkanoid | for example Qt is LGPL, you can link it dynamically with your closed source project, and deliver your project + sources of the linked Qt library |
00:10:39 | FromDiscord | <Elegantbeef> I mean get on the author is all i can say |
00:10:45 | FromDiscord | <Elegantbeef> Or do it yourself |
00:14:30 | * | noeontheend joined #nim |
00:14:36 | arkanoid | I'm curious on the second approach |
00:19:06 | arkanoid | Actually, it's also important to find out if static linkage breaks the LGPL. It's a grey area apparently. If it is not, so using LGPL nim libraries into close-source nim projects should be possible, given that the original LGPL source (and possibly compiled .o) is delivered with it |
00:21:24 | arkanoid | the other interesting thing to consider here, is if nim cache folder constains generated .c/.o files that are independently build from each used lib, so I can separate closed and lgpl generated C and object files |
00:37:13 | arkanoid | Elegantbeef, I see that this problem is at least 6 years old https://news.ycombinator.com/item?id=8935842 |
00:42:11 | * | vicecea quit (Remote host closed the connection) |
00:42:41 | * | vicecea joined #nim |
00:42:56 | * | noeontheend quit (Ping timeout: 250 seconds) |
00:58:10 | FromDiscord | <auxym> Wait, unless I'm missing something, you can dynamically link in nim too, using `{.dynlib.}`. You do have to generate header-like proc definitions that work sort of like headers. Manually or with c2nim. |
01:02:59 | * | Mister_Magister quit (Quit: bye) |
01:04:40 | * | Mister_Magister joined #nim |
01:15:02 | * | Lord_Nightmare quit (Ping timeout: 240 seconds) |
01:15:10 | arkanoid | auxym, sure, but that's something you do when FFI with C/C++ |
01:15:47 | arkanoid | question is when you have a LGPL nim library that needs to be fulfilled with a closed-source nim application |
01:16:45 | arkanoid | just by doing "import lgpllib" and compiling with default options, you're basically doing static linking from closed-source with lgpl, and that's ok |
01:17:09 | arkanoid | posting now in the forum to ask which options do I have |
01:22:16 | * | Lord_Nightmare joined #nim |
01:23:32 | NimEventer | New thread by Giaco: How to dynamically link LGPL nim library to closed-source nim application?, see https://forum.nim-lang.org/t/8816 |
01:27:12 | FromDiscord | <that_dude> sent a code paste, see https://paste.rs/vXh |
01:31:01 | FromDiscord | <Elegantbeef> does `runProc` return bool? |
01:32:13 | FromDiscord | <that_dude> yes |
01:33:15 | * | krux02_ quit (Remote host closed the connection) |
01:33:38 | FromDiscord | <Elegantbeef> do `echo repr wrapedMeat` and see what the AST is |
01:37:15 | FromDiscord | <that_dude> Are you sure you want this? Because this was just part of the macro |
01:37:40 | FromDiscord | <Elegantbeef> I dont want it |
01:38:03 | FromDiscord | <that_dude> I think it expands to like 600+ lines iirc |
01:38:22 | FromDiscord | <Elegantbeef> How the hell does that little bit of code expand to 600 lines |
01:38:43 | FromDiscord | <that_dude> https://media.discordapp.net/attachments/371759389889003532/932448816483938314/message.txt |
01:38:56 | FromDiscord | <that_dude> Not just the little bit |
01:39:16 | FromDiscord | <Elegantbeef> But it is just a little bit |
01:39:17 | FromDiscord | <that_dude> wrapped meat is basically the main part of the result |
01:39:27 | FromDiscord | <Elegantbeef> you literally create it there |
01:39:41 | FromDiscord | <Elegantbeef> put the echo write after the creation of the variable |
01:39:47 | FromDiscord | <that_dude> Good point |
01:40:29 | FromDiscord | <Elegantbeef> Side note why the hell are you using a template instead of a procedure for `inj_block-wrapper` |
01:40:56 | FromDiscord | <that_dude> because I was doing no calculations in there |
01:41:11 | FromDiscord | <that_dude> Wait |
01:41:39 | FromDiscord | <that_dude> fair point |
01:41:58 | FromDiscord | <that_dude> That said, I don't think it changes it too much rn. I'll write that down tho |
01:43:17 | FromDiscord | <that_dude> sent a code paste, see https://play.nim-lang.org/#ix=3MvW |
01:44:14 | FromDiscord | <Elegantbeef> That's not the `repr` |
01:44:30 | FromDiscord | <that_dude> not tree repr |
01:45:16 | FromDiscord | <that_dude> sent a code paste, see https://paste.rs/3ZQ |
01:45:28 | FromDiscord | <Elegantbeef> Well there you go |
01:45:32 | FromDiscord | <Elegantbeef> Your AST is 100% wrong |
01:46:16 | FromDiscord | <that_dude> Could you please elaborate? also I gtg for a bit so I'll read it then |
01:46:21 | FromDiscord | <Elegantbeef> You have an extra `inj_actions_default` |
01:46:50 | FromDiscord | <Elegantbeef> you're writing `if x: doThing() else: true; inj_actions_default.runProc()` |
01:47:30 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3MvZ |
01:47:34 | FromDiscord | <Elegantbeef> That's invalid AST |
01:47:44 | FromDiscord | <Elegantbeef> So it's going "hey true isnt handled" |
01:57:22 | FromDiscord | <leorize> lgpl only require you to allow relinking with different version of the same library |
01:57:31 | * | Lord_Nightmare quit (Ping timeout: 256 seconds) |
01:58:19 | FromDiscord | <leorize> so yes, you technically can statically link lgpl stuff, as long as your program can be obtained as a collection of objects to be linked, but no one does so in practice |
02:03:16 | FromDiscord | <leorize> arkanoid ^ |
02:04:04 | arkanoid | leorize, thanks but my question is how and if this is currently possible with nim |
02:06:04 | arkanoid | I mean, if I build a nim project, I end up with many object files in cache folder. I can pack them and upload them and that's ok. But if someone wants to replace one of those object file with a different one build from a modified version of the original LGPL nim code, would it work? |
02:16:47 | FromDiscord | <that_dude> Damn. Thanks |
02:21:10 | * | Gustavo6046 joined #nim |
02:24:40 | * | neurocyte0917093 joined #nim |
02:26:56 | * | neurocyte091709 quit (Ping timeout: 250 seconds) |
02:26:56 | * | neurocyte0917093 is now known as neurocyte091709 |
02:30:50 | arkanoid | I am testing custom finalizers using new(result,myFinalizer) with --gc:orc, but I see that some of my custom finalizers al called and some are not. If I do --expandArc:main I see that `=destroy`(objectWherecustomFinalizerIsNotCalled) and `destroy_1`(correctlyWorkingCustomFinalizer) |
02:31:18 | arkanoid | I'm checking that if works or not by echoing something in finalizer |
02:32:49 | arkanoid | what's the difference from `=destroy` and `destroy_1` ? why the second is working but the first is not my custom finalizer? |
02:34:43 | FromDiscord | <demotomohiro> Maybe finalizer is not much tested with orc or arc |
02:35:31 | FromDiscord | <demotomohiro> In arc/orc destructor seems better. |
02:40:29 | arkanoid | demotomohiro, I'm talking about creating objects with https://nim-lang.org/docs/system.html#new%2Cref.T%2Cproc%28ref.T%29 |
02:43:10 | arkanoid | let me try to reduce this to a minimal test, I smell bug here |
02:57:31 | arkanoid | demotomohiro, possibly a problem when using forward declarations |
02:59:43 | * | noeontheend joined #nim |
03:01:05 | arkanoid | just spotted an internal error |
03:20:49 | * | arkurious quit (Quit: Leaving) |
03:30:29 | NimEventer | New thread by Giaco: Unexpected behavior when using custom finalizers + ARC/ORC + RootObj, see https://forum.nim-lang.org/t/8817 |
04:17:47 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3Mwk |
04:18:07 | FromDiscord | <Rika> well it says there no it doesnt |
04:18:16 | FromDiscord | <Rika> you could prollyg et it to work by derefing |
04:18:22 | FromDiscord | <Rika> refobj[].fieldPairs |
04:19:58 | FromDiscord | <ajusa> Ah wasn't sure if ref object counted as an object type, I'll try deferencing |
04:20:32 | FromDiscord | <Rika> they do not |
04:20:49 | FromDiscord | <Elegantbeef> Ref can be anything |
04:21:13 | FromDiscord | <Elegantbeef> `ref int` for instance isnt an object 😛 |
04:50:02 | * | noeontheend quit (Ping timeout: 240 seconds) |
04:57:47 | arkanoid | why can't I declare a destructor for ref type? |
04:58:12 | arkanoid | Error: signature for '=destroy' must be proc[T: object](x: var T) |
05:03:22 | FromDiscord | <Elegantbeef> I dont recall why they cannot, but i do remember there was a workaround |
05:03:31 | FromDiscord | <Elegantbeef> I dont recall what that is either 😀 |
05:06:33 | arkanoid | got my answer: https://forum.nim-lang.org/t/4132#25743 |
05:07:45 | arkanoid | but now I am not sure if I should create non-ref type for each "ref type of RootObj" and declare `=destroy`, or I should stick with finalizer |
05:08:31 | FromDiscord | <Elegantbeef> You can also do the ugly way but yea |
05:10:38 | arkanoid | Elegantbeef: apparently the ugly way does not even work https://play.nim-lang.org/#ix=3Mwv |
05:11:38 | FromDiscord | <Elegantbeef> Are you using `arc/orc`? |
05:11:46 | arkanoid | (is it possible to compile with arc in play.nim-lang?) |
05:11:51 | arkanoid | yes, offline I'm using arc |
05:12:00 | FromDiscord | <Elegantbeef> No it's not |
05:12:49 | arkanoid | oh, wait, I was editing the wrong config.nims, now it works |
05:13:43 | arkanoid | it works also with refc + GC_fullCollect |
05:13:46 | FromDiscord | <Elegantbeef> If you dont want the `FooObj` approach you can do https://play.nim-lang.org/#ix=3Mwx |
05:14:24 | arkanoid | what a ninja trick! |
05:14:45 | FromDiscord | <huantian> is there a mod I can dm about possible scammers |
05:14:50 | arkanoid | btw, I think I've just found that finalizers are flawed |
05:15:14 | FromDiscord | <Elegantbeef> You can ping Yardanico, Pmunch, Impbox |
05:15:20 | FromDiscord | <huantian> kk |
05:31:37 | arkanoid | =destroy seems not called on parent objects |
05:32:32 | arkanoid | https://play.nim-lang.org/#ix=3MwA |
05:33:50 | FromDiscord | <Elegantbeef> Yea this makes sense |
05:34:11 | FromDiscord | <Elegantbeef> `object of FooObj` does not inherit anything but fields |
05:35:23 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3MwB |
05:36:07 | FromDiscord | <Elegantbeef> If you want to make it less tedious you could probably use https://github.com/beef331/oopsie s `super` |
05:38:08 | FromDiscord | <huantian> Yet another amazingly named package by beef |
05:38:27 | FromDiscord | <Elegantbeef> If i have any skill it's coming up with names |
05:38:46 | FromDiscord | <Elegantbeef> Someone had a chess + card game they wanted a name for and my first name was "deckmate" |
05:41:37 | arkanoid | what do you mean with "`object of FooObj` does not inherit anything but fields" ? How this imply not calling super destructor? |
05:42:12 | FromDiscord | <Elegantbeef> I dont know if it's a bug or intended but it's a distinct type |
05:42:26 | FromDiscord | <Elegantbeef> As such calling base procedures is an explicit operation unless there is an overload |
05:42:57 | FromDiscord | <Elegantbeef> Like if you remove the destroy for `BarObj` it outputs the `Foo` message |
05:44:15 | FromDiscord | <huantian> Wonder if making destroy a method works |
05:45:33 | arkanoid | yeah, I do confirm that removing destroy would execute the destroy of the parent class, but while that's working with =destroy, it is not with finalizers |
05:45:41 | FromDiscord | <Elegantbeef> Nah the issue i think is you're overloading or overridding destroy |
05:47:08 | FromDiscord | <Elegantbeef> I've never used a finalizer so no comment |
05:47:39 | arkanoid | check here, n = 2: https://play.nim-lang.org/#ix=3MwE |
05:48:10 | FromDiscord | <Elegantbeef> Yea of course it'd never call the other one |
05:48:14 | FromDiscord | <Elegantbeef> You afterall pass in the procedure in |
05:48:37 | arkanoid | is there another way to link a finalizer? |
05:48:46 | FromDiscord | <Elegantbeef> `proc new[T](a: var ref T; finalizer: proc (x: ref T) {.nimcall.})` the type def is this |
05:48:59 | FromDiscord | <Elegantbeef> Well you''d have to manually call the base |
05:49:05 | arkanoid | I'm not trying to be picky, I just need to find the correct way fo fix a lib while maintaining backward compatibility |
05:49:41 | FromDiscord | <Elegantbeef> Yea i understand i'm just explaining why it's behaving as it is |
05:49:48 | arkanoid | I've just found that finalizers won't work with forward declaraction |
05:49:58 | FromDiscord | <Elegantbeef> The finalizers dont even have to match name, hell they can be anonymous |
05:50:39 | FromDiscord | <Elegantbeef> They do |
05:50:52 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3MwF compiles fine |
05:53:15 | FromDiscord | <Elegantbeef> Anyway you slice it you'll have to call the base finalizers, you could make a `newFinalized` macro which propagates up seeing if there is a finalizer calling it if possible |
05:54:02 | FromDiscord | <Elegantbeef> Which isnt that complex thanks to super being able to get parent objects 🙂 |
06:03:34 | arkanoid | Elegantbeef, check here for example of internal error + silent skip finalize cases for ARC https://forum.nim-lang.org/t/8817 |
06:03:47 | arkanoid | if you think is a bug, I should move it to new github issue |
06:05:18 | * | DeluxeSk8rBird joined #nim |
06:05:28 | FromDiscord | <Elegantbeef> Where's the internal error? |
06:07:52 | FromDiscord | <Elegantbeef> I mean an internal error is always a bug |
06:08:12 | FromDiscord | <Elegantbeef> The compiler never should create an internal error with the exception of things like macros doing stupid things i'd guess |
06:10:05 | FromDiscord | <leorize> even that shouldn't create an internal error |
06:10:24 | FromDiscord | <Elegantbeef> Agreed, but it's the case where you can do the most fuckery |
06:10:53 | FromDiscord | <Elegantbeef> I more just mean it's a bit more acceptable for confuckery of macros to have an internal error versus non fancy user code |
06:11:06 | FromDiscord | <Elegantbeef> Like it's still an issue but it's a more understandabel |
06:11:39 | FromDiscord | <Elegantbeef> Peak beefism, incorrectly writing understandable |
06:14:16 | arkanoid | haha |
06:16:36 | arkanoid | well, here's the shortest version that goes internal error: https://play.nim-lang.org/#ix=3MwO |
06:16:53 | arkanoid | (with --gc:arc, it goes ok with refc) |
06:18:15 | FromDiscord | <Elegantbeef> Odd |
06:20:29 | arkanoid | and here another case where finalizer is not called: https://play.nim-lang.org/#ix=3MwP |
06:21:39 | FromDiscord | <Elegantbeef> The odd thing is this doesnt error https://play.nim-lang.org/#ix=3MwQ |
06:21:42 | FromDiscord | <Elegantbeef> So it's purely with relation to the finalizer magic |
06:24:36 | arkanoid | I'll add this to the list of things that are pushing my willing to use nim for large work project out of scope |
06:26:23 | FromDiscord | <Elegantbeef> I personally dont see why this is an issue but ok |
06:26:49 | FromDiscord | <Elegantbeef> Forward declaring the finalizer doesnt make any sense to me right now |
06:27:26 | arkanoid | Elegantbeef, I reached this bug why spending quite some time finding out why my nimqml based application was leaking, I ended up with this. It took many hours so yes, it is a problem |
06:29:13 | arkanoid | but silent skipping it is even worse, here the nimqml developer went the wrong way adding many leaks depending on the use of forwarding proc or not for finalizer https://github.com/filcuc/nimqml/commit/aaab5dbae4ae5c22d7aab67635f24c54a7f369f6#diff-1dc629e086d3454f1196ccfcc3f365fccc444ab3d70710bd3dd211b5221413b3 |
06:29:16 | * | Doraemon joined #nim |
06:30:06 | FromDiscord | <Elegantbeef> "silent skipping"? |
06:31:00 | arkanoid | yes, like here https://play.nim-lang.org/#ix=3MwP |
06:31:39 | arkanoid | code compiles, works ok for refc, skips `delete` call completely with arc, this only when using forward proc |
06:31:45 | FromDiscord | <Elegantbeef> Of course it's an issue |
06:31:46 | * | NeoCron quit (Ping timeout: 250 seconds) |
06:31:57 | FromDiscord | <Elegantbeef> I dont get why anyone would forward declare these like this |
06:32:21 | arkanoid | https://github.com/filcuc/nimqml/blob/master/src/nimqml/private/constructors.nim |
06:33:33 | arkanoid | for example the nimqml dev preferred to include all the code instead of import, so he ended up with that software architecture https://github.com/filcuc/nimqml/blob/master/src/nimqml.nim |
06:33:54 | FromDiscord | <Elegantbeef> I see |
06:34:10 | FromDiscord | <Elegantbeef> I'll go back to my previous statement |
06:34:44 | FromDiscord | <Elegantbeef> It is indeed an issue that it doesnt work, but jesus this is some code |
06:36:08 | arkanoid | do you think that code smell? |
06:36:29 | arkanoid | I have no clue, I just think it is a C++ pattern |
06:36:32 | FromDiscord | <Elegantbeef> I think it very much isnt written in such a way to be easy to work with |
06:36:54 | FromDiscord | <Elegantbeef> Like https://github.com/filcuc/nimqml/blob/master/src/nimqml/private/qmetaobjectconnection.nim is the entire module |
06:37:35 | arkanoid | yes, he included everything in a single large nimqml file |
06:37:43 | arkanoid | I mean, no import, just include |
06:37:44 | FromDiscord | <Elegantbeef> Yea i know |
06:38:29 | FromDiscord | <Elegantbeef> Imo there isnt much reason to do what they did other than to be silly |
06:38:34 | arkanoid | the fact that status is using that lib made me say "hey should be good" but apparently I'm very good in spotting errors |
06:40:08 | FromDiscord | <Elegantbeef> The worst part about using include is it's so hard to get your bearings |
06:40:24 | FromDiscord | <Elegantbeef> You dont know what's exposed to you, you dont know where anything comes from unless you look at every module before you |
06:42:04 | FromDiscord | <Elegantbeef> Not that I dont have code that smells though |
06:47:47 | arkanoid | I think I want to refactor it all, point is how to maintain backward compatibility |
06:48:44 | FromDiscord | <Elegantbeef> `export` goes brrr |
07:15:12 | arkanoid | :) |
07:19:08 | arkanoid | Elegantbeef, do you think I should open 2 issues for the 2 cases? |
07:20:04 | FromDiscord | <Elegantbeef> Probably |
07:20:11 | arkanoid | ok, thanks |
07:40:09 | * | PMunch joined #nim |
07:47:10 | * | DeluxeSk8rBird quit (Ping timeout: 250 seconds) |
07:52:03 | * | pro joined #nim |
07:57:52 | * | DeluxeSk8rBird joined #nim |
08:01:19 | * | DeluxeSk8rBird1 joined #nim |
08:04:33 | * | DeluxeSk8rBird quit (Ping timeout: 256 seconds) |
08:39:53 | FromDiscord | <mratsim> In reply to @arkanoid "the fact that status": We're moving away from it to pure C++ for the UI layer. |
08:54:44 | * | neurocyte091709 quit (Quit: The Lounge - https://thelounge.chat) |
09:01:34 | * | neurocyte091709 joined #nim |
09:01:48 | * | neurocyte091709 quit (Client Quit) |
09:01:56 | * | pro quit (Quit: WeeChat 3.4) |
09:05:36 | * | neurocyte091709 joined #nim |
09:34:39 | * | DeluxeSk8rBird1 quit (Ping timeout: 256 seconds) |
09:38:23 | * | DeluxeSk8rBird1 joined #nim |
09:44:03 | PMunch | Any reason in particular @mratsim? |
09:51:28 | * | DeluxeSk8rBird1 quit (Remote host closed the connection) |
09:51:43 | * | DeluxeSk8rBird1 joined #nim |
09:52:21 | NimEventer | New post on r/nim by vanyle_: Static analysis tool, see https://reddit.com/r/nim/comments/s60cx1/static_analysis_tool/ |
09:52:52 | arkanoid | mratsim, I'm not sure if trusting NimQml and go with split C++/Nim. I'd like to avoid C++ |
09:53:03 | arkanoid | s/and/or |
09:55:04 | FromDiscord | <mratsim> In reply to @PMunch "Any reason in particular": QT6 support required changing DOtherside and so taking other that lib maintenance.↵↵Also it's hard enough to recruit designers frontend dev with QML and some C++. If we add Nim to the mix it gets really tough. And we need to be really agile on the UI layer since it's what users see first. |
09:56:05 | FromDiscord | <mratsim> Ah and also documentation. If we see weird things happening, we don't have to "how does that translate to Nim, is the issue Nim or really QT/QML" |
09:57:21 | arkanoid | makes sense. I've also read some of your code for desktop client, and I see that it's a lot of setup and delete due to nimqml design |
09:58:25 | PMunch | If only we had Futhark for C++ :P |
09:58:43 | PMunch | That should make Qt work the same as in C++ |
09:59:35 | * | DeluxeSk8rBird1 quit (Ping timeout: 256 seconds) |
10:00:20 | arkanoid | PMunch: it would be wow |
10:01:15 | PMunch | Should work, but converting all the C++ concepts into Nim is going to require some work |
10:01:16 | arkanoid | have you seen my toy project where I wrap gdal library with futhark and load geographical data and draw it with Qt5 Map via nimqml? |
10:01:32 | PMunch | What? No I haven't seen that! |
10:02:23 | arkanoid | PMunch: https://github.com/arkanoid87/nimmap |
10:02:58 | arkanoid | actually is an exercise in learning how to properly use nimqml, I've been cherry picking bugs and leaks so far |
10:03:21 | arkanoid | but at the end it seems to be a nim bug, not a nimqml one |
10:19:31 | * | Gustavo6046 quit (Quit: Leaving) |
10:22:36 | PMunch | Aha, so nlib/gdal is just the output of Futhark? |
10:56:00 | arkanoid | PMunch: yes, and I had to copy it from cache folder due to the vscode/nim check issue. Are you considering changing futhark for vscode users? Saem, autor of the nim version of vscode extension, seems not to agree with futhark using cache folder that way |
10:57:03 | PMunch | Why doesn't they agree that using the cache folder for cache files is a good idea? |
10:57:12 | PMunch | Sounds like a weird thing to oppose |
10:57:50 | PMunch | I guess I could throw in a flag you can put in your nim.cfg to look elsewhere for the cache |
10:59:42 | arkanoid | PMunch: https://github.com/saem/vscode-nim/issues/69 |
11:17:06 | PMunch | Left a reply |
11:23:12 | * | jjido joined #nim |
11:34:05 | NimEventer | New thread by Jarv: Using waitForExit when a timeout is given, on a process blocked by IO, see https://forum.nim-lang.org/t/8818 |
12:07:56 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
13:05:45 | FromDiscord | <inv> How can I make prefetch in Nim ? |
13:05:56 | FromDiscord | <inv> (edit) "How can I make prefetch ... in" added "data from mem" |
13:07:25 | FromDiscord | <inv> (edit) "How can I make ... prefetch" added "manually" |
13:13:01 | szahid | Guys how to write this better? https://play.nim-lang.org/#ix=3MyO |
13:15:41 | FromDiscord | <Rika> First time I’ve seen someone actually use my library wow lmao |
13:15:55 | FromDiscord | <Rika> What looks ugly to you right now? |
13:16:42 | szahid | Suru is yours ? |
13:17:47 | szahid | Nevermind. My script is very.. slow? i have problem with loop i think. |
13:17:51 | FromDiscord | <Isofruit> As somebody with no clue of what the code is supposed to do, do all the variables you declare with var actually have to be mutable? Or would let also do? |
13:19:12 | FromDiscord | <Isofruit> e.g. `url`, `response` and `r` look like they're only read from, as a personal preference thing I like to have only the things mutable that need to be mutable |
13:19:23 | FromDiscord | <Rika> From what I read only the client has to be var |
13:19:44 | FromDiscord | <Isofruit> errors also, afaik you can't add to a seq that isn't var |
13:19:46 | FromDiscord | <ynfle> Is there a way to inject a space in between code block with `nnkEmpty` or somthing like that for repr? |
13:22:22 | FromDiscord | <Rika> In reply to @ynfle "Is there a way": I don’t think so |
13:22:30 | FromDiscord | <Rika> In reply to @szahid "Suru is yours ?": Yup |
13:22:51 | FromDiscord | <Rika> In reply to @szahid "Nevermind. My script is": Maybe remove suru first, I’m skeptical of its performance right now |
13:23:47 | * | adigitoleo quit (Remote host closed the connection) |
13:24:30 | * | adigitoleo joined #nim |
13:26:12 | szahid | Rika. I dont know other ways to count speed of script. I think this is not problem with suru beacuse in python i have the same issue. |
13:29:25 | FromDiscord | <Rika> I noticed this, you’re using wait for… |
13:30:02 | FromDiscord | <Rika> I’m a bit busy right now so if someone helps you while I am gone nice but I’ll help you in a bit otherwise |
13:37:30 | * | jjido joined #nim |
13:39:04 | FromDiscord | <Rika> Ah great ix decided to wipe my progress |
13:39:37 | szahid | :( |
13:43:58 | FromDiscord | <Rika> Second time my progress is wiped, how fun it is to program on a phone |
13:46:42 | PMunch | I really should make it so the playground doesn't blindly refresh if the ix paste fails.. |
13:48:58 | FromDiscord | <Rika> I’m not sure if this compiles fine since the playground kills it, but I think it should |
13:49:00 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=3Mz1 |
13:49:30 | FromDiscord | <Rika> I shall go for a bit again |
13:50:26 | PMunch | @Rika, you wrote a progress bar that slows down performance? :P |
13:51:42 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
13:54:25 | FromDiscord | <Rika> In reply to @PMunch "<@259277943275126785>, you wrote a": I don’t think it’s possible to not? |
13:54:48 | FromDiscord | <Rika> Unless you somehow found 0 cycle instructions |
13:54:54 | PMunch | Well of course |
13:55:04 | PMunch | But one that slows it down more than is to be expected |
13:58:19 | FromDiscord | <Rika> No I’m just extremely not confident |
13:58:30 | FromDiscord | <Rika> It’s probably way better than tqdm |
13:59:11 | szahid | Rika.. What tha hell? form 3it/s to 1k it/s :D |
14:00:35 | FromDiscord | <Isofruit> You just made a 300x performance jump? |
14:00:36 | FromDiscord | <Isofruit> Sounds nice |
14:01:22 | FromDiscord | <hmmm> i want to use rika sama stuff to, what does it do |
14:01:49 | FromDiscord | <Rika> In reply to @szahid "Rika.. What tha hell?": Measure runtime not the for loop |
14:02:06 | FromDiscord | <Rika> It does some extra things out of the measured loop |
14:02:41 | szahid | Rika... do you know some libs for that ? |
14:03:21 | FromDiscord | <Rika> Uh https://nim-lang.org/docs/monotimes.html |
14:17:32 | szahid | :D to much connection to server Connection refused |
14:17:38 | * | Guest9 joined #nim |
14:17:42 | szahid | from 10min to 17seconds :D |
14:17:45 | szahid | Nim <3 |
14:18:09 | * | Guest9 quit (Client Quit) |
14:18:23 | PMunch | Haha, that's the kind of speedup where you start to wonder if you did something wrong and your program just doesn't do anything anymore :P |
14:41:36 | * | xet7 quit (Quit: Leaving) |
14:44:41 | * | arkurious joined #nim |
14:45:20 | * | xet7 joined #nim |
14:47:24 | FromDiscord | <Rika> well the issue with what he did was he didnt use async at all soooo |
14:47:51 | FromDiscord | <Rika> yeah the solution i gave might need some ratelimiting since you might be murdering a server if you had 1297751839741 url nodes |
14:48:08 | PMunch | Aah, good ol' async |
15:01:59 | FromDiscord | <inv> google did not help with Nim's prefetch 😦 |
15:02:29 | FromDiscord | <Rika> ? |
15:02:42 | FromDiscord | <inv> Can I add one C-line into Nim code somehow? |
15:02:46 | FromDiscord | <Rika> yeah sure |
15:02:54 | FromDiscord | <Rika> {.emit: "code".} |
15:03:03 | FromDiscord | <Rika> i think thats the syntax i forgot |
15:03:48 | FromDiscord | <inv> I wanted to test "builtin_prefetch" |
15:15:38 | FromDiscord | <exelotl> @inv since it's function-like you can probably just `importc` it |
15:16:10 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3MzD |
15:16:23 | FromDiscord | <exelotl> that's what I'd try ^ |
15:19:54 | FromDiscord | <inv> Thank you. did not change anything in my case |
15:44:32 | * | noeontheend joined #nim |
15:57:14 | FromDiscord | <Patitotective> I want `chr` to be `\n`, not `\`, How am I supposed to parse the string?↵https://play.nim-lang.org/#ix=3MzP |
16:02:23 | FromDiscord | <Rika> remove the second \? |
16:02:25 | FromDiscord | <Rika> (edit) "\?" => "\\?" |
16:02:43 | FromDiscord | <Patitotective> I can't, that's how I'm getting the string |
16:02:52 | FromDiscord | <Rika> string replace |
16:03:23 | FromDiscord | <Rika> replace the escape code "\n" into the literal '\n' |
16:03:32 | FromDiscord | <Rika> manually i guess, i dont know of any procs that do such |
16:04:27 | FromDiscord | <Patitotective> what about https://nim-lang.org/docs/strutils.html#unescape%2Cstring%2Cstring%2Cstring ? |
16:05:19 | FromDiscord | <Rika> sounds good |
16:07:41 | FromDiscord | <Patitotective> but looking at `parseChar` source it does only get the char at the given index (by default 0), so it will never get `\n` since they're two characters 😕 |
16:08:04 | FromDiscord | <Patitotective> https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/parseutils.nim#L245} |
16:08:12 | FromDiscord | <Patitotective> (edit) "https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/parseutils.nim#L245}" => "https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/parseutils.nim#L245" |
16:08:52 | FromDiscord | <Patitotective> (edit) "get" => "work with" |
16:10:33 | FromDiscord | <Rika> `str = unescape str` after str> |
16:10:34 | FromDiscord | <Rika> (edit) "str>" => "str?" |
16:15:02 | FromDiscord | <Rika> ah i get what you mean |
16:15:08 | FromDiscord | <Rika> ah no i dont |
16:15:09 | FromDiscord | <Patitotective> `unescape` requires `str` to have quotes around the actual string, anyways doesn't work that way either |
16:15:13 | FromDiscord | <Rika> it doesnt |
16:15:24 | FromDiscord | <Rika> unescape(str, "", "") |
16:15:37 | FromDiscord | <Rika> it doesnt seem to replace \n anyway though |
16:16:16 | FromDiscord | <enthus1ast> \\n cannot be in a char (on all systems) since sometimes its two chars |
16:16:22 | * | rockcavera joined #nim |
16:16:22 | * | rockcavera quit (Changing host) |
16:16:23 | * | rockcavera joined #nim |
16:17:13 | FromDiscord | <Patitotective> !eval echo '\n' |
16:17:15 | NimBot | ↵ |
16:17:23 | FromDiscord | <Patitotective> but it does work |
16:18:39 | FromDiscord | <enthus1ast> ok, i meant \\p |
16:19:09 | FromDiscord | <enthus1ast> \\n is not correct for every system btw |
16:19:36 | FromDiscord | <enthus1ast> !eval echo '\\p' |
16:19:37 | NimBot | Compile failed: /usercode/in.nim(1, 9) Error: missing closing ' for character literal |
16:19:47 | FromDiscord | <enthus1ast> ok screw this |
16:20:48 | FromDiscord | <qb> https://play.nim-lang.org/#ix=3MA2 |
16:21:21 | FromDiscord | <Rika> \n may not be correct for every system but that is out of scope |
16:21:51 | FromDiscord | <Patitotective> what i want is to parse an escaped character as `char` type https://nim-lang.org/docs/manual.html#lexical-analysis-character-literals |
16:22:01 | FromDiscord | <Rika> In reply to @qb "https://play.nim-lang.org/#ix=3MA2": use monotimes for benchmarking |
16:22:03 | FromDiscord | <Patitotective> \n was an example |
16:23:24 | FromDiscord | <Rika> @qb https://play.nim-lang.org/#ix=3MA3 |
16:23:36 | FromDiscord | <Rika> ~~not sure where this is from btw, i dont know the context lol~~ |
16:23:52 | FromDiscord | <qb> oh wow |
16:24:06 | FromDiscord | <qb> so the function is actually faster than casting |
16:24:32 | * | lucerne joined #nim |
16:24:44 | FromDiscord | <Rika> i wouldnt know why] |
16:26:18 | FromDiscord | <mratsim> In reply to @inv "Thank you. did not": prefetch doesn't help except when it does |
16:27:32 | FromDiscord | <mratsim> you need to optimize data locality first before prefetch helps |
16:27:33 | FromDiscord | <Rika> lmfao |
16:28:54 | FromDiscord | <mratsim> it also only helps when the processor cannot prefetch based on simple logic (i.e. the next item of a seq). |
16:29:08 | FromDiscord | <mratsim> So it might help with tree algorithms like https://github.com/numforge/laser/blob/e23b5d63f58441968188fb95e16862d1498bb845/benchmarks/random_sampling/fenwicktree.nim#L135-L137 |
16:29:52 | FromDiscord | <mratsim> or more complex algo where you partition work and prefetching before jumping from partition to partition |
16:30:35 | FromDiscord | <mratsim> example: https://github.com/numforge/laser/blob/e23b5d63f58441968188fb95e16862d1498bb845/benchmarks/transpose/transpose_bench.nim#L293 |
16:31:30 | FromDiscord | <mratsim> prefetch was a 10% perf improvement here |
16:32:23 | FromDiscord | <enthus1ast> saw a video lately that talked about execution speed changes based on the position in memory |
16:32:45 | FromDiscord | <enthus1ast> and the author gave a "location randomizer" application, to better benchmark withouth the location bias |
16:33:24 | FromDiscord | <ajusa> Hey mratsim, I was looking at taskpools and was confused by one of the non-goals: does it not support strings as an argument to the task? |
16:33:36 | FromDiscord | <mratsim> In reply to @enthus1ast "saw a video lately": that reminds me of the infamous fibonacci bench in the Nim forum that linked to some weird benchmark artifacts |
16:33:53 | FromDiscord | <mratsim> In reply to @ajusa "Hey mratsim, I was": only if you use arc/orc/boehm |
16:34:36 | FromDiscord | <mratsim> otherwise they are allocated on a thread-local heap and cannot be passed to threads without voodoo ceremony |
16:35:00 | FromDiscord | <ajusa> Ah okay, thanks for clarifying. Neat library, I'll be trying to use it soon! |
16:36:24 | FromDiscord | <mratsim> the voodoo ceremony: https://github.com/nim-lang/Nim/blob/devel/lib/system/channels_builtin.nim#L210-L229 |
16:37:48 | FromDiscord | <Rika> In reply to @mratsim "that reminds me of": huh |
16:37:54 | FromDiscord | <Rika> interestiong |
16:39:41 | FromDiscord | <Patitotective> new question: how can i convert `"\\n"` into `"\n"`? https://play.nim-lang.org/#ix=3MA8 |
16:39:50 | FromDiscord | <Patitotective> !eval echo repr "\n" |
16:39:52 | NimBot | 0x55ebd8f70870"\10"↵"" |
16:40:33 | FromDiscord | <Patitotective> (edit) "https://play.nim-lang.org/#ix=3MA8" => "https://play.nim-lang.org/#ix=3MAb" |
16:40:45 | FromDiscord | <Patitotective> `unescape` doesn't seem to be working |
16:41:04 | FromDiscord | <enthus1ast> i would just build a replacement table (on compile time) |
16:41:11 | FromDiscord | <mratsim> In reply to @Rika "interestiong": this one: https://forum.nim-lang.org/t/4253 |
16:41:45 | FromDiscord | <enthus1ast> then iterate through your string look up the stuff, emit a new string |
16:42:52 | FromDiscord | <Patitotective> In reply to @enthus1ast "then iterate through your": can you give me an example? |
16:42:55 | FromDiscord | <Patitotective> (edit) "can" => "could" |
16:43:12 | * | noeontheend quit (Ping timeout: 250 seconds) |
16:43:42 | FromDiscord | <enthus1ast> not now, i'm on the move sorry |
16:49:23 | FromDiscord | <mratsim> In reply to @enthus1ast "saw a video lately": @Rika https://easyperf.net/blog/2018/01/18/Code_alignment_issues and https://news.ycombinator.com/item?id=18092684 |
16:49:38 | FromDiscord | <mratsim> and @enthus1ast |
16:49:47 | FromDiscord | <Rika> intriguing |
16:51:48 | FromDiscord | <Rika> holy shit man performance is such a fickle beast |
16:55:40 | * | noeontheend joined #nim |
17:14:12 | FromDiscord | <enthus1ast> @Patitotective\: not what i though of initially, but maybe a simple multiReplace could also work here |
17:14:22 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3MAs |
17:15:53 | FromDiscord | <Patitotective> now is time to write all the two characters hex combinations o_o |
17:16:28 | FromDiscord | <enthus1ast> yes this is what i meant with macro, you could loop over all combinations and generate a proc that does this |
17:16:37 | FromDiscord | <enthus1ast> or loop and parse the hex |
17:20:32 | FromDiscord | <Tanguy> In reply to @enthus1ast "saw a video lately": Saw it too https://youtu.be/r-TLSBdHe1A |
17:21:08 | FromDiscord | <Tanguy> Good talk |
17:24:17 | FromDiscord | <Patitotective> In reply to @enthus1ast "yes this is what": but if I don't type `\00` manually i cannot get the actual value so i dont understand what that macrou would do |
17:32:13 | * | vicecea quit (Remote host closed the connection) |
17:32:44 | * | vicecea joined #nim |
17:37:31 | * | pro joined #nim |
17:41:58 | FromDiscord | <enthus1ast> Was working on an example |
17:42:09 | FromDiscord | <enthus1ast> (During trainride) |
17:42:25 | FromDiscord | <Patitotective> (im writing it manually hehe) |
17:42:35 | FromDiscord | <Patitotective> (edit) "hehe)" => "hehe, thanks anyways)" |
17:42:40 | FromDiscord | <enthus1ast> But it's not yet fully done and I have a thight schedule this evening |
17:42:55 | FromDiscord | <enthus1ast> Maybe I can post what I have |
17:43:03 | FromDiscord | <Patitotective> sure 🙃 |
17:54:13 | FromDiscord | <Patitotective> lol https://play.nim-lang.org/#ix=3MAJ |
17:56:59 | * | Lord_Nightmare joined #nim |
18:04:27 | FromDiscord | <Szahid> when should i use proc with parentheses? https://play.nim-lang.org/#ix=3MAQ |
18:06:31 | FromDiscord | <mratsim> when you spot the Spanish Inquisition |
18:07:08 | FromDiscord | <mratsim> you also have `add(x, "Hello")` and `add x, "Hello"` |
18:07:19 | FromDiscord | <sigkill> sent a long message, see http://ix.io/3MAX |
18:07:34 | FromDiscord | <sigkill> How supported is compiling shared libraries for use in C/C++? |
18:08:37 | FromDiscord | <mratsim> The "garbage collector" is type dependent and implementation dependent.↵If you don't use sequences, strings and ref types, there is no garbage to collect and you can't do pure manual memory management. |
18:09:55 | FromDiscord | <mratsim> the default garbage collector is refcounting with cycle detection via mark-and-sweep.↵↵You can use --gc:arc for deterministic refcounting (with the compiler doing escape analysis to avoid inserting useless increment/decrement) |
18:09:59 | FromDiscord | <Szahid> @mratsim Can I use it the way I want? |
18:10:05 | FromDiscord | <mratsim> In reply to @Szahid "<@570268431522201601> Can I": sure. |
18:10:23 | arkanoid | "when you spot the Spanish Inquisition" hahaha |
18:11:55 | FromDiscord | <mratsim> In reply to @sigkill "Hey - i'm looking": That part is because the default garbage collector uses thread-local heaps and so memory has to be reclaimed from the thread that allocated it.↵↵For your use-case, compile with --gc:arc or if you have cycle --gc:orc or if you don't use ref types --gc:destructors |
18:12:05 | FromDiscord | <mratsim> (edit) "In reply to @sigkill "Hey - i'm looking": That part is because the default garbage collector uses thread-local heaps and so memory has to be reclaimed from the thread that allocated it.↵↵For your use-case, compile with --gc:arc or if you have cycle --gc:orc or if you don't use ref types ... --gc:destructors" added "at all" |
18:12:52 | FromDiscord | <mratsim> In reply to @sigkill "How supported is compiling": For the shared libs part, I think the gamedev channel use Nim as plugins the most, can't help on that part. |
18:13:52 | FromDiscord | <mratsim> basically once you compile with --app:lib, before calling Nim functions you need to call NimMain() to initialize some runtime stuff and that's all. |
18:14:47 | FromDiscord | <mratsim> I wonder if with --gc:destructors/--gc:none NimMain() is actually needed and for what. |
18:17:44 | FromDiscord | <mratsim> In reply to @sigkill "Hey - i'm looking": Also you can use Nim pretty much like C and switch to full manual memory management.↵↵That's what I do here wit writing my own low-level memory pool: https://github.com/mratsim/weave/blob/master/weave/memory/memory_pools.nim |
18:19:49 | FromDiscord | <mratsim> On a side note, I've been having fun replacing CMake with Nim: https://github.com/numforge/agent-smith/blob/master/third_party/ale_build.nim↵↵And then calling the built stuff: https://github.com/numforge/agent-smith/blob/master/third_party/ale_wrap.nim |
18:23:49 | FromDiscord | <ajusa> In reply to @ajusa "Ah wasn't sure if": Hm, I might be doing something wrong but treeform somehow has this figured out in jsony, as far as filling in a ref object using fieldPairs |
18:25:25 | FromDiscord | <sigkill> ok - pinged the gamedev channel. |
18:28:12 | FromDiscord | <sigkill> In reply to @mratsim "On a side note,": lol this is neat |
18:29:01 | FromDiscord | <ajusa> In reply to @ajusa "Hm, I might be": figured this out differently from treeform, though I have no clue how well it works. |
18:31:14 | * | Gustavo6046 joined #nim |
18:47:13 | FromDiscord | <hmmm> In reply to @Szahid "when should i use": I always use parentheses 😃 , I have an irrational fear things will crash and burn without them |
18:47:58 | FromDiscord | <leorize> still needed in case you import any module that have code to be run at top-level scope↵(@mratsim) |
18:54:06 | * | jjido joined #nim |
19:04:56 | * | krux02_ joined #nim |
19:05:26 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
19:08:12 | * | pro quit (Quit: WeeChat 3.4) |
19:42:36 | * | noeontheend quit (Ping timeout: 250 seconds) |
19:44:23 | * | Lord_Nightmare quit (Ping timeout: 256 seconds) |
19:46:30 | * | noeontheend joined #nim |
20:10:56 | FromDiscord | <Patitotective> I was wondering which GUI library is a good choice for making not-so small applications? With active development and various widgets |
20:11:16 | * | jjido joined #nim |
20:15:15 | * | jjido quit (Client Quit) |
20:17:18 | FromDiscord | <leorize> what platforms are you planning to run it on? |
20:19:06 | FromDiscord | <Patitotective> ubuntu and windows |
20:19:09 | FromDiscord | <Patitotective> (edit) "ubuntu" => "linux (ubuntu)" |
20:19:21 | FromDiscord | <Patitotective> mainly linux |
20:19:41 | FromDiscord | <leorize> wxwidgets and/or qml is gonna work for x-platform |
20:19:51 | FromDiscord | <leorize> gintro is great for linux |
20:20:28 | * | dtomato joined #nim |
20:21:21 | FromDiscord | <Patitotective> i was looking at https://github.com/yglukhov/nimx too but i guess the ones you are saying are in a stabler state |
20:32:46 | arkanoid | Patitotective, qt + nimqml? |
20:33:22 | * | adigitoleo quit (Remote host closed the connection) |
20:33:41 | FromDiscord | <Patitotective> when you say qt, do you mean actual c++ code? |
20:34:05 | * | adigitoleo joined #nim |
20:39:49 | FromDiscord | <01> what's your favorite framework for making native android apps? |
20:41:03 | FromDiscord | <Patitotective> In reply to @01 "what's your favorite framework": ~~kivy~~ |
20:41:20 | FromDiscord | <01> nice |
20:41:29 | FromDiscord | <01> i don't meet a lot of people who use Kivy |
20:41:40 | FromDiscord | <Patitotective> actually i dont make mobile applications |
20:42:19 | FromDiscord | <Patitotective> but kivy seems the best mobile framework for python, dont know for nim |
20:43:22 | FromDiscord | <01> i'm not really asking in context of nim tbh |
20:43:40 | FromDiscord | <01> as i don't expect any viable framework for nim, maybe something that compiles to JS, but that's hardly "native" |
20:43:59 | FromDiscord | <Patitotective> gintro? |
20:45:00 | FromDiscord | <Elegantbeef> There are always webviews |
20:45:26 | FromDiscord | <Patitotective> https://github.com/Niminem/Neel |
20:48:16 | FromDiscord | <Elegantbeef> Ehh that uses chrome as a library |
20:49:08 | FromDiscord | <Elegantbeef> https://github.com/marcomq/nimview doesnt rely on chrome |
20:51:29 | FromDiscord | <Patitotective> also how is https://github.com/nim-lang/ui going? doesnt seem too active |
20:52:44 | FromDiscord | <HuskyHacks> Where can I find information on the linking options? Is there official documentation on static linking vs dynamic linking? |
20:55:43 | FromDiscord | <mratsim> In reply to @HuskyHacks "Where can I find": https://nim-lang.org/docs/nimc.html#dynliboverride↵↵static means embedding the dependency in the app, dynamic means linking against the system DLL or .so (you can read any C documentation) |
20:56:02 | FromDiscord | <HuskyHacks> excellent, thank you for the ref |
21:06:20 | * | joast quit (Quit: Leaving.) |
21:15:20 | * | noeontheend quit (Ping timeout: 250 seconds) |
21:24:26 | * | joast joined #nim |
21:26:40 | FromDiscord | <auxym> In reply to @Patitotective "also how is https://github.com/nim-lang/ui": The wrapped library itself is considered "mid-alpha" by its own readme and last commit was a year ago: https://github.com/andlabs/libui. I'd use wxnim personally... |
21:37:12 | * | yassernasc joined #nim |
21:37:23 | FromDiscord | <inv> I have a question: I have type T = object = a: byte, b: int↵then I have let v = seq[T]↵↵I want to make a template I can pass field name and to make smth like for example sum of fields a on the `v`. But I cannot find any good way - just to generate smth like sumA and sumB function, which does not look good |
21:48:07 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3MC2 |
21:50:41 | * | jjido joined #nim |
21:50:43 | FromDiscord | <Elegantbeef> @inv\: There you go |
21:55:06 | * | yassernasc quit (Remote host closed the connection) |
22:34:51 | FromDiscord | <sigkill> sent a code paste, see https://play.nim-lang.org/#ix=3MCg |
22:35:52 | FromDiscord | <Elegantbeef> They already do |
22:36:07 | FromDiscord | <Elegantbeef> But they're only predictable with `--gc:arc` or `--gc:orc` |
22:36:17 | FromDiscord | <sigkill> the doc describes them as upcoming |
22:36:20 | FromDiscord | <sigkill> is it just out of date? |
22:36:47 | FromDiscord | <Elegantbeef> the "new runtime" is used with arc/orc so yes |
22:36:58 | FromDiscord | <Elegantbeef> Though the new runtime isnt defaulted yet so maybe not |
22:37:12 | FromDiscord | <mratsim> In 1.6 they are the default |
22:37:18 | FromDiscord | <mratsim> no? |
22:37:32 | FromDiscord | <mratsim> In reply to @Elegantbeef "But they're only predictable": also --gc:destructors 😉 |
22:38:02 | FromDiscord | <mratsim> In reply to @sigkill "the doc describes them": that was written 2 years ago. |
22:38:25 | FromDiscord | <Elegantbeef> is the new runtime defaulted in 1.6?↵(@mratsim) |
22:38:34 | NimEventer | New thread by Elcritch: Should constructors be `newObject` or `initObject`?, see https://forum.nim-lang.org/t/8819 |
22:39:10 | FromDiscord | <sigkill> sent a long message, see http://ix.io/3MCi |
22:39:37 | FromDiscord | <mratsim> In reply to @Elegantbeef "is the new runtime": destructors are, as are seq and strings backed by destructors |
22:40:12 | FromDiscord | <Elegantbeef> Orc is arc + cycle collector |
22:40:38 | FromDiscord | <Elegantbeef> Hence the `O` indicating a cycle 😛 |
22:42:10 | FromDiscord | <mratsim> sent a long message, see http://ix.io/3MCj |
22:42:33 | FromDiscord | <mratsim> (edit) "http://ix.io/3MCj" => "http://ix.io/3MCk" |
22:42:54 | FromDiscord | <mratsim> (edit) "http://ix.io/3MCk" => "http://ix.io/3MCl" |
22:44:12 | FromDiscord | <mratsim> You can implement your own refcounting scheme, including with that elision like this:↵↵https://github.com/mratsim/weave/blob/master/weave/cross_thread_com/flow_events.nim#L173-L201 |
22:44:23 | FromDiscord | <mratsim> (edit) "scheme," => "scheme (say you need atomic refcounting)," |
22:55:59 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
23:18:17 | * | noeontheend joined #nim |
23:21:47 | * | PMunch quit (Quit: leaving) |