00:04:51 | FromDiscord | <dlesnoff> I have generated about 60 nimibs from the wiki's markdown, only got a few compilation errors, almost there. https://media.discordapp.net/attachments/371759389889003532/1037517675506712727/Firefox_Full_Of_Nimib.png |
00:07:33 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/pull/20738 fails on cpp backend , any help ? |
00:13:02 | FromDiscord | <dlesnoff> The error comes from weave, isn't it ? |
00:25:17 | * | derpydoo quit (Ping timeout: 276 seconds) |
00:47:40 | FromDiscord | <Elegantbeef> Yea the error comes from weave but the culprit is their code changes |
01:12:58 | * | alice quit (Read error: Software caused connection abort) |
01:15:55 | * | alice joined #nim |
01:30:15 | * | nyeaa492 joined #nim |
01:30:28 | * | nyeaa49 quit (Ping timeout: 248 seconds) |
01:45:10 | * | GreaseMonkey quit (Read error: Software caused connection abort) |
01:49:43 | * | greaser|q joined #nim |
01:53:03 | FromDiscord | <sOkam!> how do you convert a cstring to a string?↵is the lsp just trolling me, or is `var thing:cstring; thing.string` not enough? |
01:53:42 | FromDiscord | <sOkam!> its for a glfw error callback, that has a cstring as the prototype, in case that's important |
01:53:56 | FromDiscord | <sOkam!> (edit) "as" => "in" |
02:01:55 | FromDiscord | <Elegantbeef> `$myCstring` |
02:07:25 | * | LyndsySimon quit (Read error: Software caused connection abort) |
02:08:06 | * | nyeaa4928 joined #nim |
02:09:18 | FromDiscord | <sOkam!> ty |
02:10:30 | * | LyndsySimon joined #nim |
02:12:22 | * | nyeaa492 quit (Ping timeout: 272 seconds) |
02:28:15 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4eNw |
02:29:09 | FromDiscord | <ringabout> (edit) "https://play.nim-lang.org/#ix=4eNw" => "https://play.nim-lang.org/#ix=4eNx" |
02:30:13 | FromDiscord | <ringabout> A more simple case |
02:30:24 | FromDiscord | <ringabout> sent a code paste, see https://paste.rs/rmO |
02:44:21 | * | greaser|q quit (Changing host) |
02:44:21 | * | greaser|q joined #nim |
02:44:24 | * | greaser|q is now known as GreaseMonkey |
02:46:36 | FromDiscord | <Bung> does static obj work well before ? |
02:49:41 | FromDiscord | <ringabout> That's the problem. |
03:00:06 | * | genpaku quit (Read error: Connection reset by peer) |
03:00:47 | * | genpaku joined #nim |
03:31:56 | FromDiscord | <proton> `C:\Users\low\.nimble\pkgs\eth-1.0.0\eth\p2p\discoveryv5\routing_table.nim(485, 14) Error: undeclared identifier: 'shallowCopy'` |
03:40:54 | * | arkurious quit (Quit: Leaving) |
04:11:30 | * | nyeaa49284 joined #nim |
04:12:13 | * | nyeaa4928 quit (Ping timeout: 252 seconds) |
04:52:07 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
05:44:23 | FromDiscord | <ShalokShalom> In reply to @Jiezron "I wanted a zsh/bash": Such things go much easier im xonsh and fishshell |
05:48:02 | FromDiscord | <ShalokShalom> In reply to @Jiezron "I have generated about": I recommend you something like Grammarly or https://www.grammarcheck.net/editor/ |
05:54:06 | FromDiscord | <Rika> That’s not his writing |
06:45:49 | * | kenran joined #nim |
06:51:23 | FromDiscord | <dlesnoff> No but it's not a bad idea to do a spell check on the wiki files ... oh wait |
06:52:05 | FromDiscord | <dlesnoff> was there spelling errors in what I wrote in the chat ? |
06:52:29 | FromDiscord | <ChocolettePalette> Yes |
06:54:59 | FromDiscord | <dlesnoff> 😅 |
07:09:14 | madprops | made a demo of my firefox addon https://youtu.be/OQFbv9wAccI |
07:11:01 | FromDiscord | <dlesnoff> Can we revert the color of your addon back to the default color of firefox ? |
07:11:34 | madprops | sure |
07:11:53 | madprops | manually |
07:13:03 | FromDiscord | <dlesnoff> but not from the addon. |
07:16:11 | FromDiscord | <dlesnoff> In reply to @ShalokShalom "I recommend you something": This does not allow copy-paste for some reason. But I fixed myself my sentence :↵« I generated about 60 nimibs from the wiki's markdown. I had only a few compiler's issues. I am almost there.» |
07:17:46 | termer | @ElegantBeef What happened to your Raspberry Pi Pico examples repo on GitHub? I saw it linked on the Nim forum but it's gone now |
07:18:02 | termer | I'd also be curious to hear about your experiences working with Nim on a Pico board |
07:18:30 | FromDiscord | <Elegantbeef> https://github.com/EmbeddedNim/picostdlib it exists here now |
07:18:40 | FromDiscord | <Elegantbeef> It works is all i can really say, i'm not an embedded programmer |
07:18:42 | termer | there was another repo linked but maybe it was just this |
07:18:59 | * | kenran` joined #nim |
07:19:08 | termer | I'm about to work on building a kernel for it and I'm torn between C, Rust, and Nim so I was interested when I saw your nim lib |
07:21:08 | termer | in some ways Nim could be better suited for the job if using ARC GC and making heavy use of macros to write efficient code |
07:21:08 | termer | and being able to export C bindings |
07:21:08 | termer | but memory might be too magical |
07:21:08 | termer | I need to look at the generated C sources |
07:21:17 | * | kenran quit (Ping timeout: 276 seconds) |
07:24:21 | FromDiscord | <Elegantbeef> I cant say much in that regard aside from "It should work" 😛 |
07:28:00 | termer | I see |
07:33:25 | FromDiscord | <ShalokShalom> In reply to @Jiezron "This does not allow": Grammarly offers a browser extension, that's what I use |
07:33:35 | FromDiscord | <ShalokShalom> On Android, there is a keyboard |
07:34:12 | termer | is there any way to disable the nim stdlib altogether? |
07:34:33 | FromDiscord | <Elegantbeef> Just dont import it |
07:35:14 | termer | I'm not but it's being imported in part anyway |
07:35:44 | termer | stdlib_system.nim.c is being generated |
07:35:49 | FromDiscord | <Elegantbeef> I guess use patchfile then |
07:35:59 | termer | what's that |
07:36:03 | FromDiscord | <Elegantbeef> Well yea system is where all of nim builtin features are |
07:36:10 | FromDiscord | <Elegantbeef> you want data types dont you? 😄 |
07:36:32 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/nimscript.html#patchFile%2Cstring%2Cstring%2Cstring |
07:37:29 | termer | something tells me nim isn't suitable for low level development |
07:37:46 | FromDiscord | <Elegantbeef> It likely is, but meh |
07:38:30 | * | kenran` quit (Remote host closed the connection) |
07:38:46 | termer | I can't trust anything besides C to do what I tell it to |
07:39:05 | termer | what's the difference between a nim string and a c string anyway |
07:39:13 | termer | I see a type for nim string generated in the C sources |
07:39:15 | FromDiscord | <Elegantbeef> Nim's are pascal |
07:39:28 | * | kenran joined #nim |
07:39:33 | FromDiscord | <Elegantbeef> Nim is safer so uses sensible string types |
07:40:04 | termer | c string is just an array of chars which I think is better for many use-cases |
07:40:07 | termer | like buffers |
07:40:12 | termer | but that should probably be its own type |
07:40:23 | FromDiscord | <Elegantbeef> You'd be wrong |
07:40:30 | termer | in what way |
07:40:42 | termer | when I'm writing display buffer code, I want to only be allocating as much as I think I am |
07:40:43 | FromDiscord | <Elegantbeef> The amount of issues Cstrings cause is tangible |
07:41:18 | termer | I wouldn't know cause I only use C for microcontrollers and there I only use them as buffers basically |
07:41:18 | FromDiscord | <Elegantbeef> So then .... allocate buffers directly? |
07:41:33 | termer | usually I do allocate directly lol |
07:41:40 | FromDiscord | <Elegantbeef> There are so many issues due to null terminated strings |
07:42:04 | termer | well like I said, I use them more as char arrays than real strings lol |
07:42:05 | * | kenran` joined #nim |
07:42:07 | FromDiscord | <Elegantbeef> Like you can do `newStringOfCap(128)` and use a distinct type to disallow adding/growing |
07:42:22 | FromDiscord | <Elegantbeef> That's exactly where the issue arise though |
07:42:40 | termer | for fixed size, I try to use arrays in nim cause then I don't need to allocate nonsense dynamically |
07:42:41 | FromDiscord | <Elegantbeef> "There has to be a \\0 in this collection" often ends badly |
07:42:56 | termer | that figures |
07:43:06 | termer | I just wish I knew more of what was going on in nim world |
07:43:13 | termer | c world you more of less get what you write |
07:43:20 | termer | *more or less |
07:43:24 | FromDiscord | <Elegantbeef> I mean you do generally with Nim aswell |
07:43:44 | * | kenran quit (Ping timeout: 246 seconds) |
07:43:48 | termer | looking at this generated c source, it may as well be assembly with how little I understand what's happening |
07:44:20 | termer | but I'm just saying, a 2551 line file for the stdlib is a big overhead on a device with 2mb flash storage |
07:44:52 | termer | and god knows where my ram is gonna go |
07:45:42 | FromDiscord | <Elegantbeef> I'm going to pretend you didnt say that and carry on |
07:45:43 | * | tiorock joined #nim |
07:45:43 | * | tiorock quit (Changing host) |
07:45:43 | * | tiorock joined #nim |
07:45:43 | * | rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
07:45:43 | * | tiorock is now known as rockcavera |
07:46:07 | FromDiscord | <Elegantbeef> Using patchfile you can write your own allocator |
07:46:20 | * | jjido joined #nim |
07:46:23 | FromDiscord | <Elegantbeef> Like i dont get you points, though that's likely cause i've never done kernel development |
07:46:45 | FromDiscord | <Elegantbeef> a file with 2.5k lines doesnt mean anything assuming your compiler/linker does anything |
07:47:15 | Amun-Ra | you almost never use stdlib and gc != none when writing kernel anyway |
07:48:10 | FromDiscord | <Elegantbeef> Yea like you can write it using ARC for some types and use manual memory management elsewhere |
07:48:40 | FromDiscord | <Elegantbeef> You still have macros, and fine control, but also dont need to make your own sequence type for whatever reason you might need to test or for use |
07:48:49 | * | LyndsySimon quit (Ping timeout: 268 seconds) |
07:50:36 | FromDiscord | <ElementalX> sent a code paste, see https://play.nim-lang.org/#ix=4eOd |
07:50:47 | FromDiscord | <Elegantbeef> `i` is not mutable |
07:51:13 | FromDiscord | <ElementalX> so for the second case how is `inc i` valid |
07:51:18 | * | LyndsySimon joined #nim |
07:51:22 | FromDiscord | <Elegantbeef> You did `var i = 0` |
07:51:54 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eOe |
07:52:55 | FromDiscord | <ElementalX> I see, so it would be better if I use a while loop for this, not sure I I decrement the value, that is my code should reach 100 to 1 and stop not 1 to 100 |
07:53:16 | FromDiscord | <Elegantbeef> `for i in countDown(100, 1)` |
07:53:22 | Amun-Ra | if you need to modify i inside the loop use while; otherwise use iterators |
07:53:26 | FromDiscord | <Elegantbeef> While loops are used for different semantics |
07:54:40 | FromDiscord | <ElementalX> In reply to @Elegantbeef "`for i in countDown(100,": Thanks it worked, appreciate the help! |
08:04:16 | FromDiscord | <dlesnoff> @ElementalX that was not the purpose of the exercise |
08:09:43 | FromDiscord | <dlesnoff> You have to determine for each integer in 2..100, how much steps you need before getting 1, by computing the next term in the Collatz sequence repeatidly. |
08:11:15 | FromDiscord | <dlesnoff> You have only computed the second term for each initial values of the Collatz sequence. |
08:21:24 | FromDiscord | <ElementalX> sent a code paste, see https://play.nim-lang.org/#ix=4eOm |
08:22:25 | FromDiscord | <ElementalX> https://narimiran.github.io/nim-basics/#_exercises_2 oops my bad I pasted the link to exercise#3 😅 sorry @dlesnoff |
08:23:23 | * | vicecea quit (Remote host closed the connection) |
08:27:18 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
08:28:45 | FromDiscord | <dlesnoff> No problem. |
08:31:59 | * | qwr quit (Ping timeout: 268 seconds) |
08:32:12 | * | qwr joined #nim |
08:38:57 | FromDiscord | <Prestige> sent a long message, see http://ix.io/4eOr |
08:41:26 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/x11/blob/2093a4c01360cbb5dd33ab79fd4056e148b53ca1/x11/x11pragma.nim#L17 they seem to target the right lib |
08:42:50 | FromDiscord | <Prestige> I don't know how the system looks for the lib, maybe that location isn't included |
08:43:17 | FromDiscord | <Elegantbeef> `LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/` 😄 |
08:43:28 | * | jjido joined #nim |
08:43:34 | FromDiscord | <Elegantbeef> Debian generally just symlinks `lib` iirc to that or a similar one |
08:43:49 | FromDiscord | <Elegantbeef> No longer over there so I cannot tell you for certain |
08:44:02 | FromDiscord | <Prestige> I've never been on Debian so idk either |
08:45:02 | FromDiscord | <narimiran> Nim 1.6.10 RC is here: https://github.com/nim-lang/nightlies/releases/tag/2022-11-03-version-1-6-121602e88ffcb9bfefe62265aebe81692e9e8124 |
08:48:54 | FromDiscord | <dlesnoff> In reply to @Avahe "Anyone that's Linux/Debian savvy:": The path with x86 is the location for one of my ubuntu machine |
08:49:21 | NimEventer | New thread by miran: Nim 1.6.10 release candidate, see https://forum.nim-lang.org/t/9574 |
08:49:26 | FromDiscord | <Elegantbeef> Yea debian does some wacky things with default paths, ubuntu inherits that |
08:56:01 | * | rockcavera quit (Ping timeout: 252 seconds) |
08:56:20 | * | rockcavera joined #nim |
08:56:20 | * | rockcavera quit (Changing host) |
08:56:20 | * | rockcavera joined #nim |
08:57:54 | FromDiscord | <Prestige> I don't understand why it would cause a problem, unless building on a machine that uses a different path and executing it on a debian machine causes the lib to not be found |
08:58:12 | FromDiscord | <Prestige> But it should find it dynamically on start |
08:58:29 | FromDiscord | <Elegantbeef> It shouldnt |
08:58:35 | FromDiscord | <Elegantbeef> Using `LD_LIBRARY_PATH` should resolve it, but I dont see what causes it |
08:59:50 | * | alice quit (Quit: *disappears* U_U) |
09:00:12 | * | alice joined #nim |
09:01:47 | * | rockcavera quit (Ping timeout: 246 seconds) |
09:03:32 | * | rockcavera joined #nim |
09:03:33 | * | rockcavera quit (Changing host) |
09:03:33 | * | rockcavera joined #nim |
09:06:52 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
09:12:23 | FromDiscord | <Phil> sent a long message, see http://ix.io/4eOy |
09:13:57 | FromDiscord | <Phil> (edit) "http://ix.io/4eOy" => "http://ix.io/4eOz" |
09:14:49 | FromDiscord | <ringabout> Now part of datetime bugs is fixed https://github.com/nim-lang/Nim/pull/20741 |
09:15:11 | FromDiscord | <ringabout> (edit) "Now ... part" added "a" |
09:15:19 | FromDiscord | <Phil> Sweet, so I should try out my example again. Will do so after work |
09:17:24 | FromDiscord | <ringabout> No, just the private access to object construction works. It still reports the second errors. |
09:18:04 | FromDiscord | <Phil> Dangit! |
09:18:15 | FromDiscord | <Phil> However, awesome to see this progress being made! |
09:18:32 | FromDiscord | <Phil> Thank you very, very much for your contributions! |
09:18:33 | FromDiscord | <ringabout> (edit) "second" => "first" |
09:18:53 | FromDiscord | <ringabout> My pleasure |
09:20:21 | FromDiscord | <luteva> @Phil Thx a lot! Email is a Model that can have several properties. not just a string. So i have to use custom types then, right?? |
09:22:23 | FromDiscord | <luteva> i didn't "made a table", i thought that norm would generate it. just as in the norm tutorial: https://norm.nim.town/tutorial/tables.html |
09:24:45 | FromDiscord | <luteva> so the dbConn.createTables(newCustomer()) is exactly where it fails, when trying to use a sequence. seq[Email] in my case. |
09:24:54 | FromDiscord | <luteva> (edit) "dbConn.createTables(newCustomer())" => "dbConn.createTables(newUser())" |
09:26:44 | FromDiscord | <luteva> so well. gonna have a deep look into the customDatatypes. maybe this is already what i am searching for. thx a lot! |
09:28:06 | * | rockcavera quit (Ping timeout: 272 seconds) |
09:31:17 | * | jmdaemon quit (Ping timeout: 276 seconds) |
09:31:33 | FromDiscord | <nocturn9x> well |
09:31:35 | FromDiscord | <nocturn9x> guess what |
09:31:43 | FromDiscord | <nocturn9x> now the gc problem arises with `--gc:none` too |
09:31:52 | FromDiscord | <nocturn9x> I'm glad. Now at least I can rule out nim's mm strategy |
09:32:42 | * | rockcavera joined #nim |
09:32:42 | * | rockcavera quit (Changing host) |
09:32:42 | * | rockcavera joined #nim |
09:34:44 | FromDiscord | <nocturn9x> but if I debug my collector it goes away, hmm |
09:37:25 | FromDiscord | <nocturn9x> no, it's not that either |
09:37:34 | FromDiscord | <nocturn9x> could it be link time optimization? |
09:40:57 | FromDiscord | <nocturn9x> nope, here it goes, the issue appears when using the default gc rip |
09:41:03 | * | jjido joined #nim |
09:41:31 | FromDiscord | <nocturn9x> markAndSweep works, but probably because it actually never runs as not enough objects are allocated |
09:45:48 | FromDiscord | <nocturn9x> btw is it possible to compile different nim files with different flags? |
09:45:58 | FromDiscord | <nocturn9x> I'd like to compile my vm module with `--gc:none` |
09:46:01 | FromDiscord | <ShalokShalom> In reply to @termer "looking at this generated": The generated source is also not optimised for reading, but compiling. ↵↵The generated source of Nim is not meant to be read, so judging it by this merrit is questionable. |
09:46:26 | FromDiscord | <ShalokShalom> The written Nim code is imho more explicit as C, like typing related stuff, as an example |
09:48:20 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
11:11:18 | FromDiscord | <Phil> In reply to @luteva "so the dbConn.createTables(newUser()) is": One sec, my advice may be wrong in this case, so I understand correctly that you have 2 Models, User and Email and User is supposed to have a seq[Email] field? |
11:11:26 | FromDiscord | <Phil> So a user may have many email addesses? |
11:13:04 | FromDiscord | <Phil> In that case you'll need to handle this differently. That's a Many-To-One relationship and you can't quite do it this way. ↵You'll need to add a "User" field on your Email-Models.↵Then you can use the procs norm provides for querying many-to-one relationships, as is described here https://norm.nim.town/tutorial/rows.html↵(Look at the chapter `Selecting Many-To-One/One-To-Many relationships`) |
11:13:10 | FromDiscord | <Phil> (edit) "chapter" => "section" |
11:14:17 | * | vicecea joined #nim |
11:14:26 | FromDiscord | <Tanguy> So to be sure, `sink` has no effect with `refc`, but `lent` has? That's what I understood from various readings |
11:15:03 | FromDiscord | <Phil> However, @luteva , that is ONLY the case IF you want "Email" to be its own table.↵If you're fine with e.g. storing it as a JSON string in a field of your User table, you could solve this via a custom data-type |
11:15:33 | FromDiscord | <Phil> IIRC both Postgres and SQLITE support JSON in their tables |
11:15:56 | FromDiscord | <Phil> (edit) "tables" => "tables, should you want to do even deeper manipulations with fancy SQL (though that won't be absolutely necessary, only if you really need to get fancy)" |
11:19:45 | * | tiorock joined #nim |
11:19:46 | * | tiorock quit (Changing host) |
11:19:46 | * | tiorock joined #nim |
11:19:46 | * | rockcavera quit (Killed (copper.libera.chat (Nickname regained by services))) |
11:19:46 | * | tiorock is now known as rockcavera |
11:21:46 | FromDiscord | <Phil> sent a long message, see http://ix.io/4eP5 |
11:22:09 | FromDiscord | <luteva> ok, so. i want to query emailaddrresses by users. but as i understand, it has to go through email having a user as property, right? |
11:22:11 | FromDiscord | <Phil> (edit) "http://ix.io/4eP5" => "http://ix.io/4eP6" |
11:22:56 | FromDiscord | <Phil> Correct, I don't know how familiar you are with SQL, the word you'd be looking for is "Foreign Key", so that an entry in the "Email" table points to a specific entry on the "User" table |
11:23:15 | FromDiscord | <luteva> and, yes, email should be a model. |
11:23:44 | FromDiscord | <luteva> and a user can have many emails |
11:24:31 | FromDiscord | <Phil> Check, in that case you have 2 tables and a many-to-one relationship.↵In that case you must instantiate both tables separately and the User model can not have a seq[Email] field |
11:25:04 | FromDiscord | <luteva> so i want to have something like "select from email where email.user_id = ?" my_user.id |
11:25:13 | FromDiscord | <Phil> Norm does not handle representing Many-to-X relationships in Models very graciously |
11:25:19 | FromDiscord | <luteva> or something like this. |
11:25:20 | FromDiscord | <Phil> In reply to @luteva "so i want to": That one is possible |
11:25:54 | FromDiscord | <luteva> and ideally i only want to specify the model. just as it goes in the example. |
11:25:55 | FromDiscord | <Phil> You can do a query that gives you a seq[Email] where the Email contains also an instance of User or only the value of the foreign key |
11:26:50 | FromDiscord | <Phil> In reply to @luteva "so i want to": For that one see https://norm.nim.town/tutorial/rows.html , the section "Select in general" |
11:27:05 | FromDiscord | <Phil> It does in fact almost provide a 1:1 example for your problem ^^ |
11:27:21 | FromDiscord | <Phil> Well, not quite, a similar one, the email there is a string |
11:28:41 | FromDiscord | <Phil> Basically there's 2 ways you can query a one-to-many relationship:↵1) Use `selectOneToMany`↵2) Use `select` and pass it a `seq[Email]` |
11:29:18 | FromDiscord | <Phil> `selectOneToMany` is a helper proc to essentially simplify case number 2), as it actually uses that one under the hood but tries to take away some of the logic for you |
11:29:24 | FromDiscord | <luteva> ok, but in the end i probably have to write the sql (or part of it). there's no implicit mapping, right? |
11:30:01 | FromDiscord | <Phil> Correct, but that's the case with all of norm.↵You will always have to write WHERE clauses if you need any, as that's never abstracted away. |
11:30:15 | FromDiscord | <luteva> ok thx! |
11:30:36 | FromDiscord | <Phil> Actually there's also a 3rd way, write full up raw sql so you can do it all in one query and parse it into a custom datatype, see rawSQL section for that as specified earlier. |
11:30:57 | FromDiscord | <Phil> Though personally I'd only use that one if you go into fancy SQL syntax such as recursive queries |
11:53:16 | NimEventer | New post on r/nim by thindil: [Nim Blog] This Month with Nim: October 2022, see https://reddit.com/r/nim/comments/yl0m6b/nim_blog_this_month_with_nim_october_2022/ |
12:15:31 | * | neceve quit (Quit: ZNC - https://znc.in) |
12:19:41 | * | neceve joined #nim |
12:32:50 | * | wallabra quit (Ping timeout: 246 seconds) |
12:33:39 | * | wallabra joined #nim |
12:37:30 | * | kenran` quit (Remote host closed the connection) |
12:57:25 | * | derpydoo joined #nim |
13:28:41 | * | rockcavera quit (Remote host closed the connection) |
13:34:07 | * | kenran joined #nim |
13:39:12 | * | Jjp137 quit (*.net *.split) |
13:39:13 | * | mahlon quit (*.net *.split) |
13:49:10 | * | arkurious joined #nim |
14:00:06 | * | derpydoo quit (Ping timeout: 255 seconds) |
14:17:16 | * | mahlon joined #nim |
14:48:17 | * | wallabra quit (Ping timeout: 246 seconds) |
14:49:52 | * | wallabra joined #nim |
14:50:08 | * | Guest82 joined #nim |
14:50:22 | Guest82 | hih |
14:51:28 | * | Guest82 quit (Client Quit) |
14:56:09 | FromDiscord | <!&luke> https://youtu.be/WHyOHQ_GkNo↵Finally! |
14:56:55 | * | derpydoo joined #nim |
14:59:03 | NimEventer | New thread by Jaap: Youtube video Nim in 100 seconds from Fireship, see https://forum.nim-lang.org/t/9575 |
15:03:23 | FromDiscord | <spoon> love to see it |
15:07:44 | FromDiscord | <rlipsc> In reply to @sOkam! "tysm btw, beef. I": I did a video on Polymorph for NimConf that covers what ECS is and how it works if you're interested 🙂 https://www.youtube.com/watch?v=zCHZ0l7nLA0 |
15:12:57 | * | Guest9038 joined #nim |
15:13:49 | FromDiscord | <auxym> good talk btw @rlipsc , the demos were really cool 🙂 |
15:17:14 | * | hexeme joined #nim |
15:17:16 | * | hexeme_ quit (Ping timeout: 240 seconds) |
15:21:14 | FromDiscord | <hugogranstrom> In reply to @NimEventer "New thread by Jaap:": https://plausible.io/nim-lang.org?period=day The page visits seems to have peaked in the last hour. This video will certainly drive more traffic our way |
15:25:09 | * | derpydoo quit (Ping timeout: 268 seconds) |
15:27:43 | * | derpydoo joined #nim |
15:30:39 | * | Guest9038 quit (Quit: Client closed) |
15:40:21 | FromDiscord | <rlipsc> In reply to @auxym "good talk btw <@800432830605819906>": Thanks for the feedback! I'm considering doing more vids/articles on ECS in general and design patterns in Polymorph if anyone would be interested. |
15:41:21 | * | kenran quit (Remote host closed the connection) |
15:44:50 | FromDiscord | <4zv4l> does it mean that Nim's default gc will never stop the current program ? `Stop The World` is when the program is paused to collect the garbage right ? https://media.discordapp.net/attachments/371759389889003532/1037754232234840124/image.png |
15:45:10 | FromDiscord | <4zv4l> does it mean that even if its garbage collected Nim could be used to make pacemaker for example since it will never stop ? |
15:45:35 | FromDiscord | <Phil> ECS? Another concept I need to learn about.... Eventually! |
15:47:43 | FromDiscord | <Phil> I believe you might want our embedded folks for that one. Or yard, I haven't played around much with low level |
15:48:10 | FromDiscord | <Phil> (edit) "I believe you might want our embedded folks for that one. Or yard, I haven't played around much with low level ... " added "memory controls and the line" |
15:48:18 | FromDiscord | <Phil> (edit) "line" => "like" |
15:48:44 | FromDiscord | <jmgomez> In reply to @hugogranstrom.nim "https://plausible.io/nim-lang.org?period=day The pa": It's huge! Also the video is very well done, it should even be on the Nim main page (after the wave of visitors passes) |
15:49:34 | FromDiscord | <rlipsc> In reply to @Isofruit "ECS? Another concept I": The first 10m of my talk gives a quick intro on what ECS is and loosely compares it to OOP if you want an overview 🙂 |
15:50:00 | * | jjido joined #nim |
15:50:38 | FromDiscord | <Phil> Given that I just recently had my Heureka on how Oop solves problems differently than procedural that... God dangit you got me, time to find the link |
15:52:05 | * | Jjp137 joined #nim |
15:52:55 | * | arkurious quit (Ping timeout: 252 seconds) |
15:54:43 | * | jjido quit (Client Quit) |
15:57:50 | FromDiscord | <Tanguy> In reply to @4zv4l "does it mean that": "Stop the World" means the GC will pause every thread at the same time to collect memory↵Nim refc will only stop the current thread, and offers strict boundaries on the time it takes to run↵↵And arc will not stop the thread at all (orc will if you have cyclic memory) |
15:59:13 | NimEventer | New thread by scarf: Kotlin style scope macros?, see https://forum.nim-lang.org/t/9576 |
16:03:45 | FromDiscord | <rlipsc> In reply to @Isofruit "Given that I just": tl;dw: OOP lets you categorise `things` in a hierarchy (`X` is a `Y`). ECS lets you combine `attributes` to run behaviours (`X` has a `Y` and `Z` -> do `behaviourYZ`). |
16:03:49 | FromDiscord | <Phil> Now I'm wondering if you can forbid an entity to have certain components |
16:04:52 | FromDiscord | <Phil> Like if there's an entity you want to use for the player, them having an ai component would not make sense |
16:05:34 | FromDiscord | <rlipsc> In reply to @Isofruit "Now I'm wondering if": No, you can't. Entities are basically just bags of parameters. You can however write system logic that says `[Comp1, not Comp2]`. |
16:05:35 | FromDiscord | <Phil> So to prevent that, have certain schemas that define a set of components that make up a player |
16:05:43 | * | arkurious joined #nim |
16:06:41 | FromDiscord | <Phil> Though I think that might be my desire for static trying and "preventing mistakes I'll make" shining through |
16:06:42 | FromDiscord | <rlipsc> In reply to @Isofruit "Like if there's an": You can just not add an `AI` component to the player entity 🙂 |
16:07:02 | FromDiscord | <Phil> In reply to @rlipsc "You can just not": Totally fair! |
16:08:15 | FromDiscord | <Phil> Really good video so far btw. I think I'm getting the general gists and benefits |
16:08:48 | FromDiscord | <rlipsc> Instead of `AI`, add a `Controls` component that reads keyboard/mouse for the player. The nice thing about this is you can add `Controls` or `AI` to any entity without constraint. So you can say, let the player control a tree by adding the `Controls` component, and so on. |
16:13:39 | FromDiscord | <Phil> Ohhh basically changing the system an entity participates in at runtime? |
16:13:47 | FromDiscord | <rlipsc> Yup! 🙂 |
16:13:49 | FromDiscord | <Phil> Dang |
16:16:31 | FromDiscord | <rlipsc> For me, this is much more intuitive than describing "what" an object is. Instead you just write logic that takes parameters and combine them however you want. That way you don't need to worry about classifying `things` at all, only their `attributes`. |
16:18:50 | FromDiscord | <Rika> wait wtf that nim in 100 seconds video was way more than 100 seconds i want a refund |
16:20:01 | FromDiscord | <rlipsc> Especially important in games perhaps, where you start off with `Player`, `Zombie` and `Bird`, and do walking/flying physics. Then later on decide to add `Griffon` or something and you don't need to think about how to handle both walking and flying, you just add both attributes. |
16:20:58 | FromDiscord | <rlipsc> In reply to @Rika "wait wtf that nim": Maybe he couldn't fit all the goodness into only 100s! |
16:21:00 | FromDiscord | <Phil> Say you want to affect only zombies with something, do you just give them a zombie Tag like you gave a bounce tag? |
16:21:20 | FromDiscord | <Phil> And then affect all zombie components? |
16:21:34 | FromDiscord | <Phil> Or would you have an If zombie somewhere? |
16:23:02 | FromDiscord | <Phil> Ah, zombie entities, not components |
16:23:43 | FromDiscord | <rlipsc> sent a code paste, see https://paste.rs/osS |
16:23:52 | FromDiscord | <Phil> Check |
16:24:14 | FromDiscord | <rlipsc> Then you could add `Zombie` to player as a debuff 🙂 |
16:24:20 | FromDiscord | <Phil> How do you solve two systems wanting to affect the same data of the same entity in different ways? |
16:24:42 | NimEventer | New post on r/nim by jabbalaci: Nim in 100 Seconds, see https://reddit.com/r/nim/comments/yl753v/nim_in_100_seconds/ |
16:24:53 | FromDiscord | <Phil> Say the player walks somewhere and a collision system procs by him being hit with a boulder |
16:25:15 | FromDiscord | <Phil> Both the control and the collision system would try to update the same data |
16:32:07 | FromDiscord | <rlipsc> Systems are run in a fixed order - that's a key aspect of the pattern to describe behaviour, and make systems like a data pipeline of transformations. So for instance take the `Position` and `Velocity` components for your player. System order might be `readControls` (add to `Velocity`) -> `applyGravity` (add to `Velocity`) -> `calcCollisions` (correct `Velocity`/`Position`) -> `move` (add/integrate `Velocity` to `Position`). |
16:33:47 | FromDiscord | <rlipsc> So when your later systems are using `Position` and `Velocity`, they're already processed. You can update them further, and next tick they get corrected according to your collisions. |
16:34:05 | FromDiscord | <Phil> Does the framework arbitrarily decide that order? |
16:35:32 | FromDiscord | <rlipsc> No, the order is decided in two ways. 1) by the order systems are seen with `makeSystem` (or `defineSystem` for 'forward declarations'), and 2) by putting systems into groups with `defineGroup`. |
16:37:24 | FromDiscord | <rlipsc> sent a code paste, see https://play.nim-lang.org/#ix=4eQB |
16:37:49 | FromDiscord | <rlipsc> (edit) "https://play.nim-lang.org/#ix=4eQB" => "https://paste.rs/JkC" |
16:38:17 | FromDiscord | <rlipsc> Here's the manual section on system order: https://github.com/rlipsc/polymorph#system-execution-order |
16:40:04 | FromDiscord | <rlipsc> A nice consequence of this is that it can make debugging easier because there's no callbacks. Everything's just run from top to bottom. |
16:41:11 | * | rockcavera joined #nim |
16:41:11 | * | rockcavera quit (Changing host) |
16:41:12 | * | rockcavera joined #nim |
16:41:17 | FromDiscord | <Phil> What parts would be parallelized? Computing actions on the individual entities? |
16:41:29 | FromDiscord | <rlipsc> It also means you don't have to manually write any dispatch code. System logic only runs when it's parameters are present, so you get inversion of control. |
16:41:45 | FromDiscord | <Phil> Like have s thread pool per system and they chunk through entities in parallel? |
16:41:58 | FromDiscord | <Phil> (edit) "s" => "a" |
16:46:39 | * | Guest77 joined #nim |
16:46:39 | Guest77 | Hey guys |
16:46:47 | FromDiscord | <Phil> Heya |
16:46:53 | Guest77 | how is it going? |
16:47:04 | Guest77 | Just found out about nim |
16:47:06 | Guest77 | looks nice |
16:47:25 | FromDiscord | <rlipsc> sent a long message, see http://ix.io/4eQF |
16:48:10 | Guest77 | this link looks suspicious |
16:48:28 | * | Guest77 quit (Client Quit) |
16:50:21 | FromDiscord | <Phil> In reply to @rlipsc "In an ideal scenario": Ohhhhh that's why you group systems! That is Hella cool! |
16:50:21 | FromDiscord | <Phil> In reply to @Guest77 "this link looks suspicious": Link? |
16:50:22 | FromDiscord | <Phil> So that's how you intend the final boss of shared mutable data |
16:50:26 | FromDiscord | <planetis> Irc bridge pits long text in a paste |
16:50:36 | FromDiscord | <planetis> puts |
16:50:41 | FromDiscord | <Phil> Which essentially allows entirely different systems to modify the same entity at the same time but on different components of it |
16:51:00 | FromDiscord | <Phil> (edit) "So that's how you intend ... the" added "to beat" |
16:51:25 | FromDiscord | <rlipsc> In reply to @Isofruit "Which essentially allows entirely": Yep, exactly! 😄 |
16:51:36 | FromDiscord | <Phil> I can confirm that no link was posted in the last 5 minutes |
16:51:43 | FromDiscord | <Phil> On discord at least |
16:55:52 | FromDiscord | <rlipsc> sent a code paste, see https://play.nim-lang.org/#ix=4eQM |
16:56:20 | FromDiscord | <Phil> I kinda love the underlying simplicity of the overall pattern |
16:56:27 | FromDiscord | <rlipsc> me too 🙂 |
16:56:38 | FromDiscord | <Phil> Literally just a bunch of lists with pointers to objects |
16:56:50 | FromDiscord | <Phil> Well, not objects... Data boxes |
16:57:05 | FromDiscord | <Phil> And then you attach procs to those lists |
16:57:13 | * | dnh joined #nim |
16:57:23 | FromDiscord | <Phil> And dynamically add remove from them at runtime |
16:58:52 | FromDiscord | <rlipsc> Yeah! And as it boils down to just `proc` of processing `list[i]` it runs pretty fast! |
17:01:42 | FromDiscord | <Phil> It's kinda like Conway's game of Life if you think about it |
17:01:51 | FromDiscord | <Phil> Really simple basic rules |
17:02:05 | FromDiscord | <Phil> But the complexity that arises from their interaction is insane |
17:02:14 | FromDiscord | <Phil> Literally infinite |
17:03:19 | FromDiscord | <rlipsc> Another characteristic of the design is that systems are a window into component arena storage, so data locality is independent for each system. This makes it a lot easier to structure your design to run fast by splitting work into different components. |
17:05:10 | FromDiscord | <Phil> And just to make sure for my understanding, in your ECS you achieve polymorphism basically via tag components, correct? |
17:08:05 | FromDiscord | <rlipsc> sent a long message, see http://ix.io/4eQO |
17:09:14 | FromDiscord | <Phil> I think I would be hesitant to apply it to stuff that focuses on correctness such as payment systems as I would want to see the entire logic flow in its totality at any time |
17:09:47 | FromDiscord | <Phil> And with ECS I don't think I could easily predict the outcome of the totality of behaviour I define |
17:09:53 | FromDiscord | <auxym> In reply to @4zv4l "does it mean that": yes, exactly. ARC is particularly well suited for real-time systems, since its fully deterministic. all allocations and free's are determined at compile-time and can be inspected, etc. |
17:12:13 | FromDiscord | <4zv4l> but it leaks if there are cycles right ? |
17:12:28 | FromDiscord | <auxym> yes |
17:12:33 | FromDiscord | <4zv4l> do you have any example of a cycle ? because I really don't see a situation when it can happen |
17:12:33 | FromDiscord | <Phil> Correct, it requires you manually take care of those |
17:12:51 | FromDiscord | <rlipsc> ...and then I could write a `LogFile` component to summarise `TcpRecv` and log in a file of my choosing, add `GridMap` for spatial mapping to these network display entities, then let a user click on the connections and add `LogFile` arbitrarily at run time. |
17:12:53 | FromDiscord | <4zv4l> and so with nim I could just use a `free` function to take care of it ? |
17:13:07 | FromDiscord | <Phil> In reply to @4zv4l "do you have any": Doubly linked lists |
17:13:44 | FromDiscord | <auxym> its rare in embedded/RT systems to need cyclical structures though. You could use manual MM (`ptr, alloc, dealloc`) as a workaround, or the `{.cursor}` pragma (carefully) |
17:13:55 | FromDiscord | <4zv4l> In reply to @Isofruit "Doubly linked lists": that's the one who has link with the next and the previous node right ? |
17:14:20 | FromDiscord | <4zv4l> In reply to @auxym "its rare in embedded/RT": what does the `cursor` pragma ? |
17:14:21 | FromDiscord | <auxym> a cycle is eg. any graph or linked list with a cycle |
17:14:38 | FromDiscord | <auxym> https://nim-lang.org/docs/destructors.html#the-dotcursor-annotation |
17:14:59 | FromDiscord | <rlipsc> In reply to @Isofruit "And just to make": Entities are by nature polymorphic as they're fully abstract and can contain any components. Components can represent multiple design patterns within an ECS. Tags can be 'events', or things to separate processing, or anything you want 🙂 |
17:16:28 | FromDiscord | <rlipsc> In reply to @Isofruit "And with ECS I": Can you expand on that, I consider ECS a pretty transparent design as logic runs in a fixed order. |
17:16:30 | FromDiscord | <Phil> In reply to @4zv4l "that's the one who": Aye |
17:16:35 | FromDiscord | <4zv4l> > With the .cursor annotation one can break up cycles declaratively↵even with that notation, how can arc knows if it can free it ? |
17:16:42 | FromDiscord | <rlipsc> (edit) "that," => "that?" |
17:17:33 | FromDiscord | <auxym> that's above my paygrade 😄 I don't know enough about ARC internals (or even GC in general) |
17:20:23 | FromDiscord | <rlipsc> In reply to @Isofruit "I think I would": I've actually been interested in trying the pattern for finance type stuff but couldn't think of a good project. Anything that comes to mind? |
17:21:31 | FromDiscord | <Phil> sent a long message, see http://ix.io/4eQR |
17:22:18 | FromDiscord | <Phil> (edit) "http://ix.io/4eQR" => "http://ix.io/4eQS" |
17:22:37 | FromDiscord | <Phil> Finding rule contradictions like that is the nightmare of the current payment system I work in |
17:25:25 | FromDiscord | <auxym> you might also be interested in pararules, in that same line of thought: https://github.com/paranim/pararules zach has a talk about from last year IIRC |
17:25:32 | FromDiscord | <Phil> In reply to @rlipsc "I've actually been interested": A fundamental finance systems is have products, you need to be able to pay them up front and in rates, you need to have immutable data somewhere so that in case of a data issue elsewhere you can rebuild your data from that immutable data storage. ( We use event sourcing for that one) |
17:28:25 | FromDiscord | <Phil> sent a long message, see http://ix.io/4eQT |
17:29:02 | FromDiscord | <Phil> You also need to be able to just turn renewal of and on arbitrarily while still in the timeframe of the initial product |
17:29:31 | FromDiscord | <Phil> After sports I'll try to recall some more of the more basic business logic |
17:32:47 | * | derpydoo quit (Ping timeout: 246 seconds) |
17:34:33 | FromDiscord | <rlipsc> Okay that's a nice spec to try the pattern against. It would be cool to have something like that in a data oriented style. |
17:34:36 | FromDiscord | <Phil> Ah! You need to be able to fetch lists of users that have a given product, users that are currently overdue on a single rate (if rate payment) or an entire product (if your trying to pay for an entire product at once), people you have forwarded to debt collectors, people that were overdue but have paid now, people that need their product renewal'd and some more I can't think of.↵You need to connect to banking systems via http calls to uplo |
17:35:38 | FromDiscord | <rlipsc> Using HTTP is already a component btw: https://github.com/rlipsc/polymers/blob/master/polymers/demos/web/simplewebsite.nim |
17:36:02 | FromDiscord | <Phil> Also some products have a timeframe (memberships) others don't ( e.g. purchases to boost your findability to other members on your service) |
17:36:12 | FromDiscord | <Phil> Nice! |
17:36:26 | FromDiscord | <rlipsc> sent a code paste, see https://play.nim-lang.org/#ix=4eQY |
17:37:23 | FromDiscord | <rlipsc> an entity in this context represents a TCP channel. |
17:37:38 | * | rockcavera quit (Remote host closed the connection) |
17:38:40 | FromDiscord | <Phil> Already have a component for interacting with messaging systems for e.g. Microservice interaction? |
17:39:00 | FromDiscord | <rlipsc> That website example does immediate dispatch BTW, so responses are sent as soon as they're received. For what you're talking about, I would queue HTTP responses in a system (instead of using `added:` events). |
17:40:01 | FromDiscord | <rlipsc> In reply to @Isofruit "Already have a component": There is a JSON RPC component: https://github.com/rlipsc/polymers/blob/master/polymers/demos/web/jsonrpc_ecsinfo.nim |
17:40:25 | FromDiscord | <rlipsc> I have considered something more specific though, like protobuf or something |
17:40:49 | FromDiscord | <rlipsc> of which Nim has a few libraries for 🙂 |
17:44:01 | FromDiscord | <rlipsc> There's also ODBC database components so that might help. Here's a console database browser ECS using them https://github.com/rlipsc/polymers/blob/master/polymers/db/ecs_db.nim |
17:44:57 | FromDiscord | <rlipsc> (edit) "There's also ODBC database components ... sohttps://github.com/rlipsc/polymers/blob/master/polymers/demos/dbbrowser.nim" added "(https://github.com/rlipsc/polymers/blob/master/polymers/db/ecs_db.nim)" | "https://github.com/rlipsc/polymers/blob/master/polymers/db/ecs_db.nim" => "https://github.com/rlipsc/polymers/blob/master/polymers/demos/dbbrowser.nim" |
17:46:02 | FromDiscord | <planetis> In reply to @4zv4l "> With the .cursor": It's an escape hatch in order not to create cycles. It's equivalent to ptr and doesn't free. |
17:48:52 | FromDiscord | <ShalokShalom> https://youtu.be/WHyOHQ_GkNo |
17:49:09 | FromDiscord | <ShalokShalom> 100 seconds of Nim |
17:49:22 | FromDiscord | <Phil> You're like 3 hours late 😄 |
17:50:10 | FromDiscord | <Tai> i came from that video |
17:50:48 | FromDiscord | <Tai> This programming language looks very interesting |
17:50:57 | FromDiscord | <ba5u> In reply to @ShalokShalom "100 seconds of Nim": same here |
17:51:04 | FromDiscord | <ShalokShalom> Hihi |
17:51:23 | FromDiscord | <auxym> Cool, already lots of people curious about Nim 🙂 |
17:51:29 | FromDiscord | <ShalokShalom> @Tai Yeah, it is. Cyo, its community spin is even more interesting, IMHO |
17:51:40 | FromDiscord | <ShalokShalom> @auxym Yeah, Firebase has a huge community |
17:52:52 | FromDiscord | <ShalokShalom> And its content is pretty good, I think. |
17:52:58 | FromDiscord | <Tai> I want to try nim to make Discord bots |
17:53:18 | FromDiscord | <Tai> I usually use typescript but I want to try something new |
17:53:19 | FromDiscord | <jmgomez> Nimble is down? |
17:53:38 | FromDiscord | <jmgomez> What a bad timing, may it be to increase number of users? |
17:53:40 | FromDiscord | <jmgomez> https://nimble.directory/ |
17:53:45 | FromDiscord | <ShalokShalom> In reply to @Tai "I want to try": There are actually a couple libraries to assist you |
17:53:46 | FromDiscord | <jmgomez> (edit) "increase" => "increased" |
17:53:47 | FromDiscord | <Phil> Hmmm appears so |
17:54:11 | FromDiscord | <jmgomez> seems to be back now! |
17:54:35 | FromDiscord | <Tai> In reply to @ShalokShalom "There are actually a": Any recommended? |
17:54:45 | FromDiscord | <ShalokShalom> @Tai that the good one↵↵https://github.com/krisppurg/dimscord |
17:55:12 | FromDiscord | <ShalokShalom> (edit) "@Tai that ... the" added "is" |
17:55:59 | FromDiscord | <Arathanis> Might be a repost, but it finally happened: https://www.youtube.com/watch?v=WHyOHQ_GkNo |
17:56:04 | FromDiscord | <Tai> Thx, I will go to learn |
17:56:08 | FromDiscord | <Arathanis> been waiting for them to do a Nim vid |
17:59:26 | FromDiscord | <Phil> In reply to @jmgomez "seems to be back": Still down for me |
18:00:09 | FromDiscord | <Phil> <@&371760044473319454> err... I know this isn't about moderation but nimble.directory appears to be down?↵Sends out http 502 responses |
18:00:59 | FromDiscord | <jmgomez> In reply to @Isofruit "Still down for me": yes, is back again for me too.. that's probably it that the server cant catch up. Im afraid that people will get frustrated and abandon the tries out |
18:01:06 | FromDiscord | <jmgomez> (edit) "back again" => "downagain" |
18:03:05 | FromDiscord | <EyeCon> FYI nimble.directory is down https://media.discordapp.net/attachments/371759389889003532/1037789022229106828/image.png |
18:03:58 | FromDiscord | <EyeCon> In reply to @Isofruit "<@&371760044473319454> err... I know": I can't read apparently, sorry for the duplicate |
18:04:01 | FromDiscord | <4zv4l> that's amazing how a simple video can have that much influence |
18:04:28 | * | phytolizer joined #nim |
18:05:22 | phytolizer | hi, i came to ask a question about some annoying Nimble behavior. when a test fails, it dumps the .exe file of the test right inside the tests/ directory. Is there a way to customize that, e.g. move it to the bin/ folder or something else i can readily add to gitignore? |
18:05:43 | FromDiscord | <Rika> doesnt .exe work? |
18:05:46 | phytolizer | (yes, i can ignore *.exe, but i'd rather not see them mixed with my tests) |
18:06:09 | FromDiscord | <Rika> not sure then |
18:06:36 | phytolizer | it has binDir which moves the binary out of the root dir, i was hoping there'd be something similar for test exes but i haven't been able to find it |
18:06:59 | phytolizer | i suppose i could just define my own test task :/ |
18:08:05 | FromDiscord | <auxym> or PR nimble 🙂 |
18:09:01 | phytolizer | true, i could do that. would have to wait till i get off work though;) |
18:09:49 | FromDiscord | <planetis> Are you ok posting a link to something already made? |
18:09:52 | * | arkurious quit (Ping timeout: 252 seconds) |
18:10:17 | phytolizer | me? |
18:10:19 | FromDiscord | <planetis> Here https://github.com/status-im/nim-drchaos/blob/master/drchaos.nimble#L12 |
18:11:02 | phytolizer | oh this looks handy. thanks, i'll try and adapt it |
18:14:36 | * | jjido joined #nim |
18:18:00 | FromDiscord | <jmgomez> Is someone doing something about nimble? |
18:22:38 | * | arkurious joined #nim |
18:29:51 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
18:37:16 | FromDiscord | <EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=4eRc |
18:37:47 | FromDiscord | <EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=4eRd |
18:37:57 | FromDiscord | <EyeCon> This used to work at some point, I have the executable from then |
18:38:02 | FromDiscord | <EyeCon> What can I do to resolve this? |
18:38:22 | FromDiscord | <EyeCon> I thought the noconv pragma on `do` resolves this, and I remember this working |
18:39:50 | FromDiscord | <EyeCon> I tried to test on devel but then it chokes on jsony because of the effects |
18:40:59 | FromDiscord | <ShalokShalom> In reply to @Arathanis "been waiting for them": They did a Godot vid just recently |
18:41:24 | FromDiscord | <4zv4l> is there any `crypto` lib in the stdlib ? |
18:41:51 | FromDiscord | <Tai> any formatter? |
18:43:50 | FromDiscord | <4zv4l> In reply to @Tai "any formatter?": what do you need ? |
18:44:12 | FromDiscord | <Tai> Format code on save |
18:44:37 | FromDiscord | <4zv4l> I didn't really look for that↵but vim can format it for you |
18:44:49 | FromDiscord | <Tai> i use vscode |
18:45:23 | FromDiscord | <4zv4l> you want it to format the spaces/tabs right ? |
18:46:00 | FromDiscord | <4zv4l> I think as far as you setup your preference in vscode (using spaces instead of tab, size of tab)↵you have a command or a shortcut to format the file |
18:46:55 | FromDiscord | <exelotl> the formatter is called nimpretty, I'd be surprised if the nimsaem github extension couldn't utilise it |
18:47:04 | FromDiscord | <exelotl> (edit) "github" => "vscode" |
18:47:26 | phytolizer | i believe nimsaem does use nimpretty, it at least does something when i press format |
18:48:48 | FromDiscord | <exelotl> In reply to @4zv4l "is there any `crypto`": I don't think there's anything in the stdlib, but https://github.com/cheatfate/nimcrypto is good I think |
18:49:14 | * | rockcavera joined #nim |
18:49:15 | * | rockcavera quit (Changing host) |
18:49:15 | * | rockcavera joined #nim |
18:50:19 | FromDiscord | <4zv4l> In reply to @exelotl "I don't think there's": I'm taking a look at it but the doc seems...weird |
18:50:53 | FromDiscord | <4zv4l> the comments of the proc here https://media.discordapp.net/attachments/371759389889003532/1037801052398952518/image.png |
18:51:36 | FromDiscord | <Phil> I'd generally rather recommend directly making use of hashing packages such as openssl or using libsodium bindings |
18:51:58 | FromDiscord | <4zv4l> from C ? |
18:52:07 | FromDiscord | <Phil> It's hard to beat the speed of their implementations |
18:52:08 | FromDiscord | <Phil> Aye |
18:52:19 | FromDiscord | <4zv4l> would be nice to make wrapper around them tho |
18:52:36 | FromDiscord | <4zv4l> same goes for libpcap that I wish I can use easily with a wrapper |
18:53:01 | FromDiscord | <Phil> I use like one specific hashing proc from openssl to imitate how Django hashes passwords by default |
18:53:21 | FromDiscord | <4zv4l> well I was looking for an asymmetric encryption solution in Nim |
18:54:02 | FromDiscord | <Phil> At that point I'm out, I know very little in general about crypto and that one proc was already difficult for me as I'm not a massive fan of c |
18:54:04 | FromDiscord | <4zv4l> `nacl` one specifically |
18:54:37 | FromDiscord | <dlesnoff> In reply to @4zv4l "`nacl` one specifically": There is no full crypto solution in Nim |
18:54:46 | FromDiscord | <Pietro Peterlongo> Let me ping federico3 form matrix\: nimble directory is down!↵(@jmgomez) |
18:54:48 | FromDiscord | <dlesnoff> In reply to @4zv4l "`nacl` one specifically": nacl is libsodium I think |
18:55:08 | FromDiscord | <Phil> Maybe https://github.com/zielmicha/libsodium.nim ? |
18:55:28 | FromDiscord | <Phil> In reply to @Pietro Peterlongo "Let me ping federico3": It is on again |
18:55:34 | FromDiscord | <Phil> At least for be |
18:55:52 | FromDiscord | <Phil> Me |
18:55:52 | FromDiscord | <dlesnoff> wait no it isn't the same thing as libsodium https://github.com/aschoepe/nacl |
18:55:59 | FromDiscord | <4zv4l> In reply to @Isofruit "Maybe https://github.com/zielmicha/libsodium.nim ?": indeed, looks quite old but there are SecretBoxes at least |
18:56:32 | FromDiscord | <Phil> I'm beginning to think all the crypto people are super salty given these package names |
18:57:02 | FromDiscord | <4zv4l> lmao xD nice joke |
18:58:16 | FromDiscord | <Phil> If that doesn't suit you, there are a couple packages that can be found in nimble.directory when searching for crypto |
18:59:31 | FromDiscord | <Phil> The only one I ever used was nimcrypto and for the password hashing solution I had it was like half as fast or even slower than the openssl equivalent |
19:00:04 | FromDiscord | <Phil> Which is why for my Webapplication I eventually dropped it |
19:00:14 | FromDiscord | <rlipsc> Check out https://github.com/status-im/ for crypto (both cryptocurrency and encryption) related stuff. |
19:01:16 | FromDiscord | <Phil> Status is actually a fairly big player in the Nim ecosystem in general. The projects that spawned from their team are pretty solid |
19:01:32 | FromDiscord | <4zv4l> well that was more to check crypto libs in Nim↵my program for now is made in Zig, and I was just wondering how it would look in Nim, probably shorter and cleaner |
19:02:03 | FromDiscord | <4zv4l> I was a huge fan of Go before and I try to move my project from Go to Nim |
19:02:21 | FromDiscord | <Phil> Fascinatingly not too long ago I had to write docs on how to use the zig compiler to compile Nim projects |
19:02:43 | FromDiscord | <4zv4l> Zig is really amazing too↵I love those two languages |
19:03:09 | FromDiscord | <Phil> Mostly to allow you to compile against glibc versions of ancient Ubuntu versions while you're on arch and too lazy to set up a container just for compiling |
19:03:37 | FromDiscord | <4zv4l> what is more annoying is that from the 3 languages I chose to keep↵only Ruby has a decent packets capture lib↵which is nice but if I want to make an IDS or something I don't want to start using FFI or interop with C code |
19:03:37 | FromDiscord | <Phil> Which means I wrote docs for the target group of me and myself, I'll be honest |
19:04:16 | * | wallabra_ joined #nim |
19:05:01 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4eRl |
19:06:10 | FromDiscord | <4zv4l> since Nim can easily interop with C the questions is always, do I wrap a lib or make it from scratch ?↵because I have two libs in mind that saved me when I wanted to share my program `nim-regex` (which doesn't require the extra dll) and an http one to avoid packing the `ssl` dll too |
19:06:28 | * | wallabra quit (Ping timeout: 248 seconds) |
19:06:28 | * | wallabra_ is now known as wallabra |
19:07:59 | * | phytolizer quit (Quit: Client closed) |
19:08:34 | FromDiscord | <Phil> The answer IMO should almost always be to wrap |
19:09:20 | FromDiscord | <Phil> At least if it's highly complicated stuff like cryptography and hashing |
19:11:13 | FromDiscord | <4zv4l> yes right I agree↵to avoid making errors or making it slower |
19:12:02 | FromDiscord | <pietroppeter> In reply to @Isofruit "It is on again": Huh, for me still off |
19:12:55 | FromDiscord | <dlesnoff> In reply to @Isofruit "The answer IMO should": security errors could happen in library wrapping too, but I agree it seems safer. |
19:14:59 | FromDiscord | <Phil> In reply to @pietroppeter "Huh, for me still": Ah, now off again for me to, not sure what is bringing it down to its knees |
19:15:16 | FromDiscord | <System64 ~ Flandre Scarlet> https://www.youtube.com/watch?v=WHyOHQ_GkNo↵He made a video about Nim |
19:15:37 | FromDiscord | <Phil> Yeh we aware 😄 |
19:15:51 | FromDiscord | <System64 ~ Flandre Scarlet> wait, why aren't videos rendered? |
19:16:06 | FromDiscord | <dlesnoff> we even posted it on the forum and on reddit |
19:16:12 | FromDiscord | <Phil> It and images are generally blocked from rendering |
19:16:20 | FromDiscord | <System64 ~ Flandre Scarlet> Oh, sorry |
19:16:24 | FromDiscord | <Phil> Unless you upload the images yourself |
19:16:48 | FromDiscord | <System64 ~ Flandre Scarlet> This is weird |
19:32:29 | FromDiscord | <ShalokShalom> sent a code paste, see https://play.nim-lang.org/#ix=4eRr |
19:43:05 | FromDiscord | <ShalokShalom> https://github.com/jmgomez/NimForUE#why-nim |
19:43:17 | FromDiscord | <ShalokShalom> Thats a real nice description of Nim. |
19:43:26 | FromDiscord | <ShalokShalom> Hyper hyper 😅👍🏻 |
19:44:57 | termer | that repo looks awesome |
19:47:58 | FromDiscord | <planetis> Btw did you noticed something missing from the fireship video comments? |
19:48:28 | FromDiscord | <Phil> ~~Complaints about style insensitivity were missing~~ |
19:48:58 | FromDiscord | <planetis> yep |
19:48:58 | FromDiscord | <dlesnoff> But he did not mention it as a feature of the language at all |
19:49:31 | * | jjido joined #nim |
19:50:32 | FromDiscord | <dlesnoff> (edit) "But he" => "He" | "Hedid not mention it as a feature of the language at all ... " added "in his video" |
19:58:00 | FromDiscord | <rlipsc> In reply to @ShalokShalom "Thats a real nice": Here's my 'why Nim' 😄 https://github.com/rlipsc/polymorph#why-nim |
20:04:43 | FromDiscord | <ygol55> In reply to @rlipsc "Here's my 'why Nim'": wait wait, why nim? |
20:05:52 | FromDiscord | <guttural666> any more concise way to check if an int is part of an enum? nimlsp has forsaken me 😛 https://media.discordapp.net/attachments/371759389889003532/1037819923629609040/image.png |
20:06:37 | FromDiscord | <guttural666> looking for something like .contains() or in |
20:06:47 | FromDiscord | <rlipsc> > Fully control the memory if you so desire (including move semantics).↵That's one my favorite parts of the language design. The defaults are made for both productivity and speed, and full control when you want. |
20:07:31 | FromDiscord | <rlipsc> In reply to @ygol55 "wait wait, why nim?": As in, why I chose Nim to make the library 🙂 |
20:09:05 | FromDiscord | <exelotl> In reply to @guttural666 "any more concise way": `i in ord(func_id.low)..ord(func_id.high)` right? |
20:09:24 | FromDiscord | <jmgomez> In reply to @ShalokShalom "https://github.com/jmgomez/NimForUE#why-nim": haha thanks |
20:10:18 | FromDiscord | <jmgomez> In reply to @rlipsc "Here's my 'why Nim'": love this one too. I will grab a few ideas from there 😄 |
20:10:21 | FromDiscord | <guttural666> I'm kind of missing the dedicated page in the documentation where all available procs for type enum etc. are just listed, think I said this before, the docs are very extensive and well done but painful to search nativelyon the site |
20:10:50 | FromDiscord | <guttural666> In reply to @exelotl "`i in ord(func_id.low)..ord(func_id.high)` ": not really that more concise or expressive, but will try that out, thanks! |
20:11:18 | FromDiscord | <ShalokShalom> In reply to @rlipsc "Here's my 'why Nim'": Thanks! |
20:11:50 | FromDiscord | <Phil> Hmmm how do you get a ref of a value object? |
20:11:58 | * | phytolizer joined #nim |
20:12:13 | FromDiscord | <Phil> In reply to @ShalokShalom "Thanks!": You seen his talk about polymorph yet? It's pretty good and well explaining (well, it was to me) |
20:13:46 | FromDiscord | <ShalokShalom> @rlipsc can I use this just in any game engine? |
20:13:47 | FromDiscord | <ShalokShalom> Or do I need to implement that |
20:13:57 | FromDiscord | <ShalokShalom> In reply to @Isofruit "You seen his talk": No, not yet? |
20:14:04 | FromDiscord | <ShalokShalom> From the NimConf2022?/ |
20:14:27 | FromDiscord | <Phil> In reply to @ShalokShalom "No, not yet?": https://www.youtube.com/watch?v=zCHZ0l7nLA0 |
20:14:30 | FromDiscord | <Phil> Aye |
20:14:33 | FromDiscord | <jmgomez> In reply to @Isofruit "Hmmm how do you": doesnt a ptr work? |
20:16:13 | FromDiscord | <guttural666> just checked out YAML for Nim the other day, my god is serialization dead simple, makes C++ look fucking stupid, listing class members like a pleb for de/serialization 😄 |
20:17:34 | FromDiscord | <Phil> On the last line |
20:17:36 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4eRC |
20:17:58 | FromDiscord | <Phil> Ignore the comments, I basically simplified the example from nim's manual for circular types |
20:18:17 | FromDiscord | <jmgomez> oh I mean for you to use a ptr instead of a ref, you go from value to ptr by using addrs/unsafeAddrs |
20:19:05 | FromDiscord | <Phil> But why not refs though for that sweet sweet reference counting? ^^ |
20:19:17 | FromDiscord | <Phil> Does compile with ptr |
20:19:30 | phytolizer | @guttural666 that's what happens when you use a language with reflection and good macros ^_^ |
20:19:46 | FromDiscord | <jmgomez> yeah, I dont know about that. If there is a hook for the GC to collect a type but you can use new if the type is not an instance |
20:20:09 | FromDiscord | <jmgomez> the problem is when the type is already a value and you want to convert it to ref, Im not sure if you can do that |
20:20:25 | FromDiscord | <jmgomez> (you can to a ptr though) |
20:20:53 | FromDiscord | <jmgomez> (edit) "collect" => "collect/ref" |
20:21:10 | FromDiscord | <jmgomez> you can try to do a cast but not sure if it will cause you problems |
20:21:13 | phytolizer | @jmgomez probably not without a copy, since value types end up on the stack and refs are on the heap/GC'd :P |
20:21:15 | FromDiscord | <jmgomez> from ptr to ref I mean |
20:21:17 | FromDiscord | <guttural666> In reply to @phytolizer "<@375727321958580228> that's what happens": dude, I have a hobby project trying to learn C++ and Qt, and I can't fathom how to this day they don't have compile time reflection, this is soooo powerful and necessary, makes you think the compiler is fucking stupid if even I can see at one glance how many data members a class has hahaha |
20:21:41 | FromDiscord | <jmgomez> In reply to @phytolizer "<@726017160115126333> probably not without": yeah but you can still point to the stack, cant you? |
20:21:49 | phytolizer | yes, but ref is for GC'd pointers iirc |
20:22:44 | FromDiscord | <Elegantbeef> Refs have to be on the heap as it's the only safe place for a pointer without a borrow checker |
20:22:49 | FromDiscord | <jmgomez> yeah, that's the part where Im not sure if doing a cast will cause issues.. I dont know much about the internals of the GCs, we dont use it |
20:23:24 | FromDiscord | <Elegantbeef> Nim's `ref`s are interoperable with C/C++'s pointers, but casting is generally not suggested |
20:23:31 | phytolizer | i'm not sure, as if you could cast a value to a ref it wouldn't actually be tracked by GC so idk |
20:24:11 | phytolizer | cool thanks for the info @elegantbeef |
20:27:55 | FromDiscord | <planetis> the counter is placed before the pointer's address btw |
20:28:06 | phytolizer | @guttural666 yeah i'm writing an excel -> sqlite converter for work right now, and i couldn't imagine writing this in c++ lmao |
20:28:35 | FromDiscord | <guttural666> that sounds really cool, sqlite is an incredible project |
20:28:50 | FromDiscord | <guttural666> can you use Nim at work? |
20:28:59 | phytolizer | sure is, and the nim bindings are really easy to use (even if it's just db.exec sql"blah") |
20:29:12 | phytolizer | yes i can use whatever i want for internal tooling |
20:29:15 | FromDiscord | <ygol55> Wait a sec, Nim is just done for replacing the job of others langauges? |
20:29:25 | FromDiscord | <guttural666> that's super cool |
20:29:41 | FromDiscord | <ygol55> I mean, Nim is more for game dev and gui and project that are made in python like that? |
20:29:41 | phytolizer | my boss was like "wtf is nim" at first but now he's happy |
20:29:43 | FromDiscord | <guttural666> I can just write ABAP at work haha |
20:30:28 | FromDiscord | <ygol55> wdym? |
20:30:35 | phytolizer | abap :O |
20:30:52 | FromDiscord | <guttural666> I'm really hoping for a "new Qt" for Nim, Rust or ZIG instead of C++, really want to write real desktop apps easily |
20:31:12 | phytolizer | would be neat for sure, rust seems closest at the moment but none of them are production ready imo |
20:31:25 | FromDiscord | <guttural666> yeah, SAP master race hehe |
20:31:47 | FromDiscord | <guttural666> PopOS guys are working with Iced in Rust |
20:32:12 | FromDiscord | <guttural666> anything more exciting than C/C++ will make me happy |
20:32:15 | phytolizer | yeah it's definitely possible to do native stuff in rust, but i believe they use gtk bindings no? |
20:32:31 | FromDiscord | <guttural666> I think Iced is 100% Rust |
20:33:04 | FromDiscord | <guttural666> https://docs.iced.rs/iced/ |
20:33:12 | FromDiscord | <ShalokShalom> In reply to @guttural666 "I'm really hoping for": Godot |
20:33:35 | phytolizer | oh i'm silly i thought it was their tiling WM stuff lol |
20:33:36 | FromDiscord | <guttural666> In reply to @ShalokShalom "Godot": is a game engine, not a GUI library 😛 |
20:33:46 | FromDiscord | <ShalokShalom> https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b |
20:33:57 | FromDiscord | <guttural666> that's just Gnome hackery, tried it a couple days ago, but also really cool |
20:34:11 | FromDiscord | <guttural666> better than the KDE Tiling KWin script for sure |
20:34:32 | phytolizer | the only gui app i ever made was java awt so i'm definitely not knowledgeable about them |
20:34:35 | phytolizer | i had to write my own widgets |
20:34:58 | FromDiscord | <jmgomez> In reply to @ShalokShalom "Godot": I wonder if the license of UE will allow to use it for that too. Slate/UMG have some decent tools to make UI stuff |
20:35:21 | FromDiscord | <ShalokShalom> Well, the license of UE puts very little pressure on you |
20:35:31 | FromDiscord | <ShalokShalom> You dont earn more than a million |
20:35:38 | FromDiscord | <rlipsc> In reply to @ShalokShalom "<@800432830605819906> can I use": It should work in anything as it's stand alone. In terms of platforms, I've even compiled it to embedded . Some engines have their own ECS built in of course which might be specifically integrated. |
20:35:41 | FromDiscord | <ShalokShalom> So you are free to do, what you want. |
20:35:46 | FromDiscord | <ShalokShalom> But Godot is much smaller |
20:35:49 | FromDiscord | <guttural666> In reply to @phytolizer "i had to write": Java is an atrocity |
20:35:57 | FromDiscord | <ShalokShalom> 35mb for the whole game engine, then you strip |
20:36:00 | phytolizer | agree, but it's all i knew in HSXD |
20:36:05 | FromDiscord | <Phil> In reply to @phytolizer "the only gui app": Ah yes, Java Gui libs |
20:36:08 | FromDiscord | <ShalokShalom> Godot makes it possible to make even websites. |
20:36:09 | FromDiscord | <Phil> Did it once 5 years ago |
20:36:12 | FromDiscord | <jmgomez> In reply to @ShalokShalom "You dont earn more": I think it only apples to Games, but not sure |
20:36:16 | FromDiscord | <Phil> Haven't written a GUI since that wasn't a webpage |
20:36:18 | FromDiscord | <ShalokShalom> Unreal is what? Several dozen GB |
20:36:24 | FromDiscord | <Phil> I feel like that shit just scars you for life |
20:36:24 | FromDiscord | <jmgomez> (edit) "apples" => "applies" |
20:36:40 | FromDiscord | <guttural666> Eclipse is written in Java and I use it at work, thank god it has a Vim mode |
20:36:46 | FromDiscord | <jmgomez> In reply to @ShalokShalom "Unreal is what? Several": Oh no, it can be for a game 50Mb. So I guess just UMG with some work could be a few Mb |
20:36:47 | phytolizer | eclipse.... ouch |
20:36:51 | FromDiscord | <ShalokShalom> In reply to @jmgomez "I think it only": Whatever. I think the license is fine. Its just, that Unreal is huge and the community would never adopt it |
20:37:01 | FromDiscord | <Phil> Look, I gave eclipse a try.... even I ended up in intellij |
20:37:05 | FromDiscord | <jmgomez> In reply to @ShalokShalom "Whatever. I think the": That's true |
20:37:08 | FromDiscord | <guttural666> without Vim mode it's pure cock and ball torture |
20:37:11 | FromDiscord | <ShalokShalom> Alone that it runs better on WINE than the unmaintained Linux version↵.. |
20:37:17 | FromDiscord | <guttural666> but works well with the SAP backends |
20:37:18 | phytolizer | some angel told me about IJ in high school, never looked back |
20:37:25 | FromDiscord | <ShalokShalom> People would never choose it to be the next Qt |
20:37:34 | FromDiscord | <ShalokShalom> Alone from the mindset level |
20:37:41 | FromDiscord | <ShalokShalom> But Godot is MIT |
20:37:49 | FromDiscord | <guttural666> In reply to @phytolizer "some angel told me": what's IJ? |
20:37:52 | phytolizer | intellij |
20:37:53 | FromDiscord | <Phil> IntelliJ |
20:37:53 | FromDiscord | <ShalokShalom> And much more effective, thanks to Nodes. |
20:38:35 | FromDiscord | <guttural666> oh okay, I do know that |
20:38:56 | FromDiscord | <ShalokShalom> In reply to @rlipsc "It should work in": Thanks a lot |
20:39:42 | FromDiscord | <ShalokShalom> In reply to @guttural666 "is a game engine,": Its not only a game entine. Lots of applications use it, and the very Godot game engine itself is written in Godot |
20:39:47 | FromDiscord | <ShalokShalom> Godot is a Godot app |
20:40:02 | FromDiscord | <ShalokShalom> Do you think, your app exceeds the standards of it? 😄 |
20:40:06 | FromDiscord | <guttural666> In reply to @ShalokShalom "Its not only a": ah okay, guess I'm out of the loop |
20:40:40 | FromDiscord | <guttural666> anything else than Electron is fine with me haha |
20:40:41 | FromDiscord | <ShalokShalom> This article is really good |
20:40:44 | FromDiscord | <ShalokShalom> https://discord.com/channels/371759389889003530/371759389889003532/1037826943313264660 |
20:41:08 | FromDiscord | <guttural666> can't even build Electron on my laptop, it just shit its pants 3 times trying to build Balena Etcher yesterday including Electron |
20:41:16 | FromDiscord | <guttural666> 100% crap |
20:49:44 | FromDiscord | <ShalokShalom> Yeah |
20:50:43 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/4eRN |
20:51:05 | FromDiscord | <ShalokShalom> So you dont see Electron as a dep of VSCode, since they incorporated the code |
20:51:15 | FromDiscord | <ShalokShalom> Its basicially a fork |
20:51:16 | FromDiscord | <guttural666> Teams is Electron as well, a simple chatting app uses 600 MB RAM it's ridic |
20:51:21 | FromDiscord | <guttural666> interesting |
20:52:39 | FromDiscord | <guttural666> why doesn't version 1 work? the compiler should be able to figure this out, no? what if the types are ambivalent in the tuple and I want to specify them? https://media.discordapp.net/attachments/371759389889003532/1037831699591090216/image.png |
20:53:15 | FromDiscord | <Elegantbeef> Nim doesnt have length inference for arrays |
20:53:23 | FromDiscord | <Elegantbeef> Arrays require a length and a type |
20:53:40 | FromDiscord | <Phil> In reply to @guttural666 "Teams is Electron as": Teams is its own browser over microsoft servers which includes a chat app and video calling |
20:53:52 | FromDiscord | <guttural666> yeah sure they do, but the compiler knows what to do if I just don't specify anything right 😄 |
20:54:02 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eRO |
20:54:02 | FromDiscord | <Elegantbeef> Of course it does |
20:54:04 | FromDiscord | <Phil> And god damn does it run terrible on the "native" application |
20:54:33 | FromDiscord | <Elegantbeef> Nim's type inference is local so it's generally right to left not left to right |
20:54:40 | FromDiscord | <Elegantbeef> There are some cases that's untrue, but meh |
20:54:41 | FromDiscord | <guttural666> okay, haven't looked into tables yes, are these a distinct type? |
20:54:54 | FromDiscord | <Elegantbeef> The above is a sugar syntax for an array |
20:55:01 | FromDiscord | <Phil> Table = Hashmap |
20:55:03 | FromDiscord | <Elegantbeef> It emits the same as what you have |
20:55:07 | FromDiscord | <Phil> (edit) "Table = Hashmap ... " added "= dictionary" |
20:55:22 | FromDiscord | <Elegantbeef> Hence why i said table constructor syntax and not `std/tables` |
20:55:31 | FromDiscord | <guttural666> In reply to @Elegantbeef "It emits the same": very interesting, thanks for that |
20:55:39 | FromDiscord | <guttural666> yeah that looks very attractive |
20:55:51 | FromDiscord | <Phil> In reply to @Elegantbeef "Hence why i said": Wait a sec there's a second "kind" of table? |
20:55:57 | FromDiscord | <Elegantbeef> No |
20:56:08 | FromDiscord | <Elegantbeef> The above syntax emits an array and is called a table constructor |
20:56:24 | FromDiscord | <Elegantbeef> `const a = {a: b, c: d}` emits an array |
20:56:26 | FromDiscord | <Phil> Never heard before, I guess I'll have to google that one |
20:56:34 | FromDiscord | <Elegantbeef> `const a = {a: b, c: d}.toTable` emits a table |
20:56:44 | * | phytolizer quit (Quit: Client closed) |
20:56:52 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor |
20:56:55 | FromDiscord | <Elegantbeef> Dont google go to the manual |
20:57:00 | FromDiscord | <guttural666> the table concept is really central to ABAP and a super useful concept, glad to see it represented in Nim in such a way |
20:57:04 | FromDiscord | <Phil> Ohhh its a nim specific thing |
20:57:28 | FromDiscord | <Elegantbeef> Well Nim doesnt have tables builtin, they're added in userspace |
20:57:34 | FromDiscord | <guttural666> yeah |
20:57:39 | FromDiscord | <ShalokShalom> Tables everywhere is a Lua thing |
20:57:50 | FromDiscord | <Elegantbeef> This syntax exists for some sugar for associative data |
20:58:45 | FromDiscord | <Elegantbeef> But luckily this syntax can be used anywhere, so httpheaders for instance |
20:59:04 | FromDiscord | <Elegantbeef> Much cleaner to read than the `[(a, b), (c, d)]` variant imo |
20:59:05 | FromDiscord | <ShalokShalom> Why do you know so much about Nim? |
20:59:19 | FromDiscord | <ShalokShalom> Did you dig into the compiler, or just had lots of convos or what? |
20:59:23 | FromDiscord | <Elegantbeef> I have been using it for years and contribute to the compiler |
21:02:23 | FromDiscord | <guttural666> tables does not automatically do SOA though correct? |
21:03:00 | FromDiscord | <Elegantbeef> The table syntax emits an array of tuples |
21:03:00 | FromDiscord | <rlipsc> In reply to @guttural666 "why doesn't version 1": `const files: auto = [("a", "b")]` 🙂 |
21:03:04 | FromDiscord | <Elegantbeef> It's not an SOA |
21:03:08 | FromDiscord | <guttural666> yeah okay |
21:03:15 | FromDiscord | <Elegantbeef> Lol rlipsc really trolling |
21:03:20 | FromDiscord | <Elegantbeef> `: auto` is the same as no type |
21:03:38 | FromDiscord | <guttural666> haven't seen auto in Nim before, started to really miss it hahaha |
21:03:50 | FromDiscord | <guttural666> Germans love their Autos |
21:03:50 | FromDiscord | <Elegantbeef> You dont need it really |
21:03:59 | FromDiscord | <guttural666> no I don't thank you very much haha |
21:04:02 | FromDiscord | <Elegantbeef> Nim's auto is rarely used in reality |
21:04:12 | FromDiscord | <guttural666> auto in terms of C++ I mean |
21:04:34 | FromDiscord | <ShalokShalom> In reply to @guttural666 "Germans love their Autos": That would be uppercase then 😉 |
21:04:36 | FromDiscord | <rlipsc> yeah iirc `auto` is sorta weird as it puts things at the generic stage of sempass? |
21:04:47 | FromDiscord | <Elegantbeef> Depends on where you use it |
21:04:59 | FromDiscord | <ShalokShalom> In German, there is no 'auto' that is a car, like in no instance of the lang 🙂 |
21:05:05 | FromDiscord | <Elegantbeef> In parameters it turns it into a generic procedure |
21:05:17 | FromDiscord | <rlipsc> I've had issues using it when performing a dance of macro unfoldings |
21:05:21 | FromDiscord | <Elegantbeef> `proc doThing(a: auto)` == `proc doThing[T](a: T)` |
21:05:31 | FromDiscord | <Phil> We like cars so much we put them in front of every variable |
21:05:47 | FromDiscord | <Elegantbeef> For return types it infers the return type from the body |
21:06:07 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eRS |
21:06:26 | FromDiscord | <guttural666> In reply to @Elegantbeef "For return types it": oh so it does kind of work like CPP auto |
21:06:50 | FromDiscord | <guttural666> just don't need it for compile time type deduction of variables et al |
21:07:02 | FromDiscord | <Elegantbeef> Indeed |
21:07:08 | FromDiscord | <Elegantbeef> Anyway snow shovelling |
21:12:23 | * | phytolizer joined #nim |
21:24:46 | * | nisstyre quit (Ping timeout: 260 seconds) |
21:26:54 | * | phytolizer left #nim (#nim) |
21:29:09 | FromDiscord | <guttural666> In reply to @Elegantbeef "The table syntax emits": not with named fields though right, which makes it less useful 😦 |
21:30:30 | FromDiscord | <Elegantbeef> Named tuples are a mistake, prove me wrong |
21:30:45 | FromDiscord | <guttural666> this version is probably more useful, to be able to dynamically address the fields right? https://media.discordapp.net/attachments/371759389889003532/1037841283231780884/image.png |
21:30:51 | FromDiscord | <guttural666> why so? haha |
21:31:05 | FromDiscord | <guttural666> named columns are pretty useful haha |
21:31:29 | FromDiscord | <Elegantbeef> I dont get the point of named tuples generally |
21:31:49 | FromDiscord | <Elegantbeef> They're not distinctly typed, so you have 0 type safety |
21:32:09 | FromDiscord | <guttural666> well, to address table fields by name without having to index? |
21:32:26 | FromDiscord | <Elegantbeef> Just use a proper table then |
21:33:13 | FromDiscord | <guttural666> proper table in Nim would be what? |
21:33:16 | FromDiscord | <konsumlamm> named tuples are useful as return type, when you want to return multiple values and you don't want to force people to remember which means what |
21:33:28 | FromDiscord | <guttural666> for example yeah |
21:34:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eRZ |
21:35:22 | FromDiscord | <guttural666> ahhhh, you would have to reference the definition though to make sure you got it right, yeah? |
21:35:41 | FromDiscord | <guttural666> this kind of structured binding or whatever in the for loop is very cool |
21:36:01 | FromDiscord | <Elegantbeef> `for x, y, in z` just does `z.pairs` |
21:36:09 | FromDiscord | <Elegantbeef> Which for table yields `(key, value)` |
21:36:27 | FromDiscord | <Elegantbeef> See i dont get why named tuples are better than objects here↵(@konsumlamm) |
21:36:49 | FromDiscord | <guttural666> object would be kind of equivalent right |
21:36:51 | FromDiscord | <Elegantbeef> The argument of "Oh you can unpack them" defeats the argument that "Named tuples are better cause you dont need to remember order" |
21:36:56 | FromDiscord | <konsumlamm> because it's more boilerplate to create a new object when you only use it for one or two functions |
21:37:00 | FromDiscord | <Elegantbeef> Object is 100% equivalent but statically typed |
21:37:08 | FromDiscord | <Elegantbeef> Distinctly typed\ |
21:37:59 | FromDiscord | <guttural666> have to think about this, but your table solution is pretty cool |
21:38:58 | FromDiscord | <Elegantbeef> I just dislike the lack of distinct typing mostly 😄 |
21:39:03 | * | jmdaemon joined #nim |
21:39:15 | FromDiscord | <guttural666> didn't quite get that part, reading the docs rn haha |
21:39:38 | FromDiscord | <guttural666> because the tuple members are distinctly typed as well arent they? |
21:41:03 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eS2 |
21:41:33 | FromDiscord | <Elegantbeef> `(string, string)` implicitly converts to any named tuple that matches parameters regardless if it comes from a literal or not |
21:42:38 | FromDiscord | <guttural666> you would have to type mytuple = tuple[a, b: string] then and use that |
21:42:45 | FromDiscord | <Elegantbeef> Nope |
21:42:52 | FromDiscord | <Elegantbeef> `mytuple` is an alias it's not distinct |
21:42:58 | FromDiscord | <guttural666> ahh |
21:43:07 | FromDiscord | <Elegantbeef> Tuples are structurally typed |
21:43:18 | FromDiscord | <guttural666> so any tuple witht he same number of fields and the same type of fields would qualify |
21:43:35 | FromDiscord | <Elegantbeef> I think the field names do matter in some cases |
21:44:18 | FromDiscord | <guttural666> but in principle a return type of string, string would match any variable of any tuple with the type of string, string |
21:46:07 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/Dg5 |
21:46:38 | FromDiscord | <Elegantbeef> Named tuple -\> named tuple requires a signature match so field and types much match, but name -\> anoynmous doesnt matter about names they're just structurally typed |
21:46:59 | FromDiscord | <guttural666> yeah yeah okay |
21:47:17 | FromDiscord | <guttural666> that's pretty nuanced |
21:47:20 | FromDiscord | <Elegantbeef> So in the `doThing(getThing())` case you might feed a tuple of the same type from a different API that returns different things to a procedure that expects X thing |
21:47:35 | FromDiscord | <guttural666> yeah, I get it |
21:47:50 | FromDiscord | <guttural666> okay, gonna go with your solution then 😄 |
21:48:55 | FromDiscord | <Elegantbeef> Hey you can use whichever you prefer i cannot force you to do anything 😛 |
21:50:58 | FromDiscord | <guttural666> nah man, the technically best and optimal solution should always be preferred |
21:51:22 | FromDiscord | <guttural666> and I'm not gonna argue with a compiler author haha |
21:51:39 | FromDiscord | <Elegantbeef> I'm not an author |
21:52:00 | * | dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:52:00 | FromDiscord | <Elegantbeef> I have supplied some bugfixes, i havent done anything fancy |
21:52:38 | FromDiscord | <guttural666> oh okay, well still way beyond my purview in Nim |
21:57:27 | FromDiscord | <guttural666> AMD's live stream for RDNA3 was insane btw |
22:03:00 | FromDiscord | <System64 ~ Flandre Scarlet> what is a clojure?µ |
22:03:00 | FromDiscord | <ShalokShalom> #offtopic |
22:03:02 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "clojure?µ" => "clojure?" |
22:03:07 | FromDiscord | <ShalokShalom> We talked about it here |
22:03:25 | FromDiscord | <ShalokShalom> In reply to @System64 "what is a clojure?": Closure you mean? |
22:03:57 | FromDiscord | <ShalokShalom> Clojure is a programming language |
22:03:57 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ShalokShalom "Closure you mean?": Oh, yeah Closure |
22:03:59 | FromDiscord | <Phil> Closure is a function that accesses variables outside of its own definition |
22:04:07 | FromDiscord | <Phil> And encapsulates them |
22:04:12 | FromDiscord | <System64 ~ Flandre Scarlet> 🤯 |
22:04:14 | FromDiscord | <Phil> In a simply said manner |
22:04:22 | FromDiscord | <ShalokShalom> In reply to @System64 "Oh, yeah Closure": https://en.m.wikipedia.org/wiki/Closure_(computer_programming) |
22:04:26 | FromDiscord | <Phil> That doesn't fully cover it afaik,, but it gives an idea |
22:05:29 | FromDiscord | <System64 ~ Flandre Scarlet> why is it useful? |
22:05:43 | FromDiscord | <Elegantbeef> do you mean a closure? |
22:05:43 | FromDiscord | <Elegantbeef> Clojure is a JS tool |
22:05:58 | FromDiscord | <System64 ~ Flandre Scarlet> Closure |
22:06:38 | FromDiscord | <ShalokShalom> In reply to @Elegantbeef "Clojure is a JS": You mean Clojurescript |
22:06:41 | FromDiscord | <Elegantbeef> Closure is a procedure or iterator that has a persistant environment |
22:06:41 | FromDiscord | <konsumlamm> Clojure is a programming language that runs on the JVM and JS, not a "JS tool" |
22:07:05 | FromDiscord | <ShalokShalom> And .NET |
22:07:16 | FromDiscord | <Elegantbeef> Clojure compiler is what i was thinking of |
22:07:19 | FromDiscord | <ShalokShalom> But its hardly any used there |
22:07:28 | FromDiscord | <ShalokShalom> Yeah, it has a JS backend. |
22:07:43 | FromDiscord | <ShalokShalom> JS, JVM and .NET |
22:07:52 | FromDiscord | <konsumlamm> the JS compiler is called closure again |
22:07:58 | FromDiscord | <ShalokShalom> Basically Lisp going mainstream |
22:08:01 | FromDiscord | <konsumlamm> (the one beef is talking about) |
22:08:05 | FromDiscord | <Elegantbeef> > The Closure Compiler is a tool for making JavaScript download and run faster.↵> I mean i'm not wrong to call it a JS tool |
22:08:20 | FromDiscord | <ShalokShalom> Ah, that one. Closure. |
22:08:22 | FromDiscord | <Elegantbeef> Yea I mistakenly got them mixed up |
22:11:16 | FromDiscord | <ShalokShalom> In reply to @System64 "why is it useful?": People call anonymous functions often Closures |
22:11:31 | FromDiscord | <ShalokShalom> As you can read in the Wikipedia text, is this not correct |
22:11:32 | FromDiscord | <Elegantbeef> No they dont |
22:11:34 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4eSc |
22:11:37 | FromDiscord | <Elegantbeef> A closure is a specific type of procedure |
22:11:38 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4eSc" => "https://play.nim-lang.org/#ix=4eSd" |
22:11:45 | FromDiscord | <ShalokShalom> In Nim |
22:11:48 | FromDiscord | <Elegantbeef> Which captures a state that allows calls after to reuse the v alue |
22:11:56 | FromDiscord | <Elegantbeef> Not even just in Nim |
22:11:58 | FromDiscord | <Elegantbeef> By definition |
22:12:18 | FromDiscord | <exelotl> Yeah, Nim can have anonymous procs which aren't closures |
22:12:26 | FromDiscord | <ShalokShalom> Nice |
22:12:49 | FromDiscord | <ShalokShalom> Anonymous func too, I guess |
22:12:59 | FromDiscord | <guttural666> anybody got an efficient idea to replace $USER with the current user in Nim to be able to copyFile() these bad boys? I could just call the cp command with execCmd from std/osproc to call console commands directly, dunno how good/efficient that is https://media.discordapp.net/attachments/371759389889003532/1037851913225506877/image.png |
22:13:00 | FromDiscord | <ShalokShalom> How does that look like? |
22:13:14 | FromDiscord | <Elegantbeef> The same as a closure just with `{.nimcall.}` |
22:13:50 | FromDiscord | <huantian> see <https://nim-lang.org/docs/os.html#getHomeDir> |
22:13:57 | FromDiscord | <huantian> and perhaps https://nim-lang.org/docs/os.html#getConfigDir |
22:13:59 | FromDiscord | <Phil> In reply to @rlipsc "It should work in": There is one thing I was deeply saddened by when I noticed it during the talk btw |
22:14:08 | FromDiscord | <huantian> or even https://nim-lang.org/docs/os.html#expandTilde,string |
22:14:13 | FromDiscord | <Phil> Abbreviated vairiable names.↵Everywhere |
22:14:24 | FromDiscord | <ShalokShalom> In reply to @guttural666 "anybody got an efficient": I love this for those issues↵↵https://github.com/Vindaar/shell |
22:14:24 | FromDiscord | <Phil> It tore at my heart and soul |
22:14:50 | FromDiscord | <Phil> Rendered me speechless |
22:14:58 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Isofruit "I can *right now*": Oh alright, so just an anonymous function |
22:15:06 | FromDiscord | <ShalokShalom> In reply to @Isofruit "Abbreviated vairiable names. Everywhere": You also dislike that? |
22:15:16 | FromDiscord | <ShalokShalom> In reply to @System64 "Oh alright, so just": Haha |
22:15:17 | FromDiscord | <Phil> In reply to @System64 "Oh alright, so just": An anonymous function only accesses its own parameters, not stuff from the outside |
22:15:34 | FromDiscord | <Phil> Once it accesses the outside its a closure, by definition, due to having an environment |
22:16:07 | FromDiscord | <Phil> In reply to @ShalokShalom "You also dislike that?": It is a curse and like the one good thing I often see in Java Code |
22:16:17 | FromDiscord | <Phil> They don't abbreviate... as much |
22:16:49 | FromDiscord | <guttural666> the whole DSL thing in Nim is somethig I really don't wont to delve into rn, since I want to learn the base language and anything with macros et al in Nim is basically god mode, the getHomeDir stuff is acceptable though thanks! haha 😄 |
22:16:54 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Isofruit "An anonymous function **only**": variables must be global, no? |
22:17:08 | FromDiscord | <Phil> In reply to @System64 "variables must be global,": No, why would they? |
22:17:38 | FromDiscord | <huantian> In reply to @guttural666 "the whole DSL thing": I wonder if `~` is expanded automatically with other procs |
22:17:43 | FromDiscord | <huantian> so you might not even need `expandTilde` |
22:18:12 | FromDiscord | <guttural666> gonna try that rn |
22:18:21 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4eSg |
22:18:29 | FromDiscord | <rlipsc> In reply to @Isofruit "Abbreviated vairiable names. Everywhere": as in ECS/DOD/OOP? |
22:18:31 | FromDiscord | <Phil> Once the scope of the block ends they're both gone |
22:18:38 | FromDiscord | <Phil> In reply to @rlipsc "as in ECS/DOD/OOP?": Nah, in the code examples |
22:18:43 | FromDiscord | <Phil> Pos |
22:18:44 | FromDiscord | <Phil> Vel |
22:18:47 | FromDiscord | <ShalokShalom> In reply to @Isofruit "It is a curse": Yeah, same. This is one of the things I love when coding in dotnet with fsharp |
22:18:49 | FromDiscord | <ShalokShalom> Also, same |
22:18:50 | FromDiscord | <rlipsc> Oh! |
22:19:04 | FromDiscord | <ShalokShalom> No abbrevitions |
22:19:18 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4eSh |
22:19:32 | FromDiscord | <ShalokShalom> (edit) "abbrevitions" => "abbreviations" |
22:19:47 | FromDiscord | <guttural666> In reply to @huantian "I wonder if `~`": doesn't seem to |
22:20:13 | FromDiscord | <Elegantbeef> That's not even the definition↵(@Phil) |
22:20:26 | FromDiscord | <Elegantbeef> Anonymous has no name |
22:20:40 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/4eSi |
22:20:42 | FromDiscord | <ShalokShalom> Thats the whole syntax xD |
22:20:46 | FromDiscord | <ShalokShalom> Well, basically |
22:21:12 | FromDiscord | <ShalokShalom> But yeah, get home dir is perfectly fine and probably more appropriate |
22:21:23 | FromDiscord | <ShalokShalom> Ah, this auto correct |
22:21:36 | FromDiscord | <ShalokShalom> (edit) "get home dir" => "getHomeDir" |
22:21:38 | FromDiscord | <Phil> In reply to @Elegantbeef "Anonymous has no name": Argh, right that goes into it as well. Strictly speaking that's the only thing needed but what you typically mean by that is literally a pure function without a name |
22:22:26 | FromDiscord | <Phil> I don't think I've ever seen folks speak about anonymous procs in my place and not mean pure funcs without names |
22:22:33 | FromDiscord | <Phil> (edit) "place" => "workplace" |
22:22:42 | FromDiscord | <Phil> (edit) "procs" => "functions" |
22:23:01 | FromDiscord | <Elegantbeef> An anonymous function is just an unnamed function |
22:23:02 | FromDiscord | <Elegantbeef> That's it |
22:23:12 | FromDiscord | <ShalokShalom> People confusing functions with procedures is one of the things that drive me nuts |
22:23:32 | FromDiscord | <Elegantbeef> All functions are procedures but not all procedures are functions |
22:23:44 | FromDiscord | <rlipsc> Originally they were `Position`, `Velocity`, `position.x += velocity.x`, but I thought it was less noisy and it's easier to take in with `Pos`, `Vel`, `pos.x += vel.x`. |
22:23:59 | FromDiscord | <guttural666> In reply to @ShalokShalom "Its literally ": that's the point, I want to use the base lang as much as poss first, to learn it |
22:24:24 | FromDiscord | <ShalokShalom> Ah, you mean you like to challenge you?/ |
22:24:34 | FromDiscord | <ShalokShalom> And actually make yourself using the language |
22:25:03 | FromDiscord | <Phil> In reply to @guttural666 "that's the point, I": There is 2 macros I would genuinely recommend at least taking a look at once you delve into compile-time stuff |
22:25:07 | FromDiscord | <guttural666> In reply to @ShalokShalom "Ah, you mean you": I also use only standard c++ and stl in my c++ hobby project despite using Qt, cause I think I need to know c++ first, before using the Qt shit |
22:25:22 | FromDiscord | <ShalokShalom> In reply to @rlipsc "Originally they were `Position`,": Code gets written 1x and read 10x ↵↵People who have never read the code, usually strongly prefer not abbreviated code |
22:25:28 | FromDiscord | <ShalokShalom> For obvious reasons. |
22:25:53 | FromDiscord | <Phil> They're very simple ones, but extremely useful:↵The equivalent of "getField" and "setField".↵So that you can turn `getField(myObj, "fieldOnObj")` into `myObj.fieldOnObj` |
22:26:06 | FromDiscord | <ShalokShalom> In reply to @guttural666 "I also use only": Why not using Nim with QML? |
22:26:29 | FromDiscord | <ShalokShalom> I am still convinced Godot is the more convenient tool by miles |
22:26:40 | FromDiscord | <guttural666> In reply to @ShalokShalom "Why not using Nim": not ready to delve into that rn, setup is way harder than just to start Vim and Qt and there you go IU guess |
22:26:50 | FromDiscord | <ShalokShalom> But Nim with QML seems quite approachable |
22:26:55 | FromDiscord | <guttural666> okay |
22:27:08 | FromDiscord | <guttural666> I have so many things to learn haha |
22:27:22 | FromDiscord | <ShalokShalom> I wouldn't do it |
22:27:32 | FromDiscord | <rlipsc> Yeah that's fair and I did consider it. I suppose because I'm talking about them verbally as 'position' and 'velocity' it would make sense. Noted though for future talks. |
22:27:34 | FromDiscord | <Phil> In reply to @rlipsc "Originally they were `Position`,": For me personally I'll always advocate for the long-form as I find it more readable. Yeah more characters, but that is not that much.↵Then again, I'm not a game-writer, I'm a webdev |
22:27:40 | FromDiscord | <guttural666> not using QML anyway rn, I prefer coding all the GUI in cpp directly |
22:27:41 | FromDiscord | <ShalokShalom> I started a project, and noticed quickly that qml tools are just not there |
22:27:44 | FromDiscord | <ShalokShalom> Compared with Godot |
22:27:49 | FromDiscord | <ShalokShalom> Its not even close. |
22:28:05 | FromDiscord | <ShalokShalom> But I use KDE on my desktop |
22:28:12 | FromDiscord | <rlipsc> (edit) "Yeah that's fair and I did consider it. I suppose because I'm talking about them verbally as 'position' and 'velocity' ... iteasily" added "I thought" | "make sense." => "easily translate." |
22:28:14 | FromDiscord | <Phil> ~~I noticed~~ |
22:28:17 | FromDiscord | <guttural666> In reply to @ShalokShalom "Compared with Godot": is there a good YT video on how to use Godot for GUI? |
22:28:21 | FromDiscord | <ShalokShalom> So QML seemed tempting to implement it natively. |
22:28:21 | FromDiscord | <Phil> ~~It was subtle~~ |
22:28:31 | FromDiscord | <guttural666> KDE is just amazeballs |
22:28:46 | FromDiscord | <ShalokShalom> In reply to @guttural666 "is there a good": I would advise you the official Discord↵↵That has a UI section |
22:29:06 | FromDiscord | <ShalokShalom> https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b |
22:29:10 | FromDiscord | <guttural666> literlly the first time I heard about this |
22:29:28 | FromDiscord | <ShalokShalom> The Godot UI itself is implemented in Godot |
22:29:30 | FromDiscord | <rlipsc> In reply to @Isofruit "For me personally I'll": Yeah it's easy to assume things people don't know when you've been working on something a while |
22:29:36 | FromDiscord | <ShalokShalom> So Godot is basically a Godot application |
22:29:43 | FromDiscord | <ShalokShalom> You open it as a project |
22:29:45 | FromDiscord | <rlipsc> So thanks for the feedback 🙂 |
22:29:48 | FromDiscord | <Phil> While the link is nice |
22:29:51 | FromDiscord | <Phil> I detest login walls |
22:30:02 | FromDiscord | <ShalokShalom> Yeah 🙄 |
22:30:08 | FromDiscord | <Phil> In reply to @rlipsc "So thanks for the": Amazing talk overall btw. |
22:30:09 | FromDiscord | <guttural666> In reply to @ShalokShalom "The Godot UI itself": how long have they been supporting this kind of stuff? I do have Godot in Steam and have coded basic movement in their srcipting lng |
22:30:25 | FromDiscord | <ShalokShalom> GDScript |
22:30:29 | FromDiscord | <guttural666> yeh |
22:30:32 | FromDiscord | <ShalokShalom> Supporting? |
22:30:35 | FromDiscord | <rlipsc> In reply to @Isofruit "Amazing talk overall btw.": Cheers! |
22:30:57 | FromDiscord | <Phil> In reply to @rlipsc "Cheers!": The fact I could follow along with a knowledge base of barely more than having a decent understanding of poymorphism and OO and we could literally talk about some of the more nitty gritty stuff is quite something! |
22:31:13 | FromDiscord | <guttural666> I assumed they used something like dear imGUI for their tools |
22:31:16 | FromDiscord | <Phil> (edit) "something!" => "something and a testament of how well you explained it!" |
22:31:25 | FromDiscord | <ShalokShalom> There are also UI videos on Youtube |
22:31:32 | FromDiscord | <ShalokShalom> Most of them show Godot 3 |
22:31:44 | FromDiscord | <ShalokShalom> Godot 4 is in beta 4 |
22:32:04 | FromDiscord | <guttural666> Godot has really made a lot of strides recently, I think I've seen a talk on them implementing Vulkan rendering |
22:32:11 | FromDiscord | <ShalokShalom> Yep |
22:32:23 | FromDiscord | <ShalokShalom> Thats Godot 4 biggest feature |
22:32:33 | FromDiscord | <ShalokShalom> They were already great for 2D stuff |
22:32:39 | FromDiscord | <guttural666> yeah |
22:32:40 | FromDiscord | <ShalokShalom> Now they are great at 3D as well. |
22:38:09 | FromDiscord | <ShalokShalom> I should mention, the new binding is not ready yet |
22:38:13 | FromDiscord | <ShalokShalom> https://github.com/Hapenia-Lans/gdextension-nim |
22:38:25 | FromDiscord | <ShalokShalom> Godot 3 binding is top notch. |
22:39:30 | FromDiscord | <guttural666> this is pretty amazing, I'm always searching for new GUI solutions with good languages like Nim, Zig, Rust etc. |
22:39:53 | FromDiscord | <ShalokShalom> Yeah. And you can mix |
22:40:04 | FromDiscord | <ShalokShalom> So long as there are bindings |
22:40:14 | FromDiscord | <ShalokShalom> Every node can have its own language |
22:40:16 | FromDiscord | <guttural666> without having to be a fucking expert in DLL and binding and FFI shite, I'm just a noob who writes console apps and Qt haha |
22:40:24 | FromDiscord | <ShalokShalom> And I happen to co maintain... |
22:40:38 | FromDiscord | <guttural666> nice work man |
22:40:50 | FromDiscord | <ShalokShalom> https://github.com/Vivraan/godot-lang-support |
22:40:56 | FromDiscord | <ShalokShalom> This list here 😅😅😅 |
22:41:10 | FromDiscord | <ShalokShalom> In reply to @guttural666 "without having to be": Yeah, absolutely |
22:41:18 | FromDiscord | <ShalokShalom> the whole deployment. |
22:41:25 | FromDiscord | <ShalokShalom> Dont get me started |
22:41:44 | FromDiscord | <guttural666> just bookmarked, gotta read up on this |
22:41:52 | FromDiscord | <ShalokShalom> With sdk contracts signed, you could even develop for xbox, switch, ps and so |
22:42:22 | FromDiscord | <ShalokShalom> https://discord.gg/wNRMBQeJ |
22:42:33 | FromDiscord | <ShalokShalom> You`re welcome |
22:43:01 | FromDiscord | <ShalokShalom> (Hope anyone helps with the bindings 😄 ) |
22:47:08 | FromDiscord | <guttural666> how do I adress the last char of a string? https://media.discordapp.net/attachments/371759389889003532/1037860508243591320/image.png |
22:47:25 | FromDiscord | <Elegantbeef> `tdir[^1]` |
22:47:38 | FromDiscord | <guttural666> that carrot does what? |
22:47:56 | FromDiscord | <Elegantbeef> Reverse index |
22:47:59 | FromDiscord | <Elegantbeef> `^1` is last |
22:48:04 | FromDiscord | <Elegantbeef> `^2` is second from last |
22:48:16 | FromDiscord | <guttural666> right, I've read that, that's very useful |
22:48:24 | FromDiscord | <guttural666> i remember thanks! |
22:49:05 | FromDiscord | <Elegantbeef> You also dont really need `()` on `len` or `high` |
22:49:28 | FromDiscord | <Elegantbeef> It's pretty clear that they're properties |
22:49:36 | FromDiscord | <guttural666> if there are no params I don't need it rigt? |
22:49:46 | FromDiscord | <guttural666> oh they are |
22:49:47 | FromDiscord | <guttural666> okay |
22:50:53 | FromDiscord | <guttural666> and single quotes for a char |
22:51:02 | FromDiscord | <guttural666> works now, thanks |
22:57:52 | FromDiscord | <guttural666> @ElegantBeef : if a table were subject to change layout wise I still think it would be better to use at least an array of objects, especially with a lot of dependencies in place, or a custom data structure right? |
22:58:11 | FromDiscord | <Elegantbeef> No clue what you mean, but i'll say sure |
22:59:08 | FromDiscord | <guttural666> if the ordering here at the definition were subject to change https://media.discordapp.net/attachments/371759389889003532/1037863529782444032/image.png |
22:59:28 | FromDiscord | <guttural666> I would invalidate all dependent for loops for example |
23:00:04 | FromDiscord | <ShalokShalom> @guttural666 nice you use fish? |
23:00:09 | * | wallabra quit (Ping timeout: 255 seconds) |
23:00:44 | FromDiscord | <guttural666> with for file, dir in files, that would no longer bet true and with a lot of such dependencies, a named reference would be better |
23:00:58 | FromDiscord | <guttural666> In reply to @ShalokShalom "<@375727321958580228> nice you use": yeah man, best ever |
23:01:01 | FromDiscord | <ShalokShalom> I wrote my first 'publicly released' source code in it 😅↵↵Same wrapper for the package management at Arch |
23:01:11 | FromDiscord | <ShalokShalom> In reply to @guttural666 "yeah man, best ever": Yeah, absolutely love it. |
23:02:34 | FromDiscord | <guttural666> In reply to @ShalokShalom "Yeah, absolutely love it.": I'm trying to write a "config copier" for my linux systems rn, that is able to export all the important config files for fish, vim etc. and import them to a new system + install all the standard software I want on a new arch based installation ^ |
23:03:10 | FromDiscord | <guttural666> maybe even KDE auto styling but that's something for the future 😄 |
23:03:35 | FromDiscord | <ShalokShalom> https://codeberg.org/ShalokShalom/add |
23:03:39 | FromDiscord | <guttural666> change grub to wait = 0 etc |
23:03:49 | FromDiscord | <guttural666> all the standard stuff, correct scroll direction etc haha |
23:03:53 | FromDiscord | <ShalokShalom> In reply to @guttural666 "I'm trying to write": Ah nice |
23:04:07 | FromDiscord | <guttural666> Garuda is so fucking sexy |
23:04:19 | FromDiscord | <guttural666> thats on my gaming PC rn |
23:04:26 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/4eSq |
23:04:31 | FromDiscord | <ShalokShalom> Yeah, using Garuda too 😅❤️ |
23:04:38 | FromDiscord | <guttural666> no clue what you're talking about but yeah haha |
23:04:51 | FromDiscord | <guttural666> using endeavourOS KDE on my laptop rn |
23:05:07 | FromDiscord | <ShalokShalom> https://codeberg.org/ShalokShalom/Linda |
23:05:17 | FromDiscord | <guttural666> Garuda is amazing but kind of excessive for a dev machine haha |
23:05:38 | FromDiscord | <ShalokShalom> Nspawn is container management, that every distro supports, that uses systemd |
23:05:44 | * | wallabra joined #nim |
23:05:52 | FromDiscord | <ShalokShalom> And I like to implement a GUI for it |
23:05:53 | FromDiscord | <guttural666> thats way over my head |
23:06:28 | FromDiscord | <guttural666> I'm happy to be able to migrate my vimrc and fish.config from one machine to another with one exe, thats my goal atm |
23:06:46 | FromDiscord | <guttural666> maybe even auto download them from gitlab haha |
23:06:54 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/4eSr |
23:06:59 | FromDiscord | <guttural666> yeah yeah |
23:07:04 | FromDiscord | <ShalokShalom> Just for the desktop, more integrated into Linux |
23:07:25 | FromDiscord | <guttural666> I'm distro hopping like a whore again rn, but reconfiguring basics annoys me |
23:07:31 | FromDiscord | <guttural666> thats my use case |
23:07:41 | FromDiscord | <ShalokShalom> Yeah, totally get that |
23:07:45 | FromDiscord | <guttural666> hehehe |
23:08:04 | FromDiscord | <ShalokShalom> I jumped from distro to distro, till KaOS catched me for 7 years |
23:08:13 | FromDiscord | <ShalokShalom> Now for about 1 year at Garuda. |
23:08:21 | FromDiscord | <ShalokShalom> Super happy since then. |
23:09:20 | FromDiscord | <guttural666> I had Manjaro KDE on all my machines for a long time, then switched to Garuda on all, now I'm looking around and experimenting with a bunch of Arch based distros |
23:10:12 | FromDiscord | <ShalokShalom> @guttural666 https://pypi.org/project/dotfiles-sync/ |
23:10:52 | FromDiscord | <guttural666> In reply to @ShalokShalom "<@375727321958580228> https://pypi.org/project/dotf": gonna write that myself, gotta learn haha |
23:13:31 | FromDiscord | <ShalokShalom> Good so! |
23:16:32 | FromDiscord | <guttural666> https://gitlab.com/hansdampfinger666/flubber |
23:16:46 | FromDiscord | <guttural666> this is my level rn, if you want to take a look 😄 |
23:20:36 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eSw |
23:20:58 | FromDiscord | <ShalokShalom> Do you know about the benefits of let/const and func? |
23:22:01 | FromDiscord | <guttural666> sent a code paste, see https://play.nim-lang.org/#ix=4eSx |
23:22:31 | FromDiscord | <guttural666> In reply to @ShalokShalom "Do you know about": compile time vs. run time benefits I suppose |
23:22:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eSy |
23:23:05 | FromDiscord | <Elegantbeef> `var (fdir, tdir) = (fromDir, toDir)` |
23:23:22 | FromDiscord | <Elegantbeef> But even then it doesnt make sense as you dont mutate them afaict |
23:24:39 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/4eSA |
23:24:58 | FromDiscord | <ShalokShalom> Those things help, to keep the code easy to test and scale. |
23:26:14 | FromDiscord | <ShalokShalom> Like, you can easier see, when you call a side effect, and it's not as easy to change a variable by accident. |
23:26:23 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eSC |
23:26:53 | FromDiscord | <Elegantbeef> Also types are conventionally UpperPascalCase |
23:27:00 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
23:28:41 | FromDiscord | <guttural666> In reply to @Elegantbeef "But even then it": talked about this couple days ago, I would have liked to have a default for a variable variable |
23:29:20 | FromDiscord | <guttural666> to be able to not have to provide anything at the call site and still be able to default the inpuit param to current dir or something like that |
23:29:58 | FromDiscord | <guttural666> I since then changed a couple of instances of this to just use var and then default to seomthing if the input was "" |
23:30:30 | FromDiscord | <guttural666> since copying the immutable params was a useless copy and therefor inefficient |
23:31:34 | FromDiscord | <guttural666> In reply to @ShalokShalom "const vs let has": yeah I knew that, basically comptime in ZIG or constexpr in CPP I think |
23:32:41 | FromDiscord | <Elegantbeef> Also you dont need the `none` flag unless you use that enum value |
23:32:47 | FromDiscord | <Elegantbeef> `{}` is an empty set and it has no bits on 😄 |
23:33:19 | FromDiscord | <guttural666> okay that makes sense, gonna drop that |
23:33:38 | FromDiscord | <guttural666> default initialized also works tho? |
23:33:50 | FromDiscord | <Elegantbeef> Yes default value for a set is empty |
23:34:34 | FromDiscord | <guttural666> okay, I'm used to providing a NONE or invalid as the first option since CPP will default to 0 etc. |
23:34:49 | FromDiscord | <Elegantbeef> Nim also defaults to 0 |
23:34:59 | FromDiscord | <Elegantbeef> But Nim bitsets arent dumb like `a | b` in C++ |
23:35:21 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/4eSF |
23:35:36 | FromDiscord | <ShalokShalom> Nim is a bit .. disinterest about that |
23:35:54 | FromDiscord | <Elegantbeef> If they're contiguous the bit position they occupy is always their position in the enum |
23:36:08 | FromDiscord | <guttural666> okay, so the normal enums would have to have a 0 = none value right, that would be the safe thing to do if you forget to set it |
23:36:24 | FromDiscord | <guttural666> aside from bitset |
23:37:29 | FromDiscord | <guttural666> In reply to @ShalokShalom "Serious functional languages share": this should be copy elision right? |
23:37:52 | FromDiscord | <Elegantbeef> No normal enums do not have a `0 = none` |
23:38:07 | FromDiscord | <Elegantbeef> Normal enums start off at `0` but when you use a bitset the ordinal value is their bit position |
23:38:40 | FromDiscord | <guttural666> yea, but talking about normie enums |
23:38:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eSG |
23:39:18 | FromDiscord | <guttural666> it would be prudent to define the first entry as none and handle that case in case anybody just declares and does not explicitly define the bad boy |
23:39:19 | FromDiscord | <guttural666> right |
23:39:28 | FromDiscord | <Elegantbeef> No |
23:39:34 | FromDiscord | <Elegantbeef> Only if you need a `none` value |
23:39:39 | FromDiscord | <guttural666> okay |
23:40:06 | FromDiscord | <guttural666> because a not defined enum in nim is not equal to the first option |
23:40:26 | FromDiscord | <Elegantbeef> It is equal to the first option |
23:40:36 | FromDiscord | <Elegantbeef> So if you need none you use it otherwise you dont |
23:41:18 | FromDiscord | <guttural666> yeah yeah, but if you forget to set an enum, that is declared as {yes, no} you will get a false positive yknow |
23:41:30 | FromDiscord | <Elegantbeef> If you're using a set you get `{}` |
23:41:32 | FromDiscord | <guttural666> because nim will auto define it with a default val |
23:41:40 | FromDiscord | <guttural666> a set yes |
23:41:41 | FromDiscord | <Elegantbeef> That's not a false positive that's a empty set |
23:41:50 | FromDiscord | <Elegantbeef> A normal enum yes you will get yes |
23:42:02 | FromDiscord | <guttural666> yeah, now were talking 😄 |
23:42:41 | FromDiscord | <guttural666> that's what I meant and that is why I think it's prudent to reserve the standard initialized value of an enum to none/ n/a etc. |
23:43:01 | FromDiscord | <Elegantbeef> Well you're actually using none here so yes |
23:43:07 | * | pyrex is now known as coolbat666 |
23:43:14 | FromDiscord | <guttural666> yes! 😄 |
23:43:16 | FromDiscord | <Elegantbeef> I dont often have the need for `none` in my enums |
23:43:32 | FromDiscord | <guttural666> I don't either, just thinking ahead needlessly 😄 |
23:43:38 | FromDiscord | <Elegantbeef> I did say multiple times if you dont use `none` then there is no need for it |
23:43:46 | FromDiscord | <Elegantbeef> You use it as a value so you need it |
23:43:54 | FromDiscord | <guttural666> yes, now I get what you meant |
23:44:25 | * | coolbat666 is now known as pyrex |
23:45:24 | FromDiscord | <guttural666> everything that is not explicitly initialized or deliberately set to none can be dealt with a certain way |
23:45:58 | FromDiscord | <guttural666> everything that is implicitly |