00:04:38 | FromDiscord | <ajusa> Are there any fast lock free queue implementations in Nim? I think there is the new std/channels and a package called lockfreequeues, are those recommended? |
00:39:47 | FromDiscord | <Hi02Hi> I'm not an expert, but I think there are different considerations for a multithreaded queue. For example, if you can guarantee only 1 thread will dequeue, you can also garuntee there will never be worries there. The terminology is Multiple Producers, Single Consumer (MPSC). Similarly, there are SCMP, MPMP, and SPSC (the single threaded queue). |
00:46:21 | FromDiscord | <ajusa> Hm yeah, what I'd be looking for is a SPSC queue then |
02:18:56 | * | aeverr quit (Ping timeout: 255 seconds) |
02:36:07 | fn | <ForumUpdaterBot99> New thread by Geohuz: How can I run a procedure with specified time interval, see https://forum.nim-lang.org/t/8235 |
02:53:46 | * | pro1 joined #nim |
02:56:56 | * | pro quit (Ping timeout: 272 seconds) |
03:08:31 | FromDiscord | <Ænigma> `"nim c -o:'game.exe' --out:'bin' -r"` I feel like a derp, what am I doing wrong? xD |
03:10:20 | FromDiscord | <ElegantBeef> not giving a file to compiler |
03:10:23 | FromDiscord | <ElegantBeef> (edit) "compiler" => "compile" |
03:12:19 | FromDiscord | <Ænigma> Hah! Derping for sure, I got it working, but it's ignoring the --out flag |
03:12:43 | FromDiscord | <ElegantBeef> `-o` is the same as `--out` |
03:12:49 | FromDiscord | <ElegantBeef> you want `--outDir` |
03:14:54 | FromDiscord | <Ænigma> Oh thanks, that worked 🙂 |
03:43:52 | * | arkurious quit (Quit: Leaving) |
03:48:50 | FromDiscord | <Ænigma> Could someone tell me what I'm doing wrong? 😦 https://media.discordapp.net/attachments/371759389889003532/865439809505984542/Screenshot_2.png |
03:51:13 | FromDiscord | <ElegantBeef> ~~Aside from writing nim like it's python~~ 😛↵What's in component.nim |
03:51:23 | FromDiscord | <ElegantBeef> I feel like you didnt do `Component` |
03:51:48 | * | rockcavera quit (Remote host closed the connection) |
03:52:15 | FromDiscord | <Ænigma> Haha. And yeah actually I think you're right. I derped. |
03:52:24 | FromDiscord | <Ænigma> I haven't been awake very long. e.e |
03:52:54 | FromDiscord | <Ænigma> I'm porting a prototype I was working on with Ruby and Gosu over to Nim. |
03:53:09 | FromDiscord | <Ænigma> Decided I didn't like Ruby. |
03:54:10 | FromDiscord | <ElegantBeef> Also you have a folder named ECS but are making an EC setup 😛 |
03:55:39 | FromDiscord | <Ænigma> How so? Entities will contain components, components contain data, systems will process the entities depending on their components? |
03:55:43 | FromDiscord | <Ænigma> Though granted I am new to the ECS idea. |
03:56:25 | FromDiscord | <ElegantBeef> Well you're using inheritance which makes ECS less useful |
03:56:50 | FromDiscord | <ElegantBeef> One big benefit of ECS is that components are cache aligned |
03:57:23 | FromDiscord | <Ænigma> Hmm..how else would I store all my components in a single list/array/whatever without polymorphism? :Thonk: |
03:57:39 | FromDiscord | <ElegantBeef> Polymorph and similar ECS libraries do as such |
03:58:45 | FromDiscord | <Ænigma> So what would you recommend doing besides inheritance then? |
03:58:59 | FromDiscord | <ElegantBeef> Basically if you know the stride of an entity in a list you can rather easily fetch components based off that |
03:59:10 | FromDiscord | <ElegantBeef> Well if you want ECS i'd suggest polymorph |
03:59:46 | FromDiscord | <ElegantBeef> If you want your own ECS(that's designed to benefit from ECS) i'd suggest the PDF from flecs |
04:00:00 | FromDiscord | <ElegantBeef> If you dont care if it's designed to benefit from the ECS process carry on as is |
04:00:40 | FromDiscord | <Ænigma> Hmm..at this point I'm trying to learn. I suppose some more batteries included would help, but I also kind of wanted to do it myself even if it was terrible. 😄 |
04:00:56 | FromDiscord | <Ænigma> I mean I'm not new to gamedev just new to some of these newer ideas like ECS and Nim itself. |
04:01:07 | FromDiscord | <ElegantBeef> Well https://github.com/SanderMertens/flecs_not_for_dummies/blob/master/flecs_not_for_dummies.pdf is a good resource |
04:01:54 | FromDiscord | <Ænigma> By the way, I also noticed that Nim can compile for Nintendo Switch? Would something like Nico work with that? I'm assuming the raylib bindings don't. |
04:02:10 | FromDiscord | <ElegantBeef> If sdl2 works with the switch yea probably |
04:02:29 | FromDiscord | <ElegantBeef> I dont have a switch devkit so cannot say anything about what works there(and even if i could i couldnt :P) |
04:02:40 | FromDiscord | <Ænigma> Yeah, true. I don't have one either. |
04:03:02 | FromDiscord | <Ænigma> But I'm getting serious about gamedev and nintedo switch is my goal. I've released 2 games now with countless failed ones. |
04:03:45 | FromDiscord | <ElegantBeef> Countless failed ones is just gamedev |
04:04:12 | FromDiscord | <Ænigma> Yeah, been a long time though. |
04:04:33 | FromDiscord | <Ænigma> Probably 10 years. But I finally said screw this I'm gonna make something and finish it, and that was December and Feburary. |
04:04:42 | FromDiscord | <Ænigma> I finished them I mean. |
04:04:51 | FromDiscord | <ElegantBeef> Also unless you really like/need the ECS paradigm there isnt really any purpose in using it |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:37 | * | supakeen joined #nim |
04:06:54 | FromDiscord | <ElegantBeef> Also there are many ECS implementations you could look at for reference on how to avoid using polymorphism https://github.com/search?q=language%3Anim+ecs |
04:08:50 | FromDiscord | <Ænigma> Looks like generics or something. |
04:08:58 | FromDiscord | <Ænigma> That's a programming concept I don't really know. 😄 |
04:11:03 | FromDiscord | <Ænigma> `proc addComponent[T](w: World, eid: EntityId, component: T) =` |
04:13:24 | FromDiscord | <Ænigma> I think I'll forego the ECS paradigm for now. |
04:15:52 | FromDiscord | <ElegantBeef> sorry to dissuade you |
04:16:50 | FromDiscord | <ElegantBeef> Worth noting that this is basically what you were going to end up with https://github.com/enthus1ast/ecs/blob/master/src/ecs.nim |
04:17:00 | FromDiscord | <ElegantBeef> Not very cache efficient due to using ref objects |
05:01:56 | fn | <ForumUpdaterBot99> New Nimble package! latinize - Convert accents (diacritics) from strings to latin characters., see https://github.com/AmanoTeam/Latinize |
05:01:57 | fn | <R2D299> itHub: 7"Latinize is a library and CLI tool written in Nim, it's indeed to convert accents (diacritics) from strings to latin characters." |
05:09:23 | FromDiscord | <Ænigma> @ElegantBeef WHat's the difference between `thing = object` and `thing = ref object of RootObj` |
05:10:40 | FromDiscord | <ElegantBeef> `ref` is a managed pointer, so it's a ref allocated object instead of stack allocated |
05:11:04 | FromDiscord | <Ænigma> Why would you want an object to be a pointer? :Thonk: |
05:11:14 | FromDiscord | <Ænigma> I mean I know Rust and C++ so I know what a pointer is. |
05:11:20 | FromDiscord | <Ænigma> I just don't understand the practical use. |
05:11:29 | FromDiscord | <ElegantBeef> Reference semantics |
05:11:40 | FromDiscord | <ElegantBeef> So oop like C#/Java |
05:12:06 | FromDiscord | <Ænigma> Oh so if you pass it, it passes the reference, and doesn't copy? |
05:12:31 | FromDiscord | <ElegantBeef> Well nim does do pass by reference for large objects as an optimization, but it's not something you need to worry about |
05:12:48 | FromDiscord | <Ænigma> Okay then so basically I don't understand. xD |
05:12:53 | FromDiscord | <ElegantBeef> Lol |
05:13:10 | FromDiscord | <Ænigma> I guess I should ask |
05:13:12 | FromDiscord | <Ænigma> WHen should I do which |
05:15:55 | FromDiscord | <ElegantBeef> Well references are useful for when you have an object that references a the same object, like a tree or linked list |
05:16:19 | FromDiscord | <Ænigma> Okay so basically it's just a reference then. |
05:16:23 | FromDiscord | <ElegantBeef> Nim's references are just managed pointers |
05:16:23 | FromDiscord | <Ænigma> So... |
05:16:30 | FromDiscord | <Ænigma> That means there can only be 1 of them? |
05:16:33 | FromDiscord | <Ænigma> Of that type |
05:16:34 | FromDiscord | <Ænigma> ? |
05:16:41 | FromDiscord | <ElegantBeef> No? |
05:16:44 | FromDiscord | <Ænigma> :Thonk: |
05:17:11 | FromDiscord | <Ænigma> I guess what I'm not understanding is, what is the point, can you not take a `thing = object` and do something like `doAThing(&thing)`? |
05:17:29 | FromDiscord | <ElegantBeef> I dont know what `&thing` does |
05:17:35 | FromDiscord | <Ænigma> In C++ that's a reference. |
05:18:28 | FromDiscord | <ElegantBeef> That's a reference to `thing`? |
05:18:32 | FromDiscord | <Ænigma> Yes |
05:18:37 | FromDiscord | <Ænigma> So I guess mabe in nim it wouldbe like |
05:18:45 | FromDiscord | <Ænigma> `doAThing(ref thing)`? |
05:18:50 | FromDiscord | <ElegantBeef> Well you can do that with pointers in Nim, but you cannot make a stack allocated object a `ref` magically |
05:19:04 | FromDiscord | <ElegantBeef> References in nim are managed which means they work with the GC |
05:19:12 | FromDiscord | <Ænigma> So.. |
05:19:27 | FromDiscord | <Ænigma> Okay I think I get it. |
05:19:40 | FromDiscord | <ElegantBeef> So you cannot create a reference like that you'd either use `.addr` or have the `proc doThing(a: var Thing)` |
05:20:21 | FromDiscord | <Ænigma> Okay. |
05:20:26 | FromDiscord | <Ænigma> Now I'm actually wondering the opposite. |
05:20:33 | FromDiscord | <Ænigma> Why you would want to do `thing = object` |
05:20:34 | FromDiscord | <Ænigma> xD |
05:20:50 | FromDiscord | <ElegantBeef> Cause you dont often need heap allocated objects |
05:20:58 | FromDiscord | <ElegantBeef> If you dont need references you dont use them |
05:21:30 | FromDiscord | <Ænigma> But if I do need a reference, I can just do `thing.addr`? |
05:21:33 | FromDiscord | <ElegantBeef> no |
05:21:35 | FromDiscord | <Ænigma> o.o |
05:21:37 | FromDiscord | <ElegantBeef> that's for a pointer |
05:21:47 | FromDiscord | <Ænigma> :Thonk: |
05:21:56 | FromDiscord | <Ænigma> Oh wait |
05:22:06 | FromDiscord | <Ænigma> THat's to dereference the pointer |
05:22:15 | FromDiscord | <Ænigma> ? |
05:22:27 | FromDiscord | <ElegantBeef> Nim has `ptr T` `pointer` and `ref`s the first two are unmanaged pointers, and the latter is a managed one |
05:22:35 | FromDiscord | <ElegantBeef> No nim's dereference operator is `[]` |
05:22:41 | FromDiscord | <ElegantBeef> `.addr` gets a `ptr T` |
05:23:03 | FromDiscord | <Ænigma> Okay so basicaly what you're saying is |
05:23:56 | FromDiscord | <Ænigma> If I do the ref of RootObj I can just pass the thing around and always reference the same thing in memory, but if I do the other thing I have to use managed pointers if I want to pass it by reference like in C++ I hafta keep track of it? |
05:24:09 | FromDiscord | <ElegantBeef> Nope |
05:24:26 | FromDiscord | <ElegantBeef> Nim has `var T` for proc parameters which lets you pass as a reference |
05:24:37 | FromDiscord | <ElegantBeef> It's a mutable reference |
05:24:40 | FromDiscord | <Ænigma> Ah |
05:25:13 | FromDiscord | <Ænigma> Okay I think I get it. |
05:25:17 | FromDiscord | <Ænigma> Maybe. |
05:25:18 | FromDiscord | <Ænigma> xD |
05:25:41 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3t8m |
05:26:31 | FromDiscord | <Ænigma> Wait |
05:26:33 | FromDiscord | <Ænigma> Is that a method? |
05:26:43 | FromDiscord | <Ænigma> I haven't found those yet in the manual. |
05:26:51 | FromDiscord | <ElegantBeef> Nim has UFCS so procs can be used like a method or like C style |
05:26:56 | FromDiscord | <Ænigma> That's whats up |
05:27:11 | FromDiscord | <ElegantBeef> `proc` and `func` are statically dispatched, and `method` is dynamically dispatched |
05:27:35 | FromDiscord | <Ænigma> I have no idea waht that means. |
05:27:50 | FromDiscord | <ElegantBeef> It means there is no runtime logic to decide what procedure to call |
05:28:03 | FromDiscord | <Ænigma> I guess I should clarify I'm not really a programmer, I'm a game developer, most of the computer science stuff goes over my head xD |
05:28:27 | FromDiscord | <Ænigma> That kind of makes sense. |
05:28:43 | FromDiscord | <ElegantBeef> `new T` makes a reference of T |
05:28:44 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3t8n |
05:28:53 | FromDiscord | <ElegantBeef> Yea i'm a game dev as well |
05:29:30 | FromDiscord | <Ænigma> Ah yeah okay. |
05:30:47 | FromDiscord | <Ænigma> I actually dropped C++ and Rust because it was a little too complex for my liking. I guess rather C++ wasn't that complex really overall (aside from the metaprogramming black magic) but it's just I prefer to google or ask in discord how to do something, and I don't know if what I'm googling is the right answer when there's like 30x different ways to do something because of all the legacy, and most c++ people I've met in discord are elist |
05:30:58 | FromDiscord | <Ænigma> (edit) "elist" => "elitist" |
05:32:50 | FromDiscord | <linux user> is execCmd() depened on shell?? |
05:38:59 | FromDiscord | <Rika> By default yes |
05:39:08 | FromDiscord | <Rika> (AFAIK) |
05:39:21 | FromDiscord | <Rika> In reply to @Ænigma "I actually dropped C++": Why did you drop rust though? |
05:39:28 | FromDiscord | <linux user> does it open a new shell or the existing? |
05:39:40 | FromDiscord | <Rika> I can see how some C++ programmers can be asshats |
05:39:53 | FromDiscord | <linux user> so you sure it will work in windoze? |
05:40:02 | FromDiscord | <Rika> In reply to @richard stallmen(crazy GNU guy) "does it open a": Not a detail I know (it probably opens a new one?), better off reading the code |
05:40:11 | FromDiscord | <Rika> Rather |
05:40:35 | FromDiscord | <Rika> Okay I don’t really know the details |
05:40:37 | FromDiscord | <linux user> i used execProcess , but the process cant use stdin |
05:40:39 | FromDiscord | <Rika> Best to read the code |
05:40:43 | FromDiscord | <Rika> Ah |
05:40:45 | FromDiscord | <linux user> ok |
05:41:10 | FromDiscord | <Rika> That’s because the in and out of the process is separate from the main ones |
05:41:28 | FromDiscord | <linux user> https://media.discordapp.net/attachments/371759389889003532/865468151755177994/Screenshot_2021-07-16-11-11-19.jpeg |
05:41:35 | FromDiscord | <linux user> smol |
05:42:40 | FromDiscord | <Rika> I mean read the code of the exec command proc |
05:42:43 | FromDiscord | <Ænigma> In reply to @Rika "Why did you drop": Because it was a little too Verbose for my liking, and there it seemed the more deeer I dove into gamedev with it the more I had to learn or there was always a "gotcha" moment and I would just drop it. |
05:42:44 | FromDiscord | <ElegantBeef> osproc has the abillity to share streams |
05:42:55 | FromDiscord | <Rika> In reply to @Ænigma "Because it was a": I see |
05:43:28 | FromDiscord | <Rika> I’m not very confident that Nim would be as easy as you think it is |
05:45:37 | FromDiscord | <ElegantBeef> Uh oh bung is typing, i was never here |
05:45:37 | FromDiscord | <Bung> In reply to @richard stallmen(crazy GNU guy) "": exec apis means run and exit , for osproc module you need startProcess |
05:45:56 | FromDiscord | <Bung> dont worry , not the nimscripter thing haha |
05:46:08 | FromDiscord | <haxscramper> With poUserParentStreams flag enabled |
05:46:23 | FromDiscord | <haxscramper> I think it is called this way |
05:46:29 | FromDiscord | <haxscramper> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/865469331747504149): With poUseParentStreams flag enabled |
05:47:23 | FromDiscord | <Bung> you can also use https://github.com/cheatfate/asynctools |
05:47:26 | fn | <R2D299> itHub: 7"Various asynchronous tools for Nim language" |
05:47:50 | FromDiscord | <generic linux user> In reply to @Bung "exec* apis means run": i was asking about passing stdin options, mpv reads from stdin for example p for pause... |
05:48:57 | FromDiscord | <Bung> oh that should do as hax just described |
05:49:10 | * | beshr quit (Remote host closed the connection) |
05:53:01 | FromDiscord | <generic linux user> yes mate |
05:56:14 | FromDiscord | <generic linux user> sent a code paste, see https://paste.rs/k50 |
05:58:08 | FromDiscord | <Rika> Prolly needs osprocs? |
05:58:19 | FromDiscord | <ElegantBeef> `poUseParentStreams` |
06:00:43 | FromDiscord | <generic linux user> oops |
06:01:33 | FromDiscord | <generic linux user> it coming again, but did you guys meant startProcess() or execProcess()? |
06:05:08 | FromDiscord | <generic linux user> https://media.discordapp.net/attachments/371759389889003532/865474107133657094/Screenshot_2021-07-16-11-34-59.jpeg |
06:05:14 | FromDiscord | <generic linux user> bruhbruhbruhbruh |
06:06:39 | FromDiscord | <Bung> that depends whether you need intergrate with the sub process |
06:09:02 | FromDiscord | <generic linux user> sent a code paste, see https://play.nim-lang.org/#ix=3t8A |
06:09:13 | FromDiscord | <generic linux user> it sends the process to bwckground and exits |
06:15:45 | FromDiscord | <haxscramper> You either fully share processes or use existing ones |
06:16:04 | FromDiscord | <haxscramper> You can also pipe data to process's stdin in loop |
06:16:49 | FromDiscord | <haxscramper> `process.inputStream().write(stdin.readLine())` |
06:27:36 | FromDiscord | <generic linux user> how do i know what the process is then |
06:27:56 | FromDiscord | <generic linux user> i typed PLAYER , it says error returns string , |
06:28:10 | FromDiscord | <Rika> What do you mean? You store the process in a variable how would you lose it |
06:28:52 | FromDiscord | <generic linux user> sorry i discarded it |
06:33:57 | FromDiscord | <generic linux user> sent a code paste, see https://play.nim-lang.org/#ix=3t8I |
06:34:05 | FromDiscord | <generic linux user> (edit) |
06:34:11 | FromDiscord | <generic linux user> (edit) |
06:34:26 | * | PMunch joined #nim |
06:34:43 | FromDiscord | <Rika> So does it work |
06:35:49 | FromDiscord | <generic linux user> nope |
06:36:11 | FromDiscord | <generic linux user> sent a code paste, see https://play.nim-lang.org/#ix=3t8J |
06:36:42 | FromDiscord | <generic linux user> why did i name it brr |
06:36:46 | FromDiscord | <generic linux user> 😳 |
06:36:50 | FromDiscord | <generic linux user> (edit) "https://play.nim-lang.org/#ix=3t8J" => "https://play.nim-lang.org/#ix=3t8K" |
06:37:08 | FromDiscord | <Rika> Eeh tainted string means you have taint mode on? |
06:37:36 | FromDiscord | <Rika> Wait why is it a different value name? |
06:37:42 | FromDiscord | <Rika> I mean variable name |
06:39:47 | FromDiscord | <generic linux user> i didnt turn it on tho |
06:42:40 | FromDiscord | <ElegantBeef> Exec process doesnt return the process it returns a string |
06:43:01 | FromDiscord | <ElegantBeef> > A convenience procedure that executes command with startProcess and returns its output as a string. |
06:44:19 | FromDiscord | <generic linux user> startProcess |
06:46:11 | FromDiscord | <generic linux user> confilcts upon stream and file |
06:50:15 | * | max22- joined #nim |
06:52:41 | * | pro1 is now known as pro |
06:54:17 | FromDiscord | <generic linux user> seems i cant skip using shell↵https://github.com/nim-lang/Nim/issues/8153 |
07:02:02 | FromDiscord | <generic linux user> sent a code paste, see https://play.nim-lang.org/#ix=3t8W |
07:02:08 | FromDiscord | <generic linux user> works just like execCmd , a bit sus |
07:10:25 | * | neceve joined #nim |
07:31:53 | FromDiscord | <enthus1ast> @generic linux user\: btw mpv is every easy to embden, and the nim wrapper is good |
07:32:25 | FromDiscord | <generic linux user> there is? |
07:33:00 | FromDiscord | <enthus1ast> https://github.com/daniel-j/nim-mpv |
07:33:02 | fn | <R2D299> itHub: 7"Nim bindings for libmpv using Nimterop" |
07:33:59 | FromDiscord | <enthus1ast> And there I use it\: https://github.com/enthus1ast/muk |
07:34:01 | fn | <R2D299> itHub: 7"crossplattform terminal music player. Inspired by moc and mpd." |
07:35:51 | FromDiscord | <generic linux user> yepp, linker errors |
07:36:13 | FromDiscord | <enthus1ast> Sure you must link to libmpv ;) |
07:36:26 | FromDiscord | <enthus1ast> And download it for your os |
07:36:46 | FromDiscord | <enthus1ast> If on linux it should find it, though |
07:38:18 | FromDiscord | <enthus1ast> https://github.com/enthus1ast/muk/blob/master/src/muk.nims |
07:44:48 | FromDiscord | <generic linux user> i tried -lmpv tho |
07:44:49 | FromDiscord | <willyboar> I like illwill a lot. I was checked it a couple of months ago to build a tui static site generator |
07:46:09 | FromDiscord | <enthus1ast> Have the libmpv library next to your executable?↵(@generic linux user) |
07:46:25 | FromDiscord | <generic linux user> libmpv.a? |
07:46:31 | FromDiscord | <generic linux user> or the header files? |
07:46:46 | FromDiscord | <enthus1ast> Libmpv.a |
07:47:49 | FromDiscord | <enthus1ast> Or help the c compiler find it by -L |
07:48:33 | FromDiscord | <generic linux user> oki |
07:49:27 | FromDiscord | <generic linux user> https://media.discordapp.net/attachments/371759389889003532/865500358859554827/Screenshot_2021-07-16-13-19-16.jpeg |
07:50:18 | FromDiscord | <generic linux user> -lmpv |
07:50:24 | FromDiscord | <enthus1ast> Illwill misses the unicode support, I've a half finished prototype lying around but it's not yet usable, so only really usable for english input↵(@willyboar) |
07:56:32 | FromDiscord | <enthus1ast> Have not tested muk with clang, so you yound a dragon \:)↵(@generic linux user) |
07:57:46 | FromDiscord | <enthus1ast> But muk is a complex example. When you just want to embed mpv for playing and controlling video, then I would use a simpler example |
07:59:02 | FromDiscord | <enthus1ast> https://github.com/daniel-j/nim-mpv/blob/master/examples/simple.nim |
08:00:08 | * | Schnouki quit (Ping timeout: 252 seconds) |
08:01:55 | * | Schnouki joined #nim |
08:09:50 | FromDiscord | <Bung> @ElegantBeef the rest part you get idea in your mind ? |
08:12:46 | FromDiscord | <ElegantBeef> I actually dont know how to do the Nim -> nimscript part atm, since i assume i need to make an object with all the proper symbols |
08:15:48 | FromDiscord | <Bung> variable -> pnode -> string -> pnode does not work? |
08:15:48 | FromDiscord | <haxscramper> Is this still about nimscripter? |
08:16:08 | FromDiscord | <haxscramper> I can write more robust POC implementation, but it would rely on hnimast |
08:16:18 | FromDiscord | <haxscramper> For passing data around |
08:16:29 | FromDiscord | <Bung> yeah, beef done some nims -> nim part |
08:17:01 | FromDiscord | <Bung> nim -> nims part havn't yet, so I can't pass variable to nims proc |
08:17:13 | FromDiscord | <generic linux user> Thanks guys, seems to work |
08:18:09 | FromDiscord | <generic linux user> In reply to @enthus1ast "https://github.com/daniel-j/nim-mpv/blob/master/exa": since i qm developing in termux , and in thevpast i have tried to compile libmpv.a , it failed↵android is linux , but dies stuff a bit on its own way |
08:18:19 | FromDiscord | <generic linux user> (edit) "dies" => "does" |
08:18:25 | FromDiscord | <generic linux user> (edit) "qm" => "am" |
08:18:30 | FromDiscord | <generic linux user> (edit) "thevpast" => "the past" |
08:19:18 | * | Schnouki quit (Ping timeout: 265 seconds) |
08:20:27 | FromDiscord | <Bung> @haxscramper that would help me and beef out, you can use my forked small repo https://github.com/bung87/nimscripter |
08:20:30 | fn | <R2D299> itHub: 7"Quick and easy Nim <-> Nimscript interop" |
08:20:40 | * | Vladar joined #nim |
08:21:14 | * | Schnouki joined #nim |
08:21:14 | FromDiscord | <haxscramper> What I'm mostly asking is - you ok with addition hnimast dependency? |
08:21:26 | FromDiscord | <ElegantBeef> Well it doesnt compile on devel 😄 |
08:21:34 | FromDiscord | <ElegantBeef> Forgot to make the issue |
08:22:28 | FromDiscord | <haxscramper> I will look into this |
08:22:57 | FromDiscord | <Bung> guess better strip out nimble |
08:23:30 | FromDiscord | <Bung> since them both use compiler package, depends on compiler package is fine |
08:24:17 | FromDiscord | <Bung> my fork version will also remove compiler package as dependency. |
08:24:51 | FromDiscord | <haxscramper> so much for optional dependnecies |
08:25:14 | FromDiscord | <haxscramper> this garbage is so annoying |
08:25:28 | * | neceve quit (Ping timeout: 246 seconds) |
08:26:06 | FromDiscord | <haxscramper> I will look into that as well |
08:26:54 | FromDiscord | <Bung> you can update your nim version every commit then you will find your package depends on compiler package has much more compatible issue : ) |
08:28:33 | FromDiscord | <haxscramper> I don't usually develop against devel |
08:28:48 | FromDiscord | <haxscramper> I have things to do instead of playing catch-up game with moving target |
08:29:10 | FromDiscord | <ElegantBeef> Yea but sadly i have PR in devel that fixes `std/` imports in VM |
08:29:23 | FromDiscord | <haxscramper> They are broken? |
08:29:32 | FromDiscord | <ElegantBeef> They were for me 😄 |
08:31:49 | FromDiscord | <haxscramper> Can you link the issue? |
08:32:17 | FromDiscord | <ElegantBeef> No cause that'd involve there being one |
08:33:32 | FromDiscord | <ElegantBeef> https://github.com/nim-lang/Nim/commit/d96469037ecc1ee7982b420cbe6ce34e91d18b01 my PR for it |
09:03:55 | * | pro quit (Quit: WeeChat 3.2) |
09:06:51 | * | pro joined #nim |
09:34:48 | * | Schnouki quit (Ping timeout: 255 seconds) |
09:34:59 | FromDiscord | <Tuatarian> I have a bit of a weird situation |
09:35:26 | FromDiscord | <Tuatarian> I have been using nim + raylib for a game development project, and for some reason, kaspersky seems to think my binaries are malware? |
09:35:38 | FromDiscord | <Tuatarian> uds winshell exploit or something like that |
09:35:45 | FromDiscord | <Tuatarian> I've been using it for a while, I doubt it's malware |
09:36:03 | FromDiscord | <Tuatarian> and it only seems to complain a few hours after running & closing the binaries |
09:36:05 | FromDiscord | <Tuatarian> which is even stranger |
09:36:07 | FromDiscord | <Tuatarian> any ideas? |
09:36:45 | FromDiscord | <ElegantBeef> Since around Nim 1.4.6(maybe even earlier) is a false positive for a virus by a lot of anti-virus vendors |
09:42:11 | FromDiscord | <enthus1ast> Report it as a false positive |
10:15:52 | * | maxime_ joined #nim |
10:17:15 | * | max22- quit (Ping timeout: 268 seconds) |
10:19:21 | * | maxime_ quit (Remote host closed the connection) |
10:19:44 | * | maxime_ joined #nim |
10:26:06 | * | pro quit (Ping timeout: 255 seconds) |
10:27:44 | * | maxime_ quit (Ping timeout: 268 seconds) |
10:58:00 | FromDiscord | <JH> what the easiest/best way to remove characters at the end of a string in nim? |
11:00:03 | FromDiscord | <haxscramper> https://nim-lang.org/docs/strutils.html#delete%2Cstring%2Cint%2Cint |
11:04:50 | * | maxime_ joined #nim |
11:12:45 | * | g42x joined #nim |
11:21:29 | FromDiscord | <enthus1ast> also strip() for some usecases\: https://nim-lang.org/docs/strutils.html#strip%2Cstring%2Cset%5Bchar%5D |
11:25:42 | FromDiscord | <JH> perfect! thanks guys |
11:33:56 | arkanoid | what's the advantage of using nlvm instead of clang? |
11:53:25 | * | xet7 quit (Remote host closed the connection) |
11:54:13 | FromDiscord | <haxscramper> How can I get subtype name at runtime? |
11:54:44 | FromDiscord | <haxscramper> I've seen mentions of `typeinfo` being deprecated with ARC/ORC - is there any solution that would still work |
11:55:24 | * | xet7 joined #nim |
11:57:46 | * | maxime_ quit (Ping timeout: 268 seconds) |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:37 | * | supakeen joined #nim |
12:07:07 | * | g42x quit (Quit: Client closed) |
12:28:46 | * | g42x joined #nim |
12:43:09 | * | rockcavera joined #nim |
12:43:09 | * | rockcavera quit (Changing host) |
12:43:09 | * | rockcavera joined #nim |
12:49:43 | * | maxime_ joined #nim |
13:12:49 | * | Lord_Nightmare2 joined #nim |
13:14:49 | * | fputs_ joined #nim |
13:18:34 | * | mahlon_ joined #nim |
13:18:48 | * | xet7 quit (*.net *.split) |
13:18:49 | * | Lord_Nightmare quit (*.net *.split) |
13:18:49 | * | stkrdknmibalz quit (*.net *.split) |
13:18:49 | * | fn quit (*.net *.split) |
13:18:49 | * | mahlon quit (*.net *.split) |
13:18:49 | * | fputs quit (*.net *.split) |
13:18:49 | * | Amun-Ra quit (*.net *.split) |
13:18:51 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
13:22:44 | * | fn joined #nim |
13:23:57 | FromDiscord | <arnetheduck> In reply to @arkanoid "what's the advantage of": each transformation step is lossy which means missed optimisation opportunities and takes time - `nim -> clang -> llvm -> ...` is a longer, slower and more lossy pipeline than `nlvm -> llvm -> ...` - ie faster and better codegen, but you lose some C FFI capabilities |
13:25:45 | FromDiscord | <arnetheduck> there are things you cannot express in C either - memory and stack layout for the GC, debug information, certain forms of trampolines for callbacks, certain forms of constants etc |
13:25:45 | * | Amun-Ra joined #nim |
13:26:15 | * | xet7 joined #nim |
13:40:08 | * | maxime_ quit (Ping timeout: 268 seconds) |
13:41:58 | * | arkurious joined #nim |
13:45:58 | * | g42x quit (Quit: Client closed) |
14:24:42 | * | g42x joined #nim |
14:36:46 | * | Vladar quit (Ping timeout: 252 seconds) |
14:39:46 | * | Vladar joined #nim |
14:49:27 | * | g42x quit (Quit: Client closed) |
14:50:58 | * | maxime_ joined #nim |
14:52:50 | FromDiscord | <Yinisiki> Please Please... i need help.. I did everything i could do to install nim... but it keeps failing... here are my efforts... i just want to install nim! https://media.discordapp.net/attachments/371759389889003532/865606906533249124/nim.mp4 |
14:56:18 | FromDiscord | <juan_carlos> Nim compiler has no GUI, looks installed?, open a terminal window like powershell or cmd.exe and run nim --help |
14:56:43 | FromDiscord | <generic linux user> ofc i have never seen a compiler eith ui |
14:56:49 | FromDiscord | <generic linux user> 👀 |
14:57:27 | FromDiscord | <Yinisiki> ya the command ran well |
14:57:38 | FromDiscord | <juan_carlos> Done then, thats nim |
14:57:39 | FromDiscord | <generic linux user> installation ok |
14:57:45 | FromDiscord | <generic linux user> look for nimble |
14:58:07 | FromDiscord | <generic linux user> wait , if you tyoe nim then it will print the std help |
14:58:12 | FromDiscord | <generic linux user> but try to compile one |
14:58:19 | FromDiscord | <Yinisiki> yes, even nimble command worked |
14:58:20 | FromDiscord | <generic linux user> maybe if the libs arent installed? |
14:58:46 | FromDiscord | <Kermithos> sent a code paste, see https://paste.rs/6aW |
15:01:54 | * | g42x joined #nim |
15:02:04 | FromDiscord | <Yinisiki> just ran it... there is a helloWorld.exe created on my desktop but it closes as soon as i open it https://media.discordapp.net/attachments/371759389889003532/865609232367616020/unknown.png |
15:02:18 | FromDiscord | <Kermithos> In reply to @Yinisiki "just ran it... there": open it via your cmd |
15:02:31 | FromDiscord | <Kermithos> or add -r as command |
15:03:08 | FromDiscord | <Kermithos> https://nim-lang.org/docs/nimc.html |
15:04:03 | FromDiscord | <juan_carlos> `nim r helloWorld.nim` from the cmd.exe |
15:04:29 | FromDiscord | <generic linux user> he didnt even execute it |
15:04:33 | FromDiscord | <generic linux user> .\Helo.exe |
15:04:35 | FromDiscord | <generic linux user> bruh |
15:04:52 | FromDiscord | <generic linux user> i cant undertsnad whats with the --run option, from go? |
15:04:54 | FromDiscord | <Yinisiki> wow it just printed hello world.... |
15:04:58 | FromDiscord | <generic linux user> yes |
15:05:02 | FromDiscord | <SolitudeSF> holy... |
15:05:02 | FromDiscord | <generic linux user> 😐 |
15:05:06 | FromDiscord | <Yinisiki> SUCCESS!! |
15:06:11 | FromDiscord | <Yinisiki> i THOUGHT i COULD RUN iT LikE PyTHON... |
15:06:14 | FromDiscord | <generic linux user> you said it aldready |
15:06:17 | FromDiscord | <Clonkk> Now you get to do some reading about what a compiler is and the difference between source code and binary. |
15:06:23 | FromDiscord | <generic linux user> In reply to @Yinisiki "i THOUGHT i COULD": thats what -r |
15:08:06 | FromDiscord | <Yinisiki> Thanks a lot guys... this is really a friendly community.. i will continue with the docs from here!! |
15:08:17 | FromDiscord | <Rika> gl |
15:09:16 | FromDiscord | <juan_carlos> Everything starts with a Hello World |
15:09:24 | FromDiscord | <juan_carlos> ...Then you learn to add Bugs to it. |
15:09:44 | FromDiscord | <dom96> In reply to @Yinisiki "Thanks a lot guys...": if anyone ever gives you shit for not knowing something then let me know, we all gotta start somewhere 🙂 |
15:10:12 | FromDiscord | <dom96> (me or one of the other `@Moderator`'s that is) |
15:12:23 | FromDiscord | <Yinisiki> In reply to @dom96 "if anyone ever gives": Thats really kind of you dom!! |
15:13:18 | FromDiscord | <generic linux user> dommomom |
15:13:21 | FromDiscord | <Clonkk> It actually is a friendly community. But you're asking question about OS usage not about Nim. There really is no need to be dramatic, noone was mean to you. You just need to learn about what a compiler is (in opposition to a scripting language such as Python) and about console usage.↵(@Yinisiki) |
15:13:30 | FromDiscord | <generic linux user> (edit) "dommomom" => "dommoomoom" |
15:13:49 | FromDiscord | <generic linux user> yes , console is 🙂 |
15:13:57 | FromDiscord | <Clonkk> There is nothing insulting in saying you need to learn about the tools you want to use |
15:14:33 | FromDiscord | <SolitudeSF> i dont think he was sarcastic |
15:14:34 | FromDiscord | <dom96> huh, interesting. I didn't take what Yinisiki said sarcastically |
15:14:58 | FromDiscord | <Rika> me neither |
15:14:58 | FromDiscord | <dom96> I still don't think it was meant to be sarcastic |
15:16:03 | FromDiscord | <Clonkk> Oh, well my bad then. carry on |
15:16:03 | FromDiscord | <Clonkk> I thought it was sarcasm, I guess the `...` threw me off |
15:22:10 | FromDiscord | <generic linux user> ...? |
15:27:55 | FromDiscord | <Ayy Lmao> How do you launch a program from NimScript? Like a .exe on Windows for example |
15:28:40 | FromDiscord | <juan_carlos> gorgeEx |
15:32:22 | FromDiscord | <Ayy Lmao> Awesome, that works. Thanks! |
15:36:48 | FromDiscord | <generic linux user> nimscript? |
15:37:02 | FromDiscord | <generic linux user> icant see the usage , like why !python? |
15:38:27 | FromDiscord | <SolitudeSF> ? |
15:38:53 | FromDiscord | <Rika> it is useful to run external programs in nimscript, the usual usecase is to run something within a nimble task |
15:40:00 | FromDiscord | <generic linux user> 🆘 but 🆗 |
15:43:01 | FromDiscord | <juan_carlos> NimScript because Windows BAT is ugly (?). |
15:43:40 | FromDiscord | <haxscramper> I'm getting segmentation faults when I switch to `ORC`, but things work fine with default refc. But other part of an application crashes when I have refc enabled, and I need to switch to orc to fix that |
15:43:56 | FromDiscord | <haxscramper> On top of that - when I use orc segmentation fault has no stacktrace |
15:43:57 | FromDiscord | <generic linux user> wierd |
15:43:58 | FromDiscord | <Rika> already tried valgrind and friends? |
15:44:11 | FromDiscord | <Rika> or asan? |
15:44:18 | FromDiscord | <Rika> not sure if asan works well with nim actually |
15:44:24 | FromDiscord | <haxscramper> I'm like 99.9% sure that the bug is due to `nil` dereferencing |
15:44:31 | FromDiscord | <haxscramper> And I can get stacktrace from GDB as well |
15:44:39 | FromDiscord | <haxscramper> But nim's stracktrace is completely empty |
15:44:50 | FromDiscord | <Rika> might be some weird internal function |
15:44:56 | FromDiscord | <haxscramper> Running with valgrind will take million years, but I will try now |
15:45:16 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3tbl |
15:45:28 | FromDiscord | <haxscramper> I add to sequence somewhere and it segfaults |
15:46:47 | FromDiscord | <Rika> is this threaded code? |
15:47:09 | FromDiscord | <haxscramper> no |
15:47:38 | FromDiscord | <haxscramper> Single-threaded, C backed, no release |
15:48:33 | FromDiscord | <haxscramper> For some reason things are literally falling apart with haxdoc - constant random crashes even for parts of the code |
15:49:12 | FromDiscord | <hamidb80> hey |
15:49:18 | FromDiscord | <generic linux user> helo |
15:49:33 | FromDiscord | <hamidb80> can someone explain me `noconv` pragma ? |
15:50:16 | FromDiscord | <Rika> its a calling convention i believe |
15:50:25 | FromDiscord | <Rika> In reply to @haxscramper "For some reason things": thats really strange |
15:50:29 | FromDiscord | <Rika> i dont know how to help |
15:50:57 | FromDiscord | <hamidb80> what is calling convention? |
15:51:26 | FromDiscord | <juan_carlos> how function call code is emitted. |
15:52:29 | FromDiscord | <Rika> well its a bit difficult to explain further |
15:52:32 | FromDiscord | <haxscramper> Valigrind reports `Invalid read of size 8` for ORC |
15:53:11 | FromDiscord | <Rika> https://en.wikipedia.org/wiki/X86_calling_conventions |
15:53:34 | FromDiscord | <haxscramper> And a lot of `Use of uninitialised value of size 8` for refc |
15:53:51 | FromDiscord | <haxscramper> But that one comes from `incRefAT1eRuflKWyTTBdLjEDZbgsystem` |
15:53:56 | FromDiscord | <Rika> it's a kinda low level concept, you kinda need to know how memory and asm works and stuff |
15:55:41 | FromDiscord | <hamidb80> In reply to @Rika "it's a kinda low": i just forked https://github.com/hamidb80/coverage/blob/master/cibuild.sh and have no idea why yglukhov is doing this |
15:55:52 | FromDiscord | <hamidb80> (edit) "https://github.com/hamidb80/coverage/blob/master/cibuild.sh" => "https://github.com/hamidb80/coverage/" |
15:56:24 | FromDiscord | <Rika> https://nim-lang.org/docs/manual.html#types-procedural-type |
15:56:33 | FromDiscord | <Rika> if you want specifically what noconv means |
15:56:57 | FromDiscord | <hamidb80> thanks |
15:57:47 | FromDiscord | <Rika> i just checked the usage |
15:57:50 | FromDiscord | <Rika> i dont know why either |
15:57:56 | FromDiscord | <Rika> maybe its best to ask him directly |
16:06:52 | FromDiscord | <Ayy Lmao> I'm trying to use NimScript to move a .dll file on Windows and keep getting `access is denied`. Does anyone know how to deal with this? Launching the terminal as admin doesn't seem to work |
16:07:35 | FromDiscord | <juan_carlos> Windows can lock DDLs silently, try copying it. |
16:07:48 | FromDiscord | <Ayy Lmao> Copying seems to give the same issue |
16:09:56 | fn | <Prestige99> must have to do with the destination? |
16:10:21 | fn | <Prestige99> can you copy it to your desktop? |
16:10:34 | FromDiscord | <Ayy Lmao> I've tried multiple destinations to check that, as well as my desktop |
16:10:43 | fn | <ForumUpdaterBot99> New Nimble package! xom - Transform XML trees into performant JavaScript DOM calls at compile-time., see https://github.com/schneiderfelipe/xom |
16:10:43 | fn | <R2D299> itHub: 7"Transform XML trees into performant JavaScript DOM calls at compile-time using Nim code." |
16:11:41 | fn | <Prestige99> Then it seems you don't even have read permissions on the dll (I would think) which seems odd |
16:11:54 | fn | <Prestige99> But I don't use Windows so 🤷 |
16:13:18 | FromDiscord | <hamidb80> i'm on the Windows |
16:13:18 | FromDiscord | <Ayy Lmao> I seem to be able to get the .dll to be where I need it to be by using `"--outdir:"` in the compiler when I build it. I guess that works for me |
16:13:21 | FromDiscord | <hamidb80> send your code |
16:14:43 | FromDiscord | <Ayy Lmao> In reply to @hamidb80 "send your code": It's just calling `mvFile` or `cpFile` on a .dll in NimScript |
16:19:26 | FromDiscord | <hamidb80> 😐 https://media.discordapp.net/attachments/371759389889003532/865628703668830218/unknown.png |
16:20:13 | FromDiscord | <generic linux user> due to security reasons |
16:20:21 | FromDiscord | <generic linux user> file managemnrt disabled in javascript |
16:20:36 | FromDiscord | <generic linux user> you dont want a website writing files to your disk |
16:20:52 | FromDiscord | <hamidb80> In reply to @richard stallmen(crazy GNU guy) "you dont want a": what about nimscript? |
16:20:58 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/865629091133653061/unknown.png |
16:21:01 | FromDiscord | <generic linux user> i dont know that much |
16:21:08 | FromDiscord | <juan_carlos> For NimScript it is cpFile |
16:21:44 | FromDiscord | <hamidb80> In reply to @juan_carlos "For NimScript it is": where is it documented? |
16:22:27 | FromDiscord | <juan_carlos> https://nim-lang.github.io/Nim/nimscript.html#cpFile%2Cstring%2Cstring |
16:52:59 | FromDiscord | <kaushalmodi> In reply to @hamidb80 "where is it documented?": I find it useful to bookmark this page: https://nim-lang.github.io/Nim/theindex.html↵↵Just Ctrl+F "cpFile" on there. |
16:54:02 | FromDiscord | <aleclarson> is step debugging nim code possible in vscode? |
16:54:27 | FromDiscord | <aleclarson> or rather, is it implemented by a plugin? |
16:54:40 | arkanoid | arnetheduck, late thanks for your answer (and for your effort on nlvm) |
16:56:10 | arkanoid | is {.noSideEffect.} and {.raises: [].} and {.experimental: "strictFuncs".} sufficient to enforce a pure function? |
16:56:24 | FromDiscord | <aleclarson> In reply to @aleclarson "is step debugging nim": oh i found this. has anyone tried it?↵https://github.com/jasonprogrammer/nim-debug-example |
16:56:26 | fn | <R2D299> itHub: 7"A walkthrough for setting up debugging of Nim code in VSCode" |
17:00:26 | * | ozzz joined #nim |
17:09:03 | FromDiscord | <Rika> In reply to @arkanoid "is {.noSideEffect.} and {.raises:": enforce to the best the nim compiler can yes, but it is still circumventable if you mean that |
17:16:13 | * | stkrdknmibalz joined #nim |
17:27:17 | * | rockcavera quit (Remote host closed the connection) |
17:43:37 | arkanoid | Rika, sure, I'm not expecting nim to be haskell. Thanks for the feedback |
17:43:53 | FromDiscord | <Rika> i dont remember what i said |
17:44:01 | FromDiscord | <Rika> oh you mean the thing i just said |
17:44:01 | FromDiscord | <Rika> okay |
17:44:20 | FromDiscord | <Rika> actually maybe gcsafe too would help |
17:52:24 | FromDiscord | <cynahc> Is there a pragma to selectively disable bounds checks by proc? |
17:57:17 | FromDiscord | <haxscramper> No, bound checks are placed in implementations of `[]` & other `seq` procs |
17:58:01 | FromDiscord | <haxscramper> I've seen example of casting `seq` to underlying implementation |
17:58:16 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3tbX |
17:58:44 | FromDiscord | <haxscramper> IIRC it is different for new and old runtime |
17:58:54 | FromDiscord | <haxscramper> Why do you want to disable them/ |
18:00:35 | FromDiscord | <cynahc> I was playing around with benchmarking some different memory alignment options in the ECS fashion. I know there's the compiler flags to disable them. I also found `{.push boundChecks:on.}` in the tests. |
18:18:42 | * | pro1 joined #nim |
18:22:27 | * | pro1 is now known as pro |
18:27:12 | * | maxime_ quit (Ping timeout: 250 seconds) |
18:54:57 | * | maxime_ joined #nim |
19:22:12 | * | g42x quit (Quit: Client closed) |
19:39:39 | * | carmysilna joined #nim |
19:45:02 | FromDiscord | <@bracketmaster-5a708063d73408ce4> I have a weird I allow the arg type to be `int or uint` and I need to check within the procs body whether or not I passed in int or uint |
19:45:05 | FromDiscord | <@bracketmaster-5a708063d73408ce4> how might I go about this |
19:45:20 | FromDiscord | <@bracketmaster-5a708063d73408ce4> a solution that does the check statically(at compile time) is fine |
19:47:56 | FromDiscord | <@bracketmaster-5a708063d73408ce4> `is` seems to do what I want here |
19:48:02 | FromDiscord | <Rika> `when it is int` |
19:48:25 | FromDiscord | <Rika> the check will always be at compile time |
19:48:43 | FromDiscord | <Rika> its just a matter of if you use runtime if or compiletime when |
19:48:55 | FromDiscord | <@bracketmaster-5a708063d73408ce4> first time I'm hearing of `when` |
19:49:05 | FromDiscord | <Rika> ? really |
19:49:05 | FromDiscord | <Rika> how |
19:49:12 | FromDiscord | <@bracketmaster-5a708063d73408ce4> found it |
19:49:13 | FromDiscord | <@bracketmaster-5a708063d73408ce4> https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement |
19:49:16 | fn | <Prestige99> Isn't it in the 1st tutorial |
19:49:18 | FromDiscord | <@bracketmaster-5a708063d73408ce4> well, I always used if |
19:49:26 | FromDiscord | <@bracketmaster-5a708063d73408ce4> it may have been |
19:49:36 | FromDiscord | <@bracketmaster-5a708063d73408ce4> I did do the tutorials - perhaps I"m forgetful |
19:49:48 | fn | <Prestige99> `when isMainModule` for instance |
19:49:48 | FromDiscord | <@bracketmaster-5a708063d73408ce4> https://nim-lang.org/docs/tut1.html#control-flow-statements-when-statement |
19:49:54 | FromDiscord | <@bracketmaster-5a708063d73408ce4> yup - you're right it was |
19:50:05 | FromDiscord | <@bracketmaster-5a708063d73408ce4> I never use that lol |
19:50:20 | FromDiscord | <@bracketmaster-5a708063d73408ce4> ALthough I've only been nimming officially for two months going on three now |
19:52:16 | fn | <Prestige99> It takes some time to learn, no worries |
20:34:58 | FromDiscord | <hiros> What are the known nim dialects? |
20:35:14 | fn | <Prestige99> dialects? |
20:37:47 | FromDiscord | <hiros> You know how with lisp for example there's racket, clojure, and scheme? But it's still lisp in nature? What are languages that are like that for nim? |
20:43:02 | FromDiscord | <carmysilna> new user here, but I think its just nim. Lisp is kind of special in that it has dialects, not many languages are like that |
20:43:38 | FromDiscord | <Rika> no one has made a dialect of nim yet i believe |
20:43:49 | FromDiscord | <Rika> there are similar languages but they arent forks of nim either |
20:44:00 | FromDiscord | <Rika> just "took inspiration" |
20:44:54 | FromDiscord | <Rika> indeed lisp is the exception in having dialects; thinking about C, it doesnt have as many dialects as lisp yet being much much much more popular |
20:46:32 | FromDiscord | <hiros> C is already pretty tiny to begin with. So not much you could do with a dialect of C that wouldn't become a new language entirely. It would be silly to think C++ is a C dialect. |
20:49:57 | FromDiscord | <Rika> i had whatever haskell was using in mind more |
20:50:00 | FromDiscord | <Rika> c--? |
20:50:03 | FromDiscord | <Rika> i dont know the name |
20:51:41 | FromDiscord | <InventorMatt> Nim with curly brackets could be considered a dialect |
20:53:35 | FromDiscord | <carmysilna> Its Cmm, I think, for, C minus minus |
20:58:18 | * | pro quit (Quit: WeeChat 3.2) |
21:25:33 | * | maxime_ quit (Quit: Leaving) |
21:37:35 | * | Vladar quit (Quit: Leaving) |
21:39:35 | * | carmysilna left #nim (#nim) |
22:01:50 | * | rockcavera joined #nim |
22:01:50 | * | rockcavera quit (Changing host) |
22:01:50 | * | rockcavera joined #nim |
22:10:05 | FromDiscord | <stu002> If I have a `proc` that accepts a proc parameter `proc (x: int, y:int): bool` do I always need to wrap the builtin `==` proc to pass it as a parameter? |
22:12:17 | FromDiscord | <ElegantBeef> I dont follow what you mean |
22:12:37 | FromDiscord | <ElegantBeef> if a proc you pass to a proc matches the type signature it'll let you pass it |
22:16:30 | FromDiscord | <theangryepicbanana> In reply to @ElegantBeef "if a proc you": I think they want to pass the `==` operation as a proc |
22:16:40 | FromDiscord | <theangryepicbanana> I think you could do that by putting the operator in backticks |
22:19:20 | FromDiscord | <ElegantBeef> Nah some operators cannot be passed due to using compiler magic iirc |
22:19:31 | FromDiscord | <ElegantBeef> So yea for primitives you need to wrap them afaik |
22:20:47 | FromDiscord | <stu002> Thanks -- the backticks approach didn't work and I started to suspect that `==` was special somehow |
22:23:04 | FromDiscord | <stu002> Target function was `func is_equal(eq: proc (x: int, y: int): bool, a: int, b: int): bool = eq(a, b)` |
22:23:36 | FromDiscord | <stu002> And the call `is_equal(``==``, 12 ,42)` |
22:23:47 | FromDiscord | <stu002> Only with single backticks |
22:25:04 | FromDiscord | <stu002> But this did work: `is_equal((x: int, y: int) => x == y, 12, 42)` |
22:37:14 | FromDiscord | <jfmonty2> `when` is basically compile-time `if`, right? So in a macro or const assignment, can they be used interchangeably? |
22:38:09 | FromDiscord | <juan_carlos> when does not open a new scope, if does. |
22:38:29 | FromDiscord | <jfmonty2> ah |
22:57:45 | * | rockcavera quit (Remote host closed the connection) |
23:25:29 | FromDiscord | <dom96> Anyone familiar with VS Code know how to see what the extensions are running? |
23:29:46 | FromDiscord | <dom96> nvm |
23:45:49 | FromDiscord | <dom96> damn dimscord is really nice |
23:46:07 | FromDiscord | <dom96> well done @krisppurg and all contributors 🙂 |
23:55:47 | fn | <Prestige99> yeah it's great |