00:00:16 | * | maier quit (Ping timeout: 256 seconds) |
00:00:25 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> :p |
00:01:38 | * | leorize joined #nim |
00:09:05 | FromDiscord | <Elegant Beef> oh shit @Recruit_main707 i realized you casted to a pointer and yea that works |
00:09:18 | FromDiscord | <Elegant Beef> we're at `100.320991455078` |
00:10:58 | FromDiscord | <Rika> nice |
00:11:00 | FromDiscord | <Rika> congrats |
00:11:01 | FromDiscord | <Rika> told you |
00:12:08 | FromDiscord | <Elegant Beef> Fuck yea works on objects! https://media.discordapp.net/attachments/371759389889003532/731301759401721958/unknown.png |
00:12:20 | FromDiscord | <Elegant Beef> Told you rika! I told you! 😛 |
00:13:04 | FromDiscord | <Elegant Beef> @Recruit_main707 so congrats you solved your object issue |
00:15:51 | FromDiscord | <Rika> @Elegant Beef now try saving that bitstring and using it on next run |
00:15:58 | FromDiscord | <Recruit_main707> es |
00:16:07 | FromDiscord | <Rika> the string will either show garbled data or segfault your program |
00:16:12 | FromDiscord | <Recruit_main707> Dammit autocorrector |
00:16:14 | FromDiscord | <Rika> im almost sure of it |
00:17:32 | FromDiscord | <Elegant Beef> Why are you so mean |
00:17:48 | FromDiscord | <Rika> am i right? |
00:17:54 | FromDiscord | <Rika> lol |
00:17:58 | FromDiscord | <Elegant Beef> You couldnt just let me be hpapy |
00:18:00 | FromDiscord | <Rika> you're saving the pointer to the data is why |
00:18:00 | FromDiscord | <Elegant Beef> (edit) 'hpapy' => 'happy' |
00:18:27 | FromDiscord | <Rika> it works in the example you sent since the pointer never changes |
00:20:14 | FromDiscord | <Elegant Beef> Ah i see |
00:20:36 | FromDiscord | <Elegant Beef> So i didnt ever do what i want is what you're saying |
00:20:42 | FromDiscord | <Elegant Beef> Nice |
00:21:34 | FromDiscord | <Rika> you need to add a special case for objects, iterating through the thing (+ containers too i assume) |
00:22:23 | FromDiscord | <Rika> and this kinda isnt safe for network transmission either unless you use TCP since a dropped packet would fuck you over really damn hard |
00:24:36 | FromDiscord | <Elegant Beef> I mean i only intend on sending primitive data types in a byte arrayt |
00:24:37 | FromDiscord | <Elegant Beef> (edit) 'arrayt' => 'array' |
00:24:56 | FromDiscord | <Elegant Beef> But vectors are primitive data types |
00:25:03 | FromDiscord | <Elegant Beef> 😄 |
00:26:14 | FromDiscord | <Elegant Beef> Then what the hell is the proper way to convert datatypes into a byte array |
00:26:15 | FromDiscord | <Elegant Beef> 😄 |
00:27:57 | FromDiscord | <Rika> using a protocol? like protobuf or bson or so |
00:28:03 | FromDiscord | <Rika> i mean a |
00:28:09 | FromDiscord | <Rika> what do you call it |
00:28:17 | FromDiscord | <Rika> a data serialization thingy |
00:28:20 | FromDiscord | <Rika> names are hard |
00:28:21 | FromDiscord | <Rika> w/e |
00:28:34 | FromDiscord | <Elegant Beef> Yea but i mean in nim we dont have a way to marshal to the byte array? |
00:29:10 | * | hyiltiz quit (Ping timeout: 246 seconds) |
00:31:26 | FromDiscord | <Rika> marshal module? |
00:31:37 | FromDiscord | <Rika> i think is what you want? no clue, its late for me |
00:32:34 | * | oddp quit (Ping timeout: 240 seconds) |
00:34:48 | * | hyiltiz joined #nim |
00:34:48 | * | hyiltiz quit (Changing host) |
00:34:48 | * | hyiltiz joined #nim |
00:35:04 | * | lritter quit (Quit: Leaving) |
00:35:17 | FromDiscord | <Elegant Beef> > The serialization format uses JSON |
00:36:23 | FromDiscord | <Rika> get to programming bson then or smth i guess |
00:36:51 | FromDiscord | <Elegant Beef> I mean i just need the bytes |
00:37:03 | FromDiscord | <Elegant Beef> I dont need to use any format |
00:37:11 | FromDiscord | <Elegant Beef> My macro was making the format |
00:37:13 | FromDiscord | <Rika> what you are doing is making a format |
00:39:14 | * | hyiltiz quit (Ping timeout: 240 seconds) |
00:39:29 | FromDiscord | <Elegant Beef> Well im making many formats |
00:39:46 | FromDiscord | <Elegant Beef> But the point is i dont really need to use anything, i just need the underlying bytes |
00:40:47 | FromDiscord | <Elegant Beef> Ah |
00:40:48 | FromDiscord | <Rika> i dont understand how this would be useful in any useful usecase but ok |
00:40:52 | FromDiscord | <Elegant Beef> string stream is the winne |
00:40:53 | FromDiscord | <Elegant Beef> (edit) 'winne' => 'winner' |
00:41:03 | FromDiscord | <Elegant Beef> The point is im automating the creation of packets |
00:41:13 | FromDiscord | <Elegant Beef> So i just need to read primitive types off the packets |
00:42:14 | FromDiscord | <Elegant Beef> A person can add a pragma, it then generates a packet ID, to/from methods and adds a send packet if not reading from a buffer |
00:42:20 | * | hyiltiz joined #nim |
00:42:20 | * | hyiltiz quit (Changing host) |
00:42:20 | * | hyiltiz joined #nim |
00:42:29 | FromDiscord | <Elegant Beef> So that way you just write event logic and then call it |
00:42:46 | FromDiscord | <Elegant Beef> and in the case of netty, messages are written as strings |
00:44:31 | FromDiscord | <Elegant Beef> Or not |
00:44:40 | FromDiscord | <Elegant Beef> Cause it also uses the address |
00:44:54 | FromDiscord | <Elegant Beef> Ok this is out of the scope of my knowledge |
00:47:37 | * | hyiltiz quit (Ping timeout: 264 seconds) |
00:50:22 | * | audiophile_ quit (Quit: Default Quit Message) |
00:52:16 | * | hyiltiz joined #nim |
00:52:17 | * | hyiltiz quit (Changing host) |
00:52:17 | * | hyiltiz joined #nim |
01:07:10 | * | hyiltiz quit (Ping timeout: 272 seconds) |
01:09:50 | * | hyiltiz joined #nim |
01:09:50 | * | hyiltiz quit (Changing host) |
01:09:50 | * | hyiltiz joined #nim |
01:16:56 | * | hyiltiz quit (Ping timeout: 256 seconds) |
01:18:53 | FromDiscord | <Zachary Carter> I think I figured out the problem with my importcpp objects and the destructors not being called consistently |
01:19:38 | FromDiscord | <Zachary Carter> I think it's because the code I'm writing is being compiled to a shared library and loaded with dlopen / close |
01:21:46 | FromDiscord | <Zachary Carter> and the variable that is of the type with the fields that are importcpp'd is a static global |
01:23:53 | FromDiscord | <Zachary Carter> so the destructors aren't guaranteed to be called when the library is unloaded |
01:25:20 | FromDiscord | <Zachary Carter> so I guess I have a few options - create equivalent Nim types and use copyMem and only instantiate the C++ objects inside of procs |
01:25:30 | FromDiscord | <Zachary Carter> or write a C99 API for this C++ API and bind to that :/ |
01:25:37 | FromDiscord | <Zachary Carter> both options sound like a lot of work... |
01:29:04 | FromDiscord | <Zachary Carter> I wish there was an easy way to generate a C99 API for a C++ library automatically - BGFX did some idl magic but it looks like a lot of work in of itself |
01:33:35 | * | chemist69_ joined #nim |
01:36:46 | * | chemist69 quit (Ping timeout: 256 seconds) |
01:39:57 | shashlick | Still no luck with gc arc - doesn't work with the plugins package let alone feud |
01:43:41 | FromDiscord | <Zachary Carter> well - I'm successfully using plugins but with a C library |
01:44:12 | shashlick | It works fine with boehm but not arc |
01:44:50 | FromDiscord | <Zachary Carter> yeah boehm is a no-go for me |
01:44:54 | FromDiscord | <Zachary Carter> for pretty much any work I do in Nim |
01:44:57 | * | tinga quit (Ping timeout: 260 seconds) |
01:45:22 | FromDiscord | <Zachary Carter> but I don't think the GC has much to do with my issue here |
01:45:32 | FromDiscord | <Zachary Carter> you'd encounter the same issue if you were writing shared libraries with C++ |
01:45:57 | FromDiscord | <Zachary Carter> I think anyway... |
01:46:36 | leorize | why are you dlclose()-ing? |
01:46:53 | FromDiscord | <Zachary Carter> I'm not - the C library is |
01:46:54 | leorize | is that a plugin system kind of thing? |
01:46:57 | FromDiscord | <Zachary Carter> yes |
01:47:42 | FromDiscord | <Zachary Carter> my code is being loaded as a plugin by the executable that's written in C |
01:47:52 | FromDiscord | <Zachary Carter> and then when the process terminates it is calling dlclose on it |
01:48:14 | leorize | and your problem is? |
01:48:42 | FromDiscord | <Zachary Carter> so I have a C++ library I've constructed a wrapper for |
01:49:15 | FromDiscord | <Zachary Carter> in my Nim code that's being compiled to a shared library, I have a type defined which has several fields which are of types defined in this wrapper |
01:49:36 | FromDiscord | <Zachary Carter> I then have a global variable in the shared library of this Nim object type |
01:50:14 | FromDiscord | <Zachary Carter> the destructors for the importcpp'd fields in this object aren't getting called always |
01:50:50 | FromDiscord | <Zachary Carter> so I can't call them explicitly and I can't rely on them being called implicitly |
01:51:25 | FromDiscord | <Zachary Carter> but apparently this is a known issue with some C++ compilers - https://stackoverflow.com/questions/38510621/destructor-of-a-global-static-variable-in-a-shared-library-is-not-called-on-dlcl |
01:53:47 | leorize | I think the main problem is that you just can't register anything to be called when the library is closed |
01:53:49 | FromDiscord | <Elegant Beef> @Rika well this works, and it looks hideous, but now it writes the byte to a string stream↵https://play.nim-lang.org/#ix=2rmU |
01:54:02 | leorize | also keep in mind that dlclose() is permitted to **not** close |
01:54:04 | FromDiscord | <Elegant Beef> Obviously strings will cause it to implode |
01:54:06 | leorize | per POSIX |
01:54:40 | FromDiscord | <Elegant Beef> Also i swear i tested write previously and it wasnt proper |
01:54:46 | FromDiscord | <Elegant Beef> But now it seems to wrok |
01:54:49 | FromDiscord | <Elegant Beef> (edit) 'wrok' => 'work' |
01:54:53 | FromDiscord | <Zachary Carter> yeah - I think I just need to bite the bullet and write a C99 API for this library |
01:55:13 | FromDiscord | <Zachary Carter> if I really want to continue working on this project and not just start using Unity / some C++ engine on github |
01:55:16 | leorize | why can't you just call the destructor manually? |
01:55:24 | FromDiscord | <Zachary Carter> because it might be double freed |
01:55:37 | leorize | actually, why are you using something that requires to be destroyed? |
01:56:07 | FromDiscord | <Zachary Carter> because there's a leak detector in the library I'm using which asserts that no allocations have occurred that haven't been deallocated |
01:56:16 | FromDiscord | <Zachary Carter> I can probably just fork the library and get rid of that |
01:56:34 | * | maier joined #nim |
01:56:54 | leorize | they might have a way to mark something as still in use so it wouldn't trip |
01:57:03 | FromDiscord | <Zachary Carter> maybe... |
01:58:26 | leorize | can you just call the destructor explicitly then memset the area to 0 to prevent any double free? |
01:58:52 | leorize | unless you don't know the real object size... then that's a problem... |
01:59:07 | leorize | or you can turn the object into a heap object, then you can just delete the pointer when you're done |
01:59:40 | * | vicfred quit (Quit: Leaving) |
02:00:21 | FromDiscord | <Zachary Carter> good suggestions, I'll play around with those ideas - thanks leorize! |
02:01:08 | * | maier quit (Ping timeout: 256 seconds) |
02:01:10 | leorize | np :) |
02:04:38 | FromDiscord | <Zachary Carter> leorize: I owe you beers - zeroing out the memory worked perfectly |
02:09:43 | * | krux02_ quit (Remote host closed the connection) |
02:10:59 | * | evilkhaoskat joined #nim |
02:12:15 | FromDiscord | <Zachary Carter> if you don't like beer, then food 😛 |
02:15:17 | * | sagax joined #nim |
02:15:43 | FromDiscord | <Zachary Carter> well now I don't owe you 😛 |
02:15:49 | * | evilkhaoskat quit (Ping timeout: 264 seconds) |
02:15:53 | leorize | oi no takeback :P |
02:16:16 | FromDiscord | <Zachary Carter> haha check your librepay or whatever |
02:16:34 | FromDiscord | <Zachary Carter> Liberapay* |
02:18:08 | FromDiscord | <Zachary Carter> I also need to donate money to @shashlick - where's your donation button? |
02:18:52 | leorize | oh thanks, I thought no one ever know that link exists lol |
02:19:19 | FromDiscord | <Zachary Carter> 😛 np! you've helped me out quite a few times and I appreciate it - least I can do |
02:25:57 | * | muffindrake1 joined #nim |
02:26:22 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:28:31 | FromDiscord | <flywind> Hi, the tutorial says we can use `if n.info ?? "temp.nim"` to debug the compiler, but the signature is `proc ??(conf: ConfigRef; info: TLineInfo; filename: string): bool`. What's wrong with it? |
02:28:34 | FromDiscord | <flywind> https://nim-lang.github.io/Nim/intern.html#debugging-the-compiler |
02:40:08 | shashlick | any time z |
02:42:30 | * | hyiltiz joined #nim |
02:42:30 | * | hyiltiz quit (Changing host) |
02:42:31 | * | hyiltiz joined #nim |
02:46:43 | * | hyiltiz quit (Ping timeout: 246 seconds) |
02:49:13 | * | muffindrake1 is now known as muffindrake |
03:07:02 | * | synshroud_ joined #nim |
03:07:22 | * | synshroud quit (Ping timeout: 246 seconds) |
03:09:58 | * | hyiltiz joined #nim |
03:14:14 | * | hyiltiz quit (Ping timeout: 240 seconds) |
03:22:20 | * | hyiltiz joined #nim |
03:22:20 | * | hyiltiz quit (Changing host) |
03:22:20 | * | hyiltiz joined #nim |
03:26:34 | * | hyiltiz quit (Ping timeout: 240 seconds) |
03:29:30 | * | audiophile_ joined #nim |
03:29:51 | * | hyiltiz joined #nim |
03:29:51 | * | hyiltiz quit (Changing host) |
03:29:52 | * | hyiltiz joined #nim |
03:32:14 | * | hyiltiz_ joined #nim |
03:35:22 | * | hyiltiz quit (Ping timeout: 272 seconds) |
03:47:14 | * | hyiltiz joined #nim |
03:47:14 | * | hyiltiz quit (Changing host) |
03:47:14 | * | hyiltiz joined #nim |
03:51:49 | * | hyiltiz quit (Ping timeout: 264 seconds) |
03:54:50 | * | hyiltiz joined #nim |
03:54:50 | * | hyiltiz quit (Changing host) |
03:54:50 | * | hyiltiz joined #nim |
03:57:21 | * | maier joined #nim |
04:01:34 | * | maier quit (Ping timeout: 240 seconds) |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:39 | * | supakeen joined #nim |
04:12:15 | FromGitter | <Knaque> This isn't really a Nim-specific question, but I'm terrible at Regexes. Can anyone help me out with one that matches `<any text>_<4 digits>-<2 digits>-<2 digits>.html`? |
04:13:28 | * | hyiltiz quit (Ping timeout: 258 seconds) |
04:18:12 | * | audiophile_ quit (Quit: Default Quit Message) |
04:18:25 | leorize | `.+_\d{4}-\d{2}-\d{2}` <- this should be it if my regex skill is still ok enough |
04:18:31 | leorize | you can check for it on regex101 |
04:18:40 | leorize | it's a website that visualizes regex |
04:18:52 | leorize | and explains it as well |
04:19:38 | leorize | `.+_\d{4}-\d{2}-\d{2}\.html` <- forgot the html part :P |
04:20:09 | FromGitter | <Knaque> *That's* where I went wrong, I forgot the `+` quantifier. Much thanks! |
04:36:45 | * | synshroud_ quit (Quit: ZNC 1.7.5 - https://znc.in) |
04:46:53 | * | solitudesf joined #nim |
04:48:34 | * | arecaceae quit (Remote host closed the connection) |
04:48:58 | * | arecaceae joined #nim |
04:55:30 | * | fredrikhr quit (Read error: Connection reset by peer) |
04:57:50 | shashlick | does arc support channels? |
05:08:29 | * | hyiltiz joined #nim |
05:08:29 | * | hyiltiz quit (Changing host) |
05:08:29 | * | hyiltiz joined #nim |
05:10:37 | leorize | it should now |
05:11:54 | FromDiscord | <Avatarfighter> just to make sure, orc is still superior to arc right> |
05:12:36 | leorize | they're pretty much the same thing tbh |
05:12:54 | leorize | ideally you should make your libraries compatible with arc |
05:13:06 | leorize | orc is for making programs so you don't have to care about cycles |
05:13:09 | FromDiscord | <Avatarfighter> What was the difference between orc and arc? Async if I recall correctly right? |
05:13:14 | * | hyiltiz quit (Ping timeout: 256 seconds) |
05:13:19 | leorize | orc can collect cycles |
05:13:23 | leorize | arc can't |
05:14:07 | FromDiscord | <Avatarfighter> ok nice that's what I have in my notes lol just wanted to make sure they are up to date |
05:14:30 | FromDiscord | <Elegant Beef> Your notes? |
05:14:45 | FromDiscord | <Avatarfighter> I just have little notes to remind myself of the correct use of stuff or the way stuff works |
05:15:09 | FromDiscord | <Elegant Beef> Interesting, i just ram my face into the manual and hope what i want i find 😄 |
05:15:14 | FromDiscord | <Avatarfighter> lmao |
05:15:15 | FromDiscord | <Avatarfighter> same |
05:16:20 | FromDiscord | <Avatarfighter> my notes are mostly when to use closureScope, how the endian library works, basically everything I've talked about/asked in the irc |
05:16:38 | FromDiscord | <Avatarfighter> by how the endian library works I meant wtf the syntax to call the procs are lmao |
05:28:12 | * | endragor_ joined #nim |
05:28:12 | * | endragor quit (Read error: Connection reset by peer) |
05:46:52 | * | solitudesf- joined #nim |
05:49:25 | * | solitudesf quit (Ping timeout: 264 seconds) |
05:51:11 | * | solitudesf- is now known as solitudesf |
05:53:44 | * | sknebel quit (Quit: No Ping reply in 180 seconds.) |
05:55:10 | * | sknebel joined #nim |
05:56:41 | * | narimiran joined #nim |
05:58:17 | * | maier joined #nim |
06:01:07 | * | hoek_ joined #nim |
06:01:16 | * | vicfred joined #nim |
06:01:30 | * | hoek quit (Ping timeout: 256 seconds) |
06:01:31 | * | hoek_ is now known as hoek |
06:02:34 | * | maier quit (Ping timeout: 240 seconds) |
06:03:22 | * | oprypin quit (Ping timeout: 256 seconds) |
06:03:22 | * | Amun_Ra quit (Ping timeout: 256 seconds) |
06:05:57 | * | oprypin joined #nim |
06:06:01 | * | nerdrat[m]1 joined #nim |
06:06:02 | * | nerdrat[m] quit (Ping timeout: 256 seconds) |
06:06:16 | * | Amun_Ra joined #nim |
06:34:20 | * | hyiltiz joined #nim |
06:34:20 | * | hyiltiz quit (Changing host) |
06:34:20 | * | hyiltiz joined #nim |
06:39:08 | * | hyiltiz quit (Ping timeout: 256 seconds) |
06:42:17 | * | hyiltiz joined #nim |
06:42:17 | * | hyiltiz quit (Changing host) |
06:42:17 | * | hyiltiz joined #nim |
06:46:43 | * | hoijui joined #nim |
06:46:48 | * | hyiltiz quit (Ping timeout: 258 seconds) |
06:55:30 | * | narimiran quit (Ping timeout: 272 seconds) |
07:21:05 | FromDiscord | <impbox> `C:\Users\user\git\gmtk2020\src\main.nim(256, 18) Error: 'self' is of type <var Vehicle> which cannot be captured as it would violate memory safety, declared here: C:\Users\user\git\gmtk2020\src\main.nim(149, 13)` hmm is there a rule disallowing capturing vars? |
07:21:13 | FromDiscord | <impbox> first time i've encountered this |
07:22:05 | FromDiscord | <impbox> https://forum.nim-lang.org/t/5672 answers my qs |
07:29:46 | * | hyiltiz joined #nim |
07:29:46 | * | hyiltiz quit (Changing host) |
07:29:46 | * | hyiltiz joined #nim |
07:33:12 | * | Vladar joined #nim |
07:34:20 | * | hyiltiz quit (Ping timeout: 258 seconds) |
07:36:53 | * | solitudesf quit (Remote host closed the connection) |
07:43:48 | FromDiscord | <Varriount> Araq: Why do streams in the streams module use a null byte as an EOF indicator? What if the stream naturally contains a null byte? |
07:45:28 | FromDiscord | <Elegant Beef> i hope the answer is "Just dont do that" 😄 |
07:46:41 | FromDiscord | <Varriount> If it is, then that's a serious concern. Files, IP, and data streams in general are usually allowed to carry null bytes. |
07:50:44 | FromDiscord | <Elegant Beef> String stream doesnt |
07:51:05 | FromDiscord | <Elegant Beef> and write implementation converts to cstring |
07:51:47 | FromDiscord | <Elegant Beef> and filestream just uses the `endOfFile` |
07:52:13 | FromDiscord | <Elegant Beef> So i could be wrong as a numpty, but there isnt an issue? |
07:53:53 | FromDiscord | <Elegant Beef> I guess if writting to a file stream |
07:57:02 | * | evilkhaoskat joined #nim |
08:00:03 | FromDiscord | <Varriount> Or reading from one |
08:01:27 | FromDiscord | <Elegant Beef> Well a file terminates with a null no? |
08:01:42 | FromDiscord | <Varriount> No, it does not. |
08:02:26 | * | solitudesf joined #nim |
08:02:50 | FromDiscord | <Elegant Beef> The get file checks if the next char is <0 so, just assumed |
08:03:50 | FromDiscord | <Elegant Beef> (edit) 'get' => 'end of' |
08:05:12 | FromDiscord | <Varriount> https://forum.nim-lang.org/t/2787 |
08:06:59 | FromDiscord | <Varriount> Looks like this has been a problem for quite a while. |
08:07:05 | FromDiscord | <Elegant Beef> Ah |
08:10:25 | FromDiscord | <Varriount> @Elegant Beef What time zone are you in? You always seem to be around |
08:10:42 | FromDiscord | <Elegant Beef> Im in -7 |
08:11:07 | FromDiscord | <Elegant Beef> Im also an umployed so i can always be around |
08:11:12 | FromDiscord | <Varriount> Western US? |
08:11:23 | FromDiscord | <Elegant Beef> Central Canada |
08:11:54 | FromDiscord | <Varriount> Ah. Sorry, I made the mistake of forgetting about Canada. |
08:12:07 | FromDiscord | <Elegant Beef> It's ok after this pandemic we'll quickly forget about you |
08:12:09 | FromDiscord | <Elegant Beef> 😛 |
08:13:05 | FromDiscord | <Elegant Beef> That's why i had joking asked you about coming here to "go to alaska" |
08:13:16 | FromDiscord | <Varriount> Yeah, now I recall |
08:13:59 | FromDiscord | <Varriount> For what it's worth, most people in my area are wearing face masks |
08:14:35 | FromDiscord | <Elegant Beef> Very few here, as a province we have ~500 cases, and most are in the cities not rural Alberta |
08:14:44 | FromDiscord | <Varriount> Though, the reopening in my state doesn't seem to have helped. |
08:15:02 | FromDiscord | <Varriount> It's not as bad as Florida though |
08:15:29 | FromDiscord | <Elegant Beef> 592 active cases and 228 are in a single zone |
08:16:29 | FromDiscord | <Elegant Beef> Yea i get the benefits of living in a place that has the area of france but with the population of new zealand |
08:18:11 | FromDiscord | <Elegant Beef> It's actually quite crazy how low the population density is in the rural areas, since ~50% of the population live in 2 cities |
08:18:13 | FromDiscord | <Elegant Beef> Anywho |
08:19:46 | * | hyiltiz joined #nim |
08:23:54 | * | hyiltiz quit (Ping timeout: 240 seconds) |
08:35:20 | FromGitter | <alehander92> ok |
08:35:36 | FromGitter | <alehander92> interesting, we do have more density |
08:35:41 | FromGitter | <alehander92> but less than western europe |
08:35:53 | FromGitter | <alehander92> i kinda forget to take this into account when thinking |
09:13:10 | * | evilkhaoskat quit (Remote host closed the connection) |
09:19:50 | * | chemist69_ quit (Ping timeout: 256 seconds) |
09:20:54 | * | chemist69 joined #nim |
09:24:40 | FromDiscord | <Clyybber> Araq: WDYT about putting the try: finally: optimization in the backend instead? |
09:49:43 | * | oddp joined #nim |
09:54:48 | * | nikita` joined #nim |
09:56:48 | * | evilkhaoskat joined #nim |
10:40:57 | * | owl_000 joined #nim |
10:42:20 | owl_000 | https://play.nim-lang.org/#ix=2rnM why update does not work? |
10:57:56 | planetis[m] | you need ``update(self: var Rectangle`` in order to work |
10:58:00 | * | fredrikhr joined #nim |
10:58:55 | owl_000 | thanks, |
11:04:02 | * | owl_000 quit (Quit: Leaving) |
11:05:04 | * | krux02 joined #nim |
11:08:35 | supakeen | On this code I get a warning that I need a {.base.} on all the procs after the first; those types are all `Player = ref object of Object` what am I not understanding? :) |
11:09:29 | supakeen | Let me add the code: https://bpa.st/PQKA |
11:12:57 | * | letto quit (Quit: Konversation terminated!) |
11:13:42 | * | letto joined #nim |
11:14:32 | * | evilkhaoskat quit () |
11:15:27 | * | Vladar quit (Quit: Leaving) |
11:17:33 | * | Ekho quit (Ping timeout: 244 seconds) |
11:17:36 | FromDiscord | <lqdev> you need to annotate the procedure on the base object (one that others inherit from) with {.base.{ |
11:17:38 | FromDiscord | <lqdev> (edit) '{.base.{' => '{.base.}' |
11:18:03 | FromDiscord | <lqdev> also, if you want to use methods like this, you need to compile with --multimethods:on |
11:21:27 | supakeen | I thought I did the first bit (the method that has a: Object, b: Object) let me check multimethods. |
11:22:19 | FromDiscord | <lqdev> yeah you did the first bit correctly |
11:22:25 | FromDiscord | <lqdev> just need to enable multimethods now |
11:22:32 | supakeen | Ah yea, that did the trick, thank you. |
11:25:10 | supakeen | Now to find where to set this on a per-project basis for the Nim plugin I use in my editor :) |
11:27:15 | FromDiscord | <lqdev> create a `nim.cfg` file |
11:27:24 | FromDiscord | <lqdev> and put `--multimethods:on` in it |
11:27:48 | FromDiscord | <lqdev> the file must be next to all of your project files |
11:28:59 | supakeen | Ah yes, of course everything listens to that. Great, on to some more coding thanks again! |
11:29:30 | * | lbart_ joined #nim |
11:32:01 | * | lbart quit (Ping timeout: 264 seconds) |
11:36:27 | * | Ekho joined #nim |
12:00:00 | * | vikfret quit (Quit: Leaving) |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:43 | * | supakeen joined #nim |
12:16:39 | bung | in karax how to add node to root , I have node affected by parents, so I want add it to end of root |
12:17:59 | bung | problems with safari, event it is position fixed. |
12:18:06 | bung | even |
12:19:59 | ForumUpdaterBot | New thread by Oyster: [offtopic]2 cross-platform GUI library, see https://forum.nim-lang.org/t/6532 |
12:50:05 | * | NimBot joined #nim |
13:44:15 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> I need a project that I'll actually continue :/ |
13:45:25 | * | Vladar joined #nim |
13:56:56 | FromDiscord | <juan_carlos> Why theres no `json.%` for `tuple`?. :( |
14:06:06 | * | mbuchel joined #nim |
14:10:34 | disruptek | 100 packets transmitted, 31 received, 69% packet loss, time 110108ms |
14:25:49 | FromDiscord | <Vindaar> @juan_carlos iirc because of ambiguity wrt how to differentiate a tuple from an object in json. or something, something named / unnamed tuples. there was a reason haha |
14:27:26 | FromDiscord | <juan_carlos> Ok, I was wondering because theres overload for `object`, `enum` and `array[tuple]`, but not for `tuple`. |
14:38:28 | * | lritter joined #nim |
14:44:34 | * | kungtotte quit (Ping timeout: 240 seconds) |
14:47:28 | * | vicfred_ joined #nim |
14:50:30 | * | vicfred quit (Ping timeout: 272 seconds) |
14:51:38 | * | kungtotte joined #nim |
14:53:14 | * | lbart_ quit (Ping timeout: 260 seconds) |
15:12:39 | FromDiscord | <treeform> Hey so iterating over enums used to work? How to get it back? I have an enum with holes, and I want all of the enum names in a for loop. |
15:14:00 | solitudesf | it used to work wrong, since it would yield incorrect values |
15:15:44 | FromDiscord | <Clyybber> I had a fix, but it required macros.nim, so I can't put it in system.nim |
15:16:03 | FromDiscord | <treeform> https://play.nim-lang.org/#ix=2rox |
15:16:11 | FromDiscord | <treeform> what should I do now? How to work around? |
15:16:29 | FromDiscord | <Clyybber> write an items iterator that just runs over the full set |
15:16:45 | FromDiscord | <Clyybber> make a macro to construct the full set expression from a enum type |
15:17:00 | FromDiscord | <treeform> I am not using sets? |
15:17:08 | disruptek | you will be. |
15:17:40 | mbuchel | is there an easy way to make a union of 2 or more datatypes without using macros? |
15:19:13 | FromDiscord | <treeform> Can I do some thing like `for button in 0 .. Button.high:`? Does not looks like high works for enums... |
15:20:05 | FromGitter | <memnoth> A newb's question. Is there a reason that dollar opt on array written like this? As a consequence, it returns whole values with [, comma, and ] though. --> https://github.com/nim-lang/Nim/blob/21772b6419b6cb3b59b436fbdcd8975a9da62349/lib/system/dollars.nim#L166 |
15:20:31 | FromDiscord | <Yardanico> @memnoth well yes, $ is supposed to return a human-readable representation of something |
15:21:50 | FromDiscord | <treeform> Looks like this works: `for button in 0 .. ord(high(Button)): echo Button(button)` I guess I'll be using that. |
15:22:17 | FromDiscord | <treeform> I liked the previous method better. |
15:22:20 | FromDiscord | <treeform> Much cleaner |
15:28:00 | FromGitter | <memnoth> @Yardanico that means the opt represents it as you said rather than stringify it? |
15:28:17 | FromDiscord | <Yardanico> ? |
15:28:31 | FromDiscord | <Yardanico> $ operator usually means "return a human-readable representation of something" |
15:28:33 | FromDiscord | <Yardanico> in nim |
15:28:57 | FromDiscord | <Yardanico> it's not about making a machine-parsable or something (for that there's JSON and friends) |
15:37:12 | FromDiscord | <Clyybber> @treeform You want to iterate over all valid enum states right? |
15:38:33 | FromDiscord | <Clyybber> This is what I would do: https://play.nim-lang.org/#ix=2roE |
15:38:49 | FromDiscord | <Clyybber> And to generate this "whole set" automatically I would use a macro |
15:39:44 | FromGitter | <memnoth> What should I do from an array of cchar to string? the $ opt doesn't work as I expected, for instance, it returns like "['s', 'r', 'c', '\x00']" with "echo $path". Or do I have to make a new toString proc? |
15:40:19 | FromDiscord | <treeform> @Clyybber I see, thanks. |
15:40:24 | FromGitter | <memnoth> Nim tutorial says $ opt is usually used to toString though. |
15:41:01 | FromDiscord | <Clyybber> memnoth: Is the array nullterminated? |
15:41:12 | FromGitter | <memnoth> @Clyybber Yes |
15:41:48 | FromDiscord | <Clyybber> Do this then: cast[string](@thearray) |
15:43:42 | FromDiscord | <Clyybber> @flywind You can probably use testaments errormsg: param, I think the error was that you included the full path |
15:47:07 | FromGitter | <memnoth> @Clyybber thank you for that. it works. |
15:47:21 | * | narimiran joined #nim |
15:47:40 | FromDiscord | <Clyybber> np |
15:48:53 | * | audiophile_ joined #nim |
15:49:34 | FromDiscord | <Solitude> @Clyybber the length is going to be incorrect tho |
15:53:27 | FromDiscord | <Solitude> @memnoth, you should just allocate new string and copymem the array into it |
15:58:36 | leorize | @Clyybber that's pretty unsafe |
15:58:51 | leorize | this should be safer: `$cast[cstring](theArray[0])` |
15:59:19 | leorize | oops forgot addr: `$cast[cstring](addr theArray[0])` |
16:08:46 | ForumUpdaterBot | New thread by Sschwarzer: "Nim for Python Programmers" wiki page, see https://forum.nim-lang.org/t/6534 |
16:10:27 | FromDiscord | <Vindaar> @treeform wrote this some time ago https://github.com/jovoy/AxionElectronLimit/blob/master/readOpacityFile.nim#L70 |
16:10:48 | FromDiscord | <Clyybber> Ah, right the length will be off by one |
16:10:56 | FromDiscord | <Vindaar> you can adapt it to your needs I guess |
16:10:58 | FromDiscord | <Clyybber> probably better to use what leorize sent |
16:16:28 | FromDiscord | <KingDarBoja> https://forum.nim-lang.org/t/6534 @juan_carlos 😛 |
16:25:24 | * | hyiltiz_ quit (Ping timeout: 256 seconds) |
16:26:03 | * | hyiltiz joined #nim |
16:29:28 | shashlick | @Clyybber - see https://github.com/genotrance/plugins/blob/master/src/plugins/globals.nim#L18 - Plugins point to PluginManager which points to Plugins |
16:30:22 | FromDiscord | <Yardanico> well even with arc applications with cycles shouldn't crash |
16:30:38 | FromDiscord | <Yardanico> they will just leak some memory 😛 |
16:31:48 | FromDiscord | <Clyybber> shashlick: Alright, now where should I put all the arc switches? |
16:32:06 | shashlick | note also that plugin dlls call procs in the main executable - https://github.com/genotrance/plugins/blob/master/src/plugins/utils.nim#L418 so i've seen some memory issues with that |
16:32:12 | shashlick | all this works with boehm |
16:32:43 | shashlick | to avoid that issue, simply comment out the line in config.nims, change plugin.nim call to nim c and add the flag there |
16:33:01 | shashlick | and then compile main executable with `nim c --gc:arc -r tests/tmain` |
16:33:15 | shashlick | that way, main exe and dlls are compiled with the same switches |
16:33:19 | FromDiscord | <Yardanico> won't you need e.g. to use GC_ref GC_unref when using dll plugins? |
16:33:25 | FromDiscord | <Yardanico> for GC'd memory |
16:33:52 | FromDiscord | <Clyybber> shashlick: I don't have that issue with config.nims |
16:33:53 | shashlick | also make sure you delete the compiled dlls in tests/test1 |
16:34:14 | shashlick | okay then that one change in config.nims should be good enough |
16:34:21 | FromDiscord | <treeform> @Vindaar, thanks! |
16:34:23 | FromDiscord | <Clyybber> ok |
16:34:59 | FromDiscord | <Yardanico> but really a generic solution for splitting nim applications into different libraries (to be used from other nim libraries/applications) would be awesome |
16:35:09 | shashlick | that's what plugins package aims to be |
16:35:14 | FromDiscord | <Clyybber> so what do I need to do to run the tests? Before I simply did nim r --gc:arc tests/tmain |
16:35:21 | FromDiscord | <Clyybber> Do I need to compile some plugins too? |
16:35:27 | shashlick | that should be good enough - the main exe compiles the plugins |
16:35:42 | shashlick | but just make sure you delete them before tests else it will use the existing files |
16:35:48 | shashlick | in case you change flags |
16:35:48 | FromDiscord | <Clyybber> ugh |
16:36:02 | shashlick | the nimble test does all this but doesn't print anything |
16:36:04 | FromDiscord | <Clyybber> ok, *now* i'm getting the config.nims error you spoke of |
16:37:16 | FromDiscord | <Clyybber> what must I do to make tmain work? |
16:38:57 | FromDiscord | <Clyybber> shashlick: ping |
16:42:39 | FromDiscord | <Clyybber> why is it compiling stuff at runtime? |
16:48:04 | FromDiscord | <Clyybber> Ok, I compiled them manually now with the --gc:arc switch |
16:48:10 | FromDiscord | <Clyybber> fails with both my PR and on devel |
16:49:26 | shashlick | I tried with useMalloc and it went a bit further |
16:49:38 | shashlick | Looking at gdb output might give you some ideas |
16:49:53 | shashlick | Fails mainly in memory alloc dealloc |
16:50:29 | shashlick | That's the point of plugins - it compiles them automatically when they change and reload |
16:51:22 | FromDiscord | <Clyybber> does it use the compiler api to do that? Or does it call the compiler via execCmd? |
16:52:09 | FromDiscord | <Clyybber> because if its the former its kinda expected to not work yet |
17:02:48 | shashlick | It calls Nim binary not api |
17:03:04 | shashlick | execCmd |
17:03:37 | shashlick | Plugins get compiled in background thread on change |
17:03:44 | shashlick | Main thread loads dlls |
17:04:04 | shashlick | Reloads when background thread tells it to |
17:06:17 | shashlick | This is all just standard threads and dynlib but the problem is in using memory across dlls, not even threads anymore now that I replaced that interaction with channels |
17:06:53 | shashlick | Should the dlls be compiled with gc none? Does arc know how to sync across dlls |
17:10:04 | FromDiscord | <Clyybber> arc doesn't do anything special, so it should probably work |
17:21:26 | FromDiscord | <demotomohiro> Why std/with or std/compilesettings modules are not listed here?↵https://github.com/nim-lang/Nim/blob/devel/doc/lib.rst |
17:23:50 | FromDiscord | <Yardanico> because no one added them here 😛 |
17:25:31 | FromDiscord | <demotomohiro> someone has to make a Pull Request that add them to the list? |
17:30:12 | FromDiscord | <juan_carlos> Ye |
17:31:02 | FromDiscord | <juan_carlos> wrapnils, with, compilesettings, jsre missing there. |
17:49:56 | * | solitudesf quit (Remote host closed the connection) |
17:50:09 | * | tane joined #nim |
17:50:44 | * | narimiran quit (Quit: leaving) |
17:51:48 | * | solitudesf joined #nim |
18:07:01 | FromDiscord | <Yardanico> uhh |
18:07:04 | FromDiscord | <Yardanico> did nim forum die? |
18:07:10 | FromDiscord | <Yardanico> I wanted to post a reply but it died |
18:09:12 | FromDiscord | <Yardanico> can anyone check? |
18:09:39 | FromDiscord | <Yardanico> oof https://media.discordapp.net/attachments/371759389889003532/731572927589515394/unknown.png |
18:11:13 | livcd | looks ok to me |
18:11:19 | FromDiscord | <Yardanico> ok up now |
18:11:29 | FromDiscord | <Yardanico> seems like my reply did get through 😛 |
18:11:37 | FromDiscord | <Yardanico> but Stefan's reply got sent twice lol |
18:11:46 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/731573458797985884/unknown.png |
18:12:10 | FromDiscord | <Yardanico> forum crashed I guess |
18:12:15 | FromDiscord | <Yardanico> and auto-restarted |
18:21:15 | * | fredrikhr quit (Read error: Connection reset by peer) |
18:21:37 | * | fredrikhr joined #nim |
18:23:51 | * | fredrikhr quit (Remote host closed the connection) |
18:24:10 | * | fredrikhr joined #nim |
18:26:35 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
18:33:00 | * | drewr joined #nim |
18:37:38 | ForumUpdaterBot | New thread by Spip: Understanding Nim compiler, see https://forum.nim-lang.org/t/6535 |
18:39:39 | * | endragor_ quit (Remote host closed the connection) |
18:39:50 | * | endragor joined #nim |
18:39:51 | * | endragor quit (Remote host closed the connection) |
18:43:56 | * | endragor joined #nim |
18:48:37 | * | endragor quit (Ping timeout: 258 seconds) |
19:09:50 | shashlick | @Clyybber any luck or suggestions? |
19:10:32 | FromDiscord | <Clyybber> nope, sry. Other than try to minimize it |
19:11:25 | FromDiscord | <Clyybber> planetis: I can't reproduce your tuple unpacking leak |
19:14:31 | * | clyybber joined #nim |
19:14:37 | clyybber | planetis[m]: ping |
19:14:38 | * | clyybber quit (Client Quit) |
19:17:35 | * | fredrikhr quit (Read error: Connection reset by peer) |
19:18:20 | * | fredrikhr joined #nim |
19:53:12 | shashlick | Cool |
19:54:22 | * | waleee-cl joined #nim |
20:00:35 | * | krux02 quit (Remote host closed the connection) |
20:03:23 | FromGitter | <deech> Is there a way to leave out function argument names in the type signature of a proc? Something like `type F = proc (int,int,int):string`? |
20:04:54 | FromDiscord | <Recruit_main707> i dont think so, but arguments dont need to have the same name though |
20:11:39 | FromDiscord | <Recruit_main707> hmmm, bringing back my idea about generating actual c++ classes when inheriting from importcppc++ classes |
20:12:05 | planetis[m] | clyybber: hi |
20:13:19 | FromDiscord | <Clyybber> planetis: Hi! |
20:13:37 | planetis[m] | ok I will try to make another example |
20:13:46 | FromDiscord | <Clyybber> ok thanks! |
20:13:55 | FromDiscord | <Recruit_main707> can i mark an object like this:↵`type AcppClass {.importcpp:"AcppClass".} = object of RootObj`↵`type ANimClass {.exportcpp.} = object of AcppClass`↵and get all the functions (or `method`s rather) that have ANimClass a their 1st argument? |
20:23:09 | * | muffindrake quit (Quit: muffindrake) |
20:24:35 | * | dadada joined #nim |
20:24:51 | dadada | hey |
20:24:52 | * | muffindrake joined #nim |
20:25:11 | dadada | does nimble have support for directly installing projects from their current github head? |
20:27:07 | dadada | would be nice not to have to wait for a new release, and to be able to install dev builds with nimble |
20:27:09 | FromDiscord | <Rika> nimble install project@#head |
20:27:57 | FromDiscord | <Yardanico> @dadada yes, as Rika said |
20:27:58 | FromDiscord | <Recruit_main707> ... becuase id rather not needing to mark every method with a pragma |
20:28:05 | FromDiscord | <Yardanico> you can also install from github directly even if the library isn't on nimble |
20:28:09 | FromDiscord | <Yardanico> if it has a .nimble file of course |
20:28:23 | dadada | Rika, Yardanico, neat! |
20:31:08 | * | couven92 joined #nim |
20:31:46 | * | Shucks joined #nim |
20:31:50 | Shucks | Test |
20:32:05 | FromDiscord | <Shucks> Successful. |
20:33:01 | * | Shucks quit (Client Quit) |
20:33:58 | FromDiscord | <Rika> Failed. |
20:34:34 | * | fredrikhr quit (Ping timeout: 246 seconds) |
20:37:11 | FromDiscord | <lqdev> Task failed successfully |
20:37:21 | FromDiscord | <Elegant Beef> So... Rust's UFCS eh? 😄 |
20:37:30 | FromDiscord | <lqdev> since when |
20:37:49 | FromDiscord | <Elegant Beef> Im joking, i just spent a while arguining why their Universals FCS isnt UFCS 😄 |
20:37:57 | FromDiscord | <Elegant Beef> with a friend * |
20:38:05 | * | Shucks joined #nim |
20:38:06 | FromDiscord | <lqdev> universal FCS? |
20:38:17 | FromDiscord | <Elegant Beef> Yea they call it universal function calling syntax |
20:38:20 | FromDiscord | <lqdev> what are they referring to? |
20:38:36 | FromDiscord | <Elegant Beef> https://doc.rust-lang.org/1.7.0/book/ufcs.html |
20:38:37 | FromDiscord | <Elegant Beef> This |
20:38:42 | FromDiscord | <Elegant Beef> Traits behaving like UFCS |
20:39:13 | FromDiscord | <lqdev> dear lord |
20:39:27 | FromDiscord | <lqdev> yet another feature to add to the list of confusing features of rust |
20:39:31 | FromDiscord | <Elegant Beef> He ended up telling me to use rust and just use traits only |
20:39:44 | FromDiscord | <lqdev> ah, like a true rust evangelist. |
20:39:49 | FromDiscord | <Elegant Beef> I may or may not have repeated "It's not uniform" many times |
20:40:06 | FromDiscord | <lqdev> well it stands for "unified" iirc |
20:40:15 | FromDiscord | <Elegant Beef> It's uniform |
20:40:24 | FromDiscord | <Elegant Beef> https://en.wikipedia.org/wiki/Uniform_Function_Call_Syntax |
20:40:27 | FromDiscord | <lqdev> but nim calls it method call syntax which is less confusing. |
20:40:34 | FromDiscord | <lqdev> ok good to know |
20:40:59 | dadada | Rika: some awesome features are underdocumented! @Yardanico |
20:41:07 | FromDiscord | <Yardanico> which ones? 😛 |
20:41:23 | FromDiscord | <Rika> ? |
20:41:24 | FromDiscord | <Yardanico> this one is documented |
20:41:27 | FromDiscord | <Yardanico> https://github.com/nim-lang/nimble#nimble-install |
20:41:27 | FromDiscord | <Rika> yes |
20:41:51 | * | Vladar quit (Quit: Leaving) |
20:42:51 | dadada | Yardanico: using project@#head .... those project pages on nimble.org should maybe display this alternative along with moe install project ... I know I would have seen it there, because that's where I looked first |
20:44:04 | dadada | Rika: I didn't mean that it is completely undocumented, but the usage examples belong where the users go to look for applications, not buried inside the nimble documentation a new user will almost never care to read |
20:45:18 | dadada | today we have cargo, nimble, pip, dnf, apt-get, npm, this growing list of package managers, and I can't keep up with all their features |
20:45:48 | dadada | but what I can do is read a project homepage/README and their install sections IMO should include how to install the latest dev version with nimble |
20:45:55 | FromDiscord | <Elegant Beef> You have nimble, just remove cargo,pip,npm 😄 |
20:45:55 | dadada | especially nimble.org should have this |
20:46:04 | FromDiscord | <Rika> beef LMAO |
20:46:27 | FromDiscord | <Elegant Beef> What'd i say that wasnt the truth? |
20:46:32 | dadada | Elegant Beef: I'd love to, especially npm ... |
20:46:43 | FromDiscord | <Elegant Beef> Also rika i have all primitive types serializing, pointer objects do not |
20:46:53 | FromDiscord | <Skippy> I wonder, do people who's mother tongue is not english do you code in english? |
20:47:48 | Prestige | What is the locklevel warning about? |
20:48:11 | FromDiscord | <Elegant Beef> I mean considering all the keywords are in english partly |
20:48:14 | FromDiscord | <Rika> beef: I figured, pointer objects are more complex |
20:48:17 | FromDiscord | <Elegant Beef> Yea |
20:48:35 | FromDiscord | <Elegant Beef> It's a pain but i can save/load all primitives, and i didnt need to write any code |
20:48:38 | FromDiscord | <Elegant Beef> So objects partly reload |
20:48:49 | FromDiscord | <Clyybber> @Skippy yeah |
20:49:08 | planetis[m] | clyybber, I replied to the issue, it's fixed! |
20:50:02 | Prestige | Specifically: Warning: method has lock level <unknown>, but another method has 0 |
20:50:09 | FromDiscord | <Rika> grim consumes so much memory for 200k nodes :Pensiveaf: |
20:52:03 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2rpK↵How would we call the concept using foo? |
20:53:22 | FromDiscord | <Rika> " |
20:53:23 | FromDiscord | <Rika> ? |
20:53:41 | FromDiscord | <Elegant Beef> Well it calls the type speciffffic implementation |
20:53:47 | FromDiscord | <treeform> @Technisha In my ws library I don't expose the connections ... maybe I should... but you can just have your own list and send to it ... see my chat server example: https://github.com/treeform/ws/blob/master/tests/chat.nim |
20:53:57 | FromDiscord | <Elegant Beef> (edit) 'speciffffic implementation' => 'specific implementation,' |
20:54:08 | FromDiscord | <Elegant Beef> Im curious how you'd call the concept implementation if there is overlap |
20:54:19 | FromDiscord | <treeform> @Technisha Circuit (LGBTQIAP+) ^ |
20:54:21 | FromDiscord | <Rika> @Elegant Beef it resolves to the most specific definition, and since foo(Baz) is the most specific, it uses that |
20:54:26 | FromDiscord | <Elegant Beef> Yea i know that |
20:54:43 | FromDiscord | <Elegant Beef> Im curious if there is a way to specifically call the concept one |
20:54:58 | FromDiscord | <Elegant Beef> I know this is a rather unlikely situation, just curious |
20:55:29 | * | tane quit (Quit: Leaving) |
20:55:53 | FromDiscord | <Rika> honestly dunno |
20:56:26 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> > @Technisha In my ws library I don't expose the connections ... maybe I should... but you can just have your own list and send to it ... see my chat server example: https://github.com/treeform/ws/blob/master/tests/chat.nim↵Thanks! |
20:57:11 | FromDiscord | <Elegant Beef> So if you use `foo(c = Baz())` that works, but now if they're both the same parameter you're kinda pooched |
20:57:36 | * | madprops left #nim ("Leaving") |
20:58:09 | shashlick | I'll strongly discourage using project@#head for any project |
20:58:14 | shashlick | Using nimble |
20:58:42 | shashlick | Cause once it's installed, nimble will always pick it even if newer specific versions are installed |
20:58:57 | shashlick | You could have a year old head sitting there throwing off all requirements |
20:58:58 | FromDiscord | <lqdev> using #head is generally bad |
20:59:09 | FromDiscord | <lqdev> because like, stability |
20:59:16 | FromDiscord | <lqdev> and it screws up versioning |
20:59:23 | FromDiscord | <lqdev> never use a #head version in your .nimble file |
20:59:29 | planetis[m] | clyybber, what do you think now? is it fixed or should I keep trying making examples? |
20:59:32 | * | laqq3 joined #nim |
20:59:55 | shashlick | Goes back to disruptek suggestion to install vx.x.x when requires >= vx.x.x instead of latest version |
21:00:30 | shashlick | Should use the minimum version suggested by the nimble file |
21:00:42 | shashlick | That way things are reproducible |
21:01:00 | shashlick | But will break many packages if nimble is to change |
21:04:34 | FromDiscord | <exelotl> on the topic of npm being garbage, has anyone used pnpm? |
21:05:03 | FromDiscord | <exelotl> it's like a droplet of sanity in a sea of foolishness |
21:08:03 | FromDiscord | <Clyybber> planetis[m]: I tested both the initial scoped commit and before that and devel |
21:08:18 | FromDiscord | <Clyybber> Theres no leak with any of them with the original example |
21:08:42 | FromDiscord | <Clyybber> Did you determine that there are leaks by looming at the C code? |
21:09:24 | planetis[m] | no I have a program that ooms and when I remove the parentesis it is fixed |
21:09:33 | FromDiscord | <Clyybber> huh ok |
21:09:49 | planetis[m] | https://github.com/b3liever/neuralnet-examples/blob/master/minibatches.nim |
21:09:53 | FromDiscord | <Clyybber> I'm not at my PC rn |
21:09:59 | FromDiscord | <Clyybber> but I'll look into it asap |
21:10:38 | planetis[m] | relax, I just don't use this syntax anymore |
21:10:53 | planetis[m] | it's easy to workaround |
21:11:48 | planetis[m] | the c code I posted doesn't look weird to you? |
21:12:46 | planetis[m] | it copies twice the seq elements and then only uses one field from each tuple |
21:14:05 | FromDiscord | <Elegant Beef> Is it impossible to call the `foo(b: C)` with this setup? I cannot think of a method when the signatures are identical minus the type↵https://play.nim-lang.org/#ix=2rpM |
21:18:43 | planetis[m] | (Plus its Saturday, we should be partying) |
21:18:53 | Shucks | How well does clang do with nim? |
21:20:13 | planetis[m] | I am so exhausted from the week i was actually sleeping all day lol |
21:26:51 | FromDiscord | <Yardanico> @Shucks just fine |
21:26:58 | FromDiscord | <Yardanico> but performance might differ for different programs 🙂 |
21:27:10 | FromDiscord | <Yardanico> sometimes clang-compiled binaries are slower, sometimes on par with gcc, sometimes a little faster |
21:27:18 | FromDiscord | <Yardanico> but you shouldn't have any problems with using it anyway |
21:28:50 | FromDiscord | <Yardanico> by slower or faster I mean <10% usually |
21:29:47 | Shucks | alright. I guess theres no straight answer which compiler produces the smallest/fastest binaries with nim huh? Since gcc/mingw is recommend on the website I guess I'll just stick with it |
21:31:06 | Shucks | and 10% is pretty much imo ;D |
21:48:28 | * | endragor joined #nim |
21:51:09 | FromDiscord | <Varriount> Shucks: Using link-time optimization can cut down on executable size. Sometimes it also helps with performance. |
21:52:34 | * | endragor quit (Ping timeout: 240 seconds) |
21:57:30 | FromDiscord | <Varriount> @Elegant Beef Possibly if you write `C.foo(variable)`? Other than that possibility, I can't think of any other way |
21:57:54 | FromDiscord | <Varriount> Other than splitting the code into modules and selectively importing things |
22:02:37 | * | solitudesf quit (Ping timeout: 264 seconds) |
22:08:00 | FromDiscord | <Elegant Beef> ` Error: in expression 'C.foo(b)': identifier expected, but found 'C.foo'` |
22:08:02 | FromDiscord | <Elegant Beef> Hmm |
22:08:13 | FromDiscord | <Elegant Beef> Seems like the only way to differentiate is module splitting |
22:17:11 | FromDiscord | <Elegant Beef> Can nim not change the identifier of a proc on import? |
22:17:44 | FromDiscord | <Elegant Beef> `from fooconc import foo as fooConcept` |
22:17:47 | FromDiscord | <Elegant Beef> Something like that |
22:22:00 | * | endragor joined #nim |
22:26:21 | * | endragor quit (Ping timeout: 258 seconds) |
22:33:18 | * | pbb quit (Quit: No Ping reply in 210 seconds.) |
22:34:40 | * | pbb joined #nim |
22:39:51 | * | audiophile_ quit (Ping timeout: 256 seconds) |
22:47:54 | * | hoijui quit (Ping timeout: 256 seconds) |
23:02:22 | * | endragor joined #nim |
23:06:49 | * | endragor quit (Ping timeout: 246 seconds) |
23:07:58 | FromDiscord | <Yardanico> I don't think so, and there's no universal way for aliasing symbols yet |
23:08:45 | FromDiscord | <Yardanico> @Shucks well I meant that clang can be sometimes even 10% or more slower with Nim, or 10% or more faster |
23:09:03 | FromDiscord | <Yardanico> And yes, there's no reason not to use LTO with most Nim programs when you make a release build |
23:09:12 | FromDiscord | <Yardanico> It's just free performance gains (in most cases) |
23:14:29 | * | ForumUpdaterBot quit (Remote host closed the connection) |
23:14:37 | * | ForumUpdaterBot joined #nim |
23:17:10 | FromDiscord | <Rika> in what cases are they not? |
23:19:56 | FromGitter | <deech> Does the stdlib have a function that converts between C++ `bool` and Nim `bool`? |
23:23:43 | FromDiscord | <Varriount> deech: `bool(cboolvariable)`? |
23:23:51 | FromDiscord | <Varriount> Oh, C++ |
23:24:03 | FromDiscord | <Varriount> Isn't a C++ bool the same as a C bool? |
23:24:20 | FromDiscord | <Varriount> It's just a byte (implementation-wise, if not standards-wise) |
23:26:09 | FromGitter | <deech> Oh nice. I didn't know I could just convert like that. |
23:28:04 | skrylar[m] | hoi |
23:37:34 | * | laqq3 quit (Ping timeout: 240 seconds) |
23:39:45 | * | nikita` quit (Quit: leaving) |
23:40:51 | * | sagax quit (Read error: Connection reset by peer) |
23:41:36 | * | endragor joined #nim |
23:45:54 | * | endragor quit (Ping timeout: 240 seconds) |
23:46:34 | * | oddp quit (Ping timeout: 256 seconds) |
23:57:13 | * | lritter quit (Quit: Leaving) |
23:58:51 | FromDiscord | <Recruit_main707> Hmmm nimue actually does generate c++ classes that inherit from original c++ ones, it does it in a very oo way though, I wonder if it could be done keeping the Nim style |
23:59:41 | * | couven92 quit (Remote host closed the connection) |