00:03:15 | * | lumo_e quit (Quit: Quit) |
00:51:46 | * | jmdaemon joined #nim |
01:41:08 | FromDiscord | <raynei486> what's the purpose of the fusion library? |
01:41:33 | FromDiscord | <raynei486> libraries not fit for the standard but maintained by the core team? |
01:42:45 | FromDiscord | <raynei486> (edit) "what's the purpose of" => "what are" | "library?" => "libraries?" |
01:43:44 | FromDiscord | <raynei486> nvm found my answer on [the readme](https://github.com/nim-lang/fusion) |
02:40:35 | * | anddam quit (Server closed connection) |
02:40:53 | * | anddam joined #nim |
02:50:29 | FromDiscord | <taperfade> its so crazy to me how much can be done with a usb stick |
02:51:10 | FromDiscord | <taperfade> the amount of documents that can be stored |
02:51:17 | FromDiscord | <taperfade> really really important ones |
02:51:24 | FromDiscord | <taperfade> in that small device |
02:51:37 | FromDiscord | <taperfade> and if u lose it ur stuff is gone lol |
02:52:08 | FromDiscord | <taperfade> im a pink hat hacker ( i like the color ) |
02:52:24 | FromDiscord | <taperfade> jk im not even a hacker |
02:52:52 | FromDiscord | <odexine> where are you going with this |
02:53:01 | FromDiscord | <taperfade> wdym |
02:53:09 | FromDiscord | <taperfade> its a silly joke |
02:59:35 | FromDiscord | <odexine> this is a support channel |
02:59:45 | FromDiscord | <taperfade> this is main |
02:59:56 | FromDiscord | <taperfade> sorry |
03:00:13 | FromDiscord | <taperfade> i thought there was a dedicated support channel |
03:27:17 | * | rockcavera quit (Remote host closed the connection) |
04:53:05 | termer | Sup nimmies |
04:53:09 | termer | hehe hoohoo |
05:07:40 | FromDiscord | <Phil> In reply to @.e.l.i "Is there any difference": IIRC not returning anything is slightly better, but that might be because some more complex code down the line you might use expects "no return" rather than "void".↵Those two things on the macro level are 2 different things because on has an `Empty` Node for return type, the other has `Ident "void"` and that difference may screw you. |
05:08:38 | FromDiscord | <Phil> A decent example:↵I do some compile-time validation in my libraries where you can annotate procs to add additional functionality to them.↵Those don't currently take procs with "void" as return type into account because I just now realized there's a difference. |
05:08:56 | FromDiscord | <Phil> (edit) "on" => "one" |
05:09:42 | FromDiscord | <Phil> In reply to @taperfade "i thought there was": I recommend reading the channel descriptions 😛 |
05:28:41 | termer | can't go wrong with `auto` return type |
05:29:05 | * | ntat joined #nim |
05:30:24 | * | oprypin quit (Server closed connection) |
05:30:35 | * | oprypin joined #nim |
05:38:39 | FromDiscord | <Phil> Yes you can, literally looses you the ability to constrain type when they are dependant on each other 😛 |
05:39:41 | FromDiscord | <Phil> Also looses you the ability to constrain types to a specific set of types that must inherit from a base-type |
05:40:31 | FromDiscord | <sirolaf> paru |
05:40:42 | FromDiscord | <Phil> Basically only use (imo) when you really do not give a crap about types and there is no relations between them (e.g. the output type must not be always the same as the type of the first parameter or sth) |
05:41:07 | FromDiscord | <sirolaf> Auto type is annoying |
05:41:18 | FromDiscord | <Phil> (edit) "Basically only use (imo) when you really do not give a crap about types and there is no relations between them (e.g. ... thealways" added "if" | "not" => "always" | removed "always" | "sth)" => "sth, then explicit generic types are better)" |
05:41:41 | FromDiscord | <Phil> I find it useful to explicitly state that types don't matter |
05:41:52 | FromDiscord | <Phil> (edit) "I find it useful to explicitly state that types don't matter ... " added "and they're not logically bound to one another in any way" |
05:42:12 | FromDiscord | <sirolaf> Has weird problems like not being allowed to infer void sometimes, not sure if that's fixed |
05:43:00 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FMX |
05:43:23 | FromDiscord | <Phil> Ah, you mean from a technical perspective while I mean from a semantical perspective |
05:44:34 | FromDiscord | <sirolaf> I think it would be nice to have it inject generic parameters instead but that has its own problems |
05:44:48 | FromDiscord | <Phil> I'd honestly consider that a feature because nothing should have a void type bar proc returns and proc returns should never auto to void because that means sometimes the generic proc returns something and sometimes it doesn't and that is unexpected behaviour to me |
05:44:59 | FromDiscord | <Phil> (edit) "that" => "not being able to infer void" |
05:46:12 | FromDiscord | <sirolaf> Yeah that's fair, but it also breaks apart when you try to use it with generics |
05:46:22 | FromDiscord | <sirolaf> There's this weird conflict of what should be evaluated first I think |
05:47:17 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FMY |
05:48:40 | FromDiscord | <Phil> Is there some kind of merge pragma or macro floating about that I can't find in the docs?↵The docs do mention some merge procs but those are in std/tables and algorithm and I import neither of them |
05:50:01 | FromDiscord | <sirolaf> I had a similar problem but with `namespace` actually, maybe it's this file somehow <https://github.com/nim-lang/Nim/blob/devel/compiler/wordrecg.nim> |
05:50:05 | FromDiscord | <sirolaf> Has both merge and namespace as special |
05:51:30 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FN5 |
05:51:36 | FromDiscord | <Phil> (edit) |
05:53:25 | FromDiscord | <sirolaf> https://media.discordapp.net/attachments/371759389889003532/1149945639183065139/image.png |
05:54:10 | FromDiscord | <sirolaf> That is the problem in your case it seems, some ancient builtin pragma |
05:54:39 | FromDiscord | <sirolaf> (edit) "pragma" => "pragma(?)" |
05:54:58 | FromDiscord | <Phil> Hmmmmm |
05:55:22 | FromDiscord | <Phil> Any good suggestions for alternative names?↵It's a pragma that essentially generates a proc-body for you to merge every parameter after the first into the first |
05:57:40 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FN8 |
05:58:19 | FromDiscord | <Phil> I guess "combine", while not great, is not abhorrent either |
05:58:43 | FromDiscord | <Elegantbeef> how is that a merge |
05:58:48 | FromDiscord | <Elegantbeef> that's a transfer or map |
05:59:08 | FromDiscord | <Phil> No map `proc x(y: A): B` |
05:59:14 | FromDiscord | <Phil> (edit) "No map ... `proc" added "is sth like" |
05:59:17 | FromDiscord | <Elegantbeef> inplacemap |
06:01:14 | FromDiscord | <sirolaf> mapParams |
06:01:44 | FromDiscord | <Phil> sent a long message, see http://ix.io/4FNc |
06:01:51 | FromDiscord | <sirolaf> Also maybe I was lying about namespace, works now. Was playing around with js backend to write a chrome extension so needed a way to put stuff in namespaces |
06:02:23 | FromDiscord | <Phil> Then again, inplacemap 1) fits my package name better and 2) the "inplace" is pretty good information and explains well |
06:05:01 | FromDiscord | <Phil> But transfer is shorter, oh the hells of naming |
06:05:45 | FromDiscord | <sirolaf> It's crazy how far you can push nim's ffi, lets you use the functions almost exactly like you'd do in js `await browser.tabs.query(TabQueryOpts(active : true, currentWindow: true))` https://media.discordapp.net/attachments/371759389889003532/1149948740560502844/image.png |
06:09:38 | FromDiscord | <sirolaf> On the matter of macros, do you know what the difference between quote and quote do is? I never know which to use when I use quote |
06:10:10 | FromDiscord | <Elegantbeef> quote do gets around some chaining issues iirc |
06:10:30 | FromDiscord | <Elegantbeef> But the year is 2023 just use genast |
06:11:06 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FNe |
06:11:17 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4FNe" => "https://play.nim-lang.org/#ix=4FNf" |
06:11:39 | FromDiscord | <Phil> The pragma/macro takes in the procdef and returns a manipulated procdef, that should replace the old one no? |
06:11:53 | FromDiscord | <Phil> It worked that way for literally every other macro in this package |
06:12:25 | FromDiscord | <Elegantbeef> typed is after it has been sym'd I believe you need to replace the proc name |
06:12:36 | FromDiscord | <Elegantbeef> Don't recall though |
06:13:45 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FNi |
06:14:20 | FromDiscord | <sirolaf> genast acts pretty weird, can't use that in my case |
06:14:21 | FromDiscord | <Phil> Aaaand it works again, the error you get is just super cryptic, wtf |
06:15:27 | FromDiscord | <Elegantbeef> genast works the same as quote do |
06:15:39 | FromDiscord | <Elegantbeef> Atleast in my experience |
06:15:49 | FromDiscord | <Phil> The problem was that I was using a proc whose name I hadn't defined in the test and the error just pointed me in the entirely wrong direction |
06:16:45 | * | azimut joined #nim |
06:17:37 | FromDiscord | <sirolaf> sent a code paste, see https://play.nim-lang.org/#ix=4FNj |
06:18:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4FNk |
06:18:56 | FromDiscord | <sirolaf> Leads to `Error: cannot evaluate at compile time: importStr` |
06:19:46 | FromDiscord | <sirolaf> Nevermind, only says that with the backtick things |
06:19:54 | FromDiscord | <Elegantbeef> Ah `genast(importStr = newLit importStr)` if that didnt work |
06:20:06 | FromDiscord | <sirolaf> Why is the colon for add needed? |
06:20:46 | FromDiscord | <Elegantbeef> Same reason `do` is for `quote` iirc |
06:21:24 | FromDiscord | <sirolaf> This is really inconsistent |
06:21:31 | FromDiscord | <sirolaf> Doing the same with just quote breaks until you add backticks |
06:21:52 | FromDiscord | <sirolaf> Well either way, genAst works the way you say so thanks |
06:25:16 | FromDiscord | <Phil> Oh lord... beef is there a simple way to instantiate a named tuple type like an object so I don't have to explicitly provide dummy values for like 8 fields |
06:25:38 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FNp |
06:25:44 | FromDiscord | <Elegantbeef> `default(B)` |
06:26:14 | FromDiscord | <odexine> A tuple with 8 fields feels like a code smell |
06:26:16 | FromDiscord | <Phil> Phew that saved my bacon |
06:26:26 | FromDiscord | <Elegantbeef> It is a code smell |
06:26:31 | FromDiscord | <Phil> In reply to @odexine "A tuple with 8": It's a test that checks that values get transferred of all sorts of fields |
06:26:43 | FromDiscord | <odexine> If it’s for a test sure okay |
06:28:09 | FromDiscord | <Phil> If that were actual code I'd fully agree, but I'm just unit-testing my new "inplaceMap" pragma |
07:19:02 | FromDiscord | <sOkam! 🫐> @ElegantBeouf how is atlas so far? |
07:19:29 | FromDiscord | <sOkam! 🫐> im sick of not being able to `nimble develop`, its wasting me so much time↵do you think its worth switching? |
07:21:45 | FromDiscord | <Elegantbeef> I havent used atlas myself |
07:22:24 | FromDiscord | <sirolaf> I like atlas |
07:24:33 | FromDiscord | <sirolaf> It had some issues with package locations for a bit but that all seems fixed now |
07:25:57 | FromDiscord | <sOkam! 🫐> @sirolaf how do you handle dependencies yourself? do you just duplicate them? |
07:26:09 | FromDiscord | <sirolaf> I make a new workspace for every project, so yeah lots of duplicates |
07:26:28 | FromDiscord | <sOkam! 🫐> where do you store them per project? |
07:26:36 | FromDiscord | <sOkam! 🫐> can it do a subfolder or something? |
07:26:57 | FromDiscord | <sirolaf> You can do `atlas init --deps:depdir` to put dependencies into `depdir` |
07:27:10 | FromDiscord | <sOkam! 🫐> oh thats sick |
07:27:24 | FromDiscord | <sOkam! 🫐> is that depdir arbitrary? like can it take an absolute path? |
07:27:41 | FromDiscord | <sOkam! 🫐> that would solve the duplicate issue |
07:27:52 | FromDiscord | <sirolaf> Yeah just give it a path, should work. But it does keep other stuff next to your project too, so not sure how it would deal with conflicting versions |
07:28:09 | FromDiscord | <sOkam! 🫐> wdym by other stuff? |
07:28:51 | FromDiscord | <sirolaf> Altas can also manage the nim compiler as a dependency |
07:29:12 | FromDiscord | <sirolaf> In reply to @heysokam "wdym by other stuff?": It makes this packages dir, never looked into it, probably just to keep track of nimble index |
07:29:15 | FromDiscord | <sOkam! 🫐> as in you download atlas manually and it installs nim? |
07:29:35 | FromDiscord | <sirolaf> <https://github.com/nim-lang/atlas#installing-nim-with-atlas> best just check here |
07:29:39 | FromDiscord | <sirolaf> Like a python venv I guess |
07:30:07 | FromDiscord | <sirolaf> (edit) "guess" => "guess, tried it and it was cool, but didn't need it" |
07:30:10 | FromDiscord | <sOkam! 🫐> thats pretty epic |
07:30:15 | FromDiscord | <Elegantbeef> Bold of you to assume people have experience with python venvs |
07:30:24 | FromDiscord | <sOkam! 🫐> thats something similar to what i do with confy for zig |
07:30:42 | FromDiscord | <sOkam! 🫐> although I rely on non-local as priority, but been searching for a way to do it easier |
07:31:00 | FromDiscord | <sOkam! 🫐> (edit) "although I rely on non-local as priority, but been searching for a way to do it easier ... " added "for nim" |
07:31:09 | FromDiscord | <sirolaf> Would just give it a try, haven't used nimble since atlas became usable |
07:31:44 | FromDiscord | <sOkam! 🫐> i rely on nimble heavily, but having to gitcommit/gitpush mandatory for every single line I change is fucking getting me on my nerves like you cannot even imagine |
07:32:09 | FromDiscord | <sOkam! 🫐> i like the tool, it just has become unreliable since nimble develop is gone |
07:33:32 | FromDiscord | <sOkam! 🫐> In reply to @sirolaf "Would just give it": do you keep nimble support in your packages, or just assume that the users will also use atlas? |
07:34:10 | FromDiscord | <sOkam! 🫐> if found that some things that atlas adds make nimble choke on itself pretty badly.. so that literally stopped me on my feet the last time i tried it |
07:34:40 | FromDiscord | <sirolaf> Well for one I don't have any public packages 😛, but it uses nim.cfg and a nimble file together, so it should be compatible without issue |
07:34:52 | FromDiscord | <sOkam! 🫐> its not compatible though |
07:35:07 | FromDiscord | <sOkam! 🫐> it adds things to the nimble file that nimble doesn't understand |
07:35:23 | FromDiscord | <odexine> nimble develop is still implemented, its just behind a strange flag that i dont recall |
07:35:37 | FromDiscord | <sOkam! 🫐> (or rather, it -can- add them, not all of them are incompatible) |
07:35:59 | FromDiscord | <sirolaf> Might have to do with version resolution then, haven't had any issues myself |
07:36:09 | FromDiscord | <sOkam! 🫐> In reply to @odexine "nimble develop is still": you mean a `-d:` flag when compiling nimble? |
07:36:16 | FromDiscord | <odexine> nimble develop -g it seems |
07:36:27 | FromDiscord | <odexine> similar to old nimble develop but iirc not exact |
07:36:31 | FromDiscord | <Elegantbeef> Atlas doesnt add anything to nimble that is incompatible |
07:36:37 | FromDiscord | <sOkam! 🫐> nimble develop doesn't take any parameters in current, it crashes |
07:36:41 | FromDiscord | <Elegantbeef> Yea it also doesnt work 😄 |
07:36:43 | FromDiscord | <sOkam! 🫐> it has no parameters |
07:37:03 | FromDiscord | <Elegantbeef> nimble 0.14 does allow `nimble develop -g` |
07:37:11 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "Atlas doesnt add anything": it does, though. `file::/path/to/file` is incompatible |
07:37:14 | FromDiscord | <sOkam! 🫐> and its one of the things it adds |
07:37:54 | FromDiscord | <odexine> "incompatible" meaning what exactly |
07:38:53 | FromDiscord | <sOkam! 🫐> incompatible as in nimble does not work after that |
07:39:01 | FromDiscord | <sOkam! 🫐> because it does not understand that syntax |
07:39:27 | FromDiscord | <sOkam! 🫐> i would paste the error, but i literally removed the test folder after seeing that |
07:39:29 | FromDiscord | <Phil> I mean, to have package local deps with nimble you can also just add a nimbledeps dir |
07:39:44 | FromDiscord | <sOkam! 🫐> whats that? |
07:40:15 | FromDiscord | <Phil> > If the nimbledeps directory exists next to the package .nimble file, Nimble will use that directory as $nimbleDir and $HOME/.nimble will be ignored. This allows for project local dependencies and isolation from other projects. The -l | --localdeps flag can be used to setup a project in local dependency mode. |
07:40:21 | FromDiscord | <Phil> just a dir with that name |
07:40:46 | FromDiscord | <sOkam! 🫐> err... sure |
07:40:58 | FromDiscord | <sOkam! 🫐> but that literally erases all of the others, if it "ignores" the root dit |
07:40:59 | FromDiscord | <sOkam! 🫐> (edit) "dit" => "dir" |
07:41:26 | FromDiscord | <sOkam! 🫐> i want to keep using nimble as normal, but have my targeted folders as local... without having to go into every single package to do that manually |
07:41:35 | FromDiscord | <sirolaf> Global dependencies stink anyways |
07:41:41 | FromDiscord | <Phil> symlink your package into that one and I think it should work |
07:41:51 | FromDiscord | <Phil> (edit) "one" => "nimbledeps dir" |
07:42:09 | FromDiscord | <sOkam! 🫐> dont follow what you meant phil |
07:42:17 | FromDiscord | <Phil> Okay, you on linux? |
07:42:26 | FromDiscord | <sOkam! 🫐> In reply to @sirolaf "Global dependencies stink anyways": yeah thought so too. but one of my deps becomes 2GB on compilation |
07:42:33 | FromDiscord | <odexine> why? |
07:42:43 | FromDiscord | <sOkam! 🫐> wgpu 🤷♂️ |
07:42:48 | FromDiscord | <odexine> as in the dependency folder changes in size? |
07:42:50 | FromDiscord | <sOkam! 🫐> i dont know why, it just does |
07:43:04 | FromDiscord | <sOkam! 🫐> when you build wgpu, the compiled contents are 2GB in size |
07:43:22 | FromDiscord | <sirolaf> Guess that's just the rust experience |
07:43:34 | FromDiscord | <sOkam! 🫐> 🤷♂️ no clue honestly |
07:43:51 | FromDiscord | <sOkam! 🫐> In reply to @isofruit "Okay, you on linux?": i know how to symlink. but i don't understand the structure you mean |
07:44:56 | FromDiscord | <Phil> If nimble looks for dependencies only locally in nimbledeps and you want some of those to be global, you can just symlink into them.↵Which... ugh right is a per project setup and that's a non starter for you |
07:45:31 | FromDiscord | <sOkam! 🫐> it could possibly work |
07:45:47 | FromDiscord | <sOkam! 🫐> but... im adding `-path:/path/to/folder` in nim.cfg... and the problem is in the dependencies |
07:46:02 | FromDiscord | <sOkam! 🫐> which means that i would need to do that for every single dependency, not just the root one |
07:46:18 | FromDiscord | <sOkam! 🫐> its failing to find a symbol that's inside one of the dependencies |
07:48:01 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FNH |
07:48:25 | FromDiscord | <arathanis> i got you @sOkam! 🫐 |
07:48:26 | FromDiscord | <sOkam! 🫐> (edit) "https://play.nim-lang.org/#ix=4FNH" => "https://play.nim-lang.org/#ix=4FNI" |
07:48:30 | FromDiscord | <arathanis> let me find it |
07:49:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4FNJ |
07:49:22 | FromDiscord | <arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4FNK |
07:50:07 | FromDiscord | <arathanis> (edit) "https://play.nim-lang.org/#ix=4FNK" => "https://paste.rs/AxCak" |
07:50:08 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FNN |
07:50:10 | FromDiscord | <sOkam! 🫐> good idea though |
07:50:28 | FromDiscord | <arathanis> (edit) "https://play.nim-lang.org/#ix=4FNQ" => "https://play.nim-lang.org/#ix=4FNP" |
07:50:47 | FromDiscord | <arathanis> yes |
07:50:47 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FNR |
07:50:57 | FromDiscord | <arathanis> i use this all the time to handle the exact thing you were describing |
07:51:17 | FromDiscord | <arathanis> automatically adding local nimbledeps to the compiler's path |
07:51:22 | FromDiscord | <sOkam! 🫐> so you don't need to nimble develop with this, right? |
07:51:25 | FromDiscord | <arathanis> i dont |
07:51:34 | FromDiscord | <arathanis> it just adds any folders in the local deps to the path automatically |
07:51:41 | FromDiscord | <sOkam! 🫐> its kinda ugly, but i guess thats a solution for a while |
07:51:55 | FromDiscord | <arathanis> config.nims is exactly for this kind of thing haha |
07:51:59 | FromDiscord | <arathanis> whats ugly about it? |
07:52:10 | FromDiscord | <sOkam! 🫐> that nimble should have the damn support for it 🤷♂️ |
07:52:13 | FromDiscord | <sOkam! 🫐> like it did before |
07:52:42 | FromDiscord | <sOkam! 🫐> i relied on it, and created my packages like that... and now im having to hack around to navigate the problem |
07:52:48 | FromDiscord | <arathanis> :/ |
07:52:53 | FromDiscord | <arathanis> that would be frustrating |
07:53:00 | FromDiscord | <arathanis> i never experienced nimble when it did this automatically |
07:53:06 | FromDiscord | <arathanis> i was mostly just confused why it didn't |
07:53:10 | FromDiscord | <sOkam! 🫐> thats a great idea, though. definitely solves it in a very easy way |
07:53:13 | FromDiscord | <arathanis> so i hacked this together |
07:53:22 | FromDiscord | <sOkam! 🫐> yeah i imagine |
07:54:24 | FromDiscord | <sOkam! 🫐> actually... this is much easier to deactivate temporarily for testing before release than manually disabling nimble develop in every package |
07:54:36 | FromDiscord | <sOkam! 🫐> so... forget what i said, i love it. not ugly, best idea ever 🙂 |
07:55:02 | FromDiscord | <sOkam! 🫐> great thinking @arathanis |
07:55:06 | FromDiscord | <arathanis> thanks! |
07:55:39 | FromDiscord | <arathanis> glad i could help |
07:56:05 | FromDiscord | <sOkam! 🫐> what does `const rootDir = currentSourcePath().parentDir()` resolve to from the config.nims file? |
07:57:24 | FromDiscord | <arathanis> In reply to @heysokam "what does `const rootDir": the directory the `config.nims` file is in |
07:57:36 | FromDiscord | <sOkam! 🫐> so it reads from the file being compiled like usual? kk |
07:57:42 | FromDiscord | <arathanis> yes |
07:57:44 | FromDiscord | <sOkam! 🫐> tyty |
07:57:47 | FromDiscord | <arathanis> npnp |
07:58:35 | * | mal`` quit (Server closed connection) |
07:58:58 | FromDiscord | <sOkam! 🫐> what happens if the local package contains `src/packagename.nim` as its structure? |
07:59:07 | FromDiscord | <sOkam! 🫐> does it resolve it like normal? |
07:59:59 | FromDiscord | <arathanis> not sure. I never see any packages with that structure |
08:00:10 | FromDiscord | <arathanis> i imagine no |
08:00:25 | FromDiscord | <arathanis> but it would not be hard to bake in some logic that handled that case |
08:00:38 | * | mal`` joined #nim |
08:01:33 | FromDiscord | <sOkam! 🫐> i guess i can just `switch("path", path/"src")` instead 🤷♂️ |
08:01:45 | FromDiscord | <arathanis> yeah, or if you want to handle both cases |
08:01:55 | FromDiscord | <arathanis> make a function that checks |
08:03:56 | FromDiscord | <sOkam! 🫐> i think this still does not solve the issue though |
08:04:12 | FromDiscord | <sOkam! 🫐> the problem is the inner package is the one ruling the dependency resolution |
08:04:32 | FromDiscord | <sOkam! 🫐> its listing all of the paths correctly, and they all exist... but the dependencies are still not resolved |
08:05:01 | FromDiscord | <sOkam! 🫐> if I go into that problematic package, and compile something with nimble, it finds the symbol without issues |
08:05:16 | FromDiscord | <sOkam! 🫐> but from the root that depends on that package the dependency is lost, because its local |
08:05:51 | FromDiscord | <sOkam! 🫐> so I would need to do this for all packages, and maintain it 😔 |
08:06:50 | FromDiscord | <arathanis> hmm |
08:07:00 | FromDiscord | <arathanis> im not quite sure i fully understand the structure you are working with |
08:07:22 | FromDiscord | <sirolaf> Could just use those nim skills to make a tool that handles this case for you 😼 |
08:07:25 | FromDiscord | <sOkam! 🫐> `package1 -> dependency1 -> problematicDep` |
08:08:23 | FromDiscord | <sOkam! 🫐> `symbol` lives in `problematicDep`... and dependency1 knows about it inside itself with nmble↵but from package1, problematic dep is searched globally, not locally, even if you add the path locally with a switch |
08:08:57 | FromDiscord | <sOkam! 🫐> so it cannot find it... because for all nimble knows from package1, problematicDep is not installed |
08:09:48 | FromDiscord | <sOkam! 🫐> _(i can add problematicDep to the nimble file, and it works, but.... then i must upload the contents to use them locally)_ |
08:11:28 | FromDiscord | <sOkam! 🫐> In reply to @sirolaf "Could just use those": i wouldn't mind. but i really don't know how to make nimble understand this |
08:12:00 | FromDiscord | <sOkam! 🫐> so its either i stop using nimble, or solve it with the existing tools 🤷♂️↵but if you have other ideas im all ears |
08:14:03 | FromDiscord | <arathanis> im still trying to fully understand the situatio but also thinking |
08:14:07 | FromDiscord | <arathanis> i also got distracted for a moment |
08:17:03 | FromDiscord | <Phil> Beef, you still there? |
08:20:59 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FO3 |
08:34:27 | FromDiscord | <vindaar> To do it exhaustively is going to be pretty complicated (and likely not really possible). If you're just thinking about simple assignment though, you can just walk the AST of the proc body and check for `nnkAsgn` nodes↵(@Phil) |
08:36:55 | FromDiscord | <Phil> In reply to @vindaar "To do it exhaustively": That was actually what I did so far, I just realized that "wait a minute, people can trick that with a simple if-statement!" |
08:37:28 | FromDiscord | <Phil> It is why I have a "getAllNodesOfKind" proc |
08:38:29 | FromDiscord | <Phil> Was a shot in the dark for the most part because for arbitrarily complex proc-bodies of `myProc` that task of checking becomes equally arbitrarily complex |
08:39:17 | FromDiscord | <sirolaf> Wouldn't bother, compiler isn't good at this either |
08:41:15 | FromDiscord | <Phil> But I wanna guarantee correctness 😦 |
08:41:24 | FromDiscord | <Phil> Oh well |
08:42:22 | FromDiscord | <sirolaf> A recent pr of mine did something similar in compiler, but in the process I introduced a bug with blocks because blocks are a nightmare to deal with |
08:42:58 | FromDiscord | <Phil> On the one hand as a compiler dev I bet, on the other as a User blocks are great |
08:43:56 | FromDiscord | <sirolaf> Yeah just gets a bit messy with control flow and named blocks |
08:44:04 | FromDiscord | <sirolaf> Trying to do this in a macro would be an adventure |
08:45:18 | FromDiscord | <sirolaf> Much easier would be only allowing instantiation using a constructor |
08:45:50 | FromDiscord | <sirolaf> (edit) "instantiation" => ""instantiation"" |
08:49:43 | FromDiscord | <Phil> Oh absolutely the thing is this is kind of generating a constructor for you |
08:51:05 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/UNgeJ |
08:52:36 | FromDiscord | <Phil> So the idea is instead of having to write those procs by hand I generate them for you as is possible while allowing you to customize for more complex, custom stuff.↵`proc myMapper(x: User): UserDTO {.map.} = discard`↵And boom, you got your map-proc aka constructor of a UserDTO from a User.↵Just wanted to add the option to compile-time validate that you assign to every field on UserDTO and not that a field is being forgotten somewhere |
08:53:12 | FromDiscord | <Phil> Which I have, but it is trickable as shown earlier by if-statements etc. |
08:53:20 | FromDiscord | <sirolaf> That is just a less safe version of having a constructor and a mapping proc though |
08:53:47 | FromDiscord | <Phil> In reply to @sirolaf "That is just a": It is one where you save yourself writing a lot of code. |
08:54:24 | * | attah quit (Read error: Connection reset by peer) |
08:54:28 | FromDiscord | <Phil> Well, not "a lot", a fair amount |
08:54:49 | FromDiscord | <taperfade> guyx |
08:54:50 | FromDiscord | <taperfade> guys |
08:55:12 | FromDiscord | <taperfade> how do make files execute on start |
08:55:57 | FromDiscord | <odexine> “Start” of what |
08:56:04 | FromDiscord | <taperfade> and how do i make other exe files and copy them into different folders |
08:56:20 | FromDiscord | <frobnicate> In reply to @odexine "“Start” of what": On startup I'm guessing |
08:56:35 | FromDiscord | <odexine> Probably with a lot of pain via the windows API |
08:56:46 | FromDiscord | <odexine> which will get you caught by antivirus anyway |
08:57:07 | FromDiscord | <sirolaf> sent a code paste, see https://play.nim-lang.org/#ix=4FOb |
08:57:09 | FromDiscord | <sirolaf> I think the safety of relying on init is worth it |
08:58:03 | FromDiscord | <sirolaf> The constructor is also a lot easier to generate from typedef, so the only thing you really do is write the mappers |
08:58:27 | * | attah joined #nim |
08:59:00 | FromDiscord | <sirolaf> (edit) "https://play.nim-lang.org/#ix=4FOb" => "https://play.nim-lang.org/#ix=4FOd" |
08:59:19 | FromDiscord | <vindaar> @Phil\: You could do something like this https://play.nim-lang.org/#ix=4FOc↵But as @sirolaf alludes to, you can imagine this becoming very complicated very quickly (e.g. nested branches are still okay, just recurse, but once function calls come in...) |
08:59:24 | FromDiscord | <taperfade> In reply to @odexine "which will get you": dang |
08:59:32 | FromDiscord | <Phil> Is initFrom supposed to transfer values? Because when I execute it, it doesn't |
08:59:50 | FromDiscord | <sirolaf> Well yeah the init procs aren't implemented 😛 |
08:59:51 | FromDiscord | <Phil> Or is this a dummy and you're supposed to write the body yourself because that is exactly the point to avoid |
09:00:37 | FromDiscord | <Phil> There's a reason other languages have packages like mapstruct etc. where you just want to outsource the task of mapping A to B because writing it by hand is mind numbingly dull |
09:01:32 | FromDiscord | <sirolaf> What languages have this? |
09:04:13 | FromDiscord | <Phil> JVM langs have mapstruct and the concept of Object mappers generally↵Python has object mapper packages as well↵JS AutoMapper |
09:04:35 | FromDiscord | <sirolaf> This mapstruct thing from jvm doesn't let you do any customization from what I can tell |
09:05:02 | FromDiscord | <Phil> In reply to @sirolaf "This mapstruct thing from": It does, using @Mapping annotations. Just given that it's java it's like pulling teeth in terms of how pleasant it is |
09:05:24 | FromDiscord | <sirolaf> That is only for field names is it not |
09:05:46 | FromDiscord | <sirolaf> Was talking more about custom function body |
09:06:00 | FromDiscord | <Phil> You get to write a proc, it provides default behaviour and you customize it with @Mapping.↵You can use @Mapping to link to other methods in the object/interface that allow you to get really custom, you can integrate it into Springs DI to also access service beans etc. |
09:06:44 | FromDiscord | <Phil> In reply to @sirolaf "Was talking more about": Ah that, yeah that they do not do, that is me wanting to circumvent the hellhole of customization options they provide that you need to know to be able to actually use mapstruct fully |
09:07:08 | FromDiscord | <sirolaf> What if you attached a pragma to the field instead |
09:07:12 | FromDiscord | <Phil> When you can make your life far easier by just having a normal proc |
09:07:24 | FromDiscord | <Phil> (edit) "When you can make your life far easier by just having a normal proc ... " added "and invisibly adding mapping before the users statements" |
09:07:57 | FromDiscord | <Phil> In reply to @sirolaf "What if you attached": How I want to treat the field is a property of the transformation itself and thus the proc, not really the type |
09:08:38 | FromDiscord | <Phil> And either way, it's fine, this is me refining a feature that already does more than Mapstruct or any other package I've seen around this has done so far - providing some level of compile-time validation for mappings |
09:09:16 | FromDiscord | <Phil> Mapstruct is perfectly happy in silently not mapping values to fields and instead leaving them default initialized.↵Mapster at least gives you in most scenarios a compilation error if you enable the feature |
09:09:19 | FromDiscord | <Phil> (edit) "Mapstruct is perfectly happy in silently not mapping values to fields and instead leaving them default initialized.↵Mapster at least gives you in most scenarios a compilation error if you enable the feature ... " added "via flag" |
09:10:35 | FromDiscord | <Phil> In reply to @taperfade "dang": Not writing malware would be really appreciated |
09:12:23 | FromDiscord | <vindaar> @Phil\: did you see my link above? |
09:12:55 | FromDiscord | <sirolaf> Least bad similar thing I can think of would be this <https://github.com/Udiknedormin/NimContracts#hello-contracts>, so you could just check if all fields evaluate to an expression |
09:13:20 | FromDiscord | <Phil> In reply to @vindaar "<@180601887916163073>\: did you see": Ah, forgot to respond, sorry got captivated by the discussion.↵Yeah skimmed over the code and I agree that it just gets too complicated to deal with if the user insists on having that complex level of logic in a mapping function |
09:14:23 | FromDiscord | <sirolaf> sent a code paste, see https://play.nim-lang.org/#ix=4FOi |
09:14:23 | FromDiscord | <sirolaf> Like this |
09:15:57 | FromDiscord | <Phil> In reply to @sirolaf "Least bad similar thing": I actually don't quite understand what's going on there.↵To me this seems like a bunch of `if not condition: raise newException()` hidden behind new wording |
09:16:08 | FromDiscord | <Phil> (edit) "wording" => "syntax" |
09:16:32 | FromDiscord | <sirolaf> Just wanted to show that for where I pulled that construct from, contracts like this have nothing to do with the issue at hand besides that |
09:16:58 | FromDiscord | <Phil> Ohhh you meant where you got the "attach pragma to field" thing from |
09:17:15 | FromDiscord | <sirolaf> The "make proc body enforce a structure" idea |
09:17:59 | FromDiscord | <sirolaf> Easiest way to ensure all fields get assigned is enforcing the structure where each field is a block that must be an expression |
09:18:45 | FromDiscord | <Phil> Hmmm |
09:19:19 | FromDiscord | <sirolaf> Would probably be somewhat easy to implement as a macro too because compiler does the annoying job of checking expressions |
09:19:24 | FromDiscord | <Phil> So either limit how the user can express things within the proc itself to guarantee correctness, or weaken my guarantee for correctness and in exchange they can do whatever they want in the body |
09:19:40 | FromDiscord | <odexine> that's just how it is isnt it |
09:19:56 | FromDiscord | <Phil> Might be worth it as an additional feature that you can either have "strict" validation or "lax" validation |
09:20:31 | FromDiscord | <Phil> In reply to @sirolaf "Would probably be somewhat": I mean shouldn't it be possible to make this even simpler by just stating "every node in the statement list that is the proc body must be nnkAsgn" ? |
09:20:49 | FromDiscord | <Phil> Which should be pretty easy to validate |
09:20:51 | FromDiscord | <sirolaf> Yeah can do that too obviously |
09:21:22 | FromDiscord | <sirolaf> But then you can't really share state between them, with enforced structure you could easily have a special block that has shared state |
09:22:11 | FromDiscord | <odexine> dumb idea but if you want to go insane, generate an auxilliary result type that have fields of option[t] and translate any regular field assignments into option assignments, then check if any fields are none |
09:22:33 | FromDiscord | <sirolaf> sent a code paste, see https://play.nim-lang.org/#ix=4FOl |
09:22:34 | FromDiscord | <Phil> Hmm in that case I lost the plot somewhere, or rather I may have missunderstood the idea you wanted to convey via the contracts package |
09:23:03 | FromDiscord | <Phil> I can't map the words "enforce a structure on the body" to computation operations in my head |
09:23:13 | FromDiscord | <Phil> (edit) "I can't map the words "enforce a structure on the body" to computation operations ... in" added "or basically code" |
09:24:04 | FromDiscord | <sirolaf> In reply to @odexine "dumb idea but if": Yeah not bad either, but that would be a runtime check wouldn't it |
09:24:16 | FromDiscord | <odexine> oh ct? okay |
09:24:31 | FromDiscord | <sirolaf> I assumed it should be ct, no idea |
09:24:38 | FromDiscord | <Phil> It is supposed to be ct |
09:24:57 | FromDiscord | <Phil> ~~This is not python, we got big boy toys here~~ |
09:25:05 | FromDiscord | <odexine> In reply to @isofruit "I can't map the": make sure that each field assignment are in a block with a specific AST |
09:26:36 | FromDiscord | <odexine> personally i'd prolly opt for "disallow result/return kw, expression return only" |
09:26:54 | FromDiscord | <Phil> Oh like basically you can have whatever in your proc body where you compute the value of your fields as necessary and then theres an "assign" section that may only have assignments.↵And to get all assignments I just take each individual statement in there |
09:27:01 | FromDiscord | <odexine> then again i guess object constrs dont need all fields to be specified |
09:27:17 | FromDiscord | <Phil> They don't, this is an optional feature |
09:27:24 | FromDiscord | <odexine> what reason do you need all fields to be specified again? is this to prevent bugs? |
09:27:58 | FromDiscord | <Phil> In reply to @odexine "what reason do you": Aye. Mostly to prevent bugs that may happen over time as data-types change and your transformation of A to B due to type-changes in A or B may no longer work well |
09:28:20 | FromDiscord | <Phil> It's also why this is an optional feature |
09:28:41 | FromDiscord | <sirolaf> Might also make sense to enforce `{.raises: [].}` |
09:30:00 | FromDiscord | <odexine> sent a code paste, see https://play.nim-lang.org/#ix=4FOn |
09:30:03 | FromDiscord | <odexine> and validate it too ig |
09:30:16 | FromDiscord | <sirolaf> Yeah same thing different angle |
09:30:23 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FOo |
09:30:33 | FromDiscord | <odexine> it's simpler to me because now it can just translate direct to an expr return |
09:30:56 | FromDiscord | <odexine> but ig the field interdependency issue is still there |
09:31:15 | FromDiscord | <odexine> can be bypassed by making a let someval = ... then in assign you use that value on both fields |
09:31:19 | FromDiscord | <odexine> or similar translations |
09:31:29 | FromDiscord | <odexine> i guess that translation can even be built into `assign` |
09:36:21 | FromDiscord | <vindaar> What I would do\: Use an approach similar to what I wrote above, then add CT warnings to any node kind where you don't want to guarantee that your check is exhaustive. You get assignment checks in \>90% of cases and the user still sees where they might want to have a look at |
09:36:40 | FromDiscord | <taperfade> In reply to @isofruit "Not writing malware would": Dw |
09:37:12 | * | xet7 quit (Remote host closed the connection) |
09:39:00 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FOr |
09:39:23 | FromDiscord | <taperfade> https://media.discordapp.net/attachments/371759389889003532/1150002501446291496/image.png https://media.discordapp.net/attachments/371759389889003532/1150002501718917201/image.png https://media.discordapp.net/attachments/371759389889003532/1150002501941211246/image.png |
09:39:23 | FromDiscord | <sirolaf> Yeah and then you might even go crazy and use a constructor instead |
09:39:37 | FromDiscord | <taperfade> OwO:UwU |
09:40:01 | FromDiscord | <Phil> In reply to @sirolaf "Yeah and then you": I mean, these are the more exceptional cases comparatively speaking and writing constructors is incredibly boring, so no 😛 |
09:40:11 | FromDiscord | <Phil> (edit) "In reply to @sirolaf "Yeah and then you": I mean, these are the more exceptional cases comparatively speaking and writing constructors ... is" added "to create a type from another type" |
09:40:24 | FromDiscord | <sirolaf> If it's exceptional why not write the constructor once |
09:41:21 | FromDiscord | <sirolaf> Nim users and their fancy macros just can't resist solving problems that don't exist 😛 |
09:41:22 | FromDiscord | <Phil> Because then I still need to write result.id = x.id and result.otherField = x.otherField↵The idea is to reduce the mental overhead and chance of messing up |
09:41:46 | FromDiscord | <Phil> More like I saw mapstruct, I liked it and then wanted something that saves me from messing up 😛 |
09:42:34 | FromDiscord | <sirolaf> Nothing stopping you from checking that all fields appear in `MyType()` |
09:42:52 | FromDiscord | <Phil> Yeah but that's boring effort again |
09:43:17 | FromDiscord | <Phil> and I don't automatically get compiler errors if I add a field to MyType and forget to update the constructor proc |
09:43:46 | FromDiscord | <sirolaf> Generate the constructor proc then |
09:44:41 | FromDiscord | <Phil> You can yourself by just using `proc init(x: A): B {.map.}` etc. 😛 |
09:45:02 | FromDiscord | <odexine> Why again are you not generating constructors |
09:45:10 | FromDiscord | <odexine> You already have a package to do it no? |
09:45:26 | FromDiscord | <odexine> Do you not have beef’s library repertoire in memory at all times? |
09:45:37 | FromDiscord | <Phil> Nope, there's constructor to generate constructors with static values |
09:45:54 | FromDiscord | <Phil> And I don't think even that does any sort of compiletime validation |
09:46:15 | FromDiscord | <odexine> Technically it does, if a parameter isn’t supplied then there’s your error |
09:46:21 | FromDiscord | <sirolaf> Whatever you end up doing, be prepared to get screwed by generics |
09:46:23 | FromDiscord | <odexine> I don’t understand the problem |
09:47:46 | FromDiscord | <sirolaf> <https://github.com/nim-lang/Nim/pull/22432> Beef had this pr, just so we're on same page with generics |
09:47:54 | FromDiscord | <sirolaf> You will probably have trouble getting the fields |
09:48:05 | FromDiscord | <taperfade> guys how do i get the currrent user |
09:48:08 | FromDiscord | <taperfade> like |
09:48:35 | FromDiscord | <taperfade> C:\Users\THIS\ |
09:48:40 | FromDiscord | <taperfade> how do i get THIS |
09:52:21 | FromDiscord | <sirolaf> You really gotta learn to use a search engine |
09:52:29 | FromDiscord | <taperfade> i dont find anything |
09:52:47 | FromDiscord | <sirolaf> `winapi <your problem>` |
09:52:56 | FromDiscord | <taperfade> what |
09:52:58 | FromDiscord | <taperfade> ? |
09:53:11 | FromDiscord | <sirolaf> <https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getusernamea> leads us here |
09:54:42 | FromDiscord | <sirolaf> None of these system things are nim exclusive, they are winapi exclusive. You just get a wrapper with winim so normal c++ solutions apply |
09:56:07 | FromDiscord | <odexine> https://www.google.com/search?q=nim+current+username |
09:56:09 | FromDiscord | <odexine> x d |
09:56:49 | FromDiscord | <sirolaf> Wild |
09:57:05 | FromDiscord | <sirolaf> First lying about not writing malware and then lying about googling 😛 |
10:54:28 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FOK |
10:57:19 | FromDiscord | <odexine> Ignore it because `export` exported both the correct and the deprecated proc, because of overloading |
10:57:32 | FromDiscord | <Phil> Alrighty |
11:22:50 | FromDiscord | <pmunch> Did anyone of you post my article to the orange website or something? It got almost 10k views overnight, but not a single comment in any of the places where I posted it.. |
11:23:37 | FromDiscord | <pmunch> I think I might have to set up some kind of analytics other than just number of page hits |
11:26:39 | * | PMunch joined #nim |
11:28:00 | FromDiscord | <kingterrytheterrible12> In reply to @pmunch "Did anyone of you": What is the orange site |
11:28:08 | FromDiscord | <kingterrytheterrible12> HN? |
11:29:05 | FromDiscord | <kingterrytheterrible12> And also does nim have dynamic dispatch |
11:29:29 | FromDiscord | <kots> https://nim-lang.github.io/Nim/manual.html#methods |
11:34:16 | FromDiscord | <kingterrytheterrible12> In reply to @k0ts "https://nim-lang.github.io/Nim/manual.html#methods": Is it implemented as vtable? |
11:35:18 | FromDiscord | <taperfade> no way |
11:35:19 | FromDiscord | <taperfade> guys |
11:35:29 | PMunch | @kingterrytheterrible12, yes HN. They have algorithms to avoid brigading, which searches around where people post the article and demotes it if HN is mentioned. At least that's the rumours :P |
11:35:45 | FromDiscord | <taperfade> that code |
11:35:47 | FromDiscord | <taperfade> sent a code paste, see https://play.nim-lang.org/#ix=4FOU |
11:35:49 | FromDiscord | <taperfade> triggered norton |
11:35:58 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "<@655759729477287956>, yes HN. They": Can you link your article? |
11:36:04 | FromDiscord | <taperfade> 😭 |
11:36:40 | PMunch | @kingterrytheterrible12, https://peterme.net/teaching-old-c-code-new-tricks-with-nim.html |
11:36:48 | PMunch | It's a pretty low-level technical thing :P |
11:37:00 | PMunch | @taperfade, your malware got detected by a malware scanner? |
11:37:24 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "<@655759729477287956>, https://peterme.net/teaching": Oh thats you? I've come across this when i searched "C for the C++ dev" for some reason |
11:37:29 | FromDiscord | <taperfade> its not even malicious |
11:37:49 | PMunch | @taperfade, I didn't read your snippet, just assumed from yesterdays convo |
11:37:52 | FromDiscord | <taperfade> it gets the username and checks if C:\Program Files exists |
11:38:01 | FromDiscord | <Phil> At this point accusing sz of malware is starting to become a meme 😄 |
11:38:13 | PMunch | @kingterrytheterrible12, oh cool, maybe that's why it has gotten so man views, I've started showing up in searches more |
11:38:37 | FromDiscord | <Phil> In reply to @PMunch "<@655759729477287956>, oh cool, maybe": You hit the SEO goldmine it seems |
11:38:41 | FromDiscord | <Phil> Time to optimize titles |
11:38:51 | FromDiscord | <kingterrytheterrible12> Make bait articles |
11:39:11 | FromDiscord | <kingterrytheterrible12> "Why rust doesn't deliver on its promises" |
11:39:23 | FromDiscord | <kingterrytheterrible12> Add ads and bait theprimegen lol |
11:39:54 | FromDiscord | <odexine> In reply to @kingterrytheterrible12 ""Why rust doesn't deliver": "is this really bait tho" |
11:40:49 | FromDiscord | <kingterrytheterrible12> Or "is nim as fast as C? Lets find out" |
11:44:37 | PMunch | I did have an article titled "Beating C at its own game" from a time where we where micro-optimizing some silly benchmark and got the Nim solution faster than the fastest C version :P |
11:44:44 | FromDiscord | <taperfade> how do i make a folder like thing |
11:44:50 | FromDiscord | <taperfade> like |
11:45:00 | FromDiscord | <taperfade> so i can go |
11:45:17 | FromDiscord | <kingterrytheterrible12> Go? |
11:45:20 | FromDiscord | <taperfade> echo fileOne.data |
11:45:21 | FromDiscord | <kingterrytheterrible12> This is nim |
11:45:28 | FromDiscord | <taperfade> instead of echo data |
11:45:28 | FromDiscord | <taperfade> yk |
11:48:03 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "I did have an": Ok now make the C version use AVX |
11:48:05 | FromDiscord | <kingterrytheterrible12> xd |
11:48:35 | PMunch | @taperfade, an object? |
11:48:48 | FromDiscord | <taperfade> basically |
11:48:49 | FromDiscord | <taperfade> yeah |
11:48:54 | PMunch | @kingterrytheterrible12, I mean Nim could also use AVX :P |
11:49:04 | FromDiscord | <kingterrytheterrible12> It can |
11:49:05 | FromDiscord | <kingterrytheterrible12> Damn |
11:49:17 | PMunch | Of course, it compiles to C, it can do anything C can |
11:49:29 | PMunch | I mean you can even emit assembly instructions directly from Nim |
11:50:13 | FromDiscord | <Phil> Ah yes, github workflow pipelines and the myriad of ways they can screw you |
11:50:32 | FromDiscord | <taperfade> how do i make a file |
11:51:21 | FromDiscord | <kingterrytheterrible12> I wonder how bad compile times are for nim in large projects |
11:51:30 | FromDiscord | <kingterrytheterrible12> Like the status desktop |
11:51:36 | FromDiscord | <taperfade> cool |
11:51:55 | FromDiscord | <taperfade> how do i make a file |
11:52:02 | FromDiscord | <kingterrytheterrible12> Bro google it |
11:52:15 | FromDiscord | <taperfade> In reply to @kingterrytheterrible12 "Bro google it": its more fun asking u guys |
11:52:58 | FromDiscord | <taperfade> :areyousrs: https://media.discordapp.net/attachments/371759389889003532/1150036120009191605/image.png |
11:53:24 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FOY |
11:54:35 | FromDiscord | <taperfade> im actually going insane |
11:54:40 | FromDiscord | <taperfade> all the results are so ass |
11:54:50 | FromDiscord | <taperfade> i genuinely cant find any answer |
11:54:56 | FromDiscord | <taperfade> how do i make a file |
11:56:04 | FromDiscord | <Phil> In reply to @taperfade "its more fun asking": It's a pretty essential skill to learn to look for things yourself.↵The thing to do would be to try out different ways to formulate what you're looking for.↵Or look through the nim docs with a key word like "file" since nim docs also have a search functionality |
11:56:18 | FromDiscord | <taperfade> https://media.discordapp.net/attachments/371759389889003532/1150036958207287326/image.png |
11:56:24 | FromDiscord | <taperfade> https://media.discordapp.net/attachments/371759389889003532/1150036982571999274/image.png |
11:56:34 | FromDiscord | <taperfade> https://media.discordapp.net/attachments/371759389889003532/1150037024103989278/image.png |
11:56:38 | FromDiscord | <taperfade> https://media.discordapp.net/attachments/371759389889003532/1150037040285622272/image.png |
11:56:44 | FromDiscord | <taperfade> https://media.discordapp.net/attachments/371759389889003532/1150037066936225912/image.png |
11:56:56 | FromDiscord | <Phil> Is that supposed to tell me something? |
11:57:00 | FromDiscord | <taperfade> yes |
11:57:15 | FromDiscord | <Phil> That you're unwilling to read through what is available under those links :-P?↵# |
11:57:15 | FromDiscord | <taperfade> googl isnt helping |
11:57:18 | FromDiscord | <Phil> (edit) ":-P?↵#" => ":-P?" |
11:57:27 | FromDiscord | <taperfade> i read alot |
11:58:03 | FromDiscord | <taperfade> no find answer |
11:58:09 | FromDiscord | <Phil> Have you considered reformulating your question :-P? |
11:58:15 | FromDiscord | <Phil> (edit) "Have you considered reformulating your question ... :-P?" added "to google" |
11:58:25 | FromDiscord | <taperfade> also u just took ur time telling me i have to learn to look things up for myself instead of helping me |
11:58:53 | FromDiscord | <Phil> Exactly, because I know there will be 10 questions just like this that I know you have the ability to solve without asking, you just need to figure out the tools 😉 |
11:59:08 | FromDiscord | <spotlightkid> I would do the same. |
11:59:20 | FromDiscord | <taperfade> phil i wish i could be angry rn but i dont wna get mad |
12:00:04 | FromDiscord | <taperfade> (edit) "mad" => "banned" |
12:00:11 | FromDiscord | <kingterrytheterrible12> Bro |
12:00:22 | FromDiscord | <kingterrytheterrible12> You think we can help you with every basic question you get |
12:00:25 | FromDiscord | <spotlightkid> you should really try to leave emotions out of the picture as much as possible, when programming. |
12:00:30 | FromDiscord | <kingterrytheterrible12> What if you have a large project |
12:00:30 | FromDiscord | <taperfade> In reply to @kingterrytheterrible12 "You think we can": yes |
12:00:36 | FromDiscord | <kingterrytheterrible12> You should learn to read |
12:00:40 | FromDiscord | <taperfade> wait i found the word |
12:00:41 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "What if you have": Chiiiilll |
12:00:47 | FromDiscord | <taperfade> phil ur cocky |
12:00:54 | FromDiscord | <Phil> They're starting out, it's just guiding them to the right bits |
12:00:59 | FromDiscord | <kingterrytheterrible12> Bet |
12:01:04 | FromDiscord | <kingterrytheterrible12> @taperfade RTFM |
12:01:06 | FromDiscord | <taperfade> there are no fucking bits |
12:01:21 | FromDiscord | <Phil> In reply to @taperfade "phil i wish i": As long as you stick to the rules we're all good.↵Either way, have you considered that you typically don't "make" a file, you "write" a file? |
12:01:29 | FromDiscord | <Phil> Wording is important for google |
12:01:35 | FromDiscord | <taperfade> i want to make one |
12:01:38 | FromDiscord | <taperfade> not write |
12:01:39 | FromDiscord | <taperfade> dumdum |
12:01:42 | FromDiscord | <Phil> That is exactly the same |
12:01:47 | FromDiscord | <taperfade> nuh uh |
12:01:56 | FromDiscord | <taperfade> to make something |
12:02:06 | FromDiscord | <taperfade> and to write something is completely different |
12:02:06 | FromDiscord | <kingterrytheterrible12> https://glenngillen.com/learning-nim/write-file/ |
12:02:10 | FromDiscord | <taperfade> u dont write a fuckign cube |
12:02:42 | FromDiscord | <Phil> It's general programming terminology, just for reference 😛 |
12:03:16 | FromDiscord | <taperfade> In reply to @isofruit "It's general programming terminology,": |
12:03:22 | FromDiscord | <taperfade> thats what i think |
12:03:28 | FromDiscord | <taperfade> muahahaha |
12:03:34 | FromDiscord | <Phil> I'll regard that as the first trigger for an explicit warning. |
12:03:49 | FromDiscord | <taperfade> u rlly dont like me |
12:03:56 | FromDiscord | <kingterrytheterrible12> Dude phil is chill |
12:03:57 | FromDiscord | <taperfade> |
12:04:01 | FromDiscord | <taperfade> no |
12:04:04 | FromDiscord | <kingterrytheterrible12> Yes |
12:04:05 | FromDiscord | <taperfade> im a phil hater |
12:04:13 | FromDiscord | <taperfade> praying for their downfall |
12:04:26 | FromDiscord | <taperfade> :Mikusad: |
12:05:10 | FromDiscord | <taperfade> ok so how do i make a file in a other folder |
12:05:28 | FromDiscord | <Phil> Feel free. Though please continue that in offtopic rather than here as it has nothing to do with nim programming.↵Now as for your inquiry: Basically terry kinda spoiled the answer, you will find plenty of material by simply looking for "write file nim".↵That's pretty much all you need there. |
12:07:10 | FromDiscord | <kingterrytheterrible12> They gotta learn to read |
12:07:13 | FromDiscord | <Phil> In reply to @taperfade "ok so how do": Now as for that question you just need to keep in mind that you can specify paths for the procs that google will show you |
12:07:18 | FromDiscord | <kingterrytheterrible12> These young people dont wanna read |
12:07:31 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "These young people dont": Pulling out your grey beard aren'tcha? |
12:07:37 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "Pulling out your grey": lmao |
12:07:54 | FromDiscord | <taperfade> when the newbie asks for help in the channel made for people to discuss nim and get help 🤬 😡 |
12:07:55 | FromDiscord | <jviega> Wonder who the greyest beard is here. I always assume it's me |
12:08:16 | FromDiscord | <kingterrytheterrible12> In reply to @jviega "Wonder who the greyest": Isnt it gumbercules? |
12:08:20 | FromDiscord | <taperfade> In reply to @kingterrytheterrible12 "These young people dont": you |
12:08:26 | FromDiscord | <Phil> Nah, jtv beats him by a couple decades afaik |
12:08:35 | FromDiscord | <kingterrytheterrible12> Couple of decades |
12:08:41 | FromDiscord | <kingterrytheterrible12> I only lived 2 decades |
12:08:43 | FromDiscord | <taperfade> you told me you could make me a star on "the hub" even tho im a minor |
12:08:59 | FromDiscord | <kingterrytheterrible12> In reply to @taperfade "you told me you": Ye bro on github |
12:09:02 | FromDiscord | <kingterrytheterrible12> You gonna be a star |
12:09:15 | FromDiscord | <taperfade> whatever weirdo |
12:09:19 | FromDiscord | <odexine> Oh boy what happened in 100 messages |
12:09:20 | FromDiscord | <odexine> Let me back read |
12:09:26 | FromDiscord | <Phil> @taperfade This is an explicit hint from me as a mod to ask here about programming issues. Keep general chatter please to offtopic |
12:09:29 | FromDiscord | <jviega> sz, the general implicit rule is, ask for help only when you get stuck. And if you're stuck too much, then you're not trying hard enough. That's all they are responding to. You're not going to learn if you're not trying hard enough |
12:09:34 | FromDiscord | <Phil> (edit) "ask" => "ask/chat" |
12:09:50 | FromDiscord | <kingterrytheterrible12> Yes asking on discord should be a last resort |
12:10:10 | FromDiscord | <jviega> It's not respectful of people's time, otherwise. |
12:10:17 | FromDiscord | <kingterrytheterrible12> If you cant find it on discord then ask on fourms araq and pmunch and the others are a lot of help |
12:11:37 | FromDiscord | <taperfade> In reply to @kingterrytheterrible12 "Yes asking on discord": yeah you make the rules man |
12:11:45 | FromDiscord | <kingterrytheterrible12> Im just saying the rules |
12:12:11 | FromDiscord | <kingterrytheterrible12> I sense a moderation tactic is coming |
12:12:44 | FromDiscord | <odexine> :peace: |
12:13:05 | FromDiscord | <Phil> To brings this back to nim programming:↵@taperfade basically everything you'll find regarding writing files will ask for a filename, e.g. "cat.txt" or the like.↵That doesn't just have to be a filename, you can specify a filepath. Stuff like `./some/dir/cat.txt` will store the file relative to your binary.↵Stuff like `/some/dir/cat.txt` will use an absolute path. |
12:13:11 | FromDiscord | <Phil> (edit) "brings" => "bring" |
12:13:25 | FromDiscord | <jviega> It's just common respect for other people, sz. Most of the people sitting here are doing their own work at the time, and only keeping one eye on the window because they do want to be hepful. But they don't have to be, and it's not the most important thing to them. |
12:13:47 | FromDiscord | <taperfade> whatever |
12:15:02 | FromDiscord | <odexine> I agree that making and writing are kinda different |
12:15:07 | FromDiscord | <Phil> And generally you can also look for keywords in the nim libraries: https://nim-lang.org/docs/lib.html↵Just typing e.g. "createdir" in there will lead to some solutions regarding creating directories |
12:15:12 | FromDiscord | <odexine> But you could have said create instead |
12:15:23 | FromDiscord | <odexine> “Nim create file” would have given you a good result |
12:15:23 | FromDiscord | <taperfade> well |
12:15:39 | FromDiscord | <taperfade> wie erstelle ich eine datei ?? |
12:15:44 | FromDiscord | <jviega> Or do what all the kids are doing, ask ChatGPT and let it make up an answer for you |
12:15:45 | FromDiscord | <taperfade> better = |
12:16:03 | FromDiscord | <Phil> That doesn't really help you, I am german as well, the answer remains the same. |
12:16:17 | FromDiscord | <taperfade> In reply to @isofruit "That doesn't really help": ok |
12:16:34 | FromDiscord | <taperfade> vllt bist du jz in der lage mir zu helfen |
12:16:36 | FromDiscord | <Phil> The procs that you'll find for writing a file are the ones you'd want to use |
12:17:01 | FromDiscord | <Phil> In reply to @taperfade "vllt bist du jz": Another mod hint to not speak foreign languages in an english discord channel.↵It's rude to anybody else here. |
12:17:05 | FromDiscord | <odexine> In reply to @isofruit "That doesn't really help": NGL you don’t strike me as German, like the vibe ain’t there |
12:17:21 | FromDiscord | <odexine> Then again it’s mostly never there over text lol |
12:17:26 | FromDiscord | <Phil> In reply to @odexine "NGL you don’t strike": Do I not talk about football and cars enough? |
12:17:27 | FromDiscord | <taperfade> wie tue ich eine datei in windows mit der programmiersprache nim die in 2008 erstellt wurde von Andreas Rumpf |
12:17:32 | FromDiscord | <odexine> In reply to @isofruit "Do I not talk": Nope |
12:17:36 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4FP1 |
12:17:38 | FromDiscord | <taperfade> willst du es vllt noch genauer |
12:17:46 | FromDiscord | <odexine> Don’t recall you uttering a single word about either |
12:17:51 | FromDiscord | <taperfade> sent a code paste, see https://play.nim-lang.org/#ix=4FP2 |
12:17:52 | FromDiscord | <taperfade> that was so fucking hard |
12:17:56 | FromDiscord | <Phil> In reply to @taperfade "and that was so": Yes because you should search for that yourself |
12:17:56 | FromDiscord | <kingterrytheterrible12> In reply to @taperfade "and that was so": It was to make you learn |
12:18:09 | FromDiscord | <taperfade> In reply to @isofruit "Yes because you should": whatever you say |
12:18:18 | FromDiscord | <kingterrytheterrible12> Because if you dont learn we gonna write a whole project for you |
12:18:23 | FromDiscord | <jviega> They're saying it's a question my 8 year old son wouldn't have gotten stuck on |
12:18:26 | FromDiscord | <taperfade> amazing |
12:18:32 | FromDiscord | <jviega> And they're not wrong |
12:19:27 | FromDiscord | <odexine> NGL if I were an 8 year old and learning Nim I’d prolly get stuck on it for a moment |
12:19:27 | FromDiscord | <sirolaf> Well to be fair a language barrier remains. Generally nim also has a bunch of tooling issues, so the most important skill with nim is learning to use the docs. For this the [index](https://nim-lang.org/docs/theindex.html) and google are your friends. Besides that, stop acting entitled with your questions, any question you didn't actually put effort into answering on your own is a stupid question 😼 |
12:19:29 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "These young people dont": I'm young and read very much, otherwise I wouldn't be coding lol |
12:19:33 | FromDiscord | <jviega> LOL |
12:19:53 | * | xet7 joined #nim |
12:19:56 | FromDiscord | <taperfade> In reply to @chronos.vitaqua "I'm young and read": how young |
12:19:59 | FromDiscord | <Phil> You guys just wait until I get my glasses and can actually read what ya'll are typing! |
12:20:06 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "I'm young and read": an exception |
12:20:06 | FromDiscord | <taperfade> ur probably a great grandpa |
12:20:17 | FromDiscord | <odexine> In reply to @isofruit "You guys just wait": Skill issue |
12:20:22 | FromDiscord | <odexine> Imagine still having eyes |
12:20:22 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "You guys just wait": Dont break a hip old man |
12:20:47 | FromDiscord | <kingterrytheterrible12> Back in my days i used to program games in assembly |
12:20:53 | FromDiscord | <kingterrytheterrible12> And you youngest cant open a file |
12:20:59 | FromDiscord | <kots> In reply to @kingterrytheterrible12 "Is it implemented as": "Nim does not produce a virtual method table, but generates dispatch trees." (https://nim-lang.org/docs/tut2.html#object-oriented-programming-dynamic-dispatch), but it looks like this might be changing |
12:20:59 | FromDiscord | <kingterrytheterrible12> (edit) "youngest" => "youngesters" |
12:21:18 | FromDiscord | <Chronos [She/Her]> In reply to @taperfade "how young": 18 lol |
12:21:32 | FromDiscord | <odexine> It’s good to be young |
12:21:39 | FromDiscord | <kingterrytheterrible12> In reply to @k0ts ""Nim does not produce": Why does nim language behave like its not 2.0 its like 0.5? |
12:21:45 | FromDiscord | <odexine> I say, being barely any older than you |
12:21:57 | FromDiscord | <kingterrytheterrible12> I mean was deprecating defer really necessary |
12:22:22 | FromDiscord | <sirolaf> <https://github.com/nim-lang/Nim/pull/21342> this is current state of vtables, so not in 2.0 or devel |
12:22:39 | FromDiscord | <taperfade> i remember when we had a angry russian dude teach us pascal , having to write it as quick as possible with the sticky keyboard from the slow computer onto our floppy disc ; good times |
12:24:14 | FromDiscord | <kingterrytheterrible12> Wait araq is involved in status dev? |
12:24:24 | FromDiscord | <odexine> No I don’t think so |
12:24:51 | FromDiscord | <sirolaf> Nim is sponsored by status, so involved in the sense that their issues take priority afaik |
12:24:53 | FromDiscord | <odexine> Status is just highly tied into Nim development |
12:25:32 | FromDiscord | <kingterrytheterrible12> In reply to @sirolaf "Nim is sponsored by": Ah alright |
12:25:39 | FromDiscord | <kingterrytheterrible12> Status doing a lot of good for the nim community |
12:27:12 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "I say, being barely": Pfff |
12:27:55 | FromDiscord | <jmgomez> In reply to @kingterrytheterrible12 "And also does nim": if you are targeting the cpp backend there is also experimental support for `virtual` which is ment to interop with C++ but works pretty well inside Nim. It does uses vtables as it uses the C++ implementation |
12:28:10 | FromDiscord | <odexine> In reply to @chronos.vitaqua "Pfff": For the record I am 21, not 18 |
12:28:25 | FromDiscord | <taperfade> what is statuis |
12:28:31 | FromDiscord | <kingterrytheterrible12> In reply to @jmgomez "if you are targeting": Thank you |
12:28:45 | * | ntat quit (Quit: leaving) |
12:28:50 | FromDiscord | <kingterrytheterrible12> In reply to @taperfade "what is statuis": https://status.im |
12:29:07 | FromDiscord | <kingterrytheterrible12> The desktop client is written in nim |
12:29:12 | FromDiscord | <taperfade> woah |
12:29:22 | FromDiscord | <taperfade> i wanted to make a chat in nim once |
12:29:24 | FromDiscord | <taperfade> or yk |
12:29:29 | FromDiscord | <taperfade> a irc client |
12:29:32 | FromDiscord | <Phil> Chat is pretty doable |
12:29:36 | FromDiscord | <odexine> Sure why not |
12:29:42 | FromDiscord | <taperfade> yeah |
12:29:47 | FromDiscord | <taperfade> rn im working on muahahaha ware |
12:29:51 | FromDiscord | <kingterrytheterrible12> Just make your own protocol |
12:30:07 | FromDiscord | <taperfade> jk |
12:30:12 | FromDiscord | <taperfade> nothing malicious |
12:30:14 | FromDiscord | <taperfade> just a test |
12:30:17 | FromDiscord | <taperfade> to learn |
12:30:22 | FromDiscord | <taperfade> and expand my knowledge |
12:30:36 | FromDiscord | <Phil> https://stackoverflow.com/questions/76583938/how-to-set-up-a-small-websocket-client-server-example-with-nim-prologue↵↵That can get you started for a basic client server setup, from there you just need to figure out how to remove websockets if their users "log out" and how to forward messages from one websocket to the next where they're meant to be sent to |
12:31:01 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "https://stackoverflow.com/questions/76583938/how-to": Just send heartbeat signal every min |
12:31:02 | FromDiscord | <Phil> Some auth, a typing indicator and boom, chat |
12:31:29 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "Just send heartbeat signal": treeforms ws lib deals with that for you |
12:31:36 | FromDiscord | <taperfade> idk what to do rn https://media.discordapp.net/attachments/371759389889003532/1150045840874934332/image.png |
12:31:38 | FromDiscord | <taperfade> actually lost rn |
12:31:45 | FromDiscord | <taperfade> what is ' ' |
12:33:00 | FromDiscord | <Phil> This is the proc you're using, for the most part this means that the parameters you're handing it do not match the parameters that proc is expecting:↵https://nim-lang.org/docs/syncio.html#writeFile%2Cstring%2CopenArray%5Bbyte%5D |
12:33:21 | FromDiscord | <Phil> (edit) "expecting:↵https://nim-lang.org/docs/syncio.html#writeFile%2Cstring%2CopenArray%5Bbyte%5D" => "expecting:↵https://nim-lang.org/docs/syncio.html#writeFile%2Cstring%2Cstring" |
12:33:37 | FromDiscord | <kingterrytheterrible12> Why does the error make no sense lol |
12:33:39 | FromDiscord | <sirolaf> As I said the tooling is pretty bad still |
12:33:39 | FromDiscord | <odexine> can you show the proc definition |
12:33:46 | * | ntat joined #nim |
12:33:49 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "Why does the error": Its nimsuggest |
12:33:52 | FromDiscord | <taperfade> In reply to @kingterrytheterrible12 "Why does the error": bro |
12:33:54 | FromDiscord | <Phil> (edit) "nimsuggest" => "nimsuggest, 🤷" |
12:33:58 | FromDiscord | <taperfade> wtf is ' ' |
12:34:01 | FromDiscord | <kingterrytheterrible12> Why doesnt it say (unexpected positional argument) |
12:34:02 | FromDiscord | <odexine> not really nimsuggest's fault |
12:34:09 | FromDiscord | <odexine> but nim's error messages are p bad yes |
12:34:31 | FromDiscord | <kingterrytheterrible12> And also debuggers are underrated ngl |
12:34:38 | FromDiscord | <kingterrytheterrible12> It saved my ass in a java exam |
12:34:41 | FromDiscord | <odexine> i agree with that as well |
12:35:02 | FromDiscord | <odexine> lots of people here content with print debugging but eh i dont like it |
12:35:08 | FromDiscord | <Phil> Anyway, its better to try and compile every time. I tend to set my projects up so that every time I save they try to compile |
12:35:13 | FromDiscord | <odexine> spurious errors are hard to reproduce so |
12:35:33 | FromDiscord | <jmgomez> if you dont like it and want to contribute to improve the situation, fill an issue |
12:35:38 | FromDiscord | <kingterrytheterrible12> In reply to @odexine "lots of people here": Once you have anything more complex than hello world a debugger is invaluable |
12:35:40 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FP9 |
12:35:47 | FromDiscord | <kingterrytheterrible12> In reply to @jmgomez "if you dont like": Sure |
12:35:50 | FromDiscord | <kingterrytheterrible12> In nim repo? |
12:35:51 | FromDiscord | <odexine> terry do you know rr |
12:36:02 | FromDiscord | <kingterrytheterrible12> In reply to @odexine "terry do you know": Whos that |
12:36:03 | FromDiscord | <odexine> https://rr-project.org/ |
12:36:17 | FromDiscord | <kingterrytheterrible12> Bro |
12:36:20 | FromDiscord | <kingterrytheterrible12> Rika i love you |
12:36:22 | FromDiscord | <taperfade> In reply to @isofruit "That would show you": dir is C:\\thing\\ |
12:36:25 | FromDiscord | <sirolaf> In reply to @jmgomez "if you dont like": I'd love to improve nimsuggest but I don't know enough and it's also a mess |
12:36:26 | FromDiscord | <taperfade> in my code |
12:36:27 | FromDiscord | <taperfade> btw |
12:36:28 | FromDiscord | <kingterrytheterrible12> This sounds like the dream debugger |
12:36:59 | FromDiscord | <Phil> That's fine, the problem you're running into that there is no writeFile proc that takes in 3 string parameters like you wrote |
12:37:05 | FromDiscord | <odexine> also i discovered this a few days ago https://github.com/facebookexperimental/hermit but out of topic yeah |
12:37:26 | FromDiscord | <Phil> When I wrote about path I meant that the path is combined with the filename |
12:37:53 | FromDiscord | <kingterrytheterrible12> Im gonna start using rr debugger ngl |
12:38:32 | FromDiscord | <Phil> I mean, if you manage to get any kind of debugger set up with nim in vscode via GUI give me a shout, I'd love to copy the setup into my notes |
12:38:47 | FromDiscord | <kingterrytheterrible12> And also who the fuck though it was a good idea to be not able to compare strings in java using == |
12:39:06 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "I mean, if you": I will try |
12:39:08 | FromDiscord | <jmgomez> In reply to @kingterrytheterrible12 "In nim repo?": yes |
12:39:10 | FromDiscord | <kingterrytheterrible12> I just use gdb |
12:39:25 | FromDiscord | <Phil> I played around with gdb via cli and found it too clunky to use |
12:39:34 | FromDiscord | <odexine> In reply to @kingterrytheterrible12 "And also who the": haha java is for the insane |
12:39:38 | FromDiscord | <Phil> I was literally faster just recompiling and using echo's |
12:39:55 | FromDiscord | <odexine> In reply to @isofruit "I played around with": yeah i think most people would appreciate a tui/gui debugger |
12:40:01 | FromDiscord | <odexine> iirc gdb does have a tui |
12:40:05 | FromDiscord | <odexine> i will be going |
12:40:16 | FromDiscord | <kingterrytheterrible12> Isnt there a gdb gtk frontend? |
12:40:36 | FromDiscord | <Phil> Beats me, I only thought that vscode should ahve stuff for that |
12:41:16 | FromDiscord | <kingterrytheterrible12> https://www.gdbgui.com/ |
12:41:19 | FromDiscord | <kingterrytheterrible12> There is this |
12:43:08 | FromDiscord | <kingterrytheterrible12> The only good think about jitted languages is that debuggers are very good |
12:43:22 | FromDiscord | <kingterrytheterrible12> Debugging native code is a mess |
13:10:06 | FromDiscord | <vindaar> emacs using the GTK backend 😇↵(@kingterrytheterrible12) |
13:10:14 | FromDiscord | <kingterrytheterrible12> The true question is |
13:10:18 | FromDiscord | <kingterrytheterrible12> Is nim as fast as C |
13:10:50 | FromDiscord | <Phil> Neither have legs so I think so |
13:11:07 | FromDiscord | <Phil> I can walk faster than both of them |
13:13:09 | FromDiscord | <kingterrytheterrible12> Ok let me say this |
13:13:27 | FromDiscord | <kingterrytheterrible12> Does a program in nim have comparable clock cycles to the same program written in C |
13:15:25 | FromDiscord | <Chronos [She/Her]> Possibly bc it's generating smarter output than the typical C programmer when it comes to allocating memory I think? |
13:15:48 | FromDiscord | <Phil> I dunno, if I look at my clock it tells me that it both have access to the same kind memory management mechanisms and thus it all depends on programmer skill as c can be just as slow as python and js if coded badly |
13:16:17 | FromDiscord | <Phil> (edit) "it" => "they" |
13:16:52 | FromDiscord | <Phil> It's a really good clock |
13:17:04 | FromDiscord | <vindaar> you might argue C is as slow as python. CPython is C after all. Just depends on the programs you run 😉↵(@Phil) |
13:17:06 | FromDiscord | <kingterrytheterrible12> Phil ong stop trolling |
13:17:43 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "Phil ong stop trolling": The question just happens so often, let me have my fun 😛 |
13:17:55 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "The question just happens": Where is the answer at |
13:19:09 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FPt |
13:21:39 | FromDiscord | <sOkam! 🫐> In reply to @kingterrytheterrible12 "Does a program in": yes |
13:21:48 | FromDiscord | <kingterrytheterrible12> Bet |
13:22:15 | FromDiscord | <sOkam! 🫐> rust/nim/cpp/c are all at the same level of performance |
13:22:22 | FromDiscord | <Phil> sent a long message, see http://ix.io/4FPu |
13:22:25 | FromDiscord | <sOkam! 🫐> (edit) "rust/nim/cpp/c" => "zig/rust/nim/cpp/c" |
13:22:49 | FromDiscord | <kingterrytheterrible12> Fair enough |
13:23:14 | FromDiscord | <Phil> You will see that problem repeatedly if you look at benchmarks that try |
13:23:17 | FromDiscord | <sOkam! 🫐> true answer is what phil told you. simple elevator answer is what i told you |
13:23:35 | FromDiscord | <Phil> Often enough they compare things that just aren't equal |
13:23:46 | FromDiscord | <kingterrytheterrible12> I mean its easier to write fast and correct code in nim than it is to do in C |
13:24:14 | FromDiscord | <sOkam! 🫐> In reply to @kingterrytheterrible12 "I mean its easier": that depends on the person |
13:24:17 | FromDiscord | <vindaar> nimble is drunk sometimes and starts talking about `hg` when it doesn't understand what's wrong...↵(@sOkam! 🫐) |
13:24:19 | FromDiscord | <Phil> Like one side getting to use a multi threaded solution and the other doesn't |
13:24:37 | FromDiscord | <kingterrytheterrible12> In reply to @heysokam "that depends on the": Me when stack smashing detected core dumped |
13:24:39 | FromDiscord | <sOkam! 🫐> In reply to @vindaar "nimble is drunk sometimes": yeah but my file is empty |
13:24:53 | FromDiscord | <Phil> We literally had that comparison in a Nim Vs rust benchmark |
13:24:53 | FromDiscord | <demotomohiro> In reply to @kingterrytheterrible12 "Does a program in": Asking compiler to output assembly code and reading it is the best way to check such a thing. |
13:25:07 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "We literally had that": Who won |
13:26:21 | FromDiscord | <Phil> To nobodies surprise rust as they got to use n threads and Nim got 1, it was entirely skill related |
13:27:27 | FromDiscord | <kingterrytheterrible12> Me when multithreaded code beats single threaded code (I'm surprised) |
13:29:13 | FromDiscord | <Phil> I can only tell you that you'll write Nim faster than c and be less likely to shoot yourself in the foot |
13:29:39 | FromDiscord | <sirolaf> In exchange sometimes the compiler decides to shoot you in the foot 😼 |
13:30:08 | FromDiscord | <Phil> That's fine, it's generally pretty gentle compared to the alternatives out there |
13:33:53 | FromDiscord | <sirolaf> Yeah generally it's fine, but don't trust arc/orc too much |
13:34:19 | FromDiscord | <kingterrytheterrible12> In reply to @sirolaf "Yeah generally it's fine,": If i cant trust the garbage collector to do its job |
13:34:24 | FromDiscord | <kingterrytheterrible12> The this langauge is fucked |
13:34:33 | FromDiscord | <kingterrytheterrible12> (edit) "The" => "Then" |
13:36:52 | FromDiscord | <sirolaf> Well the more you automate the more likely it is to mess up |
13:37:02 | FromDiscord | <sirolaf> Isn't quite as mature as refc |
13:37:10 | FromDiscord | <kingterrytheterrible12> Its the other way around |
13:37:42 | FromDiscord | <kingterrytheterrible12> Humans make mistakes far far more than machines will ever do |
13:37:53 | FromDiscord | <sirolaf> Yeah so compared to a human it's very good |
13:38:07 | FromDiscord | <sirolaf> Compared to refc though there's still a few bugs |
13:38:43 | FromDiscord | <kingterrytheterrible12> Report it to nim issue tracker |
13:39:02 | FromDiscord | <sirolaf> I haven't encountered any, but there are leaks reported |
13:39:28 | FromDiscord | <sirolaf> <https://github.com/nim-lang/Nim/issues/22672> most recently this one with exceptions |
13:40:23 | FromDiscord | <kingterrytheterrible12> Why isnt this marked as showstopper? |
13:40:46 | FromDiscord | <sirolaf> Ask a collaborator, no idea |
13:40:59 | FromDiscord | <kingterrytheterrible12> We can ask araq in #internals |
13:41:22 | FromDiscord | <sirolaf> I just fix random issues I barely have enough knowledge to even look at |
13:41:50 | FromDiscord | <sirolaf> GC is far out of my comfort zone |
13:45:50 | FromDiscord | <pmunch> In reply to @vindaar "nimble is drunk sometimes": Possibly it tries git, then if that fails it tries hg, but hg doesn't exist and it just hard fails |
13:46:02 | FromDiscord | <pmunch> Just a wild guess though |
13:47:04 | FromDiscord | <pmunch> Ah, someone did indeed post the article to HN! Man that site drives a surprising amount of traffic |
13:48:31 | * | ntat quit (Quit: leaving) |
13:50:36 | FromDiscord | <kingterrytheterrible12> In reply to @pmunch "Ah, someone did indeed": Yeah lmao |
13:50:40 | FromDiscord | <kingterrytheterrible12> All the nerds there |
13:50:43 | FromDiscord | <kingterrytheterrible12> And geeks |
13:58:47 | * | jmdaemon quit (Ping timeout: 248 seconds) |
14:39:06 | FromDiscord | <sOkam! 🫐> Is there a command to update a package with nimble, just like calling `requires "package"` does internally? |
14:39:20 | FromDiscord | <sOkam! 🫐> I know about `nimble install`, but that's well... reinstalling it |
14:42:06 | FromDiscord | <odexine> you update by installing |
14:42:22 | FromDiscord | <odexine> nimble can manage multiple versions of a package |
14:44:17 | * | junaid_ joined #nim |
14:45:11 | FromDiscord | <sOkam! 🫐> problem is that it is downloading every time i call that command |
14:45:22 | FromDiscord | <sOkam! 🫐> while nimble itself does not redowload, just checks |
14:45:54 | FromDiscord | <odexine> In reply to @heysokam "problem is that it": "it" refers to what here |
14:48:13 | FromDiscord | <sOkam! 🫐> In reply to @odexine ""it" refers to what": wdym? |
14:48:39 | FromDiscord | <sOkam! 🫐> i call `nimble install` the command redownloads↵i add `requires "package"` it does not redownload |
14:48:48 | FromDiscord | <odexine> you say "it is downloading every time" then "while nimble itself doesnt", which implies to me that "it" doesnt refer to nimble |
14:49:52 | FromDiscord | <odexine> so you want to use the latest version? |
14:50:12 | FromDiscord | <odexine> i dont think you can do that, `requires` matches to the "minimum version" |
14:50:15 | FromDiscord | <sOkam! 🫐> i want to do whatever nimble requires does, by calling it from cli |
14:51:02 | FromDiscord | <odexine> i dont think i understand the question anymore lol; so what does what? |
14:52:04 | FromDiscord | <sOkam! 🫐> i call `nimble install` and nimble redownloads every call↵i add `requires "package"` to my nimble file, then nimble does not redownload the package, it only checks↵I want to call `nimble something` and NOT redownload everytime I call it |
14:52:36 | FromDiscord | <sOkam! 🫐> because i won't be using the nimble file myself, i will just calling nimble to install packages |
14:53:09 | FromDiscord | <sOkam! 🫐> (edit) "because i won't be using the nimble file myself, i will just calling nimble to install packages ... " added "from cli directly, without a nimble file" |
14:53:18 | FromDiscord | <sOkam! 🫐> (edit) "because i won't be using the nimble file myself, i will just ... calling" added "be" |
14:57:50 | FromDiscord | <anuke> @guzba8 Question about zippy: When I compile for M1 arm64 (--cpu:arm64 --passC:"-DARCH=arm64"), I get the error "use of unknown built 'builtin_arm_crc32b'" in this file: <https://github.com/guzba/zippy/blob/master/src/zippy/crc32_simd.nim#L147-L148>↵↵Should I reported this on github? Is there a simple workaround? |
14:57:52 | FromDiscord | <odexine> clarifying, `nimble install <pkgname>` for case 1, `nimble install` & requires for case 2 |
14:57:56 | FromDiscord | <odexine> right? |
14:59:00 | FromDiscord | <anuke> (edit) "@guzba8 Question about zippy: When I compile for M1 arm64 (--cpu:arm64 --passC:"-DARCH=arm64"), I get the error "use of unknown built 'builtin_arm_crc32b'" in this file: <https://github.com/guzba/zippy/blob/master/src/zippy/crc32_simd.nim#L147-L148>↵↵Should I reported this on github? Is there" => "sent" | "simple workaround?" => "long message, see http://ix.io/4FQ2" |
15:00:36 | FromDiscord | <odexine> `nimble install <pkgname>` will always download, iirc, and there's no setting to "only check" |
15:02:38 | * | junaid_ quit (Remote host closed the connection) |
15:09:15 | FromDiscord | <Phil> Out of curiosity has anyone here ever played around with setting up more elaborate nginx caching setups where endpoints get cached and post/put/patch/delete endpoint calls invalidate the nginx caches of only specific endpoints? |
15:09:53 | FromDiscord | <odexine> sounds like the job of something else than nginx though |
15:10:02 | FromDiscord | <odexine> smh the mod disobeying rules |
15:11:37 | * | lumo_e joined #nim |
15:15:40 | FromDiscord | <Phil> It's distantly related to my webdev Nim project that'll need to start caching otherwise! |
15:16:18 | FromDiscord | <Phil> Because it means I'll have to check out what cache solutions Nim has |
15:16:29 | FromDiscord | <Phil> And if they can do what I want |
15:17:25 | FromDiscord | <odexine> you dont have to go through nim, you can still cache via another program like memcached or whatever no> |
15:17:26 | FromDiscord | <odexine> (edit) "no>" => "no?" |
15:17:44 | FromDiscord | <odexine> well not memcached itself |
15:17:45 | FromDiscord | <Phil> Good. Point |
15:17:47 | FromDiscord | <odexine> that;s a kvstore |
15:17:55 | FromDiscord | <odexine> but some other program that would do that as well |
15:19:06 | * | azimut quit (Ping timeout: 246 seconds) |
15:19:10 | FromDiscord | <sOkam! 🫐> In reply to @odexine "clarifying, `nimble install <pkgname>`": `nimble install mypackage` redownloads↵`requires "mypackage"` does not |
15:21:21 | FromDiscord | <Chronos [She/Her]> There's no point to making a package manager, is there? |
15:21:36 | FromDiscord | <Chronos [She/Her]> A new package manager for Nim packages |
15:21:42 | FromDiscord | <Phil> ? |
15:21:45 | FromDiscord | <Chronos [She/Her]> It was discussed yesterday but hm |
15:21:50 | FromDiscord | <sOkam! 🫐> atlas seems pretty promising |
15:21:55 | FromDiscord | <Chronos [She/Her]> @odexine will know what I'm on about |
15:21:58 | FromDiscord | <sOkam! 🫐> its probably better to focus on one |
15:22:15 | FromDiscord | <Chronos [She/Her]> She(?) was talking about how she wishes for something different but I can't remember what now |
15:22:26 | FromDiscord | <odexine> i wasn't discussing whether to make a new package manager, but whether to revise the nimble file format |
15:22:32 | FromDiscord | <Chronos [She/Her]> Ah |
15:22:40 | FromDiscord | <Chronos [She/Her]> How would you change it, then? |
15:22:50 | FromDiscord | <odexine> the conclusion was that it isnt needed |
15:23:09 | FromDiscord | <Chronos [She/Her]> I swore someone said that a JSON format for packages would be good but I can't remember now hm |
15:23:12 | FromDiscord | <Chronos [She/Her]> Fair enough |
15:23:17 | FromDiscord | <odexine> it was mentioned in passing |
15:23:19 | FromDiscord | <odexine> by uhh |
15:23:22 | FromDiscord | <odexine> terry i think |
15:23:27 | FromDiscord | <Chronos [She/Her]> Hm |
15:23:56 | FromDiscord | <sOkam! 🫐> In reply to @odexine "the conclusion was that": care to explain why not or why yes was considered? |
15:24:33 | FromDiscord | <sOkam! 🫐> or just maybe link to the message, i might have missed it |
15:24:37 | FromDiscord | <odexine> In reply to @heysokam "care to explain why": personally my issue with nimble files were that i "couldnt specify optional features for packages" (this was elaborated on during the conversation) |
15:24:52 | FromDiscord | <odexine> i ended up thinking "oh well then that's what define flags are for aint they" in the end |
15:25:02 | FromDiscord | <sOkam! 🫐> optional features as in? |
15:25:25 | FromDiscord | <odexine> lets say i have a library with an optional integration with another library and i wanted to enable this on my project |
15:25:52 | FromDiscord | <sOkam! 🫐> ah yeah, i see. but nimble does not understand defines from config files, only if they are directly passed on cli command |
15:26:14 | FromDiscord | <odexine> well personally i dont use nimble build xd |
15:26:31 | FromDiscord | <sOkam! 🫐> yeah but that's the problem to being with |
15:26:41 | FromDiscord | <odexine> begin with? ig |
15:26:44 | FromDiscord | <sOkam! 🫐> we cannot rely on a tool if nobody relies on it because X or Y |
15:26:56 | FromDiscord | <odexine> i personally only use nimble as a dep management tool |
15:27:10 | FromDiscord | <sOkam! 🫐> we talk about nimble, and the conversation always ends with "well i don't blablabla, so idc" |
15:27:30 | FromDiscord | <odexine> i dont think nimble tasks are a nice solution (although this is not backed by anything but opinion derived from anecdote) |
15:27:33 | FromDiscord | <sOkam! 🫐> and nimble ends up starved of good tools |
15:28:19 | FromDiscord | <Chronos [She/Her]> Either way I think for optional dependencies, define flags would have to be used anyway, right? |
15:28:26 | FromDiscord | <sOkam! 🫐> definitely |
15:28:51 | FromDiscord | <odexine> well id say its a neg. feedback loop; people say they dont use it because the feature is unreliable or whatever etc, then nimble doesnt see improvements, hence feature stays unreliable, etc |
15:28:57 | FromDiscord | <sOkam! 🫐> but i don't think the "not reading config options for defines" is good design |
15:29:15 | FromDiscord | <sOkam! 🫐> nimc can take config files, why the hell does nimble not do that |
15:29:23 | FromDiscord | <sOkam! 🫐> (edit) "nimc can take config files, why the hell does nimble not do that ... " added "for itself" |
15:29:35 | FromDiscord | <Chronos [She/Her]> Doesn't it work if it's in the src dir with the same name as the main file? |
15:29:37 | FromDiscord | <sOkam! 🫐> (edit) "files," => "files for defines," |
15:30:01 | FromDiscord | <sOkam! 🫐> nimble simple does not understand -d flags defined for itself |
15:30:06 | FromDiscord | <sOkam! 🫐> (edit) "simple" => "simply" |
15:30:19 | FromDiscord | <Chronos [She/Her]> Via cli? |
15:30:19 | FromDiscord | <sOkam! 🫐> unless they are directly passed to cli |
15:30:22 | FromDiscord | <Chronos [She/Her]> Ah |
15:30:24 | FromDiscord | <Chronos [She/Her]> Config file |
15:30:27 | FromDiscord | <sOkam! 🫐> yeah |
15:30:36 | FromDiscord | <sOkam! 🫐> it reads them, and sends them to nimc |
15:30:39 | FromDiscord | <Chronos [She/Her]> Could fix that manually tbf |
15:30:50 | FromDiscord | <Chronos [She/Her]> Like, with a PR |
15:30:53 | FromDiscord | <sOkam! 🫐> but ignores them for itself... which is like... ok, you just completely removed the option of optional anything by that? |
15:30:56 | FromDiscord | <Chronos [She/Her]> I just don't have the knowledge really f |
15:31:03 | FromDiscord | <sOkam! 🫐> makes no sense design wise to keep that out of the featureset |
15:31:29 | FromDiscord | <odexine> i think nim just has an overall maintainer problem, many people willing to complain but no one to contribute, me included |
15:31:41 | FromDiscord | <Chronos [She/Her]> Yeah |
15:32:09 | FromDiscord | <sOkam! 🫐> I would contribute, but everytime I enter internals with a suggestion I end up running away in frustration by the answers received |
15:32:31 | FromDiscord | <sOkam! 🫐> so makes me reconsider what i do and how, and just keep to myself |
15:32:48 | FromDiscord | <odexine> In reply to @heysokam "I would contribute, but": ? why? |
15:33:03 | FromDiscord | <sOkam! 🫐> In reply to @odexine "? why?": have you seen the answers to my last 3 messages there? |
15:33:19 | FromDiscord | <jmgomez> In reply to @heysokam "I would contribute, but": to be fair you ask questions there that doesnt belong to the channel |
15:33:20 | FromDiscord | <odexine> i have probably seen but not committed it to memory |
15:33:31 | FromDiscord | <Chronos [She/Her]> Tbh I want a new programming language lmao tailored to my needs (Java programming but sane) |
15:33:37 | FromDiscord | <jmgomez> it is true that the answer you get is not always friendly 😛 |
15:33:45 | FromDiscord | <odexine> In reply to @chronos.vitaqua "Tbh I want a": herculean effort |
15:33:45 | FromDiscord | <Chronos [She/Her]> I could make a backend but my motivation for that clearly isn't much aha |
15:34:04 | FromDiscord | <jmgomez> that said, there are many ways to contribute to Nim. You are already doing so by sharing your graphic lib |
15:34:05 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "herculean effort": There's an (unofficial) assembler for it tbf |
15:34:07 | FromDiscord | <sOkam! 🫐> In reply to @jmgomez "to be fair you": so if its not directly deep-in-compiler-related its not for internals at all?↵well, where do you give suggestions or ask questions about the lang development itself then, or its tools? |
15:34:16 | FromDiscord | <Chronos [She/Her]> In reply to @jmgomez "that said, there are": Also Confy exists |
15:34:21 | FromDiscord | <sOkam! 🫐> im happy to talk about it in a `#tools` channel, but there is none |
15:35:07 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "Also Confy exists": confy just happened to fit nim because its a C compiler, was never targeted for nim |
15:35:21 | FromDiscord | <jmgomez> well, we can ask the moderators to create one if it makes sense. AFAIK #internals is related to developing the compiler. I dont care what you ask, you saying how it felt to me |
15:35:36 | FromDiscord | <jmgomez> (edit) "you" => "just" |
15:35:47 | FromDiscord | <sOkam! 🫐> (edit) "compiler," => "compiler tool," |
15:36:13 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "confy just happened to": Oh huh? Really? |
15:36:28 | FromDiscord | <sOkam! 🫐> yeah |
15:36:51 | FromDiscord | <sOkam! 🫐> and my frustrations for nim build tooling made me implement more things, but it was originally only for C |
15:37:00 | FromDiscord | <Chronos [She/Her]> Yeah fair enough really |
15:37:24 | FromDiscord | <sOkam! 🫐> don't quite undersand why zigcc support was partially implemented at some point, and completely removed not long after |
15:37:48 | FromDiscord | <Chronos [She/Her]> I'd imagine since Zig cc is literally just a wrapper over clang |
15:37:53 | FromDiscord | <sOkam! 🫐> so... i made confy support nim, since its just a simple bunch of extra config options to the nimc setup |
15:38:09 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "I'd imagine since Zig": its not "just" a wrapper, it has a ton more usefulness to it |
15:38:17 | FromDiscord | <Chronos [She/Her]> How so? |
15:38:27 | FromDiscord | <sOkam! 🫐> you only notice them if you make a buildsystem with it, and another one without |
15:38:35 | FromDiscord | <Chronos [She/Her]> Hm fair enough |
15:38:53 | FromDiscord | <sOkam! 🫐> without, your buildsystem is like 100s of lines long. with it? you can probably manage in less than 50 if you are smart |
15:39:13 | FromDiscord | <Chronos [She/Her]> 100s of lines bc of crosscompiling support or...? |
15:39:16 | FromDiscord | <sOkam! 🫐> yeah |
15:39:23 | FromDiscord | <Chronos [She/Her]> Makes sense |
15:39:31 | FromDiscord | <sOkam! 🫐> and multiple compilers setup, searching, making sure exists to not crash... etc etc etc |
15:39:40 | FromDiscord | <Chronos [She/Her]> Yeah |
15:40:15 | FromDiscord | <sOkam! 🫐> the very reason why i made confy is to never deal with this junk ever in my damn entire life↵https://github.com/ioquake/ioq3/blob/main/Makefile |
15:40:57 | FromDiscord | <Chronos [She/Her]> Make seems a bit painful tbh |
15:41:04 | FromDiscord | <Chronos [She/Her]> Esp makefiles that generate cmake files- |
15:41:15 | FromDiscord | <sOkam! 🫐> this one is pure make, thankfully |
15:41:24 | FromDiscord | <sOkam! 🫐> make that generates cmake sounds horrific 🙈 |
15:41:33 | FromDiscord | <Chronos [She/Her]> Lol |
15:42:01 | FromDiscord | <Chronos [She/Her]> I'd imagine it's still a massive task to port projects that use Makefiles to use Confy, no? |
15:42:22 | FromDiscord | <sOkam! 🫐> <@&371760044473319454> how do I propose the creation of an official #tools channel to talk about whats missing or how to improve them, considering that #internals seems to be targeted exclusively at compiler dev only? |
15:42:38 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "I'd imagine it's still": i made a parser, so no not at all |
15:42:46 | FromDiscord | <Chronos [She/Her]> Really? Huh |
15:43:03 | FromDiscord | <Chronos [She/Her]> For CMake files? |
15:43:14 | FromDiscord | <sOkam! 🫐> i have a second one not commited to confy, its in a separate repo. but they can take all of the quake3 engine forks i know of directly and output a confy buildsystem automatically |
15:43:28 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "For CMake files?": for cmake you need to generate the makefiles, but after that yes |
15:44:16 | FromDiscord | <sOkam! 🫐> i tried to do that manually once, and lost 2months to implement an scons version that was just as bad, because the mess is gigantic. the engine literally builds 50 different targets ⚰️ |
15:51:45 | * | krux02 joined #nim |
15:58:21 | FromDiscord | <Phil> I would argue that nimble kinda fits that bill or that we could go about reworking it to be generally about tooling, I'll bring it up with the team |
15:59:31 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "i tried to do": Oof |
16:01:45 | FromDiscord | <sOkam! 🫐> In reply to @isofruit "I would argue that": there is more to tooling than nimble related things |
16:02:16 | FromDiscord | <Phil> I agree, it's more that nimble is tooling and it seems fair to generalize that channel a bit |
16:03:22 | FromDiscord | <Phil> Particularly since atlas is also slowly inching it's way towards becoming official tooling, and choosenim could be discussed there just as well |
16:03:54 | FromDiscord | <sOkam! 🫐> exactly |
16:04:07 | FromDiscord | <sOkam! 🫐> or nimsuggest, etc etc |
16:04:23 | FromDiscord | <sOkam! 🫐> (edit) "or nimsuggest, ... etc" added "nimpretty," |
16:04:50 | FromDiscord | <Phil> I just hesitate to have a hundred specific channels with low traffic, thus I'm more inclined towards a few more generalized channels that you split up if they grow too large |
16:05:14 | FromDiscord | <Phil> Therefore more the suggestion to generalize the nimble channel |
16:05:15 | FromDiscord | <sOkam! 🫐> which is why i mentioned a #tools one, not creating 10 channels one for each tool |
16:06:57 | FromDiscord | <Phil> Yeh, just more turning nimble channel onto a tools channel instead of adding a new channel |
16:07:07 | FromDiscord | <Phil> (edit) "onto" => "into" |
16:10:14 | FromDiscord | <pmunch> In reply to @heysokam "<@&371760044473319454> how do I": You just did! |
16:11:51 | FromDiscord | <jmgomez> maybe that's the first step needed towards better editor support 🙂 |
16:21:48 | * | Guest71 joined #nim |
16:30:18 | * | Guest71 quit (Quit: Client closed) |
16:32:07 | FromDiscord | <ieltan> In reply to @heysokam "<@&371760044473319454> how do I": Renaming #nimble would be fine right? |
16:32:27 | FromDiscord | <sOkam! 🫐> i figure |
16:32:37 | FromDiscord | <sOkam! 🫐> the point is that if there is no conversation, nothing will get done ever |
16:32:45 | FromDiscord | <ieltan> #nimble -> #tooling |
16:33:04 | FromDiscord | <ieltan> Makes sense to me since atlas is around now |
16:33:19 | FromDiscord | <sOkam! 🫐> there is lots more than atlas+nimble |
16:34:12 | FromDiscord | <ieltan> Of course the point is that #nimble can be used to talk about both of them or more |
16:48:18 | FromDiscord | <sOkam! 🫐> In reply to @ieltan "Of course the point": except the channel is dead because its dedicated to nimble just by its name. that logic makes no sense |
16:49:31 | * | ntat joined #nim |
16:54:41 | * | azimut joined #nim |
17:04:18 | PMunch | sOkam, that's why we should rename it |
17:04:38 | PMunch | If we rename #nimble to #tooling then we can chat about all kinds of stuff in there |
17:09:17 | FromDiscord | <jmgomez> so what are you waiting for? 😛 |
17:11:35 | FromDiscord | <sOkam! 🫐> _[insert mandatory gwen stefani lyrics here]_ |
17:12:25 | FromDiscord | <Phil> Admin rights |
17:13:25 | FromDiscord | <ieltan> Also isn't the channel bridged to matrix? You'd need both matrix and discord admin perms right? |
17:13:47 | FromDiscord | <Phil> Matrix regarding that will surprisingly enough be easier on that front |
17:14:47 | FromDiscord | <jmgomez> oh I thought he was the admin already, from the outside PMunch seems the more involved in the community |
17:15:32 | PMunch | I think I have moderator status in some channels |
17:15:36 | FromDiscord | <Phil> Actually he might be, never checked |
17:15:50 | PMunch | We also have to figure out what happens with the IRC room, you can't really rename those |
17:16:21 | PMunch | I guess we'd have to tell the bridge bot to send messages to #nim-tooling instead or something like that |
17:36:14 | FromDiscord | <Phil> That bridge is so much more flexible than we gave it credit for 😛 |
17:54:54 | * | lumo_e quit (Quit: Quit) |
17:57:22 | FromDiscord | <bhunao> anyone one here uses neovim to code in nim? |
17:59:49 | PMunch | @bhunao, I use regular Vim to code Nim |
18:00:29 | FromDiscord | <bhunao> i'm trying to set lsp, linter or whatever but i dont know how |
18:00:41 | FromDiscord | <bhunao> i just dont want my code all the same color |
18:07:20 | FromDiscord | <Yardanico> restarting the IRC bridge |
18:07:21 | * | FromDiscord quit (Remote host closed the connection) |
18:07:36 | * | FromDiscord joined #nim |
18:17:55 | FromDiscord | <saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRc |
18:17:58 | FromDiscord | <saint._._.> If I'm trying to do cpp interop |
18:19:05 | FromDiscord | <saint._._.> Would nimterop help |
18:23:16 | FromDiscord | <jmgomez> In reply to @saint._._. "Would nimterop help": Dont think so. Read the entry on the manual and then look at this: https://github.com/Clonkk/nim-cppstl (consider contributing back if you keep adding bindings) |
18:27:12 | * | ntat quit (Quit: leaving) |
18:28:54 | FromDiscord | <saint._._.> @jmgomez Thanks, the thing i don't get though is that I get |
18:29:00 | FromDiscord | <saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRg |
18:29:07 | FromDiscord | <saint._._.> When just trying to import the .so file, without calling anything |
18:30:36 | FromDiscord | <saint._._.> Oh I need to link with libstdc++ ? |
18:41:55 | FromDiscord | <jmgomez> yep |
18:44:15 | FromDiscord | <saint._._.> How do I do that with nim |
18:44:56 | FromDiscord | <saint._._.> Oh passl |
18:49:04 | FromDiscord | <jmgomez> shoudlnt it be a compiler flag though? `-std=c++11`? |
18:49:29 | FromDiscord | <saint._._.> I tried adding that with passl but I still get the same problem |
18:49:58 | FromDiscord | <saint._._.> nim cpp --passl:"-std=c++11 -stdlib=libc++ " test2.nim |
18:50:01 | FromDiscord | <saint._._.> Is what I'm doing |
18:50:15 | FromDiscord | <jmgomez> try to do `--passC:"--std=c++11"` |
18:50:19 | FromDiscord | <saint._._.> ohh okay |
18:50:20 | FromDiscord | <saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRn |
18:50:23 | * | Guest65 joined #nim |
18:51:08 | FromDiscord | <saint._._.> same problem @jmgomez |
18:52:07 | FromDiscord | <jmgomez> IIRC that worked for me in msvc and clang (MacOs) |
18:52:18 | FromDiscord | <saint._._.> I'm on macos too @jmgomez |
18:52:24 | FromDiscord | <jmgomez> ahh yeah |
18:52:26 | FromDiscord | <jmgomez> M1? |
18:52:34 | FromDiscord | <saint._._.> Intel https://media.discordapp.net/attachments/371759389889003532/1150141713441103972/message.txt |
18:52:41 | FromDiscord | <saint._._.> Intel |
18:52:46 | FromDiscord | <Phil> @mratsim wrapped up applying the advice you gave me a couple days ago. Thanks again for informing me of the better practices there regarding hashing/passwords, their handling and how to deal with their types |
18:53:05 | FromDiscord | <saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRo |
18:53:23 | FromDiscord | <saint._._.> I guess that output doesn't really say anything |
18:53:44 | FromDiscord | <saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRp |
18:53:52 | FromDiscord | <jmgomez> remove that `simdjson` link |
18:53:55 | FromDiscord | <saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRq |
18:54:02 | FromDiscord | <saint._._.> Well if I remove it then it will work |
18:54:05 | FromDiscord | <saint._._.> But thats the whole problem |
18:54:13 | FromDiscord | <saint._._.> I can build simdjson with g++ on my system |
18:54:16 | FromDiscord | <saint._._.> But I can't link it to nim |
18:54:30 | FromDiscord | <jmgomez> ok, then is not stl |
18:54:38 | FromDiscord | <jmgomez> then path for `link` is absolute though |
18:54:52 | FromDiscord | <jmgomez> isnt it? |
18:54:53 | FromDiscord | <saint._._.> Yeah |
18:54:57 | FromDiscord | <saint._._.> Absolute |
18:55:12 | FromDiscord | <jmgomez> (edit) "then" => "the" |
18:55:17 | FromDiscord | <saint._._.> Just in my local dir |
18:55:25 | FromDiscord | <jmgomez> `{.link: "./simdjson.o".}` this doesnt look absolute |
18:55:33 | FromDiscord | <saint._._.> Oh sorry |
18:55:46 | FromDiscord | <saint._._.> I thought you meant like not an installed library |
18:56:38 | FromDiscord | <saint._._.> In reply to @jmgomez "ok, then is not": You are saying the linker error doesn't have to do with the c++ stl? |
18:56:57 | FromDiscord | <jmgomez> and then make sure it has x86 symbol |
18:57:02 | FromDiscord | <jmgomez> (edit) "symbol" => "symbols" |
18:57:23 | FromDiscord | <saint._._.> I'm not on m1 so I'm pretty sure it does have x86, but how do I make sure of that |
18:57:26 | FromDiscord | <jmgomez> In reply to @saint._._. "You are saying the": I would remove it and test a call to the stl first to make sure |
18:57:28 | FromDiscord | <saint._._.> I'm just runnign g++ -c |
18:57:44 | FromDiscord | <saint._._.> In reply to @jmgomez "I would remove it": Hmm okay |
18:57:49 | FromDiscord | <saint._._.> Good idea |
18:59:24 | FromDiscord | <saint._._.> Ya I think u are right @jmgomez |
18:59:51 | FromDiscord | <saint._._.> Is std::cxx11::basic_string not stl ? |
18:59:52 | * | Guest65 quit (Quit: Client closed) |
19:00:36 | * | junaid_ joined #nim |
19:01:26 | FromDiscord | <kingterrytheterrible12> whats the point of dynamic dispatch |
19:01:39 | FromDiscord | <kingterrytheterrible12> cant we turn dynamic dispatch into overloads? |
19:15:42 | FromDiscord | <saint._._.> @jmgomez I got it to work, I had to build my lib with clang++ instead of g++ |
19:18:35 | FromDiscord | <sOkam! 🫐> In reply to @bhunao "anyone one here uses": I do. lunarvim to be specific |
19:19:42 | FromDiscord | <sOkam! 🫐> i do not know how to do it in raw neovim though. i never setup an lsp system myself↵i always rely on lvim's already installed lsp configurator |
19:19:57 | FromDiscord | <sOkam! 🫐> I do `LspInstall nim` and works |
19:20:32 | FromDiscord | <sOkam! 🫐> (edit) "nim`" => "nimls`" |
19:22:08 | FromDiscord | <sOkam! 🫐> and for highlighter i use `{'zah/nim.vim'}, -- Syntax highlighter only` |
19:22:32 | FromDiscord | <sOkam! 🫐> its a really old one, but it works well for syntax highlight |
19:22:42 | FromDiscord | <sOkam! 🫐> i tried another one, but didn't personally like it |
19:23:55 | FromDiscord | <bhunao> In reply to @heysokam "and for highlighter i": gonna try it |
19:25:34 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4FRt |
19:26:51 | FromDiscord | <sOkam! 🫐> ^ that would be sick |
19:27:02 | FromDiscord | <bhunao> @sOkam! 🫐 it worked, thanks |
19:27:22 | FromDiscord | <kingterrytheterrible12> In reply to @heysokam "^ that would be": very sick as the youngsters say |
19:27:25 | FromDiscord | <saint._._.> In reply to @bhunao "gonna try it": U can get tree-sitter syntax highlight for vim |
19:27:26 | FromDiscord | <saint._._.> nvim |
19:27:28 | FromDiscord | <saint._._.> I have it working |
19:27:32 | FromDiscord | <kingterrytheterrible12> it will be indeed bussin no cap |
19:28:03 | FromDiscord | <sOkam! 🫐> In reply to @saint._._. "U can get tree-sitter": its what zah/nim.vim does afaik 🤔 |
19:28:15 | FromDiscord | <bhunao> In reply to @saint._._. "I have it working": how did u got it? |
19:40:18 | FromDiscord | <Chronos [She/Her]> Is there any point to me making new bindings for Chipmunk2D when some already exist? |
19:45:13 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Is there any point": if its abandoned then yes |
19:45:17 | FromDiscord | <kingterrytheterrible12> otherwise no |
19:45:50 | FromDiscord | <Chronos [She/Her]> It's abandoned but Chipmunk hasn't updated the API so hm |
19:47:52 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "otherwise no": So not sure tbh |
19:48:17 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "It's abandoned but Chipmunk": have they added new shit that is unbinded? |
19:48:29 | FromDiscord | <Chronos [She/Her]> Not sure how to check lol |
19:49:08 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Not sure how to": you gotta start checkin baby |
19:50:04 | FromDiscord | <Chronos [She/Her]> How tho |
19:50:35 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "How tho": open the codebase |
19:50:50 | FromDiscord | <kingterrytheterrible12> your required to anyways or how else are ya gonna bind it hon |
19:58:18 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "Is there any point": i would fork in that situation, and only in the case of something missing in the bindings |
19:58:36 | FromDiscord | <sOkam! 🫐> if they work, then no reason. since bindings sometimes rarely change |
19:59:11 | FromDiscord | <kingterrytheterrible12> +1 |
20:01:46 | FromDiscord | <Chronos [She/Her]> Yeah no changes really |
20:04:24 | FromDiscord | <Chronos [She/Her]> Sigh... Chat app or MC server |
20:04:27 | FromDiscord | <Chronos [She/Her]> I'm doing chat app |
20:06:32 | FromDiscord | <Phil> But Chronos!↵Now you get to choose between "centralized chat app" and "decentralized chat app"! |
20:07:16 | FromDiscord | <Chronos [She/Her]> Decentralised, next question |
20:08:07 | FromDiscord | <Phil> Websockets or custom protocol? |
20:08:09 | FromDiscord | <saint._._.> In reply to @heysokam "its what zah/nim.vim does": Nah that just does regular syntax highlighting |
20:08:12 | FromDiscord | <Chronos [She/Her]> Websockets |
20:08:22 | FromDiscord | <Chronos [She/Her]> They're easy and convinient |
20:08:31 | FromDiscord | <Chronos [She/Her]> Gonna have a HTTP API too obvs |
20:08:37 | FromDiscord | <Phil> Custom communications protocol or XMPP interoperability ? |
20:08:44 | FromDiscord | <Chronos [She/Her]> XMPP? |
20:08:50 | FromDiscord | <Chronos [She/Her]> Was planning custom tbh |
20:08:57 | FromDiscord | <Phil> https://xmpp.org/ |
20:09:44 | FromDiscord | <Phil> I actually don't know if XMPP is feasible in non-centralized setups. I think it should be but no promises |
20:10:00 | FromDiscord | <Phil> I have the faint suspicion it might be a protocol designed with centralized setups in mind |
20:10:28 | FromDiscord | <Chronos [She/Her]> Idk if that'll work with my way of authenticating |
20:10:56 | FromDiscord | <Chronos [She/Her]> Either way, I'll prolly break the XMPP protocol a bit anyway since it's supposed to be discord-esque |
20:11:57 | FromDiscord | <Phil> The benefit of being XMPP interoperable is, well, possibly interoperability with other protocols and generally it's not a terrible idea to be aware of more popular protocols (and XMPP is ancient, among the protocols out there afaik the most widespread one) |
20:12:17 | FromDiscord | <Phil> (edit) "other protocols" => "others implementing the protocol" |
20:12:35 | * | junaid_ quit (Remote host closed the connection) |
20:12:37 | FromDiscord | <Chronos [She/Her]> I'll prolly use my own protocol anyway |
20:12:59 | FromDiscord | <Phil> But jesus christ that's a lot to read |
20:13:01 | FromDiscord | <Chronos [She/Her]> Any other questions? :p |
20:13:13 | FromDiscord | <Phil> Chat rooms or not chat-rooms? |
20:13:19 | FromDiscord | <Phil> (edit) "not" => "no" |
20:13:30 | FromDiscord | <Phil> Important because no chat-rooms is simpler, with chat-rooms is more useful for users |
20:13:35 | FromDiscord | <Chronos [She/Her]> Chat rooms as in servers? Or as in channels? |
20:13:56 | FromDiscord | <Phil> channels. Basically "Do you have an alternative to DMs?" |
20:14:05 | FromDiscord | <Chronos [She/Her]> Yeah that'll be a thing |
20:14:20 | FromDiscord | <Chronos [She/Her]> DMs are gonna be a bit funky tbh but I'll figure it out |
20:14:37 | FromDiscord | <Phil> In that case you've got your first task cut out for you |
20:14:50 | FromDiscord | <Phil> Because in a decentralized setting, where are you loading the data of messages the other person sent you? |
20:14:56 | FromDiscord | <Phil> (edit) "you?" => "you while you were offline?" |
20:15:22 | FromDiscord | <Phil> (edit) "Because in a decentralized setting, ... where" added "from" |
20:15:55 | FromDiscord | <Chronos [She/Her]> My idea would be setting an instance as a mutual party for sharing messages |
20:16:19 | FromDiscord | <Phil> Ah, so centralized chat, you just control the instance, matrixlike basically |
20:16:42 | FromDiscord | <Chronos [She/Her]> They choose an instance to communicate on a mutual party there |
20:17:03 | FromDiscord | <Chronos [She/Her]> The chat server part and the account system are two separate programs here |
20:17:26 | FromDiscord | <Chronos [She/Her]> Like, you authenticate to a chat server using an account server |
20:17:27 | FromDiscord | <Phil> Yeah but now you've got 3 parts then:↵Chat client, chat server, account manager |
20:18:19 | FromDiscord | <Phil> Then next question: Do chat server and account manager share a DB or do they not and they communicate over the local network via HTTP? |
20:19:18 | FromDiscord | <Chronos [She/Her]> For the chat client, it'd be static and just use the account system API to authenticate with the chat server and that's the extent of their communication |
20:19:50 | FromDiscord | <kingterrytheterrible12> @Chronos [She/Her] if you want help i recently decided i will make a chat protocol in rust |
20:20:24 | FromDiscord | <kingterrytheterrible12> why rust not nim? because i need to bind it to frontends in kotlin swift and C++ |
20:20:34 | FromDiscord | <kingterrytheterrible12> or nim for desktop |
20:21:57 | FromDiscord | <Phil> In reply to @chronos.vitaqua "For the chat client,": So chat client sends request to account-system, that says "okay", hands you a token and you hand token to chatserver? |
20:22:32 | FromDiscord | <Phil> I can't quite materialize what you mean by "static" in this context |
20:22:37 | FromDiscord | <arathanis> why does the chat server and chat client need to communicate? |
20:22:50 | FromDiscord | <kingterrytheterrible12> how else can you forward messages |
20:22:52 | FromDiscord | <arathanis> (edit) "chat client" => "account server" |
20:22:55 | FromDiscord | <arathanis> sorry |
20:22:57 | FromDiscord | <arathanis> made an edit |
20:23:28 | FromDiscord | <Phil> They must communicate if the account server is your way of authenticating that a given chat-client is user X writing messages as user X to the chat-server |
20:23:31 | FromDiscord | <arathanis> (edit) "server" => "~~server~~ manager" |
20:24:21 | FromDiscord | <Phil> If your point of truth for authenticating is all in the chat server then you're fine, but any writing of chat-messages must solve the question "Am I allowed to write a message as this user?" |
20:24:37 | FromDiscord | <arathanis> In reply to @isofruit "They must communicate if": you just use JWT w/ RSA public/private key pair. The account manager signs the JWT with the private key, but in order to verify authenticity you only need the public key. This way you don't have to bother with the overhead of communication, just make sure the server has a copy of the public key and you can be sure the chat client was authorized by the account manager. This greatly simp |
20:24:42 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "If your point of": thank god for branch predictors lol |
20:25:04 | FromDiscord | <arathanis> Most people sign JWT with a single secret token, but there is a lot more power in my opinion in using the public/private key pair JWT signing method |
20:25:15 | FromDiscord | <kingterrytheterrible12> or just dont verify at all |
20:26:01 | FromDiscord | <kingterrytheterrible12> something like how emails work |
20:26:20 | FromDiscord | <kingterrytheterrible12> you dont need to verify if your allowed to send to someone |
20:26:25 | FromDiscord | <Phil> In reply to @arathanis "you just use JWT": Good shout there, makes things simpler a bit |
20:26:27 | FromDiscord | <kingterrytheterrible12> the client handles that |
20:26:48 | FromDiscord | <arathanis> In reply to @isofruit "Good shout there, makes": yeah, i remember the first time i discovered you could use a keypair instead of a single token and it really opened by eyes |
20:27:06 | FromDiscord | <arathanis> its not talked about nearly enough imo |
20:27:11 | FromDiscord | <arathanis> everyone also uses the singular token |
20:27:19 | FromDiscord | <Phil> I guess that's how centralized auth could work in general in a microservice landscape |
20:27:41 | FromDiscord | <arathanis> thats exactly how I have done it, yes |
20:27:51 | FromDiscord | <fowl.mouth> Does Nim have a GRPC library? |
20:28:00 | FromDiscord | <kingterrytheterrible12> also isnt there too many chat clients and protocols? |
20:28:50 | FromDiscord | <arathanis> In reply to @kingterrytheterrible12 "also isnt there too": yes but implementing your own for academic purposes is still useful imo |
20:29:19 | FromDiscord | <kingterrytheterrible12> eh idk |
20:29:30 | FromDiscord | <kingterrytheterrible12> its better to go look at matrix source code no? |
20:29:39 | FromDiscord | <kingterrytheterrible12> or signal |
20:29:52 | FromDiscord | <arathanis> looking at source code doesn't give you architecture and design experience |
20:30:03 | FromDiscord | <kingterrytheterrible12> also is voip handled over websockets? |
20:30:18 | FromDiscord | <arathanis> In reply to @kingterrytheterrible12 "also is voip handled": by carrier pidgeon |
20:30:24 | FromDiscord | <kingterrytheterrible12> huh |
20:30:27 | FromDiscord | <arathanis> 😂 |
20:30:31 | FromDiscord | <kingterrytheterrible12> dont troll |
20:30:34 | FromDiscord | <arathanis> yeah its usually web sockets |
20:30:44 | FromDiscord | <arathanis> im not trolling, just joking around |
20:30:50 | FromDiscord | <kingterrytheterrible12> bet |
20:30:53 | FromDiscord | <arathanis> or at least, that is my perception. |
20:31:00 | FromDiscord | <arathanis> i see trolling as actively trying to make people angry |
20:31:20 | FromDiscord | <kingterrytheterrible12> anyways voip wise when does it know to send the packet? |
20:31:26 | FromDiscord | <kingterrytheterrible12> what if the user never stops talking |
20:31:32 | FromDiscord | <kingterrytheterrible12> like has background noise or something |
20:32:17 | FromDiscord | <leorize> then you never stop sending data \:) |
20:32:25 | FromDiscord | <arathanis> In reply to @kingterrytheterrible12 "anyways voip wise when": you stream chunks |
20:32:51 | FromDiscord | <arathanis> so you dont wait for them to stop talking, you just send VOIP packets constantly and the client stitches them into the voice on the fly |
20:32:57 | FromDiscord | <Chronos [She/Her]> sorry just had to brb |
20:33:05 | FromDiscord | <kingterrytheterrible12> In reply to @arathanis "so you dont wait": i see |
20:33:09 | FromDiscord | <Phil> Yeh, Architecture knowledge is built on the corpse of a lot of projects with flaws |
20:33:20 | FromDiscord | <kingterrytheterrible12> this can get reaaal complicated when 2 or more people start talking to each other |
20:33:31 | FromDiscord | <Phil> Where you learn what fundamental decision turns into which really annoying outcomes |
20:33:32 | FromDiscord | <arathanis> its harder, cause you have to use an audio protocol that lets you stich data on the fly but its the only way to not have bunk VOIP |
20:33:53 | FromDiscord | <Phil> And eventually you'll have tried out enough to realize that both decisions suck balls, just in different ways and now you need to choose which one hurts less in your current setup. |
20:33:56 | FromDiscord | <arathanis> In reply to @kingterrytheterrible12 "this can get reaaal": you want to merge the audio streams |
20:34:16 | FromDiscord | <arathanis> instead of playing a different audio stream for each user |
20:34:23 | FromDiscord | <arathanis> you combine the incoming wave forms into a single wave form |
20:34:27 | FromDiscord | <Chronos [She/Her]> In reply to @arathanis "you just use JWT": So sign with private key, verify with public key? |
20:34:29 | FromDiscord | <arathanis> such a cool project haha |
20:34:31 | FromDiscord | <kingterrytheterrible12> playing 2 diffrent audio streams makes more sense |
20:34:35 | FromDiscord | <arathanis> In reply to @chronos.vitaqua "So sign with private": correct! |
20:34:44 | FromDiscord | <arathanis> you create the JWT and its signed with the private key |
20:34:45 | FromDiscord | <Phil> @Chronos [She/Her] might want to think about which database you want to use in each case and how you want to modle the data |
20:34:48 | FromDiscord | <Chronos [She/Her]> That's actually a really good way to verify that the client is actually who they say they are |
20:34:52 | FromDiscord | <arathanis> someone looking to make sure its authorized simply needs the pub key |
20:35:00 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "<@909883978717204561> might want to": Wrong account, I thought you kicked it lmao |
20:35:08 | FromDiscord | <kingterrytheterrible12> @Chronos [She/Her] also this isnt some quick project to implement if you want a full featured client |
20:35:12 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "<@909883978717204561> might want to": I'll likely to use Postgres on both DBs tbh |
20:35:13 | FromDiscord | <Phil> I swear I did, trying again |
20:35:13 | FromDiscord | <kingterrytheterrible12> its gonna take a couple of years |
20:35:19 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "<@524288464422830095> also this isnt": Yeah I'm aware lol |
20:35:35 | FromDiscord | <kingterrytheterrible12> you can just implement an uh |
20:35:38 | FromDiscord | <kingterrytheterrible12> chat client |
20:35:40 | FromDiscord | <Phil> @Chronos [She/Her] mieb merb murb |
20:35:41 | FromDiscord | <kingterrytheterrible12> with no voip |
20:35:47 | FromDiscord | <Chronos [She/Her]> That is moi |
20:35:54 | FromDiscord | <kingterrytheterrible12> thats ligma |
20:35:59 | FromDiscord | <Chronos [She/Her]> Yeah I'm just doing the client, no voice lol |
20:36:17 | FromDiscord | <kingterrytheterrible12> what about implementing the CANDICE protocol? |
20:36:37 | FromDiscord | <Chronos [She/Her]> But thanks @arathanis, that's actually a great solution lmao |
20:36:45 | FromDiscord | <arathanis> In reply to @chronos.vitaqua "But thanks <@136570191038513152>, that's": you are very welcome! |
20:36:52 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "what about implementing the": Does that work with the JOE method? |
20:37:12 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Does that work with": yes combined with the LIGMA solution its nice |
20:37:26 | FromDiscord | <kingterrytheterrible12> and i heard DEEZ works too |
20:37:36 | FromDiscord | <Chronos [She/Her]> Also hm, I'd be able to distribute the public key to anyone, right? If I wanted them to be able to also authenticate the client? |
20:37:41 | FromDiscord | <kingterrytheterrible12> bro |
20:37:46 | FromDiscord | <kingterrytheterrible12> its called public KEY |
20:37:47 | FromDiscord | <arathanis> In reply to @chronos.vitaqua "Also hm, I'd be": yes its safe for anyone to see the pubkey |
20:37:49 | FromDiscord | <kingterrytheterrible12> PUBLIC KEY |
20:37:52 | FromDiscord | <kingterrytheterrible12> PUBLIC |
20:38:06 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "and i heard DEEZ": Hm, what I used SUGMA instead |
20:38:16 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Hm, what I used": tf is SUGMA |
20:38:17 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "PUBLIC": :p my brain is very dead lmao |
20:38:23 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua ":p my brain is": can see |
20:38:26 | FromDiscord | <arathanis> In reply to @kingterrytheterrible12 "PUBLIC": ive seen some things online tagged "public" that you had to be 18 years old or older to view 🤔 |
20:38:29 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "tf is SUGMA": Sugma balls |
20:38:33 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "*Sugma balls*": NOOOOOOOOOOOOOOOOOO |
20:38:38 | FromDiscord | <Chronos [She/Her]> MUAHAHAHAHAH |
20:38:52 | FromDiscord | <kingterrytheterrible12> In reply to @arathanis "ive seen some things": on the hub? |
20:38:55 | FromDiscord | <kingterrytheterrible12> of git? |
20:39:00 | FromDiscord | <arathanis> 🤫 |
20:39:12 | FromDiscord | <Chronos [She/Her]> I'm tryna figure out how you'd prove the server is authentic too hm |
20:39:25 | FromDiscord | <Chronos [She/Her]> Don't think there's a way to do that but |
20:39:30 | FromDiscord | <arathanis> In reply to @chronos.vitaqua "I'm tryna figure out": cert pinning |
20:39:33 | FromDiscord | <Phil> sent a long message, see http://ix.io/4FRH |
20:39:38 | FromDiscord | <kingterrytheterrible12> you gotta spend time making an flowchart and engineering everything |
20:39:38 | FromDiscord | <Chronos [She/Her]> What's that? |
20:39:41 | FromDiscord | <kingterrytheterrible12> dont just start making |
20:39:44 | FromDiscord | <arathanis> i do this at work all the time haha |
20:40:02 | FromDiscord | <arathanis> In reply to @chronos.vitaqua "What's that?": you force the client to carry a SSL cert with it and use that for all auth instead of relying on the OS's cert store. |
20:40:13 | FromDiscord | <arathanis> So it will only auth against the server |
20:40:30 | FromDiscord | <kingterrytheterrible12> all of this work |
20:40:35 | FromDiscord | <kingterrytheterrible12> only for your protocol to fail |
20:40:36 | FromDiscord | <kingterrytheterrible12> xd |
20:41:03 | FromDiscord | <kingterrytheterrible12> i generally like to spend time improving existing shit rather than making one |
20:41:43 | FromDiscord | <kingterrytheterrible12> if everyone had a problem with the linux kernel for example and everyone started making their own kernel no kernel would go anywhere |
20:41:48 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "i generally like to": Generally I agree, but there's a ton to be learned in this case and it's fairly rewarding to write |
20:42:02 | FromDiscord | <Phil> Chatapps make for really good learning projects imo |
20:42:33 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "Chatapps make for really": you learn as much as you would by contributing to matrix |
20:42:42 | FromDiscord | <kingterrytheterrible12> or signal |
20:42:46 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "Alrighty, then pay close": Whenever the client tries requesting a message from that account, and it's unable to do so, the chat server saves the account user ID, and checks every 12 hours, for a week to see if the account server comes online again, if it doesn't, it'll be deleted (but if the server is simply offline for maintenance, you'd just have to make sure you're serving something to indicate that, |
20:42:58 | FromDiscord | <kingterrytheterrible12> also dont ever contribute to microsoft boys |
20:43:11 | FromDiscord | <kingterrytheterrible12> last time i did they converted my issue to a discussion and closed it |
20:43:13 | FromDiscord | <kingterrytheterrible12> fuck them |
20:43:46 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "you gotta spend time": That's actually something I should do tbh, any recommendations for software on Linux for it or for a solution on the web? |
20:43:56 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "That's actually something I": ligmaflow |
20:44:11 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "Generally I agree, but": Yeah, it's mostly just so I can learn |
20:44:13 | FromDiscord | <kingterrytheterrible12> @Chronos [She/Her] https://app.diagrams.net/ |
20:44:19 | FromDiscord | <kingterrytheterrible12> is what i use |
20:44:23 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "you learn as much": I disagree. These projects are too large to get a meaningful overview |
20:44:24 | FromDiscord | <Chronos [She/Her]> In reply to @arathanis "you force the client": How would that work if the client logs in from elsewhere? |
20:44:31 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "<@524288464422830095> https://app.diagrams.net/": Thanks! |
20:44:37 | FromDiscord | <Phil> Got to first start walking before you spring a mile a minute and these apps are sprinting |
20:44:37 | FromDiscord | <arathanis> In reply to @chronos.vitaqua "How would that work": the client installation just has a certificate with it |
20:44:48 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "ligmaflow": You lost all respect from me since you fell for my trick muahahahaha |
20:45:01 | FromDiscord | <kingterrytheterrible12> @Chronos [She/Her] also if you want to make a chatclient make a repo and send it over |
20:45:10 | FromDiscord | <kingterrytheterrible12> i wanna contribute rather than making my own shit |
20:45:14 | FromDiscord | <Chronos [She/Her]> Sure! |
20:45:24 | FromDiscord | <kingterrytheterrible12> its wasted effort for 2 of us making the exact same thing |
20:45:27 | FromDiscord | <Chronos [She/Her]> In reply to @arathanis "the client installation just": I don't understand how it'd work tbh aha |
20:45:34 | FromDiscord | <arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4FRI |
20:45:42 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "its wasted effort for": Yeah lol, I'll do that then |
20:46:03 | FromDiscord | <kingterrytheterrible12> also if its gonna go anywhere your gonna need some cybersecurity guy vetting out your repo |
20:46:09 | FromDiscord | <kingterrytheterrible12> before deploying to production |
20:46:22 | FromDiscord | <kingterrytheterrible12> so nobody does a lil trolling and steals all messages |
20:46:30 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4FRJ |
20:46:31 | FromDiscord | <kingterrytheterrible12> WEB CLIENT |
20:46:32 | FromDiscord | <kingterrytheterrible12> IM OUT |
20:46:33 | FromDiscord | <kingterrytheterrible12> SEE YA |
20:46:36 | FromDiscord | <Chronos [She/Her]> Lmaooo |
20:46:48 | FromDiscord | <kingterrytheterrible12> WHY WEB BRO |
20:46:53 | FromDiscord | <kingterrytheterrible12> SHIT UX |
20:46:55 | FromDiscord | <Chronos [She/Her]> I need to learn HTML and shite properly too :p |
20:47:21 | FromDiscord | <Phil> In reply to @chronos.vitaqua "Whenever the client tries": Oh, so basically the server is not a permanent store of chat messages, the clients ultimately store those and if the clients lose them they're not recoverable? |
20:47:23 | FromDiscord | <kingterrytheterrible12> i dont understand the point of webclient when everyone who uses your app on desktop will just download the desktop app |
20:47:24 | FromDiscord | <kingterrytheterrible12> xd |
20:47:36 | FromDiscord | <kingterrytheterrible12> and mobile guys will want a mobile app |
20:48:08 | FromDiscord | <arathanis> In reply to @chronos.vitaqua "It's gonna be a": oh if its a web page then you might as well just deploy them in the same environment, lock k8s, and have them communicate directly with each other over the stack network. |
20:48:16 | FromDiscord | <arathanis> (edit) "lock" => "like" |
20:48:27 | FromDiscord | <arathanis> (edit) "environment," => "environment using something" | "k8s," => "k8s" |
20:49:02 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "i dont understand the": I mean, and then they'll be running still a webapp in a browser, they just won't know its a browser 😛 |
20:49:13 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "Oh, so basically the": The client doesn't store anything really, it's just the account server that has to ensure that it stays online or at least states it's in maintenance mode |
20:49:16 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "I mean, and then": if you make it badly (electron) then yes |
20:49:23 | FromDiscord | <kingterrytheterrible12> do it proper and use gtk or Qt |
20:49:34 | FromDiscord | <Phil> Ain't nobody got time for that for larger projects |
20:49:52 | FromDiscord | <kingterrytheterrible12> your gonna spend years making a chat protocol then half ass the desktop client? |
20:49:58 | FromDiscord | <kingterrytheterrible12> what is this discord all over again? |
20:50:09 | FromDiscord | <leorize> in fact that's how all successful projects managed |
20:50:22 | FromDiscord | <leorize> turns out the desktop client is not that important |
20:50:25 | FromDiscord | <kingterrytheterrible12> bruh |
20:50:28 | FromDiscord | <Phil> I can fully understand why electron took off. That doesn't mean I like it but dismissing the benefits in terms of dev-speed is a tad short sighted. |
20:50:38 | FromDiscord | <kingterrytheterrible12> dev speed? |
20:50:45 | FromDiscord | <kingterrytheterrible12> have you seen the IPC interface |
20:50:59 | FromDiscord | <kingterrytheterrible12> gtk and qt signal and slots are much better |
20:51:24 | FromDiscord | <kingterrytheterrible12> although i prefer callbacks but i also like signals and slots |
20:51:29 | FromDiscord | <leorize> have you seen react? |
20:51:39 | FromDiscord | <kingterrytheterrible12> unfortunately |
20:51:49 | FromDiscord | <arathanis> In reply to @isofruit "I can fully understand": these days I look at Tauri |
20:51:55 | FromDiscord | <leorize> turns out leaving mutation to computers make it easier for human brains |
20:51:57 | FromDiscord | <arathanis> its Electron but using Rust instead of Node so it hauls |
20:52:01 | FromDiscord | <kingterrytheterrible12> tauri is just electron with more problems |
20:52:07 | FromDiscord | <Phil> In reply to @arathanis "these days I look": If they had nim bindings I wouldn't be utterly ignoring them |
20:52:10 | FromDiscord | <kingterrytheterrible12> wow it doesnt ship a browser great |
20:52:24 | FromDiscord | <kingterrytheterrible12> yeah it turns out its fucking bad for compatibility |
20:52:41 | FromDiscord | <arathanis> I mostly just write CLIs though, GUIs are evil 🙂 |
20:52:46 | FromDiscord | <Phil> But the last point of communication on their end was "Nobody seems to care enough" so eh |
20:53:06 | FromDiscord | <kingterrytheterrible12> ngl if you wanna do web based desktop shipping a whole browser is the way to go |
20:53:24 | FromDiscord | <pmunch> sent a code paste, see https://play.nim-lang.org/#ix=4FRL |
20:53:24 | FromDiscord | <leorize> tauri on linux uses webkitgtk |
20:53:30 | FromDiscord | <kingterrytheterrible12> In reply to @pmunch "What, three lines is": too much work |
20:53:38 | FromDiscord | <kingterrytheterrible12> im joking lol |
20:53:39 | FromDiscord | <leorize> compatibility is worse than safari |
20:53:53 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "compatibility is worse than": therefore, shipping a browser is the way |
20:54:05 | FromDiscord | <leorize> or just write a PWA |
20:54:10 | FromDiscord | <Phil> Yeah I played around with my angular SPA on that thing and it's just... wtf |
20:54:12 | FromDiscord | <leorize> you get away with it like 80% of the time |
20:54:22 | FromDiscord | <kingterrytheterrible12> PWA have shit UX |
20:54:22 | FromDiscord | <Chronos [She/Her]> I mean if there's a way |
20:54:25 | FromDiscord | <Chronos [She/Her]> Sorry |
20:54:38 | FromDiscord | <leorize> most gui apps have shit ux |
20:54:39 | FromDiscord | <Phil> Eh, mangadex is a PWA and the UX is pretty decent |
20:54:41 | FromDiscord | <kingterrytheterrible12> or use flutter or something |
20:54:45 | FromDiscord | <leorize> web doesn't magically make it worse or better |
20:54:54 | FromDiscord | <Chronos [She/Her]> If there's a way to write a native app and a way to dstribute it on the web, that'd be nice |
20:54:54 | FromDiscord | <leorize> you want good ux you have to learn ux first |
20:54:55 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "most gui apps have": you clearly havent seen qbittorrent yet |
20:55:00 | FromDiscord | <kingterrytheterrible12> i love that app |
20:55:06 | FromDiscord | <Phil> ~~And UX on my PWA is only terrible because I can't design for shit~~ |
20:55:13 | FromDiscord | <kingterrytheterrible12> its the most used foss app i ever used even before i became a programmer |
20:55:24 | FromDiscord | <leorize> yea and I can duplicate qbittorrent ux on the web |
20:55:25 | FromDiscord | <Chronos [She/Her]> WASM could do it but no lib for that afaik and accessibility obviously suffers |
20:55:32 | FromDiscord | <kingterrytheterrible12> bro |
20:55:33 | FromDiscord | <leorize> it's not a problem of toolkit |
20:55:36 | FromDiscord | <kingterrytheterrible12> ong just use native desktop |
20:55:40 | FromDiscord | <Chronos [She/Her]> Nah |
20:55:41 | FromDiscord | <kingterrytheterrible12> or fucking flutter bro |
20:55:44 | FromDiscord | <Chronos [She/Her]> I'm using web |
20:55:46 | FromDiscord | <Phil> Honestly I'm looking forward to bun speeding shit up |
20:55:51 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "Honestly I'm looking forward": 1.0 is out |
20:55:55 | FromDiscord | <Phil> I'm aware |
20:55:56 | FromDiscord | <kingterrytheterrible12> and also bun is lying btw |
20:56:01 | FromDiscord | <kingterrytheterrible12> its all lies |
20:56:15 | FromDiscord | <kingterrytheterrible12> `Bun.serve` is written in zig not javascript |
20:56:17 | FromDiscord | <Phil> I mean more if they can integrate into existing ecosystems and lead to performance improvements across the board there or not. |
20:56:19 | FromDiscord | <Chronos [She/Her]> Lol idk how to structure the flowchart |
20:56:27 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Lol idk how to": gotta start learnin hon |
20:56:46 | FromDiscord | <Chronos [She/Her]> Ik how to do it just not how to structure my app on it |
20:56:50 | FromDiscord | <kingterrytheterrible12> https://www.youtube.com/watch?v=SWRDqTx8d4k&ab_channel=RobotRiedinger |
20:57:09 | FromDiscord | <Phil> Theoretically it is just a runtime and thus should be able to replace wherever the V8 engine is being used. |
20:57:20 | FromDiscord | <kingterrytheterrible12> yes but the speed is lies |
20:57:26 | FromDiscord | <Phil> In reply to @chronos.vitaqua "Ik how to do": Honestly I'd start with listing myself the features I want to support and from there start with data models |
20:57:29 | FromDiscord | <kingterrytheterrible12> unless they gonna rewrite everything in zig |
20:57:33 | FromDiscord | <kingterrytheterrible12> like EVERYTHING |
20:57:50 | FromDiscord | <kingterrytheterrible12> the benchmarks on their site is just benchmarking javascript vs zig |
20:57:58 | FromDiscord | <kingterrytheterrible12> so |
20:58:11 | FromDiscord | <kingterrytheterrible12> if you gonna write the next nbody sim in javascript and hope bun will speed it up |
20:58:15 | FromDiscord | <kingterrytheterrible12> ya out of luck |
20:58:51 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "Honestly I'd start with": Features I need in the chat app on the server and client, and then how the data would be modelled on both? |
20:59:06 | FromDiscord | <Chronos [She/Her]> Then from there, write the actual flow of theprogram? |
20:59:06 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Features I need in": markdown |
20:59:20 | FromDiscord | <kingterrytheterrible12> state what the app needs↵make flowchart↵start programming |
20:59:27 | FromDiscord | <Chronos [She/Her]> Gucci, thanks! |
20:59:32 | FromDiscord | <kingterrytheterrible12> bussin no cap |
20:59:32 | FromDiscord | <kingterrytheterrible12> ong |
21:00:09 | FromDiscord | <kingterrytheterrible12> also i wonder if gtk apps are any good on windowas |
21:00:11 | FromDiscord | <kingterrytheterrible12> (edit) "windowas" => "windows" |
21:00:19 | FromDiscord | <leorize> they works |
21:00:24 | FromDiscord | <leorize> packaging is a pita, though |
21:00:31 | FromDiscord | <kingterrytheterrible12> hm |
21:00:35 | FromDiscord | <kingterrytheterrible12> so ETO forms? |
21:00:47 | FromDiscord | <kingterrytheterrible12> i get gtk on linux and whatever mac is and winforms on windows |
21:01:20 | FromDiscord | <leorize> or you can write a webapp xdddddd |
21:01:27 | FromDiscord | <kingterrytheterrible12> its not native |
21:01:28 | FromDiscord | <kingterrytheterrible12> slow |
21:01:29 | FromDiscord | <kingterrytheterrible12> bad ux |
21:01:50 | FromDiscord | <leorize> maybe it's skill issue 😁 |
21:01:58 | FromDiscord | <kingterrytheterrible12> web issue |
21:02:45 | FromDiscord | <leorize> you can always start by studying pre-existing protocols↵(@Chronos [She/Her]) |
21:03:33 | FromDiscord | <pmunch> I think Gtk has gotten better on Windows. I've shipped a couple Gtk apps on Windows in various languages. As long as you set a reasonable default theme it looks pretty native |
21:03:49 | FromDiscord | <leorize> IETF is also working on a new chat protocol, and you can read the mailing list to see what they're considering |
21:03:50 | FromDiscord | <kingterrytheterrible12> hm alright |
21:04:04 | FromDiscord | <Chronos [She/Her]> I may do that tbf |
21:04:08 | FromDiscord | <kingterrytheterrible12> In reply to @leorize "IETF is also working": the NSA and CIA are working on it |
21:04:25 | FromDiscord | <kingterrytheterrible12> the next open source chat protocol thats gonna put you in jail |
21:05:18 | FromDiscord | <kingterrytheterrible12> brb installing zorin os |
21:06:05 | FromDiscord | <leorize> if you're approaching this as a learning exercise, try to figure out the invariant model behind their designs↵(@Chronos [She/Her]) |
21:06:33 | FromDiscord | <kingterrytheterrible12> Ngl signal is the only protocol thats actually good |
21:06:54 | FromDiscord | <leorize> basically the roles of every participants and what is guaranteed by what |
21:07:16 | FromDiscord | <leorize> protocols like discord and facebook messenger has also been reverse-engineered in open source projects |
21:07:38 | FromDiscord | <leorize> those will give you a glimpse into how different groups approach the same problems |
21:07:40 | FromDiscord | <Chronos [She/Her]> In reply to @leorize "if you're approaching this": invariant model?- |
21:07:45 | FromDiscord | <Chronos [She/Her]> Ah |
21:12:27 | FromDiscord | <leorize> just remember that you don't need perfection on right away |
21:12:32 | FromDiscord | <leorize> it's a process |
21:16:38 | FromDiscord | <Chronos [She/Her]> Yeah I understand lol |
21:16:53 | FromDiscord | <Chronos [She/Her]> Sigh this will be painful if I'm actually gonna try doing good management skills and such |
21:17:07 | FromDiscord | <Chronos [She/Her]> But oh well, I have to learn for the industry |
21:17:16 | FromDiscord | <leorize> just try to have fun |
21:19:06 | FromDiscord | <Chronos [She/Her]> I will not if I plan this out but ultimately I have to lmao |
21:19:19 | FromDiscord | <Chronos [She/Her]> Well |
21:19:22 | FromDiscord | <Chronos [She/Her]> The coding will be fun |
21:19:24 | FromDiscord | <Chronos [She/Her]> And a pain |
21:21:22 | FromDiscord | <Chronos [She/Her]> Planning will be alright too |
21:21:25 | FromDiscord | <Chronos [She/Her]> Research is hell |
21:46:45 | * | PMunch quit (Quit: leaving) |
22:27:09 | * | azimut quit (Ping timeout: 246 seconds) |
22:42:00 | FromDiscord | <taperfade> i always get this and idk what it means https://media.discordapp.net/attachments/371759389889003532/1150199453958025357/image.png |
22:42:18 | FromDiscord | <sOkam! 🫐> In reply to @taperfade "i always get this": it means that you are not clarifying what type you want |
22:42:24 | FromDiscord | <sOkam! 🫐> and your code could result in many |
22:42:25 | FromDiscord | <saint._._.> How do I map like multi level [] operators from c++ to nim? |
22:42:37 | FromDiscord | <saint._._.> like foo['a']['b']['c'] |
22:42:43 | FromDiscord | <saint._._.> If they can be indefinite |
22:43:03 | FromDiscord | <Elegantbeef> It's the same |
22:43:22 | FromDiscord | <taperfade> im so confused |
22:46:37 | FromDiscord | <taperfade> iong+ |
22:46:50 | FromDiscord | <taperfade> im trying to make a file |
22:47:10 | FromDiscord | <taperfade> and instead of making one it tries to add text to an existing one |
22:47:14 | FromDiscord | <taperfade> but it doesnt exist yet |
22:55:27 | * | azimut joined #nim |
22:55:50 | FromDiscord | <saint._._.> @ElegantBeouf is it possible to like "collect" all the [] indexes at once and then pass them off to my c++ function |
22:56:20 | FromDiscord | <saint._._.> so if I do in nim foo[a][b][c][d][e] for me to get a,b,c,d,e |
22:56:26 | FromDiscord | <saint._._.> I'm sure it's possible |
22:57:14 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4FS6 |
22:58:00 | FromDiscord | <saint._._.> Oh so I want it to an indefinite number of arguments |
22:58:12 | FromDiscord | <saint._._.> And also not a list but like a multi dimensional array type access |
22:58:15 | FromDiscord | <Elegantbeef> use `varargs[int]` |
22:58:19 | FromDiscord | <saint._._.> myFoo[0][1][2] |
22:58:33 | FromDiscord | <saint._._.> not myFoo[0,1,2] |
22:58:43 | FromDiscord | <Elegantbeef> I mean the top doesnt make sense |
22:59:04 | FromDiscord | <Elegantbeef> If it's a value `[0]` should grab the first instance, which should be indexable aswell |
22:59:07 | FromDiscord | <saint._._.> It does right? Like if I'm accessing json |
22:59:22 | FromDiscord | <saint._._.> jsonObj['key1']['key2']['key3'] |
22:59:23 | FromDiscord | <Elegantbeef> Define a `[]` and there you go |
22:59:29 | FromDiscord | <Elegantbeef> Look at std/json |
22:59:44 | FromDiscord | <saint._._.> The diff is I don't want one [] to return a type and for that call to be recursive |
22:59:59 | FromDiscord | <saint._._.> As such, I want to collect all the arguments and then pass them as a batch to my c++ |
23:00:03 | FromDiscord | <Elegantbeef> Nim sees `a[b][c][d]` as 3 different procedures |
23:00:10 | FromDiscord | <Elegantbeef> You need to do `a[b, c, d]` |
23:00:15 | FromDiscord | <saint._._.> yeah, is there some way to "collect" that |
23:00:26 | FromDiscord | <Elegantbeef> I said use varargs[int] |
23:00:30 | FromDiscord | <saint._._.> In reply to @Elegantbeef "You need to do": I get the second part and I don't need even to use [] at that point |
23:00:54 | FromDiscord | <saint._._.> I was just wondering if there's a way to do [] [] [] and have it collect it. I could see a way where I make some sort of dummy type that would like store the arg |
23:01:06 | FromDiscord | <saint._._.> I'm guessing it's not super straightforward anyways is what you're saying right |
23:01:16 | FromDiscord | <Elegantbeef> I mean you could make a macro do it but then you have to do `myMacro foo[1][2][3]` |
23:01:20 | FromDiscord | <Elegantbeef> Which defeats the purpose |
23:01:32 | FromDiscord | <saint._._.> How would I make the macro |
23:01:35 | FromDiscord | <saint._._.> The macro might be good |
23:02:03 | FromDiscord | <saint._._.> can I make a macro that would convert foo[1][2][3] to foo[1,2,3] |
23:02:07 | FromDiscord | <saint._._.> Cause that would be perfect |
23:02:18 | FromDiscord | <saint._._.> or foo(1,2,3) rather |
23:02:33 | FromDiscord | <Elegantbeef> Seems pointless but you can yes |
23:02:45 | FromDiscord | <saint._._.> Its just for syntactic sugar |
23:03:50 | FromDiscord | <Elegantbeef> I mean it's' the same as `foo[1, 2, 3]` just worse api |
23:11:11 | FromDiscord | <taperfade> im slowly losing motivation on learning |
23:11:34 | FromDiscord | <taperfade> the errors dont tell me anything |
23:17:49 | FromDiscord | <taperfade> sent a code paste, see https://play.nim-lang.org/#ix=4FSa |
23:19:22 | * | krux02 quit (Remote host closed the connection) |
23:20:22 | FromDiscord | <.e.l.i> how do you format a float to specify accuracy |
23:22:36 | FromDiscord | <.e.l.i> was hoping a format string with $.2f would cut it |
23:22:45 | FromDiscord | <.e.l.i> (edit) "$.2f" => "%.2f" |
23:25:46 | FromDiscord | <Elegantbeef> Depends on how you're formatting |
23:25:49 | FromDiscord | <Elegantbeef> strformat has format string |
23:25:49 | FromDiscord | <.e.l.i> sent a code paste, see https://play.nim-lang.org/#ix=4FSb |
23:25:59 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/strformat.html#formatting-floats |
23:26:53 | FromDiscord | <.e.l.i> oh, it's : not % |
23:27:03 | FromDiscord | <.e.l.i> that's what I was looking for |
23:30:25 | FromDiscord | <taperfade> In reply to @.e.l.i "seems like you are": the string is the file |
23:30:29 | FromDiscord | <taperfade> when i echo cure |
23:30:36 | FromDiscord | <taperfade> it outputs this |
23:30:42 | FromDiscord | <taperfade> C:\Program Files\Hello.txt |
23:31:01 | FromDiscord | <.e.l.i> sent a code paste, see https://play.nim-lang.org/#ix=4FSf |
23:31:05 | FromDiscord | <.e.l.i> it is still a string |
23:32:07 | FromDiscord | <taperfade> how do i make it a file tpye |
23:34:14 | FromDiscord | <.e.l.i> maybe something in std/os? |
23:35:32 | FromDiscord | <.e.l.i> Sorry, I'm not much help. I only just started looking at nim. All I can tell you is you've passed a parameter of the wrong type. |
23:35:58 | FromDiscord | <Elegantbeef> You need to open a file to write to |
23:36:07 | FromDiscord | <Elegantbeef> or use `writeFile` or whatever it is |
23:37:17 | FromDiscord | <.e.l.i> I'd imagine it would be good to defer closing it too |
23:45:18 | FromDiscord | <taperfade> Error: unhandled exception: cannot open: C:\Program Files\Hello.txt [IOError]↵Error: execution of an external program failed: 'c:\Users\morbo\Desktop\Programming\goober\goober.exe' |