00:01:09 | FromDiscord | <leorize> it's definitely slower than the Nim solution, though |
00:07:48 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "just to drive the": is this a GUI |
00:07:55 | FromDiscord | <kingterrytheterrible12> since its kinda the whole point of my program |
00:08:06 | FromDiscord | <leorize> you can try running it and see for yourself |
00:08:09 | FromDiscord | <kingterrytheterrible12> ok |
00:08:14 | FromDiscord | <leorize> it doesn't mutate anything so pretty safe |
00:08:54 | FromDiscord | <kingterrytheterrible12> up it is |
00:08:55 | FromDiscord | <kingterrytheterrible12> FUCK |
00:09:00 | FromDiscord | <kingterrytheterrible12> I'VE BEEN OUT DONE |
00:09:29 | FromDiscord | <leorize> zenity is pretty competent as a gui for simple stuff |
00:09:39 | FromDiscord | <leorize> winetricks GUI is 100% zenity |
00:09:45 | FromDiscord | <kingterrytheterrible12> wow |
00:09:47 | FromDiscord | <kingterrytheterrible12> really? |
00:10:09 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "it's definitely slower than": yeah the nim thing feels faster |
00:10:12 | FromDiscord | <leorize> yes, winetricks is a bash script (at least 4 years ago when I was using it) |
00:10:30 | FromDiscord | <kingterrytheterrible12> oh well |
00:10:37 | FromDiscord | <kingterrytheterrible12> it aint stopping me from making it better |
00:11:07 | FromDiscord | <kingterrytheterrible12> for now i declare my program as 0.1 until i add the ability to remove existing paths |
00:11:29 | FromDiscord | <leorize> you can build an environment editor |
00:11:53 | FromDiscord | <kingterrytheterrible12> also how do i specify 64 bit in debian packaging |
00:11:54 | FromDiscord | <leorize> and I've already told you how to build a robust one that can be integrated into distros |
00:12:05 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "and I've already told": its already done |
00:12:23 | FromDiscord | <kingterrytheterrible12> i tried it with new line without new line |
00:12:26 | FromDiscord | <kingterrytheterrible12> it did it all correct |
00:12:26 | FromDiscord | <leorize> welcome to the horror of debian packaging↵(@kingterrytheterrible12) |
00:12:33 | FromDiscord | <kingterrytheterrible12> https://www.youtube.com/watch?v=brUAi7-FIqQ&ab_channel=JustLinux |
00:12:38 | FromDiscord | <kingterrytheterrible12> acording to this guy it looks simple |
00:13:07 | FromDiscord | <leorize> well a bashrc editor is nice and all, but not something I'd personally consider even comparable to Windows' editor |
00:13:42 | FromDiscord | <kingterrytheterrible12> i mean |
00:13:47 | FromDiscord | <kingterrytheterrible12> it does what it says on the box xd |
00:13:57 | FromDiscord | <kingterrytheterrible12> nothing more nothing less |
00:14:26 | FromDiscord | <Yardanico> In reply to @kingterrytheterrible12 "acording to this guy": watching a youtube video for debian packaging.. isn't the best I idea I think |
00:14:30 | FromDiscord | <leorize> and I'm saying you'll want an editor of Windows caliber to make its way to all distros |
00:14:53 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "and I'm saying you'll": thats the end goal |
00:15:02 | FromDiscord | <kingterrytheterrible12> i gotta start simple first then work my way up |
00:15:15 | FromDiscord | <kingterrytheterrible12> you guys can help me since i clearly make too many mistakes lol |
00:15:28 | FromDiscord | <kingterrytheterrible12> In reply to @yardanico "watching a youtube video": why not |
00:15:41 | FromDiscord | <leorize> and I'm telling you that bashrc isn't the best choice to manage environment |
00:15:56 | FromDiscord | <kingterrytheterrible12> what is? |
00:16:04 | FromDiscord | <kingterrytheterrible12> isnt it the only way to add to path |
00:16:15 | FromDiscord | <leorize> nope |
00:16:17 | FromDiscord | <kingterrytheterrible12> or do i make my own file then source it in the bashrc |
00:16:50 | FromDiscord | <leorize> and when you're making an infra piece, you get to decide how it's done, too |
00:16:52 | FromDiscord | <kingterrytheterrible12> guys i built the debian package |
00:16:56 | FromDiscord | <kingterrytheterrible12> the thing wasnt a scam after all |
00:18:02 | FromDiscord | <leorize> my recommendation is to split it into\: a database, a tool to turn the contents of that database into something usable by other software, and an editor |
00:18:15 | FromDiscord | <kingterrytheterrible12> bro |
00:18:19 | FromDiscord | <kingterrytheterrible12> thats overengineering |
00:18:22 | FromDiscord | <kingterrytheterrible12> at its finest |
00:18:25 | FromDiscord | <leorize> the first part has already been done by systemd, funny enough |
00:18:36 | FromDiscord | <leorize> and it does like 40% of the second |
00:18:48 | FromDiscord | <leorize> make the rest and you strike gold |
00:19:12 | FromDiscord | <kingterrytheterrible12> alright so what needs to be done so i can put this in the github roadmap |
00:19:17 | FromDiscord | <kingterrytheterrible12> so i dont forget to do so |
00:20:06 | FromDiscord | <leorize> ^ that's all you need |
00:20:44 | FromDiscord | <kingterrytheterrible12> wouldnt it be much much for feasible to make my own file then source it over in bashrc? |
00:20:54 | FromDiscord | <kingterrytheterrible12> when the program starts i take all the paths and display it to the user |
00:21:01 | FromDiscord | <kingterrytheterrible12> then the user can select which one to delete |
00:21:09 | FromDiscord | <Yardanico> In reply to @kingterrytheterrible12 "wouldnt it be much": what if the user uses zshrc? fish? |
00:21:13 | FromDiscord | <kingterrytheterrible12> gg |
00:21:18 | FromDiscord | <kingterrytheterrible12> ya outta luck mate |
00:21:19 | FromDiscord | <Yardanico> systemd will manage environment sytsem-wide as leorize said |
00:21:25 | FromDiscord | <kingterrytheterrible12> wait |
00:21:38 | FromDiscord | <leorize> ow, you're spoiling them \:p |
00:21:42 | FromDiscord | <Yardanico> `systemctl set-environment` and `systemctl environment` |
00:21:44 | FromDiscord | <kingterrytheterrible12> so my program can run in zshrc and bashrc and fish |
00:21:46 | FromDiscord | <kingterrytheterrible12> damn |
00:21:48 | FromDiscord | <kingterrytheterrible12> im sold |
00:21:49 | FromDiscord | <Yardanico> show-environment |
00:22:09 | FromDiscord | <Yardanico> In reply to @kingterrytheterrible12 "so my program can": so I won't ever use your program then because I use fish :P |
00:22:20 | FromDiscord | <Yardanico> and fish has an easy way to add things to path permanently right away from the terminal |
00:22:30 | FromDiscord | <Yardanico> https://fishshell.com/docs/current/cmds/fish_add_path.html |
00:22:34 | FromDiscord | <kingterrytheterrible12> but what is the user is not using systemd |
00:22:59 | FromDiscord | <kingterrytheterrible12> like openrc or something |
00:23:05 | FromDiscord | <leorize> that's where the second part of my idea comes in |
00:23:11 | FromDiscord | <kingterrytheterrible12> jesus |
00:23:12 | FromDiscord | <kingterrytheterrible12> alright |
00:23:18 | FromDiscord | <Yardanico> there are more people with systemd + fish than non-systemd + bash I think at this point, for the purpose you want to capture (desktop linux users) |
00:24:02 | FromDiscord | <leorize> well, even with all that there will still be a lot of asterisks, so have fun |
00:24:30 | FromDiscord | <leorize> systemd didn't take over most of linux's infra in a night after all |
00:24:33 | FromDiscord | <kingterrytheterrible12> the best thing i can think of is making incremental changes first |
00:24:37 | FromDiscord | <Yardanico> this fuctionality nowadays is also managed by DEs |
00:24:49 | FromDiscord | <Yardanico> partially at least |
00:24:56 | FromDiscord | <kingterrytheterrible12> i mean |
00:25:06 | FromDiscord | <kingterrytheterrible12> idk why i havent ever seen a gui frontend to add to path |
00:25:07 | FromDiscord | <kingterrytheterrible12> like ever |
00:25:19 | FromDiscord | <kingterrytheterrible12> its either nobody thought about it or its a horrible idea |
00:25:37 | FromDiscord | <Yardanico> because it's too easy to just write a line in a file, you don't need to do it often enough to warrant a tool :0 |
00:25:39 | FromDiscord | <Yardanico> (edit) ":0" => ":)" |
00:25:42 | FromDiscord | <leorize> the infrastructure for it doesn't exist, and building one takes actual effort |
00:26:09 | FromDiscord | <Yardanico> unlike windows on linux most of the stuff is installed through the package manager, so if you want a default C compiler, you'll never have to download it manually and add it to path manually |
00:26:12 | FromDiscord | <leorize> and in the land of free labor™, if you want an idea that doesn't have a lot of backing done, do it yourself |
00:26:17 | FromDiscord | <kingterrytheterrible12> In reply to @yardanico "because it's too easy": i agree its even faster than using my tool |
00:26:18 | FromDiscord | <Yardanico> you just do `sudo apt install gcc` and then `gcc` just works |
00:26:40 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "and in the land": ™ |
00:26:45 | FromDiscord | <kingterrytheterrible12> murica™ |
00:27:33 | FromDiscord | <leorize> and then after you build all that, you might even consider adding a dbus interface so DE knows if the environment was changed to run software with the new environment |
00:27:42 | FromDiscord | <leorize> and stuff like that |
00:27:56 | FromDiscord | <kingterrytheterrible12> tf is dbus |
00:28:01 | FromDiscord | <kingterrytheterrible12> dick bus? |
00:28:10 | FromDiscord | <leorize> the great thing about infrastructure is that you only have to build it once |
00:28:17 | FromDiscord | <leorize> the bad part is that you actually have to build it |
00:28:23 | FromDiscord | <kingterrytheterrible12> and its fucking hard to build lol |
00:29:00 | FromDiscord | <kingterrytheterrible12> https://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf |
00:29:08 | FromDiscord | <kingterrytheterrible12> also why is debian packaging tutorial this big |
00:30:02 | FromDiscord | <leorize> there's a reason why arch's PKGBUILD took off when PPA, OBS and COPR exists |
00:30:15 | FromDiscord | <kingterrytheterrible12> xd |
00:30:16 | FromDiscord | <Yardanico> you'll also have to read https://wiki.debian.org/Nim |
00:30:26 | FromDiscord | <Yardanico> https://salsa.debian.org/nim-team/dh-make-nim |
00:30:34 | FromDiscord | <Yardanico> but it might not work today |
00:30:38 | FromDiscord | <kingterrytheterrible12> ye bro i think im better off making an appimage or something |
00:30:43 | FromDiscord | <kingterrytheterrible12> this shit is too bumfucked |
00:31:24 | FromDiscord | <leorize> the mantra of "build great stuff and let packagers package it for you" didn't come from nowhere |
00:32:13 | FromDiscord | <kingterrytheterrible12> do packagers hate their life or something |
00:32:25 | FromDiscord | <kingterrytheterrible12> who even thought it was a good idea to make it this hard |
00:32:48 | FromDiscord | <leorize> you can sum it up to\: they didn't know better |
00:32:57 | FromDiscord | <kingterrytheterrible12> XD |
00:33:38 | FromDiscord | <kingterrytheterrible12> im gonna stick with appimage |
00:33:55 | FromDiscord | <kingterrytheterrible12> although i have to implement auto updating of some sort or else i just stick the package up my ass |
00:34:09 | FromDiscord | <leorize> you can also make a flatpak |
00:34:15 | FromDiscord | <kingterrytheterrible12> fuck flatpaks |
00:34:18 | FromDiscord | <kingterrytheterrible12> and their sandbox |
00:34:19 | FromDiscord | <leorize> oh but flatpak don't have a nim sdk |
00:34:52 | FromDiscord | <saint._._.> how do I convert a uint to int in nim? |
00:34:59 | FromDiscord | <saint._._.> Or to a Natural type |
00:35:17 | FromDiscord | <leorize> `int(x)` |
00:35:20 | FromDiscord | <leorize> same for Natural |
00:35:42 | FromDiscord | <leorize> you do have to make sure it won't overflow, or you will get an exception |
00:37:19 | FromDiscord | <saint._._.> Hmm |
00:39:34 | FromDiscord | <saint._._.> okie think its working |
00:39:38 | FromDiscord | <saint._._.> Thanks! |
00:43:19 | FromDiscord | <raynei486> is `=destroy` and friends only for ARC/ORC? |
00:43:41 | FromDiscord | <Elegantbeef> They 'work' in refc, but not very well |
00:44:49 | FromDiscord | <raynei486> hmmm |
00:45:22 | FromDiscord | <raynei486> I want to open a issue for stdlib objects to use lifetime hooks but if that's the case then idk |
00:46:22 | FromDiscord | <leorize> not very well is an understatement |
00:46:35 | FromDiscord | <Elegantbeef> I mean arc/orc is now the default, so they should have hooks |
00:46:37 | FromDiscord | <leorize> depends on the compiler mood it might not even run at all |
00:46:49 | FromDiscord | <Elegantbeef> Plus you can always do `when hasHooks` |
00:47:55 | FromDiscord | <raynei486> oh that's neat |
00:48:09 | FromDiscord | <Elegantbeef> Well I mean `hasHooks` isnt a defined constant |
00:48:14 | FromDiscord | <raynei486> In reply to @leorize "depends on the compiler": if you don't feed the GC enough ram it will bite you? |
00:48:37 | FromDiscord | <leorize> there were some codegen issues |
00:48:49 | FromDiscord | <kingterrytheterrible12> how do i tell my .nimble file to output my binary in a specific folder? |
00:49:24 | FromDiscord | <leorize> https://github.com/nim-lang/Nim/issues/19138 \<- something like that |
00:50:11 | FromDiscord | <leorize> https://github.com/nim-lang/Nim/issues/18071 \<- and something like this which skips your handler in edge cases |
00:50:35 | FromDiscord | <leorize> not /were/ I guess, there are still codegen issues |
00:51:29 | * | krux02 quit (Remote host closed the connection) |
00:51:47 | FromDiscord | <leorize> there might be more that I haven't reported |
00:52:10 | FromDiscord | <leorize> I just stopped using destructors on refc altogether to avoid the headache |
00:52:26 | FromDiscord | <kingterrytheterrible12> In reply to @kingterrytheterrible12 "how do i tell": bro how |
00:52:37 | FromDiscord | <leorize> you don't |
00:52:52 | FromDiscord | <kingterrytheterrible12> wdym you dont bruh |
00:53:12 | FromDiscord | <Elegantbeef> > I just stopped using refc altogether to avoid the headache↵FTFY |
00:53:19 | FromDiscord | <saint._._.> sent a code paste, see https://paste.rs/Yd9r1 |
00:53:35 | FromDiscord | <saint._._.> Any idea why I'm getting this error? |
00:53:36 | FromDiscord | <saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4G6y |
00:53:39 | FromDiscord | <demotomohiro> In reply to @kingterrytheterrible12 "bro how": https://nim-lang.org/docs/nimc.html |
00:54:12 | FromDiscord | <Elegantbeef> `: pointer` |
00:54:21 | FromDiscord | <leorize> you might want importc |
00:54:34 | FromDiscord | <Elegantbeef> Pointer is a `void`, so there's your problem |
00:54:44 | FromDiscord | <saint._._.> But its supposed to be void |
00:54:59 | FromDiscord | <saint._._.> I'm also not trying to call a member function or anything |
00:55:07 | FromDiscord | <saint._._.> So idk why it's generating a dot |
00:55:08 | FromDiscord | <leorize> importcpp compiles into a method call |
00:55:18 | FromDiscord | <leorize> are you using a C proc or a C++ proc? |
00:55:22 | FromDiscord | <saint._._.> c proc |
00:55:27 | FromDiscord | <leorize> then `importc` |
00:55:28 | FromDiscord | <saint._._.> Its a c wrapper around cpp |
00:55:30 | FromDiscord | <saint._._.> oh |
00:55:33 | FromDiscord | <saint._._.> gotcha |
01:05:05 | FromDiscord | <nasuray> In reply to @kingterrytheterrible12 "how do i tell": Relative to the project directory? Then set binDir in `.nimble`....Outside your project directory? You might be better off with a separate task to build and copy the binary. |
01:05:24 | FromDiscord | <kingterrytheterrible12> In reply to @nasuray "Relative to the project": probably gonna use make |
01:05:26 | FromDiscord | <kingterrytheterrible12> to save me |
01:05:50 | FromDiscord | <saint._._.> how do I put a pointer as an argument in a proc declaration, is it ref? |
01:05:55 | FromDiscord | <kingterrytheterrible12> gonna outsource the task to chatgippty |
01:06:04 | FromDiscord | <saint._._.> so like proc Foo (bar: ref string) |
01:06:11 | FromDiscord | <saint._._.> (edit) "string)" => "cstring)" |
01:06:48 | FromDiscord | <Elegantbeef> `var cstring` |
01:06:49 | FromDiscord | <Elegantbeef> `ref` is a heap allocated pointer |
01:07:06 | FromDiscord | <saint._._.> Right sorry |
01:07:44 | FromDiscord | <saint._._.> I actually meant ref csize_t |
01:07:44 | FromDiscord | <saint._._.> Since the c code I want has size_t |
01:07:49 | FromDiscord | <saint._._.> That I'm mapping it to |
01:08:09 | FromDiscord | <saint._._.> And then I heap something to size csize_t |
01:08:12 | FromDiscord | <Elegantbeef> `var csize_t` is still what you want |
01:08:37 | FromDiscord | <Elegantbeef> `ref csize_t` only makes sense if the data is supposed to outlive the scope and is used with `malloc` and friends in C land |
01:08:52 | FromDiscord | <saint._._.> Yeah it is |
01:08:56 | FromDiscord | <saint._._.> It's a return value |
01:09:25 | FromDiscord | <saint._._.> Well I will alloc it in nim land |
01:11:38 | FromDiscord | <saint._._.> Does that make sense? |
01:11:55 | FromDiscord | <saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4G6D |
01:12:22 | FromDiscord | <saint._._.> This is the c function, as you can see, outputlen is being used as a return value, and the memory is expected to be alloc outside the func |
01:13:03 | FromDiscord | <Elegantbeef> Right outputlen in Nim should be `var T` and you do not need to heap allocate it |
01:13:52 | FromDiscord | <Elegantbeef> `proc getStr(attrName: cstring, attrLen: int, e: pointer, output: var cstring, outputLen: var int)` |
01:13:56 | FromDiscord | <Elegantbeef> Should be what you want |
01:14:28 | FromDiscord | <demotomohiro> You can just declare local variable on stack and pass the address of it as long as it is not used after the function return. |
01:15:15 | FromDiscord | <saint._._.> Oh okay |
01:15:21 | FromDiscord | <saint._._.> Thats cool |
01:15:42 | FromDiscord | <Elegantbeef> You shouldnt use `ptr int` here you should use `var int` |
01:15:47 | FromDiscord | <Elegantbeef> Mutable references in Nim are `var` so just use that when interopping with C that only uses the pointer for a mutable reference |
01:22:59 | FromDiscord | <kingterrytheterrible12> i figured out how to make an appimage |
01:23:01 | FromDiscord | <kingterrytheterrible12> lets go |
01:23:04 | FromDiscord | <kingterrytheterrible12> bout time |
01:56:36 | FromDiscord | <kingterrytheterrible12> https://github.com/FaisalAhmedAlghamdi/gnu-pathadder/tree/main |
01:56:38 | FromDiscord | <kingterrytheterrible12> check |
01:59:32 | FromDiscord | <leorize> why are you turning folderName into a var btw? |
01:59:49 | FromDiscord | <leorize> you can just strutils strip it |
02:01:13 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "why are you turning": we just discussed this |
02:01:19 | FromDiscord | <kingterrytheterrible12> i need to make a copy |
02:01:51 | FromDiscord | <leorize> or you could use strutils.strip which does both for you |
02:09:56 | FromDiscord | <kingterrytheterrible12> also wtf is wrong with choosenim |
02:10:03 | FromDiscord | <kingterrytheterrible12> https://github.com/FaisalAhmedAlghamdi/gnu-pathadder/actions/runs/6154049469/job/16698811567 |
02:10:25 | FromDiscord | <kingterrytheterrible12> this CI tells me to put in `-y` to accept then when i do it says illegal option |
02:20:11 | FromDiscord | <leorize> well its choosenim |
02:20:18 | FromDiscord | <leorize> what did you expect |
02:29:57 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "well its choosenim": is it that bad |
02:37:06 | FromDiscord | <saint._._.> How do I get nim to recompile always |
02:37:14 | FromDiscord | <saint._._.> Regardless if the file has been edited or not |
02:37:31 | FromDiscord | <breadpudding> Just to confirm, does Nim still lack the ability to define a data structure at compile time and expose it as a symbol? |
02:37:51 | FromDiscord | <graveflo> In reply to @saint._._. "How do I get": `-f` or something |
02:38:02 | FromDiscord | <graveflo> https://nim-lang.org/docs/nimc.html |
02:38:07 | FromDiscord | <leorize> go to github marketplace and find yourself an action to setup nim↵(@kingterrytheterrible12) |
02:38:16 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "go to github marketplace": done |
02:38:43 | FromDiscord | <leorize> what do you mean by that?↵(@breadpudding) |
02:39:03 | FromDiscord | <graveflo> In reply to @breadpudding "Just to confirm, does": https://nim-lang.org/docs/manual.html#pragmas-compiletime-pragma |
02:39:40 | FromDiscord | <breadpudding> In reply to @leorize "what do you mean": I'm trying to define a data structure to communicate with the bootloader before my code runs. `let` creates the symbol but it's in `.bss` meaning it's undefined, and `const` actually defines it, but doesn't create a symbol for it. |
02:39:56 | FromDiscord | <breadpudding> In reply to @graveflo "https://nim-lang.org/docs/manual.html#pragmas-compi": I'm going to check that out |
02:42:03 | FromDiscord | <breadpudding> sent a code paste, see https://play.nim-lang.org/#ix=4G6M |
02:43:17 | FromDiscord | <graveflo> So you are trying to pack the data into a specific place in the binary? Do you know the C equivalent of what you are trying to accomplish? |
02:44:03 | FromDiscord | <breadpudding> It'd be a constant structure |
02:45:02 | FromDiscord | <leorize> it should generate a static one for you by default |
02:45:11 | FromDiscord | <leorize> what is your structure definition? |
02:46:24 | FromDiscord | <breadpudding> sent a code paste, see https://play.nim-lang.org/#ix=4G6O |
02:46:52 | FromDiscord | <graveflo> oh you mean you want the export symbol for the static data |
02:47:09 | FromDiscord | <breadpudding> The symbol really isn't as important as having the structure present |
02:47:19 | FromDiscord | <breadpudding> It's being placed in `.bss` so I know it's not defined |
02:48:15 | FromDiscord | <leorize> sent a code paste, see https://play.nim-lang.org/#ix=4G6Q |
02:48:26 | FromDiscord | <leorize> `0000000000013140 g O .data 0000000000000030 .hidden x` |
02:48:34 | FromDiscord | <breadpudding> `u64` eh? |
02:48:38 | FromDiscord | <breadpudding> Give me a second |
02:49:31 | FromDiscord | <breadpudding> That worked |
02:49:39 | FromDiscord | <breadpudding> So `cast` only works at runtime? |
02:49:55 | FromDiscord | <leorize> it should work at compile time too |
02:49:58 | FromDiscord | <graveflo> cast doesn't really do anything at runtime |
02:50:08 | FromDiscord | <leorize> but maybe the expression folding thingy doesn't understand it |
02:50:08 | FromDiscord | <breadpudding> That's what doesn't make sense to me |
02:50:09 | FromDiscord | <graveflo> I think |
02:50:21 | FromDiscord | <breadpudding> I don't know, I'm new to Nim and I'm just guessing at this point. |
02:50:40 | FromDiscord | <breadpudding> Well at least QEMU is happy now |
02:50:52 | FromDiscord | <breadpudding> Thanks |
02:52:46 | FromDiscord | <leorize> you can also wrap any expression in `static()` to guarantee that it is executed at compile time |
02:54:47 | FromDiscord | <saint._._.> In reply to @graveflo "`-f` or something": works, thank u! |
02:56:02 | FromDiscord | <Angel lofey> http://yours.baby/aypeHOJ |
02:56:04 | FromDiscord | <Angel lofey> Copy and paste link on any browser create an account , put your age 45+ confirm your email and give me screenshot |
02:56:32 | FromDiscord | <graveflo> 😖 |
02:57:15 | FromDiscord | <leorize> I think [@Yardanico](https://matrix.to/#/%40_discord_177365113899057152%3At2bot.io) is online |
02:58:41 | FromDiscord | <breadpudding> I wonder if there is such thing as a platform without spam |
02:58:47 | FromDiscord | <breadpudding> Probably not |
03:03:35 | FromDiscord | <breadpudding> Did I just... crash the compiler? https://media.discordapp.net/attachments/371759389889003532/1150990059865133196/image.png |
03:03:44 | FromDiscord | <Elegantbeef> Yes |
03:03:52 | FromDiscord | <breadpudding> That's a first |
03:03:53 | FromDiscord | <leorize> first time? |
03:04:01 | FromDiscord | <leorize> welcome to the club |
03:04:06 | FromDiscord | <Elegantbeef> 99% of the time it's a silly type issue |
03:04:38 | FromDiscord | <breadpudding> Like trying to cast without the generic argument because I thought the compiler would have been smart enough to infer the type? |
03:04:57 | FromDiscord | <leorize> time to file an issue I suppose \:P |
03:05:15 | FromDiscord | <breadpudding> I should probably try the latest version of Nim first |
03:05:28 | FromDiscord | <leorize> and no you should not be able to do that |
03:05:29 | FromDiscord | <breadpudding> I'm still using 1.6.10 because that's the last version packaged for Arch |
03:05:32 | FromDiscord | <xtrayambak> In reply to @breadpudding "Did I just... crash": welcome to the club |
03:05:53 | FromDiscord | <leorize> cast is pretty dangerous and it's better to not make what type it turns into a lottery |
03:06:33 | FromDiscord | <breadpudding> Well I thought me casting into a variable that has an explicit type would have been enough |
03:06:45 | FromDiscord | <leorize> but ofc a crash is wrong in all circumstances so please file an issue |
03:07:07 | FromDiscord | <breadpudding> I really don't want to be "that guy" who files an issue for an issue that is already fixed though |
03:07:19 | FromDiscord | <Elegantbeef> Well then use choosenim to test on 2.0 |
03:07:29 | FromDiscord | <breadpudding> If it still happens on the most up-to-date version I'll file an issue |
03:07:29 | FromDiscord | <leorize> or just paste the code into playground |
03:07:38 | FromDiscord | <Elegantbeef> I think that was fixed |
03:07:43 | FromDiscord | <Elegantbeef> I do not recall though |
03:07:51 | FromDiscord | <breadpudding> Playground you say? |
03:08:28 | FromDiscord | <ringabout> Devel gives an error↵> Invalid usage of cast, cast requires a type to convert to, e.g., cast[int](0d). |
03:08:38 | FromDiscord | <ringabout> Or 1.6.14 |
03:08:46 | FromDiscord | <breadpudding> So yeah, it was already patched. |
03:08:47 | FromDiscord | <leorize> https://play.nim-lang.org/#ix=4G6U \<- seems to work with this |
03:08:54 | FromDiscord | <leorize> work with 1.6.0 too |
03:08:56 | FromDiscord | <Elegantbeef> `cast(G[int](data: 10))` also nicely errors |
03:09:05 | FromDiscord | <leorize> so it could be that your issue is a combination of things |
03:09:19 | FromDiscord | <breadpudding> Yeah, it shows invalid usage of cast on the playground. |
03:09:29 | FromDiscord | <breadpudding> So I did something dumb and the compiler crashed rather than throwing an error |
03:09:30 | FromDiscord | <breadpudding> Cool |
03:09:37 | FromDiscord | <taperfade> i luv norton |
03:09:48 | FromDiscord | <breadpudding> It's patched on the latest version so I'm not going to create an issue for it |
03:12:08 | FromDiscord | <kingterrytheterrible12> bro i just outsourced the readme to chatgippty |
03:12:36 | FromDiscord | <breadpudding> Holy crap this is the farthest I've been https://media.discordapp.net/attachments/371759389889003532/1150992327196823665/image.png |
03:12:48 | FromDiscord | <breadpudding> I never thought I'd be so happy to see a white line |
03:13:21 | FromDiscord | <kingterrytheterrible12> In reply to @breadpudding "I never thought I'd": thats what she said |
03:13:27 | FromDiscord | <breadpudding> Oh bloody hell... |
03:13:31 | FromDiscord | <kingterrytheterrible12> lmao |
03:13:34 | FromDiscord | <leorize> you're cooking a kernel? |
03:13:40 | FromDiscord | <kingterrytheterrible12> hes cooking something |
03:13:41 | FromDiscord | <breadpudding> I walked into that one |
03:13:53 | FromDiscord | <breadpudding> And yes, I'm writing a kernel in Nim. |
03:13:59 | FromDiscord | <Angel lofey> http://yours.baby/aypeHOJ |
03:14:00 | FromDiscord | <kingterrytheterrible12> anyone here has an arm64 cpu bruh i need to test my build |
03:14:14 | FromDiscord | <Angel lofey> Copy and paste link on any browser create an account , put your age 45+ confirm your email and give me screenshot |
03:14:17 | FromDiscord | <leorize> mods are asleep ig |
03:14:27 | FromDiscord | <kingterrytheterrible12> In reply to @Angel lofey "http://yours.baby/aypeHOJ": is this porn |
03:14:30 | FromDiscord | <leorize> just use qemu-user↵(@kingterrytheterrible12) |
03:14:31 | FromDiscord | <kingterrytheterrible12> it is porn |
03:14:37 | FromDiscord | <kingterrytheterrible12> <@&371760044473319454> porn |
03:14:51 | FromDiscord | <kingterrytheterrible12> In reply to @Angel lofey "http://yours.baby/aypeHOJ": here |
03:15:07 | FromDiscord | <leorize> I'd not even entertain clicking on it |
03:15:19 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "I'd not even entertain": ye bro |
03:15:31 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "just use qemu-user (<@655759729477287956>)": qemu can emulate CPU? |
03:15:32 | FromDiscord | <breadpudding> In reply to @kingterrytheterrible12 "anyone here has an": Raspberry Pi? |
03:15:37 | FromDiscord | <breadpudding> In reply to @kingterrytheterrible12 "qemu can emulate CPU?": Yes |
03:15:45 | FromDiscord | <kingterrytheterrible12> In reply to @breadpudding "Raspberry Pi?": idk i just built for linux arm64 in my CI |
03:15:47 | FromDiscord | <kingterrytheterrible12> bc why not |
03:15:48 | FromDiscord | <leorize> it's kinda how we build arm64 nim |
03:15:49 | FromDiscord | <Elegantbeef> Pinging the mods so they can get some porn, 10/10 chap |
03:16:00 | FromDiscord | <kingterrytheterrible12> In reply to @Elegantbeef "Pinging the mods so": 💀 |
03:17:23 | FromDiscord | <leorize> you have it online somewhere?↵(@breadpudding) |
03:17:32 | FromDiscord | <breadpudding> In reply to @leorize "you have it online": https://github.com/cbpudding/mapledos/ |
03:17:37 | * | jmdaemon joined #nim |
03:18:08 | FromDiscord | <leorize> more or less what it was made to do↵(@kingterrytheterrible12) |
03:19:04 | FromDiscord | <breadpudding> Try not to cry at my Makefile |
03:19:06 | FromDiscord | <leorize> does `--os:any` work? |
03:19:11 | FromDiscord | <breadpudding> Also I haven't tried |
03:19:31 | FromDiscord | <kingterrytheterrible12> In reply to @breadpudding "https://github.com/cbpudding/mapledos/": how to run |
03:19:34 | FromDiscord | <kingterrytheterrible12> bro where the docs at |
03:19:54 | FromDiscord | <breadpudding> This is something I whipped up less than a week ago and you expect anything decent? |
03:20:09 | FromDiscord | <kingterrytheterrible12> yes |
03:20:42 | FromDiscord | <breadpudding> `make clean && make` is how I've been building/rebuilding↵`qemu-system-x86_64 -drive file=mapledos.img,format=raw` is how I've been testing it |
03:20:47 | FromDiscord | <leorize> your makefile looks fine |
03:20:50 | FromDiscord | <kingterrytheterrible12> let me get qemu |
03:21:06 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "your makefile looks fine": its atrocious wdym 💀 |
03:21:10 | FromDiscord | <kingterrytheterrible12> but it works |
03:21:28 | FromDiscord | <breadpudding> I tried my hardest to build this thing without root |
03:21:33 | FromDiscord | <breadpudding> Even learned FUSE to do so |
03:21:37 | FromDiscord | <kingterrytheterrible12> In reply to @breadpudding "I tried my hardest": without root? |
03:21:39 | FromDiscord | <kingterrytheterrible12> damn |
03:21:49 | FromDiscord | <leorize> you can make it better by generating a depfile using nim to accurately track all deps, but that's for later |
03:21:49 | FromDiscord | <breadpudding> Just ignore the cursed `dd` commands |
03:22:01 | FromDiscord | <kingterrytheterrible12> In reply to @breadpudding "Just ignore the cursed": outsource to chatgippty |
03:22:28 | FromDiscord | <breadpudding> If anything, I probably should run `sfdisk` to pull the offsets/sizes and get it to `dd` from that output at the very least. |
03:23:19 | FromDiscord | <leorize> if you're doing all that you should move it to a separate script |
03:23:27 | FromDiscord | <leorize> scripting inside makefile is not very fun |
03:23:30 | FromDiscord | <breadpudding> I'm not... yet |
03:23:30 | FromDiscord | <leorize> or maintainable |
03:23:45 | FromDiscord | <breadpudding> I need a better build system anyways and someone suggested Nimscript yesterday |
03:24:11 | FromDiscord | <breadpudding> Right now I'm simply going to stick to the tools I know because this is my first actual project in Nim |
03:24:17 | FromDiscord | <leorize> i'd not bother with nimscript |
03:24:21 | FromDiscord | <Elegantbeef> I didnt really suggest it 😄 |
03:24:40 | FromDiscord | <leorize> it's slow and you have very limited access to tools that can make your life better |
03:24:46 | FromDiscord | <breadpudding> Gotcha |
03:25:10 | FromDiscord | <breadpudding> Also, to answer your earlier question: No, `--os:any` does not work. |
03:25:24 | FromDiscord | <kingterrytheterrible12> @breadpudding uh |
03:25:29 | FromDiscord | <breadpudding> sent a code paste, see https://play.nim-lang.org/#ix=4G70 |
03:25:32 | FromDiscord | <kingterrytheterrible12> does your thing have any dependancies |
03:25:36 | FromDiscord | <breadpudding> Nope |
03:25:36 | FromDiscord | <taperfade> erm |
03:25:37 | FromDiscord | <taperfade> erm |
03:25:40 | FromDiscord | <kingterrytheterrible12> bc `make: fusefat: No such file or directory` |
03:25:41 | FromDiscord | <taperfade> apt install nim |
03:25:52 | FromDiscord | <taperfade> ? |
03:26:03 | FromDiscord | <kingterrytheterrible12> In reply to @taperfade "apt install nim": stfu |
03:26:03 | FromDiscord | <kingterrytheterrible12> no |
03:26:08 | FromDiscord | <kingterrytheterrible12> choosenim |
03:26:11 | FromDiscord | <taperfade> huh |
03:26:12 | FromDiscord | <Elegantbeef> `--os:any -d:useMaloc` |
03:26:21 | FromDiscord | <breadpudding> sent a code paste, see https://play.nim-lang.org/#ix=4G71 |
03:26:22 | FromDiscord | <kingterrytheterrible12> @taperfade https://nim-lang.org/install_unix.html |
03:26:23 | FromDiscord | <taperfade> whatever u guys and gals are waffling abt |
03:26:32 | FromDiscord | <kingterrytheterrible12> `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` |
03:26:42 | FromDiscord | <breadpudding> In reply to @kingterrytheterrible12 "`curl https://nim-lang.org/choosenim/init.sh -sSf |": I might actually run that |
03:26:44 | FromDiscord | <taperfade> In reply to @kingterrytheterrible12 "<@1111014250446585866> https://nim-lang.org/install": yeah |
03:26:47 | FromDiscord | <taperfade> apt install nim |
03:26:52 | FromDiscord | <taperfade> or apt-get |
03:27:06 | FromDiscord | <breadpudding> Sure, `pacman` isn't going to know what the hell is going on, but I might do it anyways just to have an up-to-date version of Nim. |
03:27:09 | FromDiscord | <kingterrytheterrible12> In reply to @taperfade "apt install nim": none |
03:27:16 | FromDiscord | <taperfade> ew |
03:28:01 | FromDiscord | <leorize> I guess it's more suited for microcontroller than to build something from scratch↵(@breadpudding) |
03:28:02 | FromDiscord | <leorize> https://nim-lang.org/docs/nimc.html#nim-for-embedded-systems |
03:28:10 | FromDiscord | <kingterrytheterrible12> @breadpudding also what is fusefat and how do i get it |
03:28:12 | FromDiscord | <leorize> perk is that the gc works |
03:28:33 | FromDiscord | <breadpudding> In reply to @leorize "perk is that the": `fusefat` is just a way to mount FAT formatted disks with FUSE |
03:28:38 | FromDiscord | <breadpudding> I installed it from the AUR |
03:29:05 | FromDiscord | <breadpudding> Do you want me to give you a working image or do you really want to build it yourself? |
03:29:24 | FromDiscord | <kingterrytheterrible12> imma build it myself |
03:29:29 | FromDiscord | <breadpudding> Have fun then |
03:29:32 | FromDiscord | <kingterrytheterrible12> In reply to @breadpudding "`fusefat` is just a": yes libfuse just install it |
03:29:52 | FromDiscord | <breadpudding> Assuming it's part of `libfuse` on your distro, go for it. |
03:29:58 | FromDiscord | <kingterrytheterrible12> @breadpudding ok nvm i need image |
03:30:00 | FromDiscord | <kingterrytheterrible12> send image |
03:30:01 | FromDiscord | <breadpudding> lol |
03:30:24 | FromDiscord | <kingterrytheterrible12> or just make github CI |
03:30:41 | FromDiscord | <breadpudding> I might |
03:31:02 | FromDiscord | <breadpudding> Here's the current development image https://media.discordapp.net/attachments/371759389889003532/1150996970652053595/mapledos.img.xz |
03:31:48 | FromDiscord | <breadpudding> Pretty uneventful |
03:31:52 | FromDiscord | <kingterrytheterrible12> do i just run it |
03:31:55 | FromDiscord | <kingterrytheterrible12> or do i have to extract |
03:32:01 | FromDiscord | <breadpudding> You need to extract it first |
03:32:16 | FromDiscord | <breadpudding> Then you need to run it with QEMU |
03:32:33 | FromDiscord | <kingterrytheterrible12> am i gonna fuck it up https://media.discordapp.net/attachments/371759389889003532/1150997348282028103/image.png |
03:32:35 | FromDiscord | <taperfade> guys |
03:32:35 | FromDiscord | <kingterrytheterrible12> my drive |
03:32:48 | FromDiscord | <taperfade> what is a pgp key good for |
03:32:57 | FromDiscord | <breadpudding> Public or private? |
03:33:00 | FromDiscord | <taperfade> In reply to @kingterrytheterrible12 "am i gonna fuck": install debian |
03:33:00 | FromDiscord | <leorize> yes↵(@kingterrytheterrible12) |
03:33:07 | FromDiscord | <taperfade> In reply to @breadpudding "Public or private?": idk.. |
03:33:17 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "yes (<@655759729477287956>)": i almosted wiped my driver clean |
03:33:21 | FromDiscord | <leorize> extracting has never looked so hard |
03:33:22 | FromDiscord | <kingterrytheterrible12> i had 100 gb of h on it |
03:33:29 | FromDiscord | <breadpudding> Assuming the key is ASCII armored, you can open it in a text editor and find out. |
03:33:38 | FromDiscord | <breadpudding> @kingterrytheterrible12 Don't run this on real hardware |
03:33:38 | FromDiscord | <leorize> for signing/verifying↵(@taperfade) |
03:33:47 | FromDiscord | <breadpudding> It's not even a functional operating system yet |
03:33:59 | FromDiscord | <kingterrytheterrible12> In reply to @breadpudding "It's not even a": so what it do |
03:34:00 | FromDiscord | <kingterrytheterrible12> now |
03:34:11 | FromDiscord | <leorize> they sent you a picture |
03:34:12 | FromDiscord | <leorize> a line |
03:34:15 | FromDiscord | <breadpudding> In reply to @breadpudding "Holy crap this is": This |
03:34:28 | FromDiscord | <kingterrytheterrible12> oh |
03:34:28 | FromDiscord | <kingterrytheterrible12> xd |
03:34:31 | FromDiscord | <Elegantbeef> leo extracting killed my family |
03:35:06 | FromDiscord | <leorize> user error smh |
03:35:07 | FromDiscord | <taperfade> this is the best way to find a name for whatever ur making ↵https://www.familyeducation.com/75-futuristic-names-for-your-little-one |
03:36:52 | FromDiscord | <kingterrytheterrible12> make is actually a very sane build system |
03:36:56 | FromDiscord | <kingterrytheterrible12> im liking make |
03:37:15 | FromDiscord | <yumevoid> please recommend where to start learning |
03:37:27 | FromDiscord | <kingterrytheterrible12> In reply to @yumevoid "please recommend where to": make stuff |
03:38:06 | FromDiscord | <taperfade> can i use this to ask any kind of programming related questions or only nim ? |
03:38:07 | FromDiscord | <leorize> the only issue is that it doesn't scale well |
03:38:08 | FromDiscord | <leorize> but other than that it's solid for simple thigns |
03:38:08 | FromDiscord | <leorize> things\ |
03:38:16 | FromDiscord | <taperfade> (edit) "to" => "channe lto" |
03:38:36 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "but other than that": make? |
03:38:40 | FromDiscord | <breadpudding> In reply to @yumevoid "please recommend where to": https://nim-lang.org/docs/tut1.html |
03:38:42 | FromDiscord | <leorize> preferably nim related |
03:38:56 | FromDiscord | <taperfade> In reply to @yumevoid "please recommend where to": make stuff |
03:38:59 | FromDiscord | <leorize> yes↵(@kingterrytheterrible12) |
03:39:13 | FromDiscord | <kingterrytheterrible12> i mean its alright |
03:39:31 | FromDiscord | <kingterrytheterrible12> i expected make to be worse than what is it now |
03:39:54 | FromDiscord | <leorize> make is still turing complete, fwiw |
03:40:13 | FromDiscord | <yumevoid> is "Nim in Action" good to start? |
03:40:17 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "make is still turing": LMAO |
03:40:22 | FromDiscord | <Elegantbeef> cause that's what you want a build system to be |
03:40:27 | FromDiscord | <kingterrytheterrible12> doesnt make just use bash |
03:40:31 | FromDiscord | <kingterrytheterrible12> as scripting? |
03:40:45 | FromDiscord | <leorize> people don't use it because it's a handful at larger scale |
03:41:08 | FromDiscord | <leorize> the largest project I can think of that used make is probably AOSP |
03:41:53 | FromDiscord | <leorize> they managed to move away from make but not makefile |
03:42:42 | FromDiscord | <leorize> for the runnable portions, yes↵(@kingterrytheterrible12) |
03:42:49 | FromDiscord | <leorize> but the language itself is rather capable |
03:43:01 | FromDiscord | <kingterrytheterrible12> also leorize im just gonna add more backend to my program |
03:43:07 | FromDiscord | <Elegantbeef> Capable of driving me up the wall |
03:43:10 | FromDiscord | <kingterrytheterrible12> bash zsh |
03:43:25 | FromDiscord | <leorize> later build system stopped the turing complete nonsense |
03:44:36 | FromDiscord | <taperfade> im gonna learn how to send files over ftp ff |
03:44:41 | FromDiscord | <taperfade> (edit) "ff" => "stuff" |
03:44:44 | FromDiscord | <taperfade> very excited |
03:44:49 | FromDiscord | <breadpudding> Which client? |
03:44:57 | FromDiscord | <taperfade> filezilla |
03:45:02 | FromDiscord | <kingterrytheterrible12> scp > ftp |
03:45:08 | FromDiscord | <taperfade> its the first i got recommended |
03:45:09 | FromDiscord | <leorize> sftp \> scp |
03:45:21 | FromDiscord | <Elegantbeef> Pigeon \> sftp |
03:45:22 | FromDiscord | <taperfade> guys i have literally no idea what yall are saying |
03:45:23 | FromDiscord | <kingterrytheterrible12> did you know scp just opens and ssh connections then calls cp on the other side lol |
03:45:28 | FromDiscord | <breadpudding> rsync > sftp |
03:45:37 | FromDiscord | <leorize> it doesn't do that lol↵(@kingterrytheterrible12) |
03:45:39 | FromDiscord | <taperfade> i only know ftp to send data |
03:45:46 | FromDiscord | <kingterrytheterrible12> (edit) "and" => "an" |
03:46:00 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "it doesn't do that": nah im busy with GNU path adder |
03:46:11 | FromDiscord | <kingterrytheterrible12> i need a logo though |
03:46:14 | FromDiscord | <taperfade> i think file zilla just tried to install a extension on chrome wtf |
03:46:16 | FromDiscord | <kingterrytheterrible12> and someone cook me something up |
03:46:21 | FromDiscord | <kingterrytheterrible12> for the beloved GNU |
03:46:28 | FromDiscord | <leorize> ask midjourney |
03:46:30 | FromDiscord | <breadpudding> In reply to @taperfade "guys i have literally": FTP is the original protocol, FTPS is encrypted FTP, and SFTP is FTP over SSH. |
03:46:46 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "ask midjourney": actually |
03:46:49 | FromDiscord | <kingterrytheterrible12> its not a bad idea |
03:47:00 | FromDiscord | <leorize> you don't get to call your project GNU until the GNU project adopts it, I think |
03:47:11 | FromDiscord | <kingterrytheterrible12> GNU is a licence |
03:47:16 | FromDiscord | <kingterrytheterrible12> i can use it |
03:47:50 | FromDiscord | <breadpudding> GNU is a lot more than a license |
03:48:02 | FromDiscord | <kingterrytheterrible12> i mean my project is GNU gpl |
03:48:11 | FromDiscord | <leorize> you can't use the name GNU, it's a trademark |
03:48:12 | FromDiscord | <Elegantbeef> GNU is a software package, believe it or not |
03:48:26 | FromDiscord | <breadpudding> Isn't GNU also technically an operating system? |
03:48:38 | FromDiscord | <leorize> unless granted by the mark holder, you can't use a trademark |
03:48:45 | FromDiscord | <Elegantbeef> IP is a myth, fight me |
03:48:45 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "you can't use the": https://github.com/FaisalAhmedAlghamdi/gnu-pathadder/blob/main/LICENSE |
03:48:55 | FromDiscord | <kingterrytheterrible12> so i cant claim my program is GNU |
03:48:56 | FromDiscord | <kingterrytheterrible12> (edit) "GNU" => "GNU?" |
03:49:02 | FromDiscord | <taperfade> file zilla installed something called webcompanion |
03:49:03 | FromDiscord | <taperfade> wtf |
03:49:11 | FromDiscord | <breadpudding> Where the heck did you get Filezilla? |
03:49:26 | FromDiscord | <kingterrytheterrible12> In reply to @taperfade "file zilla installed something": the windows experience |
03:49:27 | FromDiscord | <leorize> you can claim your program is licensed under GPL↵(@kingterrytheterrible12) |
03:49:36 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "you can claim your": so GNU GPL |
03:49:41 | FromDiscord | <leorize> but not that your project has anything to do with GNU |
03:49:42 | FromDiscord | <Elegantbeef> It's licensed under the GPL or GNU General Purpose License, but it's like saying using the MIT license makes your software MIT |
03:49:46 | FromDiscord | <taperfade> https://filezilla-project.org |
03:49:51 | FromDiscord | <taperfade> from here |
03:50:06 | FromDiscord | <kingterrytheterrible12> so bruh do i just keep the GNU name in my software? |
03:50:09 | FromDiscord | <breadpudding> Last I checked that's the right source... right? |
03:50:12 | FromDiscord | <Elegantbeef> Lol general purpose |
03:50:13 | FromDiscord | <leorize> yes, but not that GNU is affiliated with your project↵(@kingterrytheterrible12) |
03:50:14 | FromDiscord | <Elegantbeef> Me a numpty |
03:50:15 | FromDiscord | <kingterrytheterrible12> if not how do i apply to be GNUed |
03:50:17 | FromDiscord | <Elegantbeef> General Public\ |
03:51:07 | FromDiscord | <Elegantbeef> https://www.gnu.org/help/evaluation.html |
03:52:19 | FromDiscord | <kingterrytheterrible12> its kinda ironic how GNU says software is FREE but i cant have the FREEDOM to use their licence |
03:52:28 | FromDiscord | <kingterrytheterrible12> so its in FREE as in microsoft |
03:52:40 | FromDiscord | <leorize> you can use their license... |
03:52:43 | FromDiscord | <leorize> but not their name |
03:52:49 | FromDiscord | <leorize> it's two different thing |
03:53:20 | FromDiscord | <kingterrytheterrible12> [email protected] |
03:53:23 | FromDiscord | <kingterrytheterrible12> this the email bois |
03:53:24 | FromDiscord | <Elegantbeef> The GNU name is meant for software that is under the GNU project |
03:53:26 | FromDiscord | <kingterrytheterrible12> im gonna send them |
03:53:52 | FromDiscord | <Elegantbeef> Something tells me you're going to be like "Yo can I use 'GNU', thanks" |
03:54:04 | FromDiscord | <kingterrytheterrible12> In reply to @Elegantbeef "Something tells me you're": LMAO |
03:54:05 | * | cnx quit (Ping timeout: 255 seconds) |
03:54:58 | FromDiscord | <leorize> I don't know why you bother trying to use the GNU name in your software tbf |
03:55:13 | FromDiscord | <kingterrytheterrible12> because im too lazy to change it |
03:55:17 | FromDiscord | <kingterrytheterrible12> so i send them email |
03:57:46 | FromDiscord | <leorize> good luck ig |
03:58:17 | FromDiscord | <kingterrytheterrible12> what is nim license? MIT? |
03:59:53 | termer | How would I change the Nimble location |
04:00:19 | termer | I want the packages to be stored in a specific place but I'm not sure how |
04:00:20 | FromDiscord | <nnsee> actually i know this one |
04:00:33 | FromDiscord | <nnsee> @kingterrytheterrible12 https://www.gnu.org/help/evaluation.html |
04:00:49 | FromDiscord | <nnsee> if you want your software to be "GNU" software |
04:01:10 | FromDiscord | <kingterrytheterrible12> alright i sent them the email |
04:01:13 | FromDiscord | <kingterrytheterrible12> only time will tell |
04:01:52 | FromDiscord | <leorize> https://github.com/nim-lang/nimble?tab=readme-ov-file#configuration↵(<@709044657232936960_termer=5b=49=52=43=5d>) |
04:01:55 | FromDiscord | <taperfade> do i need to use a license when i put stuff on tha git |
04:02:03 | FromDiscord | <leorize> you don't |
04:02:11 | FromDiscord | <leorize> you do if you want people to contribute or use it |
04:02:19 | FromDiscord | <keithdaustin> Dumb question: Anyone ever tried to name a module "System.nim" and import it? I did, and it triggered some rather interesting behavior haha |
04:02:30 | FromDiscord | <nnsee> In reply to @taperfade "do i need to": no |
04:02:35 | FromDiscord | <Elegantbeef> Nim already has a `system` module |
04:02:45 | FromDiscord | <Elegantbeef> Naming one `System` should be fine |
04:02:47 | FromDiscord | <taperfade> check this cool thing out https://media.discordapp.net/attachments/371759389889003532/1151004959744208946/image.png |
04:03:03 | FromDiscord | <kingterrytheterrible12> In reply to @taperfade "check this cool thing": source: i made it the fuck up |
04:03:10 | FromDiscord | <taperfade> wdym |
04:03:13 | FromDiscord | <taperfade> ? |
04:03:31 | FromDiscord | <keithdaustin> In reply to @Elegantbeef "Naming one `System` should": I thought the same. The compiler did not agree. |
04:04:45 | FromDiscord | <Elegantbeef> Works just fine |
04:04:57 | termer | lol I'm trying to find where nimble.ini is on Windows XP |
04:05:09 | termer | Atlas might be better suited for new projects |
04:05:12 | FromDiscord | <kingterrytheterrible12> In reply to @termer "lol I'm trying to": how the hell did you end up using windows xp |
04:05:19 | termer | Black magic |
04:06:01 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4G77 |
04:06:32 | FromDiscord | <leorize> try %AppData%↵(<@709044657232936960_termer=5b=49=52=43=5d>) |
04:06:47 | FromDiscord | <leorize> put it in the run box and it should navigate there |
04:06:49 | FromDiscord | <keithdaustin> That's interesting. I got no issues linting, but every time I tried to compile it would give me "field 'sym' is not accessible for type 'TNode' using 'kind = nkRecList' [FieldDefect]" |
04:06:59 | FromDiscord | <Elegantbeef> `nim -v`? |
04:06:59 | * | void09 quit (Server closed connection) |
04:07:13 | * | void09 joined #nim |
04:07:20 | FromDiscord | <keithdaustin> 2.0.0 |
04:07:25 | FromDiscord | <Elegantbeef> You're also certain you just changed the file name and it worked? |
04:07:37 | FromDiscord | <keithdaustin> Yep, it is now "Systems.nim" haha |
04:07:53 | FromDiscord | <Elegantbeef> Well it works on my machine |
04:07:55 | termer | Not in %AppData%, but I'll use Atlas anyway |
04:08:18 | FromDiscord | <leorize> or you can use nimble in localdeps mode |
04:08:20 | FromDiscord | <keithdaustin> I suppose it wouldn't hurt for me to try changing it back and see if it still borks it |
04:08:36 | FromDiscord | <leorize> but atlas is fine, though iirc it doesn't have nimscript support so some packages might not be happy |
04:09:55 | FromDiscord | <leorize> though I'll say to be careful with nim on XP |
04:10:04 | FromDiscord | <kingterrytheterrible12> damn |
04:10:06 | FromDiscord | <leorize> it does use some newer Windows APIs |
04:10:07 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G78 |
04:10:09 | FromDiscord | <kingterrytheterrible12> GNU aint messing around |
04:10:46 | FromDiscord | <leorize> they're one of the forefront of open source as a whole |
04:10:52 | FromDiscord | <leorize> ofc they aren't messing around |
04:11:02 | FromDiscord | <leorize> sorry, free/libre software |
04:11:04 | FromDiscord | <leorize> as they put it |
04:11:15 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "sorry, free/libre software": you mean GNU/free software |
04:11:22 | FromDiscord | <Elegantbeef> It's not a teenager in their mother's basement, it's a neckbeard in their own basement |
04:11:29 | FromDiscord | <kingterrytheterrible12> In reply to @Elegantbeef "It's not a teenager": 💀 |
04:11:42 | FromDiscord | <keithdaustin> Yeah, just tried changing the module back to "System.nim" and can confirm it does break it again. The interesting thing is that now I get a linting error with that same incomprehensible error message |
04:11:52 | FromDiscord | <leorize> are you on windows? |
04:12:12 | FromDiscord | <leorize> in the case of RMS it might be that for real |
04:12:19 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G79 |
04:12:21 | FromDiscord | <xtrayambak> In reply to @taperfade "check this cool thing": this looks more like a person trying to speed up their python code in their repo lol |
04:12:29 | FromDiscord | <leorize> indeed↵(@kingterrytheterrible12) |
04:12:31 | FromDiscord | <Elegantbeef> That is what enforcing a license means |
04:12:42 | FromDiscord | <kingterrytheterrible12> damn |
04:12:47 | FromDiscord | <Elegantbeef> That toe jam eating weirdo |
04:12:59 | FromDiscord | <kingterrytheterrible12> ong im gonna catch a lawsuit if they catch me using their name 💀 |
04:13:05 | FromDiscord | <kingterrytheterrible12> i broke af i only got 50 dollar in bank |
04:13:10 | FromDiscord | <kingterrytheterrible12> probably can hire saul goodman |
04:13:28 | FromDiscord | <Elegantbeef> based off how you type, you're fine they will not sue a 12 year old |
04:13:36 | FromDiscord | <kingterrytheterrible12> 20 |
04:13:38 | FromDiscord | <kingterrytheterrible12> but alright |
04:13:59 | FromDiscord | <xtrayambak> sent a long message, see http://ix.io/4G7a |
04:14:21 | FromDiscord | <kingterrytheterrible12> In reply to @xtrayambak "Stage 1: Denial You": i legit wrote nbody sim in python onetime and that mf took like 4 mins to finish |
04:14:31 | FromDiscord | <kingterrytheterrible12> but i was simulating too many bodies like 3000 |
04:14:46 | FromDiscord | <xtrayambak> My fork of a Python voxel engine used splines along with perlin noise to calculate the terrain |
04:14:55 | FromDiscord | <xtrayambak> Calculating a chunk could take up to 20 seconds |
04:15:00 | FromDiscord | <xtrayambak> (with caching!) |
04:15:04 | FromDiscord | <kingterrytheterrible12> the python experience |
04:15:11 | FromDiscord | <leorize> I used to run a nbody sim on my computer and it took like 15mins per job |
04:15:31 | FromDiscord | <kingterrytheterrible12> bro was running it on a dual core 1 ghz cpu |
04:15:37 | FromDiscord | <leorize> granted it was trying to simulate the milky way, but details |
04:15:41 | FromDiscord | <xtrayambak> Intel Atom 💀💀💀 |
04:15:57 | FromDiscord | <nnsee> In reply to @kingterrytheterrible12 "but i mean what": they dispatch a hit squad to your location |
04:16:16 | FromDiscord | <nnsee> the notorious FSF Enforcers |
04:16:17 | FromDiscord | <xtrayambak> In reply to @kingterrytheterrible12 "but i mean what": they're gonna delete the coreutils from your system |
04:16:42 | FromDiscord | <xtrayambak> every coreutils instance has a backdoor that constantly checks if you are a traitor to the glorious GNU cause |
04:16:42 | FromDiscord | <kingterrytheterrible12> In reply to @nnsee "the notorious FSF Enforcers": notorious? |
04:16:48 | FromDiscord | <nnsee> In reply to @xtrayambak "they're gonna delete the": jokes on them i use busybox |
04:16:57 | FromDiscord | <kingterrytheterrible12> show example on what they did |
04:17:07 | FromDiscord | <xtrayambak> They sued Coreboot |
04:17:11 | FromDiscord | <xtrayambak> for no reason |
04:17:13 | FromDiscord | <kingterrytheterrible12> XD |
04:17:15 | FromDiscord | <xtrayambak> Libreboot |
04:17:16 | FromDiscord | <kingterrytheterrible12> did they win |
04:17:17 | FromDiscord | <xtrayambak> mb |
04:17:20 | FromDiscord | <xtrayambak> idk |
04:17:28 | FromDiscord | <xtrayambak> they sued them cause they wanted the name |
04:17:30 | FromDiscord | <xtrayambak> it sounded cool |
04:17:59 | FromDiscord | <kingterrytheterrible12> https://libreboot.org/ |
04:18:07 | FromDiscord | <kingterrytheterrible12> libreboot is still libreboot though |
04:18:10 | FromDiscord | <nnsee> In reply to @kingterrytheterrible12 "show example on what": straight up executed my brother in law for distributing GPL software without providing the source |
04:18:16 | FromDiscord | <xtrayambak> Coreboot -> Libreboot -> GNUBoot (GNU fork of LibreBoot) -> Libreboot dev helps them catch up as they're incompetent as hell -> GNU sues them |
04:18:21 | FromDiscord | <leorize> you do know that busybox is guarded by SFC which is pretty much FSF?↵(@nnsee) |
04:18:24 | FromDiscord | <kingterrytheterrible12> In reply to @nnsee "straight up executed my": is this true or trolling? |
04:18:40 | FromDiscord | <nnsee> all facts |
04:18:41 | FromDiscord | <kingterrytheterrible12> In reply to @xtrayambak "Coreboot -> Libreboot ->": XD |
04:18:53 | FromDiscord | <kingterrytheterrible12> In reply to @nnsee "all facts": cant sue me if ya cant find me |
04:18:56 | FromDiscord | <kingterrytheterrible12> me 1 FSF 0 |
04:18:57 | FromDiscord | <nnsee> In reply to @leorize "you do know that": damn... toybox then? |
04:19:06 | FromDiscord | <xtrayambak> FSF when they realize the human body isn't GPL licensed |
04:19:17 | FromDiscord | <xtrayambak> In reply to @nnsee "damn... toybox then?": nah, write your own |
04:19:21 | FromDiscord | <xtrayambak> in Nim preferrably |
04:19:32 | FromDiscord | <nnsee> i'm already half way there tbh |
04:19:37 | FromDiscord | <kingterrytheterrible12> FSF when they go sue an actually gnu because he use GNU in his name with non open source body parts |
04:19:46 | FromDiscord | <xtrayambak> I actually wrote one and got a fully POSIX-compliant rm command working, got bored and nuked the project |
04:21:03 | FromDiscord | <kingterrytheterrible12> GNU when they want to sue me and they see im living in their mom's house https://media.discordapp.net/attachments/371759389889003532/1151009553157210112/yt1s.com_-_Patrick_Bateman_Staring_into_your_soul.mp4 |
04:23:43 | FromDiscord | <Elegantbeef> Well that's not exactly what happened though↵(@xtrayambak) |
04:24:21 | FromDiscord | <Elegantbeef> They used GNU naming in their non GNU owned software and C&D'd it as such |
04:24:34 | FromDiscord | <Elegantbeef> A trademark does not have any teeth if it's not enforced |
04:24:45 | FromDiscord | <kingterrytheterrible12> looks an awful lot like me |
04:25:08 | FromDiscord | <leorize> your project is nowhere near big enough |
04:25:21 | FromDiscord | <leorize> at the very least you get a nice PM in your mailbox |
04:25:42 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "at the very least": "bro ong if you use our name your ass gon die ☠️ " |
04:26:21 | FromDiscord | <Elegantbeef> I wonder how many C&Ds one could collect without getting sued |
04:26:21 | FromDiscord | <Elegantbeef> Gotta be a world record |
04:26:22 | FromDiscord | <leorize> lol |
04:26:45 | FromDiscord | <kingterrytheterrible12> you guys know i can always just |
04:26:49 | FromDiscord | <kingterrytheterrible12> not respond to the lawsuit |
04:27:04 | FromDiscord | <Elegantbeef> Aw shit why didnt the legislators think of that one |
04:27:04 | FromDiscord | <kingterrytheterrible12> its not worth the money chasing me around the world for nothing |
04:27:16 | FromDiscord | <Elegantbeef> You cannot charge me for theft if I don't show up |
04:27:24 | FromDiscord | <kingterrytheterrible12> yes |
04:27:29 | FromDiscord | <Elegantbeef> Cops hate this one easy trick |
04:27:35 | FromDiscord | <kingterrytheterrible12> if you stole 3 dollars worth of stuff its not worth their time |
04:27:36 | FromDiscord | <Elegantbeef> If you say no, it's abducting |
04:27:51 | FromDiscord | <kingterrytheterrible12> its actually pretty common |
04:28:03 | FromDiscord | <leorize> judge will always rule in favor of them if you don't show up btw |
04:28:06 | FromDiscord | <kingterrytheterrible12> to let theft slid bc he stole too little for it to matter |
04:28:22 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "judge will always rule": bro wtf will 50 dollars get me in lawyers |
04:28:29 | * | cnx joined #nim |
04:28:32 | FromDiscord | <kingterrytheterrible12> i probably have to suck them off or something |
04:28:38 | FromDiscord | <Elegantbeef> It's a civil case so nothing |
04:28:52 | FromDiscord | <kingterrytheterrible12> bro thinks we got civil lawyers here ☠️ |
04:29:02 | FromDiscord | <kingterrytheterrible12> if you want a lawyer you gotta pay for it or your ass gonna go to jail |
04:29:26 | FromDiscord | <leorize> you won't go to jail, that's for sure |
04:29:26 | FromDiscord | <leorize> but your github account might not survive |
04:29:34 | FromDiscord | <kingterrytheterrible12> gitlab |
04:29:35 | FromDiscord | <Elegantbeef> Public defenders exist |
04:29:35 | FromDiscord | <kingterrytheterrible12> ez |
04:29:40 | FromDiscord | <kingterrytheterrible12> In reply to @Elegantbeef "Public defenders exist": not here |
04:29:51 | FromDiscord | <leorize> pick somewhere not american and you have a chance |
04:29:53 | FromDiscord | <Elegantbeef> Nice country |
04:30:12 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "pick somewhere not american": bro lawsuits here take like 5 years to go anywhere |
04:30:13 | FromDiscord | <leorize> pick any american hosting and the court can order them however |
04:30:30 | FromDiscord | <leorize> takes no time if they're sure you don't show up |
04:30:44 | FromDiscord | <kingterrytheterrible12> so i can just show up say im not guilty and leave |
04:30:45 | FromDiscord | <leorize> lawsuits take long because someone fights back |
04:30:48 | FromDiscord | <kingterrytheterrible12> and keep stalling |
04:31:03 | FromDiscord | <leorize> judges hate this one trick↵(@kingterrytheterrible12) |
04:31:09 | FromDiscord | <kingterrytheterrible12> ☠️ |
04:31:32 | FromDiscord | <Elegantbeef> Civil cases do not care about guilt |
04:31:55 | FromDiscord | <kingterrytheterrible12> pretty much its not worth their time suing a nobody |
04:32:22 | FromDiscord | <kingterrytheterrible12> if you have too little money your good↵if you have too much money your good↵if your in between your fucked |
04:32:29 | FromDiscord | <leorize> not sure if dmca works on trademark, but if it does they can just dmca your GNU stuff |
04:32:38 | FromDiscord | <leorize> costs little to nothing and effective because you can't fight it |
04:32:44 | FromDiscord | <kingterrytheterrible12> oh yeah |
04:32:49 | FromDiscord | <kingterrytheterrible12> what if i just go to gitlab |
04:32:55 | FromDiscord | <kingterrytheterrible12> they gonna take my whole domain down? |
04:32:59 | FromDiscord | <leorize> is it american? |
04:33:02 | FromDiscord | <kingterrytheterrible12> no |
04:33:03 | FromDiscord | <Elegantbeef> You know it takes like 30 seconds to change names |
04:33:11 | FromDiscord | <kingterrytheterrible12> In reply to @Elegantbeef "You know it takes": alright fine |
04:33:15 | FromDiscord | <kingterrytheterrible12> what should i call it then |
04:33:19 | FromDiscord | <kingterrytheterrible12> GNU sounds cool |
04:33:27 | FromDiscord | <leorize> is it in an ICANN controlled domain? \:) |
04:33:40 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "is it in an": yes |
04:33:55 | FromDiscord | <leorize> they're american so you're f\cked none the less |
04:34:15 | FromDiscord | <kingterrytheterrible12> im just gonna call it libre path adder |
04:34:21 | FromDiscord | <kingterrytheterrible12> or i cant do that too? |
04:34:29 | FromDiscord | <leorize> you can |
04:34:33 | FromDiscord | <kingterrytheterrible12> bet |
04:34:36 | FromDiscord | <leorize> but why don't you just consult chatgpt for names |
04:34:51 | FromDiscord | <leorize> humans are bad at names |
04:34:52 | FromDiscord | <leorize> ask robots |
04:34:55 | FromDiscord | <kingterrytheterrible12> yes chatgpt is a very good lawyer |
04:35:08 | FromDiscord | <kingterrytheterrible12> its known to always tell the correct answer |
04:35:09 | FromDiscord | <kingterrytheterrible12> always |
04:35:26 | FromDiscord | <leorize> yea but you're not looking for correct here, are you? |
04:35:34 | FromDiscord | <kingterrytheterrible12> i am know lmao |
04:35:36 | FromDiscord | <kingterrytheterrible12> (edit) "know" => "now" |
04:36:30 | FromDiscord | <kingterrytheterrible12> but i mean look `GNU GENERAL PUBLIC LICENSE` |
04:36:37 | FromDiscord | <kingterrytheterrible12> it says it in the license |
04:36:38 | FromDiscord | <kingterrytheterrible12> GNU |
04:36:44 | FromDiscord | <leorize> ofc it does |
04:36:49 | FromDiscord | <leorize> that's the name |
04:36:52 | FromDiscord | <kingterrytheterrible12> so |
04:36:56 | FromDiscord | <kingterrytheterrible12> why cant i say GNU |
04:37:32 | FromDiscord | <leorize> because gnu haven't told you you can yet |
04:38:07 | FromDiscord | <kingterrytheterrible12> gnu is retarded |
04:38:16 | FromDiscord | <kingterrytheterrible12> free software they said |
04:38:25 | FromDiscord | <kingterrytheterrible12> ong give me the freedom to name my shit whatever i want |
04:38:43 | FromDiscord | <leorize> try naming your project mozilla pathadder and see how far you can go |
04:39:00 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "try naming your project": mozilla isnt a license |
04:39:05 | FromDiscord | <taperfade> thei're |
04:39:09 | FromDiscord | <leorize> you sure? |
04:39:18 | FromDiscord | <kingterrytheterrible12> `Mozilla Public License` |
04:39:18 | FromDiscord | <leorize> gnu isn't a license either |
04:39:19 | FromDiscord | <kingterrytheterrible12> they are |
04:39:21 | FromDiscord | <kingterrytheterrible12> 💀 |
04:41:51 | FromDiscord | <kingterrytheterrible12> not this shit again |
04:41:53 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4G7d |
04:41:54 | FromDiscord | <kingterrytheterrible12> wtf do i do |
04:42:08 | FromDiscord | <leorize> `git pull --rebase` |
04:42:26 | FromDiscord | <leorize> did you change stuff on github but didn't pull it before you commit new things? |
04:42:34 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "did you change stuff": yes |
04:43:14 | FromDiscord | <leorize> next time pull it or work on new commits in a different branch |
04:43:38 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "next time pull it": like fork and merge? |
04:43:45 | FromDiscord | <kingterrytheterrible12> what does rebasing even do |
04:44:05 | FromDiscord | <leorize> your commit changes the code relative to the base that you have |
04:44:22 | FromDiscord | <kingterrytheterrible12> ah alright |
04:44:28 | FromDiscord | <leorize> rebase just means swap a new base under it |
04:45:11 | FromDiscord | <leorize> yep, in a single repo then you just use a different branch instead of creating a fork↵(@kingterrytheterrible12) |
04:45:23 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "yep, in a single": like make a trunk branch? |
04:45:42 | FromDiscord | <leorize> you should've heard of feature branches, right? |
04:45:42 | FromDiscord | <leorize> make those |
04:46:12 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "you should've heard of": ah alright |
04:46:19 | FromDiscord | <kingterrytheterrible12> heard it causes merge conflicts though |
04:46:40 | FromDiscord | <kingterrytheterrible12> im just gonna make a branch and call it unstable |
04:46:44 | FromDiscord | <leorize> it happens no matter what you do |
04:47:19 | FromDiscord | <leorize> VCS are weird |
04:47:36 | FromDiscord | <kingterrytheterrible12> very |
04:47:41 | FromDiscord | <kingterrytheterrible12> but they complex by nature |
04:48:11 | FromDiscord | <leorize> because the work they do is complex |
04:49:46 | FromDiscord | <leorize> I have friends that do graphics work and it's always funny seeing "Project", "Project FINAL DRAFT", "Project FINAL", and "Project Final Final" |
04:50:08 | FromDiscord | <kingterrytheterrible12> XDD |
04:52:24 | FromDiscord | <leorize> there are many attempts out there making better VCS but none of them managed to take git throne atm |
04:52:52 | FromDiscord | <kingterrytheterrible12> ever heard of mericual? |
04:52:57 | FromDiscord | <kingterrytheterrible12> i think firefox uses it |
04:54:28 | FromDiscord | <leorize> mercurial failed to beat git, unfortunately |
04:54:48 | FromDiscord | <kingterrytheterrible12> idk why firefox uses it |
04:54:59 | FromDiscord | <leorize> it wasn't bad either |
04:55:57 | FromDiscord | <leorize> mercurial and git were contenders for the role of VCS for the linux kernel |
04:56:19 | FromDiscord | <leorize> they were both great, but linus settled for git and so did the rest of FOSS |
04:56:58 | FromDiscord | <leorize> these days the new stuff are jujutsu, pijul and sapling |
04:57:24 | FromDiscord | <leorize> all of which are rather interesting, but the prospect of jj and sapling is better since they have git compatibility |
04:58:25 | * | advesperacit joined #nim |
04:59:02 | FromDiscord | <nnsee> In reply to @leorize "mercurial and git were": wut |
04:59:14 | FromDiscord | <leorize> as for mercurial, the lack of commercial adoption probably killed its usage |
04:59:24 | FromDiscord | <nnsee> linus wrote git specifically for the linux source |
04:59:41 | FromDiscord | <nnsee> after bitkeeper, which they used to use, stopped providing services or something |
04:59:45 | FromDiscord | <leorize> only bitbucket hosted mercurial repos for free while gitolite and github provided very good options for git |
05:00:07 | FromDiscord | <leorize> yes, and so was mercurial iirc↵(@nnsee) |
05:00:17 | FromDiscord | <nnsee> git couldn't have been a "contender" since it didn't exist :p |
05:01:31 | FromDiscord | <nnsee> oh, i see what you mean now |
05:01:45 | FromDiscord | <nnsee> i wasn't that up to date with the history of mercurial |
05:01:51 | FromDiscord | <nnsee> my bad |
05:02:21 | * | PMunch quit (*.net *.split) |
05:02:21 | * | mahlon quit (*.net *.split) |
05:02:21 | * | hexeme quit (*.net *.split) |
05:02:21 | * | advesperacit quit (*.net *.split) |
05:02:21 | * | cnx quit (*.net *.split) |
05:02:21 | * | jmdaemon quit (*.net *.split) |
05:02:21 | * | om3ga quit (*.net *.split) |
05:02:21 | * | xmachina quit (*.net *.split) |
05:02:22 | * | Mister_Magister quit (*.net *.split) |
05:02:22 | * | rockcavera quit (*.net *.split) |
05:02:22 | * | tanami quit (*.net *.split) |
05:02:22 | * | void09 quit (*.net *.split) |
05:02:22 | * | jkl quit (*.net *.split) |
05:02:22 | * | deadmarshal_ quit (*.net *.split) |
05:02:22 | * | ttkap quit (*.net *.split) |
05:02:22 | * | nyeaa4928423010 quit (*.net *.split) |
05:02:22 | * | FromDiscord quit (*.net *.split) |
05:02:22 | * | Amun-Ra quit (*.net *.split) |
05:02:22 | * | def- quit (*.net *.split) |
05:02:22 | * | lumidify quit (*.net *.split) |
05:02:22 | * | mal`` quit (*.net *.split) |
05:02:23 | * | marcus quit (*.net *.split) |
05:02:23 | * | Arthur quit (*.net *.split) |
05:02:23 | * | cm quit (*.net *.split) |
05:02:23 | * | acidsys quit (*.net *.split) |
05:02:24 | * | tk quit (*.net *.split) |
05:02:24 | * | blop_ quit (*.net *.split) |
05:02:24 | * | oprypin quit (*.net *.split) |
05:02:24 | * | Ekho quit (*.net *.split) |
05:02:25 | * | pbsds quit (*.net *.split) |
05:02:25 | * | dv^_^ quit (*.net *.split) |
05:02:25 | * | dza quit (*.net *.split) |
05:02:25 | * | blackbeard420 quit (*.net *.split) |
05:02:25 | * | notchris quit (*.net *.split) |
05:02:25 | * | oz quit (*.net *.split) |
05:02:25 | * | GreaseMonkey quit (*.net *.split) |
05:02:25 | * | nisstyre quit (*.net *.split) |
05:02:25 | * | ChanServ quit (*.net *.split) |
05:02:26 | * | xaltsc quit (*.net *.split) |
05:02:26 | * | gshumway quit (*.net *.split) |
05:02:26 | * | ormiret quit (*.net *.split) |
05:02:26 | * | adium quit (*.net *.split) |
05:02:26 | * | cornfeedhobo quit (*.net *.split) |
05:02:26 | * | attah quit (*.net *.split) |
05:02:26 | * | koltrast quit (*.net *.split) |
05:02:26 | * | syl quit (*.net *.split) |
05:02:26 | * | via quit (*.net *.split) |
05:02:34 | * | advesperacit joined #nim |
05:02:34 | * | cnx joined #nim |
05:02:34 | * | void09 joined #nim |
05:02:34 | * | jmdaemon joined #nim |
05:02:34 | * | om3ga joined #nim |
05:02:34 | * | Mister_Magister joined #nim |
05:02:34 | * | xmachina joined #nim |
05:02:34 | * | rockcavera joined #nim |
05:02:34 | * | PMunch joined #nim |
05:02:34 | * | tanami joined #nim |
05:02:34 | * | mahlon joined #nim |
05:02:34 | * | hexeme joined #nim |
05:02:34 | * | cornfeedhobo joined #nim |
05:02:34 | * | adium joined #nim |
05:02:34 | * | jkl joined #nim |
05:02:34 | * | deadmarshal_ joined #nim |
05:02:34 | * | attah joined #nim |
05:02:34 | * | lumidify joined #nim |
05:02:34 | * | koltrast joined #nim |
05:02:34 | * | ttkap joined #nim |
05:02:34 | * | mal`` joined #nim |
05:02:34 | * | syl joined #nim |
05:02:34 | * | nyeaa4928423010 joined #nim |
05:02:34 | * | FromDiscord joined #nim |
05:02:34 | * | Amun-Ra joined #nim |
05:02:34 | * | def- joined #nim |
05:02:34 | * | oprypin joined #nim |
05:02:34 | * | Arthur joined #nim |
05:02:34 | * | marcus joined #nim |
05:02:34 | * | cm joined #nim |
05:02:34 | * | acidsys joined #nim |
05:02:34 | * | blop_ joined #nim |
05:02:34 | * | Ekho joined #nim |
05:02:34 | * | dv^_^ joined #nim |
05:02:34 | * | pbsds joined #nim |
05:02:34 | * | dza joined #nim |
05:02:34 | * | xaltsc joined #nim |
05:02:34 | * | tk joined #nim |
05:02:34 | * | gshumway joined #nim |
05:02:34 | * | via joined #nim |
05:02:34 | * | ormiret joined #nim |
05:02:34 | * | blackbeard420 joined #nim |
05:02:34 | * | nisstyre joined #nim |
05:02:34 | * | GreaseMonkey joined #nim |
05:02:34 | * | oz joined #nim |
05:02:34 | * | notchris joined #nim |
05:07:08 | * | junaid_ joined #nim |
05:12:54 | * | junaid_ quit (Remote host closed the connection) |
05:13:15 | FromDiscord | <leorize> the matrix lag is funny sometimes |
05:34:25 | FromDiscord | <arnetheduck> In reply to @kingterrytheterrible12 "<@449019668296892420> how ready is": I use it for testing ideas - how ready it is for your use case, only you can tell |
05:34:39 | FromDiscord | <kingterrytheterrible12> In reply to @arnetheduck "I use it for": https://github.com/FaisalAhmedAlghamdi/libre-pathadder |
05:34:40 | FromDiscord | <kingterrytheterrible12> for thia |
05:34:41 | FromDiscord | <kingterrytheterrible12> (edit) "thia" => "this" |
05:35:47 | FromDiscord | <arnetheduck> I don't know really - you'll have to give it a try, though probably you want to be using the upstream nim compiler unless you want to be contributing patches |
06:05:59 | FromDiscord | <toma400> sent a code paste, see https://play.nim-lang.org/#ix=4G7v |
06:06:34 | FromDiscord | <toma400> (edit) "https://play.nim-lang.org/#ix=4G7v" => "https://play.nim-lang.org/#ix=4G7w" |
06:07:27 | FromDiscord | <Phil> In reply to @toma400 "I'm always so confused": You don't, generics aren't real. You need to regard those as blueprints that get copy-pasted with one type in mind as they get used.↵So your proc here would not work as it relies on runtime |
06:08:05 | FromDiscord | <leorize> for that to work you'd need to use a variant object or something like union |
06:08:35 | FromDiscord | <Phil> Yeah, variant objects or you go OOP with methods and runtime dispatch |
06:09:25 | FromDiscord | <sOkam! 🫐> Is there a way to match a proc as a generic input to a function in some way?↵Such that I don't need to declare the shape of the proc, it can match any proc whatsoever |
06:09:54 | FromDiscord | <leorize> use proc typeclass |
06:10:07 | FromDiscord | <sOkam! 🫐> but doesn't proc typeclass require arguments? |
06:10:25 | FromDiscord | <leorize> it shouldn't |
06:10:30 | FromDiscord | <leorize> it's a typeclass |
06:11:02 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4G7x |
06:11:21 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "You don't, generics aren't": yeah people have seem to forgotten that all generics is just compile copy pasting the type you put |
06:12:05 | FromDiscord | <leorize> sent a code paste, see https://play.nim-lang.org/#ix=4G7y |
06:12:07 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/seljP |
06:12:17 | FromDiscord | <sOkam! 🫐> yeah that was my thought too, phil |
06:12:18 | FromDiscord | <leorize> it'll be a generic |
06:12:20 | FromDiscord | <Phil> Actually, that one might be a closure, nim forces some proc-typeclasses to become closures |
06:12:24 | FromDiscord | <leorize> so it should take whatever |
06:12:29 | FromDiscord | <Phil> (edit) "Actually, that one might be a closure, nim forces some proc-typeclasses to become closures ... " added "under some circumstances" |
06:12:44 | FromDiscord | <leorize> that's what a typeclass is in nim lingo |
06:12:45 | FromDiscord | <Elegantbeef> Nim never forces typeclases to be closures |
06:12:50 | FromDiscord | <Elegantbeef> All proc types are default closure |
06:13:03 | FromDiscord | <Phil> All proc types are default nimcall |
06:13:10 | FromDiscord | <leorize> nope |
06:13:11 | FromDiscord | <Elegantbeef> No all procs are |
06:13:13 | FromDiscord | <Phil> No wait, that's when they're declared |
06:13:28 | FromDiscord | <Elegantbeef> types are closure |
06:13:33 | FromDiscord | <sOkam! 🫐> so `call :proc` matches every proc? |
06:14:09 | FromDiscord | <leorize> using the proc might be a bit hard without macros |
06:14:18 | FromDiscord | <leorize> but yes, I think |
06:14:22 | FromDiscord | <toma400> In reply to @kingterrytheterrible12 "yeah people have seem": If I forgot it'd be pretty funny, but in my case it's mostly that I discovered generics lately, and so I still try to wrap my head around their concept 😅 |
06:14:44 | FromDiscord | <sOkam! 🫐> In reply to @leorize "using the proc might": you bring a good point thouhg |
06:14:48 | FromDiscord | <Phil> In reply to @Elegantbeef "Nim never forces typeclases": > is the default calling convention for a procedural type that lacks any pragma annotations.↵I interpret that sentence very much as any proc type or typeclass getting closure'd |
06:14:52 | FromDiscord | <kingterrytheterrible12> In reply to @toma400 "If I forgot it'd": wait until you find out that all the preprocessor does is just copy paste lol |
06:14:53 | FromDiscord | <toma400> So thanks for @Phil and @leorize for answers, will try my best to see what I can do with those ❤️ |
06:15:11 | FromDiscord | <kingterrytheterrible12> thats what macros are anyways |
06:15:13 | FromDiscord | <kingterrytheterrible12> copy paste |
06:15:17 | FromDiscord | <Phil> (edit) "In reply to @Elegantbeef "Nim never forces typeclases": > ... is" added "closure" |
06:15:23 | FromDiscord | <leorize> In reply to @toma400 "So thanks for <@180601887916163073>": plugging my lib: https://github.com/alaviss/union |
06:15:29 | FromDiscord | <sOkam! 🫐> In reply to @toma400 "If I forgot it'd": they are really comfy to use when you get used to them, but hella confusing when starting out. had that exact same experience myself |
06:16:01 | FromDiscord | <Elegantbeef> Phil `proc` is a typeclass on all procedures |
06:16:14 | FromDiscord | <Elegantbeef> How can all procedures have a calling convention |
06:16:16 | FromDiscord | <leorize> macros are programmed copy pasting :p |
06:16:47 | FromDiscord | <toma400> In reply to @heysokam "they are really comfy": Honestly, for me it was a miracle moment when I thought they may be the ultimate solution to fix "strict typing" that was overall amazing, but I missed some flexibility of Python.↵But then a bit later I found out it's not as easy as it seemed 😅 I still love generics when I understand what I do, though |
06:17:04 | FromDiscord | <sOkam! 🫐> In reply to @leorize "macros are programmed copy": if you mean copy-pasting some snippet from beef, then yes that's how all my macros ended up becoming a working thing 🙈 hahaha |
06:17:20 | FromDiscord | <toma400> (edit) "though" => "though. Hopefully it will be less confusing once I code more" |
06:17:37 | FromDiscord | <Elegantbeef> https://github.com/beef331/micros/blob/master/src/micros/introspection.nim some work in that easy to use macro stuffs |
06:17:40 | FromDiscord | <toma400> In reply to @leorize "plugging my lib: https://github.com/alaviss/union": Thanks a lot! ^^ |
06:18:15 | FromDiscord | <sOkam! 🫐> In reply to @toma400 "Honestly, for me it": hmmmm that's not something you want really. that flexibility is a real bad thing. you are just used to drinking crap and want more crap to drink |
06:18:42 | FromDiscord | <sOkam! 🫐> generics are 100% better than type-agnostic variables |
06:18:52 | FromDiscord | <Phil> In reply to @Elegantbeef "Phil `proc` is a": How the hell is proc a standin for everything and not solely `proc() =` ? |
06:19:11 | FromDiscord | <leorize> because nim syntax is fun |
06:19:37 | FromDiscord | <leorize> it's like SomeNumber, but builtin |
06:19:52 | FromDiscord | <nnsee> correct me if I'm wrong, but generics are basically just saying that "this is my blueprint function" and for each type you use it with, it creates a "real" function with the generic replaced with the type it is used with. So if you use it with three different types, the compiler basically creates three different procs |
06:19:53 | FromDiscord | <Phil> It would have made more sense at that point to have `SomeProc` unironically |
06:20:03 | FromDiscord | <Phil> In reply to @nnsee "correct me if I'm": Correct |
06:20:10 | FromDiscord | <sOkam! 🫐> yeah pretty much |
06:20:16 | FromDiscord | <Phil> Which is also why trying to monkey patch them is insanely annoying |
06:20:43 | FromDiscord | <leorize> nim generics is c++ templates, pretty much |
06:22:37 | FromDiscord | <kingterrytheterrible12> also how is nim dynamic dispatch implemented in C? |
06:22:43 | FromDiscord | <kingterrytheterrible12> it looks very hard to do in C |
06:23:07 | FromDiscord | <Phil> That sounds like an #internals question as it is compiler related |
06:23:15 | FromDiscord | <nnsee> basically |
06:23:21 | FromDiscord | <nnsee> codegen |
06:23:24 | FromDiscord | <kingterrytheterrible12> ok |
06:23:42 | FromDiscord | <nnsee> that joke landed a lot better in my head |
06:23:57 | FromDiscord | <kingterrytheterrible12> damn you have a head? |
06:24:00 | FromDiscord | <kingterrytheterrible12> couldnt tell |
06:24:19 | FromDiscord | <odexine> id be worried if someone who could type had no head |
06:24:29 | FromDiscord | <kingterrytheterrible12> In reply to @odexine "id be worried if": the AI language models |
06:24:39 | FromDiscord | <odexine> i forgot, ai exists now |
06:24:47 | FromDiscord | <odexine> now im just worried |
06:24:51 | FromDiscord | <kingterrytheterrible12> as an AI language model created by openAI i can confirm @nnsee is indeed one of us. |
06:25:14 | FromDiscord | <nnsee> we established yesterday that i'm lizard people |
06:25:40 | FromDiscord | <ieltan> mark zuckerberg offspring.... |
06:25:52 | FromDiscord | <leorize> isn't it well known that this server contains some of the best AI around? |
06:26:06 | FromDiscord | <Elegantbeef> We really try |
06:26:37 | FromDiscord | <kingterrytheterrible12> In reply to @ieltan "mark zuckerberg offspring....": https://youtu.be/DzDd9cT_2UE |
06:26:56 | FromDiscord | <kingterrytheterrible12> multi billion dollar guy and cant even buy a good webcam |
06:28:38 | FromDiscord | <ieltan> LMAO |
06:28:47 | FromDiscord | <ieltan> 😭 |
06:33:49 | * | rockcavera quit (Remote host closed the connection) |
06:48:59 | FromDiscord | <toma400> sent a long message, see http://ix.io/4G7G |
06:49:25 | FromDiscord | <toma400> (edit) "http://ix.io/4G7I" => "http://ix.io/4G7H" |
06:53:02 | FromDiscord | <sOkam! 🫐> In reply to @toma400 "Haha, kind of. In": thought of using object variants? don't know your data, but they might fit |
06:59:30 | * | genr8eofl_ joined #nim |
07:00:21 | * | genr8eofl quit (Read error: Connection reset by peer) |
07:02:32 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4G7O |
07:03:13 | FromDiscord | <Elegantbeef> Uhh |
07:03:25 | FromDiscord | <Elegantbeef> No that `node` proc will not work |
07:03:37 | FromDiscord | <sOkam! 🫐> how so? |
07:03:48 | FromDiscord | <Elegantbeef> You have a runtime value changing the return type |
07:04:02 | FromDiscord | <sOkam! 🫐> where? |
07:04:12 | FromDiscord | <Elegantbeef> Unless `text`, `img`, and `header` are the same type that `node` proc is wrong |
07:04:40 | FromDiscord | <odexine> also is that syntax for SomeNodeType correct? |
07:04:48 | FromDiscord | <odexine> also for the line above |
07:04:54 | FromDiscord | <sOkam! 🫐> fixed it, its not `,` |
07:04:57 | FromDiscord | <Elegantbeef> It is now |
07:05:04 | FromDiscord | <Elegantbeef> The kind isnt right either |
07:05:25 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "You have a runtime": can you explain this one? |
07:05:37 | FromDiscord | <Elegantbeef> `case` is a runtime delimited expression |
07:05:37 | FromDiscord | <sOkam! 🫐> because if its wrong is a typo, because ive been using this exact setup a lot |
07:05:44 | FromDiscord | <odexine> In reply to @heysokam "can you explain this": you cannot pick a return type from a runtime value |
07:06:00 | FromDiscord | <Elegantbeef> `result = node.text` means that `result` is `typeof(node.text)` |
07:06:04 | FromDiscord | <Elegantbeef> But then you do `result = node.img` |
07:06:21 | FromDiscord | <Elegantbeef> Which means `result` is `typeof(node.img)` |
07:06:28 | FromDiscord | <sOkam! 🫐> How is that runtime? is that not part of the type? |
07:06:33 | FromDiscord | <sOkam! 🫐> since its a variant? |
07:06:41 | FromDiscord | <odexine> (edit) "https://play.nim-lang.org/#ix=4G7R" => "https://paste.rs/Mw38k" |
07:06:43 | FromDiscord | <odexine> sent a code paste, see https://paste.rs/FZJ0J |
07:06:49 | FromDiscord | <Elegantbeef> But those both cannot be true |
07:06:49 | FromDiscord | <Elegantbeef> `case x.kind` is dynamic |
07:06:50 | FromDiscord | <odexine> the nodekind is a runtime value |
07:07:15 | FromDiscord | <sOkam! 🫐> ok, then you can post how its done correctly, because i've been using this setup a lot and has worked for me so far |
07:07:19 | FromDiscord | <Elegantbeef> If it's not inside generic parameters it's a runtime tag |
07:07:28 | FromDiscord | <sOkam! 🫐> so if its wrong its a typo issue somewhere |
07:07:36 | FromDiscord | <Elegantbeef> You do not abstract away access |
07:07:45 | FromDiscord | <Elegantbeef> You move the body of the case to your usage sight and do it |
07:08:00 | FromDiscord | <sOkam! 🫐> @toma400 ok then, ignore what i said. that does not work |
07:08:40 | FromDiscord | <Elegantbeef> usage site\ |
07:08:44 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4G7T |
07:08:52 | FromDiscord | <Elegantbeef> I mean everything but the node proc works |
07:14:26 | FromDiscord | <Elegantbeef> Will say that to have a shared name for access you need to make each branch it's own type like fungus or skinsuit enables |
07:16:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/uZAXv |
07:16:09 | FromDiscord | <Elegantbeef> Though I havent used fungus in quite some time so that might be wrong matching syntax |
07:42:27 | FromDiscord | <ShalokShalom (ShalokShalom)> And I dont think, you saw the video \:D↵(@jmgomez) |
08:29:55 | FromDiscord | <pixel_nerd_linux> sent a code paste, see https://play.nim-lang.org/#ix=4G8a |
08:43:13 | FromDiscord | <nnsee> currently your code isn't doing what you probably thing it's doing |
08:43:17 | FromDiscord | <nnsee> (edit) "thing" => "think" |
08:43:34 | FromDiscord | <that_dude.> In reply to @pixel_nerd_linux "Hi everyone, I'm": what library are you using? I can't seem to find one that has that `chacha20` proc |
08:46:08 | FromDiscord | <that_dude.> https://git.sr.ht/~ehmry/chacha20/tree/trunk/item/src/chacha20.nim Found it |
08:48:52 | emery | pixel_nerd_linux: nonce and key should be bytes, not text |
08:52:34 | FromDiscord | <enthus1ast> Std/net recv has an overload that accepts a pointer |
08:53:07 | FromDiscord | <enthus1ast> https://nim-lang.org/docs/net.html#recv%2CSocket%2Cpointer%2Cint |
08:54:00 | FromDiscord | <enthus1ast> And so do asyncnet https://nim-lang.org/docs/asyncnet.html#recvInto%2CAsyncSocket%2Cpointer%2Cint |
08:54:29 | emery | I think there are a lot of places in the standard library that should use seq[byte] and not string. the internet isn't just text line protocols these days |
08:56:28 | FromDiscord | <m4ul3r> In reply to @pixel_nerd_linux "Hi everyone, I'm": you can compare it to the test cases |
08:56:29 | FromDiscord | <m4ul3r> https://git.sr.ht/~ehmry/chacha20/tree/trunk/item/tests/test1.nim |
08:58:10 | * | azimut joined #nim |
09:02:36 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4G8o |
09:02:53 | FromDiscord | <m4ul3r> (edit) "https://play.nim-lang.org/#ix=4G8o" => "https://play.nim-lang.org/#ix=4G8p" |
09:03:05 | FromDiscord | <elamandeep> Which TUI framework is good to use? I have seen few framework but I'm not able to decide which one to choose? |
09:03:37 | FromDiscord | <m4ul3r> In reply to @elamandeep "Which TUI framework is": here's been one on my radar that i've wanted to try to use, but never have gotten around https://github.com/ansiwave/nimwave |
09:03:40 | FromDiscord | <elamandeep> (edit) "framework" => "frameworks" |
09:03:52 | FromDiscord | <elamandeep> Ohk |
09:05:08 | emery | pixel_nerd_linux: I think the only place I actually use chacha20 is here: https://codeberg.org/eris/nim-eris/src/branch/trunk/src/eris.nim#L388 |
09:05:46 | FromDiscord | <nnsee> In reply to @m4ul3r "here's been one on": am i reading this right that it creates its own output and doesn't use the terminal for it? |
09:05:50 | emery | and I copymem the key into the array |
09:06:09 | FromDiscord | <nnsee> oh, no, it just appears to be an option |
09:07:14 | FromDiscord | <that_dude.> In reply to @m4ul3r "Here would be what": This is basically what I would do. Just make sure that the input is always 32 bytes long. The cast does not double check for you and will happily read past the end into ram |
09:09:25 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4G8s |
09:11:03 | FromDiscord | <xtrayambak> In reply to @elamandeep "Which TUI framework is": illwill is really good, you should try it |
09:11:38 | FromDiscord | <elamandeep> Ok i will try |
09:11:40 | FromDiscord | <xtrayambak> In reply to @m4ul3r "exactly, key has to": From what I've heard, `std/random` is not cryptographically secure and should not be used to generate keys. You should use `urand` instead |
09:11:48 | FromDiscord | <enthus1ast> illwill is good with a few dragons\: no unicode input support, no blocking input support |
09:12:14 | FromDiscord | <enthus1ast> so if you currently type a german umlaut\: ö it will crash the cmd.exe on windows and does nothing on linux |
09:12:32 | FromDiscord | <xtrayambak> (edit) "`urand`" => "`std/urandom`" |
09:12:40 | FromDiscord | <m4ul3r> In reply to @xtrayambak "From what I've heard,": it isn't but sysrand hasn't been audited either :nekoshrug: ↵i'm not a crypto guy |
09:13:08 | FromDiscord | <xtrayambak> Yeah, but it generally relies on the OS implementation which is leaps safer than Xoroshiro |
09:13:45 | FromDiscord | <xtrayambak> The OS implementations use stuff like device inputs, noise from the speakers, input from the microphones, and other stuff |
09:15:20 | FromDiscord | <xtrayambak> From what I've heard, Xoroshiro128+ can be cracked with a bunch of algebra |
09:15:26 | FromDiscord | <odexine> In reply to @enthus1ast "illwill is good with": My biggest issue with it lol. I really should get to properly wrapping not curses some time, but oh well, classic programmer problem where they take in too many projects |
09:15:49 | FromDiscord | <xtrayambak> Ah, I'm stuck with 900 billion projects myself too, lol |
09:16:01 | FromDiscord | <xtrayambak> I just can't get the motivation to work on the harder ones |
09:17:33 | emery | Xoroshiro128+ is not a cryptographic RNG, never ever use to generate keys |
09:17:50 | FromDiscord | <pixel_nerd_linux> In reply to @m4ul3r "exactly, key has to": Thanks, yes that's what I planned to do. |
09:18:00 | emery | sysrand is a wrapper over the system RNG, its been "audited" |
09:18:45 | FromDiscord | <m4ul3r> In reply to @emery "sysrand is a wrapper": then that should be updated on the docs |
09:19:12 | FromDiscord | <m4ul3r> probably just the js one because js |
09:19:20 | emery | that's just security theatre-speak |
09:19:53 | FromDiscord | <m4ul3r> eh, idc about crypto. random is good enoughf for me |
09:20:01 | FromDiscord | <m4ul3r> not doing anything that really needs to be secure |
09:20:15 | FromDiscord | <xtrayambak> Alright, just remember to not use it in any prod environment or anything people will seriously use |
09:20:16 | FromDiscord | <xtrayambak> lol |
09:20:24 | FromDiscord | <xtrayambak> if it's for personal use, that's aight |
09:20:35 | FromDiscord | <xtrayambak> the mossad isn't interested in intercepting your program's traffic |
09:20:40 | FromDiscord | <xtrayambak> (hopefully) |
09:20:53 | emery | no, don't ever use std/random for crypto |
09:21:03 | FromDiscord | <odexine> NGL I think more people should consider personal use as prod |
09:21:16 | FromDiscord | <xtrayambak> In reply to @odexine "NGL I think more": I do, but I don't force others to do that |
09:21:29 | emery | yea prod is some california buzzword shit |
09:21:42 | emery | just write code that doesn't suck |
09:21:46 | FromDiscord | <xtrayambak> Apart from that time I used time as the seeding factor for one of my libraries |
09:21:52 | FromDiscord | <xtrayambak> 😛 |
09:23:32 | FromDiscord | <pixel_nerd_linux> In reply to @emery "I think there are": That means if I write my own library I should provide seq[byte] in my API ? |
09:24:36 | emery | pixel_nerd_linux: idk, people seem to think strings can be text or bytes but maybe you should seperate plaintext and ciphertext with string and seq[byte] |
09:27:51 | FromDiscord | <pixel_nerd_linux> In reply to @emery "<@843559150306721822>: idk, people seem": Makes sense, thanks! |
09:28:02 | emery | np |
09:30:48 | FromDiscord | <nnsee> probably OpenArray, not seq |
09:32:23 | emery | I think anything that would trash my terminal if written to stdout should be seq[byte]/openarray[byte] rather than string, but I'm opinionated |
09:36:32 | FromDiscord | <enthus1ast> I eventually will fork illwill, in fact I had the code in front of me during today's commute↵(@odexine) |
09:37:44 | FromDiscord | <enthus1ast> For windows my mouse code actually filters unicode etc |
09:41:32 | FromDiscord | <enthus1ast> Also blocking input would be nice as well, it's much better to use a thread that reads input than poll |
09:41:47 | FromDiscord | <enthus1ast> OR get a callback |
09:48:21 | FromDiscord | <dersnof> Hmm i have an idea |
09:48:27 | FromDiscord | <dersnof> I will implement CI book in Nim |
09:48:37 | FromDiscord | <dersnof> Implementing bytecode vm part |
10:00:10 | FromDiscord | <odexine> Have fun (sincerely lol) |
10:14:56 | FromDiscord | <mratsim> In reply to @m4ul3r "exactly, key has to": nimcrypto RNG has been audited and is used in production with billions at stake |
10:15:41 | FromDiscord | <mratsim> In reply to @pixel_nerd_linux "That means if I": yes or I'll hunt you down↵https://github.com/nim-lang/RFCs/issues/32 |
10:16:27 | emery | mratsim: nimcrypto has no releases so I can't really trust that |
10:16:40 | FromDiscord | <mratsim> In reply to @emery "sysrand is a wrapper": even if you're a wrapper you can get security issues. I've seen one when you forget a flag when using windows RNG. |
10:16:40 | emery | its just a bunch of code on github |
10:18:28 | FromDiscord | <mratsim> fair point. |
10:22:29 | FromDiscord | <m4ul3r> the library nimcrypto?↵I don't think anyone was talking about that at that time |
10:30:56 | FromDiscord | <m4ul3r> does look like sysrand from nimcrypto is similar to the one in nim stdlib |
11:03:21 | FromDiscord | <voidwalker> Is wrapping c++ libs much harder than C ones ? I am looking to make a tui program, and illwave looks too low level, nimwave undocumented, ncurses is also low level.. I found this lib https://github.com/ArthurSonzogni/FTXUI but it's c++ and I have no knowledge on how to write a wrapper |
11:27:22 | FromDiscord | <odexine> In what way is ill will too low level for you? |
11:27:45 | FromDiscord | <Phil> In reply to @voidwalker "Is wrapping c++ libs": From me as a layman based on everything I've passively absorbed while here:↵Depends on which and how many C++ features are used.↵Apparently there's so much C++ syntax stuff that wrapping it all seems super hard/impossible.↵So for some stuff you might need to get creative |
11:29:17 | FromDiscord | <_nenc> Is it possible to split UI and logic, just like MVVM, and write a few functions that control UI in C++ |
11:30:01 | FromDiscord | <_nenc> so that you don't have to do complex calles of C++ from Nim |
11:33:13 | FromDiscord | <voidwalker> @odexine it doesn't have widgets, you must draw everything manually, implement a lot of logic for the simplest things, etc |
11:34:01 | FromDiscord | <voidwalker> I am looking for a table-like list thing, so that would be immensely complicated to write from scratch |
11:35:01 | FromDiscord | <voidwalker> also nimwave has zero projects using it, except the one it was built for, has no documentation, no examples :[ |
11:35:44 | FromDiscord | <Chronos [She/Her]> In reply to @_nenc "Is it possible to": MVVM? |
11:37:31 | FromDiscord | <elamandeep> model view viewmodel is widely used architecture in app developement |
12:08:37 | FromDiscord | <jmgomez> Im sure you can wrap pretty much any C++ library out there with Nim. NimForUE is the proof |
12:09:13 | FromDiscord | <jmgomez> (edit) "Im sure you can wrap pretty much any C++ library out there with Nim. NimForUE is the ... proof" added "living" |
12:14:45 | FromDiscord | <Phil> In reply to @jmgomez "Im sure you can": Yeh but was it easy 😛 ? |
12:16:23 | FromDiscord | <jmgomez> It wasnt, but I would say it will be much easier today with the compiler updates. Plus UE surpasses the lib category 😛 |
12:17:13 | FromDiscord | <Phil> Fair 😄 |
12:19:18 | FromDiscord | <kingterrytheterrible12> In reply to @jmgomez "Im sure you can": and also nimqt |
12:19:20 | FromDiscord | <Chronos [She/Her]> When I go home I should work on my mutex type some more :p |
12:19:31 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "When I go home": your mutex type sucks |
12:19:40 | FromDiscord | <kingterrytheterrible12> im calling it already |
12:19:42 | FromDiscord | <Chronos [She/Her]> I want to make a macro for making the syntax `with m as a:` |
12:19:55 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "your mutex type sucks": Thanks! you don't need to use it <3 |
12:20:09 | FromDiscord | <kingterrytheterrible12> i suggest you learn more about mutexes firs |
12:20:12 | FromDiscord | <kingterrytheterrible12> (edit) "firs" => "first" |
12:20:37 | FromDiscord | <kingterrytheterrible12> i have warned you about trying to do anything multi threaded when you dont know how a fucking mutex works |
12:20:41 | FromDiscord | <kingterrytheterrible12> you have been warned |
12:20:49 | FromDiscord | <Chronos [She/Her]> I know how locks work so |
12:20:55 | FromDiscord | <kingterrytheterrible12> 💀 |
12:20:58 | FromDiscord | <kingterrytheterrible12> yeah im done |
12:21:01 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "i have warned you": 👍 |
12:21:04 | FromDiscord | <kingterrytheterrible12> GL xd |
12:21:36 | FromDiscord | <kingterrytheterrible12> at this point im gonna make my own programming language without knowing how to program |
12:21:57 | FromDiscord | <Chronos [She/Her]> Do it 🤷♀️ I'm not stopping you |
12:22:24 | FromDiscord | <Chronos [She/Her]> Plus I'm learning how it works as I go, my mistakes will help me learn (plus I'm doing research as I write it so) |
12:22:55 | FromDiscord | <kingterrytheterrible12> listen to this idea, someone who knows nothing about mutexes and multithreading but the bare basics is trying to make a "smart" mutex for a psychics sim |
12:23:00 | FromDiscord | <kingterrytheterrible12> what could possibly go wrong |
12:23:34 | FromDiscord | <Chronos [She/Her]> It's not actually smart lol |
12:23:36 | FromDiscord | <toma400> Is this for some professional background or just to play with it? |
12:23:40 | FromDiscord | <kingterrytheterrible12> this is how debugging would look like ↵bug(s) ^number of thread mutex library |
12:23:46 | FromDiscord | <Chronos [She/Her]> Playing with it obviously |
12:24:11 | FromDiscord | <Chronos [She/Her]> In a professional setting you'd think I'd make a thing that'll definitely fail in prod? :p |
12:24:24 | FromDiscord | <toma400> Then I have no idea why to care so much about it, please chill Terry |
12:24:47 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "In a professional setting": no its even worse to do it for learning purposes due to it is very easy for it to look right and its awfully wrong |
12:25:14 | FromDiscord | <kingterrytheterrible12> pretty much your gonna rely on shotgun debugging |
12:25:24 | FromDiscord | <kingterrytheterrible12> and perpare for the hisenbugs |
12:25:39 | FromDiscord | <Chronos [She/Her]> https://mortoray.com/how-does-a-mutex-work-what-does-it-cost/ I genuinely don't get why this would be hard to implement ontop of the existing std/locks lib |
12:25:58 | FromDiscord | <sulfasolate> https://media.discordapp.net/attachments/371759389889003532/1151131585555484682/terrydaviscat.png |
12:26:05 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "and perpare for the": I very much am yeah |
12:26:09 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "https://mortoray.com/how-does-a-mutex-work-what-doe": tf is this artical |
12:27:15 | FromDiscord | <Chronos [She/Her]> What article should I be reading to understand mutexes then... sigh |
12:27:23 | FromDiscord | <kingterrytheterrible12> book probably |
12:28:13 | FromDiscord | <voidwalker> In reply to @jmgomez "Im sure you can": wasn't there some place you could request libraries wrappers ? I forgot where |
12:28:22 | FromDiscord | <kingterrytheterrible12> In reply to @voidwalker "wasn't there some place": pmunch |
12:28:26 | FromDiscord | <voidwalker> Lmao |
12:28:29 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "book probably": There's no books that have this stuff around me |
12:28:36 | PMunch | <_< |
12:28:39 | FromDiscord | <Chronos [She/Her]> Also google exists, what's the point of using a book nowadays |
12:28:41 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "<_<": XD |
12:28:50 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Also google exists, what's": mhm |
12:28:53 | FromDiscord | <kingterrytheterrible12> bet |
12:28:59 | FromDiscord | <kingterrytheterrible12> i am done with this ngl |
12:29:20 | PMunch | You mean this thing: https://github.com/nim-lang/needed-libraries? |
12:29:23 | FromDiscord | <kingterrytheterrible12> mf some shit is very very hard to find online if its not a book or ebook |
12:29:23 | FromDiscord | <voidwalker> Hey @PMunch I give you $10 to wrap this : https://github.com/ArthurSonzogni/FTXUI : P. Can you at least take a look and see if it's easy or hard to do ? |
12:29:41 | PMunch | Hmm, it's C++.. |
12:29:52 | FromDiscord | <kingterrytheterrible12> In reply to @voidwalker "Hey <@696333749570371585> I give": i will also add a 10 usd to it if you do |
12:29:53 | FromDiscord | <kingterrytheterrible12> i like it |
12:30:06 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "mf some shit is": Google is free, for niche subjects sure but mutexes are common afaik |
12:30:08 | FromDiscord | <kingterrytheterrible12> i doubt pmunch needs the money |
12:30:13 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Google is free, for": GOOGLE IS FREE 💀 |
12:30:17 | FromDiscord | <kingterrytheterrible12> LMAO |
12:30:33 | FromDiscord | <kingterrytheterrible12> so windows is open source |
12:30:38 | FromDiscord | <kingterrytheterrible12> and im andrew tate |
12:30:40 | FromDiscord | <voidwalker> I up it to $15, there you go, $25 so far : P anyone else ? |
12:31:45 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "GOOGLE IS FREE 💀": It's free to search on, yes |
12:31:59 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "It's free to search": google is free |
12:32:01 | FromDiscord | <kingterrytheterrible12> 💀 |
12:32:22 | PMunch | I've never tried wrapping something in C++, so I have no idea how hard it would be |
12:32:22 | FromDiscord | <Chronos [She/Her]> If you're on the internet, your data is being tracked everywhere anyway |
12:32:41 | FromDiscord | <Chronos [She/Her]> Duckduckgo if you really want to stay off Google's radar, it's still free to search on |
12:32:57 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Duckduckgo if you really": nothing is free |
12:33:06 | FromDiscord | <kingterrytheterrible12> duckduckgo is the least worse out of all the bad ones |
12:33:22 | FromDiscord | <Chronos [She/Her]> 'nothing is free' yeah, but you still use it all |
12:33:30 | FromDiscord | <Chronos [She/Her]> You're on Discord anyway |
12:33:42 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "You're on Discord anyway": so |
12:34:04 | PMunch | I'll keep it in mind for whenever I decide to give C++ wrapping with Futhark a go |
12:34:04 | FromDiscord | <kingterrytheterrible12> im ok with data collection as long as it isnt google data collection |
12:34:15 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "I'll keep it in": so never :( |
12:34:30 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "im ok with data": So if you wanted to avoid your data being sold, you wouldn't be using it↵↵Also tons of sites use google to serve ads anyway |
12:34:32 | PMunch | Ey, I'm a busy man, I have it on my todo list.. |
12:34:37 | FromDiscord | <Chronos [She/Her]> Judt uss Duckduckgo then |
12:34:58 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Judt uss Duckduckgo then": uh |
12:35:08 | FromDiscord | <voidwalker> who does c++ lib wrapping "by hand" ? |
12:35:10 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "i have warned you": Chiiiiiiilll↵It can also just be a learning experience or whatever. You don't have to be studied in an area to play around with it.↵A first implementation of a package does not need to be perfect. |
12:35:10 | FromDiscord | <kingterrytheterrible12> whos gonna tell her i've been using duckduckgo since like 5 years |
12:35:17 | * | xet7 joined #nim |
12:35:27 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "Chiiiiiiilll It can also": alright alright |
12:35:45 | FromDiscord | <kingterrytheterrible12> its a bad idea bc your gonna be learning from the worst teacher |
12:35:46 | FromDiscord | <kingterrytheterrible12> yourself |
12:36:19 | FromDiscord | <Phil> Eh, I'd disagree, it starts giving you an idea over the problem-space and an idea of what walls you'll be running into |
12:36:30 | FromDiscord | <kingterrytheterrible12> it depends |
12:36:42 | FromDiscord | <kingterrytheterrible12> a lot |
12:36:56 | FromDiscord | <Phil> Can't learn what a lock is if you've never had to deal with shared mutable state between threads |
12:37:09 | FromDiscord | <kingterrytheterrible12> you can use an existing lock |
12:37:12 | FromDiscord | <kingterrytheterrible12> see how it works |
12:37:30 | FromDiscord | <kingterrytheterrible12> you really should not be rolling your own mutex lib |
12:38:06 | FromDiscord | <kingterrytheterrible12> In reply to @voidwalker "who does c++ lib": i have an idea |
12:38:32 | FromDiscord | <kingterrytheterrible12> mark it as `exten "C"` and then load all the shit from dll or so or dynlib |
12:38:35 | FromDiscord | <kingterrytheterrible12> manually |
12:39:20 | FromDiscord | <sOkam! 🫐> In reply to @voidwalker "Hey <@696333749570371585> I give": do you know about `illwill`? |
12:39:29 | FromDiscord | <voidwalker> yes, its too hard |
12:39:40 | FromDiscord | <kingterrytheterrible12> In reply to @voidwalker "yes, its too hard": also why not just ncurses? |
12:41:46 | FromDiscord | <sOkam! 🫐> In reply to @voidwalker "who does c++ lib": im comfortable with C wrapping, but I assure you 25E for such a job (manually) is covering a library with 3-4 functions tops, and that's with dynamic loading only |
12:42:24 | PMunch | voidwalker, whoever did the Unreal engine wrappers? |
12:43:02 | FromDiscord | <kingterrytheterrible12> @voidwalker bro make a repo we can try to wrap it together |
12:43:24 | FromDiscord | <elamandeep> i have seen nim wrapper for godot |
12:43:29 | FromDiscord | <jmgomez> In reply to @PMunch "<@323176231098908672>, whoever did the": it is not by hand 😛 |
12:43:47 | FromDiscord | <sOkam! 🫐> In reply to @elamandeep "i have seen nim": that is not wrapping cpp, that's wrapping a C api for a cpp engine |
12:43:59 | FromDiscord | <sOkam! 🫐> gdextension is C only |
12:44:06 | FromDiscord | <elamandeep> oh |
12:44:31 | PMunch | jmgomez, still they had to figure out the wrapping rules, no? |
12:44:39 | FromDiscord | <sOkam! 🫐> nimForUE is the best cpp wrapper I know of |
12:44:55 | PMunch | That's pretty much all that's missing, figuring out how the various C++ concepts map to Nim |
12:45:37 | FromDiscord | <jmgomez> yes, but for the most part Nim supports C++ semantics |
12:45:46 | FromDiscord | <sOkam! 🫐> @pmunch what happend to that person who was working on cpp futhark 🤔 |
12:46:21 | FromDiscord | <elamandeep> are there any rules for wrapping? |
12:47:00 | PMunch | elamandeep, you have to wear pants while doing it, apart from that it's a lawless world |
12:47:39 | FromDiscord | <kingterrytheterrible12> In reply to @jmgomez "yes, but for the": also did you bind UE by hand? |
12:48:19 | FromDiscord | <kingterrytheterrible12> if you did its either your crazy or lying ngl |
12:48:51 | PMunch | sOkam, good question |
12:49:26 | PMunch | Don't remember who that was right now |
12:49:32 | FromDiscord | <kingterrytheterrible12> In reply to @heysokam "<@392962235737047041> what happend to": he says its open source you can make a PR |
12:49:42 | FromDiscord | <kingterrytheterrible12> i am his lawyer |
12:49:51 | FromDiscord | <kingterrytheterrible12> and PR manager |
12:49:55 | FromDiscord | <jmgomez> In reply to @kingterrytheterrible12 "also did you bind": I just said I didnt. If you are curious I wrapped the foundations and then I get the type information from their reflection system and produce the Nim code automatically ubased on that. So plugins or users code is also bound |
12:50:18 | FromDiscord | <jmgomez> (edit) "ubased" => "based" |
12:50:44 | FromDiscord | <kingterrytheterrible12> In reply to @jmgomez "I just said I": damn straight up RTTI |
12:50:50 | FromDiscord | <kingterrytheterrible12> isnt it bad for performance |
12:51:38 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "whos gonna tell her": Yeah I'm saying search what you need there |
12:51:42 | FromDiscord | <jmgomez> They have their own reflection system https://docs.unrealengine.com/5.0/en-US/reflection-system-in-unreal-engine/↵But it seems you can build AAA games without worrying too much about it 😛 |
12:52:06 | FromDiscord | <Chronos [She/Her]> Like, I'm just googling stuff for mutexes, no issue there |
12:52:24 | FromDiscord | <kingterrytheterrible12> In reply to @jmgomez "They have their own": yeah UE is more than a game engine |
12:52:32 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "Eh, I'd disagree, it": Nuke em Phil 😛 |
12:52:34 | * | jmdaemon quit (Ping timeout: 245 seconds) |
12:52:37 | FromDiscord | <kingterrytheterrible12> it has its own lang and you can make movies in it |
12:52:45 | FromDiscord | <kingterrytheterrible12> and own GC |
12:52:54 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "Can't learn what a": I have done it with async before tbf but it's not the same ig? |
12:53:42 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "you really should not": Again it's just a wrapper around std/locks |
12:54:00 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Again it's just a": your just adding `with` construct? |
12:55:04 | FromDiscord | <Chronos [She/Her]> A type that holds the object and a lock for it |
12:55:30 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "your just adding `with`": That and accessing fields from the original object with locking ensured |
12:57:49 | FromDiscord | <jmgomez> In reply to @kingterrytheterrible12 "yeah UE is more": yeah, it's a beast. It can be used to make GUI apps too. Although the development environment is not precisely "light" |
12:58:29 | FromDiscord | <kingterrytheterrible12> In reply to @jmgomez "yeah, it's a beast.": 1 gb GUI app |
12:59:55 | FromDiscord | <jmgomez> eh? |
12:59:56 | FromDiscord | <Phil> In reply to @chronos.vitaqua "I *have* done it": I'd need to actually know my shit about mutexes to be able to answer that |
13:00:07 | FromDiscord | <Phil> Which, for reference, I don't |
13:00:17 | FromDiscord | <jmgomez> builds can be much less than 50Mb |
13:01:19 | FromDiscord | <jmgomez> love how people just make assumption without even really knowing how things work |
13:01:31 | FromDiscord | <jmgomez> (edit) "assumption" => "assumptions" |
13:02:08 | FromDiscord | <voidwalker> In reply to @heysokam "im comfortable with C": yeah obviously it was just a mini spontaneous crowd fund attempt, it's not about the $25. I am sure more people would contribute towards this if such things were organized, and more funds would be raised |
13:02:23 | FromDiscord | <kingterrytheterrible12> In reply to @kingterrytheterrible12 "1 gb GUI app": source: i made it up |
13:02:27 | FromDiscord | <kingterrytheterrible12> i just assumed |
13:04:24 | FromDiscord | <kingterrytheterrible12> also why the hell does nim have a C ffi |
13:04:40 | FromDiscord | <kingterrytheterrible12> why doesnt it go ffi'less approach like zig |
13:06:42 | FromDiscord | <Chronos [She/Her]> Because Nim compiles to C and also has more strict typing than C? And Zig works bc it hooks into LLVM, Nim doesn't |
13:07:01 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Because Nim compiles to": .... |
13:07:11 | FromDiscord | <Chronos [She/Her]> :shrug: |
13:07:13 | FromDiscord | <kingterrytheterrible12> why not just use the C constructs in the generated C code |
13:07:28 | FromDiscord | <Chronos [She/Her]> Wdym by that? |
13:07:35 | FromDiscord | <kingterrytheterrible12> im gonna go ask araq in #internals |
13:07:54 | FromDiscord | <Chronos [She/Her]> Okay |
13:08:03 | PMunch | kingterrytheterrible12, by the way I don't think he likes being disturbed |
13:08:15 | FromDiscord | <kingterrytheterrible12> i just post there |
13:08:23 | FromDiscord | <kingterrytheterrible12> he choose to reply or not |
13:08:39 | PMunch | Sure, but you're still creating noise |
13:08:57 | FromDiscord | <kingterrytheterrible12> its a question that makes sense ngl |
13:09:04 | FromDiscord | <kingterrytheterrible12> since it just all compiles down to C |
13:09:09 | PMunch | And Zig doesn't have an FFI-less approach, it's just as much FFI as Nim has, just wrapped a bit different.. |
13:09:10 | FromDiscord | <kingterrytheterrible12> it makes no sense to have a C ffi |
13:09:22 | PMunch | What do you mean? |
13:09:29 | PMunch | I think you misunderstand what FFI means |
13:09:47 | PMunch | When you wrap something from C in Nim it is just turned into a normal C call under the hood |
13:09:57 | PMunch | There's no extra layer going on |
13:10:06 | FromDiscord | <kingterrytheterrible12> oh |
13:10:18 | PMunch | The wrapper only exists to tell Nim what types are valid for the C call |
13:10:33 | PMunch | Because Nim and C doesn't use the same type system (luckily) |
13:10:36 | FromDiscord | <kingterrytheterrible12> oh |
13:10:43 | FromDiscord | <kingterrytheterrible12> gonna delete the internals msg |
13:10:44 | FromDiscord | <kingterrytheterrible12> brb |
13:11:13 | FromDiscord | <odexine> too late you have eternally embarrassed yourself in front of araq you can never redeem yourself now |
13:11:26 | PMunch | The only difference to Zig is that since Zig uses LLVM under the hood it has built something like Futhark directly into the compiler |
13:11:36 | PMunch | In fact Futhark was greatly inspired by Zig |
13:11:49 | FromDiscord | <kingterrytheterrible12> NOOOO DADDY ARAQ HAS FORSAKEN ME |
13:12:12 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "The only difference to": soon its not |
13:19:01 | PMunch | What do you mean? |
13:19:30 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "What do you mean?": zig is booting LLVM |
13:19:41 | PMunch | Oh yeah, that's true |
13:19:49 | PMunch | I wonder how they are going to deal with C wrapping then |
13:25:08 | FromDiscord | <Chronos [She/Her]> They're still keeping that for the wrapping afaik |
13:25:20 | FromDiscord | <Chronos [She/Her]> They're just maintaining it on the side, making a new compiler backend |
13:37:08 | FromDiscord | <nomad> How to write zip files in nim? |
13:38:45 | FromDiscord | <nnsee> https://github.com/nim-lang/zip using this library |
13:39:00 | PMunch | Chronos_[She/Her], hmm sounds like a lot of work.. |
13:41:43 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "There's no books that": The Art of Multiprocessor Programming by SHavit is very good: https://courses.csail.mit.edu/6.852/08/papers/lists-book-chapter.pdf |
13:42:06 | * | krux02_ joined #nim |
13:43:03 | FromDiscord | <Chronos [She/Her]> Oh thanks! |
13:43:38 | FromDiscord | <Chronos [She/Her]> In reply to @PMunch "Chronos_[She/Her], hmm sounds like": Zig with a new compiler backend? For sure- But their issue with it is the size of LLVM's compiler which is a pretty fair concern tbf |
13:44:11 | PMunch | The size of the compiler itself? |
13:44:16 | PMunch | Or the binaries it produces? |
13:44:35 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "Zig with a new": probably also LLVM depracting stuff from release to releae and compiler speed maybe? |
13:44:58 | FromDiscord | <mratsim> But writing an optimizing compiler, and the debugging support is hard |
13:46:12 | FromDiscord | <Chronos [She/Her]> In reply to @PMunch "The size of the": The size of the compiler iirc, also supporting many niche platforms which increases size over time I think? But eh |
13:46:28 | FromDiscord | <Chronos [She/Her]> In reply to @mratsim "probably also LLVM depracting": Perhaps? I'm just talking about what the article Zig released a while ago is saying |
13:46:38 | FromDiscord | <Chronos [She/Her]> By Zig or by someone who works on Zig actively |
13:47:24 | FromDiscord | <mratsim> sent a long message, see http://ix.io/4G9J |
13:47:58 | FromDiscord | <Chronos [She/Her]> Creating it in what way? |
13:48:23 | FromDiscord | <Chronos [She/Her]> Also deadlocks is when the lock stays locked forever and never releases, right? |
13:48:30 | FromDiscord | <Chronos [She/Her]> So during errors for example |
13:49:05 | FromDiscord | <Chronos [She/Her]> If a thread crashes while locked, that's a deadlock? (Also would just mean the whole game needs to be restarted bc, data may be corrupted?) |
13:49:20 | FromDiscord | <Chronos [She/Her]> Like Rust handles it by propagating panics across every thread iirc |
13:49:42 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "Creating it in what": For example, create a critical section or mutual exclusion algorithm without using locks:↵↵https://en.wikipedia.org/wiki/Peterson%27s_algorithm |
13:50:26 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "Also deadlocks is when": usually it involves 2 locks, one thread holds a lock A and need to access B to make progress, another thread holds B and need to access A to make progress |
13:50:30 | FromDiscord | <mratsim> result: no progress |
13:50:56 | FromDiscord | <mratsim> for example if you make a queue where threads can enqueue/dequeue and you misorder operations |
13:51:23 | FromDiscord | <leorize> a pretty easy one is when you just accidentally locked twice in a single thread and your lock is not recursive |
13:51:55 | FromDiscord | <Chronos [She/Her]> I don't understand that part aha |
13:52:20 | FromDiscord | <Chronos [She/Her]> In reply to @mratsim "usually it involves 2": I think I understand that part? |
13:52:24 | FromDiscord | <Chronos [She/Her]> Not well though |
14:03:02 | FromDiscord | <mratsim> In reply to @chronos.vitaqua "I don't understand that": You might have more hit if you search for "reentrancy" and locks |
14:03:22 | FromDiscord | <mratsim> iirc, The Art of ltiProcessor Programming has nice example on that issue |
14:03:26 | FromDiscord | <Chronos [She/Her]> Alright! |
14:03:43 | FromDiscord | <mratsim> (edit) "ltiProcessor" => "MultiProcessor" |
14:04:27 | FromDiscord | <mratsim> if you're interested in concurrent data structure / multithreading it's a very nice book, quite accessible and builds up fundamentals with usable how-tos |
14:04:54 | FromDiscord | <mratsim> iirc it's used for graduate coursework as well |
14:05:25 | PMunch | Hmm, I wonder what the performance numbers look like for Table vs. seq[tuple] for a small number of keys |
14:05:36 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4G9P |
14:05:43 | FromDiscord | <enthus1ast> i try to use this in karax |
14:06:08 | FromDiscord | <leorize> wrong kind of DateTime ig |
14:06:30 | FromDiscord | <enthus1ast> mh, but both is DateTime from times |
14:06:56 | FromDiscord | <leorize> the message is saying that it came from `kar` |
14:07:12 | FromDiscord | <enthus1ast> oh |
14:07:19 | FromDiscord | <enthus1ast> include karax/prelude, times, options |
14:07:22 | FromDiscord | <enthus1ast> -.- |
14:08:01 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4G9Q |
14:08:44 | * | PMunch quit (Quit: Leaving) |
14:13:20 | FromDiscord | <Chronos [She/Her]> In reply to @mratsim "if you're interested in": Good to know! |
14:16:26 | FromDiscord | <voidwalker> Isn't it kind of sad that nim doesn't have any good tui frameworks? that are not low level |
14:16:40 | FromDiscord | <voidwalker> go has several great ones, rust has ratatui |
14:16:48 | FromDiscord | <Chronos [She/Her]> I think Nimwave looks alright, just needs docs, no? |
14:16:59 | FromDiscord | <voidwalker> Useless to me without docs, and there's pretty much no widgets included |
14:17:07 | FromDiscord | <Chronos [She/Her]> Fair |
14:17:13 | FromDiscord | <Chronos [She/Her]> Could always make bindings :p |
14:27:32 | FromDiscord | <voidwalker> I think it would be more fun for me to port something rather than wrap |
14:27:37 | FromDiscord | <vindaar> In reply to @PMunch "Hmm, I wonder what": haven't benched it, but I would assume it to be pretty similar, maybe the `seq` a bit faster depending on how you determine if the key is contained. Keep in mind the `Table` is implemented precisely on top of a `seq[tuple]` |
14:29:05 | FromDiscord | <leorize> tuple[seq] will be better, though |
14:29:20 | FromDiscord | <jviega> I've got a bunch of C lock-free data structures I really need to wrap someday |
14:29:52 | FromDiscord | <jviega> But then I'd have to get into the 800 different memory management models shiver |
14:31:51 | FromDiscord | <elamandeep> python too have great TUI |
14:32:17 | FromDiscord | <kingterrytheterrible12> why nim doesnt have `if !x` |
14:32:24 | FromDiscord | <kingterrytheterrible12> why do i gotta use `not` |
14:32:59 | FromDiscord | <leorize> because nim is not c |
14:33:00 | FromDiscord | <inventormatt> it'd be trivial to create a template to do that for you |
14:33:05 | FromDiscord | <griffith1deadly> In reply to @kingterrytheterrible12 "why do i gotta": write macro then |
14:33:17 | FromDiscord | <kingterrytheterrible12> no why not in design of lang |
14:33:34 | FromDiscord | <inventormatt> I'm guessing to be more explicit |
14:36:04 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://paste.rs/24y2Q |
14:36:08 | FromDiscord | <kingterrytheterrible12> JESUS |
14:36:23 | FromDiscord | <Chronos [She/Her]> lmao maybe I shuld've done it in the playground |
14:36:48 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Is this safe code?": is this code safe↵>untyped |
14:37:05 | FromDiscord | <odexine> ??? untyped doesnt exactly mean unsafe |
14:37:18 | FromDiscord | <kingterrytheterrible12> it means it has no type |
14:37:27 | FromDiscord | <kingterrytheterrible12> therefore how can you do type checking |
14:37:29 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "is this code safe": Untyped is so you can access the fields of the underlying object |
14:37:30 | FromDiscord | <ieltan> well, not really |
14:37:43 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "it means it has": By the template first being inserted before the compiler goes actually through it and validates types |
14:37:47 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "therefore how can you": Because I'm not checking the type |
14:37:55 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "By the template first": xactly |
14:37:58 | FromDiscord | <Chronos [She/Her]> Exactly |
14:38:05 | FromDiscord | <Phil> The error message might be very meh but it's not going to be passing if there's erroneous access |
14:38:10 | FromDiscord | <kingterrytheterrible12> idk ngl |
14:38:19 | FromDiscord | <kingterrytheterrible12> never used nim macros nor template |
14:38:21 | FromDiscord | <kingterrytheterrible12> never needed to |
14:38:42 | FromDiscord | <Phil> Templates and macros are executed before actual compilationare |
14:38:52 | FromDiscord | <odexine> In reply to @kingterrytheterrible12 "never needed to": congrats? |
14:39:06 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "Templates and macros are": phil Discovering preprocessor |
14:39:26 | FromDiscord | <odexine> In reply to @kingterrytheterrible12 "phil Discovering preprocessor": he;s explaining it to you, if you're unaware |
14:39:34 | FromDiscord | <kingterrytheterrible12> In reply to @kingterrytheterrible12 "yeah people have seem": 😉 |
14:39:35 | FromDiscord | <ieltan> not sure if this is pendantic enough or even correct but untyped means it doesn't semcheck the ast but if it's not valid code the evaluation will still fail at compile time |
14:39:51 | FromDiscord | <leorize> nim is from pascal/modula heritage, and they don't use symbolic logic operators there↵(@kingterrytheterrible12) |
14:41:06 | FromDiscord | <leorize> that dot operator might give you a few deadlock↵(@Chronos [She/Her]) |
14:41:18 | FromDiscord | <kingterrytheterrible12> In reply to @odexine "he;s explaining it to": its just that templates dont make sense have the time |
14:41:34 | FromDiscord | <kingterrytheterrible12> i can see when to use it but a lot of times its just more trouble than its worth |
14:42:02 | FromDiscord | <kingterrytheterrible12> (edit) "have" => "half" |
14:42:39 | FromDiscord | <ieltan> well you could write and generate non-sense but it'll still be safe if you dont use unsafe features 😛 |
14:43:04 | FromDiscord | <kingterrytheterrible12> In reply to @ieltan "well you could write": yes i like when my error just says `invalid template instantiation` |
14:43:05 | FromDiscord | <kingterrytheterrible12> very sane |
14:43:09 | FromDiscord | <kingterrytheterrible12> very cool |
14:43:18 | FromDiscord | <Chronos [She/Her]> In reply to @leorize "that dot operator might": Hm how so? If I access it during assignment? Like if I wanted to do `mutex.val = mutex.val + 1`? |
14:43:34 | FromDiscord | <kingterrytheterrible12> or missing type `''` |
14:43:36 | FromDiscord | <ieltan> yeah as i said, you can generate non-sense, but at least it wont blow up at runtime |
14:43:43 | FromDiscord | <leorize> that's one↵(@Chronos [She/Her]) |
14:44:11 | FromDiscord | <Chronos [She/Her]> Hm, I could prevent that by tweaking the code for assignments slightly, but what's another? |
14:44:11 | FromDiscord | <kingterrytheterrible12> In reply to @ieltan "yeah as i said,": idk i just mostly get away with overloads |
14:44:39 | FromDiscord | <kingterrytheterrible12> idk if nim has overloads though |
14:45:14 | FromDiscord | <ieltan> you should only use templates if you really need it and cant use something more simple like generics |
14:45:19 | FromDiscord | <leorize> foo.x.bar(foo.y)↵(@Chronos [She/Her]) |
14:45:42 | FromDiscord | <ieltan> overloading fulfills a different usecase imo |
14:45:49 | FromDiscord | <ieltan> and yes Nim does has overloading |
14:45:55 | FromDiscord | <ieltan> (edit) "has" => "have" |
14:46:04 | FromDiscord | <kingterrytheterrible12> In reply to @ieltan "overloading fulfills a different": i use overloads when i just need like 3 or less types |
14:46:10 | FromDiscord | <kingterrytheterrible12> if anything more i just use template |
14:46:30 | FromDiscord | <ieltan> feels like you don't need templates, you could use generics instead |
14:46:41 | FromDiscord | <kingterrytheterrible12> why the hell does nim have both |
14:46:47 | FromDiscord | <kingterrytheterrible12> most langs just choose 1 |
14:47:10 | FromDiscord | <ieltan> both of what ? generics, overloading, templates ? |
14:47:20 | FromDiscord | <ieltan> they all have different usecases |
14:47:23 | FromDiscord | <kingterrytheterrible12> generics and templates |
14:48:27 | FromDiscord | <leorize> templates is just the mid way between nim and macros |
14:48:42 | FromDiscord | <leorize> the manual have an example |
14:49:50 | FromDiscord | <ieltan> templates in Nim lets you do code substitution, generics lets you do type substitution. templates are more powerful and you can argue they can do what generics do but they are too powerful to use and generics are a lot more sane (you dont have to deal with `invalid template instantiation` stuff) |
14:50:13 | FromDiscord | <Chronos [She/Her]> In reply to @leorize "foo.x.bar(foo.y) (<@524288464422830095>)": Ah, I could probably tweak that too by moving the access of the name into a temp variable? |
14:50:14 | FromDiscord | <ieltan> well |
14:51:02 | FromDiscord | <ieltan> you can also use generics with constraints for finer control over the type being substitued |
14:51:22 | FromDiscord | <Chronos [She/Her]> Tho idk how to ensure a unique name without a macro now aha |
14:51:26 | FromDiscord | <sulfasolate> sent a code paste, see https://play.nim-lang.org/#ix=4Ga3 |
14:51:36 | FromDiscord | <ieltan> In reply to @chronos.vitaqua "Tho idk how to": `gensym` |
14:51:40 | FromDiscord | <ieltan> ah |
14:51:43 | FromDiscord | <ieltan> i misread lol |
14:52:13 | FromDiscord | <ieltan> well you can technically use `gensym` in templates |
14:54:42 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4Ga4 |
14:54:55 | FromDiscord | <sulfasolate> In reply to @demotomohiro "Parameters are immutable in": cheers |
14:58:23 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4Ga6 |
15:01:07 | FromDiscord | <Chronos [She/Her]> In reply to @ieltan "well you can technically": How does that work- |
15:03:25 | FromDiscord | <demotomohiro> In reply to @chronos.vitaqua "How does that work-": https://nim-lang.org/docs/manual.html#templates-hygiene-in-templates |
15:07:50 | FromDiscord | <leorize> that won't work very well, unfortunately↵(@Chronos [She/Her]) |
15:07:57 | * | ntat joined #nim |
15:09:27 | FromDiscord | <leorize> the reason we don't have those templates in stdlib is because lock acquiring and release should be explicit to an extent |
15:09:32 | FromDiscord | <leorize> helps prevent deadlocks |
15:13:47 | FromDiscord | <Chronos [She/Her]> Damn |
15:14:55 | FromDiscord | <Chronos [She/Her]> So not sure how else to get past this then aha |
15:15:13 | FromDiscord | <Chronos [She/Her]> In reply to @leorize "the reason we don't": Yeah that makes sense, oh well thanks anyway |
15:19:10 | FromDiscord | <Phil> To emphasise: deadlocks are the real bastard Kind of problems that will not show up under any normal circumstances but always when you're under load and suddenly the entire system shuts down and nobody understands why |
15:20:03 | FromDiscord | <Chronos [She/Her]> Makes sense... Oh well |
15:20:10 | FromDiscord | <leorize> this is why a lot of languages just opt for separate memory space between threads |
15:20:36 | FromDiscord | <leorize> shared is just too much of a pain in the butt |
15:22:15 | FromDiscord | <Phil> It killed prod in my current company once, very much not fun |
15:22:27 | FromDiscord | <Phil> Was a deadlock with mysql |
15:22:41 | FromDiscord | <Phil> (edit) "Was a deadlock with mysql ... " added "connections" |
15:23:52 | FromDiscord | <Chronos [She/Her]> Is there really no way around this? If possible I really wanna get this to work |
15:24:46 | FromDiscord | <leorize> you should use the locks that already exists first |
15:24:53 | FromDiscord | <leorize> you need a good grasp of how MT data flows |
15:25:09 | FromDiscord | <Chronos [She/Her]> Fair enough, I'll do that then |
15:25:32 | FromDiscord | <Chronos [She/Her]> Is it still okay to make a helper object that just associates a lock with an object? :p |
15:31:00 | FromDiscord | <Phil> Sure, got to lock that resource somehow |
15:31:36 | FromDiscord | <Phil> Note if leorize disagrees listen to him, he's got more experience, the approach just worked for me so far |
15:32:47 | FromDiscord | <Chronos [She/Her]> Yeah fair aha |
15:32:58 | FromDiscord | <Chronos [She/Her]> I'll just expose what the lock exposes |
15:33:05 | FromDiscord | <leorize> it's a foolproof way to lock things |
15:33:08 | FromDiscord | <leorize> data races are not fun |
15:33:46 | FromDiscord | <Chronos [She/Her]> Ah, also when should I use rlocks instead of locks? Lemme actually look at re-entrant locks |
15:34:23 | FromDiscord | <leorize> use it if you expect to re-lock multiple times within the same thread |
15:34:38 | FromDiscord | <leorize> it has it's overhead so avoid it if you can |
15:34:43 | FromDiscord | <leorize> but don't shy on it if you must |
15:35:00 | * | ntat quit (Quit: leaving) |
15:35:45 | FromDiscord | <Chronos [She/Her]> Why would I need to re-lock? Genuine question |
15:35:59 | FromDiscord | <Chronos [She/Her]> Also RLock and Lock both inherit from SysLock so? |
15:36:27 | FromDiscord | <leorize> when you use it in a recursive function |
15:36:30 | FromDiscord | <Chronos [She/Her]> Ah |
15:37:45 | FromDiscord | <leorize> RLock have the issue of silent deadlock if you forget to release at a certain point |
15:37:56 | FromDiscord | <Chronos [She/Her]> Yeah makes sense |
15:38:05 | FromDiscord | <leorize> less of an issue with scope templates, though |
15:38:08 | FromDiscord | <Chronos [She/Her]> I'll likely use `withLock` a lot tbh :p |
15:38:21 | FromDiscord | <leorize> but I've wrote stuff in ways that still make those bugs show up, so take that as you will |
15:39:03 | FromDiscord | <Chronos [She/Her]> Fair enough aha, shouldn't be too bad here at least |
15:39:18 | FromDiscord | <kingterrytheterrible12> also whats the point of withlock? |
15:39:58 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4Gaz |
15:40:12 | FromDiscord | <Chronos [She/Her]> Think f it like Python's context manager |
15:40:15 | FromDiscord | <kingterrytheterrible12> beacuse what happens if i write code out of scope of the `with` |
15:40:25 | FromDiscord | <kingterrytheterrible12> does it get executed with no mutex? |
15:40:29 | FromDiscord | <leorize> then that's a you issue |
15:40:45 | FromDiscord | <kingterrytheterrible12> what happens if mutex fails to lock |
15:40:58 | FromDiscord | <kingterrytheterrible12> how do i catch the exception using `with` statment |
15:41:37 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "what happens if mutex": It waits to lock with the statement from what I can see |
15:41:57 | FromDiscord | <kingterrytheterrible12> so i just spin forever |
15:42:00 | FromDiscord | <kingterrytheterrible12> waiting to get locked |
15:42:12 | FromDiscord | <kingterrytheterrible12> the poor lock has nobody to lock it and i cant do nothing about it? |
15:42:16 | FromDiscord | <leorize> we kinda call that a deadlock |
15:42:21 | FromDiscord | <kingterrytheterrible12> yes |
15:42:25 | FromDiscord | <kingterrytheterrible12> RIP lock |
15:42:32 | FromDiscord | <Chronos [She/Her]> You can also just use `tryAcquire` which returns a bool |
15:42:51 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4GaA |
15:42:54 | FromDiscord | <leorize> fortunately you don't usually fail to lock |
15:42:59 | FromDiscord | <kingterrytheterrible12> you can do something thats much more sleek @Chronos [She/Her] |
15:43:06 | FromDiscord | <leorize> it either blocks or it doesn't |
15:43:20 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "you can do something": How so? I'm not using mutexes now |
15:44:09 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4GaB |
15:44:30 | FromDiscord | <leorize> did you just reinvent withLock? |
15:44:30 | FromDiscord | <Chronos [She/Her]> Basically try except? |
15:44:38 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "did you just reinvent": in a better way |
15:44:43 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Basically try except?": yes |
15:44:47 | FromDiscord | <Chronos [She/Her]> I'm gonna be using Result types anyway so |
15:44:55 | FromDiscord | <Chronos [She/Her]> Avoiding exceptions |
15:44:56 | FromDiscord | <leorize> also locking doesn't fail |
15:45:06 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4GaC |
15:45:12 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "also locking doesn't fail": idk |
15:45:17 | FromDiscord | <kingterrytheterrible12> it doesnt? |
15:45:19 | FromDiscord | <leorize> so you don't even have to catch it to begin with |
15:46:53 | FromDiscord | <leorize> they can fail due to ACL |
15:47:00 | FromDiscord | <leorize> but you can never get that happen with nim |
15:49:07 | FromDiscord | <Chronos [She/Her]> ACL? |
15:49:19 | FromDiscord | <leorize> access control |
15:49:44 | FromDiscord | <Chronos [She/Her]> Ah |
15:49:45 | FromDiscord | <leorize> posix supports thread priority and allows you to pin a lock so that only a thread with priority \>= x can acquire it |
15:50:05 | FromDiscord | <leorize> you can't make a lock like that in nim to begin with \:p |
15:50:17 | FromDiscord | <kingterrytheterrible12> you can |
15:50:19 | FromDiscord | <kingterrytheterrible12> why not |
15:50:22 | FromDiscord | <kingterrytheterrible12> make it in C |
15:51:03 | FromDiscord | <leorize> i meant in terms of stdlib but ok |
15:51:17 | FromDiscord | <kingterrytheterrible12> ah my bad |
16:03:32 | * | ntat joined #nim |
16:20:24 | FromDiscord | <Chronos [She/Her]> I need to make a custom thing for making a map which is... Painful |
16:20:59 | FromDiscord | <Chronos [She/Her]> Mostly because the library for Tiled in Nim seems a bit outdated and if it keeps drifting then I'll eventually end up abandoning it |
16:25:29 | * | cnx quit (Ping timeout: 245 seconds) |
16:31:12 | * | cnx joined #nim |
16:32:42 | FromDiscord | <leorize> what are you building? |
16:37:21 | * | disso-peach joined #nim |
16:41:56 | FromDiscord | <ieltan> Using `asyncfutures.or`, how do I access the data of either `fut1` or `fut2` when one of them complete ?↵https://nim-lang.org/docs/asyncfutures.html#or%2CFuture%5BT%5D%2CFuture%5BY%5D |
16:42:23 | FromDiscord | <ieltan> `or` returns `Future[void]` so i presume the data is lost ? |
16:44:21 | FromDiscord | <leorize> yes |
16:48:39 | * | rockcavera joined #nim |
16:49:09 | * | disso-peach quit (Read error: Connection reset by peer) |
16:49:13 | FromDiscord | <ieltan> well... that's a real shame |
16:49:35 | FromDiscord | <ieltan> i guess i'll implement my own `or` |
16:49:53 | FromDiscord | <Nelson> is there any error callback for nim? |
16:50:04 | FromDiscord | <Nelson> like, if something fails, a callback gets run |
16:50:31 | FromDiscord | <Nelson> or do i need to do that stuff manually |
16:55:47 | FromDiscord | <leorize> you can add something like that to a future |
16:56:34 | FromDiscord | <Nelson> a-... a what? sorry, i'm super new to this language |
16:59:44 | * | disso-peach joined #nim |
17:07:31 | FromDiscord | <Phil> Equivalent to js promise |
17:08:27 | FromDiscord | <Phil> It's going async |
17:10:20 | FromDiscord | <kingterrytheterrible12> In reply to @Nelson "a-... a what? sorry,": its like saying "go do something else, once im done i promise to give you the result |
17:10:24 | FromDiscord | <kingterrytheterrible12> (edit) "result" => "result"" |
17:24:01 | FromDiscord | <odexine> In reply to @ieltan "Using `asyncfutures.or`, how do": (basically, or is useless) keep both futures in variables, check either if theyre complete once it fires |
17:36:18 | * | junaid_ joined #nim |
17:57:38 | * | disso-peach quit (Quit: Leaving) |
18:06:25 | * | Mister_Magister quit (Ping timeout: 252 seconds) |
18:12:03 | FromDiscord | <nnsee> PMunch, are you here? |
18:20:38 | FromDiscord | <leorize> you should just ask |
18:22:56 | FromDiscord | <nnsee> i thought i just did |
18:35:03 | * | ntat quit (Quit: leaving) |
18:37:24 | FromDiscord | <leorize> I mean, let him know your question, you don't have to ask if he's around |
18:42:16 | FromDiscord | <nnsee> i'll do that when i know he's around |
18:50:31 | FromDiscord | <Chronos [She/Her]> In reply to @leorize "what are you building?": Rogue-like (originally was platformer but changed idea) |
18:50:55 | FromDiscord | <Haze System (they/them)> sent a code paste, see https://paste.rs/GHBXv |
18:51:15 | FromDiscord | <Chronos [She/Her]> Iirc the pure pragma des nothing |
18:51:26 | FromDiscord | <Chronos [She/Her]> At least, now it does nothing |
18:51:49 | FromDiscord | <Chronos [She/Her]> I'm prolly wrong tho |
18:51:54 | FromDiscord | <Elegantbeef> You don't want an enum then you want consts |
18:52:10 | FromDiscord | <Elegantbeef> Or alternatively just write your own `$` for your enum |
18:52:25 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Gbi |
18:52:34 | FromDiscord | <Chronos [She/Her]> In reply to @hazesystem "hmm, when I try": It's just doing `$Sprites.Player` when printing, implementing your own stringify proc is prolly what ya want |
18:52:37 | FromDiscord | <Elegantbeef> `$` really is mainly for debugging which is why it prints the name |
18:52:40 | FromDiscord | <Chronos [She/Her]> Ah beat me to it lol |
18:53:23 | FromDiscord | <Haze System (they/them)> i could just do separate consts, but i want them to be grouped under the same "parent", like `Sprites.Player` |
18:54:27 | FromDiscord | <Elegantbeef> You're also right, pure is pretty much useless on enums now |
18:54:39 | FromDiscord | <Chronos [She/Her]> Eyy |
18:55:02 | FromDiscord | <Haze System (they/them)> is there no way to do it like this? ;( |
18:55:33 | FromDiscord | <Elegantbeef> I just told you how |
18:56:26 | FromDiscord | <Haze System (they/them)> with $? |
18:57:04 | FromDiscord | <Chronos [She/Her]> That's only for when stringifying tho fyi |
18:58:07 | FromDiscord | <Haze System (they/them)> i dont want a string though, just the number |
18:58:14 | FromDiscord | <Haze System (they/them)> (edit) "number" => "int" |
18:58:39 | FromDiscord | <Chronos [She/Her]> Yeah then using the ord is your only option afaik |
18:58:55 | FromDiscord | <Haze System (they/them)> got it. thanks |
19:00:01 | FromDiscord | <Chronos [She/Her]> What if my map format was literally just a png that's read and mapped to different tile types hm... |
19:00:59 | FromDiscord | <Elegantbeef> Why do you want the int though? |
19:06:23 | FromDiscord | <Elegantbeef> @Haze System (they/them)\: tell me your secrets! |
19:07:30 | FromDiscord | <Langosta> In reply to @hazesystem "got it. thanks": you could use strUtils |
19:07:36 | FromDiscord | <Langosta> parseInt |
19:07:52 | FromDiscord | <Langosta> or what happens if you specify the variable type in the object definition |
19:23:36 | * | junaid_ quit (Remote host closed the connection) |
19:32:56 | * | ormiret quit (Server closed connection) |
19:33:15 | * | ormiret joined #nim |
19:46:51 | NimEventer | New thread by Hobbyman: Disable GC-safety in Nim 2.0?, see https://forum.nim-lang.org/t/10474 |
20:12:31 | * | rockcavera quit (Remote host closed the connection) |
20:33:56 | * | advesperacit quit () |
20:44:16 | * | rockcavera joined #nim |
20:47:53 | * | jkl quit (Quit: Gone.) |
21:06:36 | * | cnx quit (Ping timeout: 240 seconds) |
21:30:59 | * | cnx joined #nim |
21:52:12 | * | jmdaemon joined #nim |
22:13:48 | * | cnx quit (Ping timeout: 240 seconds) |
22:21:55 | FromDiscord | <Haze System (they/them)> In reply to @Elegantbeef "<@251576885799026688>\: tell me your": to index into a spritesheet png |
22:26:49 | * | cnx joined #nim |
22:27:46 | FromDiscord | <Haze System (they/them)> sent a code paste, see https://play.nim-lang.org/#ix=4Gcc |
22:35:03 | FromDiscord | <Chronos [She/Her]> Yeah that just won't work, enums don't work like that |
22:35:16 | FromDiscord | <Chronos [She/Her]> You could use constants that are defined in another file? |
22:35:43 | FromDiscord | <Chronos [She/Her]> Make `sprites.nim` and use constants, that way you can reference them via `sprites.Player` |
22:43:34 | FromDiscord | <Elegantbeef> Just make an `array[Sprites, ...]` |
22:48:23 | FromDiscord | <Elegantbeef> @Haze System (they/them) are you authoring this data type or what? |
23:08:26 | FromDiscord | <Langosta> sent a code paste, see https://play.nim-lang.org/#ix=4Gco |
23:08:49 | * | cnx quit (Ping timeout: 245 seconds) |
23:09:08 | FromDiscord | <Langosta> hold on, I'm gonna check something I made to see |
23:10:40 | FromDiscord | <Langosta> oh wait MB, you're using tuples |
23:10:45 | FromDiscord | <Langosta> (edit) "tuples" => "enums" |
23:11:19 | FromDiscord | <Langosta> I think nim has a few other tools that could help you get the functionality you want without it being an enum (ordinal type) |
23:11:37 | FromDiscord | <Langosta> sent a code paste, see https://play.nim-lang.org/#ix=4Gcs |
23:14:33 | FromDiscord | <Elegantbeef> > I think nim has a few other tools that could help you get the functionality you want without it being an enum (ordinal type)↵Yea just use an enum indexed array |
23:15:33 | FromDiscord | <tsoj> sent a code paste, see https://play.nim-lang.org/#ix=4Gct |
23:15:36 | FromDiscord | <raynei486> If I'm opening a PR, is it better to make one big mono commit or many smaller commits |
23:15:41 | FromDiscord | <raynei486> Not too familiar with git |
23:15:54 | FromDiscord | <Elegantbeef> It's best to have a single commit in a PR |
23:16:01 | FromDiscord | <Elegantbeef> Tsoj it's an issue with generic type match |
23:16:40 | FromDiscord | <huantian> Each PR should have a single goal↵If that goal is complex you should split it into logical steps, each step being a commit |
23:19:26 | FromDiscord | <raynei486> but they're really small changes with similar (?) goals |
23:19:31 | FromDiscord | <raynei486> Like I just opened this PR |
23:19:32 | FromDiscord | <raynei486> https://github.com/nim-lang/Nim/issues/22695 |
23:19:36 | FromDiscord | <raynei486> (edit) "PR" => "issue" |
23:19:40 | FromDiscord | <Langosta> In reply to @tsoj "Anybody got an idea": an Openarray[T] is not the same type as an openarray[Special[T]]. Special is an object holding a generic |
23:20:13 | FromDiscord | <raynei486> I was planning to have one commit adding the destructors, and another commit simplifying parsers |
23:20:19 | FromDiscord | <raynei486> but maybe they're too different idk |
23:20:21 | FromDiscord | <Elegantbeef> `openArray[T or Special[T]]` might work |
23:20:34 | FromDiscord | <tsoj> In reply to @Elegantbeef "`openArray[T or Special[T]]` might": yes that works |
23:21:41 | * | cnx joined #nim |
23:21:58 | FromDiscord | <Langosta> what if you replace the or with |? |
23:22:03 | FromDiscord | <Haze System (they/them)> In reply to @alendrik "Is there a specific": no, anything will work |
23:22:13 | FromDiscord | <Elegantbeef> `or` is the same as `\` |
23:23:04 | FromDiscord | <Langosta> In reply to @hazesystem "no, anything will work": within your Code, are you just setting these values once and using them as a reference later? Or are you intending to hold State information within it eventually |
23:24:51 | FromDiscord | <Haze System (they/them)> In reply to @alendrik "within your Code, are": the former; for reference. so they coulod be const |
23:24:56 | FromDiscord | <Haze System (they/them)> (edit) "coulod" => "could" |
23:25:08 | FromDiscord | <Elegantbeef> Like i said use an enum indexed array |
23:25:15 | FromDiscord | <Elegantbeef> Problem solved |
23:26:15 | FromDiscord | <Langosta> In reply to @Elegantbeef "Like i said use": honestly, I'm not the most familiar with enum indexed arrays. Could you go more into depth or provide references to look more into them? |
23:26:46 | FromDiscord | <Langosta> I was thinking of using a const tuple since it's just intuitive |
23:27:44 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Gcv |
23:28:03 | FromDiscord | <Langosta> sent a code paste, see https://play.nim-lang.org/#ix=4Gcw |
23:28:35 | FromDiscord | <Langosta> or |
23:28:54 | FromDiscord | <Elegantbeef> Enum indexed arrays are 0 cost abstractions that mimic a look up table |
23:29:07 | FromDiscord | <Elegantbeef> Hashed lookup table\ |
23:29:29 | FromDiscord | <Langosta> Oh that's super cool |
23:30:06 | FromDiscord | <Elegantbeef> It's no different to `array[3, int]` and doing `a[ord(A)] =...` |
23:30:37 | FromDiscord | <Haze System (they/them)> sent a code paste, see https://paste.rs/P1bvH |
23:30:47 | FromDiscord | <Langosta> sent a code paste, see https://play.nim-lang.org/#ix=4Gcz |
23:31:05 | FromDiscord | <Langosta> so then SPRITE.Player should equal |
23:31:19 | FromDiscord | <Haze System (they/them)> oh if that works thats exactly what i was looking for |
23:31:28 | FromDiscord | <Langosta> but it will have more performance costs compared to what beef said |
23:31:41 | FromDiscord | <Elegantbeef> The tuple is the same cost as the array |
23:31:52 | FromDiscord | <Elegantbeef> The tuple doesnt have the runtime indexing though |
23:32:36 | FromDiscord | <Langosta> is that used to iterate over the container during runtime? |
23:32:59 | FromDiscord | <Elegantbeef> Huh? |
23:33:08 | FromDiscord | <Langosta> runtime indexing |
23:33:23 | FromDiscord | <Langosta> SPRITE[idx] is that what you mean |
23:34:15 | FromDiscord | <Elegantbeef> Right you cannot do that with tuples |
23:34:24 | * | azimut quit (Ping timeout: 246 seconds) |
23:34:34 | FromDiscord | <Langosta> if they don't need to access the container through an index, then I feel it will be more appropriate to use the dot notation |
23:34:48 | FromDiscord | <Langosta> if it's in their experience more readable |
23:34:56 | FromDiscord | <Langosta> (edit) "readable" => "readable/understandabl" |
23:34:57 | FromDiscord | <Langosta> (edit) "readable/understandabl" => "readable/understandable" |
23:36:16 | FromDiscord | <Langosta> let us know if it works @Haze System (they/them) |
23:37:19 | FromDiscord | <Haze System (they/them)> yep! |
23:39:45 | FromDiscord | <Langosta> glad it worked! |
23:40:02 | FromDiscord | <Haze System (they/them)> tyvm :) |
23:45:03 | FromDiscord | <Langosta> @Haze System (they/them) As a follow up. This tutorial is SUPER worth it https://narimiran.github.io/nim-basics/. I'm not sure if you've already been able to go through it, but it's a good balance between showing you the language details and helping you move through the language. |
23:45:26 | FromDiscord | <Langosta> It saves extra details to be found in the nim manual if you ever require it |
23:57:33 | * | cnx quit (Ping timeout: 255 seconds) |