<< 02-08-2020 >>

00:00:01*junland quit (Quit: %ZNC Disconnected%)
00:00:14FromGitter<binhonglee> Ubuntu. I did have clang installed for macosx compilation
00:00:27*krux02 quit (Ping timeout: 240 seconds)
00:01:33FromGitter<binhonglee> Seems like a library that `httpClient` uses is missing but everything else works fine.
00:01:44*junland joined #nim
00:02:10FromGitter<binhonglee> *to clarify, I'm using WSL2 Ubuntu 18.04 LTS
00:02:45FromDiscord<Ricky Spanish> is there a roadmap for vim so people can contributed?
00:03:08FromDiscord<Elegant Beef> You mean Nim?
00:03:15FromDiscord<Ricky Spanish> woops yeh, bad habbits
00:03:59FromDiscord<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:31FromDiscord<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:28FromDiscord<Ricky Spanish> ah ok ill take a look over, thanks @Varriount and @Elegant Beef
00:06:05FromDiscord<Elegant Beef> Oh shit you're also in the GDL discord(Yes i was checking for that, dont worry)
00:06:36disruptekvarriount: you can't go up but you can always go down.
00:06:48disruptekinstead of lifting something, just bury everything else.
00:06:48FromDiscord<Elegant Beef> There is actualy a suprising number of GDL discord users here
00:07:16FromDiscord<Elegant Beef> Oh i thought disruptek was going to say "When you think you hit rock bottom, get the pickaxe"
00:07:36FromDiscord<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:17disrupteki 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:43FromDiscord<Elegant Beef> And i just use libraries and then give up shortly after using them
00:08:49FromDiscord<Elegant Beef> In my good persistant development attitude
00:09:08FromDiscord<Varriount> disruptek: But is there a technical reason? Why can't a macro access data above/ahead of it?
00:09:36disruptekthat way lies madness.
00:10:01disruptek/technically/ you could simply read the file you find yourself in, and then find yourself.
00:10:23disruptekbut as i mentioned to chapl, this is /compositional/ suicide.
00:10:23FromDiscord<Varriount> Some would say implementing an async system via macros is madness too.
00:10:44disrupteknot really.
00:10:57disruptekthis language has legs.
00:11:09disrupteki don't really think we've begun to see what it's capable of, honestly.
00:11:11FromDiscord<Varriount> Why is it compositional suicide?
00:11:33disruptekbecause it means that you can never make any assumptions about the state of literally anything.
00:11:44disruptekit can always be rewritten by anything above or below it.
00:12:00disruptekwhat does any of it mean? who knows. are you done semchecking it? who knows.
00:12:07FromDiscord<Varriount> You can make assumptions on the state of things that are already processed.
00:12:13disruptekhow do you figure?
00:12:40disruptekwhat is processed may be processed again. and again and again and again.
00:12:41FromGitter<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:44FromDiscord<Varriount> I'm talking about macros being able to access the AST that hasn't been processed yet.
00:14:07FromDiscord<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:02FromDiscord<Elegant Beef> Yea i was looking for something similar for making getter/setters
00:15:23disruptekthat's not an adjacent insertion, because you have to go up and then over.
00:15:25FromDiscord<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:59FromDiscord<Varriount> But it's adjacent to the macro's ancestor.
00:16:20disruptekso what? do you let people insert aunts and uncles?
00:17:00FromDiscord<Varriount> When my cousins get married, sure.
00:17:14disruptekare you in VA or are you in WV?
00:17:54FromDiscord<Varriount> Let me rephrase that. when my cousins get maried to peeople outside the family.
00:18:07disrupteklol
00:18:22FromDiscord<Elegant Beef> Cmon disruptek it's alabama that family trees are more akin to bamboo shoots
00:18:33disruptekwell, i'm glad our ast doesn't look like varriount's family.
00:20:37FromDiscord<Varriount> But what I'm hearing is that the only problem with the idea is philosophical.
00:20:52disrupteki don't know.
00:21:30FromDiscord<Elegant Beef> Correct me if im wrong but isnt this just about generating procedures from within a object declaration?
00:21:36disruptekit'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:53disruptekno, it's about growing the ast.
00:22:28disruptekwe don't have statements in the type section.
00:22:53FromDiscord<Varriount> I'm not talking about adding statements to the type section.
00:23:02*pangey quit (Ping timeout: 260 seconds)
00:23:06disruptekso 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:26disruptekvarriount is suggesting the later.
00:24:05FromDiscord<Varriount> You remember Araq's packedjson library, right?
00:24:21FromDiscord<Varriount> where the nodes were stored as a sequence, rather than a tree?
00:24:21disrupteki know what it is but i'm not familiar with the code.
00:25:10disrupteki'm more familiar with packed ast than i am with packed json.
00:26:31voltist@Vindaar ping
00:28:43FromDiscord<Varriount> @Elegant Beef I'm proposing allowing a macro to access the AST *after* it and its parent nodes.
00:29:57FromDiscord<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:38FromDiscord<Varriount> The macro *would not* be able to modify nodes before it, because those would have already been semantically checked.
00:30:40disruptekbut, not ALL parents. just SOME parents.
00:31:01FromDiscord<Zachary Carter> lmariscal / nimgl: I just made my own bindings using nimterop, while also wrapping https://github.com/zeux/volk for loading
00:31:28FromDiscord<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:04FromDiscord<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:26FromDiscord<Varriount> disruptek: Sure, but the limitation would still be that nodes which have already been semantically checked would not be modifiable.
00:33:07FromDiscord<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:31disruptekwell, i think it's a bad idea. i want to say it's crazy but i don't want to offend you. πŸ˜†
00:35:46FromDiscord<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:09disruptekas i said, i don't know.
00:37:57FromDiscord<Varriount> @Zachary Carter Isn't Vulkan not meant for mere mortals to handle? ;P
00:40:26FromDiscord<Elegant Beef> Is something like this currently possible?↡https://play.nim-lang.org/#ix=2sUE
00:41:20FromDiscord<Varriount> @Elegant Beef You would have to implement your own "type-section-like" macro.
00:41:38FromDiscord<Varriount> replace "type" with "mymacro:"
00:41:41FromDiscord<Elegant Beef> Ah so something that generates my type def from pseudo type def
00:41:57FromDiscord<Elegant Beef> That's a tinge annoying
00:42:36FromDiscord<Varriount> @Elegant Beef Alternately, you can use something like getCustomPragma in a macro called after the type definition block
00:43:02FromDiscord<Zachary Carter> @Varriount haha Vulkan is a PITA
00:44:41FromDiscord<Zachary Carter> nimterop is pretty amazing @shashlick has done as superb job on it
00:44:52FromDiscord<Varriount> Well, so is OpenGL 3, which is why 2 is still used so much in tutorials
00:45:13FromDiscord<Zachary Carter> well - I'm starting with a vulkan backend and then will add a dx12
00:45:16FromDiscord<Zachary Carter> and eventually metal
00:45:25FromDiscord<Zachary Carter> but since vulkan can run on all operating systems - I'll start with VK
00:45:49FromDiscord<Varriount> Nimterop is amazing. I've generated bindings for 2000+ files in the Windows SDK.
00:46:04FromDiscord<Elegant Beef> I never could get it to work
00:46:20FromDiscord<Varriount> @Elegant Beef Nimterop, or C2Nim?
00:46:24FromDiscord<Elegant Beef> Both
00:46:31FromDiscord<Zachary Carter> well you have to know what you're doing
00:46:41FromDiscord<Zachary Carter> so having a good understanding of C/C++ is essential
00:46:43FromDiscord<Varriount> And not be allergic to C or C++
00:46:52FromDiscord<Zachary Carter> since that's what you're interoping with
00:47:06FromDiscord<Varriount> @Elegant Beef Do you have hives?
00:47:10FromDiscord<Elegant Beef> Yes
00:47:23FromDiscord<Elegant Beef> Just the mere mention of those languages cause me to enter..... oh god where is my epi
00:47:39FromDiscord<Zachary Carter> I love C
00:47:49FromDiscord<Zachary Carter> and C++11 lis nice
00:47:53FromDiscord<Zachary Carter> C++14 i sokay
00:47:56FromDiscord<Zachary Carter> (edit) 'i sokay' => 'is okay'
00:48:02FromDiscord<Zachary Carter> everything after that can burn
00:48:16FromDiscord<Zachary Carter> (edit) 'lis' => 'is'
00:48:27FromDiscord<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:41FromDiscord<Zachary Carter> well they're not simple languages
00:48:42FromDiscord<Ricky Spanish> i like c and c++ but they need to get their..business...together when it comes to modern tooling imo
00:48:55FromDiscord<Varriount> @Elegant Beef Might be the preprocessor. I had some issues with it on my laptop, and Nimterop silently exited.
00:49:08FromDiscord<Zachary Carter> the largest hurdle is understanding how to manually manage memory and how computers store memory
00:49:10FromDiscord<Zachary Carter> and access it
00:49:21FromDiscord<Zachary Carter> with C++14 understanding ownership semantics helps
00:49:41FromDiscord<Zachary Carter> @Ricky Spanish agreed - but I don't think it will happen any time soon
00:49:55FromDiscord<Zachary Carter> I think genie is the best project generator available atm
00:50:09FromDiscord<Varriount> What about Visual Studio?
00:50:11FromDiscord<Zachary Carter> and if you want to study well written C++ - just look at bgfx (the author of genie)
00:50:23FromDiscord<Zachary Carter> hrm? Visual Studio is an IDE - which genie can generate projects for
00:50:32FromDiscord<Zachary Carter> genie is a fork of premake with a lot of extra functionality
00:50:35FromDiscord<Zachary Carter> that uses lua for scripting
00:50:39FromDiscord<Zachary Carter> well premake does too
00:50:51FromDiscord<Varriount> I mean, Visual Studio does a good job of letting you get a project up-and-running
00:51:20FromDiscord<Zachary Carter> well yeah - but I like declarative project generator tools for C/C++
00:51:31FromDiscord<Zachary Carter> where I can spit out a cmake project, a VS project an xcode project, etc
00:51:39FromDiscord<Zachary Carter> or gcc makefiles
00:51:50FromDiscord<Zachary Carter> (edit) 'gcc' => 'gnu'
00:51:56FromDiscord<Varriount> I've rarely had such generators work correctly with Visual Studio
00:52:03FromDiscord<Ricky Spanish> sent a long message, see http://ix.io/2sUI
00:52:07FromDiscord<Zachary Carter> well it does if you specify all the compiler / linker options correclty
00:52:20FromDiscord<Zachary Carter> one thing I hate about visual studio is the version bullshit
00:52:28FromDiscord<Zachary Carter> and their "upgrade project version" feature which always breaks shit
00:52:45FromDiscord<Zachary Carter> yeah C++ package management is a mess
00:52:47FromDiscord<Varriount> But it's either that, or it doesn't accept the project at all
00:53:00FromDiscord<Zachary Carter> or they could just make it work πŸ˜›
00:53:27FromDiscord<Zachary Carter> but C/C++ compilers are hard and disparate
00:53:34FromDiscord<Zachary Carter> so it's hard to build a build tool that's a panacea
00:53:59FromDiscord<Zachary Carter> CMake drives me bonkers
00:54:18FromDiscord<Zachary Carter> the documentation is terrible and it's just way too much configuration
00:54:30FromDiscord<Zachary Carter> I'm fine with building already prepared cmake projects
00:55:09FromDiscord<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:05FromDiscord<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:17FromDiscord<Zachary Carter> ugh
00:57:20FromDiscord<Varriount> @Zachary Carter Even automake/autoconf?
00:57:31FromDiscord<Zachary Carter> well yeah - I won't touch those either
00:57:32shashlickGetting comfortable with c/c++ is crucial to maximize the power of Nim
00:57:44FromDiscord<Zachary Carter> @Ricky Spanish at least you get to code in C/C++ for your job, I'm stuck writing python
00:57:53FromDiscord<Zachary Carter> which is awful
00:58:10FromDiscord<Varriount> @Zachary Carter I'm writing Go
00:58:17FromDiscord<Zachary Carter> that's almost as bad as python
00:58:29FromDiscord<Zachary Carter> but at least you have static type checking
00:58:45FromDiscord<Varriount> @Zachary Carter What version of Python?
00:59:24FromDiscord<Zachary Carter> 3.7
00:59:31FromDiscord<Zachary Carter> Python is just a mess
00:59:34FromDiscord<Varriount> You could use Mypy
00:59:43FromDiscord<Zachary Carter> everything about it drives me nuts
00:59:53FromDiscord<Varriount> See, I like Pythonn
01:00:02FromDiscord<Zachary Carter> yeah I've seen Mypy before but it's sad that I would have to resort to something like that
01:00:34FromDiscord<Varriount> Well, use it, or not.
01:00:45FromDiscord<Zachary Carter> eh I don't really get to make decisions like that at work
01:00:56FromDiscord<Zachary Carter> they just ask me how to fix things - not what they should use to fix them
01:01:24FromDiscord<Zachary Carter> otherwise we definitely would NOT be using Django
01:01:35FromDiscord<Zachary Carter> or anything remotely similar
01:04:02FromDiscord<Varriount> Website?
01:04:44FromDiscord<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:27FromDiscord<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:28FromDiscord<Elegant Beef> But yes i dont know C/C++ anywhay
01:05:51FromDiscord<Shucks> Is a sequence able to hold different types?
01:06:03FromDiscord<Elegant Beef> No, you'll need to box the data using object variants
01:06:37FromDiscord<Varriount> @Shucks Do you know what object variants are?
01:07:03FromDiscord<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:18FromDiscord<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:41FromDiscord<Varriount> What about a generic?
01:08:54FromDiscord<Elegant Beef> If the sequence is full of the same types a generic would work
01:09:12*outtabwz joined #nim
01:09:22FromDiscord<Shucks> Gonna look it up. Thanks πŸ™‚
01:09:42FromDiscord<Varriount> @Shucks The manual should have sections on generics and object variants
01:11:30FromDiscord<Ricky Spanish> is it in the book? just ordered it
01:11:37FromDiscord<Ricky Spanish> or the book is the manual?
01:11:47FromDiscord<Zachary Carter> @Varriount website for Django?
01:11:48FromDiscord<Varriount> https://nim-lang.org/docs/manual.html
01:11:52FromDiscord<Elegant Beef> The manual is a free resource
01:12:00FromDiscord<Zachary Carter> @Elegant Beef flecs is a tough library to wrap
01:12:05FromDiscord<Zachary Carter> and I'm not even sure if it's worth it
01:12:23FromDiscord<Varriount> What's flecs?
01:12:26FromDiscord<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:29FromDiscord<Elegant Beef> ECS library for C
01:12:32FromDiscord<Zachary Carter> an entity component system written in C
01:12:47FromDiscord<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:37FromDiscord<Zachary Carter> it uses threads so it definitely wouldn't work well with anything other than ARC
01:13:46FromDiscord<Zachary Carter> I'm guessing anyway
01:14:07FromDiscord<Zachary Carter> but uh - I think the polymorph library for Nim is probably a good substitute
01:14:23FromDiscord<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:35FromDiscord<Zachary Carter> or you can try to wrap / use (with Nimline) Entitas
01:14:55FromDiscord<Zachary Carter> that is a pretty simple example
01:15:31FromDiscord<Elegant Beef> Variants for you aswell↡https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants
01:15:34FromDiscord<Zachary Carter> you have a BinaryTree generic object that has reference to two other binary tree objects
01:15:46FromDiscord<Zachary Carter> and then it has a data field which holds an object of type `T`
01:16:02FromDiscord<Zachary Carter> so T could be an `int` a `float` another `object` a `ref object` whatever you want
01:16:18shashlick@Elegant Beef feel free to reach out if you try next, happy to help with nimterop
01:16:26FromDiscord<Elegant Beef> As the name implies they're for solving code which is intended to be generic πŸ˜„
01:16:48FromDiscord<Elegant Beef> Eh i dont tend to venture into wrapping libs territory, but will do
01:17:00FromDiscord<Zachary Carter> this is also known as parametric polymorphism
01:17:04shashlickWhen you need to, yes
01:35:11FromDiscord<Zachary Carter> @treeform - made a PR for staticglfw https://github.com/treeform/staticglfw/pull/10
01:35:11disbotβž₯ Only define Vulkan types if they haven't already been defined elsewhere
01:37:32FromDiscord<Ricky Spanish> does a break [name of block] evaluate to a goto under the hood in the generated output?
01:37:46FromDiscord<Zachary Carter> one way to find out πŸ™‚
01:38:20FromDiscord<Zachary Carter> just do it and then check out the C code
01:38:38FromDiscord<Ricky Spanish> ah good point forgot can do it that way lol πŸ˜†
01:39:32*sagax joined #nim
01:45:06FromDiscord<Ricky Spanish> seems so ```goto LA2;```
01:47:31FromDiscord<Ricky Spanish> to be fair i kinda like being able to have this option of generating the c and diffing it
01:48:09FromDiscord<Elegant Beef> What didnt like reading ASM? πŸ˜„
01:48:39FromDiscord<Varriount> @Ricky Spanish Nim code gen uses quite a lot of gotos
01:49:12FromDiscord<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:16FromDiscord<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:34FromDiscord<Varriount> Linux has a system tray API?
01:49:43FromDiscord<Elegant Beef> https://specifications.freedesktop.org/systemtray-spec/systemtray-spec-latest.html#messages
01:49:47FromDiscord<Elegant Beef> Not linux exactly
01:49:54FromDiscord<Elegant Beef> But there is a system tray api
01:50:02FromDiscord<Varriount> Ah.
01:50:23FromDiscord<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:40FromDiscord<Elegant Beef> but doesnt seem possible faik
01:50:40FromDiscord<Varriount> I think Windows does it that way too, though it might be hidden behind some procedures.
01:50:45FromDiscord<Elegant Beef> (edit) 'faik' => 'afaik'
01:51:14FromDiscord<InventorMatt> @treeform is there supposed to be an .html file in fidget to run a javascript compiled fidget test?
01:51:38FromDiscord<Zachary Carter> @treeform - nevermind, deleting PR this doesn't seem to be doable
01:51:53FromDiscord<Zachary Carter> just going to write my own glfw static wrapper using nimterop πŸ˜›
02:05:39voltistDo the procs in `streams` that read signed integers expect two's compliment representation?
02:09:58*audiofile quit (Quit: Default Quit Message)
02:10:57FromDiscord<InventorMatt> never mind, I figured out how it works.
02:13:21*krux02_ quit (Remote host closed the connection)
02:25:17shashlick@voltist did you solve your nimterop issues?
02:26:08voltistshashlick: Unfortunately not. Wrapping the offending types with cOverride seems to make no difference
02:27:03shashlickOk I need to go thru the gitter history and see what your issue was
02:27:48voltistCool, thanks
02:27:50shashlickCan you share your original wrapper
02:29:56voltistYep I'll put it on the gitter
02:39:48*theelous3 joined #nim
02:42:28FromDiscord<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:21disruptek--cc:clang
02:43:40FromDiscord<Varriount> Thanks
02:43:44disruptekor do you mean the truly custom compiler stuff?
02:43:54FromDiscord<Varriount> It's a wrapper around Clang
02:44:02disrupteki think you want --cc:clang.
02:45:23disruptekis it zig? because i had to write a shim for that.
02:45:33FromDiscord<Varriount> No, AFL Fuzz
02:45:39disruptekkk
02:48:16*aenesidemus_ joined #nim
02:51:10*aenesidemus quit (Ping timeout: 246 seconds)
02:54:22shashlick@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:29FromDiscord<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:59disrupteki couldn't build afl for some reason.
03:05:14disruptekwhat are you going to fuzz?
03:05:19FromDiscord<Varriount> The compiler
03:05:35FromDiscord<Varriount> I'm going to let the fuzzer run on an ARM EC2 instance for a month
03:06:13disruptekbut 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:42FromDiscord<Varriount> Well, this might end up writing something that humans would write, who knows
03:12:47disruptekbased 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:01FromDiscord<Varriount> lk fuzzing?
03:13:06disrupteklinux kernel
03:13:23*maier quit (Ping timeout: 240 seconds)
03:14:05*apahl quit (Ping timeout: 272 seconds)
03:14:18disruptekfuzz 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:12FromDiscord<Varriount> Well, it also gives me a chance to play with AFL fuzz and spot instances
03:15:47FromDiscord<Varriount> So it's not like fuzzing is the only possible value here.
03:15:56disrupteksure.
03:16:24FromDiscord<Varriount> I'm not planning on spending a fortune, just about $15
03:17:14FromDiscord<Varriount> Although, I guess that might be a fortune to some.
03:19:59FromDiscord<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:27disruptekwell, prove me wrong. 😁
03:23:23*sagax quit (Ping timeout: 246 seconds)
03:25:06disruptekcps is now as fast as nim's closure iterators.
03:26:57FromDiscord<Varriount> Neat. How complete is the implementation? Could one build a prototype scheduler with it?
03:27:25disruptekone 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:07Zevvdidn't you write the other one yet? what have you been doing all day long?
04:21:11*narimiran joined #nim
04:21:58Zevvtoot toot!
04:27:56*rockcavera quit (Remote host closed the connection)
04:29:32narimiranZevv: 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:50FromDiscord<j$> hey guys I am having a weird issue, with nim...
06:10:56FromDiscord<j$> fatal.nim(49) sysFatal↡Error: unhandled exception: index out of bounds, the container is empty [IndexError]
06:11:05FromDiscord<j$> I don't really know what to do with this
06:11:31FromDiscord<j$> I've tried updating nim, but I was hoping I don't have to reinstall it
06:13:22shashlickYou using arc?
06:14:47FromDiscord<j$> I don't know what that is, probably not
06:15:45FromDiscord<Elegant Beef> go up the stack trace should say the line
06:16:00*audiofile quit (Quit: Default Quit Message)
06:17:13FromDiscord<j$> that's the whole stack trace, after the hints
06:17:27PrestigeCan you share the code?
06:17:46shashlickCompile with -g and also share a snippet if possible
06:18:35FromDiscord<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:04FromDiscord<Elegant Beef> It's somehwere you're attempting to index an array
06:19:04*narimiran quit (Ping timeout: 246 seconds)
06:20:44shashlickOnce you compile with -g, run with gdb
06:20:59shashlickMight get a better trace
06:22:47FromDiscord<j$> well if it doesn't compile how do I run with gdb?
06:23:05FromDiscord<Elegant Beef> if it doesnt compile you wouldnt get an index error
06:23:17FromDiscord<Elegant Beef> unless you made a borked macro
06:23:33FromDiscord<j$> ...
06:23:36FromDiscord<Elegant Beef> Or doing borked logic at compileTime i guess
06:25:01shashlickDo you have any static blocks, macros or const values you are calculating at compile time
06:25:51FromDiscord<j$> im commenting them now
06:30:45FromDiscord<Varriount> @j$ If you can, post a link to your code
06:30:58FromDiscord<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:25FromDiscord<j$> uhh using what
06:31:32FromDiscord<j$> I think i've isolated the file
06:31:36FromDiscord<Varriount> Gist?
06:32:22FromDiscord<j$> https://gist.github.com/60fov/4f61eeb83188ccd46751fa6c7afc110e
06:37:31FromDiscord<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:16FromDiscord<j$> yeah, I've isolated it to glm
06:38:31FromDiscord<j$> https://github.com/stavenko/nim-glm
06:39:01FromDiscord<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:50FromDiscord<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:10FromDiscord<j$> import glm; export glm, was in the math file
06:40:15FromDiscord<Varriount> What command line are you using to compile the program?
06:40:49FromDiscord<j$> I was using nim check
06:41:01FromDiscord<j$> just now
06:41:08FromDiscord<Varriount> Ah.
06:44:39FromDiscord<j$> well rip, now I gotta write my own math lib
06:45:11FromDiscord<Varriount> Hm, @Zachary Carter are you around?
06:45:18FromDiscord<Zachary Carter> yup
06:45:33FromDiscord<Varriount> Do you have any recommendations for @j$ ?
06:47:19FromDiscord<Zachary Carter> I get there's an out of bounds exception - but I don't know what code is causing it...
06:47:34FromDiscord<Zachary Carter> I don't even see glm being imported in that gist...
06:47:47FromDiscord<Varriount> Do you have a recommendation on a math library @j$ should use?
06:48:53FromDiscord<Zachary Carter> well... I think folks like - https://github.com/treeform/vmath
06:49:25*solitudesf joined #nim
06:50:21FromDiscord<Zachary Carter> I think glm is nice - I don't get what the problem is
06:51:11FromDiscord<Varriount> @j$ Are you sure your inputs to that function are correct?
06:51:43FromDiscord<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:21FromDiscord<j$> I'm still redacting this code, seeing if I can figure out why
06:53:36FromDiscord<Yardanico> @j$ well, nim check isn't perfect
06:53:42FromDiscord<Yardanico> did you get that stack trace at compile-time or runtime?
06:54:05FromDiscord<Varriount> And if you got it at runtime, what command line did you use to compile the program?
06:56:40FromDiscord<j$> compile time
06:56:49FromDiscord<j$> it doen't compile
06:56:52FromDiscord<j$> and it's not glm
06:56:56Yardanicothen that's a compiler crash
06:56:59Yardanicoor rather nim check crash
06:57:19FromDiscord<j$> that's what I was thinking
06:57:28FromDiscord<j$> I just don't know enough about nim
06:58:41Prestigeyou're not indexing an array anywhere?
06:58:42FromDiscord<Zachary Carter> https://github.com/nim-lang/Nim/wiki/Debugging-the-compiler
06:58:48YardanicoPrestige: it fails at compile-time
06:58:51Yardanicothat's a compiler crash
06:59:01Yardanicowell
06:59:07Yardanicounless there's some "static" code
06:59:15Prestigethat's what I mean
06:59:15FromDiscord<Varriount> Hm, isn't the way to get the compiler to emit a stack trace 'nim temp'?
06:59:25Yardanico./koch temp
06:59:25FromDiscord<Zachary Carter> https://nim-lang.org/docs/intern.html#debugging-the-compiler is probably simpler
07:00:28FromDiscord<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:40Yardanicobut it's rare
07:00:48Yardanicoit would be a bad trade-off IMO
07:01:08FromDiscord<Varriount> Build a version of the compiler without stack traces then?
07:01:20FromDiscord<Varriount> I mean, ahead of time, not via nim temp
07:01:52*NimBot joined #nim
07:04:11FromDiscord<j$> so am I SOL?
07:04:18Yardanicosol?
07:04:29Prestigeshit out of luck
07:04:36FromDiscord<j$> shit out of luck
07:04:37FromDiscord<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:38YardanicoTry with "nim c -r"
07:04:41Yardanicodoes the same stuff happens?
07:05:22FromDiscord<Varriount> @Yardanico Wouldn't that only run the binary? That's no good if the compiler is crashing.
07:05:31Yardanicouhh no
07:05:34YardanicoI was just trying to understand
07:05:37Yardanicoif it's specific to nim check or not
07:06:23FromDiscord<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:26FromDiscord<Zachary Carter> (edit) 'davice' => 'advice'
07:06:41FromDiscord<Zachary Carter> figure out where Nim is installed - there should be a binary in there called `koch`
07:06:51FromDiscord<j$> yeah it's running rn
07:06:53FromDiscord<Zachary Carter> you need to compile your program using the command `koch temp`
07:06:56Yardanicounless it's installed via a package manager
07:06:57FromDiscord<Zachary Carter> okay cool
07:07:04FromDiscord<j$> it is but I found it
07:07:15Yardanicowell, depends on a distro/PM I guess
07:07:32FromDiscord<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:48FromDiscord<Zachary Carter> well doesn't have to be on github - gitlab or bitbucket or whatever
07:08:16FromDiscord<j$> sent a code paste, see https://play.nim-lang.org/#ix=2sVt
07:08:27Yardanicohow did you run it?
07:08:46Yardanicoyou should do something like ./koch temp <commands>
07:08:54Yardanicocan you just paste full command you're using for nim check or to compile?
07:08:55FromDiscord<j$> koch.exe temp nim c -r tests\rendering.nim
07:08:59Yardanicononono
07:09:09Yardanicokoch.exe temp c -r tests\rendering.nim
07:09:19FromDiscord<j$> ahhh
07:10:37FromDiscord<j$> https://pastebin.com/8CShrwML
07:11:12*maier joined #nim
07:11:26Yardanicooh yeah, that's a compiler crash :PO
07:11:29Yardanico:P
07:11:51FromDiscord<Varriount> Looks like it's failing when checking a convertible relation with an ordinal type?
07:11:58Yardanicopossibly
07:12:31FromDiscord<Zachary Carter> really need to see your code to debug further
07:12:38Zevvnarimiran: no worries, that was just for a quick first breakfast. Had a perfect nap after that, now up for seconds!
07:12:41FromDiscord<Varriount> @Zachary Carter Here:
07:12:49FromDiscord<Varriount> https://gist.github.com/60fov/4f61eeb83188ccd46751fa6c7afc110e#file-renderer-nim-L13
07:13:00FromDiscord<Varriount> I'm wondering if it's the enum
07:13:03FromDiscord<Zachary Carter> yeah but what is `private/gl`
07:13:18FromDiscord<Zachary Carter> oh yeah wtf
07:13:24FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2sVw
07:13:35FromDiscord<j$> omg
07:13:37FromDiscord<j$> oops
07:13:41FromDiscord<Zachary Carter> that's not going to work...
07:13:43FromDiscord<j$> I need sleep
07:13:56Yardanicoit would be better if you still report the crash
07:14:06Yardanicoso it's tracked and could be replaced by a proper error in the future :)
07:14:12FromDiscord<Zachary Carter> let me try to reproduce this first
07:14:14FromDiscord<Zachary Carter> just to be sure...
07:14:38FromDiscord<Varriount> @j$ Thanks for your patience. πŸ˜„
07:14:50FromDiscord<Zachary Carter> yeah that's it
07:14:59FromDiscord<Zachary Carter> @j$ please file an issue if you have a moment
07:15:23*maier quit (Ping timeout: 240 seconds)
07:15:52FromDiscord<j$> no problem, uhhh, how do I do that, the github im assuming
07:16:03Yardanicohttps://play.nim-lang.org/#ix=2sVy minimized version
07:16:23FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2sVz
07:16:24FromDiscord<Yardanico> yeah
07:16:24FromDiscord<Zachary Carter> oh yeah
07:16:31FromDiscord<Yardanico> @j$ https://github.com/nim-lang/Nim/issues/new/choose
07:16:35FromDiscord<Yardanico> "bug report" here
07:20:09FromDiscord<j$> I don't know what the bug is exactly, just call it compiler crash and put the code that reproduces?
07:20:41Yardanicolemme show you an example
07:20:55Yardanicohttps://github.com/nim-lang/Nim/issues/14015
07:20:56disbotβž₯ Compiler crash when types recursively depend on each other ; snippet at 12https://play.nim-lang.org/#ix=2iAJ
07:21:01Yardanicobasically code/koch temp output/nim version
07:25:06FromDiscord<j$> https://github.com/nim-lang/Nim/issues/15145
07:25:08disbotβž₯ Compiler crash when types recursively depend on each other ; snippet at 12https://play.nim-lang.org/#ix=2sVC
07:25:09FromDiscord<j$> is this fine?
07:25:20FromDiscord<j$> https://github.com/nim-lang/Nim/issues/15145
07:25:21disbotβž₯ Compiler crash when types recursively depend on each other ; snippet at 12https://play.nim-lang.org/#ix=2sVC
07:25:45Yardanicowell, almost, I'll edit it a bit :)
07:25:57FromDiscord<j$> oh forgot the output
07:26:18Yardanicoalso you don't need the other snippet
07:26:25Yardanicosince the first one is fine
07:26:31Yardanicoversion is fine
07:40:19*SenasOzys joined #nim
07:46:00*Vladar joined #nim
07:49:25FromDiscord<Zachary Carter> yay successfully creating a vulkan device
07:49:30FromDiscord<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:38voltistIs there a way to specify endianess when reading/writing with Nim's `streams` module?
08:11:08Yardanicovoltist: no
08:11:30Yardanicoyou should either use https://nim-lang.org/docs/endians.html
08:11:41Yardanicoor https://github.com/status-im/nim-stew/blob/master/stew/endians2.nim for a nicer version of that module :)
08:12:48voltistOk, thanks for the pointers
08:15:09voltistDo the procs in the endians module convert to whatever one's system uses? Like does 'bigEndian16' expect a big endian integer?
08:15:46Yardanicoyou can check how it's defined https://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/endians.nim#L100
08:16:02Yardanicoso it always converts from the system's endianness to some other one
08:16:11Yardanicoif it's a native endianness, it just copies memory
08:27:35voltistStew's endians2 looks nice but it doesn't seem to support signed ints
08:28:20FromDiscord<Rika> *it sounds like its cast time*
08:28:32voltistOh true
08:28:40voltistDidn't even occur to me
08:33:18voltistRejoice, for my multi-day problem is now solved
08:41:02PrestigeIs there anything in Nim like c's static vars in a function?wa
08:41:27Yardanico{.global.} maybe?
08:41:32Yardaniconot sure exactly
08:41:43Yardanico"Static variables have a property of preserving their value even after they are out of their scope!" yeah
08:41:45Yardanicoshould work similarly
08:41:54Yardanicobut if you can - try to not use it :)
08:42:06PrestigeThanks I'll try it out
08:42:07*vicfred_ quit (Remote host closed the connection)
08:42:35*vicfred_ joined #nim
08:42:53YardanicoPrestige: https://play.nim-lang.org/#ix=2sVS
08:43:17Prestigeah sexy, I love it
08:43:23Yardanicodon't :P
08:43:28Prestigehaha
08:43:36Yardanicoit's harder for the compiler and there are edge cases
08:44:00Yardanicojust declare a global variable
08:44:02Yardanicoa normal one
08:44:12Yardanicobefore the proc itself for example
08:44:44Yardanicohttps://github.com/nim-lang/nim/issues?q=is%3Aopen+is%3Aissue+label%3A%7B.global.%7D
08:46:07Prestigegood idea
08:46:39Prestigejust translating some weird c code to nim atm, trying to keep it as 1-to-1 as possible atm
08:46:44Yardanicoatm
08:46:48Yardanicodefer and global are the "shady" things which 4raq doesn't like :P
08:47:03Yardanico{.global.} i mean
08:47:28PrestigeYeah. want to get it all working before I refactor
08:59:31voltistThis 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:55FromDiscord<Rika> wdym map large ints?
09:01:27Yardanicovoltist: there's "uint8" type for that
09:01:31Yardanicoif you want ints in 0-255 range
09:01:35Yardanicootherwise I don't understand :)
09:03:28voltistMaybe 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:04voltistI'm wondering if I could take shortcuts since its just for displaying to the screen, not processing
09:04:21FromDiscord<Rika> if youre scaling by powers of two, there's always shifting
09:05:09FromDiscord<Rika> actually not scaling, i mean dividing
09:06:00voltistOoo looks like a good idea
09:06:04*drewr joined #nim
09:07:57voltistIn nim thats `shl` and `shr`, right?
09:08:43FromDiscord<Rika> yes
09:08:47FromDiscord<Rika> dividing is shr
09:09:19*sagax joined #nim
09:11:27*maier joined #nim
09:14:01voltistI 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:55FromDiscord<Rika> the data doesnt have to be a power of two
09:15:45voltistI'm not sure I 100% understand then
09:16:35FromDiscord<Rika> 257 shr 1 == 257 div 2↡ shr 2 == div 4↡etc
09:16:44*maier quit (Ping timeout: 256 seconds)
09:16:51voltistAh got it
09:19:21voltistAnother 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:54voltist...don
09:19:59voltistt think it would work
09:20:14voltistDarn I keep on hitting the enter key accidentally :)
09:20:24FromDiscord<Rika> well div wouldnt do it properly
09:20:35FromDiscord<Rika> either
09:21:13voltistBut at least it does work
09:21:38FromDiscord<Rika> lets say max is 255 and other max is 1; 254 div 255 would be 0 no?
09:22:17voltistYeah with ints, so to make it work I have to convert everything to slow floats
09:22:22voltistThats my issue
09:22:41FromDiscord<Rika> ok
09:22:45FromDiscord<Rika> so what i did for taht is
09:23:05FromDiscord<Rika> i do 254 div (1 bit less max, so instead of 255 its 127)
09:23:23FromDiscord<Rika> then i check the 1st bit if its 0 or 1 and "round"
09:23:45FromDiscord<Rika> so 00 == 0, 01 == 1, 10 == 1 or so
09:25:30FromDiscord<Rika> actually hm
09:25:42FromDiscord<Rika> i dont think i explained that properly
09:25:50voltistI'm afraid that makes little sense to me, especially the first bit about 254 and 127
09:26:46FromDiscord<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:43voltistNot 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:01voltistMaybe there isn't a way to even approx. this without floats
09:31:11FromDiscord<Rika> no you dont need a float i can think of a way i just cant express it well
09:31:58voltistAll good, there is no rush
09:32:16voltistThis is where a proper education in CS would have been good for me :)
09:32:43FromDiscord<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:05FromDiscord<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:14FromDiscord<Rika> wait, max is 2^32 and not 2^32-1?
09:33:42FromDiscord<Rika> @Ricky Spanish nimpretty
09:33:53FromDiscord<Ricky Spanish> thanks @Rika
09:34:08voltist2^32-1 yeah
09:34:13voltist32 bit unsigned int
09:34:40FromDiscord<Rika> okay let me test my "theory" first
09:36:31Yardanicojust int divide?
09:37:17voltistYou know what? Maybe it is as simple as int divide
09:37:25voltistI might just be overthinking it
09:38:10voltistOr maybe not
09:38:12FromDiscord<Rika> voltist: int divide will make `2281701376` == `136` when your float div + float mult gives `135`
09:38:14voltistI'm confusing myself now
09:38:20Yardanicovoltist:
09:38:28Yardanicohttps://play.nim-lang.org/#ix=2sWk
09:38:30Zevvdisruptek: 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:31Yardanicois that not what you want?
09:39:11YardanicoI got "coef" from dividing 2^32 by 255
09:39:57Yardanicoe.g. echo 2294967296 div coef will be 136
09:40:59Yardanico!eval const coef = 16843009'u32; echo 4294967295'u32 div coef; echo 129591259'u32 div coef; echo 2294967296'u32 div coef
09:41:01NimBot255↡7↡136
09:41:08Yardanicoif you want uint32 explicitly
09:42:38voltistI feel like it should work, but it just returns 0 for everything
09:42:47Yardanicoit will return 0 for small values, yes
09:42:53Yardanicootherwise I don't understand how you would want it to work
09:43:25FromDiscord<Rika> small enough values will be clipped to 0
09:43:38Yardanicowith my code you basically "scale" down all numbers from range 0 to uint32.high to a range 0 .. 255
09:43:49FromDiscord<Rika> it is "floor"ing rather than "round"ing
09:44:16FromDiscord<Rika> so only uint32.high will be mapped to 255
09:44:20FromDiscord<Rika> ever
09:44:21FromDiscord<Rika> afaik
09:44:22Yardanicoyes
09:45:21FromDiscord<Rika> maybe thats not waht voltist wants
09:46:42voltistOk I've gotten it working
09:46:58voltistThere is a bit of an overflow problem but I'm sure I can sort it out
09:47:12voltistIdk why this absolutely messes with my head
09:48:46voltistThanks you two for your help thought :)
09:56:38*Vladar quit (Quit: Leaving)
09:57:11voltistDarn, all this and it ends up being just as slow? I wasn't expecting that
09:57:22Yardanicoare you testing with -d:danger ?
09:57:34Yardanicoalso try -flto, C compiled by Nim is usually very LTO-friendly
09:57:43Yardanico--passC:-flto --passL:-flto
09:58:07FromDiscord<Rika> are you sure the division and multiplication is the bottleneck
09:59:26voltist@Rika Haha, with this new method it only seems to make up about a quarter of it
09:59:39Yardanicovoltist: maybe you looked at the wrong place :)
09:59:41Yardanicofor the bottleneck
09:59:45voltistSo it helped, but not the best use of my time
09:59:46Yardanicowhat profiler tools did you use ?
10:00:00Yardanicowith Nim you can use all of them really
10:00:09YardanicoIntel's vprof, AMD's uprof, `perf`, etc
10:00:23Yardanicosorry intel vtune
10:00:48voltistWell because its so slow I can pretty much just feel how long its taking :)
10:02:15voltistAt least we cut it down a bit
10:02:29voltistNow I can do other, more sensible things to cut it down even more
10:02:45FromDiscord<Rika> uprof is harder to use over vtune i think 😦
10:02:50Yardanicoit was easy for me
10:02:55Yardanicovoltist: tried -d:danger and LTO ?
10:02:57FromDiscord<Rika> at least from what i see, i have more difficulty with uprof
10:03:04FromDiscord<Rika> i mean its easy yeah
10:03:39FromDiscord<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:16FromDiscord<Rika> nim.cfg or config.nims? wdym?
10:04:19Yardanicoyou can write a custom nimble task which will do something after building?
10:04:36Yardanicobasically you write a nimble task which builds the binary but also does something after that
10:04:37FromDiscord<Ricky Spanish> yeh thats what i need @Yardanico
10:04:57FromDiscord<Ricky Spanish> great thanks guys @Rika , @Yardanico
10:06:58voltistYardanico: -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:10Yardanicothat's with GCC?
10:14:18Yardanicoyou can also try witrh clang if you can install it easily
10:47:25FromDiscord<Recruit_main707> do i need to install mingw32 to be able to cross compile? or mingw64 should already ship 32bit compilers aswell?
10:47:39Yardanicomingw64 should be able to 32-bit compile usually
10:50:20FromDiscord<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:25Yardanicohuh
10:50:49FromDiscord<Recruit_main707> `cannot find [path_to_libmingw32.a]`
10:51:30FromDiscord<Varriount> Don't you have to set the target triple?
10:52:18YardanicoI never had to do that for GCC
10:52:21Yardanicoor clang
10:52:31Yardanicojust passing -m32 to x86_64 compilers worked :P although I guess I also have multilib stuff installedf
10:54:29Yardanicobtw I extended my PGO script for Nim compiler (with clang) a bit right now
10:54:44Yardanicoso it also compiles npeg (and compiler itself) with arc so the ARC analysis modules also get PGO'd
10:55:07FromDiscord<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:02FromDiscord<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:19Yardanicowhere did you put that exec?
11:07:21Yardanicowhat file
11:07:36FromDiscord<Ricky Spanish> nimble generated a new file containing the isMainModule
11:07:41Yardanicono, that's not the right one
11:07:49FromDiscord<Ricky Spanish> inside /src/newfile.nim
11:07:50Yardanicono, that's not how you do it, you should put tasks into "task" blocks in the xxx.nimble file
11:07:57FromDiscord<Ricky Spanish> ah ok i see
11:08:06FromDiscord<Ricky Spanish> so whats the purpose of that file?
11:08:13YardanicoI assume you ran "nimble init"
11:08:18FromDiscord<Ricky Spanish> yeh
11:08:23Yardanicoit's just the main entry point
11:08:25Yardanicofor your program
11:08:38Yardanicoabout nimble - see e.g. pretty complex tasks in https://github.com/mratsim/Arraymancer/blob/master/arraymancer.nimble
11:08:59FromDiscord<Ricky Spanish> ooooh i see thats an actual new project basically that should contain my source code
11:09:05FromDiscord<Ricky Spanish> gotya
11:12:17*maier joined #nim
11:17:05*maier quit (Ping timeout: 240 seconds)
11:17:10Yardanicoargh
11:17:19Yardanico4raq fixed two bugs with arc I found in combparser package
11:17:25Yardanicobut 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:21ForumUpdaterBotNew thread by Serge: Fltk binding for Nim : getting error " Error: cannot open file: fltk", see https://forum.nim-lang.org/t/6631
12:33:15FromDiscord<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:03YardanicoNot sure what do you exactly mean
12:35:30Yardanicoyou can write AST representation (e.g. lispRepr or treeRepr) to file at compile-time from macros
12:36:29FromDiscord<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:00Yardanicowell I don't think that this would be the best idea but it should be possible
12:37:11Yardanicoin the worst case you'll have to modify the compiler a bit to emit AST after all transformations
12:37:41Yardanicomacro evaluations/template expansions/destructors injection (with arc/orc only)/closure iterators/procs lifting/etc
12:37:44FromDiscord<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:56Yardanicobut why do you really want the AST?
12:38:01Yardanicoyou have nim macros to manipulate it
12:38:16Yardanicoand you can call other programs on compile-time with staticExec
12:38:55FromDiscord<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:04FromDiscord<Ricky Spanish> which is why i was asking
12:39:12Yardanicodo you know about nimsuggest?
12:39:23FromDiscord<Ricky Spanish> nope not tried it yet
12:39:41Yardanicoit uses compiler directly (and there's some special branched code in the compiler for it) to provide suggestionms
12:39:44Yardanicosuggestions*
12:39:56Yardanicothere's also nimlsp based on nimsuggest which provides a LSP server
12:40:57FromDiscord<Ricky Spanish> hmm nice reading about it now, thanks for the info @Yardanico
12:41:41*krux02 joined #nim
12:44:05Oddmongerin this sample: http://rosettacode.org/wiki/Closures/Value_capture#Nim
12:44:40Oddmongerdoes "let x=1" part of the function added to the seq ?
12:44:44*dadada joined #nim
12:44:55YardanicoOddmonger: not "directly"
12:45:03Yardanicoclosure procs "capture" the environment
12:45:08*dadada is now known as Guest59087
12:45:10Oddmongeryes it's used only for building
12:45:26Yardanicothe example can be written in a more clear way
12:45:44Yardanicowith closureScope from system
12:45:49Yardanicohttps://nim-lang.org/docs/system.html#closureScope.t%2Cuntyped
12:45:56Oddmongeri think so, because the seq functions are not closure
12:46:03Oddmongerthe closure is in the loop
12:46:03Yardanicowdym
12:46:25Yardanicothe funcs seq contains closure procs
12:46:48Oddmongerthen i don't understand the thing
12:46:48FromDiscord<Rika> the closures made in the loop are put into the seq
12:46:54FromDiscord<Rika> therefore the seq functions are also closures
12:46:56YardanicoOddmonger: closures are "implicit" in nim
12:47:12Yardanicounless you specify the {.nimcall.}, if the compiler thinks it's a closure, the proc type will be a closure
12:48:01Oddmongeri had understood that only Β« proc (): int = x * x Β» was added to the seq
12:48:07Yardanicoyes, and it's a closure
12:48:12Yardanicosince it captures external variables
12:48:24Oddmongerah
12:48:33Yardanicocleaner implementation of the same example on rosetta would be https://play.nim-lang.org/#ix=2sXv btw
12:48:48Oddmongerdon't know why, i was thinking of x substitution with its value
12:48:55Oddmongeri understand
12:49:30Yardanicoif you define the seq as var funcs: seq[proc(): int {.nimcall.}] instead, the compiler will error out
12:49:39Oddmongerah yes, version with Β«cleanerΒ» is more readable
12:50:09Yardaniconimcall proc is the standard nim proc
12:50:15Yardanicoso the seq just contains pointers to proc
12:50:28Yardanicobut if they're closures, each closure is a tuple of (envPointer, procPointer)
12:50:28ForumUpdaterBotNew 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:47Yardanicohttps://nim-lang.org/docs/manual.html#procedures-closures
12:52:52Yardanico"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:45Yardanicook this is very fun
12:59:53Oddmongerthank you for all the informations
12:59:59Yardanicosome code snippet doesn't work with arc
13:00:06Yardanicobut if I comment a single line of UNUSED (really) code, it works
13:00:16Yardanicomaybe some destructor stuff
13:00:23*joelanglois joined #nim
13:00:33Oddmongerthere are unused code in the samples ?
13:00:41Yardanico? no
13:00:47YardanicoI'm talking about another ARC bug I'm minimizing :PO
13:00:48Yardanico:P
13:01:49FromDiscord<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:14FromDiscord<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:14Zevvwho said npeg my terminal is yellow but im on mobile and my keyboard broke so i cant scroll back
13:27:22Yardanicoyou ok?
13:27:30YardanicoI said npeg
13:27:37YardanicoI use it for PGO for the nim compiler
13:27:44Zevvpgo
13:27:49Yardanicoprofile-guided optimization with clang
13:28:22Zevvah cool i hsould look at that sometime
13:31:50FromDiscord<bewarecrow> hey
13:32:00Yardanicohey
13:32:03*narimiran joined #nim
13:32:09Yardanicogmorning miran
13:32:13Yardanicoor gdayu
13:32:14Yardanicogday*
13:36:32*sagax quit (Remote host closed the connection)
13:43:09Oddmongerwith core OpenGL, it's the end of this kind of readable things: http://rosettacode.org/wiki/OpenGL#Nim
13:43:42narimiranYardanico: hello there
13:48:27Yardanico10k stars on the github repo soon
13:48:32Yardanicoless than 200 left
13:49:38Zevvwell I just starred it, and it still says 9.8k
13:49:41Zevvthat's a bit disappointing
13:49:43Yardanicolol
13:49:52Yardanicoand how did you not star it before
13:49:58Yardanicoabsolutely outrageous
13:50:00ZevvI was not paid enough
13:50:03ZevvI only star for money
13:50:08Yardanicodamn
13:50:17ZevvI just don't do virtual internet points
13:50:22ZevvI buy arak a bear
13:50:27Yardanicoarak XD
13:50:40ZevvI 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:45Yardanicolol
13:50:53Yardanicokarax is a smith from starcraft too btw, if you didn't know
13:50:58Yardanicohttps://starcraft.fandom.com/wiki/Karax
13:52:03Yardanicoso we should probably follow the tradition
13:52:08Yardanicoand name nim packages with names from StarCraft
13:52:16Zevvwhat is this starcraft thing
13:52:17Zevvi know this not
13:52:25YardanicoStarCraft / StarCraft 2
13:52:25*albrecht joined #nim
13:52:27YardanicoRTS games
13:52:30Zevvdoesn't run on my ps4
13:52:32FromDiscord<aachh> the only thing i know about starcraft is there's a fox
13:52:33Yardanicolol
13:52:33FromDiscord<aachh> right?
13:52:34Zevvthen it doesn't exist
13:52:40YardanicoZevv: PC is best for games :)
13:52:44Yardanicoso I can both play games and use nim
13:52:49Yardanicoat the same time
13:52:51Zevvdid I say ps4 was any good then?
13:53:06Zevvi just don't feel like frying my testicles playing on my laptop
13:53:15Zevvand if I play I want to play, not read my mails
13:53:15FromDiscord<aachh> i canfΒ eel you
13:53:21Yardanicooh well then it's understandable
13:53:25Yardanicoabout the laptop
13:53:31*dzamo joined #nim
13:53:38ZevvI'm pretty old fashioned. I read my books on paper. Make pictures with a camera. Play my games on a console.
13:53:41albrechtmy laptop's battery dies everytime i try to play a game
13:53:58FromDiscord<aachh> my laptop's cpu dies everytime i try to play a game
13:54:03YardanicoZevv: these zoomers do all of this on their "smartphones" nowadays
13:54:03FromDiscord<aachh> and the fans too
13:54:06FromDiscord<aachh> damn
13:54:23Zevvi 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:32albrechti was compiling a program before and my cpu's temp was at 102C
13:54:32Yardanicothat's the same on PC
13:54:33FromDiscord<aachh> xD
13:54:34albrechtalmost fried it
13:55:07FromDiscord<aachh> my cpu's at 80Β°C when i try to play games
13:55:11FromDiscord<aachh> sometimes 90
13:55:13Zevvyou should move to the US, then 102Β° is not so hot anymore
13:55:18FromDiscord<aachh> xDD
13:55:18Yardanicowell I don't have issues with CPU because I have 3700X
13:55:19Zevvinstant cooling
13:55:27Yardanicobut I don't play very demanding games so I just have RX 470 4gb
13:55:31FromDiscord<aachh> i have a laptop :(
13:55:36albrechtwhen i'm playing a game it's at like 75-80C most of the time
13:55:41albrechtnever above 90 though
13:56:07albrechtif i played on windows my cpu would probably be dead
13:56:18Yardanicodoubt it :)
13:56:18*dzamo quit (Client Quit)
13:56:27Yardanicoif it's somewhat modern the laptop will just shut down
13:56:44Zevvjust like my ps4 :(
13:57:04albrechtis a mid-level laptop from 2015 considered "modern"?
13:57:17Zevvalbrecht: well, not much happened since then
13:57:28Yardanicoalbrecht: yes
13:57:31Yardanicoit'll just shut down
13:57:31ZevvI have a 2015 dell. I7 quad core, 16G of mem, some SSDs
13:57:36Zevvthats still the stuff they sell now
13:57:43albrechti have an hp elitebook
13:57:45YardanicoI just use a stock cooler (wraith prism) for my 3700X
13:57:49albrecht8g ram, 500gb hdd
13:57:50Yardanicoit can get to ~80c at 100% load
13:58:00albrecht i use a big ass propeller fan
13:59:12Oddmongerthe 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:51albrechtfor all my life i've been using pentium 4 and atom computers
13:59:59Oddmongerso 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:16albrechtso i usually play old games
14:00:18Yardanicohmm actually I should try to lower voltage on my 3700X and see if that helps without hurting performance
14:00:30Yardanicoto make a bit lower temps
14:00:32Zevvalbrecht: young man, you don't know what you're talking about.
14:00:47ZevvI started at 8 bit 4Mhz. *those* were the old games
14:00:54ZevvI will now sit in my rocking chair and tell you all about that
14:01:04Zevvand do a bit of lawn shouting in the mean time
14:01:11Oddmongerz80 suxx, but it was cool anyway
14:01:20albrechtmy old atom netbook hardly handled nes emulation
14:01:21Oddmongerno div, no mul … fun
14:01:58leorizeYardanico: 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:14Yardanicoleorize: well idk if my temps are high or not
14:02:20YardanicoI get ~80c with wraith prism at 100% CPU load
14:02:29leorizeyou need a new cooler :P
14:02:32Yardanicodo I?
14:02:42Yardanicoseems like a normal temperature for it on full load
14:02:56leorizewell I'm on a cheap hyper 212 an my p95 small fft never get pass 75C
14:02:58albrecht is 54C idle good or not
14:02:58Oddmongeron my sandybridge desktop i5, i never go above 50Β°
14:03:03leorizeI'm on 3600 though
14:03:23leorizeYardanico: fwiw Ryzen max temp is 95C
14:03:30Yardanicoleorize: I know
14:03:40Yardanicobut I really even tried to change the thermal paste a few times
14:03:45Yardanicodidn't change anything
14:03:56Yardanicobut I don't really stress my CPU so it's fine for now :D
14:03:59leorizeand 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:00Oddmongeri removed the thermal paste, and saw no change
14:04:16Yardanicoleorize: I already have it on
14:04:16leorizeif SVI TFN2 voltage dips after 5mins of testing, you need a new cooler :P
14:04:25Yardaniconot sure what "scalar" is though
14:04:42leorizedon't worry, it's 1x by default if you didn't change it
14:04:57Yardanicomaybe I just need to make my fan curve a bit higher
14:05:02YardanicoI made it a bit lower so it's a bit less noise lol
14:05:04Yardanicoin the UEFI
14:05:16Yardanicobut my wraith prism is in the "high" mode (the physical switch I mean)
14:05:26leorizewell if at max speed it tops at 80c then it's not really too good
14:05:35Yardaniconot sure if it's max speed :)
14:05:36Yardanicohm
14:05:48leorizealso mind your case fans too
14:05:51Yardanicoi have them
14:05:52Yardanicobut they
14:05:57Yardanicothey're pretty basic
14:06:04Oddmongermay try a cooler with 12cm fan (the big things with 1kg of metal)
14:06:11leorizeand since your cooler is a downdraft one, try to remove the side panel and see if temps drop
14:06:35leorizeif temps drop then you either want more case fans or better case or better cooler :P
14:06:58Oddmongernot sure the temps drop when removing side panel
14:07:13leorizedepends on the cooling setup
14:07:25Oddmongerand the heat in the room :)
14:07:26leorizecan be benefital since the wraith prism is a downdraft cooler
14:07:52leorizealso if temp drops then your case fans might just not move hot air out quick enough :P
14:08:12Yardanicowell I'll see
14:11:02Yardanicoleorize: well I guess something *is* wrong with my setup, maybe wraith prism isn't enough, I'll try later
14:11:25Yardanicowith mprime on linux with Small FFTs and all threads I get 91.5c right now
14:11:29Yardanicowhich is a bit too much I guess
14:11:38Yardanicoand it's still slowly going up
14:11:39leorizeyou can just turn off pbo
14:11:52leorizeit should drop the temps a bit
14:12:04Yardanicowell I don't really have my CPU at 100% load most of the time
14:12:11Yardanicoso PBO is useful for me in games or when compiling
14:12:36leorizenote that ryzen is super sensitive to temps
14:12:42Yardanicoas in?
14:14:07leorizeenough that 2-3 deg difference can affect benchmark results :)
14:14:26Yardanicowell after 2 minutes with mprime the temp now is 92.8c :)
14:14:29leorizethere's a proper piece somewhere that dives into this, let me look real quick
14:15:17Yardanicoguess I'll stop it right now, 93c is a bit uncomfortable for me to look at :)
14:16:23leorizewait a bit more and your motherboard will stop it for you :)
14:16:30Yardanicono I don't want to :P
14:16:38YardanicoI have 11 days uptime now
14:17:45leorizenot sure if that's something to brag about :P
14:17:50Yardanicoit's not
14:18:12leorizeupdate your kernel :P
14:18:19Yardanico5.7.8 is good enough
14:18:23Yardanicomy idle is ~50c btw, which is kinda high too I guess
14:18:26*waleee-cl joined #nim
14:18:31leorizehttps://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:32Yardanicobut my cooler curve is really low until high temps
14:18:56leorizeit's alright to have a curve like that
14:19:20leorizewhat 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:29Yardanicooh seems like it cools to like 42-43c
14:21:40Yardanicobut then maybe due to some instant task jumps to 57c
14:21:43Yardanicoand then cools down again
14:21:49Yardanicowell, not 57, but ~50-57
14:22:42leorizehttps://www.gamersnexus.net/news-pc/3492-ryzen-cpu-thermals-matter-coolers-and-cases
14:22:45leorize^ found it
14:23:06leorizepast 75C the cpu will stop boosting aggressively
14:27:24leorizealso, 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:22disruptekZevv: wrong answers, delivered at the speed of light.
14:58:33Yardanicodisruptek: so when I can use cps instead of async? :P
15:00:19*dzamo quit (Client Quit)
15:00:54disruptekZevv: ah, we don't copy param values into the continuation. 🀦
15:01:06disruptekcoffee first.
15:01:49leorizewhy are your tests failing lol
15:03:58disruptekthat happens when the code is overfitted to the benchmark.
15:04:24Zevvwell, it's almost infinitely faster now, which is good
15:04:42Yardanicobut does it have all the same features as the closure iters? :P
15:04:43disrupteklemme do it by hand. πŸ˜€
15:04:49Yardanicoe.g. capturing variables from outer scopes
15:05:10Zevvnope, it's dead stupid
15:05:25Zevvit's .nimcall. on purpose
15:06:00ZevvI 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:08Zevvbut 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:51Oddmongerin doc: Β« --gc:arc Reference cycles cause memory leaks, beware. Β» -> what does it mean ?
15:27:03*superbia quit (Quit: WeeChat 2.9)
15:27:14YardanicoOddmonger: this means that arc doesn't deal with cycles in memory
15:27:27Yardanicoe.g. if your ref object a references object b, and your object b references object a
15:27:59YardanicoORC is ARC with a cycle collector to deal with cycles
15:28:12Oddmongerok
15:28:40Oddmongerwith arc, if you delete a, it's ref is freed and it's null pointer for b ?
15:28:53Yardanicoif you "delete" a yourself, b will be freed
15:28:58Yardanicobecause refcount of b will be 0
15:29:09Yardanicobut if a -> and b -> a, refcount of a is 1 and refcount of b is 1
15:29:23Yardanicoand they're not connected to the "root" (e.g. even after you don't need them)
15:30:34disruptekZevv: it's not moving the stack to the heap if i get my way. πŸ˜‰
15:31:30Oddmongeris it a problem if i don't use double linked list ?
15:31:40YardanicoOddmonger: it's not a problem even with doubly linked lists
15:31:43Yardanicosince you don't have cycles with them
15:32:01Zevvwhat. doubly linked lists are all cycles
15:32:28Yardanicoare they? in a sense of the GC
15:32:33Yardanicothe last node's "next" is empty
15:32:39Yardanicowell I guess you're right
15:32:42Zevva points to b, b points to a
15:33:18Zevvand if you make it circular, there is no 'last'
15:33:35Oddmongerit wouldn't be a problem is the whole list was hosted in a bigger structure (as seq, array…)
15:33:47Yardanicothat wouldn't really matter
15:34:01Yardanicosince they're refs
15:34:32Yardanicoimagine you have a seq with two elems which point at each other
15:34:39Yardanicoboth of the elems have a refcount of 2
15:34:46Yardanicobecause they reference each other and are also references from the seq
15:35:00Yardanicowhen seq is "destroyed", all of it's fields are destroyed, so a destructor will be called on all it's fields
15:35:05Yardanicoand for refs it'll just decrease the refcount by one
15:35:11Yardanicoso they'll still have a refcount of 1
15:35:13Oddmongeryes, so no wandering until the seq is destroyed
15:35:28Yardanicoso the memory will still leak
15:35:58Oddmongeryes
15:36:05Yardanicothen I'm not sure what did you ask :P
15:36:07FromDiscord<Zachary Carter> got vulkan memory allocator wrapped
15:36:08Yardanicoor what did you mean
15:36:10FromDiscord<Zachary Carter> we be vulkaning
15:36:15FromDiscord<Clyybber> \o/
15:36:31OddmongerYardanico: no it's ok
15:37:04Oddmongermemory leak ok, i was thinking of brutal desallocation from one side, with the other side still pointing to it
15:37:14Oddmongermy bad
15:37:15Yardanicononono
15:37:18Yardanicoit won't crash
15:37:19Yardanicoit'll just leak
15:37:32Oddmongeryes it's still allocated
15:37:46Oddmongermay be i should learn english instead of Nim :ΓΎ
15:38:03FromDiscord<Clyybber> only whe you use ref seq of course
15:56:08disruptekZevv: you're going to find the syntax we're generating kinda amusing.
16:00:11disruptekYardanico: you don't want to use cps. you want to use stuff made with cps.
16:00:56disruptekactually, if it ever works again, we should see how the web-server performance is now.
16:07:21*Trustable joined #nim
16:16:42disruptek!last clyybber
16:16:43disbotclyybber spoke in 12#nim 38 minutes ago 12https://irclogs.nim-lang.org/02-08-2020.html#15:38:03
16:16:48Yardanicocorrect
16:16:52disruptekdude, i got a weird one.
16:17:07disruptekeqsink___9ajq3lYeQwBVNmVulzkWoYA_2(&result, result); result = 0;
16:17:14Yardaniconoice
16:17:19YardanicoXDD
16:21:29disruptekwe may have to switch away from return values sooner than planned.
16:35:58*esthromeris joined #nim
16:45:52FromDiscord<Clyybber> disruptek: Damn, how
16:46:31FromDiscord<Clyybber> implicit return?
16:46:50disruptekyou're going to laugh.
16:46:57disruptektemplate result = foo
16:47:15disruptekactually, template foo = result
16:47:16FromDiscord<Clyybber> uh how does that end up in the C code tho :p
16:47:19FromDiscord<Clyybber> ah
16:47:32disrupteki know.
16:47:32FromDiscord<Clyybber> and then you do `result = result` ?
16:47:52disruptekno, i do result = FooType: ... ; foo
16:47:55FromDiscord<Clyybber> but `result = result` shouldn't be turned into a sink
16:48:04FromDiscord<Clyybber> hmm
16:48:14FromDiscord<Clyybber> that doesn't make much more sense either
16:48:22FromDiscord<Clyybber> and it works without the template?
16:48:38disruptekwell, it did.
16:48:55disruptekis an empty return `return (empty)` or just `return`?
16:49:10disrupteki thought it was `return (empty)`.
16:49:18FromDiscord<Clyybber> dunno, probably the compiler accepts both
16:49:33FromDiscord<XxDiCaprioxX> just return should be fine
16:49:48FromDiscord<Clyybber> @XxDiCaprioxX we are talking AST :)
16:50:10disrupteki must have missed one.
16:50:33FromDiscord<XxDiCaprioxX> What's that? And does it really matter? Returns always work the same
16:50:39Yardanicoexcept CPS :)
16:50:40FromDiscord<Clyybber> disruptek: Can you use expandArc
16:50:46disruptekyeah.
16:51:14FromDiscord<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:28FromDiscord<XxDiCaprioxX> Oh okay
16:53:39FromDiscord<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:01disruptektype MyGoat = object ...
16:54:16disruptekvar g = MyGoat(...)
16:54:22FromDiscord<XxDiCaprioxX> But VS Code always highlighted it a bit weird
16:54:26Yardanico?
16:54:30Yardanicodon'
16:54:35Yardanicodon't trust highlighting
16:54:37Yardanicotrust the compiler :P
16:54:39FromDiscord<XxDiCaprioxX> Anyways, thank you
16:54:44FromDiscord<XxDiCaprioxX> K xD
16:54:48disruptekalso, don't put an open hand near a goat's mouth.
16:55:34disruptekclyybber: http://ix.io/2sYz
16:55:53disruptekoh, wait, that's the new one.
16:56:02FromDiscord<Clyybber> ok damn, thats not supposed to happen
16:56:13Yardanicodisruptek: you on latest devel?
16:56:45disrupteki'm on 28th
16:56:52FromDiscord<Clyybber> oh
16:56:54disruptekthis is the bug: http://ix.io/2sYB
16:57:06disruptekno, i'm on 31st.
16:57:12disruptek* 1.3.5 124e8118 nightly 2020-07-31
16:58:03disrupteklemme update gitnim.
16:58:14Yardanicowell just give us code to make AST like that :P
16:59:15FromDiscord<Clyybber> disruptek: You can try to see why injectdestructors:809 isn't catching it
17:00:01disruptekpull cps and run the tblock.nim test.
17:00:12FromDiscord<Recruit_main707> can i provide a custom path to a compiler?
17:00:13disruptek--define:cpsMutant=off
17:00:21disruptekrecruit: sure.
17:00:22Yardanico@Recruit_main707 wdym?
17:00:43FromDiscord<Recruit_main707> --cc:My\Own\C\Compiler.exe
17:00:47Yardanicosure
17:00:52Yardanico--gcc.exe:
17:00:55Yardanico--gc.linkerexe:
17:00:55FromDiscord<Recruit_main707> just like that?
17:00:57Yardanico*gcc
17:00:57Yardanicoyes
17:01:10Yardanico.exe and .linkerexe at minimum
17:01:14Yardanicofor the compiler
17:01:16Yardanicoe.g. gcc/clang
17:01:22FromDiscord<Recruit_main707> ok, thx
17:03:34FromDiscord<Rika> what's the recommended package for reading jpg, png, gif, and preferably webp images?
17:03:36disruptek!repo imageman
17:03:37disbothttps://github.com/SolitudeSF/imageman -- 9imageman: 11Image manipulation library 15 41⭐ 3🍴
17:03:40FromDiscord<Rika> most packages only do up to jpg and png
17:03:55FromDiscord<Rika> including imageman
17:03:55disruptekyour guess is as good as ours.
17:04:16disruptekgif is a simple format to add, but i doubt webp is.
17:04:45disruptekclyybber: any idea for a workaround?
17:04:50FromDiscord<Rika> on to looking for a c library for me then
17:04:53FromDiscord<Rika> i mean, i will
17:04:57FromDiscord<Rika> that was badly worded
17:05:22disruptekimagemagick has always served me well, but it may be heavier than you want.
17:05:38shashlickhttps://github.com/dizzyliam/inumon/
17:05:43shashlick@voltist has been working on that
17:05:50FromDiscord<Rika> nimagemagick doesnt compile with latest nimterop
17:06:05FromDiscord<Rika> also still no gif
17:06:21Yardanicoimagemagick has gif support
17:07:20FromDiscord<Rika> yeah but the wrapper doesnt compile and i dont know how to fix it because i havent learned nimterop yet
17:08:00disrupteknothing to know. you just say, "shashlick shashlick shashlick va-va-voom" in irc and a wrapper appears in 30mins or less.
17:11:00shashlickbring it on
17:11:15FromDiscord<Rika> well
17:11:21FromDiscord<Rika> zedeus made a wrapper 2 years ago
17:11:26FromDiscord<Rika> https://github.com/zedeus/nimagemagick
17:11:38FromDiscord<Rika> hm
17:11:50FromDiscord<Rika> is there any risk in using a super old version of nimterop
17:11:57Yardanicoyes
17:12:00shashlickno support πŸ˜„
17:12:01Yardanicoit'll eat you
17:12:11FromDiscord<Rika> isnt that a good thing
17:12:23disrupteki haven't seen bentley for 3 days, all because i ran nimterop-0.3.1 just ONE TIME.
17:12:36disruptekthat dog just bugged the fuck out.
17:12:48FromDiscord<Rika> this goes older
17:12:48FromDiscord<Rika> nimterop 0.1.0
17:12:53disruptekjesus christ.
17:12:58disrupteki probably would have lost my house.
17:13:58disruptekyou have to admit, cps has found some pretty cool bugs.
17:14:55*maier joined #nim
17:14:58shashlickRika - what OS
17:16:32FromDiscord<Rika> does it not compile on? linux
17:17:29*NimBot joined #nim
17:17:51disruptekclyybber: it's probably an ident; i'll try that.
17:18:20FromDiscord<Rika> i mean its already installed
17:19:53*maier quit (Ping timeout: 246 seconds)
17:19:53FromDiscord<Rika> https://gist.github.com/de-odex/dd54eab785617da10ae87508c733f106 is the error on modern nimterop if you need it
17:21:23shashlicktrying 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:42disruptekclyybber: this is bananas.
17:31:59*dddddd joined #nim
17:34:59Zevvdisruptek: so, what's new
17:35:16Zevvhow do I fix my iterator
17:35:34Zevvooh line numbers
17:35:35Zevvspiffy
17:35:36disruptektrying to figure out if this is my bug or arc's.
17:35:47disruptekit's a bit of a mindfuck.
17:35:51Zevvooh and you made the bootstrap
17:36:04Zevvdude this is super clean
17:36:09Zevvif only it worked
17:36:22disrupteklook at those ix i posted.
17:37:03Zevvwhat's the symptoms
17:37:28disruptekwell, it's seeping but worse than that, it itches like crazy.
17:38:58Zevvyou're way beyond help, and you know it
17:39:20disruptekjust looking for a topical preparation.
17:40:34FromDiscord<XxDiCaprioxX> How do I install SDL2.dll?
17:40:43disrupteki think a later rewrite is screwing up inject destructors.
17:40:54Yardanico@XxDiCaprioxX for windows?
17:40:55Yardanicoyou download it\
17:40:58Zevvwhat does it do with normal GC then?
17:41:08Yardanicohttps://www.libsdl.org/download-2.0.php
17:41:12Yardanicosee runtime binaries for windows here
17:41:18FromDiscord<XxDiCaprioxX> Well I downloaded it but what now?
17:41:23Yardanicoidk?
17:41:25Yardanicowhat do you want?
17:41:53FromDiscord<XxDiCaprioxX> I'm using Nico which has SDL2.dll as a dependency
17:42:13FromDiscord<XxDiCaprioxX> And idk what to do with it after the download because it doesn't work yet
17:42:16Yardanicoyes, you put it in any directory with PATH
17:42:18Yardanicoin PATH*
17:42:27Yardanicosimplest - put it in the same folder as the .exe
17:42:48Zevvdisruptek: things don't compile for me now, how's that
17:42:57FromDiscord<XxDiCaprioxX> Okay
17:43:01FromDiscord<Clyybber> disruptek: pretty sure its an arc bug
17:43:24disruptekit's a rewrite that's occurring too early.
17:43:28Zevvah ok
17:43:38Zevvbut when not using --gc:arc, what happens?
17:44:04FromDiscord<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:23disruptekZevv: looks like it works.
17:44:26disruptekoutside of arc.
17:44:27Yardanicowell, first of all - do you really need to simplify it?
17:44:34Yardanicoyou always can, but do you really need to?
17:44:41Zevvnot for me, I get "Error: type mismatch: got <proc (result: var Iterator)> but expected 'proc (c: Iterator): Iterator'
17:44:43FromDiscord<Shucks> I don't. But it looks ugly ;D
17:44:46Zevvwith your master on stash/iterator.nim
17:44:48FromDiscord<Shucks> not nimish
17:45:50disruptekperformance runs for me. 0.73x faster, it says. for markAndSweep.
17:46:00Zevvall pushed?
17:46:12disruptekyeah
17:46:19disruptekiterator runs.
17:46:24Zevvfk me
17:46:41ZevvI'm at unmodified f0e76ce5bfde46672a6088889856535188b8699d
17:46:50Zevvwow look at that string of 8s
17:46:57disruptekjust lucky, i guess.
17:47:15Zevvyeah but this is plain silly. Latest nim, cps master
17:47:18Zevvworks for you not for me
17:47:18Zevvno way
17:48:06disruptek"latest"?
17:48:19Zevvpulled 3 secs ago
17:48:28disruptekgit hash: d6161e7e9ea1f40ad734c6e811e8169fe24b5e9f
17:48:38disrupteki'm running 8/2 nightly
17:48:59Zevvmoving to that hash
17:49:05disruptekoh wait
17:49:10Zevvnope
17:49:13Zevvliar
17:49:14disruptek--define:cpsMutant:off 😁
17:49:21Zevvok
17:49:55disruptekclyybber: you know what's wrong?
17:50:30FromDiscord<Clyybber> I know whats wrong but not why lol
17:51:07disruptekwe are doing arc rewrites too soon.
17:51:18Zevvdisruptek: why is the repr so funny? "return Cont:"
17:51:18FromDiscord<Clyybber> don't think so
17:51:34disruptekZevv: it's call with a statement list 🀣
17:51:51FromDiscord<Clyybber> its not funny, douche..
17:51:57disruptekwe rewrite it, then the rewrite gets rewritten to be broken.
17:52:19disruptekarc needs to rewrite the rewrite, instead.
17:52:20FromDiscord<Clyybber> yeah, but that doesn't make a whole lotta sense
17:52:33FromDiscord<Clyybber> how do you rewrite after arc if i kay ask
17:52:40FromDiscord<Clyybber> s/kaymay/
17:52:45FromDiscord<Clyybber> dammit mobile shit
17:53:07disruptekwell, what do you think it is?
17:53:29FromDiscord<Clyybber> lemme see
17:54:20Zevv"call with a statement list"
17:54:21ZevvTIL
17:54:39Zevvnim is so weird
17:54:50disruptekthis is the basic feature that makes the language work.
17:54:55Zevvhow do you make this stuff up. jus by accident, right?
17:54:57disruptekmakes it lispy.
17:55:13Zevvyou just point these knobs on this plank
17:55:18Zevv /pound/
17:55:23Zevvand then this happens
17:55:35Zevv I bet it's not even in the manual
17:55:49FromDiscord<Clyybber> sure it is
17:55:51disruptekwell, it is.
17:55:53FromDiscord<Clyybber> the grammar :p
17:55:55Zevvyou make up random stuff, and then go complaining that it's Clyybbers fault
17:55:59FromDiscord<Clyybber> lol
17:56:02disruptekbut anyway, you should already know this behavior from your macro expertise.
17:56:22ZevvI think I've seen it but didn't accept it
17:56:32ZevvI love it
17:57:00FromDiscord<Clyybber> how to repro?
17:57:09FromDiscord<Clyybber> just compile iwth mutant-mode off?
17:57:17disruptekboth modes demo the problem.
17:57:37FromDiscord<Clyybber> whats the simplest test that demonstartes it?
17:57:45disruptektblock.nim
17:57:50disruptekiirc, it's the first test.
17:58:43Zevvdisruptek: while clyybber is hunting arc stuff, could we make tests/tzevv compile again?
17:58:50Zevvit's pretty basic stuff that should always work I think
17:58:57disrupteklemme look.
17:59:14Zevvlet me isolate the culprit
18:00:57disruptekhow is this even a thing.
18:01:02Zevvwhat is
18:01:07disruptekwe have a hashset on the var name iirc.
18:01:09*Oddmonger had read Β«isolate the cultistΒ»
18:01:29Zevvthat's what we do with cultists here
18:04:01FromDiscord<Clyybber> maybe its the result = Cont: ... result
18:04:08FromDiscord<Clyybber> but I don't think so
18:04:56disruptekat the time that code runs, it's comparing result to c, which is the lvalue in the eventqueue.trampoline
18:05:14disruptekthat's why i say it's running too early.
18:07:13Zevvdisruptek: http://ix.io/2sYX
18:07:26FromDiscord<Clyybber> sorry, gotta go
18:07:33disruptekkk
18:07:42FromDiscord<Clyybber> I'll look at it later perhaps (not sure cuz I have an exam tomorrow :p)
18:07:45disruptekZevv: yeah, i'm looking at it.
18:07:55disruptekno biggie, thanks clyybber.
18:07:56ZevvClyybber: we can grade you
18:08:18disruptekZevv: it's telling that we're dumping duplicate templates.
18:08:25Zevvyeah it seems
18:08:50disruptekah, it's because allPairs is cumulative.
18:08:55disruptekso dumb.
18:17:11FromDiscord<Elegant Beef> He says exam like he needs to take long, but it's just a urine exam
18:17:36Yardanicodisruptek makes 100x better jokes :(
18:17:39Zevvfor some people that might take some time
18:17:41Yardanicoim sorry
18:17:47FromDiscord<Elegant Beef> It's ok
18:17:57Yardanicobut this was kinda a strange jok
18:18:09FromDiscord<Elegant Beef> I understand, it's fine
18:18:11Zevvdisruptek: fix one, run into the next
18:18:29FromDiscord<Elegant Beef> Yard i understand you dont want me here anymore, i get it you can just say it out loud
18:18:35Yardanicowat?
18:18:49disruptekZevv: what's nuts is it /still/ produces a dupe.
18:18:51FromDiscord<Elegant Beef> More of my shitty humour
18:18:56Yardanicoi just said that I kinda didn't like the joke lol
18:24:23*nikita` joined #nim
18:36:27disruptekZevv: i'm dumb. we are probably eating our own tail.
18:36:39*tane joined #nim
18:36:55Zevvdog eat dog
18:37:05disruptekand me with milkbone underwear.
18:37:09disruptekstory of my fucking life.
18:37:37ZevvI had to google that reference
18:37:43disrupteklol
18:37:47disruptekone of the greats.
18:38:32disruptekit's older than 20 years, which means you have no excuse.
18:38:55disruptekhow's the world been treatin' ya, norm?
18:39:02disruptek-- like a baby treats a diaper.
18:39:07ZevvI'm not from the USA, rihght
18:39:13disruptekso?
18:39:31Zevvam I expected to know usa commercials?
18:39:38disruptekcommercials?
18:39:41Zevvoh is it not
18:39:43Zevvwhat is it then
18:39:44disruptekwe're talking about CHEERS, my dude.
18:39:46Zevvoh
18:39:54Zevvnever liked that
18:40:17disruptekah, one of the few examples of truly victimless television.
18:40:30disruptekthere's no cast member that you don't have a soft spot for.
18:40:32Zevvand south park
18:40:38disruptekno character, i should say.
18:40:47disruptekstar trek is another like that.
18:40:52disruptekand mst3k.
18:41:00Zevvstar trek, yeah, I thin I remember that
18:41:04Zevvwith the bald guy
18:41:18Zevvand the hot dame
18:42:39disruptekhot dame?
18:42:43*sschwarzer joined #nim
18:42:44disrupteknow you've piqued my interest.
18:42:57sschwarzerHeya disruptek! :)
18:43:02disrupteksup dawg
18:43:29*al1ranger joined #nim
18:44:44sschwarzerDoes 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:45Zevvsplashdown in 30
18:45:01Zevvjebediah approve
18:45:02Zevvs
18:45:04disruptekbbiab it's beach weather in vermont.
18:48:57Yardanicosschwarzer: as I said in telegram, nim only does that if otherwise the binary would conflict with something else
18:49:03Yardanicoe.g. if you have src/myfile.nim and src/myfile directory
18:49:15Yardanicothen nim will put the binary in src/myfile.out instead of src/myfile
18:49:16Zevvhttps://github.com/disruptek/cps/pull/30
18:49:17disbotβž₯ generate installLocal template by template
18:50:19*al1ranger quit (Quit: Leaving)
18:50:21*esthromeris joined #nim
18:50:38Zevvmore 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:56sschwarzerYardanico: It seems I hadn't checked Telegram between your answer on Telegram and my question here. ;)
19:23:31sschwarzerYardanico: 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:35sschwarzerThanks
19:25:54*rockcavera quit (Ping timeout: 260 seconds)
19:26:09Zevvdisruptek: say yes or no, or I'll merge it to master
19:27:04sschwarzerZevv: sounds like a threat ;-)
19:27:26Zevvit is
19:28:03disruptekwut
19:28:24Zevvhttps://github.com/disruptek/cps/pull/30
19:28:26disbotβž₯ generate installLocal template by template
19:28:43disrupteki dunno, merge it if it's good.
19:28:47disruptekyou don't need my permission.
19:29:02ZevvI do, if it messes up your open hart surgey
19:29:04disruptekwhat is it, even?
19:29:11disrupteknah, i need to learn git.
19:29:26Zevvyou want some tips to make life easier?
19:29:30Zevvor you're figuring it out
19:29:32disruptekwait, is it wednesday?
19:29:36disrupteki need to brush my teeth.
19:29:42Zevvlook at git config --global pull.rebase true
19:29:48Zevvand git config --global rebase.autoStash true
19:30:14disruptekyeah, that's a good idea.
19:30:29Zevvanyway, repr is cleaner now
19:30:36disrupteknice.
19:30:58Zevvhow could performance be 0.79 times faster for you
19:31:02Zevvbecause its 1.8 for me
19:31:09disruptekmark and sweep, baby.
19:31:37Zevvbut we're not allocing or freeing anything
19:32:32disruptekbut now i have an extra commit.
19:32:48disruptekbecause i was dirty?
19:32:52disruptekpffbt.
19:32:56Zevvlet me find some crayons
19:32:58Zevvand explain git to you
19:33:07Zevvuse `tig`
19:33:13Zevv`tig` is like heaven
19:33:19disrupteki know. i use it.
19:33:25Zevvok good
19:33:35disrupteki don't need the extra commit, though; i can --ff-only and elide it.
19:33:49Zevvor rebase --pull
19:34:01Zevvso you're non-pushed commit will go on top of mine
19:34:16disruptekoh my bad.
19:34:16*narimiran quit (Ping timeout: 246 seconds)
19:34:21disruptekit's because i merged it through the ui.
19:34:27Zevvwhatever
19:34:31disrupteknevermind. everything is fine.
19:34:36Zevvright
19:34:50Zevvso, we have a blocking ARC bug now, right/
19:34:54disruptekyeah.
19:35:05Zevvbut we can continue using normal mark&sweep
19:35:24disruptekc'mon, we can't do this, right?
19:35:40Zevvdo what
19:35:42disruptekthis installLocal?
19:35:45sschwarzerI 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:53Zevvdisruptek: why not
19:36:11Zevvit's the same as you had, but less noise?
19:36:30disruptekbut we have another template just to reduce source noise?
19:36:45Zevvmove it out later. I want my rewritten source lean & mean for now
19:36:48disruptekyou pay that penalty with every future compile.
19:37:04disruptekokay, when it?
19:37:24disruptekmake it dependent upon -d:release
19:37:26ZevvI don't care. But we're constantly looking at these reprs, and these in-line templates take 3 lines instead of one
19:37:37disruptek^
19:37:41Zevvnah dude, premature optimization. How much does this cost
19:37:43Zevvnothing
19:37:53disruptekas far as you know.
19:38:02disrupteki'd like to point out that we are currently blocked by a template bug.
19:38:24Zevvok, reverting it
19:39:30FromDiscord<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:38Zevvwere you able to find out why this latest "undeclared field" with missing vars in the env is happening?
19:41:33disruptekplease put it into a release when so we can test it, at least.
19:41:47disruptekie. we'll use templates for readability in repr.
19:41:53FromDiscord<Yardanico> @haxscramper to get the type of the expression ?
19:42:03disrupteki just got back from the beach.
19:42:20FromDiscord<Yardanico> can't you just simplify your typeof to typeof(Test())
19:42:22disruptekit looks like it's not writing out the last type change.
19:42:29FromDiscord<Yardanico> or just Test lol
19:42:46Zevvdisruptek: you want the template thingy under flag?
19:42:58disruptekisn't this buggy, though? we should we giving `a` a new name?
19:43:12disrupteki think your idea of seeing templates instead of noise is a good one.
19:43:28disrupteki just want to make sure we can confirm in testing that it matches the raw ast we build "by hand".
19:43:43disruptekas the raw ast should be preferred for release builds.
19:44:26Zevvso, under what 'when' do I put it then?
19:44:40disruptekwhen not defined(release):
19:44:58Zevvah right
19:45:16disruptekit'll run the light version only in travis.
19:45:27disruptekand performance, i guess.
19:45:47disruptekbut the --d:danger doesn't work in nim.cfg, stupidly.
19:45:49FromDiscord<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:06FromDiscord<Zachary Carter> gotta be getting close to being able to draw something... https://gist.github.com/zacharycarter/b1ebd711765c676e4af824f00e57afef
19:46:08Yardanicoyeah, I understand why
19:46:46disruptekzachary: you realize you're going to be the architect of the best game engine available for nim, right?
19:46:57FromDiscord<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:58disruptekgonna take some work on your part.
19:47:13Yardanico@haxscramper well requiresInit isn't used often so there are things like that
19:47:27FromDiscord<Zachary Carter> disruptek: would be cool, but yeah lots of work
19:47:38ZevvZachary Carter: Is that all vulkan boilerplate?
19:48:09FromDiscord<Zachary Carter> Zevv: well it's setting up the vulkan instance, device & physical device, swapchain, etc...
19:48:16FromDiscord<Zachary Carter> you only have to do most of this once which is good
19:48:29Zevvagony
19:48:31FromDiscord<Zachary Carter> but I think this is really rock solid - I have vulkan memory allocator working
19:48:47ZevvOpenGL 1.0 is calling, asking where his lights went
19:48:49FromDiscord<Zachary Carter> and volk - which is a vulkan meta loader that will load function pointers directly from the driver
19:48:53FromDiscord<Zachary Carter> heh
19:49:02FromDiscord<Zachary Carter> it's painful for sure - but once I've done it, I've done it
19:49:10FromDiscord<Zachary Carter> and the vulkan memory allocator solves arguably the toughest part of using vulkan
19:49:11Zevvand I won't have to do it
19:49:18FromDiscord<Zachary Carter> yup! you'll just have to use my stuff
19:49:19disrupteklooks fairly idiomatic.
19:49:40FromDiscord<Zachary Carter> I hope I'm writing failry idiomatic Nim at this point
19:49:47FromDiscord<Zachary Carter> been writing Nim for like 4 years now
19:50:09disruptekwell it's not perfect, says the 1.5y old-timer.
19:50:47Zevvit needs some CPS transformation, I think
19:51:14Zevvand you could use some 'with'
19:51:24disrupteklooks better, zevv. installLocal().
19:51:57Zevvthat's what she said
19:52:03Zevvzachary: http://ix.io/2sZs
19:52:03disrupteklol. we could probably even make it a macro.
19:52:18disruptekthat really is funny.
19:52:40Zevvbut you propbably want to go sprinkle these installLocals at the place where they're needed
19:52:47disruptekwhere is that?
19:52:49Zevvfine for now, but one time we will declare stuff too early
19:52:50disrupteknetherlands?
19:53:07disrupteknether-regions, i mean?
19:53:34FromDiscord<Zachary Carter> what is `with`?
19:53:46disruptekit's an alias for `wit` in philly.
19:53:55disruptekdoes that help?
19:53:55Yardanico@Zachary in sugar
19:54:08Yardanicoah sorry wrong
19:54:18disruptekno, it's zevv's.
19:54:24ZevvI wrote it once and never ever used it
19:54:28disruptekyou guys need to get out more.
19:54:42Zevvbut if you don't mind pulling in a dependency, it might help you with less repetition
19:54:51Yardanicoimprove nim's with instead :)
19:54:59disruptekprobably the lightest dep you'll ever have.
19:54:59Zevvjust pull zevv with into sugar
19:55:08disruptekit should go into fusion.
19:55:12YardanicoPR it
19:55:16disruptekof course, that's probably the last place it will go.
19:55:23disruptekno, i don't support fusion, as you well know.
19:55:24ZevvI don't care. I wrote it once, and PMunch rewrote 100% of it
19:55:33Zevvit is 0% mine now
19:55:51disrupteknuts.com doesn't sell what i expected.
19:55:56Yardanicodisruptek: you don't support nimble either for what I know :)
19:56:05disruptekno, i think it's stupid.
19:56:13Yardanicobut you gotta compromise
19:56:20Yardanicoyou still create .nimble files for your projects
19:56:21Zevvdisruptek doesn't compromise
19:56:21disruptekassholes aren't known to do so.
19:56:22sschwarzerdisruptek: why stupid?
19:56:30Zevvooh please don't
19:56:34disrupteklol
19:56:43sschwarzerZevv: Ok, I didn't ask!!! ;)
19:56:47Yardanicodisruptek: write an article pls
19:56:51disrupteki've written my thoughts pretty precisely here:
19:56:52disruptek!repo nimph
19:56:53disbothttps://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 69⭐ 5🍴 7& 1 more...
19:56:56Zevvnimble has too few shiny dingbats and emoticons
19:57:02disruptekthere's a certain logic to my argument, you might say.
19:57:05sschwarzerZevv: *lol*
19:57:20Yardanicowell shashlick fixed quite a lot of stuff for nimble already
19:57:33disruptekthat's true.
19:57:45disruptekthe amount of time invested into nimble is surely staggering.
19:57:55Yardanicoas in for any default PM for a language
19:58:17ZevvHa! "the last result is the best"
19:58:19disruptekmy ambition is my downfall.
19:58:19ZevvI am *so* flattered
19:59:18Zevvdisruptek: what's next, cps wise
19:59:29Zevvi
19:59:39Zevv'd like to get my tcp server running again
19:59:44disrupteki guess i need to find this extra template or whatever.
20:00:05sschwarzerdisruptek: Is nimph tied to Git exclusively or does it also support Mercurial-hosted packages?
20:00:19disruptekit's exclusively git.
20:00:29Yardanicosschwarzer: mercurial is disappearing anyway really
20:00:34Yardanicoeven bitbucket will stop supporting it soon
20:00:38Zevvdisruptek: I forgot it. It is pushed now
20:00:46disrupteklast i counter, only 1% of all nim packages were merc.
20:00:52Yardanicoprobably less
20:01:16Yardanicomore like 0.1%
20:01:22Yardanicojust checked
20:01:49Yardanicoand all of them are hosted on bitbucket which will stop supporting mercurial soon
20:01:49disruptekoh you fixed it?
20:02:00Zevvyeah I reverted half and then put the wrong half back in
20:02:08disruptekoh, nice.
20:02:10disruptekthat's awesome.
20:02:12sschwarzerYardanico: 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:26Yardanicosschwarzer: Git has much more big users anyway :P
20:02:31Zevvdisruptek: so, what is needed to fix this last bug with the undeclared fields"
20:02:36Yardanicoand I don't see mercurial be used in open source at all nowadays
20:02:37ZevvI think if that is fixed the http server runs again
20:02:41disruptekchoosing one makes the problem we're trying to solve much easier.
20:03:20disruptekit's a decision motivated by a practical understanding of the problem as opposed to political correctness or ambivalence towards the user.
20:03:32Zevvso much words
20:03:43disruptekchurch, motherfuckers.
20:05:00disruptekZevv: so what do i do?
20:05:15disrupteki mean, what is your repro?
20:05:23Zevvhttp://ix.io/2sYX
20:05:51sschwarzerYardanico: 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:57sschwarzerwith Mercurial because of clients' infrastructure)
20:06:16Yardanicoyou can ask @dom96 about mercurial at facebook :)
20:06:17disruptekoh this demonstrates that it's not fixed. 😒
20:07:48Yardanicoand there are always tools which can be written to simplify Git
20:08:01sschwarzerThere _are_ Mercurial hosting options, but of course, on the Git side, Github and Gitlab dominate everything.
20:08:03Yardanicowithout requiring people to switch to an entirely other VCS just because it's easier to learn or has easier commands :)
20:08:39sschwarzerYardanico: I don't require anyone to switch. :-)
20:10:50sschwarzerYardanico: 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:43disruptekZevv: i need to take out double returns after this. 🀣
20:11:56sschwarzerI think the main problem with Git is that it leaks _far_ too many implementation details into the user interface.
20:11:59disruptekthey really are ridiculous.
20:12:36FromGitter<awr1> i thought facebook used p4?
20:13:25FromGitter<awr1> or maybe that was google
20:13:45sschwarzerawr1: no idea. Maybe they did, or different parts of Facebook use different tools. Obviously, public code from Facebook uses Git.
20:14:51sschwarzerRegarding 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:59disruptekZevv: ah, i see what's happening. we encounter the first `var a = ...` in a fn() that we've already continued to.
20:19:42Zevvheey both cps.nim and cps/environment.nim are exactly 663 lines long!
20:19:54Zevvwhat are the chances!
20:20:06Zevvsomething birthday paradox something
20:20:10disruptekguess i cannot commit this.
20:20:35disrupteki think we just have to start a new repository.
20:20:36ZevvI'll just print the hash and hang it in the wall, so I can go back and admire this later
20:20:43disrupteklol
20:20:44Zevvcommit away
20:20:49FromDiscord<dom96> FWIW I prefer Mercurial over Git
20:21:02FromDiscord<dom96> What are we arguing over here though?
20:21:04FromDiscord<Clyybber> disruptek, Zevv: ayy
20:21:11FromDiscord<Clyybber> figured out the cause?
20:21:11FromDiscord<dom96> Nimble supports Mercurial just fine IIRC
20:21:14ZevvClybber: Whazaaap
20:22:03Zevvthe cause of what?
20:22:07Zevvwe have *so* many problems
20:22:17FromDiscord<Clyybber> the stupid sink
20:22:28Zevvoh no, we just abandoned ARC
20:22:29Zevvit's broken
20:22:34FromDiscord<Clyybber> :{
20:22:42FromDiscord<Clyybber> :D
20:22:47ZevvI found this other mode
20:22:50Zevvit's called mark-and-sweep
20:22:51sschwarzerdom96: yeah! :-)
20:22:52Zevvit's amazin
20:22:58disruptekdo we lift locals ahead of cps calls?
20:23:06FromDiscord<Clyybber> more like sarc and weep
20:23:15Zevvhehe
20:23:21sschwarzerdom96: we came to the topic because Nimph doesn't support Mercurial
20:23:43sschwarzerI had only asked if it supports Mercurial
20:23:53sschwarzer+1 for Mercurial from me :)
20:24:13FromDiscord<dom96> I see. It really doesn't take much to support.
20:24:21disruptekas there are no mercurial users who publish software in merc in our community, it is, as i said, not a problem.
20:24:26FromDiscord<dom96> But you should use Nimble anyway πŸ™‚
20:24:40FromGitter<awr1> Mercurial is arguably better designed than Git
20:24:50FromGitter<awr1> But Git won the popularity contest
20:24:53FromDiscord<dom96> I also prefer Phabricator to GitHub a lot
20:25:13disruptekdom96: your heart is as black as night.
20:25:13sschwarzerdisruptek: all my repos are in Mercurial, and sooner or later there will be something from me in Nimle, I suppose :-)
20:25:22FromDiscord<dom96> Too bad it's all about those stargazers
20:25:33*Trustable quit (Remote host closed the connection)
20:25:52disrupteksschwarzer: bring it.
20:25:56FromDiscord<dom96> disruptek: maybe maybe maybe
20:26:03disruptekbut, if your software is in merc, i won't use it.
20:26:10FromDiscord<Clyybber> git is actually designed well, its just the cli thats very messy/inconsistent
20:26:32disruptekit doesn't matter either way.
20:27:02FromDiscord<dom96> I've been toying with the idea of creating a `hg`-like CLI over `git`
20:27:03sschwarzerClyybber: as I said, the design may be fine, but it exposes too much of the design in the UI (IMHO).
20:27:09FromDiscord<dom96> I bet something like this already exists though
20:27:13disruptekthere are design advantages to not wasting effort on support of a feature only 1% of users use.
20:27:51sschwarzerdom96: Have you looked at hg-git, https://hg-git.github.io/ ?
20:27:51disruptekbut, feel free to argue that nimble is better designed than nimph.
20:27:58disruptekthat's an argument i would honestly love to have.
20:28:32FromDiscord<dom96> sschwarzer: nope, haven't looked into this at all yet though πŸ™‚
20:28:59disruptekholy shit, when did MONOVISION come out?
20:29:19sschwarzerdom96: 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:26sschwarzerdom96: hg-git exists since many years and it would be a pity to spend lots of time to reinvent the wheel.
20:30:46disrupteksschwarzer: what's your github username?
20:30:55sschwarzerdisruptek: sschwarzer
20:30:55FromDiscord<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:12sschwarzerdisruptek: why do you ask?
20:31:35disrupteki want to see if i can use your stuff after you've written it.
20:31:57FromDiscord<dom96> If we create hghub do you think github would sue us? :p
20:32:07FromGitter<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:32sschwarzerdisruptek: 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:33disruptekwhat the hell are you talking about?
20:33:37FromGitter<awr1> Git's impl seems very messy. Mix of C and bash script and perl?
20:33:45disruptekwhat is p4?
20:33:47FromGitter<awr1> perforce
20:33:57disrupteki've heard of it.
20:34:18shashlick@Rika - your ImageMagick wrapper is almost ready, needs some nimterop changes
20:34:19FromGitter<awr1> it's like subversion in that it's centralized
20:34:30sschwarzerdom96: There's Heptapod, a fork of Gitlab CE with Mercurial support: https://heptapod.net/
20:34:39disrupteksschwarzer: isn't that git? nimph supports that.
20:34:54disruptekso you are telling me i should support merc, and you like it, and your nim software is in git.
20:34:56sschwarzerSourcehut supports both Git and Mercurial
20:34:57disruptekis that right?
20:35:03disruptekat the same time?
20:35:10sschwarzerMy repos so far are Mercurial
20:35:20disruptekoh.
20:35:29*nikita` quit (Quit: leaving)
20:35:31disrupteki see. sorry; i didn't realize.
20:35:52disrupteki know nimph works with sr.ht.
20:35:57sschwarzerdisruptek: yes, see https://man.sr.ht/git.sr.ht/ and https://man.sr.ht/hg.sr.ht/
20:36:02disrupteki guess it's git.sr.ht.
20:36:21sschwarzerThere's both git.sr.ht and hg.sr.ht
20:36:30disrupteki get that now. that's kinda cool.
20:36:44sschwarzerdisruptek: it is! :-)
20:36:55Zevvall 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:07Zevvdisruptek: just go fix that shit
20:37:23Zevvso I can update the test suites tomorrow and continue working on the stash/ pool of working things
20:37:36sschwarzerZevv: I just prefer Mercurial, I'm not religious about it. :)
20:37:41disruptekokay, zevv.
20:37:46Zevvgood good!
20:38:43sschwarzerI also have no problems adapting to coding standards or design approaches that are idiomatic for different languages. :)
20:38:45Zevvdisruptek: what's your take on the current test suites. is all that supposed to work right now?
20:39:17disrupteki don't know how solid the Scopes stuff is.
20:39:27Zevvok, I'll go through it
20:39:42disruptekthat'll be a lot easier once this works.
20:40:02Zevvyeah. My goal is to get tzevv 100% running and extend from there
20:40:13disruptekahh, okay.
20:40:18Zevvall these tests are standalone, not event queues or other stuff
20:40:36disruptekshould they work?
20:40:54ZevvI think they should, some had c gen errors which might have been fixed now
20:41:01Zevvgive me a minute, I'll see which ones compile now
20:41:08Zevvbut some are broken becuase of the stuff you're looking into now
20:41:14disruptekError: system module needs: nimGCvisit
20:44:05Zevvdisruptek: all tests in tzevv.nim now compile, but some still fail
20:44:26disruptekhmm, not for me.
20:44:31Zevvjust pushed 3 secs ago
20:44:40Zevvpullem
20:45:50disruptekah, neat.
20:46:26disruptekwhy are we skipping these other two?
20:46:45Zevvundeclared field: 'a17' for type
20:47:00FromDiscord<Ricky Spanish> can you build a dll with nim and export the c functions to interop into another language easily?
20:47:14FromDiscord<Ricky Spanish> i,e can i declspec
20:49:20ZevvZZzZzz
20:49:22sschwarzerBye for now :)
20:49:27disruptekg'nite zevv
20:49:44*vicfred_ quit (Quit: Leaving)
20:50:03*sschwarzer quit (Quit: leaving)
20:51:13disruptekbtw, nimph is 1.0.0.
20:55:46disruptekthis templating is stupid. we should just replace all the symbols.
20:56:00disruptekit's too annoying and brittle.
20:56:21disruptekseems like it's blowing arc's mind, too.
21:00:15FromDiscord<Yardanico> @Ricky Spanish yes, you can
21:00:53FromDiscord<Yardanico> Check https://github.com/Yardanico/nim-snippets/tree/master/clib for a simple example
21:01:50FromDiscord<Yardanico> Basically --app:lib and mark all procedures which need to be exported as {.exportc, dynlib.}
21:04:53FromDiscord<Ricky Spanish> ah decent thanks for the info @Yardanico
21:08:20FromDiscord<Yardanico> You should also not forget to always use C-compatible types
21:08:33FromDiscord<Yardanico> E.g. cstring, cint, cdouble, etc
21:08:53FromDiscord<Yardanico> And inside your procs you can always convert back to native Nim types
21:09:04FromDiscord<Zachary Carter> the only c type I ever use is `cstring`
21:09:09FromDiscord<exelotl> that's a really handy example, thx
21:09:12FromDiscord<Zachary Carter> otherwise I use `int32, float32, float64` etc...
21:09:15FromDiscord<Yardanico> Well, it's really recommended
21:09:27FromDiscord<Zachary Carter> well the `c` types are just aliases to those types
21:09:39FromDiscord<Zachary Carter> and I don't think in terms of - oh I want this c type
21:09:46FromDiscord<Zachary Carter> I think of I want a 32 bit floating point value
21:09:51FromDiscord<Zachary Carter> or a 32 bit unsigned integer value
21:09:55disruptekagree; if your semantics don't match up, you have bigger problems.
21:13:38FromDiscord<Zachary Carter> oh I'll also use `csize_t` because it's obvious that it's equivalent to `size_t`
21:14:04disruptekMARRY ME, ARCHIE
21:14:07FromDiscord<Zachary Carter> lol
21:14:15disruptekARCHIE, MARRY ME
21:15:49FromDiscord<Rika> shashlick: I apologize for the extra work you had to do to get this working
21:16:35FromDiscord<Zachary Carter> https://www.youtube.com/watch?v=WGRhaFx1Zpw ?
21:16:47*maier joined #nim
21:17:00FromDiscord<Zachary Carter> My fiance knew the band - I hadn't heard of them before
21:17:05FromDiscord<Zachary Carter> I like it though
21:17:11disruptekoh really?
21:17:18disruptekit's old iirc.
21:17:45disruptek2013. i dunno, maybe that's not old anymore.
21:17:51FromDiscord<Zachary Carter> yeah says 2014
21:18:00disrupteki have a feeling 2020 will recalibrate "old."
21:18:03FromDiscord<Zachary Carter> we're old
21:18:03*vicfred joined #nim
21:18:07FromDiscord<Zachary Carter> heh
21:18:30FromDiscord<Zachary Carter> I wonder how much the median age of the US has already changed
21:19:18disrupteki dunno, it's pretty frustrating knowing your parents only have a few more months, at best.
21:19:20FromDiscord<Zachary Carter> was 38.2 in 2018
21:19:27FromDiscord<Zachary Carter> 😦
21:20:18FromDiscord<Zachary Carter> yeah, not sure how I'd handle that - my fiance lost both her parents already and we're only 35
21:20:29disruptekbad.
21:20:50disrupteki've been harvesting their dna for years, though.
21:20:56FromDiscord<Zachary Carter> good move
21:21:03FromDiscord<Zachary Carter> can clone them
21:21:06disruptekleast i could do.
21:21:43*maier quit (Ping timeout: 246 seconds)
21:22:05FromDiscord<Zachary Carter> just freeze their brains in liquid nitrogen
21:22:17FromDiscord<Zachary Carter> can get new bodies
21:23:31FromDiscord<Zachary Carter> only 28,000 + a 1,250 one time membership charge
21:23:39FromDiscord<Zachary Carter> (edit) '28,000' => '$28,000' | '1,250' => '$1,250'
21:23:46FromDiscord<Zachary Carter> shit - I might join
21:24:06FromDiscord<Zachary Carter> I think when they first launched it was like 200k
21:24:16FromDiscord<Zachary Carter> I bet their doing gangbusters with Covid
21:24:25FromDiscord<Zachary Carter> (edit) 'their' => 'they're'
21:24:34FromDiscord<Zachary Carter> we're in the wrong industry
21:31:00FromDiscord<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:15FromDiscord<exelotl> and this can somehow cause subtle problems?
21:34:27*Jesin quit (Quit: Leaving)
21:37:02*Jesin joined #nim
21:44:10shashlick@Rika no worries, found some bugs so was worth it, might need to tomorrow to update nimterop
21:44:28shashlickWill also create a PR in the repo by zedeus
21:44:49disruptekthanks, shashlick.
21:44:52disruptekyou are the man.
21:52:33FromDiscord<Zachary Carter> @exelotl - `int32_t` comes from the header `stdint.h` and means a 32 bit integer
21:53:02FromDiscord<Zachary Carter> however `int32_t` isn't guaranteed to be present in all implementations on C
21:53:44FromDiscord<Zachary Carter> `int` doesn't have a specified size but it's guaranteed to be `>=` to 16 bits
21:54:08FromDiscord<Zachary Carter> `int` is present in every implementation of C
21:54:46FromDiscord<Zachary Carter> so basically don't use `int` if you rely on the value being a specified size
21:54:55FromDiscord<Zachary Carter> if you don't care - then just use `int`
21:55:41FromDiscord<Zachary Carter> most decent C libraries define their own types aliasing `int32_t` etc
21:57:49FromDiscord<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:12FromDiscord<exelotl> and this somehow actually broke things for people :\
21:59:42disruptekclyybber: nice job, prototypes look good now. πŸ˜‰
21:59:44*tane quit (Quit: Leaving)
22:00:20FromDiscord<exelotl> (note: the toolchains use a recent GCC, and stdint.h is available)
22:16:37FromDiscord<Zachary Carter> well yeah that makse sense
22:16:44FromDiscord<Zachary Carter> (edit) 'makse' => 'makes'
22:17:03FromDiscord<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:59ForumUpdaterBotNew 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:54FromDiscord<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:21FromDiscord<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)