<< 25-09-2021 >>

00:16:26*stkrdknmibalz joined #nim
01:23:41*neurocyte01323 joined #nim
01:23:41*neurocyte01323 quit (Changing host)
01:23:41*neurocyte01323 joined #nim
01:25:46*neurocyte0132 quit (Ping timeout: 252 seconds)
01:25:46*neurocyte01323 is now known as neurocyte0132
02:38:02*kayabaNerve_ joined #nim
02:47:17*arkurious quit (Quit: Leaving)
03:14:53FromDiscord<Gumber> In reply to @garett "Anyone know of a": What are you working on? I mean obviously it's some Vulcan but you have sparked my curiosity...
03:15:04FromDiscord<Gumber> And why are you trying to do that
03:15:13FromDiscord<Gumber> Also asking out of curiosity
03:15:27FromDiscord<Gumber> (edit) "Vulcan" => "Vulkan"
03:51:35*kayabaNerve_ quit (Ping timeout: 252 seconds)
04:06:02*supakeen quit (Quit: WeeChat 3.3)
04:06:31*supakeen joined #nim
04:15:00*kayabaNerve joined #nim
04:42:23FromDiscord<garett> I’m writing a Nim script to convert vk.xml into Nim.
04:43:25FromDiscord<garett> Similar to what nimgl/vulkan does, but formatted differently
04:45:12FromDiscord<garett> I produce one Nim module per API version, v1_0.nim, v1_1.nim, v1_2.nim, and one module per extension
04:46:09FromDiscord<garett> At the time I was writing the generator for struct initializer procs that autofill sType
04:51:38FromDiscord<garett> I’ve also written some macros that rewrite Nim to GLSL, so the goal is to write shader code and imperative pipeline configuration in a Nim DSL, somewhat like Unity shaderlab, so I can write the CPU/GPU code for render passes in a single Nim module. Cool thing about generating GLSL/HLSL from Nim is that the shader code can directly reference types that are also exposed to the surrounding CPU-side Nim code
04:53:06FromDiscord<garett> Reducing redundancy between shader and CPU code, simplifying binding
04:53:42FromDiscord<garett> 🤓
04:54:19FromDiscord<Yardanico> did you see https://github.com/treeform/shady for some inspiration?
04:54:21nrds<R2D299> itHub: 7"Nim to GPU shader language compiler and supporting utilities."
04:54:33FromDiscord<Yardanico> also https://github.com/yglukhov/nimsl
04:54:35nrds<R2D299> itHub: 7"Shaders in Nim language"
04:54:51FromDiscord<garett> Cool, thanks for the links
04:55:58FromDiscord<Stuffe> How come the assert triggers in this example: https://play.nim-lang.org/#ix=3zTv
04:56:40FromDiscord<Stuffe> I am trying to use a sequence of references, but it doesn't seem to work the way you (or I at least) would expect
04:59:04FromDiscord<Yardanico> In reply to @Stuffe "How come the assert": because "result[] = x" copies x into result[]
04:59:33FromDiscord<Yardanico> you can't really do what you want here as it'll be unsafe because stack-allocated objects (typical `object`) are, well, on stack, so if you go out of scope they'll get deallocated
04:59:59FromDiscord<garett> I thought a ref T had to be initialized from a new T
05:00:09FromDiscord<Yardanico> there are multiple ways of initializing ref T
05:00:58FromDiscord<Elegantbeef> This is a bug afaict
05:01:10FromDiscord<Stuffe> In reply to @Yardanico "you can't really do": Would there be any way to do this if I just wanted a seq of refs allocated on the heap?
05:01:11FromDiscord<Yardanico> @ElegantBeef is it?
05:01:28FromDiscord<Elegantbeef> Oh wait nvm
05:01:28FromDiscord<Yardanico> In reply to @Stuffe "Would there be any": then my_chair should be a ref too
05:01:28FromDiscord<Elegantbeef> that's a `var chair`
05:01:31FromDiscord<Rika> lol
05:01:47FromDiscord<Elegantbeef> Well i mean i think it's still a bug
05:02:00FromDiscord<Stuffe> I am really iterating over a tree and I want a list of the nodes in the path to the current location
05:02:01FromDiscord<Elegantbeef> Cause you're assigning the struct of a ref to a struct
05:02:03FromDiscord<Stuffe> speed is not an issue
05:02:12FromDiscord<Stuffe> So I don't mind how its done
05:02:13FromDiscord<Elegantbeef> input shouldnt mutate when assigning the width of that ref's struct
05:02:14FromDiscord<Yardanico> @ElegantBeef look into the code
05:02:16FromDiscord<Yardanico> new(result); result[] = x
05:02:21FromDiscord<Yardanico> result[] = x does a copy of x
05:02:33FromDiscord<Yardanico> so the assert fails obviously
05:02:40FromDiscord<Elegantbeef> Oh fuck yea
05:02:46FromDiscord<Elegantbeef> The assert fails 😛
05:02:47FromDiscord<Yardanico> because the chair object in block_stack[^1] is not the same as `input` passed into the proc
05:02:48FromDiscord<Rika> bruh
05:02:51FromDiscord<Elegantbeef> This is expected
05:03:01FromDiscord<Elegantbeef> Sorry i looked up from compiler code
05:03:05FromDiscord<Yardanico> lol
05:03:05FromDiscord<Elegantbeef> I'll shush
05:03:06FromDiscord<Rika> you should store input.box and check against that, input never gets mutated
05:03:42FromDiscord<Elegantbeef> I was so confused how the the `input.width` got set to 10 and i was like 99% certain it was a bug, but my brain was being dumb
05:03:43FromDiscord<Stuffe> What I want is a mutable list of parent nodes
05:03:52FromDiscord<Rika> which you do get
05:04:03FromDiscord<Rika> you just have to take the `ref T` and not the `T` to see the changes
05:04:34FromDiscord<Yardanico> @Stuffe
05:04:35FromDiscord<Stuffe> In reply to @Rika "you just have to": I am not sure what you mean, could you make a quick example?
05:04:41FromDiscord<Yardanico> sent a code paste, see https://paste.rs/pXV
05:04:47FromDiscord<Rika> thios passes https://media.discordapp.net/attachments/371759389889003532/891188460877140028/unknown.png
05:05:11FromDiscord<Stuffe> Perfect!
05:05:13FromDiscord<Stuffe> thank you
05:05:14FromDiscord<Yardanico> and yeah, you don't need "box" in this case as it doesn't work the way you want anyway
05:05:28FromDiscord<Stuffe> ok, got it
05:05:44FromDiscord<Yardanico> there are also view types, but they're still in an experimental phase https://nim-lang.org/docs/manual_experimental.html#view-types
05:05:49FromDiscord<garett> https://play.nim-lang.org/#ix=3zTB
05:05:51FromDiscord<Rika> yeah you need the ref type outside the proc so you can still see the changes...
05:06:26FromDiscord<Stuffe> Ok I understand it now. Thanks guys 🙂
05:06:49FromDiscord<garett> ref T in Nim is not like T& in C++
05:06:54FromDiscord<Rika> do you come from rust? just asking this feels like it
05:07:24FromDiscord<garett> ref T is more like shared_ptr<T>
05:07:30FromDiscord<Elegantbeef> Ref is just a gc managed pointer
05:07:42FromDiscord<Yardanico> In reply to @garett "ref T in Nim": well obviously, ref T is a managed reference, but T& is taking a raw pointer
05:07:58FromDiscord<Rika> its not so obvious to otehr people
05:08:07FromDiscord<Yardanico> nim has `addr` (that is unsafe) if you need to take a raw pointer of something
05:10:02FromDiscord<garett> Not to surprising that someone coming from C++ might think a Nim ref is like a C++ “reference”
05:10:13FromDiscord<garett> (edit) "to" => "too"
05:10:35FromDiscord<Rika> yeah
05:11:36FromDiscord<garett> I had some fun figuring out how to safely manage raw pointer life cycle in Nim when getting started
05:12:00FromDiscord<garett> Especially if you want the pointer to be owned by a closure
05:13:34FromDiscord<garett> The ‘reset‘ keyword and `=destroy` together can make it work
05:16:18FromDiscord<garett> Closures are super nice to work with, but they are managed memory
05:17:11FromDiscord<garett> Nim has a few syntactic bits that are a bit ugly, but mostly I really enjoy reading and writing it
05:49:00FromDiscord<wizardlink> :tooruThinking:
05:49:08FromDiscord<wizardlink> is it possible to do multiline conditions?
05:49:48FromDiscord<wizardlink> I've been trying to figure out how I'd do `if ... and ...` with multiline but couldn't find an answer
05:49:57FromDiscord<Elegantbeef> new line after `and` or `or`
05:50:16FromDiscord<Elegantbeef> Operators can new line fine
05:50:51FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3zTL
05:51:21FromDiscord<wizardlink> I... Didn't think about that. What is the technical reason for that? Just curious really.
05:51:59FromDiscord<wizardlink> sent a code paste, see https://play.nim-lang.org/#ix=3zTM
05:52:03FromDiscord<Elegantbeef> I imagine just how operators work
05:52:04FromDiscord<wizardlink> (edit) "https://play.nim-lang.org/#ix=3zTM" => "https://paste.rs/beb"
05:52:31FromDiscord<Elegantbeef> when you hit an operator you know the next thing needs to be a statement
05:53:12FromDiscord<Elegantbeef> And that applies to all operators except postfix ones
05:53:24FromDiscord<Elegantbeef> But there is only a few postfix operators
05:55:18FromDiscord<wizardlink> Yes, that makes sense actually.
05:55:39FromDiscord<wizardlink> Thanks beef! Have a good one. :Daijobu:
05:56:12FromDiscord<Elegantbeef> No problem, surprised those emojis make it across the bridge
05:56:55FromDiscord<Gumber> In reply to @garett "I had some fun": I haven't seen you around the community much but it's good to have another C++ dev using Nim 🙂
05:57:11FromDiscord<Gumber> and if you've been around for a while - I apologize, I just have been very like busy with life
05:57:14FromDiscord<Gumber> going through some shit atm
05:57:32FromDiscord<garett> Thanks, I’ve grown tired of all the curly braces
05:57:34FromDiscord<Elegantbeef> And he never says it's good to see me using nim so you best take that happiness 😛
05:57:45FromDiscord<Gumber> but glad you're using Nim and glad you are using Vulkan because I'm writing my renderer right now using https://github.com/martty/vuk + vkbootsrap atm
05:57:47nrds<R2D299> itHub: 7"vuk - A rendergraph-based abstraction for Vulkan"
05:57:52FromDiscord<Gumber> lol I love beef
05:58:18FromDiscord<Gumber> and yeah I had to go through the whole deep drive into Nim's memory model and compare it to my knowledge of C and C++ as well
05:58:25FromDiscord<Gumber> and then like figure out the whole concurrency story
05:58:38FromDiscord<Gumber> and how to write multithreaded code without running into deadlocks and sigsve
05:58:42FromDiscord<Gumber> (edit) "sigsve" => "sigsevs"
05:58:50FromDiscord<garett> In reply to @Gumber "but glad you're using": Very cool
05:58:52FromDiscord<Gumber> dealt with the Nim runtime pre arc/orc and move semantics and raii semantics
05:59:07FromDiscord<Gumber> so I had to like figure out in my own head why I couldn't run two nim runtimes
05:59:10FromDiscord<Gumber> and build like a plugin system
05:59:18FromDiscord<Gumber> figured out eventually it was all because like each runtime as a gc
05:59:20FromDiscord<Gumber> and they stop on one another
05:59:31FromDiscord<Gumber> and there''s a flag to not include the gc in the nim runtime if you're building a shared lib
05:59:32FromDiscord<Rika> In reply to @Elegantbeef "But there is only": a few? only one you mean?
05:59:34FromDiscord<Gumber> but then half the std lib doesn't work
05:59:47FromDiscord<Gumber> so like I went through all the plains of trying to parallelize work across cores
05:59:54FromDiscord<Gumber> and just like stumbled for years with it and Nim
06:00:02FromDiscord<Gumber> and then arc / orc arrived and EVERYTHING changed
06:00:11FromDiscord<Gumber> I just didn't grok everything about low level stuff back then and now I do
06:00:20FromDiscord<Gumber> autodidact so top down
06:00:27FromDiscord<Gumber> and really bad adult ADHD that I just figured out a few weeks ago
06:00:34FromDiscord<Gumber> so like learning it for me took a LONG time and was hell
06:00:39FromDiscord<Gumber> but now I love using Nim with C and C++
06:00:50FromDiscord<Gumber> game and game engine is finally coming along after like six years of rewrites and R&D
06:01:01FromDiscord<Gumber> and Nim is fitting the bill VERY nicely
06:01:03FromDiscord<garett> I like orc, don’t use much ref types yet other than closures
06:01:06FromDiscord<Elegantbeef> Oh right i was going to abuse myself to try and fix your C++ bug
06:01:20FromDiscord<Elegantbeef> Look at these people using closures
06:01:23FromDiscord<Gumber> I basically use manually memory allocation for everything that I think might cross a thread boundary
06:01:33FromDiscord<Gumber> and before I really understood closure iterators
06:01:47FromDiscord<Gumber> I wrote myself a multithreaded job system in Nim using fibers implemented in boost context lib with assembly
06:01:57FromDiscord<Gumber> and I just would get a version of it without all the bost crap in it
06:01:59FromDiscord<Elegantbeef> I pretty much never use closures, though do use a CPS iterator for my window manager layout engine
06:02:08FromDiscord<Gumber> so it was just the assembly for each cpu arch / instruction set
06:02:12FromDiscord<Rika> closures are very useful
06:02:15FromDiscord<Gumber> and I could wrap that with nim
06:02:18FromDiscord<Gumber> compile it to object files
06:02:19FromDiscord<Gumber> interop with it
06:02:26FromDiscord<Gumber> and I had fibers on like linux and mac and windows now
06:02:29FromDiscord<garett> I’m a Luddite using VirtualAlloc/map for any allocation 😛
06:02:33FromDiscord<Elegantbeef> Uh oh rika going to lose their mind about my limited closure usage
06:02:38FromDiscord<Gumber> heh hey I feel you
06:02:50FromDiscord<Gumber> I mean manual memory allocation is nice because then you can do sstuff like track leaks
06:02:54FromDiscord<Rika> In reply to @Elegantbeef "Uh oh rika going": i already lose my mind from you existing
06:02:56FromDiscord<Gumber> and analyze memory usage by subsystem etc
06:03:04FromDiscord<Gumber> but when you start mixing managed and manual memory
06:03:18FromDiscord<Gumber> you just like have to do it right and make sure you think about what you're doing more closely - I feel like anyway
06:03:27FromDiscord<Elegantbeef> Fuck yea never knew my existence brought so much displeasure, i now have a reason to live!
06:03:31FromDiscord<Gumber> this is my first time working in this type of hybrid approach so I'm still figuring things out
06:04:00FromDiscord<Gumber> but I def lean very heavliy on malloc and pointers
06:04:06FromDiscord<garett> Sounds like you’ve written some cool stuff
06:04:23FromDiscord<Gumber> and less on the Nim runtime unless it's in userland or I know it just will stay on a single thread and doesn't require any shared memory
06:04:33FromDiscord<Gumber> https://github.com/zacharycarter is my github
06:04:39FromDiscord<Gumber> lots of dead projects on there but it's just like all prototype R&D stuff
06:04:47FromDiscord<Gumber> trying out different techniques and building differnt subsystems
06:04:57FromDiscord<Gumber> last piece is the renderer and I'm getting to the point where I"m drawing things now
06:05:03FromDiscord<Gumber> and have a render graph implementation under the hood
06:05:09FromDiscord<Gumber> so a very nice abstraction to sit on top of vulkan
06:05:26FromDiscord<Gumber> and once that is done, the actual game dev begins - so alpha should be sometime next year I think
06:05:58FromDiscord<Gumber> and https://zacattack.io/ is my website that hasn't been updated in like 4 years or so haha
06:06:00FromDiscord<garett> https://github.com/garettbass is where my projects go to die
06:06:03FromDiscord<Gumber> but it has some of my llke really early gamedev work on it
06:06:07FromDiscord<Gumber> 😄
06:06:32FromDiscord<Gumber> oh wow
06:06:35FromDiscord<Gumber> you just worked on bloodlines haha okay
06:06:57FromDiscord<Gumber> was just looking at that on steam like a day or two ago
06:07:01FromDiscord<Gumber> nice
06:07:04FromDiscord<Gumber> game looks very cool!
06:07:10FromDiscord<garett> https://garettbass.com is not as slick as your site
06:07:18FromDiscord<Gumber> eh I did web dev for years
06:07:24FromDiscord<Gumber> and while I"m like terrible at aesthetics and design
06:07:30FromDiscord<Gumber> I can cobble something together that looks okay
06:07:38FromDiscord<Gumber> plus like a lot of nimmers helped me with feedback and design tips and shit so it wasn't all me for sure
06:07:44FromDiscord<Gumber> and it still looks like barf but whatever
06:07:50FromDiscord<Gumber> I stopped paying the bills on it
06:08:05FromDiscord<garett> Working on Rec Room these days. Bloodlines 2 was a sinking ship
06:08:07FromDiscord<Gumber> I'm out of gamedev and happy about it (profesionally) and I don't feel like I need to advertise myself anymore, I'm old now and I like my job
06:08:22FromDiscord<Gumber> I saw a lot of negative feedback around bloodlines and like perf optimizatoina nd stuff
06:08:25FromDiscord<Gumber> (edit) "optimizatoina nd" => "optimizatoin and"
06:08:30FromDiscord<Gumber> but I didn't want to say anything xD
06:08:42FromDiscord<Elegantbeef> shit devs
06:09:01FromDiscord<Gumber> rec room looks cool
06:09:16FromDiscord<Gumber> in 2019 / 2020 I was working for -
06:09:18FromDiscord<Gumber> https://frogmind.com/
06:09:20FromDiscord<garett> Game was beautiful, art and level design were solid, but the engineering was very junior
06:09:29FromDiscord<Gumber> and they had just started that hypehype early access project
06:09:43FromDiscord<Gumber> like when i had to leave, we had just finished cooking up an alpha for it
06:09:47FromDiscord<garett> (edit) "Game" => "Bloodlines 2"
06:09:52FromDiscord<Gumber> and were like starting to make plans for an eventual soft launch
06:10:10FromDiscord<Gumber> In reply to @garett "Bloodlines 2 was beautiful,": that was kind of the impression I was left with from reading steam reviews but I didn't want to jump to conclusions
06:10:27FromDiscord<Gumber> I was thinking about giving it a shot eventually, I just haven't had any time lately to game
06:10:34FromDiscord<Gumber> but now that you've said that I guess I probably will pass
06:11:39FromDiscord<garett> Still, I got to do some fun stuff. Made an IMGUI for Unreal that made some really complex tools super easy to write
06:13:25FromDiscord<garett> The timeline in that animation tool is all custom IMGUI, which let me live recompile the GUI while the Unreal editor was running
06:13:49FromDiscord<garett> Super fast iteration 😊
06:14:55FromDiscord<garett> Games I’ve enjoyed this year are Valheim, Jupiter Hell, and Deathloop
06:16:23FromDiscord<garett> @Gumber what is your Twitter handle?
06:16:51FromDiscord<Gumber> Nice that does sound fun and like an interesting project
06:16:54FromDiscord<Gumber> I haven't really played many games
06:16:57FromDiscord<Gumber> I got super deep into COH2
06:17:03FromDiscord<Gumber> and Crowfall for a minute but that game was terible
06:17:11FromDiscord<Gumber> I'm very weird with games because of my ADHD
06:17:14FromDiscord<cabboose> Aw zach you have a cockatoo
06:17:14FromDiscord<cabboose> what a bro
06:17:20FromDiscord<cabboose> I have a wiero and a sun conure
06:17:23FromDiscord<Gumber> I have a real rough time sitting thorugh a single player game
06:17:26FromDiscord<Gumber> nice!!!
06:17:29FromDiscord<Gumber> https://twitter.com/hahaitsfunny
06:17:34FromDiscord<Gumber> it was my parents bird - I loved it it was my bff
06:17:48FromDiscord<Gumber> but like it had issues - and honestly like armed with the knowledge I have now
06:17:54FromDiscord<Gumber> I think like all my pets have had major issues because of me lol
06:18:05FromDiscord<Gumber> and potentially the other half of my family that I supsect has ADHD
06:18:09FromDiscord<cabboose> Awww shit dawg it was even named pearl
06:18:10FromDiscord<Gumber> because like now I can see that shit in my dogs lol
06:18:13FromDiscord<cabboose> my wiero is pearl hahahaha
06:18:15FromDiscord<Gumber> it was named pearl yuup
06:18:16FromDiscord<Gumber> hahahaha
06:18:18FromDiscord<cabboose> Oh lord
06:18:19FromDiscord<Gumber> crazy shit man
06:18:26FromDiscord<Gumber> but yeah the bird had issues
06:18:30FromDiscord<Gumber> and when my parents got older
06:18:41FromDiscord<garett> G’night folks
06:18:46FromDiscord<Gumber> they like couldn't go into the other room to watch tv because it would just squack loud af constantly when it was alone by itself in a room
06:18:55FromDiscord<Gumber> In reply to @garett "G’night folks": Night! I"m about to hit the hay too
06:19:00FromDiscord<cabboose> ima\_0a09814.jpeg https://media.discordapp.net/attachments/371759389889003532/891207139870277682/ima_0a09814.jpeg
06:19:02FromDiscord<Gumber> but it loved me and I loved it
06:19:12FromDiscord<Gumber> lol awwww what a cuite!
06:19:21FromDiscord<Gumber> yeah I might have to get another one once I get my ADHD under control
06:19:25FromDiscord<Gumber> and if my wife will let me
06:19:28FromDiscord<Gumber> we'll see
06:19:41FromDiscord<Gumber> I feel like now I have the capacity to like work with my dogs
06:19:44FromDiscord<cabboose> I think birds always hate being alone though
06:19:51FromDiscord<Gumber> whereas before I would just like get furstrated bey ond ability to work with them aftert like 2 minutes
06:19:57FromDiscord<Gumber> and no routine whatsoever
06:20:02FromDiscord<Gumber> yeah but this was like
06:20:04FromDiscord<Gumber> it's in the kitchen
06:20:07FromDiscord<Rika> #offtopic
06:20:08FromDiscord<Gumber> and we're in a room over
06:20:08FromDiscord<Gumber> that's open
06:20:14FromDiscord<Gumber> no one's talking about Nim anymore lol
06:20:22FromDiscord<cabboose> I can’t go into offtopic on matrix
06:20:23FromDiscord<cabboose> sucked in
06:20:23FromDiscord<Yardanico> huh https://news.ycombinator.com/item?id=28626947
06:20:25FromDiscord<cabboose> I do have to go though
06:20:26FromDiscord<Rika> that doesnt change the fact that this is offtopic?
06:20:28FromDiscord<Yardanico> (don't upvote from the direct link)
06:20:34FromDiscord<Yardanico> In reply to @cabboose "I can’t go into": you can though
06:20:35FromDiscord<Gumber> yeah but its like late no one is on
06:20:42FromDiscord<Gumber> generally in this setting
06:20:43FromDiscord<Gumber> we've allowed this stuff
06:20:46FromDiscord<Yardanico> In reply to @Gumber "yeah but its like": it's morning in EU
06:20:53FromDiscord<Gumber> yeah I mean if discussion starts up
06:20:54FromDiscord<Gumber> I'lls top but
06:20:58FromDiscord<Gumber> like traditionally this stuff is okay
06:21:06FromDiscord<Yardanico> i mean sure there's not a lot of people here, but IMO it's not a good idea to use main for offtopic so much when there's no one around here
06:21:07FromDiscord<Gumber> fine if we want to change or start enforcing stuff but like
06:21:14FromDiscord<Gumber> okay that's fine
06:21:19FromDiscord<Gumber> let's just like communicate that
06:21:23FromDiscord<Gumber> and not just like #offtopoic people
06:21:29FromDiscord<Gumber> (edit) "#offtopoic" => "#offtopic"
06:21:37FromDiscord<Gumber> because that's not the way it's been for a long time
06:22:20FromDiscord<Gumber> anyway I gotta go to sleep - not trying to be a dick or anything it's just inconsistent rules confuse me
06:22:47FromDiscord<Gumber> will stick to ot from now on
06:22:51FromDiscord<Gumber> and actively ask people to do the same
06:23:00FromDiscord<Gumber> or do my best to anyway - not perfect
06:23:32FromDiscord<xflywind> I saw the article, isn't the two example a bit different?
06:24:05FromDiscord<Gumber> nightr
06:24:07FromDiscord<Gumber> (edit) "nightr" => "night"
06:24:16FromDiscord<cabboose> gnight!
06:24:23FromDiscord<Yardanico> In reply to @flywind "I saw the article,": are they?
06:24:44FromDiscord<Yardanico> they both iterate over lines of the file
06:24:45FromDiscord<xflywind> `line.rstrip():` ?
06:24:45FromDiscord<cabboose> Seems like we should make a super optimised bioinformetrics module
06:25:05FromDiscord<Yardanico> In reply to @flywind "`line.rstrip():` ?": oh yeah, true
06:25:27FromDiscord<Yardanico> guess Python also includes the newline character when iterating over a file like that?
06:25:34FromDiscord<Rika> idts
06:26:06FromDiscord<Rika> i dont remember seeing newlines on my python programs when iterating over lines
06:26:06FromDiscord<cabboose> looks lets stop talking about python and start talking about whatever the hell this scikit is and wheres our damn scikit!
06:26:20FromDiscord<cabboose> GiVe Me JuIcY sCiEnCe PeOpLe
06:26:25FromDiscord<Yardanico> we have #science
06:26:35FromDiscord<Yardanico> and it's bridged to matrix
06:26:36FromDiscord<Rika> juicy science people or juicy science, people
06:26:53FromDiscord<cabboose> either or
06:26:54FromDiscord<Rika> are you hungry for juicy science people aka scientists
06:26:55FromDiscord<cabboose> I’m famished
06:26:59FromDiscord<Rika> god damn
06:27:01FromDiscord<cabboose> indeed
06:28:09FromDiscord<Rika> what is still missing in nim thats in scikit
06:28:18FromDiscord<Rika> nim['s third party packages]
06:28:27FromDiscord<Elegantbeef> Zach isnt this your issue minimized? https://play.nim-lang.org/#ix=3zTT
06:32:38FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3zTZ
06:32:45FromDiscord<Elegantbeef> @Gumber\: ^
06:34:24FromDiscord<Elegantbeef> I do imagine that an imported pointer should be a unique type, but i dont know
06:36:26FromDiscord<xflywind> How about this one? I'm not sure.
06:36:36FromDiscord<xflywind> sent a code paste, see https://play.nim-lang.org/#ix=3zU0
06:36:54FromDiscord<xflywind> (edit) "https://play.nim-lang.org/#ix=3zU0" => "https://play.nim-lang.org/#ix=3zU1"
06:37:39FromDiscord<Elegantbeef> I just wonder if an imported pointer should be a distinct type
06:37:49FromDiscord<Elegantbeef> Implicitly it makes sense
06:38:41FromDiscord<xflywind> That directly using `distinct xxx` doesn't work for importc types is a known issue though. So `AliasImpl` must be used.
06:39:12FromDiscord<Elegantbeef> It's not a tagged issue on github!
06:39:26FromDiscord<Elegantbeef> So this adds a new issue to my internal issue tracker
06:40:48FromDiscord<xflywind> Yeah, maybe it is not severe because no users complained it 😜
06:40:50FromDiscord<xflywind> https://github.com/nim-lang/Nim/pull/18851#discussion_r708830152
06:41:41*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
06:42:23*mal``` quit (Quit: Leaving)
06:42:33FromDiscord<Elegantbeef> Eh it's an issue, would be nice to be documented somewhere
06:42:48FromDiscord<xflywind> I agree
06:42:49FromDiscord<xflywind> jk
06:46:19FromDiscord<Rika> You don’t agree?
06:47:05FromDiscord<Elegantbeef> Think they meant they were kidding about the users complaining
06:47:51FromDiscord<xflywind> lol, I think the problem is severe and should be docuemented.
06:48:25*mal`` joined #nim
06:50:07FromDiscord<xflywind> filed an issue https://github.com/nim-lang/Nim/issues/18896
06:50:37FromDiscord<Elegantbeef> Thanks 😛
06:51:03FromDiscord<xflywind> no problem
06:56:00*Gustavo6046 joined #nim
07:04:20*neurocyte01322 joined #nim
07:04:20*neurocyte01322 quit (Changing host)
07:04:20*neurocyte01322 joined #nim
07:06:14FromDiscord<xflywind> > This rather unorthodox way to do identifier comparisons is called↵> `partial case-insensitivity`:idx: and has some advantages over the conventional↵> case sensitivity:
07:06:32FromDiscord<Rika> Posted where?
07:06:48FromDiscord<xflywind> case insensitivity seemed only to be mentioned in manual
07:06:50*neurocyte0132 quit (Ping timeout: 252 seconds)
07:06:51*neurocyte01322 is now known as neurocyte0132
07:06:55FromDiscord<xflywind> (edit) "case insensitivity seemed only to be mentioned in ... manual" added "Nim"
07:07:02*max22- joined #nim
07:07:08FromDiscord<Rika> Where else should it be mentioned?
07:07:28FromDiscord<Rika> Most people should be directed to the manual first anyway right?
07:07:33FromDiscord<xflywind> In reply to @Yardanico "huh https://news.ycombinator.com/item?id=28626947": The article
07:08:02FromDiscord<xflywind> And is criticized by a user
07:08:45FromDiscord<xflywind> So I think we should mention
07:08:54FromDiscord<xflywind> sent a code paste, see https://play.nim-lang.org/#ix=3zUa
07:09:07FromDiscord<Yardanico> In reply to @flywind "And is criticized by": where?
07:09:08FromDiscord<xflywind> (edit) "mention" => "add this command line to Nim manual"
07:09:14FromDiscord<Rika> There will always be criticism of unorthodox features as long as it exists…
07:09:16FromDiscord<Yardanico> ah I see
07:09:18FromDiscord<Yardanico> In reply to @Rika "There will always be": yeah
07:09:34FromDiscord<Yardanico> sent a long message, see http://ix.io/3zUb
07:10:01FromDiscord<xflywind> It can be overcome by using `--styleCheck:usages`
07:10:20FromDiscord<Rika> A better argument would be showing why that argument is not strong
07:10:33FromDiscord<Rika> (edit) "argument" => "counter-argument"
07:10:38FromDiscord<Elegantbeef> Well there is an issue with tooling presently you cannot have the LSP/suggest give you results in your style
07:11:26FromDiscord<xflywind> Nim compiler code enforces `--styleCheck:nep1`, so the style is consistent.
07:11:26FromDiscord<haxscramper> Someone link treeform genny and pynin
07:11:33FromDiscord<Elegantbeef> Having the ability to force style only really makes sense if you can force it to match your preferred
07:11:36FromDiscord<haxscramper> (edit) "pynin" => "pynim"
07:12:13FromDiscord<Rika> https://news.ycombinator.com/item?id=28651136
07:12:25FromDiscord<Rika> “How is that a basic mistake? I think having two distinct identifiers that differ only by case sounds like a mistake!”
08:18:07FromDiscord<haxscramper> Added some "opinion" to this style-insensetivity-will-destroy-the-world
08:18:11FromDiscord<Goel> Nim `>>` Python
08:20:24FromDiscord<Rika> You should mention that his solution (making it illegal) is subject to the same pitfalls
08:20:38FromDiscord<Rika> Which is why most languages don’t make it illegal…
08:21:03FromDiscord<Rika> Man I don’t get it
08:21:10FromDiscord<Rika> Neither sensitivity or insensitivity are perfect
08:22:04FromDiscord<Rika> His second point is wrong
08:22:39FromDiscord<Rika> His fourth one is invalid as well
08:22:54FromDiscord<Rika> So the only actual issues is the “style debate” and the searching
08:23:24FromDiscord<Rika> The style debate exists in sensitive languages as well
08:23:36FromDiscord<Rika> Searching is the only real good point there
08:26:00FromDiscord<dom96> Oh cool. Nim on HN
08:26:14FromDiscord<haxscramper> And I also linked nimpy/nimpylib/genny
08:26:18FromDiscord<haxscramper> In another comment
08:26:20FromDiscord<Rika> Naturally with the dude arguing about insensitivity
08:26:22FromDiscord<dom96> And yeah, I think you guys were right to suggest #offtopic above
08:31:59FromDiscord<dom96> Honestly. I wish the insensitivity was removed just so we could stop wasting our life arguing about it.
08:34:57FromDiscord<haxscramper> Someone just make a copy-pasteable template on github wiki
08:35:49FromDiscord<haxscramper> "nim troll bingo"
08:36:08FromDiscord<haxscramper> ● style insensetivity↵● imports↵● tabs/spaces
08:36:36FromDiscord<haxscramper> Hmm, for some reason I think that most of those are from python people who just come here trying to defent their poor-ass language choices
08:36:36FromDiscord<Rika> Needs more
08:36:48FromDiscord<xflywind> there is a criticism section https://github.com/nim-lang/Nim/wiki/Common-Criticisms
08:36:49FromDiscord<Rika> Hey let’s not assume
08:36:51FromDiscord<haxscramper> But it is probably just my imagination
08:37:41FromDiscord<NullCode> In reply to @haxscramper "● style insensetivity ●": imports lmao
08:37:50FromDiscord<NullCode> why are people even complaining about it
08:37:59FromDiscord<Rika> Because it is not qualified by default
08:38:02FromDiscord<haxscramper> Because this is just hardwired to them at the point
08:38:11FromDiscord<Rika> Aka you don’t need to pretend the module name before the function
08:38:18FromDiscord<Kermithos> whats the problem with the import system?
08:38:18FromDiscord<NullCode> even i switched from python and i love the current import system
08:38:25FromDiscord<NullCode> (edit) "current" => "nim"
08:38:26FromDiscord<Rika> Which Python people think is weird because it’s not what they’re used to
08:38:38FromDiscord<NullCode> can't you do module.proc() too?
08:38:41FromDiscord<haxscramper> If you don't write `os.paths` everywhere it will destroy the world↵(@Kermithos)
08:38:42FromDiscord<Rika> Whatever me too I came from Python and would prefer Nim much much much more
08:38:45FromDiscord<haxscramper> nobody can read your code
08:38:47FromDiscord<NullCode> (edit) "can't you do module.proc() ... too?" added "in nim"
08:38:49FromDiscord<Rika> In reply to @NullCode "can't you do module.proc()": You CAN
08:38:55FromDiscord<Rika> But they don’t want it to be a can
08:38:55FromDiscord<NullCode> what the fuck
08:38:58FromDiscord<Rika> They want it to be a must
08:39:00FromDiscord<Rika> I don’t know
08:39:00FromDiscord<NullCode> whats the problem then
08:39:01FromDiscord<Rika> Don’t ask me
08:39:03FromDiscord<Rika> Ask them
08:39:27FromDiscord<Rika> Apparently it’s because it’s easier to find the function but then that is a tooling issue
08:39:29FromDiscord<NullCode> In reply to @haxscramper "nobody can read your": end of humanity
08:39:31FromDiscord<haxscramper> It is "confusing" and "unclear" where proc comes from
08:39:53FromDiscord<haxscramper> Though to be fair, nimsuggest being kind of bad does not really make what I said convincing
08:40:06FromDiscord<haxscramper> becase ffs, with our tooling it might really be a problem
08:40:11FromDiscord<Rika> In reply to @haxscramper "It is "confusing" and": There have been times where this bit me in the ass honestly
08:40:19FromDiscord<Rika> But it wasn’t hard to find it
08:40:20FromDiscord<dom96> Well when the first Python programmers learn “it’s bad to do unqualified imports” of course they get stressed with Nim
08:40:22FromDiscord<Rika> It’s just a search…
08:40:32FromDiscord<dom96> (edit) "Well when the first ... Pythonis" added "thing" | "thingPython programmers learn ... “it’s" added "is"
08:40:37FromDiscord<haxscramper> yeah, `rg` is my friend when working with nim code
08:40:45FromDiscord<NullCode> rg?
08:41:00FromDiscord<haxscramper> https://github.com/BurntSushi/ripgrep
08:41:02nrds<R2D299> itHub: 7"ripgrep recursively searches directories for a regex pattern while respecting your gitignore"
08:41:52FromDiscord<Rika> Rust tools are nice to use
08:41:55FromDiscord<NullCode> thats nice
08:42:01FromDiscord<Rika> Not nice to debug but that’s their job
08:42:05FromDiscord<NullCode> what editors do yall use for nim tho
08:42:09FromDiscord<haxscramper> emacs
08:42:09FromDiscord<Rika> Neovim
08:42:17ehmryacme
08:42:17FromDiscord<haxscramper> 80s gang
08:42:26FromDiscord<haxscramper> most popular is vscode
08:42:27FromDiscord<Rika> Inb4 “ex”
08:42:35FromDiscord<haxscramper> second most popular is vim
08:42:37FromDiscord<NullCode> i was procrastinating on installing vim on win
08:42:40FromDiscord<NullCode> In reply to @haxscramper "most popular is vscode": garbage 20gb ide
08:42:41FromDiscord<Rika> I’m gonna freak out if someone actually uses ex here
08:42:48FromDiscord<haxscramper> In reply to @NullCode "garbage 20gb ide": second best editor
08:42:54FromDiscord<haxscramper> where does 20gb comes from
08:43:03FromDiscord<Rika> In reply to @NullCode "garbage 20gb ide": Visual studio isn’t Vacode
08:43:03FromDiscord<haxscramper> vscode is not visual studio
08:43:06FromDiscord<Rika> Vscode
08:43:19FromDiscord<NullCode> In reply to @haxscramper "vscode is not visual": doesn't vs mean visual studio...
08:43:29FromDiscord<Rika> Yeah you only need 20GB if you’re developing C# xd
08:43:29FromDiscord<NullCode> or did i get this wrong
08:43:38FromDiscord<Rika> Yes but vscode is separate
08:43:42FromDiscord<Rika> From vs
08:43:49FromDiscord<Rika> Yeah it’s confusing
08:43:52FromDiscord<NullCode> how big is vscode then
08:43:52FromDiscord<haxscramper> I also use qtcreator for nim
08:43:53FromDiscord<haxscramper> stometimes
08:43:59FromDiscord<NullCode> In reply to @Rika "Yeah it’s confusing": yeah big time
08:44:11FromDiscord<Rika> But vscode is a lighter code editor
08:45:32FromDiscord<NullCode> 75mb hm
08:45:42FromDiscord<NullCode> well thats an improvement from what I've been thinking
08:45:49FromDiscord<Rika> Well it still is based on electron so it’s not really that light
08:46:00FromDiscord<NullCode> of course
08:46:06FromDiscord<NullCode> man i really hate electron
08:47:06FromDiscord<Rika> Half the hate against electron is IMO unjustified but still
09:05:09ehmrynixpkgs has a nim builder function now https://nixos.org/manual/nixpkgs/unstable/#nim
09:08:52FromDiscord<Rika> Nice
10:05:28FromDiscord<tomck> sent a long message, see http://ix.io/3zUY
10:06:16FromDiscord<tomck> Doesn't even seem to care if i pass it through a pipe, e.g. `nimble run | less` still just prints colours in the compiler output↵↵It's the `--passNim` flag which is failing here, nimble colours are properly disabled
10:09:29ehmryworks fine in acme
10:10:11FromDiscord<tomck> what's acme
10:11:47ehmrynevermind. the best solution to nimble problems that I've found is to not use nimble
10:12:22FromDiscord<tomck> ah↵is there an alternative? is nimble not very good?
10:13:44FromDiscord<dain> In reply to @Rika "i dont remember seeing": they're there, try printing with `repr` and you'll see them
10:13:58FromDiscord<Rika> Okay
10:13:58ehmrytomck: try to use the compiler directly
10:14:18FromDiscord<Rika> ~~speaking of repr that’s one thing I wish Nim distinguished~~
10:14:54FromDiscord<Rika> Wish there were more “standards” on how certain string builders should be named or so
10:15:31FromDiscord<dain> sent a code paste, see https://play.nim-lang.org/#ix=3zV1
10:18:36FromDiscord<dain> speaking of ripgrep, is there an existing tool that takes nim code and does all the case-reduction on identifiers
10:18:44FromDiscord<dain> which could be used as a preprocessor for ripgrep
10:18:52FromDiscord<Rika> Yes
10:18:54FromDiscord<Rika> Oh wait
10:18:59FromDiscord<Yardanico> nimgrep exists :)
10:19:00FromDiscord<Rika> That normalises?
10:19:05FromDiscord<dain> yeah
10:19:07FromDiscord<Rika> Yeah I was going to say that
10:19:12FromDiscord<Rika> But that doesn’t normalise output
10:19:12FromDiscord<dain> leaves everything unchanged except for names
10:19:43FromDiscord<Rika> Don’t think so
10:20:24FromDiscord<dain> you can tell ripgrep "if you run into a .nim file, run this script on the file first and then do the search on whatever that script sends to stdout"
10:20:36FromDiscord<Rika> The thing is
10:20:47FromDiscord<Rika> Every identifier in Nim is subject to the case insensitivity
10:20:57FromDiscord<Rika> (Namely keywords)
10:21:14FromDiscord<Rika> So if you want to troll you can prolly write “tYPE”
10:21:16FromDiscord<Rika> Or so
10:21:40FromDiscord<dain> lol i didnt know that
10:22:11FromDiscord<Rika> So yeah pretty much everything would need to be normalised (of course not in the common case but still lol)
10:47:34FromDiscord<tandy> hmm maybe idk wat im doing here, but im trying to store data to a SQLite db with norm, and ive tried jsony, marshal, frosty for serialisation but they all have compilation erors..
10:47:51FromDiscord<tandy> im serialising complex custom types
10:52:30FromDiscord<haxscramper> well, what are the errors?
10:52:39FromDiscord<haxscramper> I can try to help with jsony
10:55:16FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3zVc
10:55:44FromDiscord<enthus1ast> try to export "service" with \
10:55:46FromDiscord<Rika> Means a field is not exported
10:56:09FromDiscord<tandy> already exported
10:56:11FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3zVd
10:56:24FromDiscord<enthus1ast> the field in the object must also be exported
10:57:09FromDiscord<NullCode> i wanted to ask something
10:57:22FromDiscord<NullCode> i want to statically link libstdcpp and libgcc
10:57:29FromDiscord<NullCode> in a nim prog
10:57:34FromDiscord<NullCode> so that it works on all computers
10:57:44FromDiscord<Yardanico> uh, but why do you need to link those?
10:57:56FromDiscord<NullCode> so that it works on other computers too
10:58:31FromDiscord<NullCode> i was trying this↵`nim c -d:release -d:ssl --passL:"-static -static-libgcc -static-libstdc++" onefile.nim`
10:58:34FromDiscord<NullCode> but it's not working
10:58:39FromDiscord<NullCode> exe remains the same
10:59:37FromDiscord<tandy> this causes errors
10:59:39FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3zVe
10:59:57FromDiscord<tandy> i dont think u can export those
11:00:01FromDiscord<haxscramper> field in the object
11:00:02FromDiscord<enthus1ast> [tandy](https://matrix.to/#/@tandy1000:matrix.org)\: no this is not what i meant,
11:00:06FromDiscord<haxscramper> in the object
11:00:12FromDiscord<enthus1ast> the object you want to serialize
11:00:14FromDiscord<haxscramper> what you have here is `enum`
11:00:24FromDiscord<tandy> ohhhh
11:00:26FromDiscord<tandy> mbmb
11:00:29FromDiscord<tandy> i think i spoted it
11:00:38FromDiscord<tandy> ` case service: Service`
11:00:43FromDiscord<tandy> confused me cos it was in a case
11:11:12FromDiscord<dain> what is the difference between `quote:` and `quote do:` ?
11:12:36FromDiscord<haxscramper> `quote do` works better
11:12:48FromDiscord<haxscramper> And this is not a joke
11:13:31FromDiscord<haxscramper> also, `quote` and `do` are two separate entries, there is no "quote do" construct, they just almost always used togeter
11:14:03NimEventerNew thread by Ggibson: Block-level change default type of int literals?, see https://forum.nim-lang.org/t/8458
11:21:40FromDiscord<dain> oh so what does `do` do
11:22:39FromDiscord<Rika> block parameter
11:22:41FromDiscord<haxscramper> https://forum.nim-lang.org/t/8279
11:22:47FromDiscord<haxscramper> makes quote work better
11:22:56FromDiscord<haxscramper> And this shit is literally how it goes
11:23:04FromDiscord<haxscramper> > ↵> The do here binds the body to the quote whereas otherwise it's bound to the add operation which is clearly not what we want.↵>
11:23:16FromDiscord<Rika> Ah binding
11:23:18FromDiscord<Rika> That’s so iffy
11:23:22FromDiscord<haxscramper> It affects binding precedence of the parsing
11:23:23FromDiscord<haxscramper> yeah
11:23:43FromDiscord<haxscramper> explaining it basically gives no understanding, so there is just "magic" and it works better with do
11:23:58FromDiscord<haxscramper> otherwise you just into parsing rules etc.
11:24:19FromDiscord<Rika> Needs a rework but oh well Nim 2 it is
11:25:24FromDiscord<haxscramper> I'm like 80% convinced we won't be getting it in nim 2.0 or anywhere
11:25:44FromDiscord<haxscramper> The same reason for the handling of `:` and post expression blocks
11:26:03FromDiscord<haxscramper> That is currenly only held together by someone else's code being in the "important packages"
11:27:28FromDiscord<Rika> And a 2 would just fragment the language like Python…
11:45:15FromDiscord<impbox [ftsf]> In reply to @NullCode "so that it works": That's not going to work on all computers, maybe use the js backend if you want that.
11:47:22FromDiscord<Yardanico> :blobcatSweatSmile:
12:00:42FromDiscord<NullCode> In reply to @impbox "That's not going to": sigh how can i make a portable win executable then
12:02:25FromDiscord<Yardanico> In reply to @NullCode "sigh how can i": he was joking about how you said "all computers"
12:02:36FromDiscord<NullCode> oh
12:02:59FromDiscord<NullCode> yeah he had the right to make a joke out of it
12:03:07FromDiscord<NullCode> shouldve explicitly said "win computers"
12:03:16FromDiscord<Yardanico> windows 1.0 too? :P
12:03:24FromDiscord<NullCode> does anybody even use that
12:03:26FromDiscord<NullCode> lmao
12:03:34FromDiscord<Yardanico> people still use winxp, yes
12:03:43FromDiscord<NullCode> yes ofc they use xp
12:03:56FromDiscord<NullCode> but i have a hard time believing they use any of the dos versions of windows/dos itself
12:06:01*supakeen quit (Quit: WeeChat 3.3)
12:06:30*supakeen joined #nim
12:08:49FromDiscord<enthus1ast> a lot of POS (Point of Sales systems) where still DOS (with added/hacked in network stack etc...)↵(@NullCode)
12:30:39FromDiscord<haxscramper> sent a long message, see http://ix.io/3zVw
12:31:20FromDiscord<haxscramper> I mean sure, even considering they are like SSS-tier troll that specializes in language syntax holywars
12:31:38FromDiscord<haxscramper> Have anyone regretted style insensitivity?
12:31:46FromDiscord<haxscramper> Just curious
12:36:21FromDiscord<Rika> i have not
12:36:24FromDiscord<auxym> I mostly don't notice it (ie don't make use of it), so pretty indifferent
12:36:45FromDiscord<auxym> It never fails to come up in HN comments when something about Nim makes the front page, though
12:37:01FromDiscord<Rika> yes
12:37:06FromDiscord<Rika> theory vs practice
12:37:08FromDiscord<Rika> classic
12:37:14FromDiscord<Rika> also you should mention how old nim is
12:37:26FromDiscord<Rika> "decision they will regret" should have happened years ago
12:38:22*kayabaNerve quit (Ping timeout: 252 seconds)
12:40:02FromDiscord<dain> it is weird that nim still has a recommended casing style
12:40:08FromDiscord<dain> despite the style insensitivity
12:42:51FromDiscord<haxscramper> It is not weird to have conventions
12:43:17FromDiscord<haxscramper> The fact you can write code differently does not mean you should
12:43:27FromDiscord<haxscramper> We just don't beat you into it
12:43:33FromDiscord<haxscramper> Like other languages do
12:44:00FromDiscord<Rika> exceptwhenitcomestotabsorspacesbutwhatever
12:44:17FromDiscord<Rika> THAT is the one issue i have with this formatting war w/e
12:44:26FromDiscord<Rika> what's up with the tabs ban?
12:44:36FromDiscord<haxscramper> You want tabs?
12:45:02FromDiscord<haxscramper> I mean I don't give a damn about this, they all look similar to me
12:45:05FromDiscord<Rika> personally i use spaces but if you already allow for style insensitivity why is there a tabs ban?
12:45:11FromDiscord<Rika> its like
12:45:13FromDiscord<Rika> ass backwards
12:45:16FromDiscord<Rika> if you know what i mean
12:46:15FromDiscord<haxscramper> No. Tabs are visually identical, but behave differently. Style thing is visually different but works identically
12:46:26FromDiscord<haxscramper> I'm generalizing of course
12:46:55FromDiscord<haxscramper> I don't understand how python does their nesting while allowing both tabs and spaces
12:47:13FromDiscord<haxscramper> Is there some config that tells python how much ident levels is a single tab?
12:47:49FromDiscord<Rika> In reply to @haxscramper "No. Tabs are visually": idgi↵would be nice to elaborate
12:47:51FromDiscord<haxscramper> Because \tfor... followed by for might mean anything
12:48:50FromDiscord<Rika> i mean cant there be a "no mixing" w/o bannign tabs wholly
12:50:42*xet7 quit (Remote host closed the connection)
12:51:38*xet7 joined #nim
12:51:52FromDiscord<haxscramper> sent a long message, see http://ix.io/3zVG
12:52:04FromDiscord<haxscramper> How this "no mixing but no banning" even supposed to work?
12:52:20FromDiscord<xflywind> https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces
12:52:22FromDiscord<haxscramper> All lines in file must either start with space or tav
12:52:39FromDiscord<haxscramper> > Python disallows mixing tabs and spaces for indentation.
12:52:46FromDiscord<haxscramper> Still not clear enough
12:53:26FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3zVH
12:53:53FromDiscord<haxscramper> https://bugs.python.org/issue38496
12:54:46FromDiscord<haxscramper> https://stackoverflow.com/questions/36063679/python-3-allows-mixing-spaces-and-tabs#:~:text=spaces%2C%20but%20it%20appears%20that,allowed%20in%20the%20same%20file.
12:55:14FromDiscord<haxscramper> Okay, so they disallow mixing in a single top-level construct because it would be unclear where things start and end
12:56:35FromDiscord<haxscramper> In python 2 this seems to be a complete randomizer https://stackoverflow.com/questions/2034517/pythons-interpretation-of-tabs-and-spaces-to-indent#:~:text=Never%20mix%20tabs%20and%20spaces,converted%20to%20using%20spaces%20exclusively.
12:57:18FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3zVJ
12:58:14FromDiscord<haxscramper> > Tabs are replaced (from left to right) by one to eight spaces such that the total number of characters up to and including the replacement is a multiple of eight (t
12:58:38FromDiscord<Rika> hh this is a difficult issue to fix huh
13:02:00FromDiscord<Rika> https://news.ycombinator.com/item?id=28651951
13:02:06FromDiscord<Rika> i'm confused to this person's arguments
13:02:09FromDiscord<Rika> by
13:02:14FromDiscord<Rika> by this person's arguments
13:06:49*arkurious joined #nim
13:15:33FromDiscord<NullCode> I've got something clearer this time
13:15:37FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/891311978029678612/unknown.png
13:15:46FromDiscord<NullCode> had to wait so long to get my hands on 2nd pc
13:16:33FromDiscord<haxscramper> In reply to @Rika "i'm confused to this": You should ship a special tool that would clean up your mess, and it is better than making your mess a non-issue
13:16:35FromDiscord<enthus1ast> must put the dlls next to your file i guess
13:16:39FromDiscord<haxscramper> This is obvious
13:16:49FromDiscord<haxscramper> Who would not want a topl
13:16:52FromDiscord<haxscramper> Tool
13:17:09FromDiscord<haxscramper> Look at go, they just took it to extreme, and who complains?
13:17:13FromDiscord<haxscramper> I haven't heard any
13:17:18FromDiscord<NullCode> In reply to @enthus1ast "must put the dlls": can i not static link it ;-;
13:17:51FromDiscord<haxscramper> This might have something to do with their agressive evangelism that simply beats everyone into following "One True Style" but hey
13:18:08FromDiscord<haxscramper> I don't have any issues with that as long as this style is the way I likr
13:18:13FromDiscord<haxscramper> Except it is never the case
13:18:17FromDiscord<enthus1ast> yes might work, but ssl is a little yeaaah↵(@NullCode)
13:18:36FromDiscord<NullCode> i see that I'm in some trouble
13:18:42FromDiscord<Rika> In reply to @haxscramper "You should ship a": so hes bothered by code that he doesnt look at or needs to care about being the wrong style he wants?
13:18:42FromDiscord<NullCode> alright then ill do some digging around
13:18:44FromDiscord<NullCode> thanks tho
13:18:54FromDiscord<Rika> ehhhh
13:19:04FromDiscord<enthus1ast> the best way imho is to create an installer↵(@NullCode)
13:19:14FromDiscord<enthus1ast> or distribute with an zip file
13:19:31FromDiscord<haxscramper> In reply to @Rika "so hes bothered by": Yes they want everyone to use the same style, regardless of whether they are affected directly or not
13:19:33FromDiscord<NullCode> zip file's not a bad idea
13:19:37FromDiscord<NullCode> what if i just create a sed
13:19:44FromDiscord<enthus1ast> ?
13:19:49FromDiscord<Rika> a sed?
13:19:56FromDiscord<NullCode> self extracting directory
13:19:59FromDiscord<haxscramper> /bin/sed
13:20:07FromDiscord<Rika> In reply to @haxscramper "Yes they want everyone": eh w/e not worth arguing with further...
13:20:11FromDiscord<NullCode> In reply to @haxscramper "/bin/sed": no lmao
13:20:23FromDiscord<Rika> oh most ppl prolly would say self extracting archive
13:20:26FromDiscord<enthus1ast> i guess its for hacker stuff right?
13:20:39FromDiscord<NullCode> why would it be
13:20:47FromDiscord<NullCode> I'm not learning nim to be a epic haxor
13:20:48FromDiscord<Rika> In reply to @enthus1ast "i guess its for": i can see the legitimate use cases for this
13:20:52FromDiscord<Rika> painless installation...
13:21:00FromDiscord<NullCode> (edit) "a" => "an"
13:21:01FromDiscord<Rika> apple-style
13:21:08FromDiscord<Rika> "just drag and drop and you good"
13:21:18FromDiscord<NullCode> In reply to @Rika "oh most ppl prolly": i heard they were called sed but aight then
13:21:30FromDiscord<NullCode> In reply to @Rika ""just drag and drop": yeah
13:21:38FromDiscord<Rika> yeah sed is gonna be confusing because its also a unix (or was it gnu?) tool
13:21:45FromDiscord<enthus1ast> sent a long message, see http://ix.io/3zVP
13:22:09FromDiscord<Rika> > staticRead then write before execution↵bruh...
13:22:11FromDiscord<Rika> crazy
13:22:17FromDiscord<Rika> might be flagged in AV lol
13:22:20FromDiscord<enthus1ast> or use a library from treeform
13:22:25FromDiscord<enthus1ast> ;)
13:22:37FromDiscord<NullCode> oh yeah i didn't want to do sfx because of av detection
13:22:38FromDiscord<NullCode> now i remember
13:22:41FromDiscord<enthus1ast> https://github.com/treeform/puppy
13:22:43nrds<R2D299> itHub: 7"Puppy fetches HTML pages for Nim."
13:22:51FromDiscord<NullCode> In reply to @enthus1ast "https://github.com/treeform/puppy": whats this
13:22:58FromDiscord<NullCode> well html fetcher
13:23:01FromDiscord<enthus1ast> http download but with os libraries
13:23:12FromDiscord<enthus1ast> no need to ship openssl
13:23:20FromDiscord<NullCode> can i do post requests with this
13:23:28FromDiscord<enthus1ast> yes
13:23:31FromDiscord<NullCode> awesome
13:23:34FromDiscord<NullCode> going with this then
13:24:03FromDiscord<NullCode> thanks a lot
13:25:40FromDiscord<Rika> anything in nim i could use to replace my use of Processing (i'm just generating cool graphics easily)
13:25:49FromDiscord<Rika> no i do not want to deal with the low stuff
13:25:52FromDiscord<Rika> no i dont care if its better
13:27:16FromDiscord<enthus1ast> is this sarcasm? \:D
13:28:10FromDiscord<Rika> no, i'm just here to look for an alternative to Processing in which i dont need to deal with a lot of the low shit because i dont have time to do so
13:28:21FromDiscord<Rika> if you must insist that its the only way then whatever
13:28:28FromDiscord<Rika> still suggest it
13:43:27FromDiscord<NullCode> sent a code paste, see https://play.nim-lang.org/#ix=3zVY
13:43:30FromDiscord<NullCode> well the program works correctly
13:43:34FromDiscord<NullCode> but will this be a problem
13:44:21FromDiscord<Rika> what would that mean?
13:44:36FromDiscord<NullCode> what would what mean
13:44:45FromDiscord<Rika> `Unexpected response body variant type`
13:44:48FromDiscord<cabboose> Unexpected response body variant type
13:45:00FromDiscord<cabboose> i’m guessing its something like the headers didnt specify if it was json or what
13:45:29FromDiscord<NullCode> sent a code paste, see https://play.nim-lang.org/#ix=3zVZ
13:45:30FromDiscord<Rika> In reply to @Rika "no, i'm just here": w/e, i think what i want to do still needs me to go down to opengl level
13:45:34FromDiscord<cabboose> uh
13:45:38FromDiscord<cabboose> you see the problem there right
13:45:41FromDiscord<cabboose> \:)
13:45:56FromDiscord<NullCode> uhhhhhhhhh
13:45:56FromDiscord<Rika> uh did you send json
13:46:01FromDiscord<NullCode> yeah i sent json
13:46:15FromDiscord<cabboose> the issue is that string
13:46:16FromDiscord<cabboose> with a slash
13:46:16FromDiscord<cabboose> put an r before the string
13:46:18FromDiscord<cabboose> raw string
13:46:20FromDiscord<cabboose> or double slash
13:46:21FromDiscord<Rika> no?
13:46:26FromDiscord<cabboose> no?
13:46:29FromDiscord<Rika> / does not need escaping
13:46:34FromDiscord<Rika> \\ does
13:46:41FromDiscord<cabboose> oh
13:46:43FromDiscord<cabboose> huh
13:46:44FromDiscord<Rika> xd
13:46:45FromDiscord<cabboose> my bad then
13:46:47FromDiscord<NullCode> yeah lmao
13:46:48FromDiscord<cabboose> \<3
13:46:54FromDiscord<Rika> dw
13:46:57FromDiscord<Rika> happens
13:46:57FromDiscord<NullCode> thats why i was wondering whats wrong
13:46:58FromDiscord<cabboose> smart ass cabboose
13:47:08FromDiscord<cabboose> hold on what library is this
13:47:12FromDiscord<NullCode> puppy
13:47:13FromDiscord<Rika> https://github.com/treeform/puppy
13:47:15nrds<R2D299> itHub: 7"Puppy fetches HTML pages for Nim."
13:47:18FromDiscord<NullCode> enthusiast recommended
13:47:24FromDiscord<cabboose> alright lemme check it
13:47:43*Gustavo6046 quit (Ping timeout: 252 seconds)
13:50:14FromDiscord<cabboose> have to fix my laptop path directory first; pita
13:50:17FromDiscord<cabboose> still has 1.4.2
13:51:13FromDiscord<Rika> good luck
13:51:24FromDiscord<NullCode> +1
13:51:40FromDiscord<NullCode> sent a code paste, see https://play.nim-lang.org/#ix=3zW2
13:51:40FromDiscord<NullCode> found this in src
13:51:45FromDiscord<NullCode> and i don't understand anything
13:51:56FromDiscord<NullCode> wait what happens if i discard it
13:53:12FromDiscord<NullCode> nope same thing
13:54:11FromDiscord<Rika> i will take a look
13:54:40FromDiscord<NullCode> here take a look↵https://github.com/treeform/puppy/blob/master/src/puppy/winhttp.nim#L168
13:56:49FromDiscord<Rika> probably a windows api thing
13:57:01FromDiscord<Rika> the api returned something puppy didnt expect
13:57:06FromDiscord<Rika> wrt. the response body
13:57:34FromDiscord<NullCode> hm
13:57:37FromDiscord<NullCode> i can roll with this
13:57:54FromDiscord<NullCode> as `discard fetch(post)` is the last line of the program
13:57:59FromDiscord<Rika> dont know anything about windows APIs sorry
13:58:03FromDiscord<NullCode> but having an error untreated sounds bad
13:58:07FromDiscord<NullCode> In reply to @Rika "dont know anything about": nah np
13:58:18FromDiscord<Rika> since its windows theres prolly docs on it
13:58:21FromDiscord<Rika> lmfao
13:58:28FromDiscord<Rika> inb4 30 years old docs
13:58:31FromDiscord<Rika> xd im joking
13:58:33FromDiscord<Rika> hopefully not
13:58:39FromDiscord<NullCode> from the win9x era
13:58:45FromDiscord<NullCode> if we're lucky
13:59:01FromDiscord<NullCode> In reply to @Rika "hopefully not": that does happen with some of the docs
13:59:07FromDiscord<NullCode> left unmaintained for years
13:59:13FromDiscord<Rika> https://docs.microsoft.com/en-us/windows/win32/winhttp/winhttp-c-c---api-reference
13:59:42FromDiscord<enthus1ast> i would also create an issue in the repo
13:59:53FromDiscord<cabboose> Yeah I hate macosx
14:00:01FromDiscord<cabboose> This path shit
14:00:02FromDiscord<NullCode> I've won
14:00:05FromDiscord<Rika> https://docs.microsoft.com/en-us/windows/win32/winhttp/iwinhttprequest-responsebody
14:00:05FromDiscord<cabboose> How do people use this os
14:00:12FromDiscord<NullCode> done
14:00:12FromDiscord<cabboose> Noice
14:00:22FromDiscord<NullCode> sent a code paste, see https://play.nim-lang.org/#ix=3zW4
14:00:29FromDiscord<NullCode> In reply to @cabboose "Yeah I hate macosx": same
14:00:31FromDiscord<Rika> that's just a bandage patch
14:00:45FromDiscord<Rika> my head hurts again ill go for now
14:00:46FromDiscord<cabboose> Yeah
14:00:46FromDiscord<enthus1ast> maybe there is no response body?↵(@NullCode)
14:00:54FromDiscord<Rika> good point
14:01:00FromDiscord<NullCode> never thought about that actually
14:01:03FromDiscord<Rika> check via some app like insomnia
14:01:15FromDiscord<enthus1ast> or burp
14:01:26FromDiscord<Rika> or just like plain curl or w/e idk
14:02:03FromDiscord<NullCode> using curl yeah
14:02:08FromDiscord<NullCode> sounds the laziest
14:02:13FromDiscord<Rika> man windows is such a fuck with its api
14:02:22FromDiscord<NullCode> (edit) "sounds ... theway" added "like" | "likethe laziest ... " added "way"
14:02:28FromDiscord<cabboose> Hey don’t hate on windows
14:02:31FromDiscord<cabboose> I like windows
14:02:32FromDiscord<Rika> im gonna get stressed again looking at this
14:02:36FromDiscord<cabboose> Better than macosx
14:02:40FromDiscord<cabboose> Gives me cancer
14:02:50FromDiscord<cabboose> Finally fixed the path
14:02:56FromDiscord<Rika> congratrs
14:02:58FromDiscord<enthus1ast> every system is $hit in its own ways
14:03:15FromDiscord<Rika> im gonna go do not programming
14:03:19FromDiscord<Rika> might go mad if i dont
14:03:21FromDiscord<auxym> I used to like windows. These day I don't like any OS D:
14:03:30FromDiscord<auxym> In reply to @enthus1ast "every system is $hit": Yeah this
14:06:21FromDiscord<enthus1ast> i could write a multi site long rant about every system\: linux, windows, macox (i have already), freebsd
14:06:31FromDiscord<enthus1ast> but i will not do it \:)
14:07:09*agander_m joined #nim
14:07:48FromDiscord<Rika> In reply to @enthus1ast "i could write a": Oh totally
14:08:03FromDiscord<Rika> All of them are fucked and there’s no way to fix them even if you were to make a new system
14:08:10FromDiscord<NullCode> doesnt look like there are response headers
14:08:15FromDiscord<enthus1ast> TempleOs?
14:08:24FromDiscord<NullCode> In reply to @Rika "All of them are": what if you took every flaw and fixed them
14:08:33FromDiscord<NullCode> (edit) "In reply to @Rika "All of them are": what if you took every flaw ... and" added "with each os"
14:08:34FromDiscord<enthus1ast> in the body?↵(@NullCode)
14:08:35FromDiscord<Rika> You risk including other flaws
14:08:44FromDiscord<tandy> im interested in this too..↵(@Rika)
14:08:44FromDiscord<cabboose> No headers?
14:08:48FromDiscord<cabboose> where are you getting this from
14:08:59FromDiscord<Rika> In reply to @tandy "im interested in this": I ended up just using OpenGL directly
14:09:04FromDiscord<NullCode> ok no wait a bit
14:09:07FromDiscord<NullCode> I'm gonna eat my head
14:09:14FromDiscord<NullCode> curl is a mess to use
14:09:31FromDiscord<Rika> I’d like to know how you would eat your own head
14:09:31FromDiscord<NullCode> downloading insomnia and burp
14:09:53FromDiscord<NullCode> In reply to @Rika "I’d like to know": solid question
14:11:31FromDiscord<enthus1ast> curl --head url
14:11:47FromDiscord<auxym> In reply to @enthus1ast "TempleOs?": That forum thread did get a good chuckle out of me. Had following forgotten about the whole thing
14:11:47FromDiscord<NullCode> not unless it's a post request
14:14:18FromDiscord<NullCode> damn ill just stick with the bandage for now
14:14:20FromDiscord<NullCode> and work on this 2mor
14:14:22FromDiscord<NullCode> hella tired
14:14:27FromDiscord<tandy> madman↵(@Rika)
14:14:30FromDiscord<enthus1ast> curl -D - -d '{"your"\: "data"}' https://google.de
14:14:32FromDiscord<NullCode> thanks for all the help tho
14:14:40FromDiscord<tandy> is there a nim lib for that
14:17:01FromDiscord<tandy> can you do `INSERT IF NOT EXISTS` with norm?
14:17:41FromDiscord<NullCode> In reply to @enthus1ast "curl -D - -d": yes it has headers
14:17:56FromDiscord<NullCode> windows curl was being a bitch
14:18:03FromDiscord<NullCode> downloaded real curl from interwebs
14:18:30FromDiscord<enthus1ast> wsl ftw
14:18:40FromDiscord<enthus1ast> one of the best features of windows 10 imho
14:18:45FromDiscord<NullCode> i agree
14:18:46NimEventerNew Nimble package! matrixsdk - A Matrix (https://matrix.org) client and appservice API wrapper for Nim!, see https://github.com/dylhack/matrix-nim-sdk
14:18:49nrds<R2D299> itHub: 7"[WIP] Matrix client-server and appservice API wrapper"
14:19:03FromDiscord<NullCode> In reply to @NimEventer "New Nimble package! matrixsdk": that is very cool
14:19:39FromDiscord<enthus1ast> ahh yes then i soon can trash my matrix client hacks
14:20:52FromDiscord<enthus1ast> lets see if it wraps libolm, though
14:20:53FromDiscord<tandy> woooo↵(<@709044657232936960_nrds=5b=49=52=43=5d>)
14:21:08FromDiscord<tandy> i can write a chat client for my webapp now \:)↵(<@709044657232936960_=4eim=45venter=5b=49=52=43=5d>)
14:21:16FromDiscord<tandy> dont have to embed hydrogen
14:22:02FromDiscord<NullCode> does this eventer bot send if a normal nim proj is uploaded too?
14:22:10FromDiscord<enthus1ast> withouth libolm no encrypted rooms
14:22:25FromDiscord<joshgoebel> are there tests for async http server?
14:24:31FromDiscord<xflywind> https://github.com/nim-lang/Nim/blob/devel/tests/stdlib/tasynchttpserver.nim
14:24:33FromDiscord<xflywind> ^
14:27:29FromDiscord<Yardanico> In reply to @NullCode "does this eventer bot": no, that would be too spammy
14:27:38FromDiscord<Yardanico> it only sends new packages that are added to nimble
14:27:56FromDiscord<NullCode> i see
14:28:39FromDiscord<Yardanico> the source is in https://github.com/Yardanico/nimeventer/
14:28:42nrds<R2D299> itHub: 7"Posts updates from various Nim communities to various Nim communities :)"
14:30:12FromDiscord<NullCode> ooh you made it
14:30:17FromDiscord<NullCode> nice :D
14:30:17FromDiscord<Yardanico> well it's pretty simple
14:30:56FromDiscord<Dylan> 😳↵(<@709044657232936960_=4eim=45venter=5b=49=52=43=5d>)
14:30:59FromDiscord<Dylan> That was quick
14:31:17FromDiscord<Yardanico> @Dylan do you really want to license that package under GPLv3 or that was just a mistake?
14:31:25FromDiscord<Yardanico> you seem to have GPLv3 specified in the nimble package but there's no LICENSE file
14:32:08FromDiscord<Dylan> yeah I know, I care less about a license right now and more about the code itself. All my projects have a license file under GPL 3
14:32:42FromDiscord<enthus1ast> [Dylan](https://matrix.to/#/@dylhack:newcircuit.io)\: plan to support olm/megolm?
14:32:45FromDiscord<Yardanico> oh ok, it's just that most Nim packages tend to have licenses like MIT or Apache 2 so it might be worth to specify that it's GPLv3 in the readme also :)
14:33:12FromDiscord<cabboose> Yeah I would always assume MIT unless I see otherwise 👀
14:35:11FromDiscord<Dylan> Not yet
14:35:51FromDiscord<Dylan> That will be... fun
14:40:24*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
14:43:29FromDiscord<Dylan> I mean GitHub, nimble.directory, the nimble package, and the package.json attributes all say GPL 3.0↵(@Yardanico)
14:44:14FromDiscord<Dylan> What's wrong with GPL 3 in the Nim community?
14:45:09federico3huh?
14:45:10FromDiscord<cabboose> Nothing wrong with it
14:45:56FromDiscord<Yardanico> @Dylan I didn't say there was anything wrong with it, I just said that most packages were MIT or Apache 2-licensed :)
14:46:42FromDiscord<Rika> Well so what if they are? Why would that warrant a readme change
14:47:18FromDiscord<Dylan> Yeah I mean I don't see the Apache 2 or MIT licensed packages in most of the README's.
14:47:40FromDiscord<enthus1ast> MIT is more freedom i think
14:47:50federico3Dylan: nimble.directory is not making assumptions or usind defaults
14:47:55FromDiscord<Rika> Actually I guess most packages have a “license” header, Apache or not
14:48:12FromDiscord<Rika> Header as in on the readme
14:49:42FromDiscord<cabboose> or a license file
14:50:19FromDiscord<Rika> There is a license file right
14:50:20federico3also the .nimble file usually has the license in it
14:50:22FromDiscord<cabboose> he does have a license file though
14:50:34FromDiscord<cabboose> so no issue
14:50:47federico3Dylan: what are your repos?
14:50:48FromDiscord<cabboose> yeah nah he doesnt have to do anything extra AFAICT
14:51:02FromDiscord<cabboose> he’s gucci
14:51:10FromDiscord<Dylan> I just added it, yeah that makes sense for missing a LICENSE file. Sometimes GPL 3 gets a lot of hate and just making sure it didn't rub anyone the wrong way
14:51:10FromDiscord<Yardanico> yeah, that I said was only a suggestion, nothing more
14:51:35FromDiscord<Dylan> what do you mean?↵(<@709044657232936960_federico3=5b=49=52=43=5d>)
14:52:31FromDiscord<Dylan> Hopefully everyone is fine with it being GPL 3. I mean if a company really wanted to do damage to the protections there's really nothing I could do about it.
14:53:20federico3I certainly am
14:54:52FromDiscord<Rika> Indifferent in my case since I don’t really code as much as others
14:55:29FromDiscord<haxscramper> There is a guy who uses 'private' license
14:55:58federico3what's a "private" license?
14:56:06FromDiscord<Rika> Proprietary?
14:56:12FromDiscord<Dylan> Sorry just had to make sure GPL 3 wasn't going to be the reason the project dies in attractiveness, some people really hate GPL 3
14:56:16FromDiscord<Rika> “Look but no use”?
14:56:26FromDiscord<Dylan> I love GPL 3 because it makes large companies like Discord disclose that they're using open-source software.
14:56:29FromDiscord<Rika> In reply to @Dylan "Sorry just had to": Inevitably it could really
14:56:54federico3a lot of stuff on github is proprietary simply because authors don't put any FLOSS license in the repo
14:57:05FromDiscord<haxscramper> https://github.com/al6x/pl0t/blob/main/license
14:58:02FromDiscord<Rika> Is that legally sound?
14:58:03FromDiscord<haxscramper> Ah yes, proprietary
14:58:21FromDiscord<haxscramper> https://github.com/al6x/pl0t/blob/c0d9ffa7bab6a8f83eaa5ff1340f79b379bb4a99/api/nim/pl0t.nimble#L4
14:58:29federico3Rika: hardly
14:58:45FromDiscord<haxscramper> In reply to @Rika "Is that legally sound?": I'm pretty sure it is not "sound" legally, and it is certainly not what we need in the ecosystem
14:58:50FromDiscord<haxscramper> He published the package
14:58:53FromDiscord<Rika> Yeah always scary using licenses no one has checked
14:59:03FromDiscord<Rika> Well his choice
14:59:08FromDiscord<haxscramper> I wouldn't say anything if he didn't put it on nimble
14:59:49federico3unfortunately there's still no review process around the nimble list
14:59:57FromDiscord<haxscramper> > You can't use this product or any of its parts to build similar service and compete with me.
15:00:07FromDiscord<Dylan> lol
15:00:38FromDiscord<Dylan> > ↵> my competitors are trash, don't even try.↵>
15:00:54FromDiscord<Rika> In reply to @haxscramper "> You can't use": That CANNOT be legally sound
15:01:18federico3Rika: unpopular licenses can be more tricky, but also short licenses usually do not define the terms they use
15:01:58FromDiscord<haxscramper> Also uses snake_case
15:02:03FromDiscord<Rika> Hey
15:02:16FromDiscord<Rika> Not an issue
15:02:27FromDiscord<Rika> I thought we talked about this
15:02:52FromDiscord<Yardanico> @Rika
15:02:53FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/891338975585902622/unknown.png
15:02:56FromDiscord<Dylan> doWe-Have\_a-problemSir?↵(@haxscramper)
15:03:07FromDiscord<Yardanico> nim doesn't support hyphens in identifiers
15:03:16FromDiscord<Yardanico> it did in the past, but only for some short amount of time
15:03:28FromDiscord<haxscramper> sent a code paste, see https://paste.rs/M7D
15:03:49FromDiscord<Rika> In reply to @Yardanico "": I mean sure whatever
15:04:02FromDiscord<Rika> Don’t know whatever the fuck e means in that case
15:04:09FromDiscord<haxscramper> Enum
15:04:32FromDiscord<Yardanico> it's fine when someone uses the SAME style in their whole package
15:04:34FromDiscord<Yardanico> not this https://media.discordapp.net/attachments/371759389889003532/891339401009987665/unknown.png
15:04:38FromDiscord<Yardanico> newJObject yet to_json
15:04:50FromDiscord<Dylan> sent a code paste, see https://paste.rs/RZm
15:04:51FromDiscord<Yardanico> yes
15:05:10federico3I'll leave this here http://www.cs.kent.edu/~jmaletic/papers/ICPC2010-CamelCaseUnderScoreClouds.pdf
15:05:11FromDiscord<Yardanico> if you're not joking, "const" in nim actually means "computed at compile time"
15:05:41FromDiscord<Yardanico> "let" is computed at runtime but the variable itself is immutable
15:05:45FromDiscord<Yardanico> "var" is computed at runtime and mutable
15:05:57FromDiscord<Rika> In reply to @Yardanico "not this": Sorry what’s the stylistic issue here
15:05:59FromDiscord<Yardanico> const/let/var have nothing to do with scoping, it's always the same regardless of whatever you're using
15:06:14FromDiscord<Yardanico> In reply to @Rika "Sorry what’s the stylistic": usage of void↵newJObject yet to_json
15:06:21FromDiscord<Rika> I see lmao
15:06:24FromDiscord<Rika> Didn’t realise
15:06:30FromDiscord<Dylan> yea that's what I ran into lol, I forgot about const evaluated at compile time and I also forgot time can't necessarily be used at compile time.↵(@Yardanico)
15:06:44FromDiscord<Rika> Void usage is okay I would say
15:06:47FromDiscord<Yardanico> well, you can access the time the code was compiled at
15:07:03FromDiscord<Yardanico> with CompileTime and CompileDate constants (defined in the system module which is always imported implicitly)
15:07:21FromDiscord<Yardanico> it's in string format, but yeah
15:10:59FromDiscord<Dylan> I do have a legit question though. Is there any pure library for the HttpClient that supports SSL as well? Currently it relies on native sockets which isn't very pure of you to do (doesn't work in JS).
15:11:23FromDiscord<Dylan> I saw a few PR's that were implementing backend JS HTTP and fetch on the nim-lang repo. They got merged, but where are they now?
15:11:49FromDiscord<cabboose> didnt people link puppy before
15:11:58FromDiscord<xflywind> https://nim-lang.github.io/Nim/jsfetch.html
15:12:20FromDiscord<xflywind> `jshttpclient` is not merged.
15:13:02FromDiscord<Dylan> Oh yeah there it is jsFetch. I saw the PR for that
15:13:43FromDiscord<cabboose> Why does tsan have an issue with threads?
15:13:51FromDiscord<cabboose> I can’t test any multithreading with tsan?
15:13:55FromDiscord<cabboose> thats crazy \:/
15:14:13FromDiscord<cabboose> Do we have alternatives for thread safety analysis?
15:14:14FromDiscord<xflywind> In reply to @flywind "`jshttpclient` is not merged.": https://github.com/nim-lang/Nim/pull/17373
15:15:06FromDiscord<cabboose> I feel like I just spent a week researching cache coherency to get shot in the foot 🤣
15:15:18FromDiscord<cabboose> Make an implementation and I can’t test it rip
15:15:44FromDiscord<cabboose> just creating the Thread and getting it to run makes it die
15:16:09FromDiscord<cabboose> oh actually I wonder if its the var thats passed to it
15:16:12FromDiscord<cabboose> that might do it…
15:16:13FromDiscord<federico3> err... this room is not mirrored with the IRC channel?
15:16:25FromDiscord<cabboose> Hmm?
15:16:26FromDiscord<Rika> It is
15:16:37FromDiscord<cabboose> It should be.
15:16:40FromDiscord<Rika> Did the bot die
15:16:54FromDiscord<cabboose> nooo not the bot
15:17:49FromDiscord<federico3> ah, looks like it is but... through Discord?
15:17:54FromDiscord<Rika> Yes
15:17:58FromDiscord<Rika> Why
15:18:07FromDiscord<Dylan> My first plan after this Matrix library is done is to make Discord bridge.
15:18:16FromDiscord<federico3> that its so weird. Matrix is natively integrated with Libera.chat
15:18:25FromDiscord<Rika> Yardanico already made one
15:18:36FromDiscord<Rika> In reply to @federico3 "that its so weird.": Afaik there were some issues with that
15:18:39FromDiscord<Rika> I don’t know what
15:18:43FromDiscord<federico3> so right now on Matrix there are 2 rooms instead of one
15:18:50FromDiscord<Rika> But there were so that’s why it’s not using that
15:19:26FromDiscord<federico3> #nim-lang\:matrix.org and #nim\:libera.chat (and the latter does not redirect the joins the first one)
15:19:33*federico3 left #nim (#nim)
15:22:20FromDiscord<cabboose> I can confirm that thread analyzers will prove non safety of any nim program on arc that just creates a thread even if it doesnt access global variables and just closes straight away
15:22:29FromDiscord<cabboose> That makes a very unhappy cabboose
15:22:57FromDiscord<cabboose> No one likes an unhappy cabboose
15:25:46FromDiscord<dom96> federico3: https://nim-lang.org/blog/2021/06/19/new-community-home.html
15:26:26FromDiscord<dom96> (Although we've disabled the Telegram<->Matrix bridge)
15:28:45*beshr quit (Remote host closed the connection)
16:08:40FromDiscord<tandy> are you making a library for matrix-js-sdk btw?
16:09:25FromDiscord<tandy> checkout juan carlos's nodejs repo
16:09:43FromDiscord<tandy> he moved his PR that got pushed away by araq to that repo
16:09:53FromDiscord<tandy> i did an indexeddb support pr there too
16:10:22FromDiscord<tandy> i also implemented browser js support for my listenbrainz.org nim library with nim's experimental JS fetch support
16:10:35FromDiscord<tandy> https://github.com/juancarlospaco/nodejs/blob/main/src/nodejs/jsasynchttpclient.nim
16:10:38FromDiscord<Dylan> I could. I was making a TypeScript based Matrix SDK, but there's already one that exists. The current one that exists by turt2live is .... messy. Maybe I might get back to producing one but for now I want to focus on Nim and hopefully keep it 100% pure
16:11:00FromDiscord<tandy> https://gitlab.com/tandy1000/listenbrainz-nim
16:11:25FromDiscord<tandy> i see, i mean will your library compile to the JS backend tho
16:11:27FromDiscord<tandy> for browser support
16:11:48FromDiscord<Dylan> True, I was originally going to do that with Kotlin but Kotlin to JS compiler is really unstable right now which brought me to Nim
16:11:52FromDiscord<Dylan> So I hope to make it 100% pure just for that cause
16:12:25FromDiscord<tandy> pls ping me if you need a hand with JS support, im interested in making it work
16:12:47FromDiscord<enthus1ast> in wnim are multiple "Panels" are supposed to be in one "Frame"?
16:13:41FromDiscord<enthus1ast> is a Panel just a "region" where i can put stuff in and move the whole panel to reposition?
16:13:55FromDiscord<enthus1ast> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/891356572855468122): in wnim are multiple "Panels" supposed to be in one "Frame"?
16:13:56FromDiscord<Dylan> Yeah right now two things\:↵a. Is nim ready for producing javascript libraries?↵b. thanks for linking that library the only thing preventing me from making it 100% pure is the httpclient
16:14:32FromDiscord<tandy> i believe it is, at the moment my listenbrainz-nim compiles to js and works in the browser
16:16:09*Gustavo6046 joined #nim
16:20:18*beshr joined #nim
16:38:38*rockcavera quit (Remote host closed the connection)
16:59:19FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#ix=3zXi
17:01:00FromDiscord<NullCode> oh sure
17:01:06FromDiscord<NullCode> but I'm sorry it will take a while
17:01:11FromDiscord<NullCode> I'm having some regex problems now
17:01:39FromDiscord<NullCode> god why did the `re` stdlib have to be impure
17:05:33FromDiscord<Rika> you can use 3rd party `regex`
17:05:36FromDiscord<Rika> is pure
17:07:25FromDiscord<NullCode> yeah I'm having the time of my life (sarcastic) with regex
17:07:30FromDiscord<NullCode> re was so much better
17:10:45FromDiscord<Rika> ?
17:10:50FromDiscord<Rika> what issues are you having now
17:11:00FromDiscord<NullCode> well first up
17:11:11FromDiscord<NullCode> idu how to use the regex findAll proc
17:11:19FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/891371296024330320/unknown.png
17:11:54FromDiscord<enthus1ast> if one use regex to solve a problem, you now has two problems \:)
17:12:11FromDiscord<Rika> `s/has/have`
17:12:12FromDiscord<NullCode> (wrong image)
17:12:17FromDiscord<NullCode> In reply to @enthus1ast "if one use regex": indeed i do
17:12:20FromDiscord<Rika> i was staring at the image wondering what you mean
17:12:26FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/891371577902526494/unknown.png
17:12:32FromDiscord<NullCode> here's findAll proc
17:12:36FromDiscord<NullCode> In reply to @Rika "i was staring at": I'm sorry
17:13:06FromDiscord<Rika> findall is an iterator (or something returning a seq) of objects containing prolly matches and captures
17:13:26FromDiscord<NullCode> lets see what it is then
17:13:37FromDiscord<enthus1ast> what do you wanna parse?
17:13:41FromDiscord<Rika> m.boundaries -> the mathc boundary i assume
17:13:51FromDiscord<Rika> where you can then use [] on the string to get the substring
17:13:54FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/891371946598596638/unknown.png
17:14:07FromDiscord<NullCode> (edit) "" => "returns a "regexmatch" sequence"
17:14:11FromDiscord<Rika> now look at regexmatch
17:14:36FromDiscord<NullCode> In reply to @enthus1ast "what do you wanna": I'm just practicing using nim, i have some bullshit on a file and I'm trying to parse that for valid emails
17:15:28FromDiscord<enthus1ast> why not just loop through the file and do it by hand? 😊
17:16:06FromDiscord<NullCode> "by hand"?
17:16:10FromDiscord<NullCode> In reply to @Rika "now look at regexmatch": nothing
17:16:16FromDiscord<Rika> nothing??
17:16:48FromDiscord<Rika> does this look like nothing to you https://media.discordapp.net/attachments/371759389889003532/891372675774177300/unknown.png
17:16:53FromDiscord<NullCode> what
17:16:56FromDiscord<NullCode> where did you find this
17:17:02FromDiscord<NullCode> I'm sure i scoured the doc twice
17:17:06FromDiscord<Rika> literally click the type
17:17:14FromDiscord<Rika> you can click the types
17:17:19FromDiscord<NullCode> didn't know lmfao
17:17:38FromDiscord<NullCode> ok so theres captures, orderedtable and a slice
17:18:21FromDiscord<Rika> namedGroups is probably a LUT for captures (seq[seq[Slice[int]]])
17:19:08FromDiscord<NullCode> actually hol'up
17:19:10FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/891373270346109009/unknown.png
17:19:13FromDiscord<NullCode> i think this proc is better
17:19:27FromDiscord<NullCode> returns a seq with everything
17:19:36FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3zXj
17:19:47FromDiscord<Rika> sure that could be better for you
17:20:16FromDiscord<NullCode> it's fine
17:20:17FromDiscord<Rika> sent a code paste, see https://paste.rs/iuj
17:20:23FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/s6b
17:20:39FromDiscord<NullCode> i see
17:20:53FromDiscord<NullCode> but what if theres a string "yougotbam@boozled"
17:20:56FromDiscord<NullCode> life ruined
17:21:09FromDiscord<enthus1ast> which is a valid email?
17:21:23FromDiscord<Rika> not very
17:21:24FromDiscord<NullCode> .suffix when
17:21:28FromDiscord<enthus1ast> it is
17:21:33FromDiscord<Rika> the best way to validate emails is not to use regex
17:21:41FromDiscord<Rika> but to actually check the network...
17:21:41FromDiscord<enthus1ast> boozled is the server, no tld though
17:21:51FromDiscord<NullCode> yeah thats it
17:22:41FromDiscord<enthus1ast> i can send to root@localhost and get a mail \:)↵(@Rika)
17:22:45FromDiscord<dom96> spending effort creating an email validation regex is a waste of time
17:22:50FromDiscord<dom96> just checking for `@` is enough
17:22:51FromDiscord<Rika> true i guess
17:22:58FromDiscord<Rika> In reply to @dom96 "spending effort creating an": yeeeeee
17:23:01FromDiscord<enthus1ast> then, if super fancy
17:23:08FromDiscord<enthus1ast> test for all valid tlds
17:23:12FromDiscord<leorize> you should write an email validation peg instead
17:23:14FromDiscord<enthus1ast> which is a long list these days
17:23:18FromDiscord<Rika> so just dont bother
17:23:40FromDiscord<dom96> why would you bother testing for tlds?
17:23:58FromDiscord<dom96> it will just lead to issues, impossible to have a complete list
17:24:27FromDiscord<enthus1ast> i would (and have somewhere) also replace (at) at etc with @
17:25:04FromDiscord<NullCode> btw findandcaptureall worked
17:25:09FromDiscord<NullCode> sorry for bothering yall
17:25:09FromDiscord<enthus1ast> i was collecting emails from impressums though
17:25:32*naquad joined #nim
17:25:46FromDiscord<enthus1ast> i was collecting emails from impressums though, we where building a database of all big companies, not for spamming, for research mainly
17:26:14naquadhi. how do i create a sequence of named tuples? type Xyz = tuple[...] and then var xyz : seq[Xyz] = @[...] doesn't work as it says that my elements are of wrong type :( what am i doing wrong?
17:26:37FromDiscord<enthus1ast> we've done this the easy way first, then started full blown chrome and talked to it through its debugger interface
17:27:11FromDiscord<Rika> naquad how do you write the elements?
17:27:20FromDiscord<Rika> and what are the types in the tuple
17:27:25naquad@[(version: ..., query: ...)]
17:28:42naquadthe tuple itself: type Migration = tuple[version: int, query: SqlQuery]
17:29:23FromDiscord<Rika> can you give the full error
17:30:30naquadtinkering/nim/db.nim(6, 35) Error: type mismatch: got seq[tuple[version: int, query: SqlQuery]]> but expected 'seq[Migration]'
17:30:44naquadnim is 1.4.8
17:31:28FromDiscord<Rika> is Xyz Migration?
17:32:00naquadyes
17:32:12naquadi thought its something simple and just wrote a dummy name
17:32:27naquadhttps://gist.github.com/1c7425779a93f6a4d3f410402b48ff51 full source if needed
17:32:48FromDiscord<Rika> i will look
17:32:56FromDiscord<Rika> ah
17:33:00FromDiscord<Rika> uint vs int
17:33:14FromDiscord<Rika> you must explicitly put `version: 1.uint`
17:34:27naquaddoh! what a miss. thank you for help, Rika
17:35:23FromDiscord<Rika> np
17:35:40FromDiscord<NullCode> Error: unhandled exception: C:\Users\NullCode\.nimble\pkgs\unicodedb-0.9.0\unicodedb\types.nim(23, 10) `cp.int <= 0x0010FFFF` [AssertionDefect]↵now what is this LMFAO
17:35:49FromDiscord<NullCode> i hate this so much
17:36:20FromDiscord<NullCode> why is unicode interfering when i didn't even import it
17:37:00FromDiscord<NullCode> you know what
17:37:07FromDiscord<NullCode> ignore what i just said/deleted
17:37:21FromDiscord<NullCode> I'm gonna find a way to link pcre32.dll to make `re` work
17:38:08FromDiscord<Rika> have fun
17:38:21FromDiscord<Rika> i have not experienced annoying issues like you are with `regex`
17:38:41FromDiscord<NullCode> either I'm a total moron
17:38:42naquadis there a way to create an array whos length will be determined by Nim based on the initializer rather than specified manually?
17:38:48FromDiscord<NullCode> (edit) "moron" => "moron↵or regex is bad"
17:38:58FromDiscord<NullCode> (edit) "regex" => "`regex`"
17:39:30FromDiscord<Rika> mind elaborating with dummy code
17:39:55FromDiscord<Rika> write what you think should be instead of what compiles, might be easier for me to understand
17:40:28FromDiscord<Rika> In reply to @Rika "i have not experienced": as i say this i realise regex has no backreferencing so 😄
17:40:29FromDiscord<Rika> lmfao
17:41:02FromDiscord<NullCode> https://forum.nim-lang.org/t/495
17:41:12FromDiscord<NullCode> i found guy who had 100% same problem as me
17:41:17FromDiscord<NullCode> and theres no solution DAMN IT
17:41:26FromDiscord<NullCode> (edit) "100%" => "90%" | "90%same problem as me ... " added "(openssl instead of re)"
17:42:22FromDiscord<Rika> i would have suggested static linking but that is hard on windows i believe
17:42:46FromDiscord<NullCode> yeah I'm trying to static link rn
17:42:54FromDiscord<NullCode> (edit) "to" => "to/searching for"
17:44:57FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/891379762046570556/unknown.png
17:44:59FromDiscord<NullCode> "so damn ez"
17:45:13FromDiscord<NullCode> only if they demonstrated how "ez" it was i wouldnt have to suffer
17:51:38FromDiscord<NullCode> ok no i seem to have found something
17:53:32*stkrdknmibalz joined #nim
18:03:18FromDiscord<Rika> https://gist.github.com/k-takata/5124445
18:03:21FromDiscord<Rika> relevant
18:06:07*max22- quit (Ping timeout: 240 seconds)
18:06:55FromDiscord<Dylan> I've created a room for the Matrix Nim SDK [#matrix-nim-sdk\:newcircuit.io](https://matrix.to/#/#matrix-nim-sdk:newcircuit.io)
18:13:09FromDiscord<NullCode> In reply to @Rika "https://gist.github.com/k-takata/5124445": i can almost understand this, and almost not
18:13:27FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/891386933522079774/unknown.png
18:13:32FromDiscord<NullCode> i get confused right around here
18:14:41FromDiscord<Rika> --passc:"-DPCRE_STATIC -" --passl:"-static -lpcre" probably
18:14:58FromDiscord<NullCode> mmhmm mmhmm imma try that
18:15:51FromDiscord<NullCode> nope
18:16:44FromDiscord<NullCode> sent a code paste, see https://play.nim-lang.org/#ix=3zXG
18:16:58FromDiscord<NullCode> cannot find lpcre what can i do about this
18:18:25FromDiscord<Gumber> you need lpcre.dll
18:18:53FromDiscord<Gumber> on your linker's path
18:19:05FromDiscord<Gumber> How'd you install Nim @NullCode ?
18:20:20FromDiscord<NullCode> https://nim-lang.org/install_windows.html
18:20:25FromDiscord<NullCode> downloaded the mingw
18:20:28FromDiscord<NullCode> downloaded nim compiler
18:20:37FromDiscord<NullCode> unzipped and added the directories to path
18:20:39FromDiscord<NullCode> thats about it
18:23:20FromDiscord<NullCode> In reply to @Gumber "on your linker's path": whats the linker's path exactly
18:23:31FromDiscord<NullCode> %MINGW_FOLDER%\bin?
18:24:16FromDiscord<Gumber> I dunno
18:24:18FromDiscord<Gumber> yeah
18:24:26FromDiscord<Gumber> I guess whatever that crazy path is you see in your terminal ol
18:24:28FromDiscord<Gumber> (edit) "ol" => "lol"
18:24:32FromDiscord<Gumber> but I mean you're on windows
18:24:37FromDiscord<Gumber> so you could drop it in a number of places
18:24:53FromDiscord<Gumber> there's also a way to instruct the linker where to find dynamic libraries
18:25:00FromDiscord<Gumber> that's what I meant when I said the linker path @NullCode
18:25:06FromDiscord<NullCode> oh.
18:25:08FromDiscord<Gumber> I didn't mean like, in the same dir
18:25:13FromDiscord<Gumber> also sorry for pinging you when you had dnd on
18:25:21FromDiscord<NullCode> i see I'm gonna go hit the compiler docs then
18:25:26FromDiscord<Gumber> well
18:25:28FromDiscord<Gumber> don't look at the nim compiler docs
18:25:29FromDiscord<NullCode> In reply to @Gumber "also sorry for pinging": dude it's not a problem at all
18:25:39FromDiscord<NullCode> i put in dnd cuz the ping noise is annoying
18:25:40FromDiscord<Gumber> gotta look at ld.exe mingw's docs
18:25:44FromDiscord<Gumber> yeah I feel you
18:25:45FromDiscord<NullCode> In reply to @Gumber "gotta look at ld.exe": oh
18:25:46FromDiscord<Gumber> it helps me
18:25:49FromDiscord<Gumber> cause I have bad ADHD xD
18:26:05FromDiscord<NullCode> (edit) "all" => "all↵i put in dnd cuz the ping noise is annoying"
18:26:11FromDiscord<NullCode> I'm sorry to hear that
18:26:15FromDiscord<Gumber> haha it's all god
18:26:17FromDiscord<Gumber> (edit) "god" => "good"
18:26:35FromDiscord<Gumber> I just found out like a few months ago that that's what was actually wrong iwth me (at 36) and life is way better now
18:26:40FromDiscord<Gumber> even like only a few months after i figured it out
18:26:43FromDiscord<Gumber> or a couple rather
18:26:49FromDiscord<Gumber> but yeah don't be sorry lol be happy if anything 🙂
18:27:04FromDiscord<NullCode> In reply to @Gumber "I just found out": good to know mate
18:27:27FromDiscord<Gumber> yeah really good to know haha, esp for me xD
18:27:36FromDiscord<Gumber> anyway um
18:27:42FromDiscord<Gumber> let me try to help point you in the right direction, one sec...
18:28:12FromDiscord<Gumber> are you using cygwin? or just mingw?
18:28:19FromDiscord<Gumber> like how'd you install Nim I guess is my question?
18:28:45FromDiscord<NullCode> In reply to @Gumber "are you using cygwin?": mingw
18:28:52FromDiscord<Gumber> okay one sec then
18:28:54FromDiscord<NullCode> In reply to @Gumber "like how'd you install": https://media.discordapp.net/attachments/371759389889003532/891390822581432320/unknown.png
18:29:10FromDiscord<Gumber> gotcha
18:29:19FromDiscord<Gumber> what I would recommend is this
18:29:24FromDiscord<Gumber> delete that mingw installation
18:29:30FromDiscord<Gumber> and remove any reference to it in your system path
18:29:36FromDiscord<Gumber> open up the Nim folder you downloaded
18:29:44FromDiscord<Gumber> from the website, right?
18:29:45FromDiscord<Gumber> this one?
18:30:03FromDiscord<Gumber> https://nim-lang.org/install_windows.html
18:30:06FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/891391120922259466/unknown.png
18:30:06FromDiscord<NullCode> this one yea
18:30:08FromDiscord<Gumber> for whichever cpu arch you want
18:30:12FromDiscord<Gumber> you want 32 bit or 64?
18:30:14FromDiscord<NullCode> 32
18:30:17FromDiscord<Gumber> okay
18:30:27FromDiscord<Gumber> what are you writing btw with Nim?
18:30:34FromDiscord<NullCode> im just starting out lmao
18:30:37FromDiscord<Gumber> okay
18:30:41FromDiscord<Gumber> so you prob want x64 to be honest
18:30:47FromDiscord<Gumber> unless you're trying to target a 32 bit cpu
18:30:56FromDiscord<Gumber> which you're most likely not on
18:30:57FromDiscord<NullCode> but i kinda want all my programs to work on everything
18:31:00FromDiscord<Gumber> okay
18:31:05FromDiscord<NullCode> many of my friends have x86 systems
18:31:09FromDiscord<Gumber> well you can still use the 64 bit compiler
18:31:10FromDiscord<NullCode> In reply to @Gumber "which you're most likely": yep I'm on 64
18:31:13FromDiscord<Gumber> and target 32 bit architectures
18:31:21FromDiscord<Gumber> you just need to use the right compile toolchain
18:31:21FromDiscord<NullCode> i see idk how thats done
18:31:29FromDiscord<Gumber> I can help you with that when you need help with that
18:31:30FromDiscord<Gumber> just ask me
18:31:36FromDiscord<Gumber> this is my github btw
18:31:44FromDiscord<NullCode> In reply to @Gumber "I can help you": thanks a lot man
18:31:44FromDiscord<Gumber> https://github.com/zacharycarter
18:31:50FromDiscord<NullCode> but for now lets just do x86
18:31:51FromDiscord<Gumber> so you know who I am
18:31:57FromDiscord<Gumber> okay sure - but what you need to remember is this
18:32:09FromDiscord<NullCode> In reply to @Gumber "so you know who": i see yeah
18:32:27FromDiscord<Gumber> if you're using a 32 bit nim compiler and not a 64 bit one you will need to make sure any other compiler or whatever you might use if you interop etc will have to be 32 bit too
18:32:50FromDiscord<Gumber> actually nevermind
18:32:53FromDiscord<Gumber> I'm conflating things
18:33:02FromDiscord<Gumber> it's just what architecture the Nim compiler was targeted for
18:33:17FromDiscord<NullCode> In reply to @Gumber "if you're using a": yes i will do that
18:33:18FromDiscord<Gumber> okay so yeah download that as you already have 🙂
18:33:28FromDiscord<Gumber> yeah well disregard that lol
18:33:35FromDiscord<NullCode> like i was already done setting up everything
18:33:37FromDiscord<Gumber> it was a mistatement
18:33:40FromDiscord<NullCode> so i delete mingw yes?
18:33:41FromDiscord<Gumber> yeah but here listen real quick
18:33:43FromDiscord<Gumber> yeah
18:33:49FromDiscord<Gumber> you manually installed mingw
18:33:53FromDiscord<NullCode> yeah
18:33:54FromDiscord<Gumber> but Nim can do it for you and set up everything correctly
18:33:58FromDiscord<Gumber> and put it on your system path
18:34:03FromDiscord<Gumber> run finish.exe
18:34:06FromDiscord<Gumber> might have to be in admin mode I dunno
18:34:15FromDiscord<NullCode> In reply to @Gumber "but Nim can do": oh thats nice
18:34:20FromDiscord<Gumber> yeah
18:35:05FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/891392378357837924/unknown.png
18:35:08FromDiscord<NullCode> i see whats happening
18:37:03*max22- joined #nim
18:38:33FromDiscord<NullCode> @Gumber https://media.discordapp.net/attachments/371759389889003532/891393249330221087/unknown.png
18:39:07FromDiscord<Gumber> this is the stdout from `finish.exe`?
18:39:11FromDiscord<NullCode> yes
18:39:50FromDiscord<Gumber> can you share all of the output with me? or is that it?
18:40:19FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/891393694362664970/unknown.png
18:40:33FromDiscord<NullCode> should i send in txt form
18:40:53FromDiscord<NullCode> sent a code paste, see https://play.nim-lang.org/#ix=3zXM
18:40:54FromDiscord<Gumber> so
18:41:04FromDiscord<Gumber> that's the problem
18:41:06FromDiscord<Gumber> it failed to download mingw
18:41:08FromDiscord<Gumber> sent a code paste, see https://play.nim-lang.org/#ix=3zXN
18:41:13FromDiscord<NullCode> yeah it told me to manually download
18:41:17FromDiscord<NullCode> and put it in dist folder
18:41:23FromDiscord<Gumber> okay sec I didn't read that far yet
18:41:27FromDiscord<NullCode> oh
18:41:30FromDiscord<Gumber> sorry
18:41:32FromDiscord<Gumber> lol
18:41:37FromDiscord<NullCode> nah np
18:41:55FromDiscord<Gumber> one sec let me look at my install folder
18:43:05FromDiscord<Gumber> I think the problem might be that you put `Nim` in `Program Files`
18:43:16FromDiscord<Gumber> well I'm just positing
18:43:30FromDiscord<Gumber> but knowing windows and its shell
18:43:41FromDiscord<Gumber> it has a big problem sometimes with spaces in filepaths
18:43:42FromDiscord<NullCode> In reply to @Gumber "I think the problem": hmm yeah that could be it too
18:43:44FromDiscord<Gumber> and requires them to be quoted
18:43:49FromDiscord<Gumber> maybe try moving it and trying again?
18:44:02FromDiscord<Gumber> sorry to make you go through all these steps but I honestly don't know what's wrong
18:44:05FromDiscord<Gumber> if that's the case we can file a bug
18:44:17FromDiscord<Gumber> and if not I have a couple of other ideas
18:45:44FromDiscord<NullCode> In reply to @Gumber "sorry to make you": it's all good lmao
18:45:57FromDiscord<NullCode> I'm gonna create C:\nim and move everything there
18:53:03*Pyautogui joined #nim
18:53:09NimEventerNew post on r/nim by ryati: Good web framework for Nim?, see https://reddit.com/r/nim/comments/pvd3ba/good_web_framework_for_nim/
19:06:55FromDiscord<NullCode> all done
19:09:49naquadis there some small project that i can read through to get the grasp of what is the "nym way"?
19:10:47FromDiscord<NullCode> just create your own stuff for now
19:11:03FromDiscord<NullCode> then improve on them by taking one of the "nym way" as an example
19:11:18FromDiscord<NullCode> thats what i did when i started python
19:11:42naquadwell, i'm looking exactly for an example
19:15:19FromDiscord<NullCode> well
19:15:39FromDiscord<NullCode> theres nothing small afail
19:15:42FromDiscord<NullCode> (edit) "afail" => "afaik"
19:15:49FromDiscord<Rika> Just look at any package
19:15:49FromDiscord<NullCode> you can look at puppy sources
19:15:55FromDiscord<NullCode> he mentioned small proj
19:15:58FromDiscord<Rika> There isn’t really a “Nim way”
19:16:28FromDiscord<NullCode> btw
19:16:41FromDiscord<NullCode> after fully reinstalling nim and everything
19:16:49FromDiscord<NullCode> i still get the thingy lmao
19:17:08FromDiscord<NullCode> sent a code paste, see https://play.nim-lang.org/#ix=3zXT
19:17:13FromDiscord<NullCode> I'm just gonna go fetch nimc docs
19:17:42naquadRika, NullCode, i'll try to find one, maybe in stdlib, maybe in the "puppy" project. thanks
19:17:58FromDiscord<enthus1ast> https://nim-lang.org/docs/tut1.html
19:18:46FromDiscord<enthus1ast> https://narimiran.github.io/nim-basics/
19:19:01FromDiscord<NullCode> In reply to @enthus1ast "https://narimiran.github.io/nim-basics/": this
19:19:11FromDiscord<NullCode> this is the first guide i read for nim
19:19:12FromDiscord<NullCode> it's epic
19:19:31FromDiscord<NullCode> you should download the pdf for reading offline tho
19:20:09FromDiscord<Gumber> ugh
19:20:13FromDiscord<Gumber> okay well
19:20:17FromDiscord<Gumber> I was hoping that would fix it
19:20:19FromDiscord<Gumber> and I'm sorry it didn't
19:20:24naquadi've skimmed through it, i'm now more interested in async stuff and heavy oop (it looks like this is not being used much in Nim)
19:20:57naquadand multithreading
19:21:36FromDiscord<NullCode> In reply to @Gumber "and I'm sorry it": it's fine
19:21:54FromDiscord<Gumber> okay @NullCode I forgot that mingw is basically just gcc/g++
19:22:01FromDiscord<NullCode> yes
19:22:07FromDiscord<Gumber> I use vcc on windows
19:22:36FromDiscord<Gumber> anywho with gcc/g++ you can add folder's to the linker's search path using the `-L` flag when you call `mingw.exe`
19:22:43FromDiscord<Gumber> to do this you have a couple of options
19:23:02FromDiscord<Gumber> but probably the best for you is going to be either drop `pcre.dll` in the same folder as `mingw.exe`
19:23:06FromDiscord<NullCode> also for clarification↵this is the cmd I'm using↵`nim c --passc:"-DPCRE_STATIC" --passl:"-static -lpcre" onefile.nim`
19:23:10FromDiscord<NullCode> In reply to @Gumber "but probably the best": i see
19:23:12FromDiscord<Gumber> or `ld.exe` rather
19:23:19FromDiscord<Gumber> and you should have the path to that
19:23:22FromDiscord<Gumber> in the terminal
19:23:28FromDiscord<Gumber> oh
19:23:33FromDiscord<Gumber> I see
19:23:46FromDiscord<Gumber> so you're trying to statically link pcre okay
19:23:59FromDiscord<Gumber> then you also need `pcre.lib`
19:24:01FromDiscord<Gumber> on Windows
19:24:06FromDiscord<Gumber> and the linker has to be able to find that
19:24:18FromDiscord<Gumber> do you understand the difference between static and dynamic linking?
19:25:13FromDiscord<NullCode> In reply to @Gumber "so you're trying to": yep yep
19:25:26FromDiscord<NullCode> thats what I've been trying to achieve for the past couple hours lma
19:25:37FromDiscord<Gumber> I'm sorry I didn't realize that
19:25:38FromDiscord<Gumber> okay so
19:25:42FromDiscord<Rika> I thought you also did the PCRE part of what I sent you
19:25:51FromDiscord<Gumber> yeah find `pcre.lib` and make sure your linker can find it
19:25:59FromDiscord<Gumber> put `pcre.dll` in your linkers path - it prob already is
19:26:00FromDiscord<Rika> Find or make it
19:26:13FromDiscord<Gumber> well you can probably just download a prebuilt binary of pcre
19:26:19FromDiscord<Gumber> that will include the `.lib` and `.dll` folders
19:26:28FromDiscord<Gumber> but you need to get the same version and cpu arch that nim was compiled with
19:26:31FromDiscord<Gumber> as well as the same compiler
19:26:34FromDiscord<Gumber> so it might be a bit tricky
19:26:45FromDiscord<Gumber> I'm sure we distriibute it somewhere.....
19:26:49FromDiscord<NullCode> In reply to @Gumber "I'm sorry I didn't": i shouldve told you first ;-;
19:26:50FromDiscord<Gumber> but I've never tried to link `pcre.lib` before
19:26:52FromDiscord<Rika> So better built then
19:26:52FromDiscord<Gumber> it's all good haha
19:26:55FromDiscord<Gumber> wekk
19:26:56FromDiscord<Gumber> well
19:27:01FromDiscord<NullCode> In reply to @Rika "I thought you also": yeah no
19:27:03FromDiscord<Gumber> you'd still have to use the same compiler you build Nim with I imagine
19:27:12FromDiscord<Gumber> and they didn't build their nim install
19:27:14FromDiscord<Gumber> soooooo
19:27:19FromDiscord<Gumber> you either will have to build Nim too
19:27:25FromDiscord<Rika> Well yeah but if you used finish bat then it’s his computer’s compiler
19:27:34FromDiscord<Gumber> is it?
19:27:37FromDiscord<Gumber> okay
19:27:43FromDiscord<Gumber> I thought Nim was already built at that point
19:27:46FromDiscord<Rika> Is it not or what I don’t know for sure
19:27:49FromDiscord<Gumber> and `finish.exe` just downloaded and built tooling
19:27:53FromDiscord<Gumber> yeah I don't think it is Rika
19:27:57FromDiscord<Gumber> I think it just installs like mingw
19:28:03FromDiscord<Gumber> and then some tooling
19:28:12FromDiscord<Gumber> I don't think it builds anything related to the Nim runtime / compiler
19:28:16FromDiscord<Rika> Okay
19:28:21FromDiscord<Rika> Do you have patience
19:28:25FromDiscord<Gumber> not much
19:28:27FromDiscord<Rika> Because it takes a while to build Nim
19:28:28FromDiscord<Rika> Not you
19:28:31FromDiscord<Gumber> lol I know I was jk
19:28:32FromDiscord<Rika> I mean uh
19:28:38FromDiscord<Rika> What was his name
19:28:39FromDiscord<Gumber> it's not bad at all on windows
19:28:43FromDiscord<Rika> Bull
19:28:47FromDiscord<Gumber> it's like running a `.bat` file
19:28:49FromDiscord<Rika> Null
19:28:51FromDiscord<Gumber> and then messing with some system paths
19:28:55FromDiscord<Gumber> that's it
19:29:00FromDiscord<Rika> I mistresses
19:29:04FromDiscord<Rika> Uh
19:29:06FromDiscord<Rika> Whatever
19:29:10FromDiscord<Rika> It’s four am
19:29:13FromDiscord<Gumber> xD
19:29:19FromDiscord<Gumber> go to sleep!
19:29:31FromDiscord<Gumber> it's good for you 🙂
19:33:49FromDiscord<NullCode> In reply to @Rika "It’s four am": 1:30 here
19:41:33FromDiscord<NullCode> In reply to @Gumber "but you need to": yikes that won't be fun at all
19:41:35FromDiscord<NullCode> ill still try
19:43:32FromDiscord<Gumber> yeah :/
19:43:53FromDiscord<Rika> Welcome to static linking
19:44:03FromDiscord<Rika> Easier on Linux from my experience
19:44:23PyautoguiI dislike the re module's API. Are there any alternatives?
19:44:51FromDiscord<Rika> nre
19:45:08PyautoguiThanks.
20:13:16FromDiscord<treeform> I did not like re's API till i discovered =~ i like that part
20:13:26FromDiscord<deech> Is there a way to pass a string to a C++ template using the `importcpp` syntax, eg. I'd like to bind to something like : `foo<"blah">()` and I'm trying: `proc p... {.importcpp: "foo<what-goes-here?>" .}` and call it with something like `p["blah"]()`. I could make this a template but I thought I'd ask if there was some other way.
20:13:47FromDiscord<deech> (edit) ""foo<what-goes-here?>"" => ""foo<what-goes-here?>()""
20:17:38FromDiscord<haxscramper> You can try `proc[S: static[string]](): {.importcpp: "foo<\"" & S & "\">(@)".}`
20:18:11FromDiscord<haxscramper> Otherwise you need to roll your own template, I don't think there is an alternative to that
20:22:05FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3zY7
20:22:39FromDiscord<haxscramper> importcpp does not work because "cannot generate expression for 'S'", which I don't know how to fix
20:24:16FromDiscord<dom96> `proc p(s: static[string]) {.importcpp: "foo<@>()".}` tried something like this?
20:24:43FromDiscord<dom96> `@` might be wrong, can't remember which symbol is replaced with the first parameter
20:27:05*Pyautogui quit (Ping timeout: 252 seconds)
20:29:18FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3zYc
20:30:09FromDiscord<haxscramper> `proc print1(s: static[string]) {.importcpp: "print1<#>()".}` is not valid as well
20:33:49FromDiscord<dom96> https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-procs
20:34:10FromDiscord<dom96> works but it doesn't
20:34:12FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=3zYd
20:34:18FromDiscord<dom96> (edit)
20:34:36FromDiscord<haxscramper> `'N` works for types, but we need values
20:34:48FromDiscord<haxscramper> The only way to get type-as-value is to use `S: static[string]`
20:35:00FromDiscord<haxscramper> `arg: static[string]` is still just a parameter value
20:35:30*Pyautogui joined #nim
20:36:03FromDiscord<haxscramper> This would only work for procedures, since it is not possible to `{.emit.}` in type declaration
22:13:03*Pyautogui quit (Ping timeout: 265 seconds)
22:20:47FromDiscord<RC> Hello, I wanted to wrap a CPP object, more specifically a `ifstream` object. How do I generate the constructor so that it can be accessed from Nim?
22:41:34*kayabaNerve joined #nim
23:13:50*max22- quit (Remote host closed the connection)
23:46:44*kayabaNerve quit (Ping timeout: 252 seconds)