00:11:53 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=BREoVBHu |
00:13:16 | FromDiscord | <heysokam> supossedly inherited, but actually not? or am I misunderstanding something đ€ https://media.discordapp.net/attachments/371759389889003532/1405705866363146422/image.png?ex=689fcd1b&is=689e7b9b&hm=bc8ed39ebc33c72b0e4b739d9355e8784a9234a3d881c7ecf075782fdaa0de14& |
00:13:47 | FromDiscord | <leorize> did you set poUsePath option? |
00:14:02 | FromDiscord | <heysokam> all defaults, whatever they are |
00:14:58 | FromDiscord | <leorize> I think you already pasted what the defaults are |
00:17:15 | FromDiscord | <heysokam> yep, poUsePath was what was missing, ty leo |
00:17:40 | FromDiscord | <heysokam> spawned too many processes, and crashed my computer :whoops: đ |
00:25:47 | FromDiscord | <heysokam> is there any existing function on the stdlib to parse escaped strings? |
00:26:14 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=BcllmaWo |
00:26:59 | FromDiscord | <leorize> there wouldn't be any one function to do that |
00:27:01 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/strutils.html#unescape%2Cstring%2Cstring%2Cstring |
00:27:06 | FromDiscord | <leorize> everyone does escaping a tiny bit differently |
00:33:30 | FromDiscord | <heysokam> much better, ty ty https://media.discordapp.net/attachments/371759389889003532/1405710957879234640/image.png?ex=689fd1d9&is=689e8059&hm=0320a1d415f2921c69fd4011ad44f42496f69f5a62055715f3755bbe93507b69& |
01:00:42 | FromDiscord | <mayendradwika> guys what recommend a project for a newbie |
01:01:26 | FromDiscord | <mayendradwika> i do cli |
01:33:19 | FromDiscord | <Robyn [She/Her]> text adventureâ”(@mayendradwika) |
02:47:01 | * | amadaluzia quit (Ping timeout: 276 seconds) |
02:52:21 | FromDiscord | <zumi.dxy> sent a code paste, see https://play.nim-lang.org/#pasty=jhjcyuHm |
02:54:07 | * | amadaluzia joined #nim |
02:56:16 | FromDiscord | <leorize> nope |
02:56:38 | FromDiscord | <leorize> you technically can use `range[A..B]` |
02:57:02 | FromDiscord | <leorize> but always beware of returning that, because it is viral |
02:57:14 | * | amadaluzia quit (Read error: Connection reset by peer) |
02:57:16 | FromDiscord | <heysokam> In reply to @zumi.dxy "quick question if I've": https://play.nim-lang.org/#pasty=ftGxAJIO |
02:57:34 | * | amadaluzia joined #nim |
02:57:38 | FromDiscord | <leorize> say someone do `let x = something(); echo x.succ`, if something returns B, this code will crash |
02:57:40 | FromDiscord | <heysokam> wdym by viral, leo? |
02:58:50 | * | amadaluzia quit (Remote host closed the connection) |
02:59:01 | FromDiscord | <leorize> the guarantee of your return range infected the consumer and now a variable they put that value into will also carry that restriction |
02:59:29 | FromDiscord | <leorize> it's the same reason `len()` doesn't return `Natural`, for example |
02:59:37 | FromDiscord | <zumi.dxy> range is its own type right?â”like here it can't be decomposed into `One`? |
02:59:47 | FromDiscord | <leorize> because `x.len - 1` will crash on empty |
03:00:01 | * | amadaluzia joined #nim |
03:01:01 | FromDiscord | <leorize> you can convert range back to the base type implicitlyâ”(@zumi.dxy) |
03:03:39 | FromDiscord | <zumi.dxy> yeah I'll suppose I'll have to remember to do `let x: One = thing()` instead of `let x = thing()` |
03:04:43 | FromDiscord | <zumi.dxy> also since it's a range I guess that also means I'll have to sort my enum accordingly? |
03:05:18 | FromDiscord | <zumi.dxy> holeful enums are out of the question I assume |
03:05:25 | FromDiscord | <leorize> yes |
03:14:26 | * | rockcavera quit (Remote host closed the connection) |
03:17:34 | * | amadaluzia quit (Quit: You) |
03:56:23 | FromDiscord | <tomexmachina> the current state of Nim's concurrency model (what one should and shouldn't use) is very confusing. I used Nim a lot pre-2.0, and made extensive use of async patterns. Now I have a need for threads. If anyone can point me to a recent docs or post that will provide concrete direction, I'd appreciate it. |
04:12:53 | FromDiscord | <leorize> ~~the answer is to cry~~ |
04:20:29 | FromDiscord | <tomexmachina> https://forum.nim-lang.org/t/13322#80966 |
04:20:44 | FromDiscord | <tomexmachina> (edit) "https://forum.nim-lang.org/t/13322#80966" => "https://forum.nim-lang.org/t/13322" |
04:21:30 | FromDiscord | <tomexmachina> i guess it's await moderation or something |
04:25:31 | FromDiscord | <tomexmachina> here you go: https://gist.github.com/bitnom/43ec702b130048ddf18d1243d44ba306 |
04:27:25 | FromDiscord | <leorize> so even deep research couldn't figure out cps \:p |
04:28:39 | FromDiscord | <tomexmachina> In reply to @leorize "so even deep research": should I point it to some URLs and tell it to revise? |
04:29:11 | FromDiscord | <tomexmachina> It's fine to have all these issues. I just need to know them well |
04:30:13 | FromDiscord | <leorize> not that I blame it, tbh |
04:30:14 | FromDiscord | <leorize> fyi we already achieved an async/threading runtime with cps |
04:30:14 | FromDiscord | <leorize> the catch\: it doesn't work with nim \>2.0 |
04:31:54 | FromDiscord | <leorize> the reason I don't blame it is because most of these information are not directly linked to nim and/or stuck in discord |
04:32:10 | FromDiscord | <leorize> you can give it these and see if it could figure something outâ”â https://github.com/nim-works/cpsâ”â https://github.com/disruptek/insideout |
04:40:29 | FromDiscord | <tomexmachina> updated: https://gist.github.com/bitnom/43ec702b130048ddf18d1243d44ba306 |
04:41:32 | FromDiscord | <tomexmachina> plz lmk if it's doing some dumb shit |
04:41:54 | FromDiscord | <Elegantbeef> It's AI it's dumb |
04:42:35 | FromDiscord | <tomexmachina> In reply to @Elegantbeef "It's AI it's dumb": sure, but sometimes it pretends good enough to be useful |
04:51:23 | FromDiscord | <tomexmachina> damn so do I go pre 2.0 or use libraries? and which libraries? Malebolgia isn't a one size fits all threading library from what I can tell. I don't even remember what I would be giving up pre-2.0 |
05:26:15 | FromDiscord | <tomexmachina> I don't want to rust. i'll do anything đ |
05:39:27 | FromDiscord | <Robyn [She/Her]> In reply to @tomexmachina "damn so do I": Could use Nimskull + Cps |
05:49:09 | FromDiscord | <tomexmachina> In reply to @battery.acid.bubblegum "Could use Nimskull +": I barely remember it but I had it starred. it's in good shape? |
06:13:28 | FromDiscord | <zumi.dxy> it's in active development yeahâ”seems to be somewhat experimental last I checkedâ”and there's the whole "won't be compatible with nim" thing, may or may not be a consideration |
08:18:14 | * | skippy8 joined #nim |
08:47:20 | * | beholders_eye joined #nim |
10:53:56 | FromDiscord | <xtrayambak> Is there a way to ensure that a destructor to `X` is called for cleanup even if a `ref X` or `ptr X` is passed to another thread? |
11:03:57 | * | SchweinDeBurg quit (Ping timeout: 260 seconds) |
11:13:58 | * | SchweinDeBurg joined #nim |
11:14:33 | * | zgasma quit (Quit: Lost terminal) |
11:40:24 | FromDiscord | <0xfab_10> not sure how stable `ref`s are in multithread but you could always implement your own atomically reference counted container for heap allocated objects |
11:41:07 | FromDiscord | <albassort> In reply to @xtrayambak "Is there a way": i highly doubt it, IPC between threads can be very leaky, really, no matter what answer you get, i really recommend you test it |
11:41:08 | FromDiscord | <0xfab_10> kinda like this https://github.com/fabricio-p/nanobeam/blob/main/src/nanobeam/arc.nim |
11:41:15 | FromDiscord | <albassort> @Phil did some testing relevant |
11:41:20 | FromDiscord | <albassort> (edit) "@Phil did some testing relevant ... " added "a year ago or smth" |
11:42:37 | FromDiscord | <albassort> me personally, every single object I pass between threads I do the followingâ”1. allocate sharedâ”2. deepcopy and destroy if applicable â”3. free on the other end |
11:42:43 | FromDiscord | <albassort> (edit) "me personally, every single object I pass between threads I do the followingâ”1. allocate sharedâ”2. deepcopy and destroy if applicable â”3. free on the other end ... " added "when not in use" |
11:43:51 | FromDiscord | <albassort> also nim's allocator doesn't usually free memory back to the system, keep that in mind |
11:44:17 | FromDiscord | <albassort> (or didn't?) |
11:45:02 | FromDiscord | <0xfab_10> there's `--useMalloc` |
11:45:13 | FromDiscord | <0xfab_10> I think that one does? not sure |
11:46:34 | * | przmk quit (Ping timeout: 252 seconds) |
11:51:19 | FromDiscord | <Phil> Nim's allocator and memory passing are 2 separate issues |
11:51:26 | FromDiscord | <Phil> When you work with threads, you must useMalloc or you're in for leaks |
11:51:58 | FromDiscord | <Phil> Nim's default allocator just does not work well in multithreaded scenarios, this might've been fixed in the meantime, but it was a strong issue when I played around with threads |
11:53:52 | FromDiscord | <Phil> Memory passing in general... I couldn't find a decent answer to this really. At least I couldn't get anything beyond a non-trivial program to run without address and thread sanitizer yelling at me.â”Personally I'd always go with the deepcopy approach. Don't even bother trying to move ownership unless you really know what you're doing (I didn't), deepcopying is far, far, far easier and safer |
11:54:13 | FromDiscord | <Phil> (edit) "approach. Don't" => "approach for passing data from thread A to thread B. â”Don't" |
11:56:21 | * | nils` quit (Ping timeout: 276 seconds) |
11:58:52 | * | beholders_eye quit (Ping timeout: 276 seconds) |
12:00:01 | * | przmk joined #nim |
12:00:20 | FromDiscord | <xtrayambak> In reply to @albassort "i highly doubt it,": yeah, I just ended up turning it into a manual `close()` proc |
12:10:55 | * | beholders_eye joined #nim |
12:11:25 | * | przmk quit (Remote host closed the connection) |
12:11:54 | * | przmk joined #nim |
12:44:43 | * | amadaluzia joined #nim |
13:05:21 | * | beholders_eye quit (Ping timeout: 248 seconds) |
13:07:09 | * | beholders_eye joined #nim |
13:40:16 | FromDiscord | <albassort> hey guys wtf is std/tasks |
13:41:36 | FromDiscord | <albassort> it says its for parallelized programs but parallelism isn't demonstrated in the example and i doubt it calls jump |
13:47:27 | FromDiscord | <nervecenter> In reply to @albassort "hey guys wtf is": Looks like it's primitives for isolating procedures but not actually dispatching them to threads |
13:47:38 | FromDiscord | <nervecenter> Nim's parallelism story is very fragmented right now |
13:47:57 | FromDiscord | <albassort> taskman goes brr |
13:48:15 | FromDiscord | <albassort> i have been doing a lot of parallelism in nim for years, it works |
13:48:22 | FromDiscord | <albassort> but... uhh |
13:48:27 | FromDiscord | <nervecenter> oh, then you know more than me |
13:48:30 | FromDiscord | <albassort> works is as far as i would put it |
13:49:24 | FromDiscord | <albassort> we have async and asyncdispatch but its leaky and bug prone esp when used with threads and causes deep ownership issues, i prefer using taskman when possible but it leaves the IO problem yet unsolved đ |
14:00:34 | FromDiscord | <Phil> In reply to @albassort "works is as far": It only works if asan and tsan say you have no error |
14:27:04 | * | beholders_eye quit (Ping timeout: 276 seconds) |
14:31:21 | * | nils` joined #nim |
14:31:55 | * | skippy8 quit (Ping timeout: 260 seconds) |
14:35:24 | FromDiscord | <griffith1deadly> In reply to @albassort "we have async and": weave io? |
14:53:57 | FromDiscord | <odexine> In reply to @isofruit "It only works if": technically not necessarily, it doesnt work if asan and tsan says you have an error (and you check if its not spurious) but the converse doesnt hold true |
14:54:11 | FromDiscord | <odexine> oh wait im supposed to be dead oooooooo im a ghost đ» |
15:06:39 | FromDiscord | <thearchivalone> In reply to @Elegantbeef "https://github.com/beef331/nimassimp/ is what I": Are you still using this? How usable is it right now? |
15:30:11 | FromDiscord | <albassort> In reply to @isofruit "It only works if": nah valgrind says all freed that should be freed then its good enough for me |
15:37:00 | FromDiscord | <Phil> In reply to @albassort "nah valgrind says all": That only tells you that you don't leak memory, it does not tell you if you have dataraces.â”And dataraces mean potentially random crashes that will be impossible to debug |
15:37:22 | FromDiscord | <Phil> If you don't wanna do tsan, do hellgrind which is the equivalent tool in valgrind đ |
15:38:10 | FromDiscord | <albassort> Phil, let me tell you something |
15:38:15 | FromDiscord | <albassort> im afraid to check |
15:38:27 | FromDiscord | <albassort> because then i'll just gaslight myself into writing everything in C |
15:38:29 | FromDiscord | <Phil> I know, I was as well and eventually failed on getting tsan correct for complex topics |
15:38:58 | FromDiscord | <albassort> people hate C but im fond of her height |
15:56:29 | FromDiscord | <naitsabot> sent a code paste, see https://play.nim-lang.org/#pasty=PBlJwLUa |
16:00:04 | * | zgasma joined #nim |
16:06:46 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "we have async and": could try and use selectors when IO stuff is needed |
16:32:27 | FromDiscord | <nasuray> In reply to @naitsabot "Am i going crazy?": ignore the `src/` in the docs that's some artifact with how it's being built/included in the compiler repo. When you compiled the second version did the compiler pick up the flag `--noNimblePath` anywhere? |
16:53:00 | FromDiscord | <lainlaylie> `nimble setup` generates a config that adds that flag. i think `nimble build` also calls nim with that flag |
16:53:17 | FromDiscord | <lainlaylie> make sure youve required it in your nimble file |
17:00:08 | * | beholders_eye joined #nim |
17:05:21 | FromDiscord | <thearchivalone> Anyone else using Nimble as a self contained build tool? I'm surprised at how easy it was to bootstrap from an old version to a new one and embed it in my current project. It just downloads most of the things needed and then builds itself (making worrying about sharing builds for multiple platforms less of an issue). It still has work to be done and could be optimized quite a bit. Haha |
17:08:31 | FromDiscord | <Robyn [She/Her]> I just don't use Nimble :p |
17:14:15 | FromDiscord | <thearchivalone> I am but a simple man. đ |
17:17:39 | FromDiscord | <heysokam> In reply to @bugcrowd_tao "Anyone else using Nimble": I did, and abandoned it. Not worth the trouble as a build tool. its only really a package manager |
17:17:58 | FromDiscord | <albassort> In reply to @battery.acid.bubblegum "I just don't use": ?? |
17:18:21 | FromDiscord | <heysokam> I created confy and moved all my stuff to it, if you want to check it outâ”https://github.com/heysokam/confy |
17:25:35 | FromDiscord | <thearchivalone> As someone who loves Buck for the same reasons, you just introduced chaos into my life. That may be a future addition now |
17:27:41 | FromDiscord | <thearchivalone> Buck was one of Facebook's answers to problems they had with multiple build systems, especially what Google offered, and it was love at first sight for me when I do anything with C or C++ |
17:28:30 | FromDiscord | <Elegantbeef> The best build system is `.fish`, if you need anything more complex I don't want to see your code |
17:29:32 | FromDiscord | <thearchivalone> Fish, the shell script interpreter? |
17:29:43 | FromDiscord | <Elegantbeef> Yes |
17:29:53 | FromDiscord | <thearchivalone> â€ïž |
17:30:31 | FromDiscord | <thearchivalone> Fish is so fun (but also something I put way too much time into years back to the point of getting nothing done) |
17:30:48 | FromDiscord | <Elegantbeef> I'm only slightly joking, I do not want to see anything complicated that cannot be replicated by a shell script and 30 minutes |
17:31:03 | FromDiscord | <Elegantbeef> Build systems should be simple and not require a degree in esoteric languages to get into |
17:31:47 | FromDiscord | <thearchivalone> i agree |
17:32:21 | FromDiscord | <thearchivalone> They also need to be flexible and allow multiple languages to be used in a project (at least for me) |
17:34:16 | FromDiscord | <Elegantbeef> Myself I try to avoid any foreign language dependencies except C since I can compile it from inside Nim |
17:35:34 | FromDiscord | <albassort> rust deps are ok |
17:35:38 | FromDiscord | <albassort> but annoying to implement |
17:36:07 | FromDiscord | <Elegantbeef> Yea I don't overly like them cause now it requires me to figure out where and when to install and build them |
17:36:18 | * | fallback quit (Server closed connection) |
17:37:06 | * | zgasma quit (Quit: Lost terminal) |
17:37:10 | FromDiscord | <Elegantbeef> It also means needing the Rust compiler aswell |
17:40:41 | * | zgasma joined #nim |
17:51:56 | * | fallback joined #nim |
18:14:35 | * | zgasma quit (Quit: Lost terminal) |
18:38:55 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "??": Yeah I've stopped using Nimble, to work on my own package manager from scratch, so I can stop using Nimble :p |
18:40:18 | FromDiscord | <aintea> isn't nimble being worked on for nim 3 ? |
18:40:52 | FromDiscord | <Robyn [She/Her]> I'm moving to Nimskull, personally |
18:41:18 | FromDiscord | <Robyn [She/Her]> so I can't even use Nimble anymore anyway |
18:42:11 | FromDiscord | <Robyn [She/Her]> But if I do use Nim 3, I'd rather just implement support for my w.i.p PM |
18:49:22 | FromDiscord | <heysokam> In reply to @battery.acid.bubblegum "Yeah I've stopped using": how's progress on this? I'm really curious what you come up with |
18:55:30 | FromDiscord | <Robyn [She/Her]> In reply to @heysokam "how's progress on this?": honestly I'd say that i have made some progress, i actually just need to implement the manifest validation logic |
18:55:46 | FromDiscord | <Robyn [She/Her]> I have all the pieces there, just not hooked up, yk? |
18:55:52 | FromDiscord | <heysokam> I see đ |
18:56:05 | FromDiscord | <heysokam> is the repo public? I'd love to keep an eye on it! |
18:56:33 | FromDiscord | <Robyn [She/Her]> though my PM will require some patches to the compiler for scoped paths (so I can selectively expose a directory under a different module name, to specific modules) |
18:56:52 | FromDiscord | <Robyn [She/Her]> In reply to @heysokam "is the repo public?": Yeah it is! https://github.com/Luyten-Orion/FaePkg |
18:57:39 | FromDiscord | <Robyn [She/Her]> I plan on making an accompanying build system library for it too, just to try and unify Fae into a bit more of a feature complete thing |
18:57:47 | FromDiscord | <Robyn [She/Her]> I'm sorta basing it off of Cargo a decent bit |
18:58:29 | FromDiscord | <heysokam> its a great reference to imitate |
18:58:34 | FromDiscord | <heysokam> cargo is really well designed |
18:59:02 | FromDiscord | <Robyn [She/Her]> yeah :) |
18:59:10 | FromDiscord | <Robyn [She/Her]> also pretty, too |
19:03:28 | * | beholders_eye quit (Ping timeout: 260 seconds) |
19:05:23 | * | beholders_eye joined #nim |
19:06:49 | FromDiscord | <naitsabot> In reply to @nasuray "ignore the `src/` in": That seems to be it! â”I cannot for the life of me figure out why I added it when initializing the project (part of my config) haha |
19:41:15 | FromDiscord | <randomstranger0812> Nim 3?â”Is that a Thing? |
19:46:35 | FromDiscord | <heysokam> In reply to @randomstranger0812 "Nim 3? Is that": https://github.com/nim-lang/nimony/blob/master/doc/differences.md |
19:48:52 | FromDiscord | <randomstranger0812> Oh vey |
19:49:31 | FromDiscord | <randomstranger0812> Just got used to 2.x |
19:54:21 | FromDiscord | <Robyn [She/Her]> In reply to @randomstranger0812 "Just got used to": Nim 3 shouldn't really have many differences |
19:54:39 | FromDiscord | <Robyn [She/Her]> It's moreso a rewrite of the current internals |
20:22:16 | FromDiscord | <griffith1deadly> plugins my beloved part |
20:22:23 | FromDiscord | <griffith1deadly> and not zero terminated strings |
20:23:17 | FromDiscord | <Robyn [She/Her]> Nimony is removing that? Why?â”(@griffith1deadly) |
20:23:44 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#pasty=vmAjCVDg |
20:24:01 | FromDiscord | <griffith1deadly> (edit) "https://play.nim-lang.org/#pasty=wRsWPWIc" => "https://play.nim-lang.org/#pasty=fKRmbmzx" |
20:24:47 | FromDiscord | <griffith1deadly> i can make stringzilla native integration now (simd strings) |
20:25:38 | FromDiscord | <Robyn [She/Her]> Hm, fair point honestlyâ”(@griffith1deadly) |
20:34:53 | FromDiscord | <heysokam> What I read myself:â”> People misuse casting, so we are getting rid of the ergonomics of strings-cstrings altogether |
20:35:05 | FromDiscord | <heysokam> It feels like attacking the wrong problem |
20:46:00 | * | beholders_eye quit (Ping timeout: 252 seconds) |
20:47:06 | FromDiscord | <Robyn [She/Her]> I think some helpers may be introduced too, to prevent ppl abusing casting |
20:47:18 | FromDiscord | <Robyn [She/Her]> So seq char or seq byte to strings and vice versa, maybe |
20:47:37 | * | beholders_eye joined #nim |
20:50:45 | FromDiscord | <heysokam> If you wanted to write a CLI application that takes control of drawing in the entire as a framebuffer,â”do you guys know what I need to look up to learn how to do it without just spamming to stdout every frame? |
20:58:17 | FromDiscord | <Robyn [She/Her]> In reply to @heysokam "If you wanted to": Use std/selectors to poll for updates to the screen and only redraw when necessary |
21:00:20 | FromDiscord | <leorize> I like how you dream |
21:00:33 | * | amadaluzia_ joined #nim |
21:01:09 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "I like how you": huh? :p |
21:01:15 | FromDiscord | <leorize> spamming to stdout is the name of the game, since that's the wire format |
21:01:21 | FromDiscord | <randomstranger0812> Isnt that what ncurses dods |
21:01:29 | FromDiscord | <Robyn [She/Her]> does this not work on Windows bc windows doesnt assign file descriptors for stdin/stdout? |
21:01:29 | FromDiscord | <leorize> you can't poll the terminal in almost all OSâ”(@Robyn [She/Her]) |
21:01:40 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "you can't poll the": you can't poll stdin? |
21:01:42 | * | amadaluzia quit (Ping timeout: 276 seconds) |
21:02:10 | FromDiscord | <leorize> yep, because stdin is synchronous when attached to a terminal |
21:02:41 | FromDiscord | <Robyn [She/Her]> ah |
21:24:06 | * | andy-turner joined #nim |
21:25:07 | * | andy-turner quit (Remote host closed the connection) |
21:25:25 | * | andy-turner joined #nim |
21:28:29 | * | andy-turner quit (Client Quit) |
21:55:24 | * | beholders_eye quit (Ping timeout: 272 seconds) |
21:56:51 | * | beholders_eye joined #nim |
22:03:37 | * | amadaluzia_ quit (Quit: You) |
22:52:07 | * | beholders_eye quit (Ping timeout: 260 seconds) |
22:54:04 | * | beholders_eye joined #nim |
23:53:57 | * | beholders_eye quit (Ping timeout: 276 seconds) |