<< 05-09-2022 >>

00:13:13FromDiscord<Superstart033> I thought sequences couldnt have repeat items (like numbers and such)
00:13:25FromDiscord<Superstart033> then this happen https://media.discordapp.net/attachments/371759389889003532/1016138952132014150/unknown.png
00:13:44FromDiscord<Superstart033> two zeroes lol
00:13:50FromDiscord<Generic> sequences aren't sets
00:15:05FromDiscord<Superstart033> I knew I was confuse it with something else!
00:15:28FromDiscord<Generic> in most programming languages the formal datatype is known by it's implementations
00:15:42FromDiscord<Generic> such as a dynamic array or linked list
00:49:18FromDiscord<Superstart033> A lot of nim done this last weekend
00:49:26FromDiscord<Superstart033> Exercism is really good
00:51:30FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=49Fq
00:51:44FromDiscord<Tuatarian> (`u16 `is a type alias for `uint16`)
00:51:53FromDiscord<Tuatarian> this throws an error when evaluating this
00:52:14FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=49Fr
00:53:25FromDiscord<Tuatarian> it says
00:56:09FromDiscord<Tuatarian> `d:\Scripts\Misc\Nim\Nim\games\terrend\rayformulation.nim(16, 17) Error: type mismatch: got 'typedesc[Vec[2]]' for 'Vec[u16(len([tan(c.fovX / 2), tan(c.fovY / 2)]))]' but expected 'Vec[2]'`
00:56:18FromDiscord<Tuatarian> (edit) removed "`d:\Scripts\Misc\Nim\Nim\games\terrend\rayformulation.nim(16, 17)"
00:56:23FromDiscord<Tuatarian> (edit) "Error:" => "`Error:"
00:56:34FromDiscord<Tuatarian> I think this is because it needs to evaluate that expression at comptime
00:56:46FromDiscord<Tuatarian> how can I force it to eval `u16 args.len` at comptime?
00:57:08FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=49Fs
00:57:33FromDiscord<Tuatarian> `N` is a `uint16`, would that work?
00:57:37FromDiscord<huantian> (I changed the number types cus it's just easier for me but you can change those back)↵the main issue with yours is that you tried to set the type of `result` with `=` which doesn't work
00:57:56FromDiscord<Tuatarian> oh
00:57:59FromDiscord<huantian> I think it should work with a uint16, though you'd definitely want to do some bound checking
00:58:00FromDiscord<Tuatarian> why not?
00:58:16FromDiscord<huantian> `Vec[1]` is a type, not a value
00:58:18FromDiscord<Tuatarian> I'm not too worried about a vec ending up with more than uint16 arguements
00:58:34FromDiscord<huantian> true
00:58:41FromDiscord<Tuatarian> oh, I see
00:59:00FromDiscord<Tuatarian> so if I changed that to `result = Vec[u16 args.len]()` would that work?
01:00:30FromDiscord<huantian> you'd have to do something like `var result = default(Vec[args.len])`
01:00:33FromDiscord<Elegantbeef> I honestly dont even see the point of this vec type
01:00:35FromDiscord<Elegantbeef> Like are you just trying to generalise all mathematical vectors
01:00:50FromDiscord<Elegantbeef> Do you really need a vector 13
01:00:55FromDiscord<Elegantbeef> Do you need a vector 5?
01:02:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49Fw
01:02:42FromDiscord<Elegantbeef> Why you need anything else is beyong me
01:02:46FromDiscord<Elegantbeef> beyond even
01:03:18FromDiscord<Elegantbeef> Sorry that should be `result[ind] = float32 val`
01:12:02FromDiscord<Tuatarian> yes, I want to possibly have a vec5
01:12:26FromDiscord<Tuatarian> vec13 is unlikely though
01:13:19FromDiscord<Tuatarian> this is obviously yakshaving to some extent though, I'm doing this mostly because I want to
01:29:43FromDiscord<Girvo> In reply to @Elegantbeef "Why you need anything": Generic mathematics/scientific work can need Vec[N], but thats pretty niche lol
01:30:02FromDiscord<Elegantbeef> Hence my question 😄
01:30:36FromDiscord<Elegantbeef> I mean they're using float64s which is weird enough
01:31:21FromDiscord<Elegantbeef> I know they're likely working on game related things, i dont think anyone is insane enough to make a 5+D game
01:31:47FromDiscord<Girvo> I don't know if anyone is doing N-dimensional math proofs in Nim haha. But Julia has them (well, N-dimensional arrays, but are equivalent to what we're talking about here)
01:32:07FromDiscord<Elegantbeef> Julia isnt statically typed iirc so that's a moot point 😛
01:32:23*arkurious quit (Quit: Leaving)
01:33:08FromDiscord<Girvo> Hah wellllll.... ↵http://gamelab.mit.edu/games/a-slower-speed-of-light/↵https://store.steampowered.com/app/355750/Miegakure/↵plus some others I'm forgetting
01:33:24FromDiscord<Girvo> Miegakure is 5 dimensions counting time 😛
01:33:47FromDiscord<Girvo> But N dimensional vectors are useful for tensor maths, IIRC
01:33:49FromDiscord<Elegantbeef> Are they encoding time into a data type or is it a shared dimension
01:34:18FromDiscord<Girvo> In Miegakura time is seperate, its really 4 dimensions + time, which is pretty cute
01:34:41FromDiscord<Elegantbeef> Yea i know the game, i just will not admit to saying people make 5+D games!
01:34:43FromDiscord<Tuatarian> this is basically a rendering framework, which definitely doesn't need this
01:34:53FromDiscord<Tuatarian> I'm mostly doing it because I can, which is not the worst motivation imo
01:35:01FromDiscord<Elegantbeef> If you're making a render framework you shouldnt even use a concrete vector
01:35:05FromDiscord<Elegantbeef> Be a chad and use a concept
01:35:13FromDiscord<Tuatarian> what is a concept
01:35:32FromDiscord<Tuatarian> no but I want vectors since I actually do want to give a shot to making a higher dimensional game
01:35:41FromDiscord<Elegantbeef> A generic constraint that says the required shape of a type
01:35:52FromDiscord<Elegantbeef> https://github.com/beef331/miniaudio/blob/master/src/miniaudio.nim#L35-L41
01:35:54FromDiscord<Elegantbeef> For instance
01:36:12FromDiscord<Girvo> Concepts are like fancy interfaces 😄 ↵ducks
01:36:12FromDiscord<Elegantbeef> It's a user defined duck type practically
01:36:40FromDiscord<Elegantbeef> We both are talking about ducks!
01:36:44FromDiscord<Girvo> haha
01:37:04FromDiscord<Elegantbeef> Though i'm fairly certain one might be using it as a verb
01:37:22FromDiscord<Elegantbeef> The benefit of using a concept is it becomes a "bring your own vector" situation
01:37:46FromDiscord<Elegantbeef> This way it doesnt matter if you use glm, vmath, joeschmoes' vector library, a tuple... it just works
01:38:58FromDiscord<Elegantbeef> In some cases you will want to enforce a size limit on the vector, but aside from that in a lot of APIs it really doesnt matter if the type is a specific shape, just that it has specific accessors
01:39:26FromDiscord<Elegantbeef> As such any object that has a x, y, z should be usable in place of vectors in like 90% of use cases
01:39:27FromDiscord<Girvo> I would love to see someone us Arraymancer for their n-dimensional arrays in a game engine. God imagine the pain and chaos
01:39:38FromDiscord<Elegantbeef> Lol
01:39:55FromDiscord<Elegantbeef> I've been thinking of rewriting truss to be purely vector agnostic
01:40:10FromDiscord<Elegantbeef> It's just the best idea if you ask me
01:40:37FromDiscord<Girvo> go on then hahaha
01:40:41FromDiscord<Elegantbeef> The only downside is for SSBO/UBOs you have to copy to your own vector type to upload to the gpu
01:40:53FromDiscord<Girvo> okay okay I need to get back to wiring in libsodium
01:41:17FromDiscord<Elegantbeef> I mean truss is only like 2000 lines of code at this point, it's not that complicated to do 😛
01:44:18FromDiscord<Elegantbeef> So girvo you're going to give a nimconf talk on using nim in embedded right?
01:47:56*adium quit (Quit: Stable ZNC by #bnc4you)
02:05:24*adium joined #nim
04:47:11FromDiscord<jos> anyone having general issues with the nim extension in vscode
04:47:21FromDiscord<jos> for 1, only get syntax errors in the last file i saved
04:47:23FromDiscord<Elegantbeef> Which extension?
04:47:25FromDiscord<jos> and 2, go to definition doesn't work on windows
04:47:29FromDiscord<jos> the one called nim idk
04:47:42FromDiscord<Elegantbeef> Well look at which extension
04:48:01FromDiscord<jos> it's the most popular nim extension
04:48:10FromDiscord<Elegantbeef> use Nimsaems
04:48:47FromDiscord<jos> is that a typo?
04:48:53FromDiscord<jos> oh
04:49:36FromDiscord<jos> idk it has the same issues
04:49:57FromDiscord<Elegantbeef> Setup your project as it tells you to
04:50:05FromDiscord<Elegantbeef> If the issues persist welcom to nim tooling
04:50:42FromDiscord<Prestige> Where the errors are made up and the linting doesn't matter
04:51:12FromDiscord<Elegantbeef> Eh the errors arent made up in 90% of cases 😛
04:54:05FromDiscord<Girvo> Simplest way to remove the first 4 indexes of a `var seq` -- in-place ideally?
04:54:14FromDiscord<Girvo> I think I'm missing something in sequitls
04:54:41FromDiscord<Girvo> Oh lol. `delete` should do it, yeah?
04:54:42FromDiscord<Rika> Delete
04:54:44FromDiscord<Rika> Yes
04:55:06FromDiscord<Girvo> In my case `mySeq.delete(0, 3)`?
04:55:09FromDiscord<Rika> Might not be that fast though
04:55:12FromDiscord<Elegantbeef> It wont be efficient but yes
04:55:17FromDiscord<Girvo> Ah
04:55:26FromDiscord<Elegantbeef> oh sequtils has a delete range
04:55:37FromDiscord<Girvo> `0..3` nice
04:55:42FromDiscord<Girvo> Is there a faster approach? This will do for now though at least
04:56:02FromDiscord<Generic> if you always delete from the beginning and add to the end use a deque
04:56:42FromDiscord<Girvo> interesting. Alright I'll take a look
04:57:30FromDiscord<Girvo> popFirst x 4 should be faster?
04:57:55FromDiscord<Generic> compared to what?
04:58:31FromDiscord<Elegantbeef> You need to move the data down by 4 elements there are only CPU/Memory tradeoffs here
04:58:32FromDiscord<Generic> on average a deque deleting and adding to front and back are constant time with a deque
04:58:49FromDiscord<Elegantbeef> You might be better to just use `.toOpenArray(3, mySeq.high)`
04:59:19FromDiscord<Generic> well only if they only want to a view
04:59:46FromDiscord<Generic> (edit) removed "to"
04:59:53FromDiscord<Generic> blah I'm currently writing nonsense sentences
04:59:56FromDiscord<Girvo> I basically do, this is the only mutation operation that happens on this. It's a TLV message format over TCP in an embedded application
04:59:59FromDiscord<SaAnd> isn't there a `shrink` proc that does this from either end?↵(@Girvo)
05:00:08FromDiscord<Elegantbeef> It's fine i only write nonsense
05:00:19FromDiscord<Generic> https://nim-lang.org/docs/deques.html#shrink%2CDeque%5BT%5D%2Cint%2Cint
05:00:20FromDiscord<Generic> yes
05:00:24FromDiscord<Girvo> SaAnd: shrink is for deque yeah
05:00:46FromDiscord<Elegantbeef> Well girvo if you dont need to hold onto it the `toOpenArray` or a template that calls `toOpenArray` is the best
05:01:17FromDiscord<Elegantbeef> It doesnt allocate any extra seq or anything of that nature that you need to do otherwise
05:01:35FromDiscord<Girvo> @ElegantBeef basically the first 4 bytes of the messages "value" is a `uint32` "nonce", and the rest is the ciphertext
05:02:07FromDiscord<Girvo> Okay nice
05:02:27FromDiscord<Girvo> Avoiding allocation here would be ideal, as this is being used for firmware data chunks of 32kb lol
05:02:47FromDiscord<Girvo> (And then lands in SPI ram, but these operations are happening on the SRAM itself)
05:03:18FromDiscord<Generic> SPI ram, can't even spare a few pins for QPI? 😄
05:03:32FromDiscord<Rika> QPI is more likely unsupported
05:03:50FromDiscord<Rika> (edit) "more" => "most"
05:04:41FromDiscord<Elegantbeef> Since order matters and `delete` would move the collection down n times
05:04:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49G4
05:04:42FromDiscord<Elegantbeef> A single allocation and copy is probably quicker than that, but ymmv 😄
05:04:54FromDiscord<Elegantbeef> I guess you could start at the end of the sequence - 4 and move each element down
05:06:01FromDiscord<Rika> Or you could just make your procs ignore the first four bytes in their algorithms?
05:06:15FromDiscord<Elegantbeef> Hey that's what the toOpenArray was for!
05:08:48FromDiscord<Girvo> In reply to @Rika "Or you could just": Yeah that's basically what I've done. Just makes me nervous when others use it lol
05:09:30FromDiscord<Rika> If someone else uses it then they still have the risk either way, since you don’t distinguish “nonce included” from “nonce removed” types?
05:13:44FromDiscord<Girvo> I was going to haha 🙂 But guess what! I don't need it after all:↵`crypto_secretbox_open_easy` in nim-libsodium reads the nonce from the first 4 bytes anyway lol
05:13:46FromDiscord<Girvo> Thank god for that
05:14:52FromDiscord<Girvo> Well secretbox does anyway
05:18:08*PMunch joined #nim
05:43:02FromDiscord<SaAnd> why does this fail? https://play.nim-lang.org/#ix=49G9↵is there a way to do this?
05:46:51FromDiscord<Elegantbeef> Check pragmas are very ugh and generally seem to only work at top level as such↵https://play.nim-lang.org/#ix=49Gb
05:47:59FromDiscord<Elegantbeef> Compiler has bugs
05:47:59FromDiscord<SaAnd> I eventually noticed that but why?
05:57:03FromDiscord<SaAnd> wait it is a defect↵how do you purposefully ignore overflowDefect?
05:57:19FromDiscord<Elegantbeef> You do not ignore defects
05:57:29FromDiscord<Elegantbeef> Defects are a nice idea but terribly implemented
05:57:41FromDiscord<Elegantbeef> You write code that ensures the defect never happens if you're concerned
06:00:59FromDiscord<Phil> Write non defective code!
06:01:09madpropswith beef's wasmer bindings doees it means i can now write webassembly with nim?
06:01:35madpropsi read webasemmbly wasn't that good
06:01:48FromDiscord<Elegantbeef> If wasmedge worked for you you could've used those bindings
06:01:53FromDiscord<Elegantbeef> And i mean wasmer is just about running the code
06:02:49FromDiscord<Elegantbeef> I mean wasm is fanfuckingtastic if you want to be able to script from any language
06:03:35FromDiscord<jos> ok i got the vscode extension to work
06:03:49FromDiscord<jos> for some reason i had to downgrade nim to 1.6.0, apparently the latest devel works too, but somewhere along the line nimsuggest broke
06:17:14FromDiscord<jos> imo wasm is really oddly designed, for something that is supposed to target the web it's missing a lot of features that would make that nice
06:17:26FromDiscord<Elegantbeef> Who cares about the web
06:17:32FromDiscord<jos> wasm should
06:17:34FromDiscord<Elegantbeef> The modern web was a mistake
06:18:09FromDiscord<Elegantbeef> We're talking about wasm as a native runtime and not interacting with websites in this context, so those parts really dont matter
06:18:21FromDiscord<jos> i mean even then, wasm isn't really that interesting, the only thing you get is universal binaries
06:18:30FromDiscord<jos> it doesn't have any features that make interop useful or anything like that
06:19:00FromDiscord<jos> wasi gives you an os-agnostic layer and that's basically it
06:19:17FromDiscord<jos> idk
06:19:17FromDiscord<Elegantbeef> You're leaving out the wonderful fact it's language agnostic
06:19:28FromDiscord<jos> i think it's pretty bad at that
06:19:31FromDiscord<Elegantbeef> You do not force a language on your user like any other API
06:20:42FromDiscord<jos> i mean u could get the same by just "embedding" x86 and use qemu like quake 3 did
06:20:45FromDiscord<Elegantbeef> To me it seems like the best tool for scriptable projects
06:20:48FromDiscord<jos> (edit) "i mean u could get the same by just "embedding" x86 and use ... qemu" added "a vm like"
06:20:53*wallabra quit (Ping timeout: 252 seconds)
06:21:09FromDiscord<Elegantbeef> I mean you can also just use dynamic libraries
06:21:19FromDiscord<Elegantbeef> But those are much more likely to get hit by sandbox issues
06:21:43FromDiscord<jos> well, anyway, if it's built for the web i would expect a higher-level format that supports interop and stuff
06:21:47FromDiscord<jos> more like grailvm
06:22:01FromDiscord<jos> but it's useful for sure
06:22:10FromDiscord<jos> graalvm
06:22:13FromDiscord<Elegantbeef> There is a new interop tool/standard being developed
06:22:47FromDiscord<creikey> dude honestly what if I just use beeflang unironically
06:22:48FromDiscord<Elegantbeef> Fuck i cannot remember the name
06:22:49FromDiscord<jos> maybe it'll get there
06:22:52FromDiscord<jos> beeflang looks really nice
06:23:00FromDiscord<jos> i just dev on mac so i can't use it
06:23:09FromDiscord<Elegantbeef> Does it really look nice? It's C# but worse 😄
06:23:27FromDiscord<creikey> In reply to @Elegantbeef "Does it really look": it has a focus on a good IDE which is my biggest problem with nim. Debugging is so bad and necessary in complex projects (which games tend to become)
06:23:41FromDiscord<creikey> I also care a lot about what memory looks like, what the computer is doing, for my next project
06:23:52FromDiscord<Elegantbeef> And Nim allows you to do that 😄
06:24:00FromDiscord<Elegantbeef> Use Odin or Zig over beeflang
06:24:04FromDiscord<Elegantbeef> They're both more sensible imo
06:24:09FromDiscord<Elegantbeef> But you do you of course
06:24:16FromDiscord<jos> beef has a lot of features that are really productive
06:24:25FromDiscord<jos> neither zig nor odin really have anything close
06:25:15FromDiscord<creikey> In reply to @Elegantbeef "And Nim allows you": it allows you to do that but it's not what it's built for, somewhat cumbersome
06:25:23FromDiscord<creikey> In reply to @Elegantbeef "They're both more sensible": debugging also mixed in those cases
06:25:31FromDiscord<creikey> > Beef's primary design goal is to provide a fluid and pleasurable development experience for high-performance real-time applications such as video games, with low-level features that make it suitable for engine development, combined with high-level ergonomics suitable for game code development.↵> ↵like nim is not this
06:25:51FromDiscord<creikey> the only problem is it seems like such a joke, like the installer has sound effects. who is using this even??
06:25:59FromDiscord<jos> i mean u can't even use operator overloading in zig, that's hell for any kind of math-heavy thing like gamedev
06:26:02FromDiscord<Elegantbeef> No one
06:26:02FromDiscord<creikey> beeflang is more obscure than nim and I'm already in trouble for using nim
06:26:17FromDiscord<Elegantbeef> I know of like 1 person that's used beeflang unironically
06:26:33FromDiscord<creikey> In reply to @jos "i mean u can't": I mean yeah. I heard a compelling argument from a C only guy though that you can just put each vector operation on its own line, that way you can step through it with a debugger
06:26:54FromDiscord<creikey> I often have very long single lines which do a lot in games, end up causing problems because I can't see results of sub-expressions in debugger
06:27:01FromDiscord<creikey> > Memory management in Beef is manual, and includes first-class support for custom allocators. Care has been taken to reduce the burden of manual memory management with language ergonomics and runtime safeties – Beef can detect memory leaks in real-time, and offers guaranteed protection against use-after-free and double-deletion errors. As with most safety features in Beef, these memory safeties can be turned off in release builds for m
06:27:03FromDiscord<creikey> nim does not have this
06:27:14FromDiscord<jos> just use c++
06:27:24FromDiscord<jos> if you care about making it work anyway
06:27:39FromDiscord<jos> there's a lot of debug tools for c++ memory safety
06:27:42FromDiscord<creikey> In reply to @jos "just use c++": yeah probably. sad answer though, I like new wacky things
06:27:54FromDiscord<jos> ye i mean the new c++ features are getting closer to the whacky
06:27:55FromDiscord<Elegantbeef> Is it any better than just valgrind?↵(@creikey)
06:27:58FromDiscord<creikey> In reply to @jos "there's a lot of": apparently you can use beef debugger with C++
06:28:04FromDiscord<creikey> In reply to @Elegantbeef "Is it any better": valgrind does not work on windows which is who I ship to
06:28:18FromDiscord<creikey> I want to build reliable games which people can actually experience and play for a long itme
06:28:20FromDiscord<creikey> (edit) "itme" => "time"
06:28:40FromDiscord<Elegantbeef> No comment
06:28:47FromDiscord<jos> visual studio is probably best in class for memory analysis anyway
06:28:50FromDiscord<creikey> valgrind is great on linux though
06:28:54FromDiscord<creikey> In reply to @jos "visual studio is probably": yeah I need to dig into this
06:29:02FromDiscord<Rika> A and M san?
06:29:12FromDiscord<creikey> I could compile Nim with cl and use visual studio to debug
06:29:22FromDiscord<creikey> all the symbols would still be mangled though, and the watch window expressions in C (kinda) not nim
06:29:40FromDiscord<jos> i really like nim but it's got a lot of weird shit
06:29:42FromDiscord<creikey> what's the point of operator overloading, all my stuff is done in weird subexpressions, but I can't check the results of my expressions in the watch window? How is that supposed to work
06:29:57FromDiscord<creikey> In reply to @jos "ye i mean the": I really really dislike all the new C++ features, it's so bad
06:30:01FromDiscord<Rika> In reply to @jos "i really like nim": So?
06:30:11FromDiscord<jos> so it's lame
06:30:16FromDiscord<Rika> Okay
06:30:16FromDiscord<jos> anyway
06:30:29FromDiscord<creikey> In reply to @jos "there's a lot of": their websites look like this though. this looks like a scam site https://media.discordapp.net/attachments/371759389889003532/1016233842601885726/unknown.png
06:30:44FromDiscord<jos> visual studio has memory snapshots and can find dangling pointers and stuff
06:30:53FromDiscord<creikey> In reply to @jos "visual studio has memory": oh nice, does it have stuff to detect use after free?
06:31:01FromDiscord<Elegantbeef> Creikey go use vale 😄
06:31:06FromDiscord<Rika> Have you looked at what I said
06:31:16FromDiscord<creikey> In reply to @Rika "Have you looked at": what?
06:31:17FromDiscord<Rika> Address and memory sanitiser from Clang or whatnot
06:31:21FromDiscord<creikey> In reply to @Rika "A and M san?": this?
06:31:24FromDiscord<Rika> Yes
06:31:29FromDiscord<creikey> In reply to @Rika "Address and memory sanitiser": ooohh I thought you were just saying like random stuff
06:31:42FromDiscord<creikey> In reply to @Elegantbeef "Creikey go use vale": the gnu thing??
06:31:47FromDiscord<creikey> duuuude I remember that weird language
06:31:49FromDiscord<creikey> the one with uhh
06:31:50FromDiscord<Elegantbeef> https://vale.dev/
06:31:50FromDiscord<creikey> gobjects right
06:31:51FromDiscord<Rika> In reply to @creikey "ooohh I thought you": They’re just called that in short yes
06:31:58FromDiscord<creikey> no this is something else
06:31:59FromDiscord<creikey> what is this
06:32:07FromDiscord<jos> im not sure exactly what you can find with the memory tooling tbh
06:32:10FromDiscord<Elegantbeef> Fuck i cannot remember that god damn wasm standardised format
06:32:25FromDiscord<creikey> In reply to @Elegantbeef "https://vale.dev/": we like the sound of perfect replayability
06:33:21FromDiscord<creikey> In reply to @Rika "Address and memory sanitiser": I'd have to see how it is with nim, could be good. I really want good smooth debugger though, after having it so much in Godot it's my priority for next thing (which I'm going to be working on for awhile)
06:33:49FromDiscord<creikey> In reply to @Elegantbeef "https://vale.dev/": more obscure than beef
06:33:55FromDiscord<creikey> In reply to @Elegantbeef "https://vale.dev/": number of langauge users: 4
06:34:00FromDiscord<Rika> I’d say less
06:34:04FromDiscord<jos> you can always use c# and optimize the bits that need to be in c++
06:34:08FromDiscord<jos> unless you're targetting weird platforms
06:34:13FromDiscord<creikey> but the developer knows what they're doing https://media.discordapp.net/attachments/371759389889003532/1016234783413645363/unknown.png
06:34:48FromDiscord<jos> and then there's always rust if you want to code yourself into a box
06:34:48FromDiscord<Elegantbeef> Yes making a 3D viewer of maps is equivlent to language design and compiler development 😄
06:34:50FromDiscord<creikey> In reply to @jos "you can always use": for the next thing I want to make, I really really need to be as fast as possible and do things like SIMD. Targeting windows or console. I care a lot about debugging as well because it is a distributed state + lots of computation thing
06:34:58FromDiscord<creikey> In reply to @Elegantbeef "Yes making a 3D": I mean it is a complex problem
06:35:00FromDiscord<Elegantbeef> `Box<T>` FTFY↵(@jos)
06:35:14FromDiscord<creikey> In reply to @jos "and then there's always": I used rust for a rollback netcode game a year ago, was alright
06:35:16FromDiscord<Rika> In reply to @creikey "for the next thing": What are you doing
06:35:43FromDiscord<creikey> In reply to @Rika "What are you doing": essentially terraria but in space, and everything is a rigidbody, but I have a very specific direction I want to take things
06:35:57FromDiscord<creikey> think like 2d space engineers
06:36:01FromDiscord<Rika> The fuck lmao I don’t get it
06:36:06FromDiscord<creikey> all of those are games, I'm making a game
06:36:19FromDiscord<Rika> I know but that doesn’t really explain the idea of your game is what I meant
06:36:34FromDiscord<creikey> In reply to @Rika "I know but that": well I have a design document, what aspects are you asking about?
06:36:49FromDiscord<creikey> in terms of what it's about I want to make a game about what if humanity won, got the good ending
06:36:50FromDiscord<Rika> No it’s fine it was just a curiosity
06:36:54FromDiscord<creikey> what if we did not destroy ourselves
06:36:59FromDiscord<creikey> and kept moving
06:37:02FromDiscord<creikey> what is civilization aiming at
06:37:18FromDiscord<jos> have u looked at swift
06:37:26FromDiscord<creikey> In reply to @jos "have u looked at": isn't this garbage collected and apple only?
06:37:27FromDiscord<jos> it's rly fuckin slow but will probably get faster
06:37:32FromDiscord<jos> it uses refcounting
06:37:35FromDiscord<creikey> it does look nice though
06:37:36FromDiscord<jos> it's also not apple only
06:37:50FromDiscord<creikey> In reply to @jos "it uses refcounting": I'm going to need a lot of small objects, I can't really refcount because that overhead actually is too big, I've profiled
06:37:51FromDiscord<Elegantbeef> Most of the users and libraries are aimed at apple developing though
06:37:53FromDiscord<jos> u can run it on unix/windows, but it's made by apple and has mediocre support on those platforms
06:37:59FromDiscord<jos> u can escape refcounting if u want
06:38:02FromDiscord<jos> with unsafe ops
06:38:08FromDiscord<jos> but it's not ergonomic rly
06:38:17FromDiscord<jos> u know nim is gc'd or rc'd right
06:38:24FromDiscord<Elegantbeef> > I'm going to need a lot of small objects, I can't really refcount because that overhead actually is too big, I've profiled↵If you're using references for your small objects you're already fucked
06:38:27FromDiscord<creikey> In reply to @creikey "what is civilization aiming": beyond post scarcity where we can do everything within reason and nobody really has to work, like what are we gonna do? What is there to live for in such a world. That is what I want to make a game about, maybe a thing our species could do
06:38:49FromDiscord<Elegantbeef> Sometimes i question if you know what you're saying
06:38:54FromDiscord<creikey> In reply to @jos "u know nim is": yes, but nim has a really nice way of avoiding the gc by just not using the keyword `ref` in my types, so that specifically has not really been a problem
06:39:09FromDiscord<creikey> In reply to @Elegantbeef "Sometimes i question if": I probably don't I'm pretty stupid
06:39:14FromDiscord<Elegantbeef> Swift also has value types
06:39:21FromDiscord<jos> ye swift got it too
06:39:28FromDiscord<Rika> In reply to @creikey "yes, but nim has": You also have to avoid seq and string
06:39:29FromDiscord<creikey> In reply to @Elegantbeef "Swift also has value": does it have `.ptr` and `.[]`
06:39:31FromDiscord<jos> its c# style, class vs struct
06:39:35FromDiscord<creikey> In reply to @Rika "You also have to": yeah of course
06:39:45FromDiscord<jos> what does .ptr and .[] mean
06:39:47FromDiscord<Rika> Just making sure you know
06:39:52FromDiscord<creikey> In reply to @jos "what does .ptr and": those are nim's pointers
06:39:57FromDiscord<creikey> "unsafe" poitners
06:39:59FromDiscord<jos> it has unsafe pointers
06:40:01FromDiscord<Elegantbeef> Yes it does have pointers↵(@creikey)
06:40:02FromDiscord<creikey> (edit) "poitners" => "pointers"
06:40:07FromDiscord<Elegantbeef> It's a system language
06:40:15FromDiscord<creikey> if you have those, pointer arithmetics, value types, you're good
06:40:23FromDiscord<creikey> (edit) "arithmetics," => "arithmetic,"
06:40:28FromDiscord<creikey> In reply to @Elegantbeef "It's a system language": ah I see
06:40:28FromDiscord<jos> i dont think it has simple pointer arithmetic
06:40:31FromDiscord<creikey> I thought swift was like an app language
06:40:34FromDiscord<creikey> like Flutter and Dart
06:40:40FromDiscord<creikey> I used Flutter man I do not like using flutter
06:40:44FromDiscord<jos> it is, but it's targeted towards mobile platforms
06:40:51FromDiscord<Elegantbeef> I mean it's a replacement for objective C
06:40:52FromDiscord<jos> it's actually a really neat language
06:40:55FromDiscord<Elegantbeef> So it has to be as capable 😄
06:40:56FromDiscord<creikey> In reply to @Elegantbeef "I mean it's a": yeah
06:41:05FromDiscord<creikey> In reply to @jos "it's actually a really": I've heard a lot of people really like it and it does have serious corporate backing
06:41:10FromDiscord<jos> it has a lot of really quirky features, like struct layouts can change across DLL boundaries
06:41:14FromDiscord<jos> without needing to inform the other DLL
06:41:24FromDiscord<jos> it's extremely slow under those circumstances, because it basically falls back to an interpreter
06:41:24FromDiscord<creikey> In reply to @jos "it has a lot": dude whaaat
06:41:25FromDiscord<creikey> that's wild
06:41:28FromDiscord<creikey> oh lol
06:41:28FromDiscord<Elegantbeef> It also by default does runtime dispatched generics
06:41:29FromDiscord<creikey> nvmd
06:41:32FromDiscord<jos> nah it's awesome
06:41:37FromDiscord<creikey> In reply to @Elegantbeef "It also by default": :(( pack up the bags go home
06:41:45FromDiscord<jos> it's all in the name of mobile efficiency
06:41:49FromDiscord<Elegantbeef> You can make the monomorphic
06:41:50FromDiscord<jos> quite good imo
06:42:01FromDiscord<creikey> `#!@{runtime_generics[disable]}##{.>}` the syntax to disable it
06:42:04FromDiscord<Elegantbeef> The benefit of the runtime dispatched generics is mainly for the ABII
06:42:14FromDiscord<Elegantbeef> ABI even
06:42:31FromDiscord<creikey> In reply to @Elegantbeef "You can make the": why isn't this the default?
06:42:34FromDiscord<creikey> oh so the abi is stable
06:42:39FromDiscord<creikey> that's an interesting take on a programming language
06:42:49FromDiscord<Elegantbeef> You can create a dynamic library and import only a single function and call it with an object created from the dll and dont have to have silly C names
06:43:04FromDiscord<creikey> In reply to @Elegantbeef "You can create a": cool
06:43:12FromDiscord<Girvo> Okay this is very confusing.
06:43:15FromDiscord<creikey> dude beeflang developers 😂 there's just no way
06:43:17FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49Gj
06:43:25FromDiscord<Girvo> Why would it not be picking up that `libsodium.so.23`? :/
06:43:44FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=49Gk
06:44:17FromDiscord<Girvo> Yep, `/usr/local/lib` is by default (and I double checked lol)
06:44:29FromDiscord<creikey> In reply to @Girvo "Yep, `/usr/local/lib` is by": could make it explicit with `-L` right
06:44:40FromDiscord<creikey> you can read it with your permission sright?
06:44:42FromDiscord<Girvo> I shouldn't have to though, it's a library that works great elsewhere
06:44:43FromDiscord<creikey> it looks like it's owned by root
06:44:52FromDiscord<creikey> but others can read so yeah
06:44:53FromDiscord<Girvo> Ah actually
06:44:57FromDiscord<Girvo> Let me test that, one sec
06:45:08FromDiscord<Girvo> Yeah nah stil lfails
06:45:21FromDiscord<creikey> does it fail with just gcc?
06:45:28FromDiscord<creikey> maybe `where gcc`
06:45:34FromDiscord<creikey> or `which gcc` I don't remember what it was on linux
06:45:48FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49Gl
06:46:00FromDiscord<Girvo> What do you mean? `which gcc` just tells me where GCC lives ;P
06:46:00FromDiscord<creikey> and with gcc
06:46:03FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=49Gm
06:46:13FromDiscord<creikey> In reply to @Girvo "What do you mean?": right what if it was overridden with something that wasn't behaving right is what I was thinking
06:46:27FromDiscord<Girvo> It wasn't 😛
06:46:30FromDiscord<Girvo> `/usr/bin/gcc` as normal
06:46:36FromDiscord<creikey> instead of the (.18|.23)
06:46:36FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=49Gn
06:48:30FromDiscord<Elegantbeef> Girvo you may want to do `libsodium.so.(18|23)` though that does skip `libsodium.so` .... hmmm
06:48:56FromDiscord<Girvo> yeah it needs to handle both (long story, but I compiled v18 and it generates a v23 .so file)
06:49:03FromDiscord<Girvo> Its a very odd library in some ways lol, libsodium I mean
06:49:27FromDiscord<Girvo> I think for some reason `/usr/local/lib` isn't being picked up? I wonder if I can get it to install to `/usr/lib`
06:49:52FromDiscord<creikey> In reply to @Girvo "I think for some": I've experienced this before
06:49:55FromDiscord<creikey> I don't remember why
06:49:56FromDiscord<creikey> it's finnicky
06:50:04FromDiscord<creikey> you need to manually add /usr/local/lib to your link path sometimes
06:50:13FromDiscord<Girvo> I moved it to `lib`
06:50:18FromDiscord<Girvo> Still fails
06:50:30FromDiscord<Girvo> Man has anyone even tested `nim-libsodium` on linux lol
06:50:54FromDiscord<creikey> never heard of libsodium
06:51:29FromDiscord<creikey> I feel like I"ve seen it a lot though
06:51:31FromDiscord<creikey> like the word
06:52:02FromDiscord<Girvo> sent a code paste, see https://paste.rs/3kh
06:52:12FromDiscord<Girvo> Thats with me hacking nim-libsodium to remove the `(.18)` bits of it
06:54:31FromDiscord<Girvo> Fuck now Nim's losing the plot with my `nimble develop`-ed folder
06:54:37FromDiscord<Girvo> What in the hell is going on
06:55:35FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49Gp
06:55:46FromDiscord<Girvo> Right after having `nimble develop`-ed the `lithium_message` package :/
06:56:19FromDiscord<Girvo> And its in `pkgs`
06:56:21FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49Gq
06:56:40FromDiscord<Rika> What version is pinned in your file
06:57:07FromDiscord<Girvo> No version
06:57:22FromDiscord<Girvo> Though I'm shocked because nothing changed between builds lol. It worked, then it stopped working
06:57:48FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49Gr
06:58:56FromDiscord<Tuatarian> can anyone understand this error?
06:59:11FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=49Gs
07:00:54FromDiscord<Rika> You passed in a Vec[2] when it wanted a Vec[3]
07:00:59FromDiscord<Rika> Says at the start and the end
07:25:56FromDiscord<Girvo> Any ideas why a `nimble develop`-ed project isn't being picked up by someething that relies on it? It's linked correctly in the `.nimble/pkgs` and everything :/
07:26:11*oddish_ joined #nim
07:26:37*oddish_ quit (Client Quit)
07:27:26*oddish quit (Quit: nyaa~)
07:27:38FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49GA
07:28:15FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49GB
07:29:23FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49GC
07:29:26FromDiscord<Girvo> Thats in `.nimble/pkgs`
07:30:23FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49GD
07:31:00FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49GE
07:32:04FromDiscord<Girvo> Oh my god. I found it.↵↵Question: where does a local `nimbledeps` folder come from? What command generates it?
07:32:46*oddish joined #nim
07:35:15FromDiscord<Elegantbeef> I think it appears when something bad happens
07:37:58FromDiscord<Girvo> lol
07:38:43FromDiscord<Elegantbeef> You may think i'm joking, but i've never wanted it to be made
07:39:15FromDiscord<Girvo> No I was laughing in pain and sympathy
07:39:22FromDiscord<Girvo> Because I have no idea why mine was created lol
07:40:59FromDiscord<Girvo> I fixed the dynamic linking problem. While every environment variable and `ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012` showed `/usr/local/lib` in the path... `ldconfig` showed it _wasn't_
07:41:07FromDiscord<Girvo> Amazon Linux is the fucking worst.
07:41:46FromDiscord<Elegantbeef> I've never heard of that distro
07:42:26*wallabra joined #nim
07:42:28FromDiscord<Girvo> 😭
07:44:39FromDiscord<Rika> Good
07:44:44FromDiscord<Rika> That’s a good thing
07:52:14FromDiscord<Tuatarian> In reply to @Rika "You passed in a": that's weird...
07:52:25FromDiscord<Tuatarian> since this is the line throwing the error
07:52:40FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=49GN
08:02:31PMunchI'm guessing Vec is defined as Vec[3]?
08:02:49FromDiscord<Tuatarian> `type Vec[N : static uint16] = array[N, float]`
08:03:08FromDiscord<Tuatarian> Vec itself is a vec3, yes
08:03:18FromDiscord<Tuatarian> like the parameter v is of type `Vec[3]`
08:04:00PMunchHmm, thath still shouldn't throw that error. Assuming `vec` returns something sane
08:06:14FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=49GT
08:28:22PMunchHmm, it seems like the problem is with getting the len of the varargs
08:34:04PMunchHmm, if you use `int` instead of uint16 it seems to work
08:34:14PMunchhttps://play.nim-lang.org/#ix=49GW
08:36:13FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49GX
08:36:19FromDiscord<Elegantbeef> You can
08:36:30FromDiscord<Elegantbeef> Nim enums allow holes but it limits what you can do with them
08:37:16FromDiscord<Girvo> So that is fine then?
08:37:18FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49GY
08:37:24FromDiscord<Elegantbeef> Yea i hate it but yes
08:38:01FromDiscord<Girvo> So do I
08:38:08FromDiscord<Tuatarian> In reply to @PMunch "Hmm, if you use": that's somewhat weird...
08:38:15FromDiscord<Girvo> I'm just following the rest of the library lol
08:38:39PMunchYeah it seems like a bug @Tuatarian
08:38:50PMunch@Girvo, have you considered letting Futhark do the binding for you?
08:39:13FromDiscord<Elegantbeef> Yea i found the cause of the bug methinks
08:39:28PMunchI feel like Clippy over here, "It looks like you're trying to wrap a C library, do you want some help with that?"
08:40:56FromDiscord<Elegantbeef> It seems that it looses the uint16 type information on the static
08:40:56FromDiscord<Elegantbeef> loses rather
08:41:33FromDiscord<Rika> Beef putting me out of a job
08:41:33FromDiscord<Elegantbeef> `Error: type mismatch: got 'Vec[2]' ... but expected 'Vec[2'u16]`
08:42:11FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=49GZ exhibits the issue
08:43:22PMunchAah
08:43:38PMunchBut why are you even allowed to define that Vec[2] type?
08:43:42FromDiscord<Elegantbeef> This is due to how the compiler handles integer literals
08:44:11FromDiscord<Elegantbeef> You can do a similar thing with a `static: openarray[T]`
08:44:57FromDiscord<Elegantbeef> Sorry i mean `static: seq[T]`
08:46:33FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/DLI
08:46:59FromDiscord<retkid> In reply to @PMunch "I feel like Clippy": not usually but i do need help with c++
08:47:27PMunchAh, C++ isn't supported by Futhark (yet)
08:47:34FromDiscord<retkid> when im looking for libraries
08:47:41FromDiscord<retkid> i uh...
08:47:47FromDiscord<retkid> cry when the only one is in c++
08:49:17FromDiscord<retkid> i wish i could go back in time and stop c++
08:49:49FromDiscord<retkid> the more i think about it I think c++ is the worst thing to happen to programming
08:54:29FromDiscord<qb> when using `when defined(linux)` or `when defined(windows)` I don't get linting / error checking for the other os in vscode. Is there a way to prevent that?
08:54:45FromDiscord<Elegantbeef> Nope nim takes a single compile path
08:55:03FromDiscord<qb> kay
08:55:30*Vladar joined #nim
09:00:53FromDiscord<Girvo> Man `sodium_bin2base64` is the literal _only_ function in libsodium that takes `cstring` instead of their `unsigned char ` shit lol
09:01:23FromDiscord<Girvo> So using the `ptr cuchar` `cptr` template in nim-libsodium broke when I bound it lol 😭
09:07:12*rockcavera quit (Remote host closed the connection)
09:09:28FromDiscord<Girvo> Oh well. It works, I have base64 printed strings. I think I need to go over the whole binding set of nim-libsodium and fix up this pointer-signedness problem once and for all and put up a proper PR. Also adds static-linking against source files, too.
09:13:39FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=49H7
09:36:06*crem quit (Ping timeout: 264 seconds)
09:37:59*crem joined #nim
09:53:02FromDiscord<Bung> hey, am developing nimble package, it has a macro staticExec the package's binary, how to make this also work on test(under development) as haven't install the package its self.
10:11:37PMunchMaybe create your own `test` task in Nimble which builds the binary and calls the test with its location as part of `PATH`?
10:18:32FromDiscord<Bung> am now try just use absolute path under package, so avoid add binary to PATH
10:24:11PMunchWell you wouldn't need to add it permanently to the path
10:28:24FromDiscord<Bung> In reply to @PMunch "Well you wouldn't need": oh, that's good idea. thanks!
10:41:34FromDiscord<qb> So now I'm working for windows code with a virtualbox on my linux machine. I just don't get any linting on vscode because of that error I guess. Is that a choosenim issue? https://media.discordapp.net/attachments/371759389889003532/1016297030290776095/unknown.png
10:42:56*jmdaemon quit (Ping timeout: 260 seconds)
10:44:30*PMunch quit (*.net *.split)
10:44:30*buster_blue[m] quit (*.net *.split)
10:44:30*alice quit (*.net *.split)
10:44:30*nullsh quit (*.net *.split)
10:44:30*madprops quit (*.net *.split)
10:44:30*Jjp137 quit (*.net *.split)
10:44:30*oisota quit (*.net *.split)
10:44:30*m5zs7k quit (*.net *.split)
10:44:30*deadmarshal quit (*.net *.split)
10:49:24*PMunch joined #nim
10:49:25*buster_blue[m] joined #nim
10:49:25*alice joined #nim
10:49:25*nullsh joined #nim
10:49:25*madprops joined #nim
10:49:25*Jjp137 joined #nim
10:49:25*oisota joined #nim
10:49:25*m5zs7k joined #nim
10:49:25*deadmarshal joined #nim
10:49:25*m5zs7k quit (Max SendQ exceeded)
10:49:44*m5zs7k_ joined #nim
10:51:59FromDiscord<qb> fixed it
10:58:49*m5zs7k_ is now known as m5zs7k
11:14:42*arkurious joined #nim
11:36:10*pro joined #nim
11:56:43*pro quit (Quit: pro)
12:04:55FromDiscord<voidwalker> https://nim-lang.org/docs/httpclient.html#postContent%2CAsyncHttpClient%2C%2Cstring%2CMultipartData - how does this work ? If i use the multipart data parameter, I don't have the body available anymore?
12:11:15PMunchMore or less, yeah
12:11:33PMunchI mean the parameter is still available, but I believe it will be ignored
12:12:01PMunchRelevant part of the implementation: https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/httpclient.nim#L1016-L1028
12:16:24FromDiscord<voidwalker> https://github.com/nim-lang/Nim/issues/13856 - welp
12:16:42FromDiscord<voidwalker> enthus1ast suggested to me `What you can do however is to construct the correct http body by hand.`
12:16:54FromDiscord<voidwalker> only the body needs to contain file contents of arbitrary sizes
12:19:36PMunchIsn't this the solution? https://nim-lang.org/docs/httpclient.html#addFiles%2CMultipartData%2CopenArray%5Btuple%5Bstring%2Cstring%5D%5D
12:21:09qwror if that won't work, you could use curl wrapper: https://nimble.directory/pkg/libcurl
12:30:23FromDiscord<voidwalker> curl wrapper launched in a thread?
12:32:03FromDiscord<voidwalker> since there is no async
12:37:35FromDiscord<voidwalker> In reply to @PMunch "Isn't this the solution?": My problem is that I need to have some extra header kind of data in the multi part request, but in the same "part" as the file https://forum.nim-lang.org/t/9434
12:37:58FromDiscord<Bung> I remenber u use as ipfs client, doesn't there is https://github.com/ringabout/ipfshttpclient
12:38:52FromDiscord<voidwalker> @Bung yes, but that one only has two calls implemented (add - without the "nocopy" option that I need now, and cat). Also it uses puppy as http client which is not async
12:39:29FromDiscord<Bung> okay, get it
12:39:35FromDiscord<voidwalker> I asked flywind why he chose puppy and said that he couldn't make it work with httpclient
12:40:28FromDiscord<voidwalker> I think the httpclient is the worst part of nim 😦 Already encountered two problems for which there is no solution with the standard API.
12:40:57FromDiscord<voidwalker> And there are no other much better alternatives
12:42:45qwrfew years ago httpclient didn't support certificate verification (i think that is now fixed)
12:43:19FromDiscord<Bung> you should make a forked version
12:43:33FromDiscord<Bung> as they all specific to http
12:44:22FromDiscord<enthus1ast> httpclient must be patched for this i guess
12:45:03FromDiscord<Bung> I dont know, other language http client also support this ipfs method ?
12:45:06FromDiscord<enthus1ast> it is a quite uncommon thing to do actually, but yea.
12:45:23FromDiscord<voidwalker> uncommon but part of the http spec so yeah, it should be supported
12:46:04FromDiscord<enthus1ast> @voidwalker\: i can imagine everyone is afraid to break to much code i guess
12:46:12FromDiscord<enthus1ast> while changeing it
12:46:42FromDiscord<enthus1ast> a few years back, i was working on a nimMime
12:46:44FromDiscord<voidwalker> we'll never get anywhere like this. Easy solution is to have httpclient2
12:46:46FromDiscord<enthus1ast> for email and http
12:47:18FromDiscord<enthus1ast> but who actually wants to write such mime stuff? Mime is huge
12:48:19FromDiscord<enthus1ast> also another thing\: we should do a changeable proxy implementation
12:48:42FromDiscord<enthus1ast> so that we can stuff a eg socks5 implementation into the httpclient
12:48:50FromDiscord<enthus1ast> maybe we should look how go does it
12:50:31FromDiscord<enthus1ast> also httpclient should work with unix sockets
12:50:51FromDiscord<enthus1ast> (someone here wanted this for communication with the docker host)
12:56:26FromDiscord<voidwalker> there is too many changes, and there is big caution to make any breaking changes, so this should be a httpclient2 wishlist
13:00:48FromDiscord<enthus1ast> one thing we could work on, withouth breaking so much code
13:00:59FromDiscord<enthus1ast> is deduplication
13:01:36FromDiscord<enthus1ast> we should extract all the parsing and rendering stuff that goes on in httpclient
13:02:07FromDiscord<enthus1ast> then it would be quite easy to "build a body by hand"
13:02:23FromDiscord<enthus1ast> but currently it is sprinkled all over the place
13:02:38FromDiscord<enthus1ast> some is in cgi, some in uri, some in httpclient, httpbase?
13:03:15FromDiscord<enthus1ast> we could introduce a `httputils`
13:03:30FromDiscord<enthus1ast> ah no it exists already \:)
13:03:34FromDiscord<enthus1ast> wonder whats in there
13:03:55FromDiscord<enthus1ast> ah its from status
13:10:30FromDiscord<Bung> @voidwalker I think you take to much time to this, https://github.com/bung87/scorper/blob/devel/src/scorper/http/multipart.nim you can add extroHeaders to MultipartEntry and in proc format add to result string.
13:10:37FromDiscord<Bung> (edit) "to" => "too"
13:11:20FromDiscord<Bung> (edit) "extroHeaders" => "extroHeaders(as Table[string,string])"
13:12:20FromDiscord<Bung> just for demonstration, you can do it on a fork version of std httpclient
13:15:09FromDiscord<voidwalker> You think I want to waste time with this ? Nope, I just want to get on with my little things. This is not something I'd like to try, as I'd have to learn http specs and such
13:16:43FromDiscord<Bung> good luck
13:17:05FromDiscord<enthus1ast> @Bung\: a few weeks back i found your scorper and it looked nice
13:17:17FromDiscord<enthus1ast> but i never actually got it to work unfortunately
13:17:50FromDiscord<Bung> In reply to @enthus1ast "but i never actually": so what's problem at that time
13:18:02FromDiscord<enthus1ast> could not compile it
13:18:05FromDiscord<enthus1ast> lemme try now
13:18:09*PMunch quit (Quit: Leaving)
13:19:25FromDiscord<Bung> I've update a new version today, under windows, ci also passed, you could give a try
13:21:30FromDiscord<enthus1ast> yeah think it was the same back then\:↵↵while compileing your hello\_world.nim
13:21:41FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=49I7
13:21:49FromDiscord<enthus1ast> could be that some of status libs are not up to date?
13:25:00FromDiscord<Bung> I think that because you use `nim c` that does not restrict to nimble dependencies
13:25:16FromDiscord<Bung> higher urlly version is used
13:26:42FromDiscord<Bung> use `nimble c -r` instead
13:28:35FromDiscord<enthus1ast> ok that worked
13:29:49FromDiscord<enthus1ast> and now another thing \:)
13:31:25FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=49Ig
13:32:39FromDiscord<Bung> "HEAD HTTP/0.0" ?? that's weird
13:33:28FromDiscord<enthus1ast> with firefox it works
13:34:02FromDiscord<enthus1ast> in edge it also works
13:34:31FromDiscord<enthus1ast> ie11 also works
13:34:37FromDiscord<enthus1ast> so yeah, just chrome
13:34:45FromDiscord<Bung> you are chrome on windows ?
13:34:59FromDiscord<enthus1ast> yes
13:35:04FromDiscord<Bung> let me try
13:36:00FromDiscord<enthus1ast> crazy it also works in a chrome incognito
13:36:49FromDiscord<Bung> is there some extension trying to send a head request ?
13:36:57FromDiscord<enthus1ast> could be
13:37:33FromDiscord<dom96> In reply to @voidwalker "uncommon but part of": part of the http 1.1 spec? btw there are always ways to make changes in a backwards compatible fashion, it might not be ideal but it's definitely doable
13:38:13FromDiscord<Bung> yeah, I think the extension may not work properly , as it send "HTTP/0.0"
13:39:06FromDiscord<Bung> for me it works well , chrome on win11
13:39:34FromDiscord<enthus1ast> mh i just disabled all extentions
13:39:36FromDiscord<enthus1ast> weird
13:39:43FromDiscord<enthus1ast> still not working btw
13:39:55FromDiscord<enthus1ast> but yeah, seems like an issue with my chrome
13:42:28FromDiscord<voidwalker> @dom96 https://github.com/ipfs/kubo/issues/5984#issuecomment-462571721
13:43:06FromDiscord<voidwalker> it's from 1996 so i assume http 1.1 also /
13:43:35FromDiscord<Bung> In reply to @enthus1ast "but yeah, seems like": yeah, I only seen angular has similar behavior(send head request before actual)
13:44:18FromDiscord<enthus1ast> @Bung\: i'm actually quite puzzled what this is, i just disabled all extentions, disabled dns over https etc.
13:44:22FromDiscord<dom96> oh this is MIME
13:44:25FromDiscord<dom96> never read that spec myself
13:44:33FromDiscord<voidwalker> https://github.com/curl/curl/commit/fec7a858b88c86e97e5dc96414a01feb21a2b661 - curl patch in 2017 to support this
13:44:48FromDiscord<enthus1ast> @dom96\: you mean the several MIME specs? \:)
13:45:05FromDiscord<dom96> curl needing this patch suggests it's very obscure
13:45:13FromDiscord<dom96> (edit) "curl needing this patch ... suggests" added "as well"
13:52:55NimEventerNew Nimble package! shiftfields - ShiftField type and sugar for c-style shift bitfields in nim., see https://github.com/sumatoshi/shiftfields
13:56:32FromDiscord<Yardanico> In reply to @NimEventer "New Nimble package! shiftfields": people using my ai-generated nim-tans :DD
13:56:48FromDiscord<Yardanico> (i generated some of them with stable diffusion and posted in nim telegram)
13:56:59FromDiscord<Yardanico> just anime girls with yellow/blonde hair and possibly a crown
13:59:53FromDiscord<Rika> whats a shift bit field ive never heard of it
14:00:30FromDiscord<Yardanico> In reply to @Rika "whats a shift bit": yeah the module seems kinda useless, it's just sugar for bit fields
14:00:33FromDiscord<Yardanico> but nim has that already
14:00:37FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#set-type-bit-fields
14:00:38FromDiscord<Yardanico> and std/bitops
14:07:15*xet7 joined #nim
14:27:15FromDiscord<retkid> i would like some good uses for bitops
14:32:15FromDiscord<Rika> ?? when you need to manipulate bits like in certain optimised algorithms
14:52:08FromDiscord<insomniac> what is the best way to create a variable that generates a random string
15:03:23*Vladar quit (Remote host closed the connection)
15:03:56*vicecea quit (Remote host closed the connection)
15:04:27*vicecea joined #nim
15:05:53FromDiscord<dom96> In reply to @Yardanico "just anime girls with": yesss make Nim into the anime language
15:41:01madpropsi thought nim was for animals
15:42:42FromDiscord<Yardanico> people don't like "rude" mascots anymore, they like cute ones
15:42:45FromDiscord<Yardanico> preferably anime girls
15:43:07FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/1016372913038950492/unknown.png
15:43:07FromDiscord<Yardanico> (not mine)
15:43:47FromDiscord<pietroppeter> In reply to @insomniac "what is the best": it depends on what do you mean by random string. if you want to randomly pick characters in an alphabet and output a random string with a random length between a min and a max length, you could do something like: `toSeq(1 .. sample(toSeq(lengthMin .. lengthMax))).map(_ => sample(alphabet)).join("")` (see https://play.nim-lang.org/#ix=49IO)
15:44:09FromDiscord<Superstart033> In reply to @Yardanico "": Totally me (but not a girl)
15:45:05FromDiscord<insomniac> yea thats perfect
15:50:57FromDiscord<flywind> In reply to @Yardanico "people don't like "rude"": Yeah, Nim should get a cute mascot.
15:52:27FromDiscord<voidwalker> we need a mascot that offends almost anyone
15:52:58FromDiscord<voidwalker> it will cause internet drama and lots of people will hear about nim : )
15:53:40FromDiscord<Yardanico> In reply to @voidwalker "we need a mascot": badger was already kinda good at this since it looks quite "evil"
15:55:05FromDiscord<voidwalker> how about this, but with a crown ? https://media.discordapp.net/attachments/371759389889003532/1016375931444658236/unknown.png
15:55:57FromDiscord<Superstart033> A mascot that’s fuck up and evil
15:56:00FromDiscord<Superstart033> Like a bunny
15:56:16FromDiscord<Superstart033> Or well, since is a crown why not a Lion?
15:59:29FromDiscord<flywind> An anime girl mascot will probably make eye-catching news and be discussed at lots of places like "The first serious programming language with a cute anime girl mascot".
16:00:03FromDiscord<Superstart033> In reply to @flywind "An anime girl mascot": and a lot of r34
16:01:02FromDiscord<Prestige> please no
16:01:36FromDiscord<Superstart033> Lol
16:02:12FromDiscord<Yardanico> In reply to @Avahe "please no": https://media.discordapp.net/attachments/371759389889003532/1016377717291229194/unknown.png
16:02:22FromDiscord<Superstart033> WTF
16:04:34FromDiscord<Prestige> In reply to @Yardanico "": ?
16:04:50FromDiscord<enthus1ast> Please no anime girl ....
16:07:53FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49IX
16:08:11FromDiscord<voidwalker> what makes it accept this notation ` data.addFiles({"file": path}` ? With the { } brackets ?
16:08:31FromDiscord<voidwalker> and the : betweeb the elements ? where does this come from ?
16:08:37FromDiscord<voidwalker> (edit) "betweeb" => "between"
16:09:27*rockcavera joined #nim
16:09:27*rockcavera quit (Changing host)
16:09:27*rockcavera joined #nim
16:09:56FromDiscord<voidwalker> @enthus1ast I managed to hack httpclient to insert those headers.. not that hard, but it's probably "wrong" code. Wish someone would take a look at to make a merge-able version
16:12:11FromDiscord<enthus1ast> `{"foo": "baa"}` is transformed to `[("foo", "baa")]`
16:28:06FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49J3
16:28:29FromDiscord<voidwalker> or should I just use a seq[tuple[name: string, value:string]]
16:29:03FromDiscord<enthus1ast> HttpHeaders is the one thats used for this in other locations
16:40:46FromDiscord<Phil> In reply to @Yardanico "preferably anime girls": Coders are weebs, I knew it!
16:40:59FromDiscord<Superstart033> In reply to @enthus1ast "Please no anime girl": Why not?
16:45:43FromDiscord<Shiba> cause coders are suppose to be chads
16:45:59FromDiscord<voidwalker> not beta cucks ?
16:46:28FromDiscord<Shiba> those code in r
16:50:11FromDiscord<flywind> I found an interesting bug. The comand, "nim c -r --:anyinput somefile.nim" blocks the process of compilation.
16:50:57FromDiscord<Prestige> In reply to @Superstart033 "Why not?": "Why" is the real question
16:50:59FromDiscord<voidwalker> @flywind btw, where is the ipfs http client api wrapper project in your schedule/interest priority ?
16:51:08FromDiscord<Bung> In reply to @voidwalker "I wonder if what": need find out from spec, the http header allow one key with multiple values, the header inside multipart entry I dont know
16:52:14FromDiscord<gorilla_> mega chads
16:52:26FromDiscord<voidwalker> and you said you used puppy cause httpclient "didn't work"?
16:53:19FromDiscord<flywind> In reply to @voidwalker "<@658563905425244160> btw, where is": I don't use ipfs at the moment.
16:53:46FromDiscord<flywind> In reply to @voidwalker "and you said you": Yeah, the get request doesn't work.
16:55:28FromDiscord<voidwalker> this one ? `/api/v0/get` ?
16:56:07FromDiscord<flywind> irrc, yes
16:56:12FromDiscord<flywind> (edit) "irrc," => "iirc,"
17:00:07madpropswhat's the state of bundling simple html/css/js applications on linux?
17:01:20FromDiscord<Bung> you mean web based gui ?
17:01:37madpropsyeah. no network whatsoever
17:01:47FromDiscord<gorilla_> well you have electron
17:02:04madpropselectron is huge
17:02:36FromDiscord<Bung> try https://github.com/juancarlospaco/webgui, it's wrapper of webview.h project
17:03:19madpropscool
17:05:10FromDiscord<voidwalker> @flywind that's a very simple request, I just tested it and it works:
17:05:25FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Jn
17:06:01FromDiscord<flywind> I'm using windows.
17:06:07FromDiscord<flywind> (edit) "I'm using" => "I use"
17:06:10FromDiscord<voidwalker> ^_O
17:07:19FromDiscord<voidwalker> still I see no obvious reason why this wouldn't work on windows, it's a simple POST with no data
17:13:51*neceve_ joined #nim
17:14:30madpropswhy is a function accepting "this" but not let a = "this" & "this" ?
17:14:44madpropsif i pass the variable it complains
17:15:09FromDiscord<flywind> What's the error message?
17:15:32madpropsit requires static[string]
17:15:41Amun-Rapaste sample code somewhere online
17:16:33FromDiscord<flywind> In reply to @madprops "it requires static[string]": Yeah, `a` is not known at compile time, you probably need `const a = "this" & "this"`
17:17:33madpropshttps://play.nim-lang.org/#ix=49Jq
17:17:53madpropsim just trying to load index.html which is at the root of the dir
17:18:00madpropsif i do "index.html" it can't find it
17:18:07madpropsso im using getCurrentDir
17:18:25madpropsbut that won't work with const
17:19:50FromDiscord<Bung> https://github.com/juancarlospaco/webgui/issues/17 fix this first, I think juancarlospaco never try use a local html file
17:20:20FromDiscord<Bung> nvm, not your case
17:20:51FromDiscord<Bung> your case is the file path should be static
17:21:28madpropsif i do: newWebView("index.html")
17:21:34madpropsit shows a window saying it can't find it
17:21:46FromDiscord<Bung> you can use currentSourcePath.parentDir ... to your index.html
17:21:58FromDiscord<Bung> const index =
17:23:11madpropsit works!
17:23:15madpropsit required 2 parentDir though
17:23:16madpropsthanks
17:23:36FromDiscord<Bung> yeah, that's why " ..." there
17:23:48madpropsit's slow as hell though
17:24:14madpropsand bugged out
17:24:19FromDiscord<Bung> which part slow ?
17:24:31madpropslike 2 frames a second
17:24:41madpropsand visual glitches
17:24:59madpropsmaybe there's a better webview
17:25:02FromDiscord<Bung> sound like you are running a web 3d game
17:25:11madpropsit's a game but not 3d
17:25:57FromDiscord<Bung> then it shouldn't be that slow, should almost same as you open on browser
17:26:23FromDiscord<Bung> you are on windows ?
17:26:45madpropslinux. on firefox it works normal
17:27:20madpropsalso everything looks weird
17:27:39madpropsseems i'll need electron
17:27:48FromDiscord<Bung> linux, no idea, haven't try it on linux
17:40:45*jmdaemon joined #nim
17:56:09FromDiscord<Phil> I'm starting to dive into nim's semmagic module, question, when it's about nim's core stuff, does it not have macros and its all just procs that are written like macros but start with `proc` ?
17:57:01FromDiscord<Phil> Like they are macros, but there's just no macro keyword so they use the proc keyword?
17:58:48FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=49Ju
18:00:34*estiquelapice quit (Ping timeout: 268 seconds)
18:10:56*estiquelapice joined #nim
18:17:18FromDiscord<Yardanico> In reply to @Isofruit "Like they are macros,": they're not macros because this is the _compiler_ part of nim, and it needs to understand and execute user-written macros, so the code is written in a traditional way
18:17:43FromDiscord<Yardanico> otherwise it would recurse forever - how can you execute macros without actually being able to understand them?
18:18:07FromDiscord<Yardanico> for the compiler to understand
18:18:26FromDiscord<Yardanico> so they're not macros at all, they're just normal nim procs that operate on normal nim type(s), in this case it's PNode
18:19:03FromDiscord<Phil> That makes sense! Thanks! Now to get to actually understanding the proc above
18:19:20FromDiscord<Yardanico> i think it'd better to ask in #internals, it's made for those kind of questions
18:25:33FromDiscord<vestel> does type() acts like a decltype?
18:28:18*xet7 quit (Ping timeout: 264 seconds)
18:32:19FromDiscord<!&luke> What's a good nim game engine
18:32:47FromDiscord<!&luke> I tried Nico but I think it's unmaintained with a shit ton of bugs and no api docs :(
18:32:50FromDiscord<Yardanico> In reply to @ripluke "What's a good nim": there's no production ready pure nim game engine
18:32:56FromDiscord<Yardanico> try nim for godot maybe
18:33:04FromDiscord<!&luke> Oh okay
18:33:05FromDiscord<Yardanico> or there's nimue5 in development, don't know how well it works now
18:33:41FromDiscord<!&luke> Is Godot 3d?
18:33:48FromDiscord<!&luke> I want something 2d
18:35:02*vicecea quit (Remote host closed the connection)
18:36:03*vicecea joined #nim
18:37:18FromDiscord<Shiba> its a good engine for 2d
18:38:10FromDiscord<Yardanico> In reply to @ripluke "I want something 2d": it's for both 2d and 3d
18:38:16FromDiscord<Yardanico> but godot 3 and lower are more centered towards 2d
18:38:33FromDiscord<Yardanico> however godot 4 has tons of stuff reworked so 3d is also "first-class", but don't expect nim bindings to it soon
18:38:35FromDiscord<Yardanico> it's not even out of the alpha yet
18:38:41FromDiscord<!&luke> Hmm it also seems to be unmaintained
18:38:43FromDiscord<Yardanico> although it should get its first beta release soon
18:38:57FromDiscord<Superstart033> A Nim engine similar to love2D would be cool
18:38:59FromDiscord<Yardanico> In reply to @ripluke "Hmm it also seems": kind of yes, but it still seems to work, maybe not on the latest nim version
18:39:08FromDiscord<Yardanico> In reply to @Superstart033 "A Nim engine similar": you can just use raylib bindings :)
18:39:13FromDiscord<!&luke> In reply to @Superstart033 "A Nim engine similar": Nico
18:39:24FromDiscord<Yardanico> In reply to @ripluke "Nico": nico is pixel art only
18:39:39FromDiscord<!&luke> In reply to @Yardanico "nico is pixel art": Yea but most of the basics are there
18:39:43FromDiscord<Superstart033> Nico is based of pico8
18:39:46FromDiscord<Yardanico> In reply to @Superstart033 "Nico is based of": yes
18:39:51FromDiscord<Yardanico> inspired, not based though
18:39:53FromDiscord<Yardanico> (edit) "inspired, not based ... though" added "on it"
18:39:54FromDiscord<!&luke> Like the init draw and update function
18:39:59FromDiscord<!&luke> Love has those
18:40:01FromDiscord<Yardanico> In reply to @ripluke "Like the init draw": that's not a good way to compare xD
18:40:05FromDiscord<Superstart033> Lmao
18:40:06FromDiscord<!&luke> Lol
18:40:24FromDiscord<Yardanico> but yeah, just try raylib then, it's not pure nim, but it seems to be a decently popular game framework for people who don't want to use game engines
18:40:30FromDiscord<Yardanico> https://www.raylib.com/
18:42:18FromDiscord<!&luke> Raylib seems great
18:43:07FromDiscord<Superstart033> It is
18:43:17FromDiscord<Superstart033> And it has bindings for every lang I know
18:43:27FromDiscord<Superstart033> Like
18:43:58FromDiscord<Superstart033> Even things like haskell, coq, and I remember one for brainfuck. It I don’t know if it’s in the page
18:44:18FromDiscord<!&luke> Why is there brainfuck bindings lmao
18:44:51FromDiscord<Phil> For the most efficient code possible
18:45:23FromDiscord<!&luke> In reply to @Isofruit "For the most efficient": 💀
18:46:58FromDiscord<Superstart033> In reply to @ripluke "Why is there brainfuck": Nvm, I was wrong about brainfuck and coq :^(
18:47:08FromDiscord<Superstart033> But chicken is there!
18:47:33FromDiscord<Yardanico> In reply to @Superstart033 "But chicken is there!": well, it's a real language, not really an esoteric one
18:48:09FromDiscord<Superstart033> Why does Nim has 3 bindings?
18:48:34FromDiscord<Yardanico> In reply to @Superstart033 "Why does Nim has": because different people have different opinions
18:48:57FromDiscord<Superstart033> In reply to @Yardanico "because different people have": I disagree with them
18:49:02FromDiscord<Yardanico> okay, so?
18:49:03FromDiscord<Superstart033> Should I make a new one? xd
18:49:09FromDiscord<Yardanico> make your own then, it's nothing out of ordinary
18:49:20FromDiscord<Yardanico> nim allows programmers to be very opinionated because of how much different features it has
18:49:54FromDiscord<!&luke> In reply to @Yardanico "nim allows programmers to": Doesn't every language
18:49:57FromDiscord<Yardanico> nope
18:50:07FromDiscord<!&luke> I mean most languages do
18:50:08FromDiscord<Yardanico> almost no languages have the amount of features that nim has
18:50:11FromDiscord<Yardanico> In reply to @ripluke "I mean most languages": not really
18:50:29FromDiscord<!&luke> Well yea like alot of langs don't have macros and stuff
18:50:31FromDiscord<Yardanico> most languages don't have UFCS, most languages don't have (partial) case insensitivity, most languages don't have proper AST macros, etc
18:50:37FromDiscord<Superstart033> You say no but Lua has two XD
18:50:58FromDiscord<Yardanico> In reply to @Superstart033 "You say no but": I never said that other languages only have 1 binding
18:51:16FromDiscord<!&luke> D has 4 lmaoo
18:51:41FromDiscord<Superstart033> In reply to @ripluke "D has 4 lmaoo": For what I understand, is because D sucks with libs
18:51:58FromDiscord<Superstart033> Like is a mess that entire environment
18:52:24FromDiscord<Phil> In reply to @ripluke "I mean most languages": Give me compile time procs and type aliasing in java plx.↵Also macros
18:52:36FromDiscord<Phil> But the first two I can claim to have actually used
18:53:23FromDiscord<Phil> Also I wanna write snake case java but my libs use camelcase, I want type insensitivity
18:53:40FromDiscord<!&luke> Bro raylib has bindings for everything
18:53:46FromDiscord<!&luke> Even wren bindings
18:53:56FromDiscord<Yardanico> doesn't every popular library?
18:53:57FromDiscord<Yardanico> check sdl2 bindings
18:54:22FromDiscord<Yardanico> In reply to @Yardanico "doesn't every popular library?": with a C compatible API of course :)
18:54:47FromDiscord<!&luke> In reply to @Yardanico "doesn't every popular library?": Not all
18:55:39FromDiscord<!&luke> I know alot of good/popular libs that only have bindings for popular langs like python or JavaScript
18:56:15FromDiscord<!&luke> Raylib even has zig bindngs
18:56:34FromDiscord<!&luke> But that's not too surprising as zig has some awesome c interop
18:56:59FromDiscord<Superstart033> And a great community
18:57:05FromDiscord<Superstart033> Community is important xd
18:57:14FromDiscord<!&luke> Lol yea
18:57:25FromDiscord<Superstart033> Another reason why Nim has 3 and each one is use XD
18:57:34FromDiscord<!&luke> Funny enough I don't think they have bindings for vlang
18:57:50FromDiscord<!&luke> Which (based on GitHub stars) is more popular than nim
18:58:13FromDiscord<Superstart033> In reply to @ripluke "Funny enough I don't": Isn’t v lang kinda unpopular because of the dev overpromising a lot
18:58:21FromDiscord<!&luke> In reply to @Superstart033 "Isn’t v lang kinda": Yea
18:58:28FromDiscord<Superstart033> That’s probably a reason
18:58:35FromDiscord<Superstart033> I’m guessing
18:58:53FromDiscord<!&luke> But 30k stars for v compared to only 13k for nim
18:59:00FromDiscord<Yardanico> In reply to @ripluke "But 30k stars for": stars don't mean actual popularity FYI
18:59:18FromDiscord<!&luke> Yea but it's still a good indicator
18:59:22FromDiscord<Yardanico> not really
18:59:31FromDiscord<Yardanico> because of all the marketing and hype that can happen it's really not a good indicator anymore
18:59:41FromDiscord<Superstart033> Also, doesn’t Nim and C get as well (if not better) than zig and C? There is an entire section of the In Action book about using SDL
18:59:58FromDiscord<Superstart033> Maybe V isn’t so good with C
19:00:21FromDiscord<!&luke> In reply to @Superstart033 "Maybe V isn’t so": Nope they have a whole tool (like c2nim) to make bindings
19:00:32FromDiscord<!&luke> I think it's like c2v or some shot
19:00:35FromDiscord<!&luke> (edit) "shot" => "shit"
19:01:10FromDiscord<Superstart033> C2V lmao
19:01:28FromDiscord<!&luke> Lmao the v devs are making an operation system
19:01:33FromDiscord<!&luke> In v
19:01:50FromDiscord<Shiba> iam trying to install every nimble package rn
19:01:55FromDiscord<!&luke> In reply to @Shiba "iam trying to install": Why
19:02:22FromDiscord<Shiba> idk , but is seems like a dumb idea
19:03:26FromDiscord<Shiba> i think the nim compiler looks through all the libaries before compiling
19:03:38FromDiscord<Yardanico> In reply to @Shiba "i think the nim": wdym?
19:03:56FromDiscord<!&luke> Why is there a raylib now and a raylib forever
19:04:36FromDiscord<!&luke> In reply to @Superstart033 "C2V lmao": Oh they do have v bindings
19:05:34FromDiscord<Shiba> In reply to @Yardanico "wdym?": its checks if the required libaries are installed?
19:05:37FromDiscord<Shiba> maybe
19:05:51FromDiscord<Shiba> (edit) "installed?" => "installed"
19:05:51FromDiscord<Yardanico> In reply to @Shiba "its checks if the": no? it doesn't have a concept of separate "libraries" really
19:05:57FromDiscord<Yardanico> In reply to @ripluke "Oh they do have": and we have #offtopic 🤔
19:06:08FromDiscord<!&luke> In reply to @Yardanico "and we have <#371759607934353448>": Yea sorry about that
19:07:36FromDiscord<Shiba> In reply to @Yardanico "no? it doesn't have": "modules"
19:07:38FromDiscord<Shiba> sorry
19:07:54FromDiscord<Shiba> (edit) "sorry" => "i forget"
19:07:59FromDiscord<Shiba> (edit) "forget" => "forgot"
19:08:11FromDiscord<Shiba> sorry
19:08:37FromDiscord<Superstart033> In reply to @ripluke "Oh they do have": 🗿
19:09:08FromDiscord<Yardanico> In reply to @Shiba "sorry": well, it'll check every folder that you (or nimble) specified for it to search in
19:09:20FromDiscord<Yardanico> but checking if a file is there or not is quite fast
19:09:38FromDiscord<Shiba> and if i made a 2m folders
19:10:05FromDiscord<Yardanico> then you have bigger issues?
19:10:06FromDiscord<Superstart033> Btw, gotta praise the Nim std, is full of useful stuff to work with strings and many other types
19:10:34FromDiscord<Shiba> In reply to @Yardanico "then you have bigger": iam just trying to break it
19:10:48FromDiscord<Yardanico> well go ahead, but that won't provide any real benefit
19:10:55FromDiscord<Superstart033> In reply to @Shiba "iam just trying to": Benchmarking m?
19:10:59FromDiscord<Superstart033> (edit) "Benchmarking m?" => "Benchmarking?"
19:11:42FromDiscord<Shiba> In reply to @Superstart033 "Btw, gotta praise the": importing a few libaries will ad 100k lines of code to compile , but its is useful
19:11:52FromDiscord<Shiba> (edit) "ad" => "adds"
19:11:59FromDiscord<Shiba> (edit) "adds" => "add"
19:15:41FromDiscord<Shiba> ok now my 2 core are on 100% usage
19:19:32FromDiscord<Superstart033> In reply to @Shiba "ok now my 2": It was a nice cpu,
19:19:36FromDiscord<Superstart033> (edit) "cpu," => "cpu 💀"
20:58:08*neceve_ quit (Ping timeout: 268 seconds)
23:04:50FromDiscord<!&luke> Has anyone had success compiling Nico to emscripten
23:06:42FromDiscord<Elegantbeef> Yes impbox does it
23:11:30FromDiscord<AmjadHD> What do `--implicitStatic:on` supposed to do ?
23:11:42FromDiscord<AmjadHD> (edit) "do" => "does"
23:11:50FromDiscord<Elegantbeef> Nothing it's on by default
23:12:05FromDiscord<Elegantbeef> It allows the compiler to statically evaluate code
23:12:13*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
23:12:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49KP
23:12:31FromDiscord<Elegantbeef> instead of emitting `a` and the `[0]` call you can just emit `h`
23:13:20FromDiscord<SaAnd> What's your issue?↵(@!&luke)
23:13:43FromDiscord<AmjadHD> In reply to @Elegantbeef "It allows the compiler": I thought it would treat `let`s as `const`s whenever possible.
23:14:58FromDiscord<Elegantbeef> If you follow proper declaration order that's never needed 😄
23:16:21FromDiscord<AmjadHD> sent a code paste, see https://play.nim-lang.org/#ix=49KQ
23:16:57FromDiscord<AmjadHD> sent a code paste, see https://play.nim-lang.org/#ix=49KR
23:17:02FromDiscord<Elegantbeef> yes
23:17:11FromDiscord<Patitotective> then do not use let when you dont need it
23:17:15FromDiscord<Elegantbeef> ^
23:17:33FromDiscord<Girvo> Use const first, use let if it's needed, use var last only when required 😉
23:17:35FromDiscord<Elegantbeef> Follow proper declaration as it makes you code 'more correct'
23:17:54FromDiscord<Elegantbeef> Yep what i call "proper declaration" 😄
23:18:05FromDiscord<Girvo> haha I know, I just felt like being explicit this morning 😛
23:18:21FromDiscord<Elegantbeef> Eh to be fair i didnt explain it so i'm not complaining
23:18:24FromDiscord<Patitotective> In reply to @Girvo "haha I know, I": it's almost night
23:18:36FromDiscord<Elegantbeef> Australia is in the future
23:18:39FromDiscord<Girvo> pfft its 9.16am here 😄
23:18:57FromDiscord<Elegantbeef> Damn i've never seen decimal time
23:19:02FromDiscord<Patitotective> lmao
23:19:21FromDiscord<Girvo> hahaha
23:19:43FromDiscord<Elegantbeef> You upsidedowners do things different
23:19:58FromDiscord<Girvo> that we do 🙂 we ride kangaroos to work, too
23:20:14FromDiscord<Patitotective> beef rides bears
23:20:59FromDiscord<Girvo> beef, make a new game: street-fighter-alike where you pick a nationality and ride a native animal into battle against another nationality lol
23:21:20FromDiscord<Elegantbeef> Ah so it's 9\:10am there
23:21:20FromDiscord<Elegantbeef> Girvo now will ignore all my future messages
23:21:44FromDiscord<Elegantbeef> I can already see me getting cancelled↵(@Girvo)
23:22:04FromDiscord<Patitotective> In reply to @Girvo "beef, make a new": i dont thing all countris have _their animal_
23:22:15FromDiscord<Patitotective> In reply to @Elegantbeef "I can already see": publish it privately
23:22:26FromDiscord<Elegantbeef> Dont worry patito columbia would have a cracked up squirrel
23:22:29FromDiscord<AmjadHD> In reply to @Patitotective "then do not use": can't nim be made to detect these cases instead ?
23:23:08FromDiscord<Girvo> I don't always want my lets to be turned into compile-time calculation. For certain cases that could massively explode compile time
23:23:10FromDiscord<Patitotective> In reply to @Patitotective "i dont thing all": this is your fault beef↵i used to write "think"
23:23:28FromDiscord<Elegantbeef> Not only that it makes it harder to understand the code
23:23:29FromDiscord<Girvo> Explicitness is preferable when discussing compile time evaluation of code
23:23:59FromDiscord<Elegantbeef> `let a = "hello"` might be an allocation, it might not
23:24:03FromDiscord<Elegantbeef> It depends on what you did after
23:24:04FromDiscord<Patitotective> In reply to @Elegantbeef "Dont worry patito columbia": 🐿️
23:24:13FromDiscord<Elegantbeef> Needs som snow patito
23:24:34FromDiscord<Elegantbeef> What i almost never write thing instead of think, that's totally not me!
23:24:59FromDiscord<Patitotective> columbia almost has no snow
23:25:13FromDiscord<Elegantbeef> It has a ton of snow, it just doesnt fall from the sky
23:25:19FromDiscord<Patitotective> lmao
23:25:22FromDiscord<Elegantbeef> Columbian Snow is a name for cocaine
23:25:47FromDiscord<Patitotective> In reply to @Elegantbeef "*Columbian Snow is a": your jokes are too hard to get
23:25:56FromDiscord<Elegantbeef> Maybe for a non English speaker
23:26:05FromDiscord<Elegantbeef> That was the reason it was a cracked up squirrel
23:26:05FromDiscord<Patitotective> perhaps
23:26:15FromDiscord<Elegantbeef> non native English speaker\
23:26:18FromDiscord<Patitotective> In reply to @Elegantbeef "That was the reason": i got that
23:27:09FromDiscord<Patitotective> https://media.discordapp.net/attachments/371759389889003532/1016489694508371998/unknown.png
23:27:30FromDiscord<AmjadHD> In reply to @Girvo "Use const first, use": Is this rule written somewhere in the nim docs ? or is it universal ?
23:27:46FromDiscord<Girvo> To be honest it
23:27:47FromDiscord<Elegantbeef> patito, there is a term called sarcasm and another called being subtle
23:27:51FromDiscord<Patitotective> In reply to @AmjadHD "Is this rule written": its not a rule
23:27:51FromDiscord<Girvo> Oops I pressed enter too quickly!
23:28:13FromDiscord<Patitotective> In reply to @Elegantbeef "patito, there is a": too subtle to get
23:28:17FromDiscord<Girvo> Its not a rule per se, but across all languages that I've worked with that have differing declaration types its a common rule 🙂 not just nim sepcific
23:28:40FromDiscord<Elegantbeef> In all languages you aim for the smallest mutable scope
23:28:48FromDiscord<Girvo> Basically the "rule" is: use the strictest declaration type possible, and only widen it when its required for the variable you're discussing
23:28:57FromDiscord<Elegantbeef> I should say most\
23:29:16FromDiscord<Girvo> You don't have to of course! Plenty of Nim code is done entirely with `var` for example. But its good practice 🙂
23:29:33FromDiscord<AmjadHD> how many other languages actually differentiates between `const` and `let` ?
23:29:34FromDiscord<Elegantbeef> But even C has const, so yea
23:29:49FromDiscord<Elegantbeef> Rust, Kotlin, C#
23:29:57FromDiscord<Girvo> C does, C++ now has constexpr, Kotlin, some others I'm forgetting
23:30:11FromDiscord<Elegantbeef> Pretty much any that have compile time constants or runtime mutabillity
23:30:17FromDiscord<Girvo> ^ what he said
23:30:35FromDiscord<Elegantbeef> Based off what you work on i assume you come from JS where the difference isnt so poignant
23:30:36FromDiscord<Girvo> And you'll find in all of those languages, theres a push to follow the "strictest first" approach
23:31:10FromDiscord<Girvo> Tbh even in JS beef, the difference still matters! `const` _always_ is the rule, unless mutability is required: then `let`. `var` is banned lol
23:31:23FromDiscord<Elegantbeef> Sure but const in js isnt a const
23:31:27FromDiscord<Elegantbeef> It's let in Nim
23:31:32FromDiscord<Girvo> Its a const reference yeah 😛
23:31:42FromDiscord<Girvo> But the overall approach is the same: strictest first!
23:32:11FromDiscord<Elegantbeef> Of course, but the difference there is negligable since there are no different semantics aside from the inabillity to redirect the pointer
23:32:34FromDiscord<Elegantbeef> All the data is still mutable, just the pointer isnt
23:33:03FromDiscord<Girvo> Yep. It's still illustrative of the point though at least, though other languages have better analogs
23:33:12FromDiscord<Elegantbeef> Yea
23:33:51FromDiscord<Elegantbeef> Not leaving it up to the compiler is a good thing it prevents you from doing 'illegal' things you dont want
23:34:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49KV
23:34:47FromDiscord<Elegantbeef> That works fine, it's dumb as hell but it works
23:35:15FromDiscord<Elegantbeef> If you change that to a `const` it now gives you a compile time error "myStr has no address" which allows you to refactor it into the more sensible `myStr[0..4]`
23:35:23FromDiscord<Elegantbeef> Dumb example i know, but first thing that popped into my head
23:36:24FromDiscord<Girvo> For sure. Though the unsafeAddr makes it pretty clear you're working against the compiler -- though I get what you mean by the example haha
23:37:26FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49KY
23:37:39FromDiscord<Elegantbeef> Does this run at runtime or compile time? You need to check if it has any runtime values
23:38:54FromDiscord<Elegantbeef> you lose the benefit of easily tracking where code will run, any fully constant expressions are evaluated statically, and now you need to check any usage of 'constants' to see if they're truely constant
23:41:09FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49KZ
23:41:53FromDiscord<Elegantbeef> I've probably ranted too much about this
23:42:00FromDiscord<Elegantbeef> I'll go bang me head into a wall for 10 minutes
23:42:28FromDiscord<Girvo> haha, no its good to have illustrative examples. If `let` was turned into `const` automatically at compile time, this would all become even fuzzier
23:43:57FromDiscord<AmjadHD> In reply to @Elegantbeef "A better thing is": Thanks for your illustrative examples 🙂, it's good to learn.
23:46:09FromDiscord<AmjadHD> I just thought that it isn't nice that an 8KB array is silently generated for the "subtle" difference between `let` and `const`.
23:46:39FromDiscord<Elegantbeef> There should be warnings on large sets anyway
23:46:58FromDiscord<Elegantbeef> Or a hint anyway
23:48:25*jmdaemon joined #nim
23:49:53FromDiscord<Elegantbeef> If you need a set that supports the entire range of uint16 you're generally better performance wise to use a hashset unless you never copy and use the entire range 100% of the time
23:50:08FromDiscord<Elegantbeef> Or a sparse set from intsets
23:54:04FromDiscord<AmjadHD> Well then I think the builtin `set` should not support types larger than 1byte.
23:54:19FromDiscord<Elegantbeef> I disagree
23:54:22FromDiscord<Girvo> What about the use-cases where people need it to? 🙂
23:54:45FromDiscord<Elegantbeef> Unless you know what you're doing large bitsets are performance traps
23:55:46FromDiscord<Elegantbeef> That really doesnt mean disallow any large bitsets
23:56:01FromDiscord<Elegantbeef> Cause you can have a bitset of any size range from 0..uint16.high
23:56:18FromDiscord<Elegantbeef> `set[0..256]` is a valid range just as is `0..1024`
23:58:48FromDiscord<Elegantbeef> hint that any set that has a range larger than X elements might cause performance issues and carry on is what i say is best
23:59:00FromDiscord<Girvo> yeah I'd agree with that
23:59:08FromDiscord<Girvo> I think the compiler could use more hints in general 🙂
23:59:27FromDiscord<Girvo> Don't disallow stuff, just communicate to the developer
23:59:29FromDiscord<Elegantbeef> As do I, or atleast make TRM actually work properly
23:59:48FromDiscord<Elegantbeef> If TRM actually work you can do semantic linting all in user space
23:59:53FromDiscord<AmjadHD> In reply to @Elegantbeef "hint that any set": I'm good with that.