00:00:01 | * | junland quit (Quit: %ZNC Disconnected%) |
00:00:14 | FromGitter | <binhonglee> Ubuntu. I did have clang installed for macosx compilation |
00:00:27 | * | krux02 quit (Ping timeout: 240 seconds) |
00:01:33 | FromGitter | <binhonglee> Seems like a library that `httpClient` uses is missing but everything else works fine. |
00:01:44 | * | junland joined #nim |
00:02:10 | FromGitter | <binhonglee> *to clarify, I'm using WSL2 Ubuntu 18.04 LTS |
00:02:45 | FromDiscord | <Ricky Spanish> is there a roadmap for vim so people can contributed? |
00:03:08 | FromDiscord | <Elegant Beef> You mean Nim? |
00:03:15 | FromDiscord | <Ricky Spanish> woops yeh, bad habbits |
00:03:59 | FromDiscord | <Elegant Beef> There is this, but idk if there is something more insightfulβ΅https://github.com/nim-lang/RFCs/milestones |
00:04:05 | * | SenasOzys quit (Ping timeout: 240 seconds) |
00:04:31 | FromDiscord | <Varriount> @Ricky Spanish There's a bug tracker. Though I would say that documentation or stdlib bugs are a good starting poinnt for contribution. |
00:05:28 | FromDiscord | <Ricky Spanish> ah ok ill take a look over, thanks @Varriount and @Elegant Beef |
00:06:05 | FromDiscord | <Elegant Beef> Oh shit you're also in the GDL discord(Yes i was checking for that, dont worry) |
00:06:36 | disruptek | varriount: you can't go up but you can always go down. |
00:06:48 | disruptek | instead of lifting something, just bury everything else. |
00:06:48 | FromDiscord | <Elegant Beef> There is actualy a suprising number of GDL discord users here |
00:07:16 | FromDiscord | <Elegant Beef> Oh i thought disruptek was going to say "When you think you hit rock bottom, get the pickaxe" |
00:07:36 | FromDiscord | <Ricky Spanish> yeh nims use-case seems uniquely suited for games in a strange way i suppose is how we end up here |
00:08:17 | disruptek | i would say that the compiler doesn't need work, and it's imposing to even get started. lots of shitty software remains to be written; i'm doing my part, l0rd knows. |
00:08:43 | FromDiscord | <Elegant Beef> And i just use libraries and then give up shortly after using them |
00:08:49 | FromDiscord | <Elegant Beef> In my good persistant development attitude |
00:09:08 | FromDiscord | <Varriount> disruptek: But is there a technical reason? Why can't a macro access data above/ahead of it? |
00:09:36 | disruptek | that way lies madness. |
00:10:01 | disruptek | /technically/ you could simply read the file you find yourself in, and then find yourself. |
00:10:23 | disruptek | but as i mentioned to chapl, this is /compositional/ suicide. |
00:10:23 | FromDiscord | <Varriount> Some would say implementing an async system via macros is madness too. |
00:10:44 | disruptek | not really. |
00:10:57 | disruptek | this language has legs. |
00:11:09 | disruptek | i don't really think we've begun to see what it's capable of, honestly. |
00:11:11 | FromDiscord | <Varriount> Why is it compositional suicide? |
00:11:33 | disruptek | because it means that you can never make any assumptions about the state of literally anything. |
00:11:44 | disruptek | it can always be rewritten by anything above or below it. |
00:12:00 | disruptek | what does any of it mean? who knows. are you done semchecking it? who knows. |
00:12:07 | FromDiscord | <Varriount> You can make assumptions on the state of things that are already processed. |
00:12:13 | disruptek | how do you figure? |
00:12:40 | disruptek | what is processed may be processed again. and again and again and again. |
00:12:41 | FromGitter | <binhonglee> @Varriount so it seems like `event.h` lives in the same folder as `sys` instead of inside of it. Not sure if this is the common file hierachy. |
00:12:44 | FromDiscord | <Varriount> I'm talking about macros being able to access the AST that hasn't been processed yet. |
00:14:07 | FromDiscord | <Varriount> For example, a macro pragma in a type definition inserting a procedure definition *after* the type block that is currently being processed. |
00:14:49 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
00:15:02 | FromDiscord | <Elegant Beef> Yea i was looking for something similar for making getter/setters |
00:15:23 | disruptek | that's not an adjacent insertion, because you have to go up and then over. |
00:15:25 | FromDiscord | <Varriount> At thee invocation of that macro pragma, the compiler hasn't run semantic checking, etc. through the AST after the type block |
00:15:59 | FromDiscord | <Varriount> But it's adjacent to the macro's ancestor. |
00:16:20 | disruptek | so what? do you let people insert aunts and uncles? |
00:17:00 | FromDiscord | <Varriount> When my cousins get married, sure. |
00:17:14 | disruptek | are you in VA or are you in WV? |
00:17:54 | FromDiscord | <Varriount> Let me rephrase that. when my cousins get maried to peeople outside the family. |
00:18:07 | disruptek | lol |
00:18:22 | FromDiscord | <Elegant Beef> Cmon disruptek it's alabama that family trees are more akin to bamboo shoots |
00:18:33 | disruptek | well, i'm glad our ast doesn't look like varriount's family. |
00:20:37 | FromDiscord | <Varriount> But what I'm hearing is that the only problem with the idea is philosophical. |
00:20:52 | disruptek | i don't know. |
00:21:30 | FromDiscord | <Elegant Beef> Correct me if im wrong but isnt this just about generating procedures from within a object declaration? |
00:21:36 | disruptek | it's certainly an assumption i would make. ie. that there are technical limitations, simply because these are the sorts of assumptions that i'd want to entertain as a compiler developer. |
00:21:53 | disruptek | no, it's about growing the ast. |
00:22:28 | disruptek | we don't have statements in the type section. |
00:22:53 | FromDiscord | <Varriount> I'm not talking about adding statements to the type section. |
00:23:02 | * | pangey quit (Ping timeout: 260 seconds) |
00:23:06 | disruptek | so to create such an animal, you'd need to either replace the typesection with a node that holds other nodes, including the typesection, or magically insert something into your parent. |
00:23:26 | disruptek | varriount is suggesting the later. |
00:24:05 | FromDiscord | <Varriount> You remember Araq's packedjson library, right? |
00:24:21 | FromDiscord | <Varriount> where the nodes were stored as a sequence, rather than a tree? |
00:24:21 | disruptek | i know what it is but i'm not familiar with the code. |
00:25:10 | disruptek | i'm more familiar with packed ast than i am with packed json. |
00:26:31 | voltist | @Vindaar ping |
00:28:43 | FromDiscord | <Varriount> @Elegant Beef I'm proposing allowing a macro to access the AST *after* it and its parent nodes. |
00:29:57 | FromDiscord | <Varriount> So a macro being invoked in a type section macro would be able to read/write nodes after the type section its been called in. Of course, since the nodes haven't been semantically checked by the compiler, they would all be unntyped. |
00:30:38 | FromDiscord | <Varriount> The macro *would not* be able to modify nodes before it, because those would have already been semantically checked. |
00:30:40 | disruptek | but, not ALL parents. just SOME parents. |
00:31:01 | FromDiscord | <Zachary Carter> lmariscal / nimgl: I just made my own bindings using nimterop, while also wrapping https://github.com/zeux/volk for loading |
00:31:28 | FromDiscord | <Zachary Carter> pretty happy with this so far - everything "just works" and now I have a pretty awesome vulkan loader at my disposal as well |
00:32:04 | FromDiscord | <Elegant Beef> Dont we currently have very limited macros on object fields, and wouldnt being able to call macros post node generation remove those limited macros? |
00:32:26 | FromDiscord | <Varriount> disruptek: Sure, but the limitation would still be that nodes which have already been semantically checked would not be modifiable. |
00:33:07 | FromDiscord | <Elegant Beef> Cause i personally would like a macro that let's me generate getters/setters for objects, without leaving the typedef, but i imagine i either dont know how to do it or it's not possible atm |
00:33:31 | disruptek | well, i think it's a bad idea. i want to say it's crazy but i don't want to offend you. π |
00:35:46 | FromDiscord | <Varriount> I mean, you're free to think its a bad idea. I just wanted to ask if there was any large technical reason it couldn't be done. For example, the reason why macros can't modify procedures and types that have already been semantically analyzed is because it would increase compilation times and be difficult to implement continual semantic checking in the compiler. |
00:36:09 | disruptek | as i said, i don't know. |
00:37:57 | FromDiscord | <Varriount> @Zachary Carter Isn't Vulkan not meant for mere mortals to handle? ;P |
00:40:26 | FromDiscord | <Elegant Beef> Is something like this currently possible?β΅https://play.nim-lang.org/#ix=2sUE |
00:41:20 | FromDiscord | <Varriount> @Elegant Beef You would have to implement your own "type-section-like" macro. |
00:41:38 | FromDiscord | <Varriount> replace "type" with "mymacro:" |
00:41:41 | FromDiscord | <Elegant Beef> Ah so something that generates my type def from pseudo type def |
00:41:57 | FromDiscord | <Elegant Beef> That's a tinge annoying |
00:42:36 | FromDiscord | <Varriount> @Elegant Beef Alternately, you can use something like getCustomPragma in a macro called after the type definition block |
00:43:02 | FromDiscord | <Zachary Carter> @Varriount haha Vulkan is a PITA |
00:44:41 | FromDiscord | <Zachary Carter> nimterop is pretty amazing @shashlick has done as superb job on it |
00:44:52 | FromDiscord | <Varriount> Well, so is OpenGL 3, which is why 2 is still used so much in tutorials |
00:45:13 | FromDiscord | <Zachary Carter> well - I'm starting with a vulkan backend and then will add a dx12 |
00:45:16 | FromDiscord | <Zachary Carter> and eventually metal |
00:45:25 | FromDiscord | <Zachary Carter> but since vulkan can run on all operating systems - I'll start with VK |
00:45:49 | FromDiscord | <Varriount> Nimterop is amazing. I've generated bindings for 2000+ files in the Windows SDK. |
00:46:04 | FromDiscord | <Elegant Beef> I never could get it to work |
00:46:20 | FromDiscord | <Varriount> @Elegant Beef Nimterop, or C2Nim? |
00:46:24 | FromDiscord | <Elegant Beef> Both |
00:46:31 | FromDiscord | <Zachary Carter> well you have to know what you're doing |
00:46:41 | FromDiscord | <Zachary Carter> so having a good understanding of C/C++ is essential |
00:46:43 | FromDiscord | <Varriount> And not be allergic to C or C++ |
00:46:52 | FromDiscord | <Zachary Carter> since that's what you're interoping with |
00:47:06 | FromDiscord | <Varriount> @Elegant Beef Do you have hives? |
00:47:10 | FromDiscord | <Elegant Beef> Yes |
00:47:23 | FromDiscord | <Elegant Beef> Just the mere mention of those languages cause me to enter..... oh god where is my epi |
00:47:39 | FromDiscord | <Zachary Carter> I love C |
00:47:49 | FromDiscord | <Zachary Carter> and C++11 lis nice |
00:47:53 | FromDiscord | <Zachary Carter> C++14 i sokay |
00:47:56 | FromDiscord | <Zachary Carter> (edit) 'i sokay' => 'is okay' |
00:48:02 | FromDiscord | <Zachary Carter> everything after that can burn |
00:48:16 | FromDiscord | <Zachary Carter> (edit) 'lis' => 'is' |
00:48:27 | FromDiscord | <Elegant Beef> I didnt have an C/C++ issues as much as it didnt seem to function and i had no clue why |
00:48:41 | FromDiscord | <Zachary Carter> well they're not simple languages |
00:48:42 | FromDiscord | <Ricky Spanish> i like c and c++ but they need to get their..business...together when it comes to modern tooling imo |
00:48:55 | FromDiscord | <Varriount> @Elegant Beef Might be the preprocessor. I had some issues with it on my laptop, and Nimterop silently exited. |
00:49:08 | FromDiscord | <Zachary Carter> the largest hurdle is understanding how to manually manage memory and how computers store memory |
00:49:10 | FromDiscord | <Zachary Carter> and access it |
00:49:21 | FromDiscord | <Zachary Carter> with C++14 understanding ownership semantics helps |
00:49:41 | FromDiscord | <Zachary Carter> @Ricky Spanish agreed - but I don't think it will happen any time soon |
00:49:55 | FromDiscord | <Zachary Carter> I think genie is the best project generator available atm |
00:50:09 | FromDiscord | <Varriount> What about Visual Studio? |
00:50:11 | FromDiscord | <Zachary Carter> and if you want to study well written C++ - just look at bgfx (the author of genie) |
00:50:23 | FromDiscord | <Zachary Carter> hrm? Visual Studio is an IDE - which genie can generate projects for |
00:50:32 | FromDiscord | <Zachary Carter> genie is a fork of premake with a lot of extra functionality |
00:50:35 | FromDiscord | <Zachary Carter> that uses lua for scripting |
00:50:39 | FromDiscord | <Zachary Carter> well premake does too |
00:50:51 | FromDiscord | <Varriount> I mean, Visual Studio does a good job of letting you get a project up-and-running |
00:51:20 | FromDiscord | <Zachary Carter> well yeah - but I like declarative project generator tools for C/C++ |
00:51:31 | FromDiscord | <Zachary Carter> where I can spit out a cmake project, a VS project an xcode project, etc |
00:51:39 | FromDiscord | <Zachary Carter> or gcc makefiles |
00:51:50 | FromDiscord | <Zachary Carter> (edit) 'gcc' => 'gnu' |
00:51:56 | FromDiscord | <Varriount> I've rarely had such generators work correctly with Visual Studio |
00:52:03 | FromDiscord | <Ricky Spanish> sent a long message, see http://ix.io/2sUI |
00:52:07 | FromDiscord | <Zachary Carter> well it does if you specify all the compiler / linker options correclty |
00:52:20 | FromDiscord | <Zachary Carter> one thing I hate about visual studio is the version bullshit |
00:52:28 | FromDiscord | <Zachary Carter> and their "upgrade project version" feature which always breaks shit |
00:52:45 | FromDiscord | <Zachary Carter> yeah C++ package management is a mess |
00:52:47 | FromDiscord | <Varriount> But it's either that, or it doesn't accept the project at all |
00:53:00 | FromDiscord | <Zachary Carter> or they could just make it work π |
00:53:27 | FromDiscord | <Zachary Carter> but C/C++ compilers are hard and disparate |
00:53:34 | FromDiscord | <Zachary Carter> so it's hard to build a build tool that's a panacea |
00:53:59 | FromDiscord | <Zachary Carter> CMake drives me bonkers |
00:54:18 | FromDiscord | <Zachary Carter> the documentation is terrible and it's just way too much configuration |
00:54:30 | FromDiscord | <Zachary Carter> I'm fine with building already prepared cmake projects |
00:55:09 | FromDiscord | <Zachary Carter> but I'll use pretty much any other build tool / project generator for C++ before I'll use CMake in any of my projects |
00:57:05 | FromDiscord | <Ricky Spanish> true it also leads to some other things...in practice iv seen people mixing .bat and .sh files into their cmake project....it keeps me awake some nights crying into my pillow knowing i have to go back to work and deal with it the next day |
00:57:17 | FromDiscord | <Zachary Carter> ugh |
00:57:20 | FromDiscord | <Varriount> @Zachary Carter Even automake/autoconf? |
00:57:31 | FromDiscord | <Zachary Carter> well yeah - I won't touch those either |
00:57:32 | shashlick | Getting comfortable with c/c++ is crucial to maximize the power of Nim |
00:57:44 | FromDiscord | <Zachary Carter> @Ricky Spanish at least you get to code in C/C++ for your job, I'm stuck writing python |
00:57:53 | FromDiscord | <Zachary Carter> which is awful |
00:58:10 | FromDiscord | <Varriount> @Zachary Carter I'm writing Go |
00:58:17 | FromDiscord | <Zachary Carter> that's almost as bad as python |
00:58:29 | FromDiscord | <Zachary Carter> but at least you have static type checking |
00:58:45 | FromDiscord | <Varriount> @Zachary Carter What version of Python? |
00:59:24 | FromDiscord | <Zachary Carter> 3.7 |
00:59:31 | FromDiscord | <Zachary Carter> Python is just a mess |
00:59:34 | FromDiscord | <Varriount> You could use Mypy |
00:59:43 | FromDiscord | <Zachary Carter> everything about it drives me nuts |
00:59:53 | FromDiscord | <Varriount> See, I like Pythonn |
01:00:02 | FromDiscord | <Zachary Carter> yeah I've seen Mypy before but it's sad that I would have to resort to something like that |
01:00:34 | FromDiscord | <Varriount> Well, use it, or not. |
01:00:45 | FromDiscord | <Zachary Carter> eh I don't really get to make decisions like that at work |
01:00:56 | FromDiscord | <Zachary Carter> they just ask me how to fix things - not what they should use to fix them |
01:01:24 | FromDiscord | <Zachary Carter> otherwise we definitely would NOT be using Django |
01:01:35 | FromDiscord | <Zachary Carter> or anything remotely similar |
01:04:02 | FromDiscord | <Varriount> Website? |
01:04:44 | FromDiscord | <Elegant Beef> should note my issues was just getting nimterop to actually work, so i couldnt even delve into any C/C++ issues, i pointed it at the main header file to Flecs as a test and it just didnt give me any helpful insight to what was going wrong |
01:05:27 | FromDiscord | <Ricky Spanish> hmmm i enjoyed c++ at the start of my job tbh, but honestly it aint fun if youre hitting a deadline and you suddenly have to debug a memory access violation or segfault in a multi-threaded application interoped from c#, stress really is important |
01:05:28 | FromDiscord | <Elegant Beef> But yes i dont know C/C++ anywhay |
01:05:51 | FromDiscord | <Shucks> Is a sequence able to hold different types? |
01:06:03 | FromDiscord | <Elegant Beef> No, you'll need to box the data using object variants |
01:06:37 | FromDiscord | <Varriount> @Shucks Do you know what object variants are? |
01:07:03 | FromDiscord | <Varriount> What kind of data types are you dealing with, and why do you need a sequence that has multiple types of data? |
01:07:53 | * | maier joined #nim |
01:08:18 | FromDiscord | <Shucks> Not exactly. I got a function which returns a sequence of objects. I might want to return different objects in that function. Else I would need to code another function. |
01:08:41 | FromDiscord | <Varriount> What about a generic? |
01:08:54 | FromDiscord | <Elegant Beef> If the sequence is full of the same types a generic would work |
01:09:12 | * | outtabwz joined #nim |
01:09:22 | FromDiscord | <Shucks> Gonna look it up. Thanks π |
01:09:42 | FromDiscord | <Varriount> @Shucks The manual should have sections on generics and object variants |
01:11:30 | FromDiscord | <Ricky Spanish> is it in the book? just ordered it |
01:11:37 | FromDiscord | <Ricky Spanish> or the book is the manual? |
01:11:47 | FromDiscord | <Zachary Carter> @Varriount website for Django? |
01:11:48 | FromDiscord | <Varriount> https://nim-lang.org/docs/manual.html |
01:11:52 | FromDiscord | <Elegant Beef> The manual is a free resource |
01:12:00 | FromDiscord | <Zachary Carter> @Elegant Beef flecs is a tough library to wrap |
01:12:05 | FromDiscord | <Zachary Carter> and I'm not even sure if it's worth it |
01:12:23 | FromDiscord | <Varriount> What's flecs? |
01:12:26 | FromDiscord | <Elegant Beef> Yea i wasnt interested in wrapping it as much as just trying to see how nimterop worked as @Gary M was trying to wrap it |
01:12:29 | FromDiscord | <Elegant Beef> ECS library for C |
01:12:32 | FromDiscord | <Zachary Carter> an entity component system written in C |
01:12:47 | FromDiscord | <Varriount> Hm, I'm not sure how well that would work with Nim |
01:13:07 | * | apahl quit (Ping timeout: 272 seconds) |
01:13:25 | * | maier quit (Ping timeout: 264 seconds) |
01:13:37 | FromDiscord | <Zachary Carter> it uses threads so it definitely wouldn't work well with anything other than ARC |
01:13:46 | FromDiscord | <Zachary Carter> I'm guessing anyway |
01:14:07 | FromDiscord | <Zachary Carter> but uh - I think the polymorph library for Nim is probably a good substitute |
01:14:23 | FromDiscord | <Shucks> Not sure if im just lazy or nim's doc examples are pretty much overpowered. `https://nim-lang.org/docs/tut2.html#generics` imo there should be just the `easiest` example of generics. |
01:14:30 | * | apahl joined #nim |
01:14:35 | FromDiscord | <Zachary Carter> or you can try to wrap / use (with Nimline) Entitas |
01:14:55 | FromDiscord | <Zachary Carter> that is a pretty simple example |
01:15:31 | FromDiscord | <Elegant Beef> Variants for you aswellβ΅https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants |
01:15:34 | FromDiscord | <Zachary Carter> you have a BinaryTree generic object that has reference to two other binary tree objects |
01:15:46 | FromDiscord | <Zachary Carter> and then it has a data field which holds an object of type `T` |
01:16:02 | FromDiscord | <Zachary Carter> so T could be an `int` a `float` another `object` a `ref object` whatever you want |
01:16:18 | shashlick | @Elegant Beef feel free to reach out if you try next, happy to help with nimterop |
01:16:26 | FromDiscord | <Elegant Beef> As the name implies they're for solving code which is intended to be generic π |
01:16:48 | FromDiscord | <Elegant Beef> Eh i dont tend to venture into wrapping libs territory, but will do |
01:17:00 | FromDiscord | <Zachary Carter> this is also known as parametric polymorphism |
01:17:04 | shashlick | When you need to, yes |
01:35:11 | FromDiscord | <Zachary Carter> @treeform - made a PR for staticglfw https://github.com/treeform/staticglfw/pull/10 |
01:35:11 | disbot | β₯ Only define Vulkan types if they haven't already been defined elsewhere |
01:37:32 | FromDiscord | <Ricky Spanish> does a break [name of block] evaluate to a goto under the hood in the generated output? |
01:37:46 | FromDiscord | <Zachary Carter> one way to find out π |
01:38:20 | FromDiscord | <Zachary Carter> just do it and then check out the C code |
01:38:38 | FromDiscord | <Ricky Spanish> ah good point forgot can do it that way lol π |
01:39:32 | * | sagax joined #nim |
01:45:06 | FromDiscord | <Ricky Spanish> seems so ```goto LA2;``` |
01:47:31 | FromDiscord | <Ricky Spanish> to be fair i kinda like being able to have this option of generating the c and diffing it |
01:48:09 | FromDiscord | <Elegant Beef> What didnt like reading ASM? π |
01:48:39 | FromDiscord | <Varriount> @Ricky Spanish Nim code gen uses quite a lot of gotos |
01:49:12 | FromDiscord | <Varriount> I advise not looking at the assembly generated from an iterator or closure (or closure iterator). It's pretty tricky to read. |
01:49:16 | FromDiscord | <Elegant Beef> Ugh the linux system tray API seems to be the weirdest mess of implementation, it seems like the applications themselves make the dropdown list of actions so you can query them your own alternative |
01:49:34 | FromDiscord | <Varriount> Linux has a system tray API? |
01:49:43 | FromDiscord | <Elegant Beef> https://specifications.freedesktop.org/systemtray-spec/systemtray-spec-latest.html#messages |
01:49:47 | FromDiscord | <Elegant Beef> Not linux exactly |
01:49:54 | FromDiscord | <Elegant Beef> But there is a system tray api |
01:50:02 | FromDiscord | <Varriount> Ah. |
01:50:23 | FromDiscord | <Elegant Beef> I just wanted to try to get a rofi based system tray, so i dont need to use my mouse for it and dont even need the icons |
01:50:40 | FromDiscord | <Elegant Beef> but doesnt seem possible faik |
01:50:40 | FromDiscord | <Varriount> I think Windows does it that way too, though it might be hidden behind some procedures. |
01:50:45 | FromDiscord | <Elegant Beef> (edit) 'faik' => 'afaik' |
01:51:14 | FromDiscord | <InventorMatt> @treeform is there supposed to be an .html file in fidget to run a javascript compiled fidget test? |
01:51:38 | FromDiscord | <Zachary Carter> @treeform - nevermind, deleting PR this doesn't seem to be doable |
01:51:53 | FromDiscord | <Zachary Carter> just going to write my own glfw static wrapper using nimterop π |
02:05:39 | voltist | Do the procs in `streams` that read signed integers expect two's compliment representation? |
02:09:58 | * | audiofile quit (Quit: Default Quit Message) |
02:10:57 | FromDiscord | <InventorMatt> never mind, I figured out how it works. |
02:13:21 | * | krux02_ quit (Remote host closed the connection) |
02:25:17 | shashlick | @voltist did you solve your nimterop issues? |
02:26:08 | voltist | shashlick: Unfortunately not. Wrapping the offending types with cOverride seems to make no difference |
02:27:03 | shashlick | Ok I need to go thru the gitter history and see what your issue was |
02:27:48 | voltist | Cool, thanks |
02:27:50 | shashlick | Can you share your original wrapper |
02:29:56 | voltist | Yep I'll put it on the gitter |
02:39:48 | * | theelous3 joined #nim |
02:42:28 | FromDiscord | <Varriount> Hm, if I set a custom compiler via nim.cfg, how would I configure Nim to treat it like GCC or Clang? |
02:43:21 | disruptek | --cc:clang |
02:43:40 | FromDiscord | <Varriount> Thanks |
02:43:44 | disruptek | or do you mean the truly custom compiler stuff? |
02:43:54 | FromDiscord | <Varriount> It's a wrapper around Clang |
02:44:02 | disruptek | i think you want --cc:clang. |
02:45:23 | disruptek | is it zig? because i had to write a shim for that. |
02:45:33 | FromDiscord | <Varriount> No, AFL Fuzz |
02:45:39 | disruptek | kk |
02:48:16 | * | aenesidemus_ joined #nim |
02:51:10 | * | aenesidemus quit (Ping timeout: 246 seconds) |
02:54:22 | shashlick | @voltist - replied on gitter |
02:56:58 | * | noonien quit (Ping timeout: 260 seconds) |
02:57:46 | * | hoek quit (Ping timeout: 244 seconds) |
02:57:51 | * | noonien joined #nim |
03:00:05 | * | hoek joined #nim |
03:00:47 | * | muffindrake quit (Ping timeout: 272 seconds) |
03:02:27 | * | muffindrake joined #nim |
03:04:29 | FromDiscord | <Varriount> disruptek: So, the solution was to set clang.exe in nim.cfg, and use `--passl:<path-to-afl-runtime>` to get Nim to compile |
03:04:59 | disruptek | i couldn't build afl for some reason. |
03:05:14 | disruptek | what are you going to fuzz? |
03:05:19 | FromDiscord | <Varriount> The compiler |
03:05:35 | FromDiscord | <Varriount> I'm going to let the fuzzer run on an ARM EC2 instance for a month |
03:06:13 | disruptek | but most nim is written by humans. |
03:07:10 | * | theelous3 quit (Read error: Connection reset by peer) |
03:08:48 | * | maier joined #nim |
03:10:08 | * | Cthalupa quit (Ping timeout: 265 seconds) |
03:10:43 | * | audiofile joined #nim |
03:11:01 | * | noonien quit (Quit: Connection closed for inactivity) |
03:11:42 | FromDiscord | <Varriount> Well, this might end up writing something that humans would write, who knows |
03:12:47 | disruptek | based of lk fuzzing, i think you're wasting your money and maybe the time of anyone reading bug reports. just my opinion, though. |
03:13:01 | FromDiscord | <Varriount> lk fuzzing? |
03:13:06 | disruptek | linux kernel |
03:13:23 | * | maier quit (Ping timeout: 240 seconds) |
03:14:05 | * | apahl quit (Ping timeout: 272 seconds) |
03:14:18 | disruptek | fuzz output is of low signal and largely ignored, even when it results in provable security issues with exploit code provided. |
03:14:43 | * | apahl joined #nim |
03:15:12 | FromDiscord | <Varriount> Well, it also gives me a chance to play with AFL fuzz and spot instances |
03:15:47 | FromDiscord | <Varriount> So it's not like fuzzing is the only possible value here. |
03:15:56 | disruptek | sure. |
03:16:24 | FromDiscord | <Varriount> I'm not planning on spending a fortune, just about $15 |
03:17:14 | FromDiscord | <Varriount> Although, I guess that might be a fortune to some. |
03:19:59 | FromDiscord | <Varriount> disruptek: I could also reuse the setup to fuzz Nimterop. And even though C code is (claimed to be) written by humans, the form its in after the preprocessor is finished with it can be very... interesting. |
03:21:27 | disruptek | well, prove me wrong. π |
03:23:23 | * | sagax quit (Ping timeout: 246 seconds) |
03:25:06 | disruptek | cps is now as fast as nim's closure iterators. |
03:26:57 | FromDiscord | <Varriount> Neat. How complete is the implementation? Could one build a prototype scheduler with it? |
03:27:25 | disruptek | one was already written. |
03:27:39 | * | Cthalupa joined #nim |
03:48:25 | * | dadada quit (Ping timeout: 240 seconds) |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:41 | * | supakeen joined #nim |
04:13:07 | Zevv | didn't you write the other one yet? what have you been doing all day long? |
04:21:11 | * | narimiran joined #nim |
04:21:58 | Zevv | toot toot! |
04:27:56 | * | rockcavera quit (Remote host closed the connection) |
04:29:32 | narimiran | Zevv: why are you awake this early? |
04:48:00 | * | lritter joined #nim |
05:06:37 | * | MightyJoe quit (Ping timeout: 265 seconds) |
05:06:59 | * | cyraxjoe joined #nim |
05:09:37 | * | maier joined #nim |
05:14:42 | * | maier quit (Ping timeout: 260 seconds) |
05:48:32 | * | dadada joined #nim |
05:48:55 | * | dadada is now known as Guest60454 |
06:10:50 | FromDiscord | <j$> hey guys I am having a weird issue, with nim... |
06:10:56 | FromDiscord | <j$> fatal.nim(49) sysFatalβ΅Error: unhandled exception: index out of bounds, the container is empty [IndexError] |
06:11:05 | FromDiscord | <j$> I don't really know what to do with this |
06:11:31 | FromDiscord | <j$> I've tried updating nim, but I was hoping I don't have to reinstall it |
06:13:22 | shashlick | You using arc? |
06:14:47 | FromDiscord | <j$> I don't know what that is, probably not |
06:15:45 | FromDiscord | <Elegant Beef> go up the stack trace should say the line |
06:16:00 | * | audiofile quit (Quit: Default Quit Message) |
06:17:13 | FromDiscord | <j$> that's the whole stack trace, after the hints |
06:17:27 | Prestige | Can you share the code? |
06:17:46 | shashlick | Compile with -g and also share a snippet if possible |
06:18:35 | FromDiscord | <j$> -g didn't change anything, and it's kind of alot of code, in multiple files, im trying to isolate the issue |
06:19:04 | FromDiscord | <Elegant Beef> It's somehwere you're attempting to index an array |
06:19:04 | * | narimiran quit (Ping timeout: 246 seconds) |
06:20:44 | shashlick | Once you compile with -g, run with gdb |
06:20:59 | shashlick | Might get a better trace |
06:22:47 | FromDiscord | <j$> well if it doesn't compile how do I run with gdb? |
06:23:05 | FromDiscord | <Elegant Beef> if it doesnt compile you wouldnt get an index error |
06:23:17 | FromDiscord | <Elegant Beef> unless you made a borked macro |
06:23:33 | FromDiscord | <j$> ... |
06:23:36 | FromDiscord | <Elegant Beef> Or doing borked logic at compileTime i guess |
06:25:01 | shashlick | Do you have any static blocks, macros or const values you are calculating at compile time |
06:25:51 | FromDiscord | <j$> im commenting them now |
06:30:45 | FromDiscord | <Varriount> @j$ If you can, post a link to your code |
06:30:58 | FromDiscord | <j$> I fairly certain it's all gone, but I'm still getting it, also, im definitely not accessing an array at compile time |
06:31:25 | FromDiscord | <j$> uhh using what |
06:31:32 | FromDiscord | <j$> I think i've isolated the file |
06:31:36 | FromDiscord | <Varriount> Gist? |
06:32:22 | FromDiscord | <j$> https://gist.github.com/60fov/4f61eeb83188ccd46751fa6c7afc110e |
06:37:31 | FromDiscord | <Varriount> @j$ Are you sure this function is returning a sequence with data? https://gist.github.com/60fov/4f61eeb83188ccd46751fa6c7afc110e#file-renderer-nim-L70 |
06:38:16 | FromDiscord | <j$> yeah, I've isolated it to glm |
06:38:31 | FromDiscord | <j$> https://github.com/stavenko/nim-glm |
06:39:01 | FromDiscord | <Varriount> It's odd that you don't get a complete stack trace. I wonder if it turns those off in certain code sections |
06:39:50 | FromDiscord | <j$> well I got the stack trace when I stopped doing this round-a-bout import export thing, I was "temporarily" using glm |
06:40:10 | FromDiscord | <j$> import glm; export glm, was in the math file |
06:40:15 | FromDiscord | <Varriount> What command line are you using to compile the program? |
06:40:49 | FromDiscord | <j$> I was using nim check |
06:41:01 | FromDiscord | <j$> just now |
06:41:08 | FromDiscord | <Varriount> Ah. |
06:44:39 | FromDiscord | <j$> well rip, now I gotta write my own math lib |
06:45:11 | FromDiscord | <Varriount> Hm, @Zachary Carter are you around? |
06:45:18 | FromDiscord | <Zachary Carter> yup |
06:45:33 | FromDiscord | <Varriount> Do you have any recommendations for @j$ ? |
06:47:19 | FromDiscord | <Zachary Carter> I get there's an out of bounds exception - but I don't know what code is causing it... |
06:47:34 | FromDiscord | <Zachary Carter> I don't even see glm being imported in that gist... |
06:47:47 | FromDiscord | <Varriount> Do you have a recommendation on a math library @j$ should use? |
06:48:53 | FromDiscord | <Zachary Carter> well... I think folks like - https://github.com/treeform/vmath |
06:49:25 | * | solitudesf joined #nim |
06:50:21 | FromDiscord | <Zachary Carter> I think glm is nice - I don't get what the problem is |
06:51:11 | FromDiscord | <Varriount> @j$ Are you sure your inputs to that function are correct? |
06:51:43 | FromDiscord | <Zachary Carter> you could also wrap - https://github.com/HandmadeMath/Handmade-Math/blob/master/HandmadeMath.h |
06:52:52 | * | Guest60454 quit (Ping timeout: 256 seconds) |
06:53:21 | FromDiscord | <j$> I'm still redacting this code, seeing if I can figure out why |
06:53:36 | FromDiscord | <Yardanico> @j$ well, nim check isn't perfect |
06:53:42 | FromDiscord | <Yardanico> did you get that stack trace at compile-time or runtime? |
06:54:05 | FromDiscord | <Varriount> And if you got it at runtime, what command line did you use to compile the program? |
06:56:40 | FromDiscord | <j$> compile time |
06:56:49 | FromDiscord | <j$> it doen't compile |
06:56:52 | FromDiscord | <j$> and it's not glm |
06:56:56 | Yardanico | then that's a compiler crash |
06:56:59 | Yardanico | or rather nim check crash |
06:57:19 | FromDiscord | <j$> that's what I was thinking |
06:57:28 | FromDiscord | <j$> I just don't know enough about nim |
06:58:41 | Prestige | you're not indexing an array anywhere? |
06:58:42 | FromDiscord | <Zachary Carter> https://github.com/nim-lang/Nim/wiki/Debugging-the-compiler |
06:58:48 | Yardanico | Prestige: it fails at compile-time |
06:58:51 | Yardanico | that's a compiler crash |
06:59:01 | Yardanico | well |
06:59:07 | Yardanico | unless there's some "static" code |
06:59:15 | Prestige | that's what I mean |
06:59:15 | FromDiscord | <Varriount> Hm, isn't the way to get the compiler to emit a stack trace 'nim temp'? |
06:59:25 | Yardanico | ./koch temp |
06:59:25 | FromDiscord | <Zachary Carter> https://nim-lang.org/docs/intern.html#debugging-the-compiler is probably simpler |
07:00:28 | FromDiscord | <Varriount> I know its faster, but I really wish the default was to just build the compiler with stack traces. It would prevent these headaches from occurring. |
07:00:40 | Yardanico | but it's rare |
07:00:48 | Yardanico | it would be a bad trade-off IMO |
07:01:08 | FromDiscord | <Varriount> Build a version of the compiler without stack traces then? |
07:01:20 | FromDiscord | <Varriount> I mean, ahead of time, not via nim temp |
07:01:52 | * | NimBot joined #nim |
07:04:11 | FromDiscord | <j$> so am I SOL? |
07:04:18 | Yardanico | sol? |
07:04:29 | Prestige | shit out of luck |
07:04:36 | FromDiscord | <j$> shit out of luck |
07:04:37 | FromDiscord | <Varriount> @j$ Sorry, we were kinda rambling. Long story short, the Nim compiler is built without stack traces by default. If you have the `koch` binary in your path (or can find it onn your system), you can do `koch temp <compiler command args>` to run the command with a version of the compiler built with stack traces. |
07:04:38 | Yardanico | Try with "nim c -r" |
07:04:41 | Yardanico | does the same stuff happens? |
07:05:22 | FromDiscord | <Varriount> @Yardanico Wouldn't that only run the binary? That's no good if the compiler is crashing. |
07:05:31 | Yardanico | uhh no |
07:05:34 | Yardanico | I was just trying to understand |
07:05:37 | Yardanico | if it's specific to nim check or not |
07:06:23 | FromDiscord | <Zachary Carter> you're not SOL - and plenty of folks have used GLM to build 3d applications, so just hang in there is my davice |
07:06:26 | FromDiscord | <Zachary Carter> (edit) 'davice' => 'advice' |
07:06:41 | FromDiscord | <Zachary Carter> figure out where Nim is installed - there should be a binary in there called `koch` |
07:06:51 | FromDiscord | <j$> yeah it's running rn |
07:06:53 | FromDiscord | <Zachary Carter> you need to compile your program using the command `koch temp` |
07:06:56 | Yardanico | unless it's installed via a package manager |
07:06:57 | FromDiscord | <Zachary Carter> okay cool |
07:07:04 | FromDiscord | <j$> it is but I found it |
07:07:15 | Yardanico | well, depends on a distro/PM I guess |
07:07:32 | FromDiscord | <Zachary Carter> if you could create a gist of all of your code - or if you have a project on github, someone could try to reproduce for you |
07:07:48 | FromDiscord | <Zachary Carter> well doesn't have to be on github - gitlab or bitbucket or whatever |
07:08:16 | FromDiscord | <j$> sent a code paste, see https://play.nim-lang.org/#ix=2sVt |
07:08:27 | Yardanico | how did you run it? |
07:08:46 | Yardanico | you should do something like ./koch temp <commands> |
07:08:54 | Yardanico | can you just paste full command you're using for nim check or to compile? |
07:08:55 | FromDiscord | <j$> koch.exe temp nim c -r tests\rendering.nim |
07:08:59 | Yardanico | nonono |
07:09:09 | Yardanico | koch.exe temp c -r tests\rendering.nim |
07:09:19 | FromDiscord | <j$> ahhh |
07:10:37 | FromDiscord | <j$> https://pastebin.com/8CShrwML |
07:11:12 | * | maier joined #nim |
07:11:26 | Yardanico | oh yeah, that's a compiler crash :PO |
07:11:29 | Yardanico | :P |
07:11:51 | FromDiscord | <Varriount> Looks like it's failing when checking a convertible relation with an ordinal type? |
07:11:58 | Yardanico | possibly |
07:12:31 | FromDiscord | <Zachary Carter> really need to see your code to debug further |
07:12:38 | Zevv | narimiran: no worries, that was just for a quick first breakfast. Had a perfect nap after that, now up for seconds! |
07:12:41 | FromDiscord | <Varriount> @Zachary Carter Here: |
07:12:49 | FromDiscord | <Varriount> https://gist.github.com/60fov/4f61eeb83188ccd46751fa6c7afc110e#file-renderer-nim-L13 |
07:13:00 | FromDiscord | <Varriount> I'm wondering if it's the enum |
07:13:03 | FromDiscord | <Zachary Carter> yeah but what is `private/gl` |
07:13:18 | FromDiscord | <Zachary Carter> oh yeah wtf |
07:13:24 | FromDiscord | <Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2sVw |
07:13:35 | FromDiscord | <j$> omg |
07:13:37 | FromDiscord | <j$> oops |
07:13:41 | FromDiscord | <Zachary Carter> that's not going to work... |
07:13:43 | FromDiscord | <j$> I need sleep |
07:13:56 | Yardanico | it would be better if you still report the crash |
07:14:06 | Yardanico | so it's tracked and could be replaced by a proper error in the future :) |
07:14:12 | FromDiscord | <Zachary Carter> let me try to reproduce this first |
07:14:14 | FromDiscord | <Zachary Carter> just to be sure... |
07:14:38 | FromDiscord | <Varriount> @j$ Thanks for your patience. π |
07:14:50 | FromDiscord | <Zachary Carter> yeah that's it |
07:14:59 | FromDiscord | <Zachary Carter> @j$ please file an issue if you have a moment |
07:15:23 | * | maier quit (Ping timeout: 240 seconds) |
07:15:52 | FromDiscord | <j$> no problem, uhhh, how do I do that, the github im assuming |
07:16:03 | Yardanico | https://play.nim-lang.org/#ix=2sVy minimized version |
07:16:23 | FromDiscord | <Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2sVz |
07:16:24 | FromDiscord | <Yardanico> yeah |
07:16:24 | FromDiscord | <Zachary Carter> oh yeah |
07:16:31 | FromDiscord | <Yardanico> @j$ https://github.com/nim-lang/Nim/issues/new/choose |
07:16:35 | FromDiscord | <Yardanico> "bug report" here |
07:20:09 | FromDiscord | <j$> I don't know what the bug is exactly, just call it compiler crash and put the code that reproduces? |
07:20:41 | Yardanico | lemme show you an example |
07:20:55 | Yardanico | https://github.com/nim-lang/Nim/issues/14015 |
07:20:56 | disbot | β₯ Compiler crash when types recursively depend on each other ; snippet at 12https://play.nim-lang.org/#ix=2iAJ |
07:21:01 | Yardanico | basically code/koch temp output/nim version |
07:25:06 | FromDiscord | <j$> https://github.com/nim-lang/Nim/issues/15145 |
07:25:08 | disbot | β₯ Compiler crash when types recursively depend on each other ; snippet at 12https://play.nim-lang.org/#ix=2sVC |
07:25:09 | FromDiscord | <j$> is this fine? |
07:25:20 | FromDiscord | <j$> https://github.com/nim-lang/Nim/issues/15145 |
07:25:21 | disbot | β₯ Compiler crash when types recursively depend on each other ; snippet at 12https://play.nim-lang.org/#ix=2sVC |
07:25:45 | Yardanico | well, almost, I'll edit it a bit :) |
07:25:57 | FromDiscord | <j$> oh forgot the output |
07:26:18 | Yardanico | also you don't need the other snippet |
07:26:25 | Yardanico | since the first one is fine |
07:26:31 | Yardanico | version is fine |
07:40:19 | * | SenasOzys joined #nim |
07:46:00 | * | Vladar joined #nim |
07:49:25 | FromDiscord | <Zachary Carter> yay successfully creating a vulkan device |
07:49:30 | FromDiscord | <Zachary Carter> now time to wrap vulkan memory manager |
07:56:15 | * | endragor joined #nim |
08:01:19 | * | endragor quit (Remote host closed the connection) |
08:06:06 | * | vicfred_ joined #nim |
08:08:18 | * | vicfred quit (Ping timeout: 260 seconds) |
08:10:38 | voltist | Is there a way to specify endianess when reading/writing with Nim's `streams` module? |
08:11:08 | Yardanico | voltist: no |
08:11:30 | Yardanico | you should either use https://nim-lang.org/docs/endians.html |
08:11:41 | Yardanico | or https://github.com/status-im/nim-stew/blob/master/stew/endians2.nim for a nicer version of that module :) |
08:12:48 | voltist | Ok, thanks for the pointers |
08:15:09 | voltist | Do the procs in the endians module convert to whatever one's system uses? Like does 'bigEndian16' expect a big endian integer? |
08:15:46 | Yardanico | you can check how it's defined https://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/endians.nim#L100 |
08:16:02 | Yardanico | so it always converts from the system's endianness to some other one |
08:16:11 | Yardanico | if it's a native endianness, it just copies memory |
08:27:35 | voltist | Stew's endians2 looks nice but it doesn't seem to support signed ints |
08:28:20 | FromDiscord | <Rika> *it sounds like its cast time* |
08:28:32 | voltist | Oh true |
08:28:40 | voltist | Didn't even occur to me |
08:33:18 | voltist | Rejoice, for my multi-day problem is now solved |
08:41:02 | Prestige | Is there anything in Nim like c's static vars in a function?wa |
08:41:27 | Yardanico | {.global.} maybe? |
08:41:32 | Yardanico | not sure exactly |
08:41:43 | Yardanico | "Static variables have a property of preserving their value even after they are out of their scope!" yeah |
08:41:45 | Yardanico | should work similarly |
08:41:54 | Yardanico | but if you can - try to not use it :) |
08:42:06 | Prestige | Thanks I'll try it out |
08:42:07 | * | vicfred_ quit (Remote host closed the connection) |
08:42:35 | * | vicfred_ joined #nim |
08:42:53 | Yardanico | Prestige: https://play.nim-lang.org/#ix=2sVS |
08:43:17 | Prestige | ah sexy, I love it |
08:43:23 | Yardanico | don't :P |
08:43:28 | Prestige | haha |
08:43:36 | Yardanico | it's harder for the compiler and there are edge cases |
08:44:00 | Yardanico | just declare a global variable |
08:44:02 | Yardanico | a normal one |
08:44:12 | Yardanico | before the proc itself for example |
08:44:44 | Yardanico | https://github.com/nim-lang/nim/issues?q=is%3Aopen+is%3Aissue+label%3A%7B.global.%7D |
08:46:07 | Prestige | good idea |
08:46:39 | Prestige | just translating some weird c code to nim atm, trying to keep it as 1-to-1 as possible atm |
08:46:44 | Yardanico | atm |
08:46:48 | Yardanico | defer and global are the "shady" things which 4raq doesn't like :P |
08:47:03 | Yardanico | {.global.} i mean |
08:47:28 | Prestige | Yeah. want to get it all working before I refactor |
08:59:31 | voltist | This is probably more of a CS question than a Nim one, but is there a way to map large ints down to a smaller range (say, 0-65,536 down to 0-255) without converting everything to sloooww floats? |
09:00:55 | FromDiscord | <Rika> wdym map large ints? |
09:01:27 | Yardanico | voltist: there's "uint8" type for that |
09:01:31 | Yardanico | if you want ints in 0-255 range |
09:01:35 | Yardanico | otherwise I don't understand :) |
09:03:28 | voltist | Maybe a better word for what I mean is 'scale'? Like I have data that ranges from 0 to x, but I want it to range from 0 to y. Currently I am dividing each item by x and then multiplying by y, but its pretty slow |
09:03:59 | * | drewr quit (Ping timeout: 244 seconds) |
09:04:04 | voltist | I'm wondering if I could take shortcuts since its just for displaying to the screen, not processing |
09:04:21 | FromDiscord | <Rika> if youre scaling by powers of two, there's always shifting |
09:05:09 | FromDiscord | <Rika> actually not scaling, i mean dividing |
09:06:00 | voltist | Ooo looks like a good idea |
09:06:04 | * | drewr joined #nim |
09:07:57 | voltist | In nim thats `shl` and `shr`, right? |
09:08:43 | FromDiscord | <Rika> yes |
09:08:47 | FromDiscord | <Rika> dividing is shr |
09:09:19 | * | sagax joined #nim |
09:11:27 | * | maier joined #nim |
09:14:01 | voltist | I don't think this will work out because the data is not guaranteed to be a power of two, only that it's max possible value is |
09:14:55 | FromDiscord | <Rika> the data doesnt have to be a power of two |
09:15:45 | voltist | I'm not sure I 100% understand then |
09:16:35 | FromDiscord | <Rika> 257 shr 1 == 257 div 2β΅ shr 2 == div 4β΅etc |
09:16:44 | * | maier quit (Ping timeout: 256 seconds) |
09:16:51 | voltist | Ah got it |
09:19:21 | voltist | Another problem is that because I'm dividing by the max value, then all the outputs should be between 0 and 1, which logical shifting can't do right? So I |
09:19:54 | voltist | ...don |
09:19:59 | voltist | t think it would work |
09:20:14 | voltist | Darn I keep on hitting the enter key accidentally :) |
09:20:24 | FromDiscord | <Rika> well div wouldnt do it properly |
09:20:35 | FromDiscord | <Rika> either |
09:21:13 | voltist | But at least it does work |
09:21:38 | FromDiscord | <Rika> lets say max is 255 and other max is 1; 254 div 255 would be 0 no? |
09:22:17 | voltist | Yeah with ints, so to make it work I have to convert everything to slow floats |
09:22:22 | voltist | Thats my issue |
09:22:41 | FromDiscord | <Rika> ok |
09:22:45 | FromDiscord | <Rika> so what i did for taht is |
09:23:05 | FromDiscord | <Rika> i do 254 div (1 bit less max, so instead of 255 its 127) |
09:23:23 | FromDiscord | <Rika> then i check the 1st bit if its 0 or 1 and "round" |
09:23:45 | FromDiscord | <Rika> so 00 == 0, 01 == 1, 10 == 1 or so |
09:25:30 | FromDiscord | <Rika> actually hm |
09:25:42 | FromDiscord | <Rika> i dont think i explained that properly |
09:25:50 | voltist | I'm afraid that makes little sense to me, especially the first bit about 254 and 127 |
09:26:46 | FromDiscord | <Rika> ok so lets say you want to rescale the number 254 from 0-255 to 0-1, where bias is 0-127 is 0 and 128-255 is 1β΅this is what you want right? |
09:29:43 | voltist | Not exactly. The data could be anywhere up to 2^32 and I want it scaled between 0 and 255, so the intermediary value between 0 and 1 has to be a float with multiple decimal points of depth |
09:30:01 | voltist | Maybe there isn't a way to even approx. this without floats |
09:31:11 | FromDiscord | <Rika> no you dont need a float i can think of a way i just cant express it well |
09:31:58 | voltist | All good, there is no rush |
09:32:16 | voltist | This is where a proper education in CS would have been good for me :) |
09:32:43 | FromDiscord | <Rika> i havent taken a class on cs but i know how this would work, i think its just a matter of knowing the terms well enough to search it |
09:33:05 | FromDiscord | <Ricky Spanish> is there a particular nim tool for auto-formatting? i got the vs-code extension but doesent seem to have a format function |
09:33:14 | FromDiscord | <Rika> wait, max is 2^32 and not 2^32-1? |
09:33:42 | FromDiscord | <Rika> @Ricky Spanish nimpretty |
09:33:53 | FromDiscord | <Ricky Spanish> thanks @Rika |
09:34:08 | voltist | 2^32-1 yeah |
09:34:13 | voltist | 32 bit unsigned int |
09:34:40 | FromDiscord | <Rika> okay let me test my "theory" first |
09:36:31 | Yardanico | just int divide? |
09:37:17 | voltist | You know what? Maybe it is as simple as int divide |
09:37:25 | voltist | I might just be overthinking it |
09:38:10 | voltist | Or maybe not |
09:38:12 | FromDiscord | <Rika> voltist: int divide will make `2281701376` == `136` when your float div + float mult gives `135` |
09:38:14 | voltist | I'm confusing myself now |
09:38:20 | Yardanico | voltist: |
09:38:28 | Yardanico | https://play.nim-lang.org/#ix=2sWk |
09:38:30 | Zevv | disruptek: not much time today yet, took a quick peek at your latest work. The iterator is *many* times faster then nim closure iterators, but that might be because it's broken. `a.produce()` always gives none. Didn't look into why yet, sorry |
09:38:31 | Yardanico | is that not what you want? |
09:39:11 | Yardanico | I got "coef" from dividing 2^32 by 255 |
09:39:57 | Yardanico | e.g. echo 2294967296 div coef will be 136 |
09:40:59 | Yardanico | !eval const coef = 16843009'u32; echo 4294967295'u32 div coef; echo 129591259'u32 div coef; echo 2294967296'u32 div coef |
09:41:01 | NimBot | 255β΅7β΅136 |
09:41:08 | Yardanico | if you want uint32 explicitly |
09:42:38 | voltist | I feel like it should work, but it just returns 0 for everything |
09:42:47 | Yardanico | it will return 0 for small values, yes |
09:42:53 | Yardanico | otherwise I don't understand how you would want it to work |
09:43:25 | FromDiscord | <Rika> small enough values will be clipped to 0 |
09:43:38 | Yardanico | with my code you basically "scale" down all numbers from range 0 to uint32.high to a range 0 .. 255 |
09:43:49 | FromDiscord | <Rika> it is "floor"ing rather than "round"ing |
09:44:16 | FromDiscord | <Rika> so only uint32.high will be mapped to 255 |
09:44:20 | FromDiscord | <Rika> ever |
09:44:21 | FromDiscord | <Rika> afaik |
09:44:22 | Yardanico | yes |
09:45:21 | FromDiscord | <Rika> maybe thats not waht voltist wants |
09:46:42 | voltist | Ok I've gotten it working |
09:46:58 | voltist | There is a bit of an overflow problem but I'm sure I can sort it out |
09:47:12 | voltist | Idk why this absolutely messes with my head |
09:48:46 | voltist | Thanks you two for your help thought :) |
09:56:38 | * | Vladar quit (Quit: Leaving) |
09:57:11 | voltist | Darn, all this and it ends up being just as slow? I wasn't expecting that |
09:57:22 | Yardanico | are you testing with -d:danger ? |
09:57:34 | Yardanico | also try -flto, C compiled by Nim is usually very LTO-friendly |
09:57:43 | Yardanico | --passC:-flto --passL:-flto |
09:58:07 | FromDiscord | <Rika> are you sure the division and multiplication is the bottleneck |
09:59:26 | voltist | @Rika Haha, with this new method it only seems to make up about a quarter of it |
09:59:39 | Yardanico | voltist: maybe you looked at the wrong place :) |
09:59:41 | Yardanico | for the bottleneck |
09:59:45 | voltist | So it helped, but not the best use of my time |
09:59:46 | Yardanico | what profiler tools did you use ? |
10:00:00 | Yardanico | with Nim you can use all of them really |
10:00:09 | Yardanico | Intel's vprof, AMD's uprof, `perf`, etc |
10:00:23 | Yardanico | sorry intel vtune |
10:00:48 | voltist | Well because its so slow I can pretty much just feel how long its taking :) |
10:02:15 | voltist | At least we cut it down a bit |
10:02:29 | voltist | Now I can do other, more sensible things to cut it down even more |
10:02:45 | FromDiscord | <Rika> uprof is harder to use over vtune i think π¦ |
10:02:50 | Yardanico | it was easy for me |
10:02:55 | Yardanico | voltist: tried -d:danger and LTO ? |
10:02:57 | FromDiscord | <Rika> at least from what i see, i have more difficulty with uprof |
10:03:04 | FromDiscord | <Rika> i mean its easy yeah |
10:03:39 | FromDiscord | <Ricky Spanish> is there any type of build configuration file or hooks or something i can attach nim script too or something so i can do post-build events without relying on my ci stack? |
10:04:16 | FromDiscord | <Rika> nim.cfg or config.nims? wdym? |
10:04:19 | Yardanico | you can write a custom nimble task which will do something after building? |
10:04:36 | Yardanico | basically you write a nimble task which builds the binary but also does something after that |
10:04:37 | FromDiscord | <Ricky Spanish> yeh thats what i need @Yardanico |
10:04:57 | FromDiscord | <Ricky Spanish> great thanks guys @Rika , @Yardanico |
10:06:58 | voltist | Yardanico: -d:danger is what I was using anyway, and LTO seems to not have a noticeable effect. I'm going to implement some sensible optimizations like... not drawing parts of the image that aren't being displayed :/ |
10:14:10 | Yardanico | that's with GCC? |
10:14:18 | Yardanico | you can also try witrh clang if you can install it easily |
10:47:25 | FromDiscord | <Recruit_main707> do i need to install mingw32 to be able to cross compile? or mingw64 should already ship 32bit compilers aswell? |
10:47:39 | Yardanico | mingw64 should be able to 32-bit compile usually |
10:50:20 | FromDiscord | <Recruit_main707> i get errors like: (when passing -m32 to the compiler and the linker) `skipping incompatible [path_to_libmingw32.a] when searching for -lmingw32` |
10:50:25 | Yardanico | huh |
10:50:49 | FromDiscord | <Recruit_main707> `cannot find [path_to_libmingw32.a]` |
10:51:30 | FromDiscord | <Varriount> Don't you have to set the target triple? |
10:52:18 | Yardanico | I never had to do that for GCC |
10:52:21 | Yardanico | or clang |
10:52:31 | Yardanico | just passing -m32 to x86_64 compilers worked :P although I guess I also have multilib stuff installedf |
10:54:29 | Yardanico | btw I extended my PGO script for Nim compiler (with clang) a bit right now |
10:54:44 | Yardanico | so it also compiles npeg (and compiler itself) with arc so the ARC analysis modules also get PGO'd |
10:55:07 | FromDiscord | <Recruit_main707> if i install mingw32, will nim be able to choose either the 64 bit or 32 bit version? or it will just try to use the same as its currently using? |
10:58:28 | * | FromDiscord quit (Remote host closed the connection) |
10:58:45 | * | FromDiscord joined #nim |
11:07:02 | FromDiscord | <Ricky Spanish> im a little confused with nimble, ```when isMainModule:β΅ exec("nim c -c test.nim")``` this file nimble generates cant seem to find the exec function listed in nimscript ```Error: undeclared identifier: 'exec'``` |
11:07:19 | Yardanico | where did you put that exec? |
11:07:21 | Yardanico | what file |
11:07:36 | FromDiscord | <Ricky Spanish> nimble generated a new file containing the isMainModule |
11:07:41 | Yardanico | no, that's not the right one |
11:07:49 | FromDiscord | <Ricky Spanish> inside /src/newfile.nim |
11:07:50 | Yardanico | no, that's not how you do it, you should put tasks into "task" blocks in the xxx.nimble file |
11:07:57 | FromDiscord | <Ricky Spanish> ah ok i see |
11:08:06 | FromDiscord | <Ricky Spanish> so whats the purpose of that file? |
11:08:13 | Yardanico | I assume you ran "nimble init" |
11:08:18 | FromDiscord | <Ricky Spanish> yeh |
11:08:23 | Yardanico | it's just the main entry point |
11:08:25 | Yardanico | for your program |
11:08:38 | Yardanico | about nimble - see e.g. pretty complex tasks in https://github.com/mratsim/Arraymancer/blob/master/arraymancer.nimble |
11:08:59 | FromDiscord | <Ricky Spanish> ooooh i see thats an actual new project basically that should contain my source code |
11:09:05 | FromDiscord | <Ricky Spanish> gotya |
11:12:17 | * | maier joined #nim |
11:17:05 | * | maier quit (Ping timeout: 240 seconds) |
11:17:10 | Yardanico | argh |
11:17:19 | Yardanico | 4raq fixed two bugs with arc I found in combparser package |
11:17:25 | Yardanico | but there are still bugs left :(( |
11:53:55 | * | Vladar joined #nim |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:23 | * | MatrixBridge joined #nim |
12:06:24 | * | MatrixBridge left #nim ("User left") |
12:06:25 | * | MatrixBridge joined #nim |
12:06:26 | * | MatrixBridge left #nim ("User left") |
12:06:43 | * | supakeen joined #nim |
12:07:10 | * | MatrixBridge joined #nim |
12:07:11 | * | MatrixBridge left #nim ("User left") |
12:16:06 | * | rockcavera joined #nim |
12:20:21 | ForumUpdaterBot | New thread by Serge: Fltk binding for Nim : getting error " Error: cannot open file: fltk", see https://forum.nim-lang.org/t/6631 |
12:33:15 | FromDiscord | <Ricky Spanish> quick question, is it possible to output the AST to a text format for your program? id be interested in working on some tools when i understand nim more |
12:35:03 | Yardanico | Not sure what do you exactly mean |
12:35:30 | Yardanico | you can write AST representation (e.g. lispRepr or treeRepr) to file at compile-time from macros |
12:36:29 | FromDiscord | <Ricky Spanish> yeh i want a tree representation of each node and the variables so i can write another program to analyze it basically similar to the ast produced by tools such as ANTLR |
12:37:00 | Yardanico | well I don't think that this would be the best idea but it should be possible |
12:37:11 | Yardanico | in the worst case you'll have to modify the compiler a bit to emit AST after all transformations |
12:37:41 | Yardanico | macro evaluations/template expansions/destructors injection (with arc/orc only)/closure iterators/procs lifting/etc |
12:37:44 | FromDiscord | <Ricky Spanish> ah is there some other way i can directly add event hooks or something into the compiler to allow me to work on tools without modifying nim itself |
12:37:56 | Yardanico | but why do you really want the AST? |
12:38:01 | Yardanico | you have nim macros to manipulate it |
12:38:16 | Yardanico | and you can call other programs on compile-time with staticExec |
12:38:55 | FromDiscord | <Ricky Spanish> hmm ok i see this makes sense, usually used to just working with ast's when it comes to developing auto completion tools basically |
12:39:04 | FromDiscord | <Ricky Spanish> which is why i was asking |
12:39:12 | Yardanico | do you know about nimsuggest? |
12:39:23 | FromDiscord | <Ricky Spanish> nope not tried it yet |
12:39:41 | Yardanico | it uses compiler directly (and there's some special branched code in the compiler for it) to provide suggestionms |
12:39:44 | Yardanico | suggestions* |
12:39:56 | Yardanico | there's also nimlsp based on nimsuggest which provides a LSP server |
12:40:57 | FromDiscord | <Ricky Spanish> hmm nice reading about it now, thanks for the info @Yardanico |
12:41:41 | * | krux02 joined #nim |
12:44:05 | Oddmonger | in this sample: http://rosettacode.org/wiki/Closures/Value_capture#Nim |
12:44:40 | Oddmonger | does "let x=1" part of the function added to the seq ? |
12:44:44 | * | dadada joined #nim |
12:44:55 | Yardanico | Oddmonger: not "directly" |
12:45:03 | Yardanico | closure procs "capture" the environment |
12:45:08 | * | dadada is now known as Guest59087 |
12:45:10 | Oddmonger | yes it's used only for building |
12:45:26 | Yardanico | the example can be written in a more clear way |
12:45:44 | Yardanico | with closureScope from system |
12:45:49 | Yardanico | https://nim-lang.org/docs/system.html#closureScope.t%2Cuntyped |
12:45:56 | Oddmonger | i think so, because the seq functions are not closure |
12:46:03 | Oddmonger | the closure is in the loop |
12:46:03 | Yardanico | wdym |
12:46:25 | Yardanico | the funcs seq contains closure procs |
12:46:48 | Oddmonger | then i don't understand the thing |
12:46:48 | FromDiscord | <Rika> the closures made in the loop are put into the seq |
12:46:54 | FromDiscord | <Rika> therefore the seq functions are also closures |
12:46:56 | Yardanico | Oddmonger: closures are "implicit" in nim |
12:47:12 | Yardanico | unless you specify the {.nimcall.}, if the compiler thinks it's a closure, the proc type will be a closure |
12:48:01 | Oddmonger | i had understood that only Β« proc (): int = x * x Β» was added to the seq |
12:48:07 | Yardanico | yes, and it's a closure |
12:48:12 | Yardanico | since it captures external variables |
12:48:24 | Oddmonger | ah |
12:48:33 | Yardanico | cleaner implementation of the same example on rosetta would be https://play.nim-lang.org/#ix=2sXv btw |
12:48:48 | Oddmonger | don't know why, i was thinking of x substitution with its value |
12:48:55 | Oddmonger | i understand |
12:49:30 | Yardanico | if you define the seq as var funcs: seq[proc(): int {.nimcall.}] instead, the compiler will error out |
12:49:39 | Oddmonger | ah yes, version with Β«cleanerΒ» is more readable |
12:50:09 | Yardanico | nimcall proc is the standard nim proc |
12:50:15 | Yardanico | so the seq just contains pointers to proc |
12:50:28 | Yardanico | but if they're closures, each closure is a tuple of (envPointer, procPointer) |
12:50:28 | ForumUpdaterBot | New thread by Serge: NiGui for Nim : It works fine (which is cool) but does it compile statically ?, see https://forum.nim-lang.org/t/6632 |
12:50:55 | * | Oddmonger thinks it's time to take notes |
12:52:47 | Yardanico | https://nim-lang.org/docs/manual.html#procedures-closures |
12:52:52 | Yardanico | "Any captured variables are stored in a hidden additional argument to the closure (its environment) and they are accessed by reference by both the closure and its enclosing scope (i.e. any modifications made to them are visible in both places)." |
12:59:02 | * | joelanglois joined #nim |
12:59:43 | * | joelanglois quit (Client Quit) |
12:59:45 | Yardanico | ok this is very fun |
12:59:53 | Oddmonger | thank you for all the informations |
12:59:59 | Yardanico | some code snippet doesn't work with arc |
13:00:06 | Yardanico | but if I comment a single line of UNUSED (really) code, it works |
13:00:16 | Yardanico | maybe some destructor stuff |
13:00:23 | * | joelanglois joined #nim |
13:00:33 | Oddmonger | there are unused code in the samples ? |
13:00:41 | Yardanico | ? no |
13:00:47 | Yardanico | I'm talking about another ARC bug I'm minimizing :PO |
13:00:48 | Yardanico | :P |
13:01:49 | FromDiscord | <haxscramper> @Ricky Spanish If you want to analyze nim source code you can try and use `compiler/parser` as a regular library and get AST at runtime from arbitrary string of code, example: https://gist.github.com/haxscramper/24e886200b334491d593d0543e286a3a |
13:04:14 | FromDiscord | <Ricky Spanish> hm thats quite interesting, thanks |
13:13:12 | * | maier joined #nim |
13:15:17 | * | pangey joined #nim |
13:18:10 | * | maier quit (Ping timeout: 260 seconds) |
13:27:14 | Zevv | who said npeg my terminal is yellow but im on mobile and my keyboard broke so i cant scroll back |
13:27:22 | Yardanico | you ok? |
13:27:30 | Yardanico | I said npeg |
13:27:37 | Yardanico | I use it for PGO for the nim compiler |
13:27:44 | Zevv | pgo |
13:27:49 | Yardanico | profile-guided optimization with clang |
13:28:22 | Zevv | ah cool i hsould look at that sometime |
13:31:50 | FromDiscord | <bewarecrow> hey |
13:32:00 | Yardanico | hey |
13:32:03 | * | narimiran joined #nim |
13:32:09 | Yardanico | gmorning miran |
13:32:13 | Yardanico | or gdayu |
13:32:14 | Yardanico | gday* |
13:36:32 | * | sagax quit (Remote host closed the connection) |
13:43:09 | Oddmonger | with core OpenGL, it's the end of this kind of readable things: http://rosettacode.org/wiki/OpenGL#Nim |
13:43:42 | narimiran | Yardanico: hello there |
13:48:27 | Yardanico | 10k stars on the github repo soon |
13:48:32 | Yardanico | less than 200 left |
13:49:38 | Zevv | well I just starred it, and it still says 9.8k |
13:49:41 | Zevv | that's a bit disappointing |
13:49:43 | Yardanico | lol |
13:49:52 | Yardanico | and how did you not star it before |
13:49:58 | Yardanico | absolutely outrageous |
13:50:00 | Zevv | I was not paid enough |
13:50:03 | Zevv | I only star for money |
13:50:08 | Yardanico | damn |
13:50:17 | Zevv | I just don't do virtual internet points |
13:50:22 | Zevv | I buy arak a bear |
13:50:27 | Yardanico | arak XD |
13:50:40 | Zevv | I even bought him ice cream on the 1.0 release, but he sent the delivery guy away because he didn't order ice cream |
13:50:45 | Yardanico | lol |
13:50:53 | Yardanico | karax is a smith from starcraft too btw, if you didn't know |
13:50:58 | Yardanico | https://starcraft.fandom.com/wiki/Karax |
13:52:03 | Yardanico | so we should probably follow the tradition |
13:52:08 | Yardanico | and name nim packages with names from StarCraft |
13:52:16 | Zevv | what is this starcraft thing |
13:52:17 | Zevv | i know this not |
13:52:25 | Yardanico | StarCraft / StarCraft 2 |
13:52:25 | * | albrecht joined #nim |
13:52:27 | Yardanico | RTS games |
13:52:30 | Zevv | doesn't run on my ps4 |
13:52:32 | FromDiscord | <aachh> the only thing i know about starcraft is there's a fox |
13:52:33 | Yardanico | lol |
13:52:33 | FromDiscord | <aachh> right? |
13:52:34 | Zevv | then it doesn't exist |
13:52:40 | Yardanico | Zevv: PC is best for games :) |
13:52:44 | Yardanico | so I can both play games and use nim |
13:52:49 | Yardanico | at the same time |
13:52:51 | Zevv | did I say ps4 was any good then? |
13:53:06 | Zevv | i just don't feel like frying my testicles playing on my laptop |
13:53:15 | Zevv | and if I play I want to play, not read my mails |
13:53:15 | FromDiscord | <aachh> i canfΒ eel you |
13:53:21 | Yardanico | oh well then it's understandable |
13:53:25 | Yardanico | about the laptop |
13:53:31 | * | dzamo joined #nim |
13:53:38 | Zevv | I'm pretty old fashioned. I read my books on paper. Make pictures with a camera. Play my games on a console. |
13:53:41 | albrecht | my laptop's battery dies everytime i try to play a game |
13:53:58 | FromDiscord | <aachh> my laptop's cpu dies everytime i try to play a game |
13:54:03 | Yardanico | Zevv: these zoomers do all of this on their "smartphones" nowadays |
13:54:03 | FromDiscord | <aachh> and the fans too |
13:54:06 | FromDiscord | <aachh> damn |
13:54:23 | Zevv | i mostly play battlefield, and the part I enjoy most is shouting at my friends that they are big fuckers and should come over here so I can smack them in the face |
13:54:32 | albrecht | i was compiling a program before and my cpu's temp was at 102C |
13:54:32 | Yardanico | that's the same on PC |
13:54:33 | FromDiscord | <aachh> xD |
13:54:34 | albrecht | almost fried it |
13:55:07 | FromDiscord | <aachh> my cpu's at 80Β°C when i try to play games |
13:55:11 | FromDiscord | <aachh> sometimes 90 |
13:55:13 | Zevv | you should move to the US, then 102Β° is not so hot anymore |
13:55:18 | FromDiscord | <aachh> xDD |
13:55:18 | Yardanico | well I don't have issues with CPU because I have 3700X |
13:55:19 | Zevv | instant cooling |
13:55:27 | Yardanico | but I don't play very demanding games so I just have RX 470 4gb |
13:55:31 | FromDiscord | <aachh> i have a laptop :( |
13:55:36 | albrecht | when i'm playing a game it's at like 75-80C most of the time |
13:55:41 | albrecht | never above 90 though |
13:56:07 | albrecht | if i played on windows my cpu would probably be dead |
13:56:18 | Yardanico | doubt it :) |
13:56:18 | * | dzamo quit (Client Quit) |
13:56:27 | Yardanico | if it's somewhat modern the laptop will just shut down |
13:56:44 | Zevv | just like my ps4 :( |
13:57:04 | albrecht | is a mid-level laptop from 2015 considered "modern"? |
13:57:17 | Zevv | albrecht: well, not much happened since then |
13:57:28 | Yardanico | albrecht: yes |
13:57:31 | Yardanico | it'll just shut down |
13:57:31 | Zevv | I have a 2015 dell. I7 quad core, 16G of mem, some SSDs |
13:57:36 | Zevv | thats still the stuff they sell now |
13:57:43 | albrecht | i have an hp elitebook |
13:57:45 | Yardanico | I just use a stock cooler (wraith prism) for my 3700X |
13:57:49 | albrecht | 8g ram, 500gb hdd |
13:57:50 | Yardanico | it can get to ~80c at 100% load |
13:58:00 | albrecht | i use a big ass propeller fan |
13:59:12 | Oddmonger | the fun with laptop is when you are using all the cores (compiling, gamingβ¦) the heat rises up to 90Β°C and then the cpu clock is throttled and all slows down |
13:59:51 | albrecht | for all my life i've been using pentium 4 and atom computers |
13:59:59 | Oddmonger | so instead of making cpu with 3.4Ghz for laptop , they could may do it one which reach 2ghz without too much heat, it would be a good average :) |
14:00:16 | albrecht | so i usually play old games |
14:00:18 | Yardanico | hmm actually I should try to lower voltage on my 3700X and see if that helps without hurting performance |
14:00:30 | Yardanico | to make a bit lower temps |
14:00:32 | Zevv | albrecht: young man, you don't know what you're talking about. |
14:00:47 | Zevv | I started at 8 bit 4Mhz. *those* were the old games |
14:00:54 | Zevv | I will now sit in my rocking chair and tell you all about that |
14:01:04 | Zevv | and do a bit of lawn shouting in the mean time |
14:01:11 | Oddmonger | z80 suxx, but it was cool anyway |
14:01:20 | albrecht | my old atom netbook hardly handled nes emulation |
14:01:21 | Oddmonger | no div, no mul β¦ fun |
14:01:58 | leorize | Yardanico: fwiw it won't worth it to run an offset, GN did a full analytical piece on how Ryzen 3rd gen boosting works |
14:02:14 | Yardanico | leorize: well idk if my temps are high or not |
14:02:20 | Yardanico | I get ~80c with wraith prism at 100% CPU load |
14:02:29 | leorize | you need a new cooler :P |
14:02:32 | Yardanico | do I? |
14:02:42 | Yardanico | seems like a normal temperature for it on full load |
14:02:56 | leorize | well I'm on a cheap hyper 212 an my p95 small fft never get pass 75C |
14:02:58 | albrecht | is 54C idle good or not |
14:02:58 | Oddmonger | on my sandybridge desktop i5, i never go above 50Β° |
14:03:03 | leorize | I'm on 3600 though |
14:03:23 | leorize | Yardanico: fwiw Ryzen max temp is 95C |
14:03:30 | Yardanico | leorize: I know |
14:03:40 | Yardanico | but I really even tried to change the thermal paste a few times |
14:03:45 | Yardanico | didn't change anything |
14:03:56 | Yardanico | but I don't really stress my CPU so it's fine for now :D |
14:03:59 | leorize | and if you really want to know if you need a new cooler, just enable PBO, set scalar to 1x, then run p95 small fft + hwinfo64 |
14:04:00 | Oddmonger | i removed the thermal paste, and saw no change |
14:04:16 | Yardanico | leorize: I already have it on |
14:04:16 | leorize | if SVI TFN2 voltage dips after 5mins of testing, you need a new cooler :P |
14:04:25 | Yardanico | not sure what "scalar" is though |
14:04:42 | leorize | don't worry, it's 1x by default if you didn't change it |
14:04:57 | Yardanico | maybe I just need to make my fan curve a bit higher |
14:05:02 | Yardanico | I made it a bit lower so it's a bit less noise lol |
14:05:04 | Yardanico | in the UEFI |
14:05:16 | Yardanico | but my wraith prism is in the "high" mode (the physical switch I mean) |
14:05:26 | leorize | well if at max speed it tops at 80c then it's not really too good |
14:05:35 | Yardanico | not sure if it's max speed :) |
14:05:36 | Yardanico | hm |
14:05:48 | leorize | also mind your case fans too |
14:05:51 | Yardanico | i have them |
14:05:52 | Yardanico | but they |
14:05:57 | Yardanico | they're pretty basic |
14:06:04 | Oddmonger | may try a cooler with 12cm fan (the big things with 1kg of metal) |
14:06:11 | leorize | and since your cooler is a downdraft one, try to remove the side panel and see if temps drop |
14:06:35 | leorize | if temps drop then you either want more case fans or better case or better cooler :P |
14:06:58 | Oddmonger | not sure the temps drop when removing side panel |
14:07:13 | leorize | depends on the cooling setup |
14:07:25 | Oddmonger | and the heat in the room :) |
14:07:26 | leorize | can be benefital since the wraith prism is a downdraft cooler |
14:07:52 | leorize | also if temp drops then your case fans might just not move hot air out quick enough :P |
14:08:12 | Yardanico | well I'll see |
14:11:02 | Yardanico | leorize: well I guess something *is* wrong with my setup, maybe wraith prism isn't enough, I'll try later |
14:11:25 | Yardanico | with mprime on linux with Small FFTs and all threads I get 91.5c right now |
14:11:29 | Yardanico | which is a bit too much I guess |
14:11:38 | Yardanico | and it's still slowly going up |
14:11:39 | leorize | you can just turn off pbo |
14:11:52 | leorize | it should drop the temps a bit |
14:12:04 | Yardanico | well I don't really have my CPU at 100% load most of the time |
14:12:11 | Yardanico | so PBO is useful for me in games or when compiling |
14:12:36 | leorize | note that ryzen is super sensitive to temps |
14:12:42 | Yardanico | as in? |
14:14:07 | leorize | enough that 2-3 deg difference can affect benchmark results :) |
14:14:26 | Yardanico | well after 2 minutes with mprime the temp now is 92.8c :) |
14:14:29 | leorize | there's a proper piece somewhere that dives into this, let me look real quick |
14:15:17 | Yardanico | guess I'll stop it right now, 93c is a bit uncomfortable for me to look at :) |
14:16:23 | leorize | wait a bit more and your motherboard will stop it for you :) |
14:16:30 | Yardanico | no I don't want to :P |
14:16:38 | Yardanico | I have 11 days uptime now |
14:17:45 | leorize | not sure if that's something to brag about :P |
14:17:50 | Yardanico | it's not |
14:18:12 | leorize | update your kernel :P |
14:18:19 | Yardanico | 5.7.8 is good enough |
14:18:23 | Yardanico | my idle is ~50c btw, which is kinda high too I guess |
14:18:26 | * | waleee-cl joined #nim |
14:18:31 | leorize | https://www.gamersnexus.net/guides/3494-amd-ryzen-3000-undervolting-offset-override <- that's a piece about undervolting and how it just doesn't work |
14:18:32 | Yardanico | but my cooler curve is really low until high temps |
14:18:56 | leorize | it's alright to have a curve like that |
14:19:20 | leorize | what matters is that the cooler can handle it once you hit it with a heavy load |
14:21:27 | * | albrecht quit (Quit: Leaving) |
14:21:29 | Yardanico | oh seems like it cools to like 42-43c |
14:21:40 | Yardanico | but then maybe due to some instant task jumps to 57c |
14:21:43 | Yardanico | and then cools down again |
14:21:49 | Yardanico | well, not 57, but ~50-57 |
14:22:42 | leorize | https://www.gamersnexus.net/news-pc/3492-ryzen-cpu-thermals-matter-coolers-and-cases |
14:22:45 | leorize | ^ found it |
14:23:06 | leorize | past 75C the cpu will stop boosting aggressively |
14:27:24 | leorize | also, unlike laptops, the type of thermal pastes on desktop cpus doesn't matter that much, since you are already interfacing through a heat spreader, and the mounting pressure is just much better on a desktop |
14:39:01 | * | audiofile joined #nim |
14:44:12 | * | outtabwz left #nim (#nim) |
14:48:42 | * | lritter quit (Quit: Leaving) |
14:55:45 | * | dzamo joined #nim |
14:57:48 | * | sagax joined #nim |
14:58:22 | disruptek | Zevv: wrong answers, delivered at the speed of light. |
14:58:33 | Yardanico | disruptek: so when I can use cps instead of async? :P |
15:00:19 | * | dzamo quit (Client Quit) |
15:00:54 | disruptek | Zevv: ah, we don't copy param values into the continuation. π€¦ |
15:01:06 | disruptek | coffee first. |
15:01:49 | leorize | why are your tests failing lol |
15:03:58 | disruptek | that happens when the code is overfitted to the benchmark. |
15:04:24 | Zevv | well, it's almost infinitely faster now, which is good |
15:04:42 | Yardanico | but does it have all the same features as the closure iters? :P |
15:04:43 | disruptek | lemme do it by hand. π |
15:04:49 | Yardanico | e.g. capturing variables from outer scopes |
15:05:10 | Zevv | nope, it's dead stupid |
15:05:25 | Zevv | it's .nimcall. on purpose |
15:06:00 | Zevv | I had a bit of a revelation yesterday, after a week of messing around, and it is so straightforwardly obvious that I'm a bit ashamed |
15:06:08 | Zevv | but the whole thing comes down to moving the stack to the heap |
15:14:04 | * | maier joined #nim |
15:19:03 | * | maier quit (Ping timeout: 256 seconds) |
15:26:51 | Oddmonger | in doc: Β« --gc:arc Reference cycles cause memory leaks, beware. Β» -> what does it mean ? |
15:27:03 | * | superbia quit (Quit: WeeChat 2.9) |
15:27:14 | Yardanico | Oddmonger: this means that arc doesn't deal with cycles in memory |
15:27:27 | Yardanico | e.g. if your ref object a references object b, and your object b references object a |
15:27:59 | Yardanico | ORC is ARC with a cycle collector to deal with cycles |
15:28:12 | Oddmonger | ok |
15:28:40 | Oddmonger | with arc, if you delete a, it's ref is freed and it's null pointer for b ? |
15:28:53 | Yardanico | if you "delete" a yourself, b will be freed |
15:28:58 | Yardanico | because refcount of b will be 0 |
15:29:09 | Yardanico | but if a -> and b -> a, refcount of a is 1 and refcount of b is 1 |
15:29:23 | Yardanico | and they're not connected to the "root" (e.g. even after you don't need them) |
15:30:34 | disruptek | Zevv: it's not moving the stack to the heap if i get my way. π |
15:31:30 | Oddmonger | is it a problem if i don't use double linked list ? |
15:31:40 | Yardanico | Oddmonger: it's not a problem even with doubly linked lists |
15:31:43 | Yardanico | since you don't have cycles with them |
15:32:01 | Zevv | what. doubly linked lists are all cycles |
15:32:28 | Yardanico | are they? in a sense of the GC |
15:32:33 | Yardanico | the last node's "next" is empty |
15:32:39 | Yardanico | well I guess you're right |
15:32:42 | Zevv | a points to b, b points to a |
15:33:18 | Zevv | and if you make it circular, there is no 'last' |
15:33:35 | Oddmonger | it wouldn't be a problem is the whole list was hosted in a bigger structure (as seq, arrayβ¦) |
15:33:47 | Yardanico | that wouldn't really matter |
15:34:01 | Yardanico | since they're refs |
15:34:32 | Yardanico | imagine you have a seq with two elems which point at each other |
15:34:39 | Yardanico | both of the elems have a refcount of 2 |
15:34:46 | Yardanico | because they reference each other and are also references from the seq |
15:35:00 | Yardanico | when seq is "destroyed", all of it's fields are destroyed, so a destructor will be called on all it's fields |
15:35:05 | Yardanico | and for refs it'll just decrease the refcount by one |
15:35:11 | Yardanico | so they'll still have a refcount of 1 |
15:35:13 | Oddmonger | yes, so no wandering until the seq is destroyed |
15:35:28 | Yardanico | so the memory will still leak |
15:35:58 | Oddmonger | yes |
15:36:05 | Yardanico | then I'm not sure what did you ask :P |
15:36:07 | FromDiscord | <Zachary Carter> got vulkan memory allocator wrapped |
15:36:08 | Yardanico | or what did you mean |
15:36:10 | FromDiscord | <Zachary Carter> we be vulkaning |
15:36:15 | FromDiscord | <Clyybber> \o/ |
15:36:31 | Oddmonger | Yardanico: no it's ok |
15:37:04 | Oddmonger | memory leak ok, i was thinking of brutal desallocation from one side, with the other side still pointing to it |
15:37:14 | Oddmonger | my bad |
15:37:15 | Yardanico | nonono |
15:37:18 | Yardanico | it won't crash |
15:37:19 | Yardanico | it'll just leak |
15:37:32 | Oddmonger | yes it's still allocated |
15:37:46 | Oddmonger | may be i should learn english instead of Nim :ΓΎ |
15:38:03 | FromDiscord | <Clyybber> only whe you use ref seq of course |
15:56:08 | disruptek | Zevv: you're going to find the syntax we're generating kinda amusing. |
16:00:11 | disruptek | Yardanico: you don't want to use cps. you want to use stuff made with cps. |
16:00:56 | disruptek | actually, if it ever works again, we should see how the web-server performance is now. |
16:07:21 | * | Trustable joined #nim |
16:16:42 | disruptek | !last clyybber |
16:16:43 | disbot | clyybber spoke in 12#nim 38 minutes ago 12https://irclogs.nim-lang.org/02-08-2020.html#15:38:03 |
16:16:48 | Yardanico | correct |
16:16:52 | disruptek | dude, i got a weird one. |
16:17:07 | disruptek | eqsink___9ajq3lYeQwBVNmVulzkWoYA_2(&result, result); result = 0; |
16:17:14 | Yardanico | noice |
16:17:19 | Yardanico | XDD |
16:21:29 | disruptek | we may have to switch away from return values sooner than planned. |
16:35:58 | * | esthromeris joined #nim |
16:45:52 | FromDiscord | <Clyybber> disruptek: Damn, how |
16:46:31 | FromDiscord | <Clyybber> implicit return? |
16:46:50 | disruptek | you're going to laugh. |
16:46:57 | disruptek | template result = foo |
16:47:15 | disruptek | actually, template foo = result |
16:47:16 | FromDiscord | <Clyybber> uh how does that end up in the C code tho :p |
16:47:19 | FromDiscord | <Clyybber> ah |
16:47:32 | disruptek | i know. |
16:47:32 | FromDiscord | <Clyybber> and then you do `result = result` ? |
16:47:52 | disruptek | no, i do result = FooType: ... ; foo |
16:47:55 | FromDiscord | <Clyybber> but `result = result` shouldn't be turned into a sink |
16:48:04 | FromDiscord | <Clyybber> hmm |
16:48:14 | FromDiscord | <Clyybber> that doesn't make much more sense either |
16:48:22 | FromDiscord | <Clyybber> and it works without the template? |
16:48:38 | disruptek | well, it did. |
16:48:55 | disruptek | is an empty return `return (empty)` or just `return`? |
16:49:10 | disruptek | i thought it was `return (empty)`. |
16:49:18 | FromDiscord | <Clyybber> dunno, probably the compiler accepts both |
16:49:33 | FromDiscord | <XxDiCaprioxX> just return should be fine |
16:49:48 | FromDiscord | <Clyybber> @XxDiCaprioxX we are talking AST :) |
16:50:10 | disruptek | i must have missed one. |
16:50:33 | FromDiscord | <XxDiCaprioxX> What's that? And does it really matter? Returns always work the same |
16:50:39 | Yardanico | except CPS :) |
16:50:40 | FromDiscord | <Clyybber> disruptek: Can you use expandArc |
16:50:46 | disruptek | yeah. |
16:51:14 | FromDiscord | <Clyybber> @XxDiCaprioxX The syntax tree, we were talking about wether a `return` statement is represented by a return node or by a return node with a nkEmpty child |
16:51:28 | FromDiscord | <XxDiCaprioxX> Oh okay |
16:53:39 | FromDiscord | <XxDiCaprioxX> This question might be pretty stupid but how do I give a new type I create using the type statement a name? |
16:54:01 | disruptek | type MyGoat = object ... |
16:54:16 | disruptek | var g = MyGoat(...) |
16:54:22 | FromDiscord | <XxDiCaprioxX> But VS Code always highlighted it a bit weird |
16:54:26 | Yardanico | ? |
16:54:30 | Yardanico | don' |
16:54:35 | Yardanico | don't trust highlighting |
16:54:37 | Yardanico | trust the compiler :P |
16:54:39 | FromDiscord | <XxDiCaprioxX> Anyways, thank you |
16:54:44 | FromDiscord | <XxDiCaprioxX> K xD |
16:54:48 | disruptek | also, don't put an open hand near a goat's mouth. |
16:55:34 | disruptek | clyybber: http://ix.io/2sYz |
16:55:53 | disruptek | oh, wait, that's the new one. |
16:56:02 | FromDiscord | <Clyybber> ok damn, thats not supposed to happen |
16:56:13 | Yardanico | disruptek: you on latest devel? |
16:56:45 | disruptek | i'm on 28th |
16:56:52 | FromDiscord | <Clyybber> oh |
16:56:54 | disruptek | this is the bug: http://ix.io/2sYB |
16:57:06 | disruptek | no, i'm on 31st. |
16:57:12 | disruptek | * 1.3.5 124e8118 nightly 2020-07-31 |
16:58:03 | disruptek | lemme update gitnim. |
16:58:14 | Yardanico | well just give us code to make AST like that :P |
16:59:15 | FromDiscord | <Clyybber> disruptek: You can try to see why injectdestructors:809 isn't catching it |
17:00:01 | disruptek | pull cps and run the tblock.nim test. |
17:00:12 | FromDiscord | <Recruit_main707> can i provide a custom path to a compiler? |
17:00:13 | disruptek | --define:cpsMutant=off |
17:00:21 | disruptek | recruit: sure. |
17:00:22 | Yardanico | @Recruit_main707 wdym? |
17:00:43 | FromDiscord | <Recruit_main707> --cc:My\Own\C\Compiler.exe |
17:00:47 | Yardanico | sure |
17:00:52 | Yardanico | --gcc.exe: |
17:00:55 | Yardanico | --gc.linkerexe: |
17:00:55 | FromDiscord | <Recruit_main707> just like that? |
17:00:57 | Yardanico | *gcc |
17:00:57 | Yardanico | yes |
17:01:10 | Yardanico | .exe and .linkerexe at minimum |
17:01:14 | Yardanico | for the compiler |
17:01:16 | Yardanico | e.g. gcc/clang |
17:01:22 | FromDiscord | <Recruit_main707> ok, thx |
17:03:34 | FromDiscord | <Rika> what's the recommended package for reading jpg, png, gif, and preferably webp images? |
17:03:36 | disruptek | !repo imageman |
17:03:37 | disbot | https://github.com/SolitudeSF/imageman -- 9imageman: 11Image manipulation library 15 41β 3π΄ |
17:03:40 | FromDiscord | <Rika> most packages only do up to jpg and png |
17:03:55 | FromDiscord | <Rika> including imageman |
17:03:55 | disruptek | your guess is as good as ours. |
17:04:16 | disruptek | gif is a simple format to add, but i doubt webp is. |
17:04:45 | disruptek | clyybber: any idea for a workaround? |
17:04:50 | FromDiscord | <Rika> on to looking for a c library for me then |
17:04:53 | FromDiscord | <Rika> i mean, i will |
17:04:57 | FromDiscord | <Rika> that was badly worded |
17:05:22 | disruptek | imagemagick has always served me well, but it may be heavier than you want. |
17:05:38 | shashlick | https://github.com/dizzyliam/inumon/ |
17:05:43 | shashlick | @voltist has been working on that |
17:05:50 | FromDiscord | <Rika> nimagemagick doesnt compile with latest nimterop |
17:06:05 | FromDiscord | <Rika> also still no gif |
17:06:21 | Yardanico | imagemagick has gif support |
17:07:20 | FromDiscord | <Rika> yeah but the wrapper doesnt compile and i dont know how to fix it because i havent learned nimterop yet |
17:08:00 | disruptek | nothing to know. you just say, "shashlick shashlick shashlick va-va-voom" in irc and a wrapper appears in 30mins or less. |
17:11:00 | shashlick | bring it on |
17:11:15 | FromDiscord | <Rika> well |
17:11:21 | FromDiscord | <Rika> zedeus made a wrapper 2 years ago |
17:11:26 | FromDiscord | <Rika> https://github.com/zedeus/nimagemagick |
17:11:38 | FromDiscord | <Rika> hm |
17:11:50 | FromDiscord | <Rika> is there any risk in using a super old version of nimterop |
17:11:57 | Yardanico | yes |
17:12:00 | shashlick | no support π |
17:12:01 | Yardanico | it'll eat you |
17:12:11 | FromDiscord | <Rika> isnt that a good thing |
17:12:23 | disruptek | i haven't seen bentley for 3 days, all because i ran nimterop-0.3.1 just ONE TIME. |
17:12:36 | disruptek | that dog just bugged the fuck out. |
17:12:48 | FromDiscord | <Rika> this goes older |
17:12:48 | FromDiscord | <Rika> nimterop 0.1.0 |
17:12:53 | disruptek | jesus christ. |
17:12:58 | disruptek | i probably would have lost my house. |
17:13:58 | disruptek | you have to admit, cps has found some pretty cool bugs. |
17:14:55 | * | maier joined #nim |
17:14:58 | shashlick | Rika - what OS |
17:16:32 | FromDiscord | <Rika> does it not compile on? linux |
17:17:29 | * | NimBot joined #nim |
17:17:51 | disruptek | clyybber: it's probably an ident; i'll try that. |
17:18:20 | FromDiscord | <Rika> i mean its already installed |
17:19:53 | * | maier quit (Ping timeout: 246 seconds) |
17:19:53 | FromDiscord | <Rika> https://gist.github.com/de-odex/dd54eab785617da10ae87508c733f106 is the error on modern nimterop if you need it |
17:21:23 | shashlick | trying to install it on ubuntu in the first place |
17:25:30 | * | dddddd quit (Ping timeout: 260 seconds) |
17:27:34 | * | esthromeris quit (Ping timeout: 265 seconds) |
17:31:42 | disruptek | clyybber: this is bananas. |
17:31:59 | * | dddddd joined #nim |
17:34:59 | Zevv | disruptek: so, what's new |
17:35:16 | Zevv | how do I fix my iterator |
17:35:34 | Zevv | ooh line numbers |
17:35:35 | Zevv | spiffy |
17:35:36 | disruptek | trying to figure out if this is my bug or arc's. |
17:35:47 | disruptek | it's a bit of a mindfuck. |
17:35:51 | Zevv | ooh and you made the bootstrap |
17:36:04 | Zevv | dude this is super clean |
17:36:09 | Zevv | if only it worked |
17:36:22 | disruptek | look at those ix i posted. |
17:37:03 | Zevv | what's the symptoms |
17:37:28 | disruptek | well, it's seeping but worse than that, it itches like crazy. |
17:38:58 | Zevv | you're way beyond help, and you know it |
17:39:20 | disruptek | just looking for a topical preparation. |
17:40:34 | FromDiscord | <XxDiCaprioxX> How do I install SDL2.dll? |
17:40:43 | disruptek | i think a later rewrite is screwing up inject destructors. |
17:40:54 | Yardanico | @XxDiCaprioxX for windows? |
17:40:55 | Yardanico | you download it\ |
17:40:58 | Zevv | what does it do with normal GC then? |
17:41:08 | Yardanico | https://www.libsdl.org/download-2.0.php |
17:41:12 | Yardanico | see runtime binaries for windows here |
17:41:18 | FromDiscord | <XxDiCaprioxX> Well I downloaded it but what now? |
17:41:23 | Yardanico | idk? |
17:41:25 | Yardanico | what do you want? |
17:41:53 | FromDiscord | <XxDiCaprioxX> I'm using Nico which has SDL2.dll as a dependency |
17:42:13 | FromDiscord | <XxDiCaprioxX> And idk what to do with it after the download because it doesn't work yet |
17:42:16 | Yardanico | yes, you put it in any directory with PATH |
17:42:18 | Yardanico | in PATH* |
17:42:27 | Yardanico | simplest - put it in the same folder as the .exe |
17:42:48 | Zevv | disruptek: things don't compile for me now, how's that |
17:42:57 | FromDiscord | <XxDiCaprioxX> Okay |
17:43:01 | FromDiscord | <Clyybber> disruptek: pretty sure its an arc bug |
17:43:24 | disruptek | it's a rewrite that's occurring too early. |
17:43:28 | Zevv | ah ok |
17:43:38 | Zevv | but when not using --gc:arc, what happens? |
17:44:04 | FromDiscord | <Shucks> I hate that piece of code. Some fancy nim users could maybe tell me how I could simplify it: https://play.nim-lang.org/#ix=2sYL |
17:44:23 | disruptek | Zevv: looks like it works. |
17:44:26 | disruptek | outside of arc. |
17:44:27 | Yardanico | well, first of all - do you really need to simplify it? |
17:44:34 | Yardanico | you always can, but do you really need to? |
17:44:41 | Zevv | not for me, I get "Error: type mismatch: got <proc (result: var Iterator)> but expected 'proc (c: Iterator): Iterator' |
17:44:43 | FromDiscord | <Shucks> I don't. But it looks ugly ;D |
17:44:46 | Zevv | with your master on stash/iterator.nim |
17:44:48 | FromDiscord | <Shucks> not nimish |
17:45:50 | disruptek | performance runs for me. 0.73x faster, it says. for markAndSweep. |
17:46:00 | Zevv | all pushed? |
17:46:12 | disruptek | yeah |
17:46:19 | disruptek | iterator runs. |
17:46:24 | Zevv | fk me |
17:46:41 | Zevv | I'm at unmodified f0e76ce5bfde46672a6088889856535188b8699d |
17:46:50 | Zevv | wow look at that string of 8s |
17:46:57 | disruptek | just lucky, i guess. |
17:47:15 | Zevv | yeah but this is plain silly. Latest nim, cps master |
17:47:18 | Zevv | works for you not for me |
17:47:18 | Zevv | no way |
17:48:06 | disruptek | "latest"? |
17:48:19 | Zevv | pulled 3 secs ago |
17:48:28 | disruptek | git hash: d6161e7e9ea1f40ad734c6e811e8169fe24b5e9f |
17:48:38 | disruptek | i'm running 8/2 nightly |
17:48:59 | Zevv | moving to that hash |
17:49:05 | disruptek | oh wait |
17:49:10 | Zevv | nope |
17:49:13 | Zevv | liar |
17:49:14 | disruptek | --define:cpsMutant:off π |
17:49:21 | Zevv | ok |
17:49:55 | disruptek | clyybber: you know what's wrong? |
17:50:30 | FromDiscord | <Clyybber> I know whats wrong but not why lol |
17:51:07 | disruptek | we are doing arc rewrites too soon. |
17:51:18 | Zevv | disruptek: why is the repr so funny? "return Cont:" |
17:51:18 | FromDiscord | <Clyybber> don't think so |
17:51:34 | disruptek | Zevv: it's call with a statement list π€£ |
17:51:51 | FromDiscord | <Clyybber> its not funny, douche.. |
17:51:57 | disruptek | we rewrite it, then the rewrite gets rewritten to be broken. |
17:52:19 | disruptek | arc needs to rewrite the rewrite, instead. |
17:52:20 | FromDiscord | <Clyybber> yeah, but that doesn't make a whole lotta sense |
17:52:33 | FromDiscord | <Clyybber> how do you rewrite after arc if i kay ask |
17:52:40 | FromDiscord | <Clyybber> s/kaymay/ |
17:52:45 | FromDiscord | <Clyybber> dammit mobile shit |
17:53:07 | disruptek | well, what do you think it is? |
17:53:29 | FromDiscord | <Clyybber> lemme see |
17:54:20 | Zevv | "call with a statement list" |
17:54:21 | Zevv | TIL |
17:54:39 | Zevv | nim is so weird |
17:54:50 | disruptek | this is the basic feature that makes the language work. |
17:54:55 | Zevv | how do you make this stuff up. jus by accident, right? |
17:54:57 | disruptek | makes it lispy. |
17:55:13 | Zevv | you just point these knobs on this plank |
17:55:18 | Zevv | /pound/ |
17:55:23 | Zevv | and then this happens |
17:55:35 | Zevv | I bet it's not even in the manual |
17:55:49 | FromDiscord | <Clyybber> sure it is |
17:55:51 | disruptek | well, it is. |
17:55:53 | FromDiscord | <Clyybber> the grammar :p |
17:55:55 | Zevv | you make up random stuff, and then go complaining that it's Clyybbers fault |
17:55:59 | FromDiscord | <Clyybber> lol |
17:56:02 | disruptek | but anyway, you should already know this behavior from your macro expertise. |
17:56:22 | Zevv | I think I've seen it but didn't accept it |
17:56:32 | Zevv | I love it |
17:57:00 | FromDiscord | <Clyybber> how to repro? |
17:57:09 | FromDiscord | <Clyybber> just compile iwth mutant-mode off? |
17:57:17 | disruptek | both modes demo the problem. |
17:57:37 | FromDiscord | <Clyybber> whats the simplest test that demonstartes it? |
17:57:45 | disruptek | tblock.nim |
17:57:50 | disruptek | iirc, it's the first test. |
17:58:43 | Zevv | disruptek: while clyybber is hunting arc stuff, could we make tests/tzevv compile again? |
17:58:50 | Zevv | it's pretty basic stuff that should always work I think |
17:58:57 | disruptek | lemme look. |
17:59:14 | Zevv | let me isolate the culprit |
18:00:57 | disruptek | how is this even a thing. |
18:01:02 | Zevv | what is |
18:01:07 | disruptek | we have a hashset on the var name iirc. |
18:01:09 | * | Oddmonger had read Β«isolate the cultistΒ» |
18:01:29 | Zevv | that's what we do with cultists here |
18:04:01 | FromDiscord | <Clyybber> maybe its the result = Cont: ... result |
18:04:08 | FromDiscord | <Clyybber> but I don't think so |
18:04:56 | disruptek | at the time that code runs, it's comparing result to c, which is the lvalue in the eventqueue.trampoline |
18:05:14 | disruptek | that's why i say it's running too early. |
18:07:13 | Zevv | disruptek: http://ix.io/2sYX |
18:07:26 | FromDiscord | <Clyybber> sorry, gotta go |
18:07:33 | disruptek | kk |
18:07:42 | FromDiscord | <Clyybber> I'll look at it later perhaps (not sure cuz I have an exam tomorrow :p) |
18:07:45 | disruptek | Zevv: yeah, i'm looking at it. |
18:07:55 | disruptek | no biggie, thanks clyybber. |
18:07:56 | Zevv | Clyybber: we can grade you |
18:08:18 | disruptek | Zevv: it's telling that we're dumping duplicate templates. |
18:08:25 | Zevv | yeah it seems |
18:08:50 | disruptek | ah, it's because allPairs is cumulative. |
18:08:55 | disruptek | so dumb. |
18:17:11 | FromDiscord | <Elegant Beef> He says exam like he needs to take long, but it's just a urine exam |
18:17:36 | Yardanico | disruptek makes 100x better jokes :( |
18:17:39 | Zevv | for some people that might take some time |
18:17:41 | Yardanico | im sorry |
18:17:47 | FromDiscord | <Elegant Beef> It's ok |
18:17:57 | Yardanico | but this was kinda a strange jok |
18:18:09 | FromDiscord | <Elegant Beef> I understand, it's fine |
18:18:11 | Zevv | disruptek: fix one, run into the next |
18:18:29 | FromDiscord | <Elegant Beef> Yard i understand you dont want me here anymore, i get it you can just say it out loud |
18:18:35 | Yardanico | wat? |
18:18:49 | disruptek | Zevv: what's nuts is it /still/ produces a dupe. |
18:18:51 | FromDiscord | <Elegant Beef> More of my shitty humour |
18:18:56 | Yardanico | i just said that I kinda didn't like the joke lol |
18:24:23 | * | nikita` joined #nim |
18:36:27 | disruptek | Zevv: i'm dumb. we are probably eating our own tail. |
18:36:39 | * | tane joined #nim |
18:36:55 | Zevv | dog eat dog |
18:37:05 | disruptek | and me with milkbone underwear. |
18:37:09 | disruptek | story of my fucking life. |
18:37:37 | Zevv | I had to google that reference |
18:37:43 | disruptek | lol |
18:37:47 | disruptek | one of the greats. |
18:38:32 | disruptek | it's older than 20 years, which means you have no excuse. |
18:38:55 | disruptek | how's the world been treatin' ya, norm? |
18:39:02 | disruptek | -- like a baby treats a diaper. |
18:39:07 | Zevv | I'm not from the USA, rihght |
18:39:13 | disruptek | so? |
18:39:31 | Zevv | am I expected to know usa commercials? |
18:39:38 | disruptek | commercials? |
18:39:41 | Zevv | oh is it not |
18:39:43 | Zevv | what is it then |
18:39:44 | disruptek | we're talking about CHEERS, my dude. |
18:39:46 | Zevv | oh |
18:39:54 | Zevv | never liked that |
18:40:17 | disruptek | ah, one of the few examples of truly victimless television. |
18:40:30 | disruptek | there's no cast member that you don't have a soft spot for. |
18:40:32 | Zevv | and south park |
18:40:38 | disruptek | no character, i should say. |
18:40:47 | disruptek | star trek is another like that. |
18:40:52 | disruptek | and mst3k. |
18:41:00 | Zevv | star trek, yeah, I thin I remember that |
18:41:04 | Zevv | with the bald guy |
18:41:18 | Zevv | and the hot dame |
18:42:39 | disruptek | hot dame? |
18:42:43 | * | sschwarzer joined #nim |
18:42:44 | disruptek | now you've piqued my interest. |
18:42:57 | sschwarzer | Heya disruptek! :) |
18:43:02 | disruptek | sup dawg |
18:43:29 | * | al1ranger joined #nim |
18:44:44 | sschwarzer | Does anyone have an idea how I can suppress the `.out` suffix for an executable from `nim c` without specifying the full name after the `-o:` option? |
18:44:45 | Zevv | splashdown in 30 |
18:45:01 | Zevv | jebediah approve |
18:45:02 | Zevv | s |
18:45:04 | disruptek | bbiab it's beach weather in vermont. |
18:48:57 | Yardanico | sschwarzer: as I said in telegram, nim only does that if otherwise the binary would conflict with something else |
18:49:03 | Yardanico | e.g. if you have src/myfile.nim and src/myfile directory |
18:49:15 | Yardanico | then nim will put the binary in src/myfile.out instead of src/myfile |
18:49:16 | Zevv | https://github.com/disruptek/cps/pull/30 |
18:49:17 | disbot | β₯ generate installLocal template by template |
18:50:19 | * | al1ranger quit (Quit: Leaving) |
18:50:21 | * | esthromeris joined #nim |
18:50:38 | Zevv | more readable rewrite |
18:54:39 | * | esthromeris quit (Client Quit) |
19:15:49 | * | maier joined #nim |
19:20:25 | * | maier quit (Ping timeout: 240 seconds) |
19:20:56 | sschwarzer | Yardanico: It seems I hadn't checked Telegram between your answer on Telegram and my question here. ;) |
19:23:31 | sschwarzer | Yardanico: Makes sense. The binary from `nimble build` was created in the project root directory. When building with `nim c`, the binary was created in `src`, which has a subdirectory with the name of the binary without `.out`. |
19:23:35 | sschwarzer | Thanks |
19:25:54 | * | rockcavera quit (Ping timeout: 260 seconds) |
19:26:09 | Zevv | disruptek: say yes or no, or I'll merge it to master |
19:27:04 | sschwarzer | Zevv: sounds like a threat ;-) |
19:27:26 | Zevv | it is |
19:28:03 | disruptek | wut |
19:28:24 | Zevv | https://github.com/disruptek/cps/pull/30 |
19:28:26 | disbot | β₯ generate installLocal template by template |
19:28:43 | disruptek | i dunno, merge it if it's good. |
19:28:47 | disruptek | you don't need my permission. |
19:29:02 | Zevv | I do, if it messes up your open hart surgey |
19:29:04 | disruptek | what is it, even? |
19:29:11 | disruptek | nah, i need to learn git. |
19:29:26 | Zevv | you want some tips to make life easier? |
19:29:30 | Zevv | or you're figuring it out |
19:29:32 | disruptek | wait, is it wednesday? |
19:29:36 | disruptek | i need to brush my teeth. |
19:29:42 | Zevv | look at git config --global pull.rebase true |
19:29:48 | Zevv | and git config --global rebase.autoStash true |
19:30:14 | disruptek | yeah, that's a good idea. |
19:30:29 | Zevv | anyway, repr is cleaner now |
19:30:36 | disruptek | nice. |
19:30:58 | Zevv | how could performance be 0.79 times faster for you |
19:31:02 | Zevv | because its 1.8 for me |
19:31:09 | disruptek | mark and sweep, baby. |
19:31:37 | Zevv | but we're not allocing or freeing anything |
19:32:32 | disruptek | but now i have an extra commit. |
19:32:48 | disruptek | because i was dirty? |
19:32:52 | disruptek | pffbt. |
19:32:56 | Zevv | let me find some crayons |
19:32:58 | Zevv | and explain git to you |
19:33:07 | Zevv | use `tig` |
19:33:13 | Zevv | `tig` is like heaven |
19:33:19 | disruptek | i know. i use it. |
19:33:25 | Zevv | ok good |
19:33:35 | disruptek | i don't need the extra commit, though; i can --ff-only and elide it. |
19:33:49 | Zevv | or rebase --pull |
19:34:01 | Zevv | so you're non-pushed commit will go on top of mine |
19:34:16 | disruptek | oh my bad. |
19:34:16 | * | narimiran quit (Ping timeout: 246 seconds) |
19:34:21 | disruptek | it's because i merged it through the ui. |
19:34:27 | Zevv | whatever |
19:34:31 | disruptek | nevermind. everything is fine. |
19:34:36 | Zevv | right |
19:34:50 | Zevv | so, we have a blocking ARC bug now, right/ |
19:34:54 | disruptek | yeah. |
19:35:05 | Zevv | but we can continue using normal mark&sweep |
19:35:24 | disruptek | c'mon, we can't do this, right? |
19:35:40 | Zevv | do what |
19:35:42 | disruptek | this installLocal? |
19:35:45 | sschwarzer | I usually use the Git command line only. If a GUI uses different concepts, workflow etc., there's only more chances to mess things up. |
19:35:53 | Zevv | disruptek: why not |
19:36:11 | Zevv | it's the same as you had, but less noise? |
19:36:30 | disruptek | but we have another template just to reduce source noise? |
19:36:45 | Zevv | move it out later. I want my rewritten source lean & mean for now |
19:36:48 | disruptek | you pay that penalty with every future compile. |
19:37:04 | disruptek | okay, when it? |
19:37:24 | disruptek | make it dependent upon -d:release |
19:37:26 | Zevv | I don't care. But we're constantly looking at these reprs, and these in-line templates take 3 lines instead of one |
19:37:37 | disruptek | ^ |
19:37:41 | Zevv | nah dude, premature optimization. How much does this cost |
19:37:43 | Zevv | nothing |
19:37:53 | disruptek | as far as you know. |
19:38:02 | disruptek | i'd like to point out that we are currently blocked by a template bug. |
19:38:24 | Zevv | ok, reverting it |
19:39:30 | FromDiscord | <haxscramper> If I have `{.requiresinit.}` field in my type `mapIt` (or any template like that) fails to compile. I looked into the source code - compilation error appears because `mapIt` injects variable without initialization to get type of the expression - it is not possible to do so for `{.requiresinit.}`. I can use `typeof((var tPtr: ref Test; let it = tPtr[]; it))` to get type for the expression - is there any nicer way to do something like |
19:39:38 | Zevv | were you able to find out why this latest "undeclared field" with missing vars in the env is happening? |
19:41:33 | disruptek | please put it into a release when so we can test it, at least. |
19:41:47 | disruptek | ie. we'll use templates for readability in repr. |
19:41:53 | FromDiscord | <Yardanico> @haxscramper to get the type of the expression ? |
19:42:03 | disruptek | i just got back from the beach. |
19:42:20 | FromDiscord | <Yardanico> can't you just simplify your typeof to typeof(Test()) |
19:42:22 | disruptek | it looks like it's not writing out the last type change. |
19:42:29 | FromDiscord | <Yardanico> or just Test lol |
19:42:46 | Zevv | disruptek: you want the template thingy under flag? |
19:42:58 | disruptek | isn't this buggy, though? we should we giving `a` a new name? |
19:43:12 | disruptek | i think your idea of seeing templates instead of noise is a good one. |
19:43:28 | disruptek | i just want to make sure we can confirm in testing that it matches the raw ast we build "by hand". |
19:43:43 | disruptek | as the raw ast should be preferred for release builds. |
19:44:26 | Zevv | so, under what 'when' do I put it then? |
19:44:40 | disruptek | when not defined(release): |
19:44:58 | Zevv | ah right |
19:45:16 | disruptek | it'll run the light version only in travis. |
19:45:27 | disruptek | and performance, i guess. |
19:45:47 | disruptek | but the --d:danger doesn't work in nim.cfg, stupidly. |
19:45:49 | FromDiscord | <haxscramper> > can't you just simplify your typeof to typeof(Test())β΅@Yardanico I have something like this: https://play.nim-lang.org/#ix=2sZn and it fails to compile because of https://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/collections/sequtils.nim#L920 |
19:46:06 | FromDiscord | <Zachary Carter> gotta be getting close to being able to draw something... https://gist.github.com/zacharycarter/b1ebd711765c676e4af824f00e57afef |
19:46:08 | Yardanico | yeah, I understand why |
19:46:46 | disruptek | zachary: you realize you're going to be the architect of the best game engine available for nim, right? |
19:46:57 | FromDiscord | <haxscramper> There is a workaround but it is just /ugly/ and I'm just wondering if I'm doing something wrong in the first place |
19:46:58 | disruptek | gonna take some work on your part. |
19:47:13 | Yardanico | @haxscramper well requiresInit isn't used often so there are things like that |
19:47:27 | FromDiscord | <Zachary Carter> disruptek: would be cool, but yeah lots of work |
19:47:38 | Zevv | Zachary Carter: Is that all vulkan boilerplate? |
19:48:09 | FromDiscord | <Zachary Carter> Zevv: well it's setting up the vulkan instance, device & physical device, swapchain, etc... |
19:48:16 | FromDiscord | <Zachary Carter> you only have to do most of this once which is good |
19:48:29 | Zevv | agony |
19:48:31 | FromDiscord | <Zachary Carter> but I think this is really rock solid - I have vulkan memory allocator working |
19:48:47 | Zevv | OpenGL 1.0 is calling, asking where his lights went |
19:48:49 | FromDiscord | <Zachary Carter> and volk - which is a vulkan meta loader that will load function pointers directly from the driver |
19:48:53 | FromDiscord | <Zachary Carter> heh |
19:49:02 | FromDiscord | <Zachary Carter> it's painful for sure - but once I've done it, I've done it |
19:49:10 | FromDiscord | <Zachary Carter> and the vulkan memory allocator solves arguably the toughest part of using vulkan |
19:49:11 | Zevv | and I won't have to do it |
19:49:18 | FromDiscord | <Zachary Carter> yup! you'll just have to use my stuff |
19:49:19 | disruptek | looks fairly idiomatic. |
19:49:40 | FromDiscord | <Zachary Carter> I hope I'm writing failry idiomatic Nim at this point |
19:49:47 | FromDiscord | <Zachary Carter> been writing Nim for like 4 years now |
19:50:09 | disruptek | well it's not perfect, says the 1.5y old-timer. |
19:50:47 | Zevv | it needs some CPS transformation, I think |
19:51:14 | Zevv | and you could use some 'with' |
19:51:24 | disruptek | looks better, zevv. installLocal(). |
19:51:57 | Zevv | that's what she said |
19:52:03 | Zevv | zachary: http://ix.io/2sZs |
19:52:03 | disruptek | lol. we could probably even make it a macro. |
19:52:18 | disruptek | that really is funny. |
19:52:40 | Zevv | but you propbably want to go sprinkle these installLocals at the place where they're needed |
19:52:47 | disruptek | where is that? |
19:52:49 | Zevv | fine for now, but one time we will declare stuff too early |
19:52:50 | disruptek | netherlands? |
19:53:07 | disruptek | nether-regions, i mean? |
19:53:34 | FromDiscord | <Zachary Carter> what is `with`? |
19:53:46 | disruptek | it's an alias for `wit` in philly. |
19:53:55 | disruptek | does that help? |
19:53:55 | Yardanico | @Zachary in sugar |
19:54:08 | Yardanico | ah sorry wrong |
19:54:18 | disruptek | no, it's zevv's. |
19:54:24 | Zevv | I wrote it once and never ever used it |
19:54:28 | disruptek | you guys need to get out more. |
19:54:42 | Zevv | but if you don't mind pulling in a dependency, it might help you with less repetition |
19:54:51 | Yardanico | improve nim's with instead :) |
19:54:59 | disruptek | probably the lightest dep you'll ever have. |
19:54:59 | Zevv | just pull zevv with into sugar |
19:55:08 | disruptek | it should go into fusion. |
19:55:12 | Yardanico | PR it |
19:55:16 | disruptek | of course, that's probably the last place it will go. |
19:55:23 | disruptek | no, i don't support fusion, as you well know. |
19:55:24 | Zevv | I don't care. I wrote it once, and PMunch rewrote 100% of it |
19:55:33 | Zevv | it is 0% mine now |
19:55:51 | disruptek | nuts.com doesn't sell what i expected. |
19:55:56 | Yardanico | disruptek: you don't support nimble either for what I know :) |
19:56:05 | disruptek | no, i think it's stupid. |
19:56:13 | Yardanico | but you gotta compromise |
19:56:20 | Yardanico | you still create .nimble files for your projects |
19:56:21 | Zevv | disruptek doesn't compromise |
19:56:21 | disruptek | assholes aren't known to do so. |
19:56:22 | sschwarzer | disruptek: why stupid? |
19:56:30 | Zevv | ooh please don't |
19:56:34 | disruptek | lol |
19:56:43 | sschwarzer | Zevv: Ok, I didn't ask!!! ;) |
19:56:47 | Yardanico | disruptek: write an article pls |
19:56:51 | disruptek | i've written my thoughts pretty precisely here: |
19:56:52 | disruptek | !repo nimph |
19:56:53 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future π§ 15 69β 5π΄ 7& 1 more... |
19:56:56 | Zevv | nimble has too few shiny dingbats and emoticons |
19:57:02 | disruptek | there's a certain logic to my argument, you might say. |
19:57:05 | sschwarzer | Zevv: *lol* |
19:57:20 | Yardanico | well shashlick fixed quite a lot of stuff for nimble already |
19:57:33 | disruptek | that's true. |
19:57:45 | disruptek | the amount of time invested into nimble is surely staggering. |
19:57:55 | Yardanico | as in for any default PM for a language |
19:58:17 | Zevv | Ha! "the last result is the best" |
19:58:19 | disruptek | my ambition is my downfall. |
19:58:19 | Zevv | I am *so* flattered |
19:59:18 | Zevv | disruptek: what's next, cps wise |
19:59:29 | Zevv | i |
19:59:39 | Zevv | 'd like to get my tcp server running again |
19:59:44 | disruptek | i guess i need to find this extra template or whatever. |
20:00:05 | sschwarzer | disruptek: Is nimph tied to Git exclusively or does it also support Mercurial-hosted packages? |
20:00:19 | disruptek | it's exclusively git. |
20:00:29 | Yardanico | sschwarzer: mercurial is disappearing anyway really |
20:00:34 | Yardanico | even bitbucket will stop supporting it soon |
20:00:38 | Zevv | disruptek: I forgot it. It is pushed now |
20:00:46 | disruptek | last i counter, only 1% of all nim packages were merc. |
20:00:52 | Yardanico | probably less |
20:01:16 | Yardanico | more like 0.1% |
20:01:22 | Yardanico | just checked |
20:01:49 | Yardanico | and all of them are hosted on bitbucket which will stop supporting mercurial soon |
20:01:49 | disruptek | oh you fixed it? |
20:02:00 | Zevv | yeah I reverted half and then put the wrong half back in |
20:02:08 | disruptek | oh, nice. |
20:02:10 | disruptek | that's awesome. |
20:02:12 | sschwarzer | Yardanico: I don't agree. There are still big users, there are frequent releases with new features and it doesn't seem it's going away anytime soon. That said, I totally understand the impression. |
20:02:26 | Yardanico | sschwarzer: Git has much more big users anyway :P |
20:02:31 | Zevv | disruptek: so, what is needed to fix this last bug with the undeclared fields" |
20:02:36 | Yardanico | and I don't see mercurial be used in open source at all nowadays |
20:02:37 | Zevv | I think if that is fixed the http server runs again |
20:02:41 | disruptek | choosing one makes the problem we're trying to solve much easier. |
20:03:20 | disruptek | it's a decision motivated by a practical understanding of the problem as opposed to political correctness or ambivalence towards the user. |
20:03:32 | Zevv | so much words |
20:03:43 | disruptek | church, motherfuckers. |
20:05:00 | disruptek | Zevv: so what do i do? |
20:05:15 | disruptek | i mean, what is your repro? |
20:05:23 | Zevv | http://ix.io/2sYX |
20:05:51 | sschwarzer | Yardanico: Mozilla and OpenJDK come to mind. And it's heavily used at Facebook internally. (I can't guarantee the latter, since I don't work there, but in the past there were major contributions to Mercurial from Facebook.) Btw, don't get me wrong, I totally understand it doesn't seem to be practical to support it, but for me personally, it's much nicer to work with (despite working more with Git than |
20:05:57 | sschwarzer | with Mercurial because of clients' infrastructure) |
20:06:16 | Yardanico | you can ask @dom96 about mercurial at facebook :) |
20:06:17 | disruptek | oh this demonstrates that it's not fixed. π’ |
20:07:48 | Yardanico | and there are always tools which can be written to simplify Git |
20:08:01 | sschwarzer | There _are_ Mercurial hosting options, but of course, on the Git side, Github and Gitlab dominate everything. |
20:08:03 | Yardanico | without requiring people to switch to an entirely other VCS just because it's easier to learn or has easier commands :) |
20:08:39 | sschwarzer | Yardanico: I don't require anyone to switch. :-) |
20:10:50 | sschwarzer | Yardanico: I get along with Git fine, most of the time. But sometimes things get messed up, and I have some doubts that simpler tools will help then. And "can be written" isn't so helpful. I mean, Mercurial at least exists and works fine. ;) |
20:11:43 | disruptek | Zevv: i need to take out double returns after this. π€£ |
20:11:56 | sschwarzer | I think the main problem with Git is that it leaks _far_ too many implementation details into the user interface. |
20:11:59 | disruptek | they really are ridiculous. |
20:12:36 | FromGitter | <awr1> i thought facebook used p4? |
20:13:25 | FromGitter | <awr1> or maybe that was google |
20:13:45 | sschwarzer | awr1: no idea. Maybe they did, or different parts of Facebook use different tools. Obviously, public code from Facebook uses Git. |
20:14:51 | sschwarzer | Regarding the implementation details leaking, it's like requiring Libreoffice users to know the internal class hierarchy to work with the program. (Ok, I exaggerate a bit, but you get the idea. ;-) ) |
20:17:59 | disruptek | Zevv: ah, i see what's happening. we encounter the first `var a = ...` in a fn() that we've already continued to. |
20:19:42 | Zevv | heey both cps.nim and cps/environment.nim are exactly 663 lines long! |
20:19:54 | Zevv | what are the chances! |
20:20:06 | Zevv | something birthday paradox something |
20:20:10 | disruptek | guess i cannot commit this. |
20:20:35 | disruptek | i think we just have to start a new repository. |
20:20:36 | Zevv | I'll just print the hash and hang it in the wall, so I can go back and admire this later |
20:20:43 | disruptek | lol |
20:20:44 | Zevv | commit away |
20:20:49 | FromDiscord | <dom96> FWIW I prefer Mercurial over Git |
20:21:02 | FromDiscord | <dom96> What are we arguing over here though? |
20:21:04 | FromDiscord | <Clyybber> disruptek, Zevv: ayy |
20:21:11 | FromDiscord | <Clyybber> figured out the cause? |
20:21:11 | FromDiscord | <dom96> Nimble supports Mercurial just fine IIRC |
20:21:14 | Zevv | Clybber: Whazaaap |
20:22:03 | Zevv | the cause of what? |
20:22:07 | Zevv | we have *so* many problems |
20:22:17 | FromDiscord | <Clyybber> the stupid sink |
20:22:28 | Zevv | oh no, we just abandoned ARC |
20:22:29 | Zevv | it's broken |
20:22:34 | FromDiscord | <Clyybber> :{ |
20:22:42 | FromDiscord | <Clyybber> :D |
20:22:47 | Zevv | I found this other mode |
20:22:50 | Zevv | it's called mark-and-sweep |
20:22:51 | sschwarzer | dom96: yeah! :-) |
20:22:52 | Zevv | it's amazin |
20:22:58 | disruptek | do we lift locals ahead of cps calls? |
20:23:06 | FromDiscord | <Clyybber> more like sarc and weep |
20:23:15 | Zevv | hehe |
20:23:21 | sschwarzer | dom96: we came to the topic because Nimph doesn't support Mercurial |
20:23:43 | sschwarzer | I had only asked if it supports Mercurial |
20:23:53 | sschwarzer | +1 for Mercurial from me :) |
20:24:13 | FromDiscord | <dom96> I see. It really doesn't take much to support. |
20:24:21 | disruptek | as there are no mercurial users who publish software in merc in our community, it is, as i said, not a problem. |
20:24:26 | FromDiscord | <dom96> But you should use Nimble anyway π |
20:24:40 | FromGitter | <awr1> Mercurial is arguably better designed than Git |
20:24:50 | FromGitter | <awr1> But Git won the popularity contest |
20:24:53 | FromDiscord | <dom96> I also prefer Phabricator to GitHub a lot |
20:25:13 | disruptek | dom96: your heart is as black as night. |
20:25:13 | sschwarzer | disruptek: all my repos are in Mercurial, and sooner or later there will be something from me in Nimle, I suppose :-) |
20:25:22 | FromDiscord | <dom96> Too bad it's all about those stargazers |
20:25:33 | * | Trustable quit (Remote host closed the connection) |
20:25:52 | disruptek | sschwarzer: bring it. |
20:25:56 | FromDiscord | <dom96> disruptek: maybe maybe maybe |
20:26:03 | disruptek | but, if your software is in merc, i won't use it. |
20:26:10 | FromDiscord | <Clyybber> git is actually designed well, its just the cli thats very messy/inconsistent |
20:26:32 | disruptek | it doesn't matter either way. |
20:27:02 | FromDiscord | <dom96> I've been toying with the idea of creating a `hg`-like CLI over `git` |
20:27:03 | sschwarzer | Clyybber: as I said, the design may be fine, but it exposes too much of the design in the UI (IMHO). |
20:27:09 | FromDiscord | <dom96> I bet something like this already exists though |
20:27:13 | disruptek | there are design advantages to not wasting effort on support of a feature only 1% of users use. |
20:27:51 | sschwarzer | dom96: Have you looked at hg-git, https://hg-git.github.io/ ? |
20:27:51 | disruptek | but, feel free to argue that nimble is better designed than nimph. |
20:27:58 | disruptek | that's an argument i would honestly love to have. |
20:28:32 | FromDiscord | <dom96> sschwarzer: nope, haven't looked into this at all yet though π |
20:28:59 | disruptek | holy shit, when did MONOVISION come out? |
20:29:19 | sschwarzer | dom96: it's kind of a bridge, so you can use a Git repo via a Mercurial repo. That may even be an option for disruptek, if he only sees the Git repo. ;-) |
20:30:26 | sschwarzer | dom96: hg-git exists since many years and it would be a pity to spend lots of time to reinvent the wheel. |
20:30:46 | disruptek | sschwarzer: what's your github username? |
20:30:55 | sschwarzer | disruptek: sschwarzer |
20:30:55 | FromDiscord | <Recruit_main707> about my problem with compiling to 32bit, should i open a thread on the forums for help? or in github directly? |
20:31:12 | sschwarzer | disruptek: why do you ask? |
20:31:35 | disruptek | i want to see if i can use your stuff after you've written it. |
20:31:57 | FromDiscord | <dom96> If we create hghub do you think github would sue us? :p |
20:32:07 | FromGitter | <awr1> i'm not a huge fan of P4. Artists/Designers find it relatively simple (b/c of the UI) if you're working on a gamedev project but i find it annoying to deal with from a programmer perspective |
20:33:32 | sschwarzer | disruptek: at the moment I've hosted a few things at Sourcehut, https://hg.sr.ht/~sschwarzer/ . So far, there's nothing I'd say is "production-ready" though. That said, I like mostly how https://hg.sr.ht/~sschwarzer/vppdiff and https://hg.sr.ht/~sschwarzer/todoreport are going. |
20:33:33 | disruptek | what the hell are you talking about? |
20:33:37 | FromGitter | <awr1> Git's impl seems very messy. Mix of C and bash script and perl? |
20:33:45 | disruptek | what is p4? |
20:33:47 | FromGitter | <awr1> perforce |
20:33:57 | disruptek | i've heard of it. |
20:34:18 | shashlick | @Rika - your ImageMagick wrapper is almost ready, needs some nimterop changes |
20:34:19 | FromGitter | <awr1> it's like subversion in that it's centralized |
20:34:30 | sschwarzer | dom96: There's Heptapod, a fork of Gitlab CE with Mercurial support: https://heptapod.net/ |
20:34:39 | disruptek | sschwarzer: isn't that git? nimph supports that. |
20:34:54 | disruptek | so you are telling me i should support merc, and you like it, and your nim software is in git. |
20:34:56 | sschwarzer | Sourcehut supports both Git and Mercurial |
20:34:57 | disruptek | is that right? |
20:35:03 | disruptek | at the same time? |
20:35:10 | sschwarzer | My repos so far are Mercurial |
20:35:20 | disruptek | oh. |
20:35:29 | * | nikita` quit (Quit: leaving) |
20:35:31 | disruptek | i see. sorry; i didn't realize. |
20:35:52 | disruptek | i know nimph works with sr.ht. |
20:35:57 | sschwarzer | disruptek: yes, see https://man.sr.ht/git.sr.ht/ and https://man.sr.ht/hg.sr.ht/ |
20:36:02 | disruptek | i guess it's git.sr.ht. |
20:36:21 | sschwarzer | There's both git.sr.ht and hg.sr.ht |
20:36:30 | disruptek | i get that now. that's kinda cool. |
20:36:44 | sschwarzer | disruptek: it is! :-) |
20:36:55 | Zevv | all these strong opinions. I really don't care. I used CVS, SVN, P4, Git, Mercurial. It all works, it's all crappy, but it all does the job if you have small repos with a few people |
20:37:07 | Zevv | disruptek: just go fix that shit |
20:37:23 | Zevv | so I can update the test suites tomorrow and continue working on the stash/ pool of working things |
20:37:36 | sschwarzer | Zevv: I just prefer Mercurial, I'm not religious about it. :) |
20:37:41 | disruptek | okay, zevv. |
20:37:46 | Zevv | good good! |
20:38:43 | sschwarzer | I also have no problems adapting to coding standards or design approaches that are idiomatic for different languages. :) |
20:38:45 | Zevv | disruptek: what's your take on the current test suites. is all that supposed to work right now? |
20:39:17 | disruptek | i don't know how solid the Scopes stuff is. |
20:39:27 | Zevv | ok, I'll go through it |
20:39:42 | disruptek | that'll be a lot easier once this works. |
20:40:02 | Zevv | yeah. My goal is to get tzevv 100% running and extend from there |
20:40:13 | disruptek | ahh, okay. |
20:40:18 | Zevv | all these tests are standalone, not event queues or other stuff |
20:40:36 | disruptek | should they work? |
20:40:54 | Zevv | I think they should, some had c gen errors which might have been fixed now |
20:41:01 | Zevv | give me a minute, I'll see which ones compile now |
20:41:08 | Zevv | but some are broken becuase of the stuff you're looking into now |
20:41:14 | disruptek | Error: system module needs: nimGCvisit |
20:44:05 | Zevv | disruptek: all tests in tzevv.nim now compile, but some still fail |
20:44:26 | disruptek | hmm, not for me. |
20:44:31 | Zevv | just pushed 3 secs ago |
20:44:40 | Zevv | pullem |
20:45:50 | disruptek | ah, neat. |
20:46:26 | disruptek | why are we skipping these other two? |
20:46:45 | Zevv | undeclared field: 'a17' for type |
20:47:00 | FromDiscord | <Ricky Spanish> can you build a dll with nim and export the c functions to interop into another language easily? |
20:47:14 | FromDiscord | <Ricky Spanish> i,e can i declspec |
20:49:20 | Zevv | ZZzZzz |
20:49:22 | sschwarzer | Bye for now :) |
20:49:27 | disruptek | g'nite zevv |
20:49:44 | * | vicfred_ quit (Quit: Leaving) |
20:50:03 | * | sschwarzer quit (Quit: leaving) |
20:51:13 | disruptek | btw, nimph is 1.0.0. |
20:55:46 | disruptek | this templating is stupid. we should just replace all the symbols. |
20:56:00 | disruptek | it's too annoying and brittle. |
20:56:21 | disruptek | seems like it's blowing arc's mind, too. |
21:00:15 | FromDiscord | <Yardanico> @Ricky Spanish yes, you can |
21:00:53 | FromDiscord | <Yardanico> Check https://github.com/Yardanico/nim-snippets/tree/master/clib for a simple example |
21:01:50 | FromDiscord | <Yardanico> Basically --app:lib and mark all procedures which need to be exported as {.exportc, dynlib.} |
21:04:53 | FromDiscord | <Ricky Spanish> ah decent thanks for the info @Yardanico |
21:08:20 | FromDiscord | <Yardanico> You should also not forget to always use C-compatible types |
21:08:33 | FromDiscord | <Yardanico> E.g. cstring, cint, cdouble, etc |
21:08:53 | FromDiscord | <Yardanico> And inside your procs you can always convert back to native Nim types |
21:09:04 | FromDiscord | <Zachary Carter> the only c type I ever use is `cstring` |
21:09:09 | FromDiscord | <exelotl> that's a really handy example, thx |
21:09:12 | FromDiscord | <Zachary Carter> otherwise I use `int32, float32, float64` etc... |
21:09:15 | FromDiscord | <Yardanico> Well, it's really recommended |
21:09:27 | FromDiscord | <Zachary Carter> well the `c` types are just aliases to those types |
21:09:39 | FromDiscord | <Zachary Carter> and I don't think in terms of - oh I want this c type |
21:09:46 | FromDiscord | <Zachary Carter> I think of I want a 32 bit floating point value |
21:09:51 | FromDiscord | <Zachary Carter> or a 32 bit unsigned integer value |
21:09:55 | disruptek | agree; if your semantics don't match up, you have bigger problems. |
21:13:38 | FromDiscord | <Zachary Carter> oh I'll also use `csize_t` because it's obvious that it's equivalent to `size_t` |
21:14:04 | disruptek | MARRY ME, ARCHIE |
21:14:07 | FromDiscord | <Zachary Carter> lol |
21:14:15 | disruptek | ARCHIE, MARRY ME |
21:15:49 | FromDiscord | <Rika> shashlick: I apologize for the extra work you had to do to get this working |
21:16:35 | FromDiscord | <Zachary Carter> https://www.youtube.com/watch?v=WGRhaFx1Zpw ? |
21:16:47 | * | maier joined #nim |
21:17:00 | FromDiscord | <Zachary Carter> My fiance knew the band - I hadn't heard of them before |
21:17:05 | FromDiscord | <Zachary Carter> I like it though |
21:17:11 | disruptek | oh really? |
21:17:18 | disruptek | it's old iirc. |
21:17:45 | disruptek | 2013. i dunno, maybe that's not old anymore. |
21:17:51 | FromDiscord | <Zachary Carter> yeah says 2014 |
21:18:00 | disruptek | i have a feeling 2020 will recalibrate "old." |
21:18:03 | FromDiscord | <Zachary Carter> we're old |
21:18:03 | * | vicfred joined #nim |
21:18:07 | FromDiscord | <Zachary Carter> heh |
21:18:30 | FromDiscord | <Zachary Carter> I wonder how much the median age of the US has already changed |
21:19:18 | disruptek | i dunno, it's pretty frustrating knowing your parents only have a few more months, at best. |
21:19:20 | FromDiscord | <Zachary Carter> was 38.2 in 2018 |
21:19:27 | FromDiscord | <Zachary Carter> π¦ |
21:20:18 | FromDiscord | <Zachary Carter> yeah, not sure how I'd handle that - my fiance lost both her parents already and we're only 35 |
21:20:29 | disruptek | bad. |
21:20:50 | disruptek | i've been harvesting their dna for years, though. |
21:20:56 | FromDiscord | <Zachary Carter> good move |
21:21:03 | FromDiscord | <Zachary Carter> can clone them |
21:21:06 | disruptek | least i could do. |
21:21:43 | * | maier quit (Ping timeout: 246 seconds) |
21:22:05 | FromDiscord | <Zachary Carter> just freeze their brains in liquid nitrogen |
21:22:17 | FromDiscord | <Zachary Carter> can get new bodies |
21:23:31 | FromDiscord | <Zachary Carter> only 28,000 + a 1,250 one time membership charge |
21:23:39 | FromDiscord | <Zachary Carter> (edit) '28,000' => '$28,000' | '1,250' => '$1,250' |
21:23:46 | FromDiscord | <Zachary Carter> shit - I might join |
21:24:06 | FromDiscord | <Zachary Carter> I think when they first launched it was like 200k |
21:24:16 | FromDiscord | <Zachary Carter> I bet their doing gangbusters with Covid |
21:24:25 | FromDiscord | <Zachary Carter> (edit) 'their' => 'they're' |
21:24:34 | FromDiscord | <Zachary Carter> we're in the wrong industry |
21:31:00 | FromDiscord | <exelotl> I heard the other day that `int` and `int32_t` in C aren't necessarily interchangeable because, on 32 platforms, `int32_t` is actually `long` |
21:31:15 | FromDiscord | <exelotl> and this can somehow cause subtle problems? |
21:34:27 | * | Jesin quit (Quit: Leaving) |
21:37:02 | * | Jesin joined #nim |
21:44:10 | shashlick | @Rika no worries, found some bugs so was worth it, might need to tomorrow to update nimterop |
21:44:28 | shashlick | Will also create a PR in the repo by zedeus |
21:44:49 | disruptek | thanks, shashlick. |
21:44:52 | disruptek | you are the man. |
21:52:33 | FromDiscord | <Zachary Carter> @exelotl - `int32_t` comes from the header `stdint.h` and means a 32 bit integer |
21:53:02 | FromDiscord | <Zachary Carter> however `int32_t` isn't guaranteed to be present in all implementations on C |
21:53:44 | FromDiscord | <Zachary Carter> `int` doesn't have a specified size but it's guaranteed to be `>=` to 16 bits |
21:54:08 | FromDiscord | <Zachary Carter> `int` is present in every implementation of C |
21:54:46 | FromDiscord | <Zachary Carter> so basically don't use `int` if you rely on the value being a specified size |
21:54:55 | FromDiscord | <Zachary Carter> if you don't care - then just use `int` |
21:55:41 | FromDiscord | <Zachary Carter> most decent C libraries define their own types aliasing `int32_t` etc |
21:57:49 | FromDiscord | <exelotl> in particular this was with regards to the wii/gamecube homebrew toolchains, I'm not so sure about the exact issues, but at some point the maintainer switched their `u32`/`s32` typedefs from being aliases for `unsigned int`/`int` to being aliases for `uint32_t`/`int32_t` |
21:58:05 | * | solitudesf quit (Ping timeout: 240 seconds) |
21:58:12 | FromDiscord | <exelotl> and this somehow actually broke things for people :\ |
21:59:42 | disruptek | clyybber: nice job, prototypes look good now. π |
21:59:44 | * | tane quit (Quit: Leaving) |
22:00:20 | FromDiscord | <exelotl> (note: the toolchains use a recent GCC, and stdint.h is available) |
22:16:37 | FromDiscord | <Zachary Carter> well yeah that makse sense |
22:16:44 | FromDiscord | <Zachary Carter> (edit) 'makse' => 'makes' |
22:17:03 | FromDiscord | <Zachary Carter> but it was their fault in the first place for using `unsigned int / int` when they needed a specific sized integral value |
22:34:39 | * | vsantana joined #nim |
22:35:22 | * | vsantana quit (Client Quit) |
22:38:10 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
23:01:41 | * | oriba joined #nim |
23:01:49 | * | oriba quit (Client Quit) |
23:02:10 | * | oriba joined #nim |
23:04:59 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
23:09:43 | * | oriba quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
23:14:35 | * | Guest59087 quit (Read error: Connection reset by peer) |
23:17:35 | * | maier joined #nim |
23:18:35 | * | dadada joined #nim |
23:18:59 | * | dadada is now known as Guest8511 |
23:18:59 | ForumUpdaterBot | New thread by Mrgaturus: NPainter: semi-gpu accelerated digital painting software, see https://forum.nim-lang.org/t/6634 |
23:22:46 | * | maier quit (Ping timeout: 256 seconds) |
23:36:54 | FromDiscord | <exelotl> @Zachary Carter I suspect stdint.h wasn't available when the libraries were first written, but still I don't understand how this could break things, when the target platform was known (and therefore the size of `unsigned int`/`int` was known to be correct before they switched to using stdint) |
23:55:56 | * | krux02_ joined #nim |
23:57:21 | FromDiscord | <Varriount> All I know about the Gamecube architecture is that it's quite complex to emulate on traditional PC hardware. |
23:59:50 | * | krux02 quit (Ping timeout: 260 seconds) |