00:00:20 | FromDiscord | <Elegantbeef> Probably best to install a nix OS |
00:00:24 | FromDiscord | <Elegantbeef> Sorry i cannot help myself |
00:00:37 | FromDiscord | <Bizarro> although, looking at the changes in PR #20084, wchar_t has been replaced by WideCString |
00:00:42 | FromDiscord | <Bizarro> interesting |
00:00:46 | FromDiscord | <michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4rtN |
00:00:49 | FromDiscord | <michaelb.eth> @Bizarro ^ |
00:01:38 | FromDiscord | <Bizarro> sent a code paste, see https://play.nim-lang.org/#ix=4rtO |
00:02:24 | FromDiscord | <michaelb.eth> have you tried Windows Terminal, without changing the OS-level locale? |
00:02:26 | FromDiscord | <michaelb.eth> it might help |
00:02:30 | FromDiscord | <michaelb.eth> might not |
00:02:38 | FromDiscord | <Bizarro> Also, I cannot recommend changing the C:\Users\xxxxx folder name, it's unsupported and also breaks things (OneDrive, for example... I had to create a directory symlink to make it work again) |
00:03:03 | FromDiscord | <Bizarro> In reply to @michaelb.eth "have you tried Windows": Yes, I use Windows Terminal because it's the default on Windows 11 |
00:03:39 | FromDiscord | <michaelb.eth> ah, okay, I don't do that much with Windows, supporting it is usually something I "fix" at the last |
00:03:58 | FromDiscord | <michaelb.eth> so I didn't realize Windows Term is default for 11, but that's good to hear |
00:04:12 | FromDiscord | <Elegantbeef> The best windows support is shipping them a flash drive with a \nix os 😄 |
00:04:32 | FromDiscord | <michaelb.eth> hopefully 🤞`cmd.exe` eventually vanishes from use |
00:04:33 | FromDiscord | <Bizarro> In reply to @Elegantbeef "*Probably best to install": I've used them, but not for work... |
00:04:36 | FromDiscord | <Elegantbeef> Anywho i'll shush the "windows bad" |
00:05:23 | FromDiscord | <michaelb.eth> eh, it's a bit of a mess, for sure, but there are a bajillion users, so it's a tough call whether to give up on it or try to face it on its own terms |
00:06:49 | FromDiscord | <Elegantbeef> You see no one uses my software, so I just live in the world that only my PC exists |
00:07:28 | FromDiscord | <Bizarro> In reply to @michaelb.eth "eh, it's a bit": Yes, I use both, Linux and Windows, so I think Nim shouldn't disregard Windows' problems... |
00:07:53 | FromDiscord | <michaelb.eth> for my part, I don't really want/like to do any software dev stuff for Windows unless I can "cheat" by using MSYS2 😄 |
00:08:19 | FromDiscord | <Bizarro> Anyway, thank you very much for your help. Since it's already fixed on devel, no issue should be opened. |
00:15:57 | FromDiscord | <Bizarro> And, by the way, I've just installed Nim also in WSL 😉 |
00:16:44 | FromDiscord | <konradmb> I remember Araq uses Windows for development, so it's hardly disregarded...↵(@Bizarro) |
00:16:57 | FromDiscord | <Elegantbeef> I think he now uses a m1 mac |
00:17:53 | FromDiscord | <konradmb> ... with Windows VM |
00:17:59 | FromDiscord | <konradmb> jk, I don't know |
00:18:22 | FromDiscord | <Bizarro> In reply to @konradmb "I remember Araq uses": Thanks for the info, it's good to know, even if he uses a Mac now. |
00:42:30 | * | genpaku quit (Ping timeout: 250 seconds) |
00:45:18 | * | azimut quit (Remote host closed the connection) |
00:45:39 | * | azimut joined #nim |
00:47:16 | * | beholders_eye quit (Ping timeout: 250 seconds) |
00:51:23 | * | genpaku joined #nim |
01:03:17 | * | ltriant quit (Ping timeout: 268 seconds) |
01:10:05 | FromDiscord | <Ayy Lmao> Can you not use a ref object as a key to a table by default? I seem to be having issues. |
01:11:38 | FromDiscord | <Elegantbeef> You need to pass a flag, refer to the hashes module |
01:13:07 | FromDiscord | <Ayy Lmao> Oh I see. Why is this a preview feature? You can hash pointers right? |
01:13:54 | FromDiscord | <Elegantbeef> Cause it wasnt enabled previously |
01:14:41 | FromDiscord | <Ayy Lmao> Is there a way to define flags in a nim module so I don't have to pass it in? |
01:14:47 | FromDiscord | <Ayy Lmao> The module would depend on it. |
01:14:52 | FromDiscord | <Elegantbeef> `{.define: ...>}` |
01:14:59 | FromDiscord | <Ayy Lmao> Sweet, thanks! |
01:16:58 | FromDiscord | <Ayy Lmao> In reply to @Elegantbeef "`{.define: ...>}`": Oddly that doesn't work but passing it manually to the compiler works. |
01:17:18 | FromDiscord | <Elegantbeef> Well then you cannot |
01:17:28 | FromDiscord | <Elegantbeef> You did put the define before the import right.... |
01:18:38 | FromDiscord | <Ayy Lmao> I am putting it in a module that is imported into something else. It's working if I put it at the first line though. |
01:22:12 | * | nanxiao joined #nim |
01:28:41 | * | ltriant joined #nim |
01:37:17 | FromDiscord | <QuiteQuietQ> sent a code paste, see https://play.nim-lang.org/#ix=4rud |
01:37:44 | FromDiscord | <QuiteQuietQ> i am trying to give a type to a variable that holds a set |
01:39:15 | FromDiscord | <huantian> `let x: set[range[0..uint16.high.int]] = {1,2,3,3}` |
01:39:29 | FromDiscord | <huantian> `uint16.high` returns an `uint16`, but you're trying to store normal ints in the set |
01:39:47 | FromDiscord | <huantian> so you have to convert `uint16.high` to an int ~~only a tad cursed~~ |
01:40:59 | FromDiscord | <QuiteQuietQ> aha, thanks |
01:41:53 | FromDiscord | <Arathanis> Is it possible to temporarily unscope certain variables? Or more accurately, only include certain variables in a block? |
01:42:18 | FromDiscord | <Elegantbeef> you could shadow the variables with a template |
01:42:45 | FromDiscord | <Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4ruf |
01:42:53 | FromDiscord | <Arathanis> (edit) "https://play.nim-lang.org/#ix=4ruf" => "https://play.nim-lang.org/#ix=4rug" |
01:43:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4ruh |
01:45:20 | FromDiscord | <Arathanis> Ok do it is much easier to shadow scoped variables explicitly rather than shadow all but a set of selected variables? |
01:46:33 | FromDiscord | <Elegantbeef> There is no mechanism to disable scope, you'd need to use a macro to achieve that |
01:46:59 | FromDiscord | <Arathanis> intriguing. any direction in how i could look into implementing something like that? |
01:49:31 | FromDiscord | <Elegantbeef> Use `owner` on your scoped symbols and ensure no other variable shares the owner unless it's in the list |
01:50:59 | * | jmdaemon quit (Ping timeout: 260 seconds) |
01:51:02 | FromDiscord | <Arathanis> where can i find docs on `owner`? Or is it the `owned` type constructor found here: https://nim-lang.org/docs/system.html#owned |
01:53:36 | FromDiscord | <Elegantbeef> Macros |
01:53:36 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/macros.html#owner%2CNimNode |
01:55:32 | FromDiscord | <Elegantbeef> You may need an intermediate macro |
01:55:37 | FromDiscord | <Elegantbeef> But it might work regardless |
01:57:08 | FromDiscord | <Arathanis> Intermediate macro? |
01:57:29 | FromDiscord | <Elegantbeef> A macro that takes you code rewrites it so then you can introspect it |
01:58:01 | FromDiscord | <Arathanis> ohhh got it |
01:58:38 | FromDiscord | <Elegantbeef> You may need to emit a procedure internally |
01:59:11 | FromDiscord | <Arathanis> otherwise it sounds like its a matter of a macro that basically does: for every symbol referenced in this block, ensure the owner is either tihs block or nobody unless its an explicitly scoped symbol |
01:59:13 | FromDiscord | <Rika> In reply to @Elegantbeef "There is no mechanism": Technically there is, using functions lol |
01:59:51 | FromDiscord | <Arathanis> i guess "no owner" makes no sense |
02:00:05 | FromDiscord | <Arathanis> so either its owned by the containing block or its one of the explicitly scoped symbols on the macro |
02:00:21 | FromDiscord | <QuiteQuietQ> sent a code paste, see https://play.nim-lang.org/#ix=4ruk |
02:01:05 | FromDiscord | <Arathanis> In reply to @Elegantbeef "You may need to": this is the intermediate macro wrapping the block in a procedure so I can use that proc as the "self" scope? |
02:01:31 | FromDiscord | <Elegantbeef> Pretty much arthanis |
02:01:46 | FromDiscord | <Elegantbeef> fmt cannot be used cause the macro does not see `{msg}` |
02:01:48 | FromDiscord | <Elegantbeef> It sees a string |
02:01:50 | FromDiscord | <Arathanis> awesome. thank you for the help |
02:01:56 | FromDiscord | <Elegantbeef> you want `echo ">> ", msg` |
02:03:16 | FromDiscord | <Elegantbeef> It's pretty much you check that the owner is not the same as your scoped variables, if it is you check that it's in the list of scoped variables |
02:04:11 | FromDiscord | <Elegantbeef> Technically you could also use `locals` and use that to check |
02:04:38 | FromDiscord | <Elegantbeef> Where you pass `locals` to a typed argument and just check that every symbol in your AST is not in there |
02:04:41 | FromDiscord | <Diogenes of Toronto> sent a code paste, see https://play.nim-lang.org/#ix=4rul |
02:04:55 | FromDiscord | <QuiteQuietQ> macro sees only the string, because it is in a template, which is evaluated during compilation? compared to proc, where the macro sees even the variable? |
02:06:37 | FromDiscord | <QuiteQuietQ> In reply to @Diogenes of Toronto "this raises an io": the file can be at different location than where your executable is created |
02:07:19 | FromDiscord | <Diogenes of Toronto> executable is nin the same directory |
02:07:24 | FromDiscord | <Arathanis> so im probably going to totally butcher this cause i dont actually understand, but if im understanding correctly its because a template is not a proc.↵↵`msg` is an alias inside the template for the string literal assigned to `msg` in the template signature, not actually a variable called `msg` with type string |
02:07:34 | * | ltriant quit (Ping timeout: 265 seconds) |
02:07:45 | FromDiscord | <Elegantbeef> Correct |
02:07:52 | FromDiscord | <Elegantbeef> Templates are code subsitution |
02:08:05 | FromDiscord | <Elegantbeef> They work on the ast, the template when expanded does not have a `msg` in scope |
02:08:10 | FromDiscord | <Elegantbeef> You can either use `%` or alias msg by doing `let myMsg = msg` |
02:08:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4rum |
02:10:05 | FromDiscord | <BobBBob> sent a code paste, see https://play.nim-lang.org/#ix=4run |
02:10:33 | FromDiscord | <Elegantbeef> Are you building release? |
02:10:39 | FromDiscord | <QuiteQuietQ> cool, thanks! |
02:12:07 | FromDiscord | <BobBBob> yeah release fixed it a lot haha, ill have to remember that |
02:14:21 | FromDiscord | <Rika> In reply to @Elegantbeef "You can either use": Aliasing will give another error because of sanitisation |
02:14:42 | FromDiscord | <Elegantbeef> Right needs to be aliased with `{.inject.}` or the template marked `{.dirty.}` |
02:16:09 | FromDiscord | <Rika> In reply to @Diogenes of Toronto "this raises an io": Did you solve your problem? |
02:16:30 | FromDiscord | <⎝⪩﹏⪨⎠> Generics are weird. https://media.discordapp.net/attachments/371759389889003532/1087922721658261524/image.png https://media.discordapp.net/attachments/371759389889003532/1087922721947656274/image.png |
02:17:09 | FromDiscord | <Elegantbeef> `openarray` cannot be in a field without views enabled |
02:17:12 | FromDiscord | <Elegantbeef> So practically it cannot be |
02:17:16 | FromDiscord | <Elegantbeef> use `seq[T]` |
02:17:44 | FromDiscord | <Elegantbeef> secondly what the hell is `tree.root: ... = @[]` |
02:18:25 | FromDiscord | <Elegantbeef> Thirdly you need to do `BinTree[T]` since there is in generic inference |
02:18:39 | * | ltriant joined #nim |
02:18:57 | FromDiscord | <⎝⪩﹏⪨⎠> Ignore whatever is inside newTree. |
02:19:03 | FromDiscord | <Rika> In reply to @Elegantbeef "secondly what the hell": What he means is that you don’t need to (or can’t) specify the field name |
02:19:07 | FromDiscord | <⎝⪩﹏⪨⎠> It's just garbage I wrote. |
02:19:10 | FromDiscord | <Rika> Name? Type |
02:19:57 | FromDiscord | <⎝⪩﹏⪨⎠> In reply to @Elegantbeef "use `seq[T]`": Alright. |
02:20:27 | FromDiscord | <Arathanis> @ElegantBeef how do you use an intermediate macro? |
02:20:40 | FromDiscord | <Elegantbeef> You make a macro that then calls your macro inside |
02:21:32 | FromDiscord | <Arathanis> Have a brief example of how you grab the intermediate macro's AST to then process using the primary macro? |
02:21:37 | FromDiscord | <Arathanis> Maybe I am just failing to visualize it |
02:23:43 | termer | visit #nim |
02:23:46 | termer | see Elegantbeef |
02:23:53 | termer | just another one of those days |
02:24:31 | FromDiscord | <⎝⪩﹏⪨⎠> Now I have to initialize the thing. https://media.discordapp.net/attachments/371759389889003532/1087924740527759430/image.png https://media.discordapp.net/attachments/371759389889003532/1087924740792008765/image.png |
02:24:58 | FromDiscord | <Elegantbeef> https://github.com/beef331/fungus/blob/master/src/fungus.nim#L383-L394 for instance |
02:24:58 | FromDiscord | <Elegantbeef> `kindOf` is declared above this macro |
02:25:17 | FromDiscord | <Arathanis> In reply to @termer "see Elegantbeef": https://tenor.com/view/moo-cow-windy-flowing-hair-gif-16646426 |
02:27:21 | FromDiscord | <Elegantbeef> you literally just call the macro |
02:27:22 | FromDiscord | <Elegantbeef> https://github.com/beef331/fungus/blob/master/tests/tbasic.nim#L13 |
02:27:23 | FromDiscord | <Elegantbeef> Here i call from |
02:27:24 | FromDiscord | <Elegantbeef> Which then inturn calls kindof |
02:27:38 | * | azimut quit (Ping timeout: 255 seconds) |
02:27:46 | FromDiscord | <Elegantbeef> Ah a day is a day |
02:27:55 | FromDiscord | <Elegantbeef> Like i said |
02:28:03 | FromDiscord | <Elegantbeef> `BinTree[T]` |
02:28:30 | FromDiscord | <Elegantbeef> Nim does not have generic inference |
02:28:31 | FromDiscord | <Elegantbeef> Is this thing on |
02:29:06 | FromDiscord | <Arathanis> ohh i think i understand now, i had it reversed |
02:29:42 | FromDiscord | <Arathanis> the outer macro generates the wrapping proc, then when it generates the new AST it places the introspection macro around the now proc wrapped block so it can perform the inspection. |
02:32:11 | FromDiscord | <dedraiaken> Anyone have any guesses as to what my cause a memory access issue here? https://media.discordapp.net/attachments/371759389889003532/1087926671363027025/image.png |
02:32:12 | FromDiscord | <Elegantbeef> Right and you might not need the proc with locals |
02:32:36 | FromDiscord | <dedraiaken> raw is an `ptr UncheckedArray[char]` and the echo lines above it work fine |
02:32:47 | FromDiscord | <h4x0r_kn0wn_as_4ch4n> anyone here codes malware in nim? |
02:32:48 | FromDiscord | <dedraiaken> (edit) "an" => "a" |
02:33:12 | FromDiscord | <ringabout> So? |
02:35:25 | FromDiscord | <Rika> Weirdest question to ask |
02:36:26 | FromDiscord | <Gumbercules> In reply to @h4x0r_kn0wn_as_4ch4n "anyone here codes malware": only the stuff running on your machine |
02:36:31 | * | ltriant quit (Ping timeout: 240 seconds) |
02:36:51 | FromDiscord | <Gumbercules> otherwise I spend most of my time writing haikus in Nim |
02:36:52 | * | jmdaemon joined #nim |
02:37:15 | FromDiscord | <⎝⪩﹏⪨⎠> In reply to @h4x0r_kn0wn_as_4ch4n "anyone here codes malware": That would be against the rules. |
02:37:22 | FromDiscord | <Gumbercules> what rules? |
02:37:30 | FromDiscord | <Diogenes of Toronto> stupid i didnt open the file |
02:37:50 | FromDiscord | <Diogenes of Toronto> omg |
02:37:52 | FromDiscord | <SpiderDave> creating malware is enough for intent to do something illegal and would violate discord's tos |
02:38:07 | FromDiscord | <Gumbercules> I mean, plenty of people study malware |
02:38:18 | FromDiscord | <Gumbercules> and security |
02:38:34 | FromDiscord | <SpiderDave> sure, but it's not something that any programming community would openly allow on their discord |
02:38:44 | FromDiscord | <Gumbercules> Asking if anyone writes malware does not signal ill intent |
02:38:46 | FromDiscord | <SpiderDave> <@&371760044473319454> |
02:38:59 | FromDiscord | <Gumbercules> unless it were a programming community which focused on studying malware |
02:39:07 | FromDiscord | <Gumbercules> I mean, this isn't kick or ban worthy |
02:39:26 | FromDiscord | <SpiderDave> no, but it's the kind of things trolls type to start arguments exactly like this one |
02:39:42 | FromDiscord | <SpiderDave> so just making sure moderator sees it |
02:39:51 | FromDiscord | <Gumbercules> I don't know if anyone is trolling anyone rn |
02:40:20 | FromDiscord | <Gumbercules> Doesn't seem like it |
02:40:43 | FromDiscord | <Elegantbeef> locals does exist arathanis so you might be able to just use that |
02:40:49 | FromDiscord | <Elegantbeef> dedraiaken does one need to allocate the register in any fancy way? |
02:41:02 | FromDiscord | <Elegantbeef> I mean intialise it |
02:41:38 | FromDiscord | <SpiderDave> anyone know how to fix this pong sdl2 example? it's showing the paddles as black for me: https://github.com/nim-lang/sdl2/blob/master/examples/pong.nim |
02:41:56 | FromDiscord | <SpiderDave> if i change the background i can see them but i dont know how to get the paddles to show otherwise |
02:43:13 | FromDiscord | <dedraiaken> In reply to @Elegantbeef "dedraiaken does one need": hmm well the code was working previously with other array types... let me do an experiment.. |
02:45:02 | * | ltriant joined #nim |
02:47:31 | FromDiscord | <ajusa> Anyone know if hax is still around? Or did they move to the other Nim related group? Had a question about fusion/matching |
02:49:54 | FromDiscord | <ringabout> In reply to @ajusa "Anyone know if hax": Yeah, https://discord.com/channels/371759389889003530/371759607934353448/1087799236806062241↵I think here is fine |
02:51:22 | FromDiscord | <ajusa> In that case, @haxscramper are you still planning on maintaining fusion/matching, or have you moved on to hmatching, or something else? |
02:52:22 | FromDiscord | <Gumbercules> In reply to @ajusa "In that case, <@608382355454951435>": I think they're probably sleeping rn |
02:52:40 | FromDiscord | <Gumbercules> tmk hax is not doing shit with fusion |
02:52:46 | FromDiscord | <ajusa> Yeah I assume they'll see it tomorrow with the notification |
02:52:53 | FromDiscord | <ajusa> Fusion is weird |
02:52:59 | FromDiscord | <ajusa> No clue what happened |
02:53:01 | FromDiscord | <Gumbercules> yeah, it's a failed experiment I believe |
02:53:07 | FromDiscord | <Gumbercules> it's a long story |
02:53:31 | FromDiscord | <Gumbercules> I think most of the maintainers felt like they weren't getting any support and it was taking way to long to get things done / get things mainlined |
02:53:47 | FromDiscord | <Gumbercules> and meanwhile they were maintainingthe packages, so I think eventually people got miffed and said F it |
02:53:54 | FromDiscord | <Gumbercules> (edit) "maintainingthe packages," => "maintaining the modules," |
02:54:14 | FromDiscord | <ringabout> The matching is scheduled for Nim 2.x anyway. ↵https://github.com/nim-lang/RFCs/issues/503↵> Find a way of allowing a syntax like of Value(let x, var y) and embrace an official pattern matching solution that makes use of this syntax. |
02:55:04 | FromDiscord | <Gumbercules> glad our roadmap is guarded by angels |
02:55:21 | FromDiscord | <ajusa> Yeah I'm hopeful, but not optimistic about syntax changes to Nim at this point |
02:55:50 | FromDiscord | <Rika> Kinda scary ngl |
02:55:55 | FromDiscord | <ajusa> IIRC araq has been pretty against syntax sugar in the compiler, he usually directs folks to macros instead |
02:56:11 | FromDiscord | <ajusa> Yeah if the syntax becomes part of Nim 2 we'll have a python 2/3 split |
02:56:23 | FromDiscord | <ajusa> Unless you explicitly write code the old way |
02:57:03 | FromDiscord | <Gumbercules> as long as additions and changes are opt-in or have a deprecation strategy, I think it's fine |
02:58:07 | * | ltriant quit (Ping timeout: 250 seconds) |
03:06:08 | FromDiscord | <amadan> Anyone have experience using musl for making static binaries? followed the steps here https://scripter.co/nim-deploying-static-binaries/ and a simple 'hello world' crashes with a segfault |
03:13:58 | FromDiscord | <⎝⪩﹏⪨⎠> Solved. |
03:24:38 | * | ltriant joined #nim |
03:47:45 | FromDiscord | <SpiderDave> ok so for that pong example question i figured out that removing the line to display scores fixes the ball and paddle color, so it may be something wrong in drawScores. i dont know how to fix it though |
03:48:07 | FromDiscord | <Elegantbeef> Pong? |
03:48:16 | FromDiscord | <SpiderDave> yeah my previous message above |
03:49:36 | FromDiscord | <amadan> In reply to @amadan "Anyone have experience using": alright switched to compiling with zig instead and now can build binaries that please aws lambdas |
03:52:21 | * | nanxiao quit (Quit: Client closed) |
04:29:37 | FromDiscord | <Elegantbeef> @SpiderDave\: what os are you on? |
04:30:17 | FromDiscord | <SpiderDave> windows 7 |
04:30:41 | FromDiscord | <Elegantbeef> 64bit? |
04:30:42 | FromDiscord | <SpiderDave> so i figured out it's this that seems to affect it `defer: texture.destroy` |
04:30:46 | FromDiscord | <SpiderDave> yeah x64 |
04:30:58 | FromDiscord | <SpiderDave> i remove that and it looks fine (but then it leaks memory so it's needed) |
04:32:51 | FromDiscord | <Elegantbeef> What version of Nim? |
04:32:51 | FromDiscord | <Elegantbeef> I will say it works fine here on linux, so seems it's an OS or Sdl2 issue on windows |
04:34:04 | FromDiscord | <SpiderDave> sent a code paste, see https://play.nim-lang.org/#ix=4ruJ |
04:35:13 | FromDiscord | <SpiderDave> ok at least that narrows it down; might have to use something else for this kind of thing |
04:42:55 | * | derpydoo joined #nim |
04:43:21 | * | sagax joined #nim |
04:47:04 | * | ltriant quit (Ping timeout: 265 seconds) |
04:50:16 | * | nanxiao joined #nim |
04:58:40 | * | xaltsc quit (Ping timeout: 265 seconds) |
05:02:32 | * | ltriant joined #nim |
05:03:03 | FromDiscord | <Gumbercules> @SpiderDave looks fine to me - https://media.discordapp.net/attachments/371759389889003532/1087964638836178994/image.png |
05:03:17 | FromDiscord | <Gumbercules> on Windows |
05:03:27 | FromDiscord | <Gumbercules> what version of SDL2 do you have installed? |
05:03:28 | FromDiscord | <Elegantbeef> Time to blame windows 7? \:d |
05:05:02 | * | rmt joined #nim |
05:15:17 | * | rockcavera quit (Remote host closed the connection) |
05:15:30 | * | ltriant quit (Ping timeout: 268 seconds) |
05:19:26 | FromDiscord | <SpiderDave> ok i swapped out a different dll and it works yay |
05:43:32 | * | ltriant joined #nim |
05:46:40 | * | arkurious quit (Quit: Leaving) |
05:48:21 | * | derpydoo quit (Ping timeout: 255 seconds) |
05:53:54 | * | azimut joined #nim |
06:08:49 | * | jaywack joined #nim |
06:17:09 | * | nanxiao quit (Quit: Client closed) |
06:25:43 | FromDiscord | <⎝⪩﹏⪨⎠> What do you think about my way of printing binary trees: https://media.discordapp.net/attachments/371759389889003532/1087985440465899550/image.png |
06:28:24 | FromDiscord | <Elegantbeef> why not `s.add genString`? |
06:28:29 | FromDiscord | <Elegantbeef> Do you not like your memory?! |
06:28:44 | FromDiscord | <huantian> hey people are just not used to mutable strings be default 😛 |
06:29:02 | * | nanxiao joined #nim |
06:29:34 | FromDiscord | <⎝⪩﹏⪨⎠> Ok. |
06:29:46 | FromDiscord | <Elegantbeef> StringBuilder is bad |
06:29:54 | FromDiscord | <huantian> you can use `result` instead of your own `s` though, save yourself a return |
06:30:32 | FromDiscord | <⎝⪩﹏⪨⎠> In reply to @huantian "you can use `result`": What's the difference between not using an explicit return and using the implicit one. |
06:31:15 | FromDiscord | <⎝⪩﹏⪨⎠> In reply to @Elegantbeef "StringBuilder is bad": Is there a better way to represent a binary tree with no recursion and straight from the array? |
06:32:40 | FromDiscord | <Elegantbeef> No clue how you want this to print, i was just joking about string builders in other languages |
06:35:13 | * | advesperacit joined #nim |
06:35:49 | FromDiscord | <⎝⪩﹏⪨⎠> In reply to @Elegantbeef "why not `s.add genString`?": Because compiler complains. |
06:36:10 | FromDiscord | <⎝⪩﹏⪨⎠> Wait, nvm. |
06:36:52 | FromDiscord | <⎝⪩﹏⪨⎠> This is the way I want it to be printed: https://media.discordapp.net/attachments/371759389889003532/1087988246706913290/image.png |
06:37:14 | FromDiscord | <demotomohiro> @⎝⪩﹏⪨⎠ Recursive procedure usually rewriten with loop with stack. |
06:37:15 | FromDiscord | <Yardanico> In reply to @Elegantbeef "Do you not like": or just s &= stuff |
06:37:31 | FromDiscord | <Yardanico> Nim has an overload for &= that just does add |
06:43:26 | FromDiscord | <⎝⪩﹏⪨⎠> But well, at the end it works as I expected and wanted it to work. |
06:43:36 | FromDiscord | <⎝⪩﹏⪨⎠> Not like the first time I did it in Lua. |
06:43:40 | FromDiscord | <⎝⪩﹏⪨⎠> That was a mess. |
06:43:44 | FromDiscord | <huantian> haha |
06:44:35 | FromDiscord | <⎝⪩﹏⪨⎠> In this approach, I treat the `root` array as the tree. |
06:45:03 | FromDiscord | <⎝⪩﹏⪨⎠> And the array only contains tuples with the value and the name of the node. |
06:45:48 | FromDiscord | <⎝⪩﹏⪨⎠> Instead of proper parent/child objects with their respective references to their left and right children. |
06:46:09 | FromDiscord | <⎝⪩﹏⪨⎠> I don't know if this approach is at least useful or efficient, but meh. |
06:46:35 | FromDiscord | <Elegantbeef> Using integers instead of pointers is pretty much the corner stone of data oriented design |
06:46:47 | FromDiscord | <Elegantbeef> It also serialises easier |
06:47:46 | FromDiscord | <huantian> huh ngl never heard of data oriented design before |
06:48:03 | FromDiscord | <Elegantbeef> Comes up a lot with ECS |
06:48:24 | FromDiscord | <huantian> interesting↵never used ECS either lol didn't get caught up in the hype |
06:48:27 | FromDiscord | <⎝⪩﹏⪨⎠> Wait what. |
06:48:59 | FromDiscord | <Elegantbeef> The premise is instead of using pointers you use an index into a global buffer |
06:49:15 | FromDiscord | <Elegantbeef> This gives you contiguous memory that is cache efficient and also easily serialisable |
06:49:24 | FromDiscord | <⎝⪩﹏⪨⎠> Hmm... so this is the first time I kind of made an efficient approach to a problem in my life. |
06:49:40 | FromDiscord | <huantian> I'd assume that would only be on the low level, and you'd want to implement higher level abstractions? |
06:50:08 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=4rpp↵vs.↵https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/main/bench/algorithm/binarytrees/2.nim↵Basically |
06:50:36 | FromDiscord | <Elegantbeef> Of course in Nim you can use macros and the like to make it equivalent to the reference API |
06:50:49 | FromDiscord | <Elegantbeef> But in like C of course it's not really possible 😄 |
06:51:41 | FromDiscord | <Elegantbeef> This comes up in compilers, ECS, and pretty much anything that needs speed and to be serialised easily |
06:52:13 | FromDiscord | <Elegantbeef> With modern cpus it's especially good to use this style of design since cache is so important |
06:54:02 | FromDiscord | <haxscramper> In reply to @ajusa "In that case, <@608382355454951435>": (1) no, (2) yes, moved, (3) maybe I will write v2. |
06:54:57 | FromDiscord | <huantian> In reply to @Elegantbeef "This comes up in": huh neat↵well I'll care about that when i need that ig |
06:55:26 | FromDiscord | <ajusa> In reply to @haxscramper "(1) no, (2) yes,": Awesome thanks! I'll keep opening issues in that case, glad it isn't dead. Very useful project 🙂 |
06:55:44 | FromDiscord | <Elegantbeef> Realistically it can be though of as your own allocation system, since what it kinda is. You have your own memory that you have pointers to, but they're integers instead of pointers. |
06:56:02 | FromDiscord | <haxscramper> I just moved it, I'm not actively working on it at the moment |
06:56:39 | FromDiscord | <haxscramper> You can of course create issues but I can't say I will be fast to fix them |
06:57:01 | FromDiscord | <haxscramper> Go be honest implementation is pretty bad, so v2 is more likely to happen |
06:57:45 | FromDiscord | <huantian> In reply to @Elegantbeef "Realistically it can be": so the usefulness is that by controlling how memory is laid out yourself, you keep relevant data contiguous |
06:58:38 | FromDiscord | <Elegantbeef> Well you do not have pointer indirection and when you load an element from the cache you're likely to load the next |
06:58:39 | FromDiscord | <huantian> would it then be useful as parts of a larger system? so you wouldn't design your entire program using the principles, but maybe certain bits would benifit |
06:58:55 | FromDiscord | <Elegantbeef> Unless your data is like 64bytes or bigger than a cache line |
06:59:33 | FromDiscord | <Elegantbeef> The benefit is purely that you're playing to the advantage of modern caching. When you iterate a collection you load in N number of elements based off your data size and cache line size. |
07:00:01 | FromDiscord | <Elegantbeef> This is one reason why iterating bytes is faster than iterating int64s |
07:00:18 | FromDiscord | <Elegantbeef> With most CPUs when you fetch the first byte of an array you get 63 bytes after it |
07:00:37 | FromDiscord | <Elegantbeef> So now you do not need to go back to memory to read 63 elements assuming you do not thrash your cache |
07:01:15 | FromDiscord | <Elegantbeef> I will say games using ECS heavily use this |
07:01:31 | FromDiscord | <Elegantbeef> They do not use ECS for everything since it's a bit tedious for some systems, but they do for a lot |
07:01:44 | FromDiscord | <Elegantbeef> Though not everyone needs ECS, it's just a way of designing to best suit the CPU |
07:03:14 | FromDiscord | <Elegantbeef> If you think about in a game you might go "Iterate all objects that have Position, Transform, Renderer" and render them, if your data is stored contiguously in an array you do not have to go back to memory like you would if they were pointer objects |
07:04:00 | FromDiscord | <huantian> huhhh yeah I can see how that would be helpful |
07:04:45 | FromDiscord | <Elegantbeef> Huan got way more of an explanation than they wanted 😛 |
07:04:49 | FromDiscord | <huantian> time to build my next game with ECS |
07:05:17 | FromDiscord | <Elegantbeef> Polymorph is pretty nice 😄 |
07:05:22 | FromDiscord | <huantian> In reply to @Elegantbeef "Huan got way more": nah more explanation is just more learning! |
07:06:05 | FromDiscord | <huantian> is ECS something helpful for all games though? |
07:06:19 | FromDiscord | <Elegantbeef> Nah |
07:06:26 | FromDiscord | <Elegantbeef> Most people do not need ECS |
07:06:31 | FromDiscord | <Elegantbeef> It really comes into play with tonnes of entities |
07:06:44 | FromDiscord | <huantian> ah i see |
07:07:03 | FromDiscord | <Elegantbeef> Though it is also compositional based |
07:07:05 | FromDiscord | <Elegantbeef> So it does make the code less dependant on strict structures |
07:07:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4rvf |
07:08:04 | FromDiscord | <Elegantbeef> It only cares that it has a `Position, Draw, Size` component |
07:08:22 | FromDiscord | <Elegantbeef> This is not polymorph, this is my small and simple ecs |
07:09:41 | FromDiscord | <huantian> how small and simple! |
07:10:13 | FromDiscord | <Elegantbeef> \< 500loc with 1 macro |
07:10:14 | FromDiscord | <huantian> so this example code would find everything with those component and draw a ball on it? |
07:10:23 | FromDiscord | <Elegantbeef> Yep |
07:10:37 | FromDiscord | <huantian> i can see how that'd be useful |
07:10:55 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4rvj |
07:10:57 | FromDiscord | <Elegantbeef> Is how the balls are instantiated |
07:11:34 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimtrest/blob/master/yeacs.nim shameless ECS if you want to see |
07:11:44 | FromDiscord | <Elegantbeef> Example is in toys for toys folder |
07:12:21 | FromDiscord | <huantian> huh so are all entities equal? like nothing distinguishes a ball from anything else that has those components right |
07:12:33 | FromDiscord | <Elegantbeef> Correct entities are just numbers really |
07:12:50 | FromDiscord | <Elegantbeef> In fact this is what i consider an entity |
07:12:52 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4rvk |
07:14:43 | FromDiscord | <Elegantbeef> Generation is important cause if you add/remove an entity/component you need to go "Yep this pointer is invalidated" |
07:16:34 | FromDiscord | <Elegantbeef> Which is why in my `addComponent` i take in a mutable entity, as it mutates that |
07:16:50 | FromDiscord | <Elegantbeef> I will be honest that my ecs was made mostly just to do it with the fewest macros possible, so it's not the most intelligent |
07:17:10 | FromDiscord | <Elegantbeef> But it's a good place to learn how they practically work |
07:22:17 | FromDiscord | <huantian> maybe I should make my own ecs then 😛 |
07:22:53 | FromDiscord | <Elegantbeef> Need it to get down to 0 macros |
07:23:14 | FromDiscord | <huantian> maybe try with 0 type defs as well |
07:25:10 | FromDiscord | <huantian> in oop land, if you wanted to make a special ball you would inherit from your Ball class. with ecs, would you add a component that makes it do something special? |
07:25:25 | FromDiscord | <Elegantbeef> Correct |
07:25:32 | FromDiscord | <Elegantbeef> Then you define a system to operate on that |
07:25:49 | FromDiscord | <Elegantbeef> A system in my ECS was like that `drawBall` proc |
07:26:07 | FromDiscord | <huantian> the component itself then knows nothing about the entity it's attached to |
07:26:11 | FromDiscord | <Elegantbeef> ECS seperates data from implementation hence the System and Component |
07:26:37 | FromDiscord | <Elegantbeef> Yea the components are best described as data buckets |
07:26:49 | FromDiscord | <Elegantbeef> They're generally just types with your required data |
07:27:16 | FromDiscord | <Elegantbeef> Polymorph though does allow you to persistently hold onto an entity |
07:27:26 | FromDiscord | <Elegantbeef> Mine would error that you have an old generational index |
07:28:06 | FromDiscord | <huantian> the system then is what's able to do the equivalent of accessing information from the "parent class"↵it's what's able to do something special with the special ball |
07:28:24 | FromDiscord | <Elegantbeef> Indeed |
07:28:38 | FromDiscord | <Elegantbeef> Systems operate on components by querying for components |
07:28:46 | FromDiscord | <Elegantbeef> draw ball queried for `Position, Size, Draw` |
07:29:28 | FromDiscord | <Elegantbeef> So any archetype that has those 3 components is iterated over |
07:29:28 | FromDiscord | <Elegantbeef> I doesnt matter if it also has `SuperSpecialBall` or `DeathBall` |
07:30:12 | FromDiscord | <huantian> what if then I wanted say a ball with a `Bounce` component to display differently than a normal ball? |
07:30:29 | FromDiscord | <Elegantbeef> You implement anti selectors |
07:30:39 | FromDiscord | <Elegantbeef> `Draw and not SpecialDraw` or whatever |
07:31:08 | FromDiscord | <huantian> mm |
07:31:29 | FromDiscord | <Rika> Ngl this is making me interested in game design and programming |
07:31:36 | FromDiscord | <Elegantbeef> You should be able to query both positive and negative components in an ideal world |
07:33:25 | FromDiscord | <huantian> same rika I wanna make a game now \:p |
07:34:21 | FromDiscord | <Elegantbeef> I do not have a negative query system |
07:34:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/lvr |
07:34:24 | FromDiscord | <Elegantbeef> I did mean to add one, just needed to think about how to do it without a macro |
07:34:54 | FromDiscord | <huantian> it feels pretty easy for systems to, i guess, conflict if you don't carefully design your code? |
07:35:12 | FromDiscord | <huantian> but that's just a feeling lol |
07:35:21 | FromDiscord | <Rika> I think that’s true for a lot of things |
07:36:10 | FromDiscord | <Elegantbeef> It's very compositional so it's relatively easy to resolve conflicts |
07:37:22 | FromDiscord | <huantian> mm yeah it'd be similarly (or probably even more) bad with oop and inheritance |
07:39:06 | FromDiscord | <huantian> actually speaking of game dev, I was considering making a multiplayer focused taiko clone at some point... but the main challenge with that would probably be audio and networking |
07:39:18 | FromDiscord | <huantian> probably not things solved by using an ECS lol |
07:39:58 | FromDiscord | <Elegantbeef> Ah i just realised how i could do the negation query 😄 |
07:40:11 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4rvp |
07:40:41 | FromDiscord | <Elegantbeef> Ah sorry `type Not[T: not Not] = distinct T` is the real solution |
07:40:49 | FromDiscord | <huantian> that's a lot of nots |
07:40:52 | FromDiscord | <Elegantbeef> taiko? |
07:41:14 | FromDiscord | <huantian> funny japanese drumming rhythm game |
07:41:46 | FromDiscord | <Elegantbeef> Uh huh |
07:43:26 | FromDiscord | <huantian> you can probably find some insane gamplay if you just youtube taiko no tatsujin |
07:44:10 | FromDiscord | <huantian> but anyways, would be an interesting project imo, multiplayer sync for rhythm games sounds like a fun challenge |
07:44:22 | FromDiscord | <huantian> but I have no idea how to do it |
07:44:28 | FromDiscord | <Elegantbeef> One of the least ECS required project 😄 |
07:44:42 | FromDiscord | <Elegantbeef> Well there's the trick you cannot sync it |
07:45:11 | FromDiscord | <Rika> You don’t really need exact syncing for rhythm games |
07:45:22 | FromDiscord | <Rika> They only need to be consistent at the end when scoring is done |
07:46:03 | FromDiscord | <Elegantbeef> Cmon huan i want a playable prototype by next week |
07:46:07 | FromDiscord | <Rika> Networking isn’t as difficult as it would be with a fighting game let’s say, but inspiration can be taken from what they do since they’re both very similar in how timing can be done |
07:46:34 | FromDiscord | <Rika> Audio has a few tutorials but I lost the links to articles about it |
07:46:47 | FromDiscord | <Elegantbeef> I do not imagine rollback works well for a rhythm game |
07:48:28 | FromDiscord | <huantian> In reply to @Rika "Networking isn’t as difficult": That is an interesting avenue to explore, I don’t know specifically how it works with fighting games either but sounds like it could be helpful |
07:49:09 | FromDiscord | <huantian> It is definitely easier with rhythm games because the players don’t directly interact |
07:49:22 | FromDiscord | <Rika> In reply to @Elegantbeef "I do not imagine": Well it’s not necessary |
07:49:48 | FromDiscord | <huantian> Their actions are only displayed on the other players’ screens, but each player isn’t dependent on the actions of any other |
07:49:53 | FromDiscord | <Rika> Since as said above, each player is independent of each other in terms of outcome |
07:50:20 | FromDiscord | <Girvo> Is it possible to "disable" effects/exception tracking? Basically making the `raises` pragma a no-op? |
07:50:27 | FromDiscord | <Rika> I don’t think so |
07:50:30 | FromDiscord | <Girvo> Okay cool |
07:50:38 | FromDiscord | <Girvo> I'll fix up what's causing it in Chronos then |
07:50:40 | FromDiscord | <Elegantbeef> Just add a closing transition and send the score 😄 |
07:51:48 | FromDiscord | <Elegantbeef> Calculate an average ping between players whilst playing, wait that long times 3 before showing scores, sweep the rest under the rug |
07:52:17 | FromDiscord | <Rika> Some games display real time score too though |
07:52:22 | FromDiscord | <Rika> While playing |
07:52:35 | FromDiscord | <Rika> Most do I believe |
07:52:42 | FromDiscord | <huantian> With a taiko clone ideally I’d like to show the actual gameplay in addition |
07:53:01 | FromDiscord | <huantian> (edit) "With a taiko clone ideally I’d like to show the actual ... gameplayof" added "live-ish" | "in addition" => "of the other players too" |
07:53:31 | FromDiscord | <huantian> ~~otherwise I’d just play osu!taiko~~ |
07:53:51 | FromDiscord | <Rika> The approach I’d think of immediately would be to display the perfect animation until the real event has been received, if not received on time then do not display the real event |
07:54:42 | FromDiscord | <huantian> Yeah that sounds like the best way to do it |
07:55:10 | FromDiscord | <Elegantbeef> Pretty much all you can really do |
07:55:22 | FromDiscord | <Rika> In regular gameplay there is the normal assumed latency of input and corresponding compensation, replace that with network latency compensation for network game display |
07:55:46 | FromDiscord | <Rika> If you want to generalise, you can have “physical input” and “network input” |
07:55:53 | FromDiscord | <Elegantbeef> Ah delay input |
07:56:01 | FromDiscord | <Elegantbeef> I forgot rika is in japan 😛 |
07:56:11 | FromDiscord | <Rika> What about? |
07:56:15 | FromDiscord | <Elegantbeef> Those japanese fighting games still do delay instead of rollback |
07:56:22 | FromDiscord | <Rika> I don’t play fighting games |
07:56:36 | FromDiscord | <Rika> I’ve been playing rhythm games for nearly a decade and pretty much half my life though |
07:56:41 | FromDiscord | <Elegantbeef> I know you do not play any games but arcades |
07:57:21 | FromDiscord | <Elegantbeef> So huan how long for that playable prototype?! |
07:57:46 | * | kenran joined #nim |
07:58:19 | FromDiscord | <Rika> The hardest part of starting a game is choosing the engine or internals lol |
07:58:23 | FromDiscord | <huantian> In reply to @Rika "If you want to": That’d probably be something good to build the core of the game on as well, though sounds like a pain to test if it’s so entwined with the base game itself |
07:58:28 | FromDiscord | <Rika> Next after that is making a name lol |
07:58:37 | FromDiscord | <huantian> In reply to @Elegantbeef "So huan how long": 5 years probably |
07:58:56 | FromDiscord | <huantian> In reply to @Rika "Next after that is": Naming programming projects is always hard haha |
07:59:18 | FromDiscord | <Rika> In reply to @huantian "Naming programming projects is": Just choose the name of an anime character you like and pin it as the internal name |
08:00:24 | FromDiscord | <huantian> Lol |
08:01:57 | FromDiscord | <huantian> I don’t know if I’d design the base game systems with networking in mind from the beginning, or try to get a minimal local version first then add multi on it |
08:02:16 | FromDiscord | <ElegantBeef> Bridge are died |
08:02:23 | FromDiscord | <huantian> ono |
08:02:26 | FromDiscord | <ElegantBeef> The answer is you make your game with networking in mind |
08:02:57 | FromDiscord | <huantian> That sounds like a pain to test tho |
08:03:33 | FromDiscord | <huantian> Maybe that’s just me being lazy though |
08:04:31 | FromDiscord | <huantian> Also I actually was considering Godot 4.0, I wanna try it out with all its new fancy improvements |
08:06:44 | FromDiscord | <huantian> Probably won’t use gdscript, maybe C#? |
08:07:51 | FromDiscord | <ElegantBeef> You can join the other prolific godot rhythm game https://store.steampowered.com/app/1216230/Project_Heartbeat/ |
08:08:40 | FromDiscord | <huantian> That looks like it is very much inspired by project diva lol |
08:08:51 | FromDiscord | <huantian> Just without the miku |
08:09:53 | FromDiscord | <huantian> Ngl I cannot read project diva I don’t understand how people play that game↵I have too much skill issue |
08:10:25 | FromDiscord | <ElegantBeef> I havent played any of these games since like guitar hero 3 |
08:10:46 | FromDiscord | <ElegantBeef> The closest i've gotten in recent years is playing super hexagon, and that's not close |
08:12:16 | FromDiscord | <huantian> You should go play rhythm doctor, this is a very unbiased recommendation |
08:13:22 | FromDiscord | <ElegantBeef> I think i'll pass |
08:13:34 | FromDiscord | <huantian> Dang 😔 |
08:14:12 | FromDiscord | <ElegantBeef> I'm a smooth brain that mostly plays shooty shooty games |
08:15:35 | FromDiscord | <huantian> Those games require me to sim which is hard |
08:15:54 | FromDiscord | <huantian> Also i have to know what to shoot |
08:16:26 | FromDiscord | <ElegantBeef> I get it you're american so it doesnt feel right shooting inside something that's not a school |
08:16:28 | FromDiscord | <Rika> Sorry I was playing 🙂 lol |
08:16:31 | FromDiscord | <Rika> I am back |
08:16:56 | FromDiscord | <huantian> In reply to @ElegantBeef "I get it you're": Yeah I also need to not die to people shooting me which is tough |
08:17:11 | FromDiscord | <ElegantBeef> Just shoot them first, problem solved |
08:17:23 | FromDiscord | <huantian> Ah I see |
08:17:41 | FromDiscord | <Hourglass [She/Her]> In reply to @ElegantBeef "I get it you're": DAMN |
08:17:42 | FromDiscord | <huantian> In reply to @Rika "Sorry I was playing": Playing 🙂? |
08:17:47 | FromDiscord | <Hourglass [She/Her]> Beef is out for BLOOD |
08:18:05 | FromDiscord | <ElegantBeef> It wasnt that impactful |
08:18:23 | FromDiscord | <Hourglass [She/Her]> I mean, bullets do get pretty messy |
08:18:33 | FromDiscord | <ElegantBeef> Insert a comment about the kids taking the brunt of it |
08:18:36 | FromDiscord | <Rika> Hit detection when there is sizeable latency lol |
08:19:20 | FromDiscord | <Hourglass [She/Her]> In reply to @ElegantBeef "*Insert a comment about": Damn |
08:19:27 | FromDiscord | <ElegantBeef> These arent that good |
08:19:32 | FromDiscord | <ElegantBeef> Anyway Nim huh |
08:19:48 | FromDiscord | <Hourglass [She/Her]> In reply to @ElegantBeef "These arent that good": Still makes me chuckle lmao |
08:19:57 | FromDiscord | <Hourglass [She/Her]> In reply to @ElegantBeef "Anyway Nim huh": Ah yes Nim |
08:20:06 | FromDiscord | <huantian> Are there GDExtension bindings for Nim yet? |
08:20:43 | FromDiscord | <ElegantBeef> Someone did start on them |
08:20:46 | FromDiscord | <ElegantBeef> No clue if they're usable |
08:20:54 | FromDiscord | <ElegantBeef> https://github.com/Hapenia-Lans/gdextension-nim |
08:21:13 | FromDiscord | <huantian> I see |
08:21:58 | FromDiscord | <huantian> Yk I wonder if a peer to peer system would work well for rhythm game multi |
08:22:50 | FromDiscord | <huantian> You wouldn’t have to go though a central server right? Or is that just optimistic |
08:23:04 | FromDiscord | <ElegantBeef> You need some master server for matchmaking unless you do direct IP connect |
08:24:15 | FromDiscord | <huantian> Definitely |
08:24:19 | FromDiscord | <Rika> Peer to peer makes things more complex |
08:25:08 | FromDiscord | <ElegantBeef> Well generally when people mean p2p they mean one person is chosen as a host and others connect to them |
08:25:15 | FromDiscord | <System64 ~ Flandre Scarlet> Hi, I will have a programming context next week and I will use Nim↵Do you know some useful libraries / packages I can use that doesn't have dependencies? I'll have to do console apps |
08:25:28 | FromDiscord | <Rika> Dependencies in terms of what |
08:25:46 | FromDiscord | <ElegantBeef> illwill is probably your best bet |
08:26:14 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Rika "Dependencies in terms of": I won't have Internet access, so I'll need to download the libraries to install them later |
08:26:23 | * | Notxor joined #nim |
08:26:24 | FromDiscord | <System64 ~ Flandre Scarlet> but if there are deps, it will be a mess |
08:26:25 | FromDiscord | <ElegantBeef> It's pure Nim with no external dependencies |
08:26:44 | FromDiscord | <huantian> In reply to @ElegantBeef "Well generally when people": Yeah I feel like with that setup it is added complexity with minimal benefit |
08:27:06 | FromDiscord | <huantian> Though maybe a mesh style where each player is connected to each other would have some benefits? |
08:27:29 | FromDiscord | <ElegantBeef> In unlikely scenarios the latency might be lower than to a server 😄 |
08:28:10 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ElegantBeef "It's pure Nim with": Oh thanks! Might be useful! |
08:28:39 | FromDiscord | <ElegantBeef> There is also nimwave, no clue if it has external deps |
08:29:30 | FromDiscord | <System64 ~ Flandre Scarlet> Oh wow, someone made a TRACKER in the terminal! |
08:29:48 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/1088016669001121812/nim-mod-1.png |
08:29:57 | FromDiscord | <huantian> In reply to @ElegantBeef "In unlikely scenarios the": Hey it can’t be that unlikely! |
08:30:52 | FromDiscord | <ElegantBeef> Well in my case my ISP routes shittily so my ping to people in my town is actually comically high |
08:31:06 | FromDiscord | <ElegantBeef> I'm like < 3 km away but my ping is like 100ms |
08:31:13 | FromDiscord | <huantian> Wow |
08:33:54 | FromDiscord | <huantian> Hm if you did use a centralized server, would you want to batch the data from each other person? No right, that would mean that the person with the highest ping would bottleneck everything |
08:34:08 | FromDiscord | <huantian> This is where my inexperience with networking and games shows lol |
08:35:35 | FromDiscord | <ElegantBeef> I think the solution is that you play the notes perfectly until you have a response from the client, you then play the notes with the result the client provided |
08:35:57 | FromDiscord | <ElegantBeef> It's not 1:1 with what they did but it's an approximation of what they did |
08:36:38 | FromDiscord | <ElegantBeef> Though even with 300ms ping from client to host that's within some human reaction time |
08:37:12 | FromDiscord | <ElegantBeef> So aside from extremely high latency you should generally be able to have correct notes |
08:37:58 | FromDiscord | <ElegantBeef> Institute some limited rollback on the remote players |
08:40:43 | FromDiscord | <huantian> And you’d do that for each online player |
08:41:18 | FromDiscord | <huantian> I’d probably build with max 4p so only 3 online players at most |
08:45:55 | * | fallback quit (Read error: Connection reset by peer) |
08:46:19 | * | jmdaemon quit (Ping timeout: 265 seconds) |
09:56:07 | * | jmdaemon joined #nim |
09:57:28 | * | dv^_^ quit (Quit: Ping timeout (120 seconds)) |
09:57:55 | * | dv^_^ joined #nim |
10:23:49 | * | beholders_eye joined #nim |
10:26:01 | * | jmdaemon quit (Ping timeout: 240 seconds) |
10:40:01 | * | beholders_eye quit (Ping timeout: 240 seconds) |
10:47:49 | * | nanxiao quit (Quit: Client closed) |
11:02:37 | * | beholders_eye joined #nim |
11:14:22 | FromDiscord | <Entikan> is it normal for nim to gobble up a random core when tokenizing/parsing? https://media.discordapp.net/attachments/371759389889003532/1088058078005571685/a.png |
11:20:49 | * | rmt quit (Ping timeout: 276 seconds) |
11:33:24 | * | beholders_eye quit (Ping timeout: 252 seconds) |
11:33:32 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ElegantBeef "illwill is probably your": Btw, does it support custom colors?↵Or it only can use 16 colors? |
11:35:06 | FromDiscord | <Yardanico> In reply to @Entikan "is it normal for": if it does that for a long time (say, more than 1 minute) you might've hit a bug in the compiler :) |
11:38:33 | FromDiscord | <Entikan> In reply to @Yardanico "if it does that": 1:02 to be exact |
11:38:43 | FromDiscord | <Yardanico> and it still hangs or finishes after that? |
11:38:50 | FromDiscord | <Entikan> it finishes |
11:39:06 | FromDiscord | <Entikan> starts compiling |
11:39:10 | FromDiscord | <Yardanico> oh, at least it's not too bad, is your project big or not? it might be macros or something else that's causing the compiler to spend a lot of time doing stuff |
11:39:18 | FromDiscord | <Yardanico> and what external libraries are you using |
11:40:06 | FromDiscord | <jmgomez> Anyone familiar with `typeIt` around? |
11:40:20 | FromDiscord | <Entikan> In reply to @Yardanico "oh, at least it's": it's pretty big, and under construction (nim-panda3d). My ARM is the only machine with this problem atm. |
11:40:50 | FromDiscord | <jmgomez> (edit) "`typeIt`" => "`assume/typeIt`" |
11:41:13 | * | rmt joined #nim |
11:43:35 | FromDiscord | <ringabout> Which compiler are you using? |
11:45:34 | FromDiscord | <Entikan> gcc, cpp. Though the problem happens before compiling |
11:46:38 | FromDiscord | <Yardanico> well there's no easy well to tell really, maybe the compiler just spends a lot of time on some part of your code |
11:46:44 | FromDiscord | <Yardanico> especially since you say it works fine on other devices |
11:46:50 | FromDiscord | <Yardanico> are you using the same nim compiler version on all of them? |
11:47:45 | FromDiscord | <Entikan> pretty sure. But thanks I'll do some more experiments |
12:10:24 | * | kenran quit (Remote host closed the connection) |
12:20:19 | FromDiscord | <gaet> In reply to @System64 "Btw, does it support": Illwill's fork https://github.com/ansiwave/illwave added truecolor support |
12:41:29 | FromDiscord | <ricky> do APTs hire usin nim take homes still |
12:45:03 | * | kenran joined #nim |
12:54:54 | FromDiscord | <PunchCake> whats ORC short for in memory managment |
12:54:55 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @gaet "Nimwave's fork https://github.com/ansiwave/illwave ": Windows compatible too? |
12:55:21 | FromDiscord | <PunchCake> arc = atomic ref count↵orc = ?? |
12:56:21 | om3ga | what you think, which one is faster, arc or orc? |
12:56:44 | FromDiscord | <PunchCake> idk what orc means so i cant say |
13:00:46 | FromDiscord | <ringabout> O probably means cycle, which looks like a cycle. |
13:01:40 | FromDiscord | <ringabout> As a whole, it means ARC + cycle collecting. |
13:02:09 | FromDiscord | <ringabout> (edit) "O probably means ... cycle," added "a" |
13:03:21 | FromDiscord | <ringabout> ARC means automatic reference counting. |
13:05:12 | FromDiscord | <demotomohiro> iirc, ARC doesn't use atomic counter. |
13:06:25 | FromDiscord | <PunchCake> hm ok |
13:06:27 | FromDiscord | <jmgomez> TBH I feel like ARC is misleading, people tend to associate it with regular refc but AFAIK it's much more: RAII, move semantincs, etc. |
13:06:34 | FromDiscord | <PunchCake> but orc isnt stop the world right? |
13:06:35 | om3ga | to be fair I don't care what it uses :) |
13:06:39 | FromDiscord | <jmgomez> (edit) "TBH I feel like ARC is misleading, people tend to associate it with regular refc but AFAIK it's much more: RAII, move semantincs, ... etc." added "no atomics," |
13:06:58 | om3ga | the speed matters |
13:07:08 | om3ga | overhead |
13:07:42 | FromDiscord | <PunchCake> so wait if orc isnt stop the world then literally my program will run just like im writing C++ but with the usage of smart pointers and a bonus cycle collector that doesnt stop my program execution |
13:07:46 | FromDiscord | <PunchCake> that sounds nice |
13:08:33 | FromDiscord | <jmgomez> In reply to @PunchCake "so wait if orc": To be precise smart pointers should be slower due to what I mentioned about |
13:08:43 | FromDiscord | <jmgomez> (edit) "about" => "above" |
13:09:02 | FromDiscord | <PunchCake> hm |
13:09:13 | FromDiscord | <PunchCake> so with ORC pretty much the GC is free right? |
13:09:30 | FromDiscord | <jmgomez> In reply to @PunchCake "so with ORC pretty": not free, but cheap |
13:09:49 | FromDiscord | <PunchCake> very cheap |
13:10:13 | om3ga | and arc is more expensive? |
13:10:26 | FromDiscord | <PunchCake> arc leaks |
13:10:32 | FromDiscord | <PunchCake> orc doesnt |
13:10:37 | om3ga | oh... can leak |
13:10:43 | FromDiscord | <PunchCake> orc can leak? |
13:11:31 | FromDiscord | <jmgomez> That would be considered a bug |
13:12:00 | FromDiscord | <PunchCake> yeah whats the point of a GC if its gonna leak anyways |
13:12:11 | FromDiscord | <PunchCake> (edit) "yeah whats the point of a ... GC" added "cycle collector" |
13:13:11 | FromDiscord | <demotomohiro> ARC is cheaper than ORC.↵ARC doesnt leak as long as you dont make circler dependencies. |
13:13:40 | om3ga | arc is faster than orc |
13:13:51 | om3ga | at least with my latest project |
13:14:07 | FromDiscord | <PunchCake> In reply to @demotomohiro "ARC is cheaper than": if im drawing a triangle in opengl its gonna leak one way or another |
13:14:48 | om3ga | PunchCake: mapped C lib? |
13:14:58 | om3ga | binded, or whatever |
13:15:08 | om3ga | or native nim code? |
13:15:29 | FromDiscord | <PunchCake> what do you mean? |
13:15:38 | om3ga | how you use opengl |
13:15:45 | FromDiscord | <PunchCake> bindings |
13:15:54 | FromDiscord | <demotomohiro> In just reference counter, if objA refers objB and objB refers objA, they are leaked. ORC can detect such cycle and collect them correctyl. |
13:16:19 | om3ga | PunchCake: it might be leaks are produced by use of that lib |
13:16:25 | FromDiscord | <PunchCake> no |
13:16:37 | FromDiscord | <PunchCake> in C++ i make use of weak ptr to avoid leaks |
13:16:42 | FromDiscord | <PunchCake> nim doesnt have that with arc |
13:16:47 | FromDiscord | <PunchCake> so i gotta use orc |
13:17:15 | FromDiscord | <demotomohiro> @PunchCake You can even draw single triangle in OpenGL without using ref types. |
13:17:31 | FromDiscord | <PunchCake> wdym |
13:17:50 | FromDiscord | <PunchCake> a triangle hard to have 3 pointes connected to each other |
13:17:55 | FromDiscord | <PunchCake> hence a tri angle |
13:17:59 | FromDiscord | <PunchCake> tri |
13:18:19 | FromDiscord | <demotomohiro> ref types in Nim works like a std::shared_ptr<T> in c++. |
13:18:46 | FromDiscord | <PunchCake> is there a weak ptr ref type? |
13:18:56 | * | Notxor quit (Remote host closed the connection) |
13:19:43 | FromDiscord | <demotomohiro> Drawing single triangle in OpenGL is just pass an array[3, Vec3f]. |
13:20:19 | FromDiscord | <PunchCake> i dont think you understand |
13:20:41 | FromDiscord | <PunchCake> how i do it i draw 3 points and then draw lines connecting to each other and i fill it up |
13:20:59 | FromDiscord | <PunchCake> you cant make a triangle without 3 dots unless your gonna reinvent math or something |
13:22:43 | * | fallback joined #nim |
13:22:55 | FromDiscord | <demotomohiro> @PunchCake https://nim-lang.org/docs/destructors.html#lent-type↵lent type or cursor is similar to weak type. |
13:23:07 | FromDiscord | <PunchCake> https://media.discordapp.net/attachments/371759389889003532/1088090485026979840/image.png |
13:23:26 | FromDiscord | <PunchCake> https://media.discordapp.net/attachments/371759389889003532/1088090559270367313/image.png |
13:23:33 | FromDiscord | <PunchCake> sorry for the very bad drawing but you get the point |
13:24:52 | FromDiscord | <PunchCake> point 1 -> point 2 -> point 3 |
13:24:54 | FromDiscord | <PunchCake> all connected |
13:26:00 | FromDiscord | <demotomohiro> That is different from how I used to draw a triangle. OpenGL implementation automatically fill triangle with glDraw(GL_Triangles, ...). |
13:26:14 | FromDiscord | <PunchCake> sent a long message, see http://ix.io/4rwH |
13:26:14 | FromDiscord | <PunchCake> ok shit |
13:26:51 | FromDiscord | <PunchCake> In reply to @demotomohiro "That is different from": i like to do it the mathematical way |
13:31:10 | * | beholders_eye joined #nim |
13:31:40 | FromDiscord | <demotomohiro> @PunchCake That sounds like you implement rasteraizer yourself.↵GPUs has rasteraizer and OpenGL users usually just use it. |
13:35:32 | FromDiscord | <PunchCake> In reply to @demotomohiro "<@655759729477287956> That sounds like": Yeah thats what i do |
13:52:25 | * | fallback quit (Read error: Connection reset by peer) |
13:54:33 | * | Phytolizer joined #nim |
13:59:31 | FromDiscord | <PunchCake> whats a good rest api framework for nim? |
14:01:31 | * | jmdaemon joined #nim |
14:05:50 | FromDiscord | <jmgomez> There is prologue, jester, mummy among others |
14:06:31 | * | jmdaemon quit (Ping timeout: 240 seconds) |
14:06:56 | * | rockcavera joined #nim |
14:07:53 | FromDiscord | <PunchCake> In reply to @jmgomez "There is prologue, ": whats the most stable and actively developed? |
14:11:07 | FromDiscord | <jmgomez> Not sure, jester is the more starred and mummy is the newer. I personally use prologue. jester and prologue are both based on httpbeast. Prologue is quite similar of how a traditional sinatra based mvc server works so if you used one before you should feel confortable with it ↵I think ringabout maintains Prologue which is one of the core devs of Nim so that's a plus |
14:12:08 | FromDiscord | <Rika> Jester is owned by someone that no longer associates with Nim |
14:12:28 | FromDiscord | <Rika> Take that with a pinch of salt or something |
14:13:15 | FromDiscord | <Rika> (I don’t recall if what I’m saying is true, haven’t followed closely) |
14:15:40 | FromDiscord | <PunchCake> i think i |
14:15:49 | FromDiscord | <PunchCake> will use Prologue |
14:18:55 | * | sagax quit (Ping timeout: 276 seconds) |
14:30:07 | * | fallback joined #nim |
14:45:00 | * | jmdaemon joined #nim |
14:48:48 | * | mronetwo quit (Write error: Connection reset by peer) |
14:48:48 | * | noeontheend quit (Remote host closed the connection) |
14:48:48 | * | henrytill quit (Write error: Connection reset by peer) |
14:48:49 | * | adigitoleo quit (Remote host closed the connection) |
14:48:53 | * | oddish quit (Remote host closed the connection) |
14:50:01 | * | adigitoleo joined #nim |
14:50:09 | * | oddish joined #nim |
14:50:09 | * | mronetwo joined #nim |
14:50:35 | * | henrytill joined #nim |
14:51:30 | * | noeontheend joined #nim |
14:54:33 | om3ga | Armenian politician Alen Simonyan admitted that Yerevan intends to ratify the Rome Statute |
14:54:55 | FromDiscord | <ringabout> ? |
14:55:32 | om3ga | sorry, wrong window |
14:59:33 | * | fallback quit (Read error: Connection reset by peer) |
15:02:11 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
15:02:29 | * | jmdaemon joined #nim |
15:15:36 | FromDiscord | <Rika> Lol |
15:20:11 | anddam | Rome Statue? |
15:20:23 | anddam | Statute* |
15:20:49 | Amun-Ra | anddam: https://en.wikipedia.org/wiki/Rome_Statute |
15:21:25 | om3ga | When I'm tired sometimes I paste in wrong windows |
15:22:01 | om3ga | once I sent nude picture of girl to my manager at work, manager is woman |
15:22:11 | Amun-Ra | ouch |
15:23:05 | om3ga | no prob, she said good shape she has |
15:23:15 | FromDiscord | <Rika> Who was the nude girl |
15:23:31 | om3ga | I don't remember |
15:24:18 | om3ga | the problem was when I wrote texts with swear words on all employee meeting in Telia |
15:25:10 | om3ga | that was not very fun and little bit disappointing for me |
15:25:59 | om3ga | but it was their fault, why they not muted text window |
15:26:01 | om3ga | haha |
15:31:19 | * | fallback joined #nim |
15:32:01 | * | Notxor joined #nim |
15:39:24 | * | Phytolizer quit (Remote host closed the connection) |
15:49:28 | FromDiscord | <Coachonko> What is your opinion on Go's `defer` blocks? |
15:50:32 | * | adigitoleo quit (Remote host closed the connection) |
15:50:33 | * | mronetwo quit (Remote host closed the connection) |
15:50:33 | * | noeontheend quit (Write error: Broken pipe) |
15:50:34 | * | henrytill quit (Remote host closed the connection) |
15:50:34 | * | oddish quit (Remote host closed the connection) |
15:51:22 | FromDiscord | <Yardanico> In reply to @Coachonko "What is your opinion": Nim has them |
15:51:38 | FromDiscord | <pmunch> Are they different from Nims defer blocks? |
15:51:42 | FromDiscord | <Yardanico> i don't think so? |
15:51:46 | FromDiscord | <Coachonko> I couldn't find them in the docs |
15:51:51 | FromDiscord | <Elegantbeef> Yea, they're in a worse language |
15:51:59 | FromDiscord | <Coachonko> In reply to @Elegantbeef "Yea, they're in a": lmao |
15:52:01 | FromDiscord | <Yardanico> In reply to @Coachonko "I couldn't find them": the manual has docs for (almost) everything |
15:52:01 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#exception-handling-defer-statement |
15:52:16 | FromDiscord | <Yardanico> that's where you would look for all actual language features |
15:52:24 | FromDiscord | <pmunch> https://nim-lang.org/docs/manual.html#exception-handling-defer-statement |
15:52:30 | FromDiscord | <Coachonko> I searched but couldn't find |
15:52:38 | FromDiscord | <Coachonko> Excuse me my brain is smooth ok |
15:52:43 | FromDiscord | <pmunch> Damn it, you beat me to it |
15:53:23 | FromDiscord | <pmunch> That was meant at Yardanico, I wasn't racing to call you a smooth brain |
15:53:42 | FromDiscord | <Elegantbeef> Be honest, you were a little |
15:54:34 | FromDiscord | <Coachonko> So it's basically sugar for try/finally |
15:54:40 | FromDiscord | <Yardanico> yes, just how it should be |
15:54:44 | FromDiscord | <Phil> Nim bots are mean I tell you |
15:54:58 | FromDiscord | <Elegantbeef> I thought we were median |
15:55:00 | * | adigitoleo joined #nim |
15:55:09 | * | mronetwo joined #nim |
15:55:11 | * | oddish joined #nim |
15:56:24 | * | noeontheend joined #nim |
15:56:53 | * | henrytill joined #nim |
16:05:07 | FromDiscord | <Phil> Nah, average |
16:09:48 | * | kenran quit (Remote host closed the connection) |
16:11:44 | * | arkurious joined #nim |
16:18:32 | FromDiscord | <Rika> mean average |
16:24:35 | * | Notxor quit (Ping timeout: 268 seconds) |
16:29:13 | * | beholders_eye quit (Ping timeout: 246 seconds) |
16:37:27 | * | Notxor joined #nim |
16:48:47 | * | jmdaemon quit (Ping timeout: 264 seconds) |
17:00:40 | FromDiscord | <halc> damn, just found out about new style concepts and they look neat but they still buggy :( |
17:16:14 | NimEventer | New post on r/nim by iffycan: Show: embed directories in the executable, see https://reddit.com/r/nim/comments/11ypoi6/show_embed_directories_in_the_executable/ |
18:19:25 | * | jaywack left #nim (Good Bye) |
18:31:56 | * | Notxor quit (Remote host closed the connection) |
18:35:05 | * | fallback quit (Read error: Connection reset by peer) |
18:41:41 | * | beholders_eye joined #nim |
18:47:41 | * | fallback joined #nim |
19:12:05 | * | jmdaemon joined #nim |
19:14:52 | FromDiscord | <kfdvh> Is there a way to cancel HTTP request? |
19:17:05 | FromDiscord | <kfdvh> Seen https://frontside.com/effection |
19:19:51 | * | Notxor joined #nim |
19:23:06 | FromDiscord | <Gumbercules> Yay, another JS framework! |
19:24:28 | FromDiscord | <Gumbercules> They can't even get mobile css correct. I don't have high expectations. https://media.discordapp.net/attachments/371759389889003532/1088181416585609360/Screenshot_20230322-142341_DuckDuckGo.jpg |
19:24:39 | FromDiscord | <Gumbercules> https://media.discordapp.net/attachments/371759389889003532/1088181465960956004/Screenshot_20230322-142341_DuckDuckGo.jpg |
19:26:57 | FromDiscord | <Gumbercules> In all seriousness though, I don't think you can "cancel" a HTTP request in Nim. |
19:27:36 | FromDiscord | <Gumbercules> You can provide a timeout for a synchronous request |
19:29:12 | FromDiscord | <System64 ~ Flandre Scarlet> Hi, do you know how I can name the terminal window please? |
19:29:17 | FromDiscord | <System64 ~ Flandre Scarlet> On Windows |
19:31:04 | FromDiscord | <Gumbercules> And asyncdispatch provides with timeout - but I don't think you can cancel a request / future |
19:31:51 | FromDiscord | <Gumbercules> https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowtexta |
19:32:34 | FromDiscord | <Gumbercules> I'm not sure what terminal you're referring to, but this is how you set the title of a window in the windows api |
19:34:10 | FromDiscord | <kfdvh> In reply to @System64 "On Windows": `SetTitle` in Windows API |
19:34:18 | FromDiscord | <kfdvh> (edit) "In reply to @System64 "On Windows": ... `SetTitle`" added "something like" |
19:38:43 | FromDiscord | <kfdvh> In reply to @Gumbercules "And asyncdispatch provides": thanks anyway |
19:41:18 | FromDiscord | <Gumbercules> In reply to @kfdvh "thanks anyway": Sorry to disappoint. If you're targeting the JS backend you could always wrap effection or whatever. |
19:42:32 | * | rmt quit (Ping timeout: 268 seconds) |
19:47:43 | FromDiscord | <jmgomez> there is an implementation of futures for js, did you check out https://github.com/juancarlospaco/nodejs @kfdvh ? |
20:45:26 | FromDiscord | <System64 ~ Flandre Scarlet> Btw, is there some data structures I must absolutely know? (beside of arrays/seq / objects, obviously) |
20:48:17 | FromDiscord | <firasuke> Am I using the correct data type? I have a sequence of strings being passed to a `proc`, I need to sort these strings into other data types (strings that begin with `s` for example in a separated data structure, and another one for those beginning with `t` and so on). What should I use to reduce the cost of copying sequences of strings over and over again? |
20:52:59 | FromDiscord | <Elegantbeef> Copying strings isnt that expensive assuming you're using arc/orc |
20:53:28 | FromDiscord | <Elegantbeef> If you can use move semantics moving a string is just copying two integers |
21:11:59 | FromDiscord | <firasuke> I see, thanks |
21:14:58 | * | mal``` quit (Quit: Leaving) |
21:16:31 | * | advesperacit quit (Ping timeout: 240 seconds) |
21:31:02 | * | mal`` joined #nim |
22:31:01 | FromDiscord | <kfdvh> In reply to @jmgomez "there is an implementation": not targeting nodejs |
22:31:18 | FromDiscord | <kfdvh> (edit) "nodejs" => "nodejs. JS can't cancel Promise" |
22:31:20 | FromDiscord | <kfdvh> (edit) "In reply to @jmgomez "there is an implementation": not targeting nodejs. JS can't cancel Promise ... " added "either" |
23:04:53 | FromDiscord | <jmgomez> In reply to @kfdvh "not targeting nodejs. JS": the lib isnt for NodeJS though. Just an unfortunate name, most modules should work on vainila js.↵If js promises cant be canceled, I suggest you to either polyfill them or bind the futures to something else |
23:06:48 | FromDiscord | <Odi> sent a long message, see http://ix.io/4ryX |
23:09:34 | FromDiscord | <Gumbercules> In reply to @Odi "Not a question, but": I mean, this is pretty obvious - most of us just have lives and shit to do. Be the change you want to see in the world, is my advice to you. |
23:11:59 | FromDiscord | <Odi> In reply to @Gumbercules "I mean, this is": I gladly can follow you up on this, bro. I allready got 300 videos up on youtube(in regards to training). But if you I have posted |
23:12:19 | * | derpydoo joined #nim |
23:12:19 | FromDiscord | <Odi> (edit) " I have posted" => "will follow me up on this, i can gladly try to contribute=)" |
23:14:52 | FromDiscord | <Gumbercules> In reply to @Odi "I gladly can follow": If I thought YouTube videos would solve Nims problems in terms of marketing and popularity, I would have already made some. Hanging around here for seven years has convinced me otherwise. @Kiloneie has made quite a few videos to my knowledge. They might be someone to follow up with regarding your idea. |
23:16:59 | FromDiscord | <Odi> In reply to @Gumbercules "If I thought YouTube": Valid point😊 can i ask you what you think will solve Nims problem in terms of marketing and polularity? Do you have any spesifics in mind or do you think there is just a to niche language?:) |
23:17:10 | FromDiscord | <Gumbercules> The best way to attract people to a PL is to build cool shit with it. That or having bags of money from corporate sponsors. |
23:17:28 | FromDiscord | <Gumbercules> Zig became popular because of tooling like zigcc |
23:17:35 | FromDiscord | <Gumbercules> Rust had mozilla |
23:17:58 | FromDiscord | <Elegantbeef> Go had google |
23:18:01 | FromDiscord | <Gumbercules> In reply to @Gumbercules "Zig became popular because": Well that and a dedicated paid marketing person who already had experience in that subject. |
23:22:14 | * | azimut quit (Ping timeout: 255 seconds) |
23:27:31 | FromDiscord | <jmgomez> Nim has NimForUE 😛 jk |
23:29:09 | FromDiscord | <jmgomez> Was checking Verse out which was "launched" today and it seems to be a cool lang but not sure if the paradigm shift will play nice with the status of things. Definitely people will embrace it for UE |
23:30:29 | FromDiscord | <jmgomez> The only thing I know so far it's that Nim "compiles" faster and it probable run faster too |
23:31:45 | FromDiscord | <kfdvh> In reply to @Odi "Valid point😊 can i": the standard library |
23:32:24 | FromDiscord | <kfdvh> (edit) "In reply to @Odi "Valid point😊 can i": ... thelibrary." added "better" | "library" => "library. e.g. (futurestreams / asynctools) async stuff is too fragmented" |
23:32:28 | FromDiscord | <Elegantbeef> The main issues with Nim are the tooling and compiler bugs |
23:32:45 | FromDiscord | <Elegantbeef> Bleh stdlib hardly matter when you have the ability to use packages |
23:33:06 | FromDiscord | <Elegantbeef> Nimph, Nimble, Atlas all exist and can be used for external packages |
23:33:36 | * | Notxor quit (Remote host closed the connection) |
23:34:34 | FromDiscord | <jmgomez> Yeah, definitely tooling. At this point compiler bugs arent that bad I think |
23:34:59 | FromDiscord | <Elegantbeef> Use static generic and you'll find one |
23:35:48 | FromDiscord | <Elegantbeef> Or even just normal generics |
23:35:55 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/issues/21558 |
23:35:57 | FromDiscord | <jmgomez> In reply to @Elegantbeef "Use static generic and": I mean, I opened a few around generics but to be fair most mainstream langs can do that |
23:36:04 | FromDiscord | <jmgomez> (edit) "can" => "cant" |
23:36:34 | FromDiscord | <jmgomez> The really really problematic that may turn people away are/were around gc |
23:37:19 | FromDiscord | <jmgomez> IMO at this point tooling it's the number one thing. Not saying those arent important but tooling really turns people away. I personally prefer no bugs |
23:37:55 | FromDiscord | <demotomohiro> In reply to @Odi "Not a question, but": I wrote Nim FAQ: https://internet-of-tomohiro.netlify.app/nim/faq.en.html |
23:42:26 | FromDiscord | <willyboar> In reply to @Gumbercules "Well that and a": I stand on this. Totally agree. Nim lacks a community manager with focus to marketing. Even small things matters. |