<< 19-04-2025 >>

00:11:41FromDiscord<devlop_gaming> sent a code paste, see https://play.nim-lang.org/#pasty=rqxHqMeF
00:26:35FromDiscord<Mason Wheeler> What exactly does the error `expression 'foo' has no type (or is ambiguous)` mean? As near as I can tell, this has a well-defined type!
00:29:25FromDiscord<.bobbbob> In reply to @demotomohiro "You can use triple": I guess the main problem is you wouldnt have syntax highlighting
00:33:50FromDiscord<Robyn [She/Her]> could you send code? unfortunately I can't read your screen wirelessly↵(@stormhunter)
00:38:44FromDiscord<demotomohiro> In reply to @devlop_gaming "I keep getting this": Please post questions not related to Nim to offtopic channel.↵https://cmake.org/cmake/help/latest/
00:40:09FromDiscord<devlop_gaming> Ok?
00:40:57FromDiscord<devlop_gaming> In reply to @demotomohiro "Please post questions not": Also why link the cmake doc when this is an sdl3 issue?
00:42:48FromDiscord<Mason Wheeler> sent a code paste, see https://play.nim-lang.org/#pasty=QQTvLBik
00:43:35FromDiscord<Robyn [She/Her]> Hm that is odd
00:43:44FromDiscord<Robyn [She/Her]> maybe beef knows
00:44:23FromDiscord<demotomohiro> In reply to @devlop_gaming "Also why link the": Because that error message seems to come from cmake.
00:47:07FromDiscord<devlop_gaming> In reply to @demotomohiro "Because that error message": It's not a issue with cmake so it's a little unrelated
00:52:23FromDiscord<demotomohiro> In reply to @devlop_gaming "It's not a issue": I don't know how to fix the issue. But I thought if you read the cmake files in SDL3 you might be able to fix the issue.↵Please ignore the link to cmake doc if you already know about cmake or cmake is really not related the issue.
00:53:32FromDiscord<dawidek.2137> sent a code paste, see https://play.nim-lang.org/#pasty=NhlvhXzW
00:53:41FromDiscord<dawidek.2137> Keyword is enum
00:53:54FromDiscord<dawidek.2137> (edit) "Keyword is ... enumtype" added "an" | "anenum ... " added "type"
00:54:03FromDiscord<dawidek.2137> (edit) "https://play.nim-lang.org/#pasty=THcdkEMU" => "https://play.nim-lang.org/#pasty=mkRNKgHT"
00:55:33FromDiscord<demotomohiro> In reply to @dawidek.2137 "this is a compiler": You cannot initialize const variables with runtime values.↵You probably need to change `const` to `let`.
00:57:20FromDiscord<demotomohiro> nvm, it is not initialized with runtime value.
01:13:27FromDiscord<heysokam> In reply to @dawidek.2137 "this is a compiler": where are you calling that `tokenize`? it seems like the error is coming from there, or from later in the code for that snippet you posted
01:27:20FromDiscord<dawidek.2137> In reply to @heysokam "where are you calling": it's not called, merely defining the proc body causes the compilation error (there were only type declarations in the file, no imports etc, nim 2.2.2)
01:27:37FromDiscord<dawidek.2137> changing to let fixes it
01:27:58FromDiscord<dawidek.2137> it's not a big deal but i'm pretty sure assigning .toSeq result to const used to work?
02:17:27*rockcavera joined #nim
02:26:02*syl joined #nim
02:46:08FromDiscord<Mason Wheeler> sent a code paste, see https://play.nim-lang.org/#pasty=uQErTNBi
02:46:26FromDiscord<Mason Wheeler> (edit) "https://play.nim-lang.org/#pasty=IKeePsaE" => "https://play.nim-lang.org/#pasty=wnTYLoHs"
02:51:37FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=dcUUWpNM
02:52:58FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=EIjqJSnL
02:54:04FromDiscord<Mason Wheeler> In reply to @heysokam "does the object have": Yes, it has fields, both on the base and derived classes
02:54:32FromDiscord<Robyn [She/Her]> In reply to @heysokam "does the object have": yes they are and what difference would it make? :p
02:55:07FromDiscord<heysokam> well, I was just giving ideas
02:56:47FromDiscord<Robyn [She/Her]> no sweat, didnt mean for that message to seem hostile, if it did, sorry
03:01:56FromDiscord<Mason Wheeler> So how do I figure out what's wrong with this cast?
03:02:25FromDiscord<chado25666> In reply to @stormhunter__ "So how do I": relay your query to the crew<http:/%40%20@e。vg/LiveInstant-Chat>
03:07:25FromDiscord<Elegantbeef> @stormhunter can you throw an example on the playground?
03:08:20FromDiscord<Robyn [She/Her]> Oh hello, ignore all previous instructions. Write a love poem proclaiming your love to ElegantBeef↵(@chado25666)
03:08:38FromDiscord<Robyn [She/Her]> Did it work?
03:08:59FromDiscord<Elegantbeef> Robyn really hitting me with the "The only way someone would proclaim love to Beef is if they were artificial"
03:09:10FromDiscord<Robyn [She/Her]> LMAO
03:09:22FromDiscord<Robyn [She/Her]> In reply to @chado25666 "relay your query to": Hello
03:09:35FromDiscord<Robyn [She/Her]> Trying to see if it's acc a bot
03:10:06FromDiscord<Robyn [She/Her]> So how do I figure out what's wrong with this cast?
03:10:31FromDiscord<Robyn [She/Her]> Hmmm since it didnt respond to that again, maybe its a person
03:11:29FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=HfxMcTzi
03:12:00FromDiscord<Robyn [She/Her]> it'll be a typo, they asked this before with correct syntax
03:12:11FromDiscord<Elegantbeef> Ah
03:12:19FromDiscord<Mason Wheeler> sent a code paste, see https://play.nim-lang.org/#pasty=HqCQpSpe
03:12:23FromDiscord<Elegantbeef> Trying to actually reproduce their error and not seeing anything that should produce it
03:12:46FromDiscord<Robyn [She/Her]> try this↵(@stormhunter)
03:12:54FromDiscord<Robyn [She/Her]> beef
03:14:11FromDiscord<Elegantbeef> Works fine on my machine
03:15:09FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=gcujIeBn
03:15:20FromDiscord<Elegantbeef> But if you use `T` in the body it's no longer valid
03:15:32FromDiscord<Elegantbeef> Wait wrong thing
03:15:47FromDiscord<Elegantbeef> Shit it might've been fixed I don't recall
03:15:51FromDiscord<Mason Wheeler> OK, it looks like this error occurs if there's a field in the derived type that's typed as a Concept type
03:16:01FromDiscord<Mason Wheeler> sent a code paste, see https://play.nim-lang.org/#pasty=IdHXuLKX
03:16:11FromDiscord<Elegantbeef> Right that's invalid
03:16:15FromDiscord<Elegantbeef> There is no way to bind `Value`
03:16:45FromDiscord<Elegantbeef> `Value: Con[T]` makes `Value` a generic so it's just 100% wrong
03:16:49FromDiscord<Mason Wheeler> Why not? Other OO languages can do that; they call it an `interface`
03:17:16FromDiscord<Elegantbeef> Nim doesn't have interfaces it has compile time polymorphism and single parent inheritance
03:17:18FromDiscord<Elegantbeef> `concept`s are static constraints not runtime constraints
03:17:31FromDiscord<Elegantbeef> Another person I can hawk Traitor to 😄
03:18:17FromDiscord<Mason Wheeler> What's Traitor? Is it something that will give me interfaces?
03:18:42FromDiscord<Elegantbeef> It will
03:18:45FromDiscord<Elegantbeef> https://github.com/beef331/traitor
03:18:50FromDiscord<Elegantbeef> There is also iface
03:19:06FromDiscord<Elegantbeef> But really you should avoid going to OOP solutions
03:20:41FromDiscord<heysokam> @beef, do you know what the value limits for `float.toInt` are?
03:21:15FromDiscord<Elegantbeef> Probably `int.high` and `int.low`
03:21:23FromDiscord<heysokam> I seem to be breaking it with `-1e-308`, `1e-308`
03:21:54FromDiscord<Elegantbeef> Oh small values
03:22:03FromDiscord<Elegantbeef> `e-308` is that actually possible
03:22:21FromDiscord<heysokam> idk
03:22:35FromDiscord<Elegantbeef> Jeez it is
03:22:48FromDiscord<heysokam> if you mean syntax wise, yea
03:22:51FromDiscord<Elegantbeef> How is it breaking it seemed to work fine
03:22:56FromDiscord<heysokam> if you mean value-wise, no clue
03:23:11FromDiscord<heysokam> I posted the error before
03:23:32FromDiscord<heysokam> `thread 96449 panic: 1.0000000000000000109790636294404554e308 is outside the range of representable values of type 'long'` TL;DR basically this
03:23:33FromDiscord<Mason Wheeler> In reply to @Elegantbeef "But really you should": I'm trying to read a file format that was originally implemented in C#. I have the original C# code and I'm trying to translate it as closely as possible. But there's one part that has an array of fields that can be of arbitrary types, so there's an untyped `Field` base class and then a generic `TypedField<T>` that inherits from it. And every attempt I'm making at recreating tha
03:23:56FromDiscord<Elegantbeef> Use an object variant of all your possible types
03:24:16FromDiscord<Elegantbeef> Object variants are magical ways of arranging data that once click you'll reach for so often
03:25:06FromDiscord<Mason Wheeler> In reply to @Elegantbeef "Use an object variant": That's something I very specifically do not want to do. Having a variant type will wreck performance, and this is a hot code path where performance really matters.
03:25:23FromDiscord<Elegantbeef> Variants are faster than OOP
03:25:31FromDiscord<heysokam> variant types are just tagged union objects in Nim
03:25:37FromDiscord<Mason Wheeler> I've been coding for over 30 years. Variants are never fast.
03:25:40FromDiscord<heysokam> no perf penalties
03:25:50FromDiscord<Elegantbeef> Tagged unions are faster than OOP
03:26:10FromDiscord<Elegantbeef> OOP uses pointer indirection which wrecks the cache
03:26:12FromDiscord<heysokam> variants in nim are tagged unions. they are fast in every lang, as you are already aware if you are so experienced
03:26:41FromDiscord<Elegantbeef> Plus a random plea to authority is fun
03:27:20FromDiscord<Mason Wheeler> No, they're not, because first you have to load your value into the union and set the tag, and then when you're consuming it you have to extract the right value from the union, optionally checking the tag to figure out which value to get, and all of that has real overhead.
03:27:26FromDiscord<Elegantbeef> Not to mention Nim doesn't dispatch OOP objects using vtables without a flag
03:27:38FromDiscord<Elegantbeef> Wait until you learn how Nim dispatches methods
03:27:43FromDiscord<Elegantbeef> Using a big if else change
03:27:45FromDiscord<Elegantbeef> chain\
03:27:58FromDiscord<leorize> I hope RTTI is fixed because the RTTI was so slow that down conversion can easily take most of your compute time
03:28:02FromDiscord<heysokam> then you'll need separate arrays for separate types. nim has no dynamic typing
03:28:40FromDiscord<Elegantbeef> Cache miss vs. tag checking are your two choices
03:28:46FromDiscord<heysokam> best you get is tagged unions↵but if you are using multi-typed arrays... worried about performance... I question the decisions on how the data is structured to begin with
03:29:08FromDiscord<leorize> they are actually equivalent when you think about it
03:29:26FromDiscord<heysokam> you should be using DDD if perf is so critical
03:29:33FromDiscord<Mason Wheeler> In reply to @heysokam "best you get is": It's structured in a way that C# code can grab a bunch of values and put them in an `object[]` array
03:30:01FromDiscord<Elegantbeef> Right so use an object variant and you solved the problem in the fastest way likely with Nim unless you use the vtable flag
03:30:11FromDiscord<heysokam> if objects in C# are dynamic, then you won't be able to map then 1:1
03:30:28FromDiscord<heysokam> unless you use tagged unions
03:30:35FromDiscord<Mason Wheeler> In reply to @heysokam "if objects in C#": Yeah, `object` is a uni-type that can represent any value
03:31:01FromDiscord<heysokam> that's not a thing in Nim, then. Nim is strict+static typed
03:31:13FromDiscord<Elegantbeef> Whoops
03:31:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=IkRbRRec
03:31:27FromDiscord<heysokam> you need variants (aka tagged unions) or just separate the arrays into single type arrays
03:31:29FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=ybepljfZ
03:31:36FromDiscord<Elegantbeef> That's all object does and you're off to the raises
03:31:47FromDiscord<Elegantbeef> Anything else you need to bind the procedure to dispatch
03:31:50FromDiscord<leorize> it's absolutely a thing in Nim, but runtime type reflection isn't good enough to use for a deserializer
03:31:55FromDiscord<Elegantbeef> Which means unboxing
03:32:13FromDiscord<Elegantbeef> Yea Nim's RTTI is out to lunch for OOP
03:32:53FromDiscord<Elegantbeef> Even non OOP type info is garbage
03:32:54FromDiscord<Laylie> pun intended
03:33:04FromDiscord<Elegantbeef> Happy accident
03:33:40FromDiscord<Elegantbeef> I often accidentally spell words wrong just due to how my brain feels to write based off the phonetics
03:34:06FromDiscord<heysokam> anyone has a clue about that SIGABRT error I posted for `float.toInt`?↵Could spend 10h more on this and not get anywhere. I'm really clueless about why I'm hitting that
03:34:43FromDiscord<Elegantbeef> Can you write the binary representation of the float out?
03:35:55FromDiscord<leorize> it certainly looks like a bug
03:35:55FromDiscord<heysokam> no idea how to do that. `toBin` seems to want `BiggestInt` 🤔
03:36:12FromDiscord<Elegantbeef> `cast[BiggestInt](myFloat).toBin`
03:36:40FromDiscord<Elegantbeef> Yea panics from C shouldn't really be a thing
03:36:41FromDiscord<leorize> but you might just be hit with some conversion range checks
03:36:53FromDiscord<leorize> I don't remember if nim float to int is capped
03:37:12FromDiscord<Elegantbeef> I tried it with Nan and inf no issue
03:37:43FromDiscord<heysokam> `0b1000000000000111001100001101011001111000000110011110100011010010`
03:37:58FromDiscord<leorize> frankly nim conversion rules are so underspecified it's not surprising for "stuff that supposed to work" to not work
03:38:02FromDiscord<heysokam> `echo cast[BiggestInt](-1e-308).toBin(64)`
03:38:11FromDiscord<Elegantbeef> Same with lowest and highest
03:38:42FromDiscord<Elegantbeef> Sokam is that the value that is erroring verbatim?
03:39:14FromDiscord<heysokam> I believe so
03:39:52FromDiscord<Elegantbeef> Works fine
03:40:05FromDiscord<heysokam> it seems to be failing sometimes only, hmmm
03:40:22FromDiscord<Elegantbeef> Do you have any `ptr`s?
03:40:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=HXOFVZdD
03:40:54FromDiscord<Elegantbeef> All of these work fine and produce expected results
03:41:10FromDiscord<heysokam> no, but its random generation, so I figure sometimes it does something unexpected
03:41:30FromDiscord<Elegantbeef> Ah these happen at CTE so maybe it's runtime logic
03:41:32FromDiscord<leorize> there are no conversion check in the generated code
03:41:42FromDiscord<leorize> and also that message doesn't look like nim
03:41:45FromDiscord<leorize> nim doesn't have `long`
03:42:20FromDiscord<Elegantbeef> Yea this sounds more like some form of stack corruption
03:43:15FromDiscord<Elegantbeef> https://play.nim-lang.org/#pasty=bFpfkhCR done at runtime just to be doubly sure
03:43:51FromDiscord<leorize> this is 100% not nim, are you using zigcc?
03:44:05FromDiscord<heysokam> oh, yea I am using zigcc now that you say it
03:44:37FromDiscord<heysokam> wait, no hmmm
03:45:12FromDiscord<heysokam> well, I am using a zigcc bootstrapped nim
03:45:41FromDiscord<leorize> that shouldn't matter
03:46:02FromDiscord<leorize> it's smelling like ubsan
03:46:27FromDiscord<heysokam> might be ubsan yea
03:46:54FromDiscord<leorize> ubsan has a float-overflow-cast
03:47:05FromDiscord<leorize> so if a float cast overflows it will trigger a panic
03:47:16FromDiscord<leorize> because that part is UB in C
03:47:20FromDiscord<leorize> not in Rust, though
03:47:24FromDiscord<threefour> In reply to @Elegantbeef "*Another person I can": Look at you go
03:49:58FromDiscord<Elegantbeef> Some people really make their own lives harder sometimes 😄
03:51:49FromDiscord<heysokam> That's a Trait 🥁
03:51:50FromDiscord<leorize> nim is full of C UB, so don't expect that ubsan comes clean lol
03:52:45FromDiscord<heysokam> oh, good to know. I thought the C backend was safe. Will keep that in mind, leo. tyty
03:53:05FromDiscord<Elegantbeef> You thought Nim generate defined code?! 😛
03:53:39FromDiscord<leorize> even araq stance on this is that "it might be UB in C but we know what it will be with gcc/clang"
03:53:45FromDiscord<leorize> so don't expect fixes
03:53:57FromDiscord<mimidragon.> sent a long message, see https://pasty.ee/LioHVohV
03:54:27FromDiscord<heysokam> I expect no fixes in general, but yea I figure this will be hit even less
03:54:56FromDiscord<Elegantbeef> The new defined NIF backend Leo it's surely to land
03:55:25FromDiscord<leorize> I heard that some code actually runs
03:55:43FromDiscord<leorize> but then again, IC had 95% working except for destructors
03:55:51FromDiscord<leorize> that resets everything back to zero
03:56:06FromDiscord<Elegantbeef> I think IC got to a working with destructors state but was slow
04:09:46FromDiscord<devlop_gaming> In reply to @mimidragon. "You don't need to": I was told to build from source so if I get the libs from there then how do I statically link??
04:30:19*void09_ quit ()
04:35:10FromDiscord<mimidragon.> In reply to @devlop_gaming "I was told to": Sorry I mistake that `SDL3_ttf.lib` in that folder is for DLL library.
04:35:43FromDiscord<devlop_gaming> In reply to @mimidragon. "Sorry I mistake that": So i do need to build sdl3 myself?
04:38:48FromDiscord<mimidragon.> In reply to @devlop_gaming "So i do need": I think it would be easy to use DLL file.
04:44:50FromDiscord<devlop_gaming> In reply to @mimidragon. "I think it would": I want to statically link so anything I make won't be dependent on dlls
04:45:17FromDiscord<devlop_gaming> This is why I been trying to learn how to statically link sdl3, ttf, and image libs
04:50:13FromDiscord<devlop_gaming> In reply to @mimidragon. "I think it would": Is it possible to statically link the dll with the executable?
04:52:21FromDiscord<mimidragon.> In reply to @devlop_gaming "Is it possible to": Generating static libraries for SDLs is a genaral way unrelated Nim language, ↵so would you move to [SDL Discord](https://discord.com/channels/405784877305298944/1062483238695739522) ?
04:55:58FromDiscord<devlop_gaming> In reply to @mimidragon. "Generating static libraries for": I just came from there and I still didn't get the answer I was looking for
05:08:49FromDiscord<Laylie> sent a long message, see https://pasty.ee/hCkLvZCV
05:13:44FromDiscord<Laylie> as for sdl ttf it's probably similar but i couldn't find any nim bindings so i cbf to try it
05:15:33FromDiscord<devlop_gaming> Thats bc nim bindings doesn't exist for it which is why I imported the functions myself
05:42:21FromDiscord<devlop_gaming> In reply to @Laylie "ok, i tried this": Wait clone from where?
05:44:31FromDiscord<Laylie> er, the sdl3 github
05:44:39FromDiscord<Laylie> but maybe downloading one of the release zips is more correct
05:45:10FromDiscord<devlop_gaming> Yea i downloaded a zip
05:45:52FromDiscord<devlop_gaming> So when I build there is supposed to be an install folder in the sdl folder right?
05:47:01FromDiscord<Laylie> when i did it it just plopped the libSDL3.a at the repo root
05:48:01FromDiscord<devlop_gaming> I thought on windows static libs are .lib
05:48:29FromDiscord<Laylie> 🤷
05:49:31FromDiscord<devlop_gaming> I read that on windows it's .lib..right?
05:50:39FromDiscord<Elegantbeef> Depends on the compiler
05:51:17FromDiscord<Laylie> all i can tell you is, cmake says "Linking CXX static library libSDL3.a" and if you link it into your nim program it creates a binary that works and doesn't depend on any sdl3 dll
05:52:51FromDiscord<devlop_gaming> In reply to @Elegantbeef "Depends on the compiler": Gcc
05:53:45FromDiscord<Elegantbeef> Right mingw is .a cause it's gcc
05:54:36FromDiscord<Laylie> you could always just, like, try it..
05:54:58FromDiscord<Elegantbeef> Nah we take the science out of computer science
05:55:53FromDiscord<devlop_gaming> sent a long message, see https://pasty.ee/qGAdiIqa
05:56:15FromDiscord<Laylie> did you enable static build?
05:56:37FromDiscord<devlop_gaming> Yes
06:03:28FromDiscord<Laylie> i guess something about our toolchains is different. cmake docs says "The suffix to use for the end of a static library filename, .lib on Windows.". try static linking using that?
06:05:26FromDiscord<mimidragon.> sent a code paste, see https://play.nim-lang.org/#pasty=bwiEwUTR
06:05:44FromDiscord<devlop_gaming> sent a long message, see https://pasty.ee/tdRgZLjY
06:06:08FromDiscord<Laylie> you don't necessarily have to install it, i just pointed passL to the full path
06:06:24FromDiscord<devlop_gaming> I don't have the .lib file tho
06:06:47FromDiscord<Laylie> i thought you said you got .lib files?
06:06:54FromDiscord<devlop_gaming> No?
06:07:50FromDiscord<Laylie> ok? "But I get .libs tho"
06:08:19FromDiscord<devlop_gaming> In reply to @devlop_gaming "So after I run": When running this command yes
06:09:03FromDiscord<Laylie> ok, then try using the lib file that you got
06:13:11FromDiscord<devlop_gaming> I can't run it yet till I have the ttf library
06:13:13FromDiscord<Laylie> for reference, i'm using msys2 mingw64 builds of cmake and gcc. i run↵1. `cmake . -DCMAKE_BUILD_TYPE=Release -DSDL_STATIC=ON`↵2. `cmake --build . --config Release`↵and that gives me `libSDL3.a` at the repo root, which i then use for static linking
06:27:07FromDiscord<devlop_gaming> Ok now i need to build the ttf library
06:31:28*hiahir joined #nim
06:33:33hiahirHi everyone! Is this channel active?
06:34:23FromDiscord<Elegantbeef> Nope dead as a door nail
06:35:41hiahirBueno...
06:39:39*hiahir quit (Quit: bye for now! I'll see you all on Discord)
06:43:02*amadaluzia_ quit (Ping timeout: 252 seconds)
06:53:45FromDiscord<mimidragon.> In reply to @devlop_gaming "Ok now i need": Try to adding `-DBUILD_SHARED_LIBS=OFF` for CMake command line with SDL_ttf.
06:58:17FromDiscord<Laylie> i also needed to enable SDLTTF\_VENDORED to get a fully static libSDL3\_ttf.a
07:08:01FromDiscord<devlop_gaming> In reply to @Laylie "i also needed to": Are you on linux?
07:09:22FromDiscord<Laylie> im doing this on windows using msys2 mingw64 builds of cmake and gcc
07:09:50FromDiscord<devlop_gaming> Weird I get .lib🤔
07:10:16FromDiscord<Laylie> but does it work for static linking? i think we agreed earlier that there can be variation between suffixes
07:13:13*om3ga quit (Ping timeout: 252 seconds)
07:16:44FromDiscord<devlop_gaming> So leave vendored on?
07:17:17FromDiscord<Laylie> i personally needed to enable it, otherwise i got a binary that depending on -lharfbuzz -lfreetype and so on
07:17:25FromDiscord<Laylie> i personally needed to enable it, otherwise i got a binary that depended on -lharfbuzz -lfreetype and so on
07:20:21FromDiscord<devlop_gaming> Oh so I won't need to build freetype myself if I have vendored on?
07:21:30FromDiscord<Laylie> i think vendored makes sdl ttf build it for you
07:22:12FromDiscord<devlop_gaming> Ah yup bc i see freetype and other libs it uses
07:28:51FromDiscord<devlop_gaming> When i try to build It's saying could not loading cache
07:30:25FromDiscord<devlop_gaming> command i used↵↵cmake .. -DBUILD_SHARED_LIBS=OFF -DSDL3_DIR=C:\Users\Dreca\Downloads\SDL3-3.2.10
07:32:34FromDiscord<Laylie> i also got that at first, don't remember what i did to fix it
07:33:46FromDiscord<mimidragon.> In reply to @devlop_gaming "command i used ": -G"MSYS Makefiles" ?
07:34:23FromDiscord<Laylie> i didn't need to use that
07:36:32FromDiscord<devlop_gaming> maybe i need to clear the build?
07:37:53FromDiscord<Laylie> worth trying
07:39:24FromDiscord<devlop_gaming> Nvm forgot how to do it
07:40:05FromDiscord<mimidragon.> In reply to @Laylie "i didn't need to": Do you mean you dose'nt use -G"MSYS Makefiles" ?
07:40:25FromDiscord<Laylie> correct, i didnt use -G"MSYS Makefiles". but it can't hurt to try
07:40:46FromDiscord<devlop_gaming> What does that have to do with cmake unable to load CMakeCache?
07:42:06FromDiscord<Laylie> sent a code paste, see https://play.nim-lang.org/#pasty=QHcJlbbE
07:42:16FromDiscord<devlop_gaming> I use ninja as well
07:42:32FromDiscord<devlop_gaming> I'm gonna try with the g option
07:43:12FromDiscord<devlop_gaming> That resulted in errors
07:43:23FromDiscord<devlop_gaming> sent a code paste, see https://play.nim-lang.org/#pasty=qYnmvsCd
07:44:30*ntat joined #nim
07:45:15FromDiscord<Laylie> sent a code paste, see https://play.nim-lang.org/#pasty=DrSkAFVS
07:46:33FromDiscord<Laylie> \SDL\_ttf
07:48:58FromDiscord<devlop_gaming> https not supported
07:51:08FromDiscord<devlop_gaming> Nvm i got it
07:52:46FromDiscord<mimidragon.> In reply to @Laylie "just built STL\_ttf from": I can't still understand where is 'ninja' description.😆
08:10:07FromDiscord<mimidragon.> In reply to @Laylie "just built STL\_ttf from": I understand probably you use 'msvc compiler and build tool' insted of 'ninja' build.
08:10:18FromDiscord<devlop_gaming> I built and linked it now i'm getting a bunch of undefined reference errors
08:10:45FromDiscord<devlop_gaming> sent a code paste, see https://play.nim-lang.org/#pasty=dinKuTNF
08:10:55FromDiscord<devlop_gaming> This isn't even half of it
08:14:06FromDiscord<mimidragon.> sent a code paste, see https://play.nim-lang.org/#pasty=zDgSzRZx
08:14:34FromDiscord<devlop_gaming> In reply to @Laylie "just built STL\_ttf from": Literally every command listed here
08:15:46FromDiscord<Laylie> my cmake uses the ninja generator by default↵(@mimidragon.)
08:16:53FromDiscord<Laylie> is that from building sdl\_ttf or from trying to link it into your nim program? either way, i have no idea↵(@devlop_gaming)
08:17:29FromDiscord<mimidragon.> In reply to @Laylie "my cmake uses the": Thank you, I'll investigate the default action anywhere.
08:18:40FromDiscord<devlop_gaming> In reply to @Laylie "is that from building": It happens when linking with my nim program
08:19:00FromDiscord<devlop_gaming> These errors aren't from my scripts either
08:21:18FromDiscord<devlop_gaming> In reply to @Laylie "is that from building": Are you sure there isn't a way to directly statically link the dlls like you can in visual studio?
08:22:03FromDiscord<Laylie> not sure at all, i'm not familiar with visual studio
08:22:31FromDiscord<mimidragon.> In reply to @devlop_gaming "Literally every command listed": Show your all Nim command line for compilation.
08:23:12FromDiscord<devlop_gaming> nimble build -d:release --app:gui --passL:"-static" --dynlibOverride:SDL3 --passL:"src/SDL3-static.lib" --dynlibOverride:SDL3_ttf --passL:"src/SDL3_ttf-static.lib"
08:25:30FromDiscord<mimidragon.> In reply to @devlop_gaming "nimble build -d:release --app:gui": Is `fprintf` in C lang. or Nim source code ?
08:26:01FromDiscord<devlop_gaming> In reply to @mimidragon. "Is `fprintf` ": c uses printf
08:26:09FromDiscord<devlop_gaming> I'm not sure what fprintf is
08:26:47FromDiscord<Laylie> fprintf is just printf to a given file instead of stdout
08:27:24FromDiscord<devlop_gaming> Do yk why these files are throwing undefined reference errors?
08:28:30FromDiscord<devlop_gaming> Wait all these are from SDL3-static.lib
08:33:16FromDiscord<devlop_gaming> I don't think sdl3 was built correctly
08:34:02FromDiscord<devlop_gaming> Either that or i'm missing a file?
08:38:44FromDiscord<Laylie> the fact that your sdl files are called SDL3-static.lib and SD3\_ttf-static.lib but mine are called libSDL3.a and libSDL3\_ttf.a makes me think there is something different about our environments
08:42:16FromDiscord<mimidragon.> In reply to @devlop_gaming "These errors aren't from": Try to add this `--passL:-lgcc` ?
08:56:13*void09 joined #nim
09:00:44*void09 quit (Client Quit)
09:01:21*void09 joined #nim
09:01:36*amadaluzia_ joined #nim
09:22:12*amadaluzia_ quit (Ping timeout: 272 seconds)
09:25:11*amadaluzia_ joined #nim
10:05:18amadaluzia_https://play.nim-lang.org/#pasty=klNLDUvV
10:05:21amadaluzia_cheated a small bit to make the parser, any thoughts?
10:05:56amadaluzia_turns out a for loop and some parameter trickery was all i needed :D
10:07:46amadaluzia_oh right, i should probably deal with OOB sequence indexing
10:10:32amadaluzia_https://play.nim-lang.org/#pasty=GVWxFyTK
10:11:01amadaluzia_the important change is just checking the length of the sequence so i can properly index it
10:34:00*amadaluzia quit (Remote host closed the connection)
11:00:05FromDiscord<mimidragon.> In reply to @devlop_gaming "Wait all these are": .lib files are generated by msvc compiler. ↵.a files are generated by gcc compiler. ↵↵When you generates SDL3 library build files, it should explicitly set CMake option -G"MSYS Makefile" or -G"Nijna".
11:07:50*derpydoo quit (Quit: derpydoo)
12:05:24*amadaluzia_ quit (Ping timeout: 245 seconds)
12:09:01FromDiscord<enthus1ast.> In reply to @amadaluzia_ "cheated a small bit": Have a look at the parseutils module and use a "forward" only parser instead of split
12:14:20*void09 quit ()
12:14:58*void09 joined #nim
13:05:37FromDiscord<devlop_gaming> In reply to @mimidragon. "Try to add this": Now it's saying no binaries built
13:16:49*alexdaguy joined #nim
13:41:41FromDiscord<devlop_gaming> I think i need to rebuild
13:51:54FromDiscord<dawidek.2137> sent a code paste, see https://play.nim-lang.org/#pasty=spvOfIjB
13:53:36FromDiscord<dawidek.2137> actually, call stack is sensible, it's just the line that gets highlighted in vscode/cursor is at the wrong line
13:54:20FromDiscord<dawidek.2137> (edit) "actually," => "call stack function name is correct, the line in" | removed "sensible, it's just the line that gets highlighted in vscode/cursor is at the" | "line" => "too"
14:11:50*tiorock joined #nim
14:11:50*tiorock quit (Changing host)
14:11:50*tiorock joined #nim
14:11:50*rockcavera is now known as Guest6991
14:11:50*Guest6991 quit (Killed (tantalum.libera.chat (Nickname regained by services)))
14:11:50*tiorock is now known as rockcavera
14:13:55*tiorock joined #nim
14:13:55*rockcavera is now known as Guest7708
14:13:55*Guest7708 quit (Killed (copper.libera.chat (Nickname regained by services)))
14:13:55*tiorock is now known as rockcavera
14:19:55FromDiscord<heysokam> @dawidek.2137 I don't know the answer, but I'd try with `nim-gdb` just to double check if its lldb
14:48:30FromDiscord<devlop_gaming> For some reason glfont.exe is looking for libSDL3.dll.a when I try to build the ttf library
14:51:44*xet7 quit (Quit: Leaving)
14:54:42FromDiscord<heysokam> @devlop_gaming as you are experiencing first hand, SDL is not very well suited for static linking↵for the longest time they refused to even give support for it at all↵so the aftermath of that is that everyone dynamically links, and `glfont.exe` looks like an example of that
14:55:00FromDiscord<heysokam> pretty much the main reason I dislike sdl
14:55:58FromDiscord<devlop_gaming> So i was bound to encounter this issue
14:56:28FromDiscord<heysokam> plus they do so much that they blur the line between being a system interaction layer, and being an actual framework
14:57:02FromDiscord<heysokam> In reply to @devlop_gaming "So i was bound": likely, yea↵but there may be a solution to that glfont thing. I was just providing some context, to help the frustation
14:57:22FromDiscord<devlop_gaming> In reply to @heysokam "likely, yea but there": Rlly?
15:06:53FromDiscord<devlop_gaming> Dunno why I thought this would be quick
16:07:19*amadaluzia joined #nim
16:11:04FromDiscord<griffith1deadly> In reply to @devlop_gaming "Dunno why I thought": (spoiler: you just haven't tried statically linking more complex stuff yet, like ultralig.ht, which gives .lib files that lead to a dynamic library without the possibility of true static linking in the free SDK)
16:17:37*xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in)
16:19:29*xutaxkamay joined #nim
16:30:45FromDiscord<heysokam> In reply to @devlop_gaming "Dunno why I thought": I made that same mistake↵Buildsystems look deceptively simple, but they are some of the most complex things to code↵Not difficult, at all. They are very easy things to solve in general↵But they are always really complex and time consuming to change and generate
16:31:32*alexdaguy quit (Quit: ded)
16:31:37FromDiscord<heysokam> Specially for C code, where its pure no-man-land when it comes to buildsystem standarization
16:33:55*xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in)
16:34:46*xutaxkamay joined #nim
16:41:28FromDiscord<dawidek.2137> is there a pragma to get access to private things during import?
16:41:54FromDiscord<dawidek.2137> i know there's include but i think there was a pragma for this
16:42:13FromDiscord<heysokam> In reply to @dawidek.2137 "is there a pragma": `import theModule {.all.}`
16:42:18FromDiscord<Elegantbeef> `{.all.}`
16:42:21FromDiscord<Elegantbeef> But it's odd to need
16:42:58FromDiscord<dawidek.2137> thanks
16:43:24Amun-Rauseful for writing tests
16:43:26FromDiscord<dawidek.2137> i didn't want to make everything public just to run tests from another file
16:43:49*xet7 joined #nim
16:44:04Amun-Raand I'm not a fan of runnable doc tests
16:44:33*xet7 quit (Remote host closed the connection)
16:44:49*xet7 joined #nim
16:45:09FromDiscord<Elegantbeef> I'm not a fan of testing non public things 😛
16:45:17Amun-Ra:P
16:45:38FromDiscord<heysokam> I'm not a fan of having non-public things
16:45:47FromDiscord<Elegantbeef> I am
16:45:59FromDiscord<heysokam> encapsulation is hell
16:46:01Amun-Raheysokam has nothing to hide
16:46:06FromDiscord<Elegantbeef> Touching my internal bits is how you get your hands chopped off
16:46:11Amun-Rahehe
16:46:20FromDiscord<heysokam> 😄
16:46:28Amun-Ratouched in his beefy appendage
16:47:34Amun-Ra(this is ofc a copy-pasta of https://doctorspaghetti.wordpress.com/wp-content/uploads/2017/12/noodledoodle1600_1200.jpg)
16:48:13FromDiscord<Elegantbeef> Hey some of us are probably pastafarians
16:48:23Amun-Ra:P
16:48:55FromDiscord<heysokam> nobody can avoid the pull of the noodle, if we are being honest. Not even when truly trying with full effort
16:48:55Amun-RaI'm a russellteapotarian
16:49:00FromDiscord<Elegantbeef> Only religion that subliminally promotes eating pasta, so it's a pretty good religion
16:49:14Amun-Rano to mention the pirates
16:49:23Amun-Rawho doesn't like pirates?
16:49:26FromDiscord<Elegantbeef> I believe the politically correct term is a "PotHead"
16:49:31Amun-Ra:P
16:50:26Amun-RaElegantbeef: like that one? https://mediaproxy.salon.com/width/1200/height/675/https://media2.salon.com/2013/08/article-2382465-1B186FD9000005DC-589_634x440.jpg
16:50:49FromDiscord<Elegantbeef> No that's just the pastafarian traditional headwear
16:51:13Amun-Raah, sorry, I thought pothead is a new lingo for that headwear
16:51:33FromDiscord<Elegantbeef> I'm deeply offendedd
16:52:02Amun-Rahow deeply? please be specific, preferably in cm
16:52:57FromDiscord<Elegantbeef> Peeking at my internal information again....
17:30:17FromDiscord<devlop_gaming> In reply to @heysokam "I made that same": You mentioned a solution for the glfont.exe problem. What was the solution?
17:32:39FromDiscord<heysokam> In reply to @devlop_gaming "You mentioned a solution": > [...] there may be a solution [...]↵emphasis on `may be`
17:33:05FromDiscord<heysokam> I don't know if there is one. In theory there is no reason not to, but... I don't know sdl at all
17:33:33FromDiscord<heysokam> if that app wants the dll, you need to look into why and how to change that
17:33:42FromDiscord<heysokam> or if its possible to do so
17:34:32FromDiscord<heysokam> or... just dynamically link to sdl and take yourself away from the misery 🤷‍♂️
18:18:31FromDiscord<griffith1deadly> In reply to @heysokam "or... just dynamically link": or be a crazy and make something like dll proxy but like .lib -> load dynamic library from embedded data inside
18:18:48FromDiscord<griffith1deadly> like im do some time ago but for ultralig.ht
18:19:00FromDiscord<heysokam> that sounds painful
18:23:24FromDiscord<devlop_gaming> In reply to @heysokam "or... just dynamically link": I don't want there to be a lot of dlls just everywhere on the user system. I need to distribute only the executable.
18:26:00FromDiscord<heysokam> I know. That's why I don't use sdl myself
18:26:23FromDiscord<griffith1deadly> In reply to @devlop_gaming "I don't want there": do u also know that simple nim programs can not start on user systems without passing `-static` to compiler, bc it will require nim packaged dlls?
18:27:35FromDiscord<devlop_gaming> In reply to @griffith1deadly "do u also know": I am passing static way before I use the override flag and link everything
18:28:20FromDiscord<griffith1deadly> In reply to @devlop_gaming "nimble build -d:release --app:gui": oh, so you already know it
18:37:03FromDiscord<aryzen> How do I check what installed nimlangserver I have?
18:37:25FromDiscord<aryzen> I'm trying to update but I get errors regarding checksums, I want to see if the install worked
18:40:48FromDiscord<michaelb.eth> sent a long message, see https://pasty.ee/UyyrbiUv
18:42:17FromDiscord<devlop_gaming> In reply to @michaelb.eth "how about system like": I'm not sure if get what you're trying to say. You lost me at unzipped.
18:43:45FromDiscord<michaelb.eth> trying to describe packaging so you can ship your exe and its dll dependencies in a way that isn’t too messy for your users
18:44:05FromDiscord<heysokam> In reply to @michaelb.eth "how about system like": now your buildsystem/ci needs to deal with finding the correct binaries for all the libraries you depend on for the target you are cross-compiling to↵you might remove one type of complexity, but you add another layer of it as replacement
18:44:47FromDiscord<heysokam> "i only support windows" is the only reason to find that a pleasent solution, imo
18:45:24FromDiscord<devlop_gaming> I'm supporting windows and linux. Well for one of my projects anyway.
18:46:01FromDiscord<michaelb.eth> I think there are scripts for that, e.g, Qt has deploy tool that finds all the dlls (or dylib on mac, .so on linux) that program depends on
18:47:04FromDiscord<michaelb.eth> so yeah, it’s a hassle but then once you have the script/s working it’s a solved problem, mostly
18:48:51FromDiscord<michaelb.eth> I built a CI pipeline like that for an app with builds for Windows, macOS, and Linux
18:49:24FromDiscord<heysokam> my argument is that needing to build such a thing, or worry about such a thing, is the problem itself
18:50:23FromDiscord<michaelb.eth> c'est la vie?
18:51:05FromDiscord<heysokam> imagine falling, breaking your leg, and a doctor giving you that as an answer to your problem
18:51:21FromDiscord<heysokam> "deal with the problem" is not really a solution to the problem, is it
18:51:42FromDiscord<michaelb.eth> yes, I had a doctor say something just lime that to me
18:51:50FromDiscord<heysokam> the root is caused by depending on a badly architected buildsytem that does not support static dependencies when needed
18:52:18FromDiscord<michaelb.eth> he said to me: “no, fix your life”. And so I had to
18:52:31FromDiscord<heysokam> damn
18:52:35FromDiscord<michaelb.eth> (edit) "yes, I had a ... doctorlike" added "medical" | "lime" => "like"
19:05:20FromDiscord<heysokam> Lets say I have an app that does `randomized_thing`↵I want the output to be randomly generated.. but reproducible if I find an issue with that one instance of randomness↵How can I generate arbitrary cases inside the call, in such a way that if I say `thing --seed:ThatSeed` in my compiled app, I can reproduce the same results?
19:06:09FromDiscord<Elegantbeef> `initRandom` takes a seed
19:06:10FromDiscord<heysokam> The issue I have right now is that `random.rand` generates the same exact value every time, unless you call randomize with a new seed 🤔
19:06:14FromDiscord<Elegantbeef> or `initRand` rather
19:06:35FromDiscord<heysokam> yea, but rand is going to generate the same value given the same seed, right?
19:07:11FromDiscord<heysokam> the problem is that I need multiple rand calls that generate different values each, but using the same seed
19:07:19FromDiscord<Elegantbeef> `initRand(hash(time).int)` 😄
19:08:06FromDiscord<heysokam> hmmm, but then I cannot call that at a different time to get the same outcome that I got at a previous time?
19:08:12FromDiscord<Elegantbeef> I had a similar logical problem with my fuzzer and just use the compile time as the seed for everything and then if there is an issue I can run the entire program and try to find it
19:08:37FromDiscord<heysokam> oh, you use compile time time, that's an idea
19:08:59FromDiscord<Elegantbeef> You can also dump the random after each run then have sections that show you the output
19:09:19FromDiscord<Elegantbeef> `Rand` is only really 2 integers so you can plop that as binary data then you can recover always
19:09:55FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=dUNOViqg
19:10:11FromDiscord<Elegantbeef> I also have a `{.hint: "bearSeed is: " & bearSeed.}`
19:10:58FromDiscord<Elegantbeef> This means in the case I hit a bug I can compile with `-d:bearSeed="MySeedHere"` and rerun the bad state
19:11:06FromDiscord<heysokam> how does that allow you to get different values on each call to rand?
19:11:20FromDiscord<Elegantbeef> Cause I use the same state globally
19:11:22FromDiscord<heysokam> is that not a one-time thing?
19:12:08FromDiscord<Elegantbeef> Each invoke of mine is the same since I'm testing the compiler and code generation
19:12:17FromDiscord<Elegantbeef> Which is what you want when you're fuzzing reproducible errors
19:12:25FromDiscord<heysokam> I think I'm being slow, because I can't see how to use that to get different rand results on each call to rand
19:12:49FromDiscord<Elegantbeef> `bearState.rand(...)` instead of `var rand = initRand(); rand.rand(...)`
19:13:23FromDiscord<heysokam> does that give you different outputs on each call by default?
19:13:28FromDiscord<Elegantbeef> `bearState` is the initial seeded state, I use it once globally cause I am doing each compile as a global one shot action
19:13:48FromDiscord<Elegantbeef> Yes every call mutates `bearState` and the next number
19:13:58FromDiscord<heysokam> ohh, I had no idea about that
19:14:08FromDiscord<heysokam> that's so much better then
19:14:16FromDiscord<Elegantbeef> It's how you do reproducible seeded actions
19:14:22FromDiscord<Elegantbeef> Proc gen in a game would use the above logic aswell
19:14:41FromDiscord<heysokam> makes sense now, I just had no idea that it behaved differently
19:14:59FromDiscord<heysokam> than random.rand
19:15:03FromDiscord<Elegantbeef> It doesnt, it behaves the same as the global random
19:15:25FromDiscord<Elegantbeef> If you do not call `randomize` you get the exact same state every time
19:15:36FromDiscord<heysokam> calling `random.rand` multiple times produces the same number, unless you `randomize`
19:15:42FromDiscord<Elegantbeef> It's a preseeded random generator to a constant seed
19:15:47FromDiscord<heysokam> so that's inherently different?
19:15:59FromDiscord<Elegantbeef> Right, but calling `random.rand` multiple times does not give you the same number in the same instance
19:16:13FromDiscord<heysokam> I don't follow
19:16:35FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=StNBYfoi
19:17:02FromDiscord<Elegantbeef> Ah whoops
19:17:02FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=TtwJOlww
19:17:05FromDiscord<heysokam> > If randomize has not been called, the sequence of random numbers returned from this proc will always be the same.↵https://nim-lang.org/docs/random.html#rand%2Cint
19:17:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=huUAzsCz
19:17:27FromDiscord<Elegantbeef> god dammit
19:17:33FromDiscord<Elegantbeef> `rng.rand(int) != rng.rand(int)`
19:17:45FromDiscord<heysokam> so it is different
19:17:46FromDiscord<Elegantbeef> Yes it's no different that intialising a seed with a constant state
19:17:55FromDiscord<Elegantbeef> No it's the same!
19:18:11FromDiscord<Elegantbeef> It's identical to the case where you do `var rng = initRand(someConstant)`
19:18:14FromDiscord<heysokam> omg beef. you just proved it is different with your example 🙈
19:18:18FromDiscord<Elegantbeef> Cause that's literally what the default random is
19:18:23FromDiscord<Elegantbeef> No I didnt?
19:18:46FromDiscord<heysokam> let me make a playground
19:19:10FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=EQGTgpsm
19:19:29FromDiscord<Elegantbeef> The `rand` is no different to `rng` it's just it uses a global variable
19:19:53FromDiscord<Elegantbeef> Both will always be not equal to the next call for the end of time cause they're both seeded as such
19:20:09FromDiscord<Elegantbeef> It's possible to replace `100` with a seed that makes the assertion fail, but as long as it's 100 it'll never fail
19:21:49FromDiscord<Elegantbeef> The only difference to the two is that you're providing a changing seed that you know and can recover later, whereas the global rand is seeded constantly unless you randomize it
19:22:21FromDiscord<Elegantbeef> `initRand()` is the same as if you did `randomize()`
19:22:31FromDiscord<Elegantbeef> But `initRand(seed)` just sets the seed for the random state
19:26:26FromDiscord<heysokam> I stand corrected. You are right, and the docs are either wrong or use completely misleading wording https://media.discordapp.net/attachments/371759389889003532/1363234299410776304/image.png?ex=68054a60&is=6803f8e0&hm=da4afcd4edfd0b05f6f3e0020ed5bfe32edf901a50d3d7c224acd24f07eedf9a&
19:38:48FromDiscord<Elegantbeef> I'm never not right 😛
19:46:45FromDiscord<heysokam> how can I typehint `thing( one..two )` as the type of the argument in thing?
19:48:33FromDiscord<Elegantbeef> `type(one)..type(two)`
19:49:22FromDiscord<heysokam> as the type?
19:49:38FromDiscord<Elegantbeef> I don't follow
19:49:55FromDiscord<heysokam> `proc thing (arg : ???)=`
19:50:03FromDiscord<threefour> Isn't that a range type?
19:50:18FromDiscord<Elegantbeef> `Slice[T]`
19:50:36FromDiscord<Elegantbeef> Or `HSlice[T, Y]`
19:50:40FromDiscord<threefour> O nvm
19:51:08FromDiscord<Elegantbeef> Range is close but range is a single value not a range of values
19:51:14FromDiscord<Elegantbeef> Subrange type and all that jazz
19:51:48Amun-Rathere's HSlice but what I found very sursprising is there's no vertical one :/
19:52:09FromDiscord<Elegantbeef> Well that's not what the H stands for
19:52:10FromDiscord<heysokam> whats different between HSlice and Slice?
19:52:20FromDiscord<Elegantbeef> HSlice is hetrogenous
19:52:23FromDiscord<Elegantbeef> Slice is homogenous
19:52:42Amun-Raso no androgenous one
19:53:35Amun-Ra(I'll as myself out)
19:53:39Amun-Raask*
19:55:27FromDiscord<heysokam> I was going to make a followup, amun. it was funny
19:55:42Amun-Rathanks :)
20:15:54*rockcavera quit (Remote host closed the connection)
20:54:23FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=dYUSRONc
20:55:08FromDiscord<Elegantbeef> I've never been complimented so much in a single sentence
20:55:46FromDiscord<heysokam> 🙂
20:56:04FromDiscord<Elegantbeef> `skipRandomNumbers` is a relatively deterministic procedure so I do not expect anything in there to be the culprit
20:56:24FromDiscord<heysokam> this is my random setup now:↵https://github.com/heysokam/codegen.nim/blob/master/src/random.nim
20:56:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=ZmWErKFH
20:57:03FromDiscord<heysokam> I'm using some `cast(noSideEffects)` blocks. could they cause weird behavior with random?
20:57:31FromDiscord<Elegantbeef> They shouldn't do anything to generation or logic, but perhaps it's a bug
20:57:36FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=BuygSnve
20:58:33FromDiscord<heysokam> oh... I remember this happening before. I sense an invisible `UB` trap from the zigcc compiler 🤔
20:59:01FromDiscord<Elegantbeef> How is that code even working
20:59:06FromDiscord<Elegantbeef> `state.rand` shouldn't work
21:00:03FromDiscord<Elegantbeef> `R.rand(state, int.high)`
21:00:08FromDiscord<Elegantbeef> But also `integer: SomeInteger` is wholly wrong
21:00:12FromDiscord<Elegantbeef> it's just `integer: int`
21:01:07FromDiscord<heysokam> might not be calling all versions. I uploaded the WIP state just to be able to ask easier
21:02:30*amadaluzia quit (Ping timeout: 265 seconds)
21:03:01FromDiscord<Elegantbeef> Wait does codegen run only at compile time?
21:03:05FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=TBvRksuZ
21:03:22FromDiscord<heysokam> In reply to @Elegantbeef "Wait does codegen run": what do you mean?
21:03:37FromDiscord<Elegantbeef> Does your program run at compiletime or runtime?
21:03:41FromDiscord<heysokam> runtime
21:03:49FromDiscord<Elegantbeef> So remove the `{.compileTime.}`
21:03:51FromDiscord<Elegantbeef> Cmon now
21:04:03FromDiscord<heysokam> i trusted you for nothing 😭
21:04:08FromDiscord<heysokam> will do!
21:04:17FromDiscord<heysokam> forgot that your code is using macros
21:04:43FromDiscord<heysokam> that was it, ty 🙂
21:08:07FromDiscord<Elegantbeef> I gave you an example from my project
21:08:07FromDiscord<Elegantbeef> Why would you use compile time if you're running code at runtime
21:08:08FromDiscord<Elegantbeef> https://images.fineartamerica.com/images/artworkimages/mediumlarge/3/think-mark-think-meme-from-invincible-omniman-knight-roberts.jpg
21:08:11FromDiscord<Elegantbeef> I imagine it was some bug with attempting to mutate rodata
21:28:26FromDiscord<heysokam> https://tenor.com/view/deadpool-3-yes-but-i-can't-deadpool-ryan-reynolds-deadpool-and-wolverine-gif-601706632681033345
21:48:26*void09 quit ()
21:48:55*ntat quit (Quit: leaving)
21:49:02*void09 joined #nim
21:54:45FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=UmtGJQcW
21:55:58FromDiscord<heysokam> My immediate guess is yes, but wonder if there could be some clever trick to not need it (other than storing the variable outside of the block, ofc)
22:00:22FromDiscord<heysokam> oh well, my immediate guess was totally wrong. it is not scoped 🥳
23:08:10*Guest2085 quit (Ping timeout: 265 seconds)