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