00:05:38 | FromDiscord | <myxi> sent a long message, see https://pasty.ee/vbNYpUFk |
00:08:29 | FromDiscord | <myxi> I don't really like Nix as a language either; it's dynamically typed and lazily evualated, and those "features" are very annoying to get used to. I love having the type information so that I can quickly it Google it up and learn what exactly it's doing, what it accepts, and so on |
00:14:27 | FromDiscord | <nasuray> I wouldn't call the library access an issue so much as nix working exactly as intended. But it's not for everyone. Better to stick to whatever helps you be more productive. |
02:20:33 | * | edu joined #nim |
02:20:51 | * | edu quit (Client Quit) |
02:45:27 | FromDiscord | <System64 ~ Flandre Scarlet> Hi! How can I know how many bits is used by an unsigned integer please? |
02:50:17 | * | rockcavera quit (Remote host closed the connection) |
02:50:25 | FromDiscord | <odexine> Add one to this https://nim-lang.org/docs/bitops.html#fastLog2%2CSomeInteger |
02:53:57 | FromDiscord | <bostonboston> sizeof 8? |
02:59:38 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Add one to this": And I divide by 4 to get the number of nibbles? |
03:00:23 | FromDiscord | <odexine> Sure |
03:03:45 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Sure": Well, if a number uses 5 bits and I divise by 4, it will give 1 nibble, but a 5 bits number uses 2 nibbles, woops |
03:08:35 | FromDiscord | <odexine> you're gonna use float division with ceil rounding then yeah |
03:21:31 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "you're gonna use float": https://play.nim-lang.org/#pasty=elSYiyEC↵Well, it's very wrong |
03:27:29 | FromDiscord | <System64 ~ Flandre Scarlet> OK seems I fixed it |
03:46:35 | * | thunder quit (Killed (NickServ (GHOST command used by metasintactic))) |
03:46:35 | * | metasintactic joined #nim |
05:42:38 | * | metasintactic quit (Remote host closed the connection) |
05:43:02 | * | thunder joined #nim |
06:12:00 | * | fallback quit (Read error: Connection reset by peer) |
06:18:22 | * | fallback joined #nim |
06:38:07 | * | beholders_eye joined #nim |
07:02:00 | * | SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev) |
07:02:16 | * | beholders_eye quit (Ping timeout: 244 seconds) |
07:07:12 | * | SchweinDeBurg joined #nim |
08:26:09 | * | tokyovigilante_ joined #nim |
08:27:15 | * | tokyovigilante quit (Ping timeout: 276 seconds) |
08:27:16 | * | tokyovigilante_ is now known as tokyovigilante |
09:24:16 | * | thunder quit (Quit: Leaving) |
11:23:32 | * | coldfeet joined #nim |
12:27:20 | * | coldfeet quit (Quit: Lost terminal) |
13:48:09 | FromDiscord | <tauruuuuuus> Hello, does anyone know how to setup nph under helix? |
14:11:12 | * | krux02 joined #nim |
16:03:08 | FromDiscord | <rainote> sent a long message, see https://pasty.ee/QvtKBpWb |
16:03:57 | * | ntat joined #nim |
16:30:15 | FromDiscord | <demotomohiro> In reply to @rainote "I have a question": I don't you can get all types in a module or entire imported modules.↵How about to write a macro that takes a list of types and generate code? |
16:35:45 | FromDiscord | <rainote> I wanted to avoid this as this means managing both the types and the full list of all types just for generation which may very well number thousands. |
16:40:02 | FromDiscord | <rakgew> maybe with an inspected macro import of the module one could peek at the ast to find the types? |
16:40:43 | FromDiscord | <rakgew> I saw that somewhere for finding specific proc pragmas |
16:43:15 | FromDiscord | <demotomohiro> How about add a macro pragma to each type definition and that macro create a list of types using std/macrocache.↵https://nim-lang.org/docs/manual.html#userminusdefined-pragmas-macro-pragmas↵https://nim-lang.org/docs/macrocache.html↵Then you call the macro that takes the list and generate code. |
16:48:42 | FromDiscord | <demotomohiro> Or define types under the macro that just output given type definitions and add given types to a list of types. |
16:50:07 | FromDiscord | <rainote> alright while I'm most certainly sure I don't understand everything yet at least this gives me hope that this might be achievable, now this should be enough motivation to learn Nim ^^↵thanks for the help and additional information |
16:59:57 | * | coldfeet joined #nim |
17:37:51 | FromDiscord | <Robyn [She/Her]> In reply to @rainote "I have a question": Making a Minecraft server impl? |
17:39:57 | FromDiscord | <rainote> In reply to @battery.acid.bubblegum "Making a Minecraft server": no but game servers for older mmos that are pretty much gone entirely. <:Kelly_think_FB:802706466292367370> ↵And C# has been annoying me recently so I have been looking for an alternative. |
17:40:06 | FromDiscord | <Robyn [She/Her]> Ah fair enough |
18:38:45 | * | krux02 quit (Quit: Leaving) |
19:26:54 | * | coldfeet quit (Quit: Lost terminal) |
19:34:25 | * | ntat_ joined #nim |
19:34:52 | * | ntat quit (Ping timeout: 252 seconds) |
19:49:50 | * | ntat_ is now known as ntat |
19:59:20 | FromDiscord | <Robyn [She/Her]> Hm... I wonder if Nim is actually a good language for making game servers lol |
19:59:40 | FromDiscord | <Robyn [She/Her]> Because of how easily you can prototype code and tailor the language to your needs with macros |
20:00:15 | FromDiscord | <Robyn [She/Her]> In reply to @rainote "I wanted to avoid": Oh, I forgot to respond to this but it can be done fairly easily |
20:01:13 | FromDiscord | <Robyn [She/Her]> I can make a simple prototype quickly |
20:03:02 | FromDiscord | <Robyn [She/Her]> This is for marking types and generating code based on them, specifically though |
20:03:31 | FromDiscord | <Robyn [She/Her]> You could also use generics instead and generate packet read/write logic based on that |
20:03:36 | FromDiscord | <rainote> Well any language that has proper metaprogramming and is reasonably fast would be fine technically at least in my opinion but then again there are other convenience features such as easy access to async etc. that kind of also eliminate some other ideas. |
20:04:14 | FromDiscord | <Robyn [She/Her]> https://github.com/Nimberite-Development/Kimberlite/blob/main/src/kimberlite/packets/clientbound.nim my code isn't a shining example of a good impl of this, but it can be done |
20:04:36 | FromDiscord | <rainote> In reply to @battery.acid.bubblegum "This is for marking": this would be pretty much all I really need; or well also the packet read write logic, but that's most likely gonna end up being done manually because some games are kind of "interesting" in how their packets are setup. |
20:04:51 | FromDiscord | <Robyn [She/Her]> https://github.com/Nimberite-Development/ModernNet/blob/master/src/modernnet/buffer.nim |
20:05:37 | FromDiscord | <Robyn [She/Her]> https://github.com/Nimberite-Development/Kimberlite/blob/main/src/kimberlite/packets/primitives.nim this just makes some distinct generic types that store some static data along with the actual data inside |
20:06:52 | FromDiscord | <Robyn [She/Her]> In reply to @battery.acid.bubblegum "This is for marking": I'll write the demonstration code for this now |
20:07:09 | FromDiscord | <rainote> Much appreciated :thumbsup3: |
20:09:44 | FromDiscord | <Robyn [She/Her]> In reply to @battery.acid.bubblegum "https://github.com/Nimberite-Development/Kimberlite": Also with this, `fieldPairs` lets me not even need to store any data from the macros in the cache besides for writing the dispatcher |
20:16:22 | FromDiscord | <rainote> <:Kelly_think_FB:802706466292367370> |
20:22:49 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=RFCiNDDF |
20:22:55 | FromDiscord | <Robyn [She/Her]> In reply to @rainote "<:Kelly_think_FB:802706466292367370>": Want an example of that, too? |
20:23:36 | FromDiscord | <rainote> not necessarily this is already more than enough^^ |
20:24:15 | FromDiscord | <Robyn [She/Her]> In reply to @rainote "not necessarily this is": It's no problem for me, I have it memorised and have nothing to do rn :P |
20:25:06 | FromDiscord | <rainote> well it's up to you ^^ |
20:27:40 | * | beholders_eye joined #nim |
20:35:06 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=ZdiBTKkt |
20:35:44 | FromDiscord | <Robyn [She/Her]> https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CS%2CT the docs here are good, too |
20:36:27 | FromDiscord | <Robyn [She/Her]> (edit) "https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CS%2CT" => "https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CT" |
20:36:29 | FromDiscord | <rainote> <:Kelly_think_FB:802706466292367370> |
20:36:45 | FromDiscord | <Robyn [She/Her]> The docs hopefully explain better than I can show by example xD |
20:43:40 | * | ntat quit (Quit: Leaving) |
20:43:49 | FromDiscord | <rainote> I believe for now I'd rather go with something along the lines with the first example as I'm not so sure how the second one applies to the problem right now |
20:44:46 | FromDiscord | <Robyn [She/Her]> In reply to @rainote "I believe for now": Oh its mostly a different thing, related to mostly reducing the work you need to do for serialising and deserialising packets |
20:47:07 | FromDiscord | <rainote> Oh you mean for that |
20:49:38 | * | xet7 joined #nim |
20:52:05 | FromDiscord | <Robyn [She/Her]> yeah, sorry for the confusion aha |
21:48:15 | * | rockcavera joined #nim |
21:52:00 | FromDiscord | <nnsee> In reply to @battery.acid.bubblegum "Hm... I wonder if": i made a game server for minecraft classic and i found it to be an enjoyable experience |
21:52:30 | * | beholders_eye quit (Ping timeout: 272 seconds) |
21:53:04 | FromDiscord | <nnsee> i mean, "made" - it's not finished (and frankly, unfortunately, probably never will be), but as a proof of concept it works. people can join, see each other, change blocks, join different worlds, etc |
21:53:25 | FromDiscord | <nnsee> (edit) "change" => "modify" |
22:02:20 | FromDiscord | <albassort> does setLen realloc? |
22:02:26 | FromDiscord | <albassort> (edit) "realloc?" => "realloc / alloc?" |
22:02:32 | FromDiscord | <albassort> dumb question |
22:02:54 | FromDiscord | <albassort> is the realloc of a setlen to shrink a str something to worry about? |
22:04:00 | FromDiscord | <albassort> i have a string, im formatting, the resulting string size can either be identical., or smaller. So at the start i call setlen(a.len), at the end, if the string is of a differet size than the result. call a.setLen(nesize |
22:04:01 | FromDiscord | <albassort> (edit) "a.setLen(nesize" => "a.setLen(nesize)" |
22:14:38 | * | xet7 quit (Remote host closed the connection) |
22:17:52 | * | thunder joined #nim |
22:30:34 | FromDiscord | <solitudesf> incomprehensible. it will do what you need. |
22:32:03 | FromDiscord | <albassort> In reply to @solitudesf "incomprehensible. it will do": eh? |
22:38:02 | FromDiscord | <Robyn [She/Her]> In reply to @nnsee "i mean, "made" -": I do wanna actually impl a simple MC server but I cannot make myself go through with it tbh :P |
23:06:35 | FromDiscord | <rainote> I assume the lsp is still rather early in development? |
23:13:14 | * | thunder quit (Remote host closed the connection) |
23:13:40 | * | thunder joined #nim |
23:15:05 | * | thunder quit (Remote host closed the connection) |
23:15:31 | * | thunder joined #nim |
23:16:10 | * | thunder quit (Remote host closed the connection) |
23:16:35 | * | thunder joined #nim |