<< 09-09-2023 >>

00:03:15*lumo_e quit (Quit: Quit)
00:51:46*jmdaemon joined #nim
01:41:08FromDiscord<raynei486> what's the purpose of the fusion library?
01:41:33FromDiscord<raynei486> libraries not fit for the standard but maintained by the core team?
01:42:45FromDiscord<raynei486> (edit) "what's the purpose of" => "what are" | "library?" => "libraries?"
01:43:44FromDiscord<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:29FromDiscord<taperfade> its so crazy to me how much can be done with a usb stick
02:51:10FromDiscord<taperfade> the amount of documents that can be stored
02:51:17FromDiscord<taperfade> really really important ones
02:51:24FromDiscord<taperfade> in that small device
02:51:37FromDiscord<taperfade> and if u lose it ur stuff is gone lol
02:52:08FromDiscord<taperfade> im a pink hat hacker ( i like the color )
02:52:24FromDiscord<taperfade> jk im not even a hacker
02:52:52FromDiscord<odexine> where are you going with this
02:53:01FromDiscord<taperfade> wdym
02:53:09FromDiscord<taperfade> its a silly joke
02:59:35FromDiscord<odexine> this is a support channel
02:59:45FromDiscord<taperfade> this is main
02:59:56FromDiscord<taperfade> sorry
03:00:13FromDiscord<taperfade> i thought there was a dedicated support channel
03:27:17*rockcavera quit (Remote host closed the connection)
04:53:05termerSup nimmies
04:53:09termerhehe hoohoo
05:07:40FromDiscord<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:38FromDiscord<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:56FromDiscord<Phil> (edit) "on" => "one"
05:09:42FromDiscord<Phil> In reply to @taperfade "i thought there was": I recommend reading the channel descriptions 😛
05:28:41termercan'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:39FromDiscord<Phil> Yes you can, literally looses you the ability to constrain type when they are dependant on each other 😛
05:39:41FromDiscord<Phil> Also looses you the ability to constrain types to a specific set of types that must inherit from a base-type
05:40:31FromDiscord<sirolaf> paru
05:40:42FromDiscord<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:07FromDiscord<sirolaf> Auto type is annoying
05:41:18FromDiscord<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:41FromDiscord<Phil> I find it useful to explicitly state that types don't matter
05:41:52FromDiscord<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:12FromDiscord<sirolaf> Has weird problems like not being allowed to infer void sometimes, not sure if that's fixed
05:43:00FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FMX
05:43:23FromDiscord<Phil> Ah, you mean from a technical perspective while I mean from a semantical perspective
05:44:34FromDiscord<sirolaf> I think it would be nice to have it inject generic parameters instead but that has its own problems
05:44:48FromDiscord<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:59FromDiscord<Phil> (edit) "that" => "not being able to infer void"
05:46:12FromDiscord<sirolaf> Yeah that's fair, but it also breaks apart when you try to use it with generics
05:46:22FromDiscord<sirolaf> There's this weird conflict of what should be evaluated first I think
05:47:17FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FMY
05:48:40FromDiscord<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:01FromDiscord<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:05FromDiscord<sirolaf> Has both merge and namespace as special
05:51:30FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FN5
05:51:36FromDiscord<Phil> (edit)
05:53:25FromDiscord<sirolaf> https://media.discordapp.net/attachments/371759389889003532/1149945639183065139/image.png
05:54:10FromDiscord<sirolaf> That is the problem in your case it seems, some ancient builtin pragma
05:54:39FromDiscord<sirolaf> (edit) "pragma" => "pragma(?)"
05:54:58FromDiscord<Phil> Hmmmmm
05:55:22FromDiscord<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:40FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FN8
05:58:19FromDiscord<Phil> I guess "combine", while not great, is not abhorrent either
05:58:43FromDiscord<Elegantbeef> how is that a merge
05:58:48FromDiscord<Elegantbeef> that's a transfer or map
05:59:08FromDiscord<Phil> No map `proc x(y: A): B`
05:59:14FromDiscord<Phil> (edit) "No map ... `proc" added "is sth like"
05:59:17FromDiscord<Elegantbeef> inplacemap
06:01:14FromDiscord<sirolaf> mapParams
06:01:44FromDiscord<Phil> sent a long message, see http://ix.io/4FNc
06:01:51FromDiscord<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:23FromDiscord<Phil> Then again, inplacemap 1) fits my package name better and 2) the "inplace" is pretty good information and explains well
06:05:01FromDiscord<Phil> But transfer is shorter, oh the hells of naming
06:05:45FromDiscord<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:38FromDiscord<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:10FromDiscord<Elegantbeef> quote do gets around some chaining issues iirc
06:10:30FromDiscord<Elegantbeef> But the year is 2023 just use genast
06:11:06FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FNe
06:11:17FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4FNe" => "https://play.nim-lang.org/#ix=4FNf"
06:11:39FromDiscord<Phil> The pragma/macro takes in the procdef and returns a manipulated procdef, that should replace the old one no?
06:11:53FromDiscord<Phil> It worked that way for literally every other macro in this package
06:12:25FromDiscord<Elegantbeef> typed is after it has been sym'd I believe you need to replace the proc name
06:12:36FromDiscord<Elegantbeef> Don't recall though
06:13:45FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FNi
06:14:20FromDiscord<sirolaf> genast acts pretty weird, can't use that in my case
06:14:21FromDiscord<Phil> Aaaand it works again, the error you get is just super cryptic, wtf
06:15:27FromDiscord<Elegantbeef> genast works the same as quote do
06:15:39FromDiscord<Elegantbeef> Atleast in my experience
06:15:49FromDiscord<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:37FromDiscord<sirolaf> sent a code paste, see https://play.nim-lang.org/#ix=4FNj
06:18:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4FNk
06:18:56FromDiscord<sirolaf> Leads to `Error: cannot evaluate at compile time: importStr`
06:19:46FromDiscord<sirolaf> Nevermind, only says that with the backtick things
06:19:54FromDiscord<Elegantbeef> Ah `genast(importStr = newLit importStr)` if that didnt work
06:20:06FromDiscord<sirolaf> Why is the colon for add needed?
06:20:46FromDiscord<Elegantbeef> Same reason `do` is for `quote` iirc
06:21:24FromDiscord<sirolaf> This is really inconsistent
06:21:31FromDiscord<sirolaf> Doing the same with just quote breaks until you add backticks
06:21:52FromDiscord<sirolaf> Well either way, genAst works the way you say so thanks
06:25:16FromDiscord<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:38FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FNp
06:25:44FromDiscord<Elegantbeef> `default(B)`
06:26:14FromDiscord<odexine> A tuple with 8 fields feels like a code smell
06:26:16FromDiscord<Phil> Phew that saved my bacon
06:26:26FromDiscord<Elegantbeef> It is a code smell
06:26:31FromDiscord<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:43FromDiscord<odexine> If it’s for a test sure okay
06:28:09FromDiscord<Phil> If that were actual code I'd fully agree, but I'm just unit-testing my new "inplaceMap" pragma
07:19:02FromDiscord<sOkam! 🫐> @ElegantBeouf how is atlas so far?
07:19:29FromDiscord<sOkam! 🫐> im sick of not being able to `nimble develop`, its wasting me so much time↵do you think its worth switching?
07:21:45FromDiscord<Elegantbeef> I havent used atlas myself
07:22:24FromDiscord<sirolaf> I like atlas
07:24:33FromDiscord<sirolaf> It had some issues with package locations for a bit but that all seems fixed now
07:25:57FromDiscord<sOkam! 🫐> @sirolaf how do you handle dependencies yourself? do you just duplicate them?
07:26:09FromDiscord<sirolaf> I make a new workspace for every project, so yeah lots of duplicates
07:26:28FromDiscord<sOkam! 🫐> where do you store them per project?
07:26:36FromDiscord<sOkam! 🫐> can it do a subfolder or something?
07:26:57FromDiscord<sirolaf> You can do `atlas init --deps:depdir` to put dependencies into `depdir`
07:27:10FromDiscord<sOkam! 🫐> oh thats sick
07:27:24FromDiscord<sOkam! 🫐> is that depdir arbitrary? like can it take an absolute path?
07:27:41FromDiscord<sOkam! 🫐> that would solve the duplicate issue
07:27:52FromDiscord<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:09FromDiscord<sOkam! 🫐> wdym by other stuff?
07:28:51FromDiscord<sirolaf> Altas can also manage the nim compiler as a dependency
07:29:12FromDiscord<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:15FromDiscord<sOkam! 🫐> as in you download atlas manually and it installs nim?
07:29:35FromDiscord<sirolaf> <https://github.com/nim-lang/atlas#installing-nim-with-atlas> best just check here
07:29:39FromDiscord<sirolaf> Like a python venv I guess
07:30:07FromDiscord<sirolaf> (edit) "guess" => "guess, tried it and it was cool, but didn't need it"
07:30:10FromDiscord<sOkam! 🫐> thats pretty epic
07:30:15FromDiscord<Elegantbeef> Bold of you to assume people have experience with python venvs
07:30:24FromDiscord<sOkam! 🫐> thats something similar to what i do with confy for zig
07:30:42FromDiscord<sOkam! 🫐> although I rely on non-local as priority, but been searching for a way to do it easier
07:31:00FromDiscord<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:09FromDiscord<sirolaf> Would just give it a try, haven't used nimble since atlas became usable
07:31:44FromDiscord<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:09FromDiscord<sOkam! 🫐> i like the tool, it just has become unreliable since nimble develop is gone
07:33:32FromDiscord<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:10FromDiscord<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:40FromDiscord<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:52FromDiscord<sOkam! 🫐> its not compatible though
07:35:07FromDiscord<sOkam! 🫐> it adds things to the nimble file that nimble doesn't understand
07:35:23FromDiscord<odexine> nimble develop is still implemented, its just behind a strange flag that i dont recall
07:35:37FromDiscord<sOkam! 🫐> (or rather, it -can- add them, not all of them are incompatible)
07:35:59FromDiscord<sirolaf> Might have to do with version resolution then, haven't had any issues myself
07:36:09FromDiscord<sOkam! 🫐> In reply to @odexine "nimble develop is still": you mean a `-d:` flag when compiling nimble?
07:36:16FromDiscord<odexine> nimble develop -g it seems
07:36:27FromDiscord<odexine> similar to old nimble develop but iirc not exact
07:36:31FromDiscord<Elegantbeef> Atlas doesnt add anything to nimble that is incompatible
07:36:37FromDiscord<sOkam! 🫐> nimble develop doesn't take any parameters in current, it crashes
07:36:41FromDiscord<Elegantbeef> Yea it also doesnt work 😄
07:36:43FromDiscord<sOkam! 🫐> it has no parameters
07:37:03FromDiscord<Elegantbeef> nimble 0.14 does allow `nimble develop -g`
07:37:11FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "Atlas doesnt add anything": it does, though. `file::/path/to/file` is incompatible
07:37:14FromDiscord<sOkam! 🫐> and its one of the things it adds
07:37:54FromDiscord<odexine> "incompatible" meaning what exactly
07:38:53FromDiscord<sOkam! 🫐> incompatible as in nimble does not work after that
07:39:01FromDiscord<sOkam! 🫐> because it does not understand that syntax
07:39:27FromDiscord<sOkam! 🫐> i would paste the error, but i literally removed the test folder after seeing that
07:39:29FromDiscord<Phil> I mean, to have package local deps with nimble you can also just add a nimbledeps dir
07:39:44FromDiscord<sOkam! 🫐> whats that?
07:40:15FromDiscord<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:21FromDiscord<Phil> just a dir with that name
07:40:46FromDiscord<sOkam! 🫐> err... sure
07:40:58FromDiscord<sOkam! 🫐> but that literally erases all of the others, if it "ignores" the root dit
07:40:59FromDiscord<sOkam! 🫐> (edit) "dit" => "dir"
07:41:26FromDiscord<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:35FromDiscord<sirolaf> Global dependencies stink anyways
07:41:41FromDiscord<Phil> symlink your package into that one and I think it should work
07:41:51FromDiscord<Phil> (edit) "one" => "nimbledeps dir"
07:42:09FromDiscord<sOkam! 🫐> dont follow what you meant phil
07:42:17FromDiscord<Phil> Okay, you on linux?
07:42:26FromDiscord<sOkam! 🫐> In reply to @sirolaf "Global dependencies stink anyways": yeah thought so too. but one of my deps becomes 2GB on compilation
07:42:33FromDiscord<odexine> why?
07:42:43FromDiscord<sOkam! 🫐> wgpu 🤷‍♂️
07:42:48FromDiscord<odexine> as in the dependency folder changes in size?
07:42:50FromDiscord<sOkam! 🫐> i dont know why, it just does
07:43:04FromDiscord<sOkam! 🫐> when you build wgpu, the compiled contents are 2GB in size
07:43:22FromDiscord<sirolaf> Guess that's just the rust experience
07:43:34FromDiscord<sOkam! 🫐> 🤷‍♂️ no clue honestly
07:43:51FromDiscord<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:56FromDiscord<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:31FromDiscord<sOkam! 🫐> it could possibly work
07:45:47FromDiscord<sOkam! 🫐> but... im adding `-path:/path/to/folder` in nim.cfg... and the problem is in the dependencies
07:46:02FromDiscord<sOkam! 🫐> which means that i would need to do that for every single dependency, not just the root one
07:46:18FromDiscord<sOkam! 🫐> its failing to find a symbol that's inside one of the dependencies
07:48:01FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FNH
07:48:25FromDiscord<arathanis> i got you @sOkam! 🫐
07:48:26FromDiscord<sOkam! 🫐> (edit) "https://play.nim-lang.org/#ix=4FNH" => "https://play.nim-lang.org/#ix=4FNI"
07:48:30FromDiscord<arathanis> let me find it
07:49:12FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4FNJ
07:49:22FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4FNK
07:50:07FromDiscord<arathanis> (edit) "https://play.nim-lang.org/#ix=4FNK" => "https://paste.rs/AxCak"
07:50:08FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FNN
07:50:10FromDiscord<sOkam! 🫐> good idea though
07:50:28FromDiscord<arathanis> (edit) "https://play.nim-lang.org/#ix=4FNQ" => "https://play.nim-lang.org/#ix=4FNP"
07:50:47FromDiscord<arathanis> yes
07:50:47FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FNR
07:50:57FromDiscord<arathanis> i use this all the time to handle the exact thing you were describing
07:51:17FromDiscord<arathanis> automatically adding local nimbledeps to the compiler's path
07:51:22FromDiscord<sOkam! 🫐> so you don't need to nimble develop with this, right?
07:51:25FromDiscord<arathanis> i dont
07:51:34FromDiscord<arathanis> it just adds any folders in the local deps to the path automatically
07:51:41FromDiscord<sOkam! 🫐> its kinda ugly, but i guess thats a solution for a while
07:51:55FromDiscord<arathanis> config.nims is exactly for this kind of thing haha
07:51:59FromDiscord<arathanis> whats ugly about it?
07:52:10FromDiscord<sOkam! 🫐> that nimble should have the damn support for it 🤷‍♂️
07:52:13FromDiscord<sOkam! 🫐> like it did before
07:52:42FromDiscord<sOkam! 🫐> i relied on it, and created my packages like that... and now im having to hack around to navigate the problem
07:52:48FromDiscord<arathanis> :/
07:52:53FromDiscord<arathanis> that would be frustrating
07:53:00FromDiscord<arathanis> i never experienced nimble when it did this automatically
07:53:06FromDiscord<arathanis> i was mostly just confused why it didn't
07:53:10FromDiscord<sOkam! 🫐> thats a great idea, though. definitely solves it in a very easy way
07:53:13FromDiscord<arathanis> so i hacked this together
07:53:22FromDiscord<sOkam! 🫐> yeah i imagine
07:54:24FromDiscord<sOkam! 🫐> actually... this is much easier to deactivate temporarily for testing before release than manually disabling nimble develop in every package
07:54:36FromDiscord<sOkam! 🫐> so... forget what i said, i love it. not ugly, best idea ever 🙂
07:55:02FromDiscord<sOkam! 🫐> great thinking @arathanis
07:55:06FromDiscord<arathanis> thanks!
07:55:39FromDiscord<arathanis> glad i could help
07:56:05FromDiscord<sOkam! 🫐> what does `const rootDir = currentSourcePath().parentDir()` resolve to from the config.nims file?
07:57:24FromDiscord<arathanis> In reply to @heysokam "what does `const rootDir": the directory the `config.nims` file is in
07:57:36FromDiscord<sOkam! 🫐> so it reads from the file being compiled like usual? kk
07:57:42FromDiscord<arathanis> yes
07:57:44FromDiscord<sOkam! 🫐> tyty
07:57:47FromDiscord<arathanis> npnp
07:58:35*mal`` quit (Server closed connection)
07:58:58FromDiscord<sOkam! 🫐> what happens if the local package contains `src/packagename.nim` as its structure?
07:59:07FromDiscord<sOkam! 🫐> does it resolve it like normal?
07:59:59FromDiscord<arathanis> not sure. I never see any packages with that structure
08:00:10FromDiscord<arathanis> i imagine no
08:00:25FromDiscord<arathanis> but it would not be hard to bake in some logic that handled that case
08:00:38*mal`` joined #nim
08:01:33FromDiscord<sOkam! 🫐> i guess i can just `switch("path", path/"src")` instead 🤷‍♂️
08:01:45FromDiscord<arathanis> yeah, or if you want to handle both cases
08:01:55FromDiscord<arathanis> make a function that checks
08:03:56FromDiscord<sOkam! 🫐> i think this still does not solve the issue though
08:04:12FromDiscord<sOkam! 🫐> the problem is the inner package is the one ruling the dependency resolution
08:04:32FromDiscord<sOkam! 🫐> its listing all of the paths correctly, and they all exist... but the dependencies are still not resolved
08:05:01FromDiscord<sOkam! 🫐> if I go into that problematic package, and compile something with nimble, it finds the symbol without issues
08:05:16FromDiscord<sOkam! 🫐> but from the root that depends on that package the dependency is lost, because its local
08:05:51FromDiscord<sOkam! 🫐> so I would need to do this for all packages, and maintain it 😔
08:06:50FromDiscord<arathanis> hmm
08:07:00FromDiscord<arathanis> im not quite sure i fully understand the structure you are working with
08:07:22FromDiscord<sirolaf> Could just use those nim skills to make a tool that handles this case for you 😼
08:07:25FromDiscord<sOkam! 🫐> `package1 -> dependency1 -> problematicDep`
08:08:23FromDiscord<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:57FromDiscord<sOkam! 🫐> so it cannot find it... because for all nimble knows from package1, problematicDep is not installed
08:09:48FromDiscord<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:28FromDiscord<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:00FromDiscord<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:03FromDiscord<arathanis> im still trying to fully understand the situatio but also thinking
08:14:07FromDiscord<arathanis> i also got distracted for a moment
08:17:03FromDiscord<Phil> Beef, you still there?
08:20:59FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FO3
08:34:27FromDiscord<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:55FromDiscord<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:28FromDiscord<Phil> It is why I have a "getAllNodesOfKind" proc
08:38:29FromDiscord<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:17FromDiscord<sirolaf> Wouldn't bother, compiler isn't good at this either
08:41:15FromDiscord<Phil> But I wanna guarantee correctness 😦
08:41:24FromDiscord<Phil> Oh well
08:42:22FromDiscord<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:58FromDiscord<Phil> On the one hand as a compiler dev I bet, on the other as a User blocks are great
08:43:56FromDiscord<sirolaf> Yeah just gets a bit messy with control flow and named blocks
08:44:04FromDiscord<sirolaf> Trying to do this in a macro would be an adventure
08:45:18FromDiscord<sirolaf> Much easier would be only allowing instantiation using a constructor
08:45:50FromDiscord<sirolaf> (edit) "instantiation" => ""instantiation""
08:49:43FromDiscord<Phil> Oh absolutely the thing is this is kind of generating a constructor for you
08:51:05FromDiscord<Phil> sent a code paste, see https://paste.rs/UNgeJ
08:52:36FromDiscord<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:12FromDiscord<Phil> Which I have, but it is trickable as shown earlier by if-statements etc.
08:53:20FromDiscord<sirolaf> That is just a less safe version of having a constructor and a mapping proc though
08:53:47FromDiscord<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:28FromDiscord<Phil> Well, not "a lot", a fair amount
08:54:49FromDiscord<taperfade> guyx
08:54:50FromDiscord<taperfade> guys
08:55:12FromDiscord<taperfade> how do make files execute on start
08:55:57FromDiscord<odexine> “Start” of what
08:56:04FromDiscord<taperfade> and how do i make other exe files and copy them into different folders
08:56:20FromDiscord<frobnicate> In reply to @odexine "“Start” of what": On startup I'm guessing
08:56:35FromDiscord<odexine> Probably with a lot of pain via the windows API
08:56:46FromDiscord<odexine> which will get you caught by antivirus anyway
08:57:07FromDiscord<sirolaf> sent a code paste, see https://play.nim-lang.org/#ix=4FOb
08:57:09FromDiscord<sirolaf> I think the safety of relying on init is worth it
08:58:03FromDiscord<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:00FromDiscord<sirolaf> (edit) "https://play.nim-lang.org/#ix=4FOb" => "https://play.nim-lang.org/#ix=4FOd"
08:59:19FromDiscord<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:24FromDiscord<taperfade> In reply to @odexine "which will get you": dang
08:59:32FromDiscord<Phil> Is initFrom supposed to transfer values? Because when I execute it, it doesn't
08:59:50FromDiscord<sirolaf> Well yeah the init procs aren't implemented 😛
08:59:51FromDiscord<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:37FromDiscord<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:32FromDiscord<sirolaf> What languages have this?
09:04:13FromDiscord<Phil> JVM langs have mapstruct and the concept of Object mappers generally↵Python has object mapper packages as well↵JS AutoMapper
09:04:35FromDiscord<sirolaf> This mapstruct thing from jvm doesn't let you do any customization from what I can tell
09:05:02FromDiscord<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:24FromDiscord<sirolaf> That is only for field names is it not
09:05:46FromDiscord<sirolaf> Was talking more about custom function body
09:06:00FromDiscord<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:44FromDiscord<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:08FromDiscord<sirolaf> What if you attached a pragma to the field instead
09:07:12FromDiscord<Phil> When you can make your life far easier by just having a normal proc
09:07:24FromDiscord<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:57FromDiscord<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:38FromDiscord<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:16FromDiscord<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:19FromDiscord<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:35FromDiscord<Phil> In reply to @taperfade "dang": Not writing malware would be really appreciated
09:12:23FromDiscord<vindaar> @Phil\: did you see my link above?
09:12:55FromDiscord<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:20FromDiscord<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:23FromDiscord<sirolaf> sent a code paste, see https://play.nim-lang.org/#ix=4FOi
09:14:23FromDiscord<sirolaf> Like this
09:15:57FromDiscord<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:08FromDiscord<Phil> (edit) "wording" => "syntax"
09:16:32FromDiscord<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:58FromDiscord<Phil> Ohhh you meant where you got the "attach pragma to field" thing from
09:17:15FromDiscord<sirolaf> The "make proc body enforce a structure" idea
09:17:59FromDiscord<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:45FromDiscord<Phil> Hmmm
09:19:19FromDiscord<sirolaf> Would probably be somewhat easy to implement as a macro too because compiler does the annoying job of checking expressions
09:19:24FromDiscord<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:40FromDiscord<odexine> that's just how it is isnt it
09:19:56FromDiscord<Phil> Might be worth it as an additional feature that you can either have "strict" validation or "lax" validation
09:20:31FromDiscord<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:49FromDiscord<Phil> Which should be pretty easy to validate
09:20:51FromDiscord<sirolaf> Yeah can do that too obviously
09:21:22FromDiscord<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:11FromDiscord<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:33FromDiscord<sirolaf> sent a code paste, see https://play.nim-lang.org/#ix=4FOl
09:22:34FromDiscord<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:03FromDiscord<Phil> I can't map the words "enforce a structure on the body" to computation operations in my head
09:23:13FromDiscord<Phil> (edit) "I can't map the words "enforce a structure on the body" to computation operations ... in" added "or basically code"
09:24:04FromDiscord<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:16FromDiscord<odexine> oh ct? okay
09:24:31FromDiscord<sirolaf> I assumed it should be ct, no idea
09:24:38FromDiscord<Phil> It is supposed to be ct
09:24:57FromDiscord<Phil> ~~This is not python, we got big boy toys here~~
09:25:05FromDiscord<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:36FromDiscord<odexine> personally i'd prolly opt for "disallow result/return kw, expression return only"
09:26:54FromDiscord<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:01FromDiscord<odexine> then again i guess object constrs dont need all fields to be specified
09:27:17FromDiscord<Phil> They don't, this is an optional feature
09:27:24FromDiscord<odexine> what reason do you need all fields to be specified again? is this to prevent bugs?
09:27:58FromDiscord<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:20FromDiscord<Phil> It's also why this is an optional feature
09:28:41FromDiscord<sirolaf> Might also make sense to enforce `{.raises: [].}`
09:30:00FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4FOn
09:30:03FromDiscord<odexine> and validate it too ig
09:30:16FromDiscord<sirolaf> Yeah same thing different angle
09:30:23FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FOo
09:30:33FromDiscord<odexine> it's simpler to me because now it can just translate direct to an expr return
09:30:56FromDiscord<odexine> but ig the field interdependency issue is still there
09:31:15FromDiscord<odexine> can be bypassed by making a let someval = ... then in assign you use that value on both fields
09:31:19FromDiscord<odexine> or similar translations
09:31:29FromDiscord<odexine> i guess that translation can even be built into `assign`
09:36:21FromDiscord<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:40FromDiscord<taperfade> In reply to @isofruit "Not writing malware would": Dw
09:37:12*xet7 quit (Remote host closed the connection)
09:39:00FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FOr
09:39:23FromDiscord<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:23FromDiscord<sirolaf> Yeah and then you might even go crazy and use a constructor instead
09:39:37FromDiscord<taperfade> OwO:UwU
09:40:01FromDiscord<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:11FromDiscord<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:24FromDiscord<sirolaf> If it's exceptional why not write the constructor once
09:41:21FromDiscord<sirolaf> Nim users and their fancy macros just can't resist solving problems that don't exist 😛
09:41:22FromDiscord<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:46FromDiscord<Phil> More like I saw mapstruct, I liked it and then wanted something that saves me from messing up 😛
09:42:34FromDiscord<sirolaf> Nothing stopping you from checking that all fields appear in `MyType()`
09:42:52FromDiscord<Phil> Yeah but that's boring effort again
09:43:17FromDiscord<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:46FromDiscord<sirolaf> Generate the constructor proc then
09:44:41FromDiscord<Phil> You can yourself by just using `proc init(x: A): B {.map.}` etc. 😛
09:45:02FromDiscord<odexine> Why again are you not generating constructors
09:45:10FromDiscord<odexine> You already have a package to do it no?
09:45:26FromDiscord<odexine> Do you not have beef’s library repertoire in memory at all times?
09:45:37FromDiscord<Phil> Nope, there's constructor to generate constructors with static values
09:45:54FromDiscord<Phil> And I don't think even that does any sort of compiletime validation
09:46:15FromDiscord<odexine> Technically it does, if a parameter isn’t supplied then there’s your error
09:46:21FromDiscord<sirolaf> Whatever you end up doing, be prepared to get screwed by generics
09:46:23FromDiscord<odexine> I don’t understand the problem
09:47:46FromDiscord<sirolaf> <https://github.com/nim-lang/Nim/pull/22432> Beef had this pr, just so we're on same page with generics
09:47:54FromDiscord<sirolaf> You will probably have trouble getting the fields
09:48:05FromDiscord<taperfade> guys how do i get the currrent user
09:48:08FromDiscord<taperfade> like
09:48:35FromDiscord<taperfade> C:\Users\THIS\
09:48:40FromDiscord<taperfade> how do i get THIS
09:52:21FromDiscord<sirolaf> You really gotta learn to use a search engine
09:52:29FromDiscord<taperfade> i dont find anything
09:52:47FromDiscord<sirolaf> `winapi <your problem>`
09:52:56FromDiscord<taperfade> what
09:52:58FromDiscord<taperfade> ?
09:53:11FromDiscord<sirolaf> <https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getusernamea> leads us here
09:54:42FromDiscord<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:07FromDiscord<odexine> https://www.google.com/search?q=nim+current+username
09:56:09FromDiscord<odexine> x d
09:56:49FromDiscord<sirolaf> Wild
09:57:05FromDiscord<sirolaf> First lying about not writing malware and then lying about googling 😛
10:54:28FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FOK
10:57:19FromDiscord<odexine> Ignore it because `export` exported both the correct and the deprecated proc, because of overloading
10:57:32FromDiscord<Phil> Alrighty
11:22:50FromDiscord<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:37FromDiscord<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:00FromDiscord<kingterrytheterrible12> In reply to @pmunch "Did anyone of you": What is the orange site
11:28:08FromDiscord<kingterrytheterrible12> HN?
11:29:05FromDiscord<kingterrytheterrible12> And also does nim have dynamic dispatch
11:29:29FromDiscord<kots> https://nim-lang.github.io/Nim/manual.html#methods
11:34:16FromDiscord<kingterrytheterrible12> In reply to @k0ts "https://nim-lang.github.io/Nim/manual.html#methods": Is it implemented as vtable?
11:35:18FromDiscord<taperfade> no way
11:35:19FromDiscord<taperfade> guys
11:35:29PMunch@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:45FromDiscord<taperfade> that code
11:35:47FromDiscord<taperfade> sent a code paste, see https://play.nim-lang.org/#ix=4FOU
11:35:49FromDiscord<taperfade> triggered norton
11:35:58FromDiscord<kingterrytheterrible12> In reply to @PMunch "<@655759729477287956>, yes HN. They": Can you link your article?
11:36:04FromDiscord<taperfade> 😭
11:36:40PMunch@kingterrytheterrible12, https://peterme.net/teaching-old-c-code-new-tricks-with-nim.html
11:36:48PMunchIt's a pretty low-level technical thing :P
11:37:00PMunch@taperfade, your malware got detected by a malware scanner?
11:37:24FromDiscord<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:29FromDiscord<taperfade> its not even malicious
11:37:49PMunch@taperfade, I didn't read your snippet, just assumed from yesterdays convo
11:37:52FromDiscord<taperfade> it gets the username and checks if C:\Program Files exists
11:38:01FromDiscord<Phil> At this point accusing sz of malware is starting to become a meme 😄
11:38:13PMunch@kingterrytheterrible12, oh cool, maybe that's why it has gotten so man views, I've started showing up in searches more
11:38:37FromDiscord<Phil> In reply to @PMunch "<@655759729477287956>, oh cool, maybe": You hit the SEO goldmine it seems
11:38:41FromDiscord<Phil> Time to optimize titles
11:38:51FromDiscord<kingterrytheterrible12> Make bait articles
11:39:11FromDiscord<kingterrytheterrible12> "Why rust doesn't deliver on its promises"
11:39:23FromDiscord<kingterrytheterrible12> Add ads and bait theprimegen lol
11:39:54FromDiscord<odexine> In reply to @kingterrytheterrible12 ""Why rust doesn't deliver": "is this really bait tho"
11:40:49FromDiscord<kingterrytheterrible12> Or "is nim as fast as C? Lets find out"
11:44:37PMunchI 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:44FromDiscord<taperfade> how do i make a folder like thing
11:44:50FromDiscord<taperfade> like
11:45:00FromDiscord<taperfade> so i can go
11:45:17FromDiscord<kingterrytheterrible12> Go?
11:45:20FromDiscord<taperfade> echo fileOne.data
11:45:21FromDiscord<kingterrytheterrible12> This is nim
11:45:28FromDiscord<taperfade> instead of echo data
11:45:28FromDiscord<taperfade> yk
11:48:03FromDiscord<kingterrytheterrible12> In reply to @PMunch "I did have an": Ok now make the C version use AVX
11:48:05FromDiscord<kingterrytheterrible12> xd
11:48:35PMunch@taperfade, an object?
11:48:48FromDiscord<taperfade> basically
11:48:49FromDiscord<taperfade> yeah
11:48:54PMunch@kingterrytheterrible12, I mean Nim could also use AVX :P
11:49:04FromDiscord<kingterrytheterrible12> It can
11:49:05FromDiscord<kingterrytheterrible12> Damn
11:49:17PMunchOf course, it compiles to C, it can do anything C can
11:49:29PMunchI mean you can even emit assembly instructions directly from Nim
11:50:13FromDiscord<Phil> Ah yes, github workflow pipelines and the myriad of ways they can screw you
11:50:32FromDiscord<taperfade> how do i make a file
11:51:21FromDiscord<kingterrytheterrible12> I wonder how bad compile times are for nim in large projects
11:51:30FromDiscord<kingterrytheterrible12> Like the status desktop
11:51:36FromDiscord<taperfade> cool
11:51:55FromDiscord<taperfade> how do i make a file
11:52:02FromDiscord<kingterrytheterrible12> Bro google it
11:52:15FromDiscord<taperfade> In reply to @kingterrytheterrible12 "Bro google it": its more fun asking u guys
11:52:58FromDiscord<taperfade> :areyousrs: https://media.discordapp.net/attachments/371759389889003532/1150036120009191605/image.png
11:53:24FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FOY
11:54:35FromDiscord<taperfade> im actually going insane
11:54:40FromDiscord<taperfade> all the results are so ass
11:54:50FromDiscord<taperfade> i genuinely cant find any answer
11:54:56FromDiscord<taperfade> how do i make a file
11:56:04FromDiscord<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:18FromDiscord<taperfade> https://media.discordapp.net/attachments/371759389889003532/1150036958207287326/image.png
11:56:24FromDiscord<taperfade> https://media.discordapp.net/attachments/371759389889003532/1150036982571999274/image.png
11:56:34FromDiscord<taperfade> https://media.discordapp.net/attachments/371759389889003532/1150037024103989278/image.png
11:56:38FromDiscord<taperfade> https://media.discordapp.net/attachments/371759389889003532/1150037040285622272/image.png
11:56:44FromDiscord<taperfade> https://media.discordapp.net/attachments/371759389889003532/1150037066936225912/image.png
11:56:56FromDiscord<Phil> Is that supposed to tell me something?
11:57:00FromDiscord<taperfade> yes
11:57:15FromDiscord<Phil> That you're unwilling to read through what is available under those links :-P?↵#
11:57:15FromDiscord<taperfade> googl isnt helping
11:57:18FromDiscord<Phil> (edit) ":-P?↵#" => ":-P?"
11:57:27FromDiscord<taperfade> i read alot
11:58:03FromDiscord<taperfade> no find answer
11:58:09FromDiscord<Phil> Have you considered reformulating your question :-P?
11:58:15FromDiscord<Phil> (edit) "Have you considered reformulating your question ... :-P?" added "to google"
11:58:25FromDiscord<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:53FromDiscord<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:08FromDiscord<spotlightkid> I would do the same.
11:59:20FromDiscord<taperfade> phil i wish i could be angry rn but i dont wna get mad
12:00:04FromDiscord<taperfade> (edit) "mad" => "banned"
12:00:11FromDiscord<kingterrytheterrible12> Bro
12:00:22FromDiscord<kingterrytheterrible12> You think we can help you with every basic question you get
12:00:25FromDiscord<spotlightkid> you should really try to leave emotions out of the picture as much as possible, when programming.
12:00:30FromDiscord<kingterrytheterrible12> What if you have a large project
12:00:30FromDiscord<taperfade> In reply to @kingterrytheterrible12 "You think we can": yes
12:00:36FromDiscord<kingterrytheterrible12> You should learn to read
12:00:40FromDiscord<taperfade> wait i found the word
12:00:41FromDiscord<Phil> In reply to @kingterrytheterrible12 "What if you have": Chiiiilll
12:00:47FromDiscord<taperfade> phil ur cocky
12:00:54FromDiscord<Phil> They're starting out, it's just guiding them to the right bits
12:00:59FromDiscord<kingterrytheterrible12> Bet
12:01:04FromDiscord<kingterrytheterrible12> @taperfade RTFM
12:01:06FromDiscord<taperfade> there are no fucking bits
12:01:21FromDiscord<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:29FromDiscord<Phil> Wording is important for google
12:01:35FromDiscord<taperfade> i want to make one
12:01:38FromDiscord<taperfade> not write
12:01:39FromDiscord<taperfade> dumdum
12:01:42FromDiscord<Phil> That is exactly the same
12:01:47FromDiscord<taperfade> nuh uh
12:01:56FromDiscord<taperfade> to make something
12:02:06FromDiscord<taperfade> and to write something is completely different
12:02:06FromDiscord<kingterrytheterrible12> https://glenngillen.com/learning-nim/write-file/
12:02:10FromDiscord<taperfade> u dont write a fuckign cube
12:02:42FromDiscord<Phil> It's general programming terminology, just for reference 😛
12:03:16FromDiscord<taperfade> In reply to @isofruit "It's general programming terminology,":
12:03:22FromDiscord<taperfade> thats what i think
12:03:28FromDiscord<taperfade> muahahaha
12:03:34FromDiscord<Phil> I'll regard that as the first trigger for an explicit warning.
12:03:49FromDiscord<taperfade> u rlly dont like me
12:03:56FromDiscord<kingterrytheterrible12> Dude phil is chill
12:03:57FromDiscord<taperfade>
12:04:01FromDiscord<taperfade> no
12:04:04FromDiscord<kingterrytheterrible12> Yes
12:04:05FromDiscord<taperfade> im a phil hater
12:04:13FromDiscord<taperfade> praying for their downfall
12:04:26FromDiscord<taperfade> :Mikusad:
12:05:10FromDiscord<taperfade> ok so how do i make a file in a other folder
12:05:28FromDiscord<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:10FromDiscord<kingterrytheterrible12> They gotta learn to read
12:07:13FromDiscord<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:18FromDiscord<kingterrytheterrible12> These young people dont wanna read
12:07:31FromDiscord<Phil> In reply to @kingterrytheterrible12 "These young people dont": Pulling out your grey beard aren'tcha?
12:07:37FromDiscord<kingterrytheterrible12> In reply to @isofruit "Pulling out your grey": lmao
12:07:54FromDiscord<taperfade> when the newbie asks for help in the channel made for people to discuss nim and get help 🤬 😡
12:07:55FromDiscord<jviega> Wonder who the greyest beard is here. I always assume it's me
12:08:16FromDiscord<kingterrytheterrible12> In reply to @jviega "Wonder who the greyest": Isnt it gumbercules?
12:08:20FromDiscord<taperfade> In reply to @kingterrytheterrible12 "These young people dont": you
12:08:26FromDiscord<Phil> Nah, jtv beats him by a couple decades afaik
12:08:35FromDiscord<kingterrytheterrible12> Couple of decades
12:08:41FromDiscord<kingterrytheterrible12> I only lived 2 decades
12:08:43FromDiscord<taperfade> you told me you could make me a star on "the hub" even tho im a minor
12:08:59FromDiscord<kingterrytheterrible12> In reply to @taperfade "you told me you": Ye bro on github
12:09:02FromDiscord<kingterrytheterrible12> You gonna be a star
12:09:15FromDiscord<taperfade> whatever weirdo
12:09:19FromDiscord<odexine> Oh boy what happened in 100 messages
12:09:20FromDiscord<odexine> Let me back read
12:09:26FromDiscord<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:29FromDiscord<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:34FromDiscord<Phil> (edit) "ask" => "ask/chat"
12:09:50FromDiscord<kingterrytheterrible12> Yes asking on discord should be a last resort
12:10:10FromDiscord<jviega> It's not respectful of people's time, otherwise.
12:10:17FromDiscord<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:37FromDiscord<taperfade> In reply to @kingterrytheterrible12 "Yes asking on discord": yeah you make the rules man
12:11:45FromDiscord<kingterrytheterrible12> Im just saying the rules
12:12:11FromDiscord<kingterrytheterrible12> I sense a moderation tactic is coming
12:12:44FromDiscord<odexine> :peace:
12:13:05FromDiscord<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:11FromDiscord<Phil> (edit) "brings" => "bring"
12:13:25FromDiscord<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:47FromDiscord<taperfade> whatever
12:15:02FromDiscord<odexine> I agree that making and writing are kinda different
12:15:07FromDiscord<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:12FromDiscord<odexine> But you could have said create instead
12:15:23FromDiscord<odexine> “Nim create file” would have given you a good result
12:15:23FromDiscord<taperfade> well
12:15:39FromDiscord<taperfade> wie erstelle ich eine datei ??
12:15:44FromDiscord<jviega> Or do what all the kids are doing, ask ChatGPT and let it make up an answer for you
12:15:45FromDiscord<taperfade> better =
12:16:03FromDiscord<Phil> That doesn't really help you, I am german as well, the answer remains the same.
12:16:17FromDiscord<taperfade> In reply to @isofruit "That doesn't really help": ok
12:16:34FromDiscord<taperfade> vllt bist du jz in der lage mir zu helfen
12:16:36FromDiscord<Phil> The procs that you'll find for writing a file are the ones you'd want to use
12:17:01FromDiscord<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:05FromDiscord<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:21FromDiscord<odexine> Then again it’s mostly never there over text lol
12:17:26FromDiscord<Phil> In reply to @odexine "NGL you don’t strike": Do I not talk about football and cars enough?
12:17:27FromDiscord<taperfade> wie tue ich eine datei in windows mit der programmiersprache nim die in 2008 erstellt wurde von Andreas Rumpf
12:17:32FromDiscord<odexine> In reply to @isofruit "Do I not talk": Nope
12:17:36FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4FP1
12:17:38FromDiscord<taperfade> willst du es vllt noch genauer
12:17:46FromDiscord<odexine> Don’t recall you uttering a single word about either
12:17:51FromDiscord<taperfade> sent a code paste, see https://play.nim-lang.org/#ix=4FP2
12:17:52FromDiscord<taperfade> that was so fucking hard
12:17:56FromDiscord<Phil> In reply to @taperfade "and that was so": Yes because you should search for that yourself
12:17:56FromDiscord<kingterrytheterrible12> In reply to @taperfade "and that was so": It was to make you learn
12:18:09FromDiscord<taperfade> In reply to @isofruit "Yes because you should": whatever you say
12:18:18FromDiscord<kingterrytheterrible12> Because if you dont learn we gonna write a whole project for you
12:18:23FromDiscord<jviega> They're saying it's a question my 8 year old son wouldn't have gotten stuck on
12:18:26FromDiscord<taperfade> amazing
12:18:32FromDiscord<jviega> And they're not wrong
12:19:27FromDiscord<odexine> NGL if I were an 8 year old and learning Nim I’d prolly get stuck on it for a moment
12:19:27FromDiscord<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:29FromDiscord<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:33FromDiscord<jviega> LOL
12:19:53*xet7 joined #nim
12:19:56FromDiscord<taperfade> In reply to @chronos.vitaqua "I'm young and read": how young
12:19:59FromDiscord<Phil> You guys just wait until I get my glasses and can actually read what ya'll are typing!
12:20:06FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "I'm young and read": an exception
12:20:06FromDiscord<taperfade> ur probably a great grandpa
12:20:17FromDiscord<odexine> In reply to @isofruit "You guys just wait": Skill issue
12:20:22FromDiscord<odexine> Imagine still having eyes
12:20:22FromDiscord<kingterrytheterrible12> In reply to @isofruit "You guys just wait": Dont break a hip old man
12:20:47FromDiscord<kingterrytheterrible12> Back in my days i used to program games in assembly
12:20:53FromDiscord<kingterrytheterrible12> And you youngest cant open a file
12:20:59FromDiscord<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:59FromDiscord<kingterrytheterrible12> (edit) "youngest" => "youngesters"
12:21:18FromDiscord<Chronos [She/Her]> In reply to @taperfade "how young": 18 lol
12:21:32FromDiscord<odexine> It’s good to be young
12:21:39FromDiscord<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:45FromDiscord<odexine> I say, being barely any older than you
12:21:57FromDiscord<kingterrytheterrible12> I mean was deprecating defer really necessary
12:22:22FromDiscord<sirolaf> <https://github.com/nim-lang/Nim/pull/21342> this is current state of vtables, so not in 2.0 or devel
12:22:39FromDiscord<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:14FromDiscord<kingterrytheterrible12> Wait araq is involved in status dev?
12:24:24FromDiscord<odexine> No I don’t think so
12:24:51FromDiscord<sirolaf> Nim is sponsored by status, so involved in the sense that their issues take priority afaik
12:24:53FromDiscord<odexine> Status is just highly tied into Nim development
12:25:32FromDiscord<kingterrytheterrible12> In reply to @sirolaf "Nim is sponsored by": Ah alright
12:25:39FromDiscord<kingterrytheterrible12> Status doing a lot of good for the nim community
12:27:12FromDiscord<Chronos [She/Her]> In reply to @odexine "I say, being barely": Pfff
12:27:55FromDiscord<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:10FromDiscord<odexine> In reply to @chronos.vitaqua "Pfff": For the record I am 21, not 18
12:28:25FromDiscord<taperfade> what is statuis
12:28:31FromDiscord<kingterrytheterrible12> In reply to @jmgomez "if you are targeting": Thank you
12:28:45*ntat quit (Quit: leaving)
12:28:50FromDiscord<kingterrytheterrible12> In reply to @taperfade "what is statuis": https://status.im
12:29:07FromDiscord<kingterrytheterrible12> The desktop client is written in nim
12:29:12FromDiscord<taperfade> woah
12:29:22FromDiscord<taperfade> i wanted to make a chat in nim once
12:29:24FromDiscord<taperfade> or yk
12:29:29FromDiscord<taperfade> a irc client
12:29:32FromDiscord<Phil> Chat is pretty doable
12:29:36FromDiscord<odexine> Sure why not
12:29:42FromDiscord<taperfade> yeah
12:29:47FromDiscord<taperfade> rn im working on muahahaha ware
12:29:51FromDiscord<kingterrytheterrible12> Just make your own protocol
12:30:07FromDiscord<taperfade> jk
12:30:12FromDiscord<taperfade> nothing malicious
12:30:14FromDiscord<taperfade> just a test
12:30:17FromDiscord<taperfade> to learn
12:30:22FromDiscord<taperfade> and expand my knowledge
12:30:36FromDiscord<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:01FromDiscord<kingterrytheterrible12> In reply to @isofruit "https://stackoverflow.com/questions/76583938/how-to": Just send heartbeat signal every min
12:31:02FromDiscord<Phil> Some auth, a typing indicator and boom, chat
12:31:29FromDiscord<Phil> In reply to @kingterrytheterrible12 "Just send heartbeat signal": treeforms ws lib deals with that for you
12:31:36FromDiscord<taperfade> idk what to do rn https://media.discordapp.net/attachments/371759389889003532/1150045840874934332/image.png
12:31:38FromDiscord<taperfade> actually lost rn
12:31:45FromDiscord<taperfade> what is ' '
12:33:00FromDiscord<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:21FromDiscord<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:37FromDiscord<kingterrytheterrible12> Why does the error make no sense lol
12:33:39FromDiscord<sirolaf> As I said the tooling is pretty bad still
12:33:39FromDiscord<odexine> can you show the proc definition
12:33:46*ntat joined #nim
12:33:49FromDiscord<Phil> In reply to @kingterrytheterrible12 "Why does the error": Its nimsuggest
12:33:52FromDiscord<taperfade> In reply to @kingterrytheterrible12 "Why does the error": bro
12:33:54FromDiscord<Phil> (edit) "nimsuggest" => "nimsuggest, 🤷"
12:33:58FromDiscord<taperfade> wtf is ' '
12:34:01FromDiscord<kingterrytheterrible12> Why doesnt it say (unexpected positional argument)
12:34:02FromDiscord<odexine> not really nimsuggest's fault
12:34:09FromDiscord<odexine> but nim's error messages are p bad yes
12:34:31FromDiscord<kingterrytheterrible12> And also debuggers are underrated ngl
12:34:38FromDiscord<kingterrytheterrible12> It saved my ass in a java exam
12:34:41FromDiscord<odexine> i agree with that as well
12:35:02FromDiscord<odexine> lots of people here content with print debugging but eh i dont like it
12:35:08FromDiscord<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:13FromDiscord<odexine> spurious errors are hard to reproduce so
12:35:33FromDiscord<jmgomez> if you dont like it and want to contribute to improve the situation, fill an issue
12:35:38FromDiscord<kingterrytheterrible12> In reply to @odexine "lots of people here": Once you have anything more complex than hello world a debugger is invaluable
12:35:40FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FP9
12:35:47FromDiscord<kingterrytheterrible12> In reply to @jmgomez "if you dont like": Sure
12:35:50FromDiscord<kingterrytheterrible12> In nim repo?
12:35:51FromDiscord<odexine> terry do you know rr
12:36:02FromDiscord<kingterrytheterrible12> In reply to @odexine "terry do you know": Whos that
12:36:03FromDiscord<odexine> https://rr-project.org/
12:36:17FromDiscord<kingterrytheterrible12> Bro
12:36:20FromDiscord<kingterrytheterrible12> Rika i love you
12:36:22FromDiscord<taperfade> In reply to @isofruit "That would show you": dir is C:\\thing\\
12:36:25FromDiscord<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:26FromDiscord<taperfade> in my code
12:36:27FromDiscord<taperfade> btw
12:36:28FromDiscord<kingterrytheterrible12> This sounds like the dream debugger
12:36:59FromDiscord<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:05FromDiscord<odexine> also i discovered this a few days ago https://github.com/facebookexperimental/hermit but out of topic yeah
12:37:26FromDiscord<Phil> When I wrote about path I meant that the path is combined with the filename
12:37:53FromDiscord<kingterrytheterrible12> Im gonna start using rr debugger ngl
12:38:32FromDiscord<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:47FromDiscord<kingterrytheterrible12> And also who the fuck though it was a good idea to be not able to compare strings in java using ==
12:39:06FromDiscord<kingterrytheterrible12> In reply to @isofruit "I mean, if you": I will try
12:39:08FromDiscord<jmgomez> In reply to @kingterrytheterrible12 "In nim repo?": yes
12:39:10FromDiscord<kingterrytheterrible12> I just use gdb
12:39:25FromDiscord<Phil> I played around with gdb via cli and found it too clunky to use
12:39:34FromDiscord<odexine> In reply to @kingterrytheterrible12 "And also who the": haha java is for the insane
12:39:38FromDiscord<Phil> I was literally faster just recompiling and using echo's
12:39:55FromDiscord<odexine> In reply to @isofruit "I played around with": yeah i think most people would appreciate a tui/gui debugger
12:40:01FromDiscord<odexine> iirc gdb does have a tui
12:40:05FromDiscord<odexine> i will be going
12:40:16FromDiscord<kingterrytheterrible12> Isnt there a gdb gtk frontend?
12:40:36FromDiscord<Phil> Beats me, I only thought that vscode should ahve stuff for that
12:41:16FromDiscord<kingterrytheterrible12> https://www.gdbgui.com/
12:41:19FromDiscord<kingterrytheterrible12> There is this
12:43:08FromDiscord<kingterrytheterrible12> The only good think about jitted languages is that debuggers are very good
12:43:22FromDiscord<kingterrytheterrible12> Debugging native code is a mess
13:10:06FromDiscord<vindaar> emacs using the GTK backend 😇↵(@kingterrytheterrible12)
13:10:14FromDiscord<kingterrytheterrible12> The true question is
13:10:18FromDiscord<kingterrytheterrible12> Is nim as fast as C
13:10:50FromDiscord<Phil> Neither have legs so I think so
13:11:07FromDiscord<Phil> I can walk faster than both of them
13:13:09FromDiscord<kingterrytheterrible12> Ok let me say this
13:13:27FromDiscord<kingterrytheterrible12> Does a program in nim have comparable clock cycles to the same program written in C
13:15:25FromDiscord<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:48FromDiscord<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:17FromDiscord<Phil> (edit) "it" => "they"
13:16:52FromDiscord<Phil> It's a really good clock
13:17:04FromDiscord<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:06FromDiscord<kingterrytheterrible12> Phil ong stop trolling
13:17:43FromDiscord<Phil> In reply to @kingterrytheterrible12 "Phil ong stop trolling": The question just happens so often, let me have my fun 😛
13:17:55FromDiscord<kingterrytheterrible12> In reply to @isofruit "The question just happens": Where is the answer at
13:19:09FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FPt
13:21:39FromDiscord<sOkam! 🫐> In reply to @kingterrytheterrible12 "Does a program in": yes
13:21:48FromDiscord<kingterrytheterrible12> Bet
13:22:15FromDiscord<sOkam! 🫐> rust/nim/cpp/c are all at the same level of performance
13:22:22FromDiscord<Phil> sent a long message, see http://ix.io/4FPu
13:22:25FromDiscord<sOkam! 🫐> (edit) "rust/nim/cpp/c" => "zig/rust/nim/cpp/c"
13:22:49FromDiscord<kingterrytheterrible12> Fair enough
13:23:14FromDiscord<Phil> You will see that problem repeatedly if you look at benchmarks that try
13:23:17FromDiscord<sOkam! 🫐> true answer is what phil told you. simple elevator answer is what i told you
13:23:35FromDiscord<Phil> Often enough they compare things that just aren't equal
13:23:46FromDiscord<kingterrytheterrible12> I mean its easier to write fast and correct code in nim than it is to do in C
13:24:14FromDiscord<sOkam! 🫐> In reply to @kingterrytheterrible12 "I mean its easier": that depends on the person
13:24:17FromDiscord<vindaar> nimble is drunk sometimes and starts talking about `hg` when it doesn't understand what's wrong...↵(@sOkam! 🫐)
13:24:19FromDiscord<Phil> Like one side getting to use a multi threaded solution and the other doesn't
13:24:37FromDiscord<kingterrytheterrible12> In reply to @heysokam "that depends on the": Me when stack smashing detected core dumped
13:24:39FromDiscord<sOkam! 🫐> In reply to @vindaar "nimble is drunk sometimes": yeah but my file is empty
13:24:53FromDiscord<Phil> We literally had that comparison in a Nim Vs rust benchmark
13:24:53FromDiscord<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:07FromDiscord<kingterrytheterrible12> In reply to @isofruit "We literally had that": Who won
13:26:21FromDiscord<Phil> To nobodies surprise rust as they got to use n threads and Nim got 1, it was entirely skill related
13:27:27FromDiscord<kingterrytheterrible12> Me when multithreaded code beats single threaded code (I'm surprised)
13:29:13FromDiscord<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:39FromDiscord<sirolaf> In exchange sometimes the compiler decides to shoot you in the foot 😼
13:30:08FromDiscord<Phil> That's fine, it's generally pretty gentle compared to the alternatives out there
13:33:53FromDiscord<sirolaf> Yeah generally it's fine, but don't trust arc/orc too much
13:34:19FromDiscord<kingterrytheterrible12> In reply to @sirolaf "Yeah generally it's fine,": If i cant trust the garbage collector to do its job
13:34:24FromDiscord<kingterrytheterrible12> The this langauge is fucked
13:34:33FromDiscord<kingterrytheterrible12> (edit) "The" => "Then"
13:36:52FromDiscord<sirolaf> Well the more you automate the more likely it is to mess up
13:37:02FromDiscord<sirolaf> Isn't quite as mature as refc
13:37:10FromDiscord<kingterrytheterrible12> Its the other way around
13:37:42FromDiscord<kingterrytheterrible12> Humans make mistakes far far more than machines will ever do
13:37:53FromDiscord<sirolaf> Yeah so compared to a human it's very good
13:38:07FromDiscord<sirolaf> Compared to refc though there's still a few bugs
13:38:43FromDiscord<kingterrytheterrible12> Report it to nim issue tracker
13:39:02FromDiscord<sirolaf> I haven't encountered any, but there are leaks reported
13:39:28FromDiscord<sirolaf> <https://github.com/nim-lang/Nim/issues/22672> most recently this one with exceptions
13:40:23FromDiscord<kingterrytheterrible12> Why isnt this marked as showstopper?
13:40:46FromDiscord<sirolaf> Ask a collaborator, no idea
13:40:59FromDiscord<kingterrytheterrible12> We can ask araq in #internals
13:41:22FromDiscord<sirolaf> I just fix random issues I barely have enough knowledge to even look at
13:41:50FromDiscord<sirolaf> GC is far out of my comfort zone
13:45:50FromDiscord<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:02FromDiscord<pmunch> Just a wild guess though
13:47:04FromDiscord<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:36FromDiscord<kingterrytheterrible12> In reply to @pmunch "Ah, someone did indeed": Yeah lmao
13:50:40FromDiscord<kingterrytheterrible12> All the nerds there
13:50:43FromDiscord<kingterrytheterrible12> And geeks
13:58:47*jmdaemon quit (Ping timeout: 248 seconds)
14:39:06FromDiscord<sOkam! 🫐> Is there a command to update a package with nimble, just like calling `requires "package"` does internally?
14:39:20FromDiscord<sOkam! 🫐> I know about `nimble install`, but that's well... reinstalling it
14:42:06FromDiscord<odexine> you update by installing
14:42:22FromDiscord<odexine> nimble can manage multiple versions of a package
14:44:17*junaid_ joined #nim
14:45:11FromDiscord<sOkam! 🫐> problem is that it is downloading every time i call that command
14:45:22FromDiscord<sOkam! 🫐> while nimble itself does not redowload, just checks
14:45:54FromDiscord<odexine> In reply to @heysokam "problem is that it": "it" refers to what here
14:48:13FromDiscord<sOkam! 🫐> In reply to @odexine ""it" refers to what": wdym?
14:48:39FromDiscord<sOkam! 🫐> i call `nimble install` the command redownloads↵i add `requires "package"` it does not redownload
14:48:48FromDiscord<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:52FromDiscord<odexine> so you want to use the latest version?
14:50:12FromDiscord<odexine> i dont think you can do that, `requires` matches to the "minimum version"
14:50:15FromDiscord<sOkam! 🫐> i want to do whatever nimble requires does, by calling it from cli
14:51:02FromDiscord<odexine> i dont think i understand the question anymore lol; so what does what?
14:52:04FromDiscord<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:36FromDiscord<sOkam! 🫐> because i won't be using the nimble file myself, i will just calling nimble to install packages
14:53:09FromDiscord<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:18FromDiscord<sOkam! 🫐> (edit) "because i won't be using the nimble file myself, i will just ... calling" added "be"
14:57:50FromDiscord<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:52FromDiscord<odexine> clarifying, `nimble install <pkgname>` for case 1, `nimble install` & requires for case 2
14:57:56FromDiscord<odexine> right?
14:59:00FromDiscord<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:36FromDiscord<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:15FromDiscord<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:53FromDiscord<odexine> sounds like the job of something else than nginx though
15:10:02FromDiscord<odexine> smh the mod disobeying rules
15:11:37*lumo_e joined #nim
15:15:40FromDiscord<Phil> It's distantly related to my webdev Nim project that'll need to start caching otherwise!
15:16:18FromDiscord<Phil> Because it means I'll have to check out what cache solutions Nim has
15:16:29FromDiscord<Phil> And if they can do what I want
15:17:25FromDiscord<odexine> you dont have to go through nim, you can still cache via another program like memcached or whatever no>
15:17:26FromDiscord<odexine> (edit) "no>" => "no?"
15:17:44FromDiscord<odexine> well not memcached itself
15:17:45FromDiscord<Phil> Good. Point
15:17:47FromDiscord<odexine> that;s a kvstore
15:17:55FromDiscord<odexine> but some other program that would do that as well
15:19:06*azimut quit (Ping timeout: 246 seconds)
15:19:10FromDiscord<sOkam! 🫐> In reply to @odexine "clarifying, `nimble install <pkgname>`": `nimble install mypackage` redownloads↵`requires "mypackage"` does not
15:21:21FromDiscord<Chronos [She/Her]> There's no point to making a package manager, is there?
15:21:36FromDiscord<Chronos [She/Her]> A new package manager for Nim packages
15:21:42FromDiscord<Phil> ?
15:21:45FromDiscord<Chronos [She/Her]> It was discussed yesterday but hm
15:21:50FromDiscord<sOkam! 🫐> atlas seems pretty promising
15:21:55FromDiscord<Chronos [She/Her]> @odexine will know what I'm on about
15:21:58FromDiscord<sOkam! 🫐> its probably better to focus on one
15:22:15FromDiscord<Chronos [She/Her]> She(?) was talking about how she wishes for something different but I can't remember what now
15:22:26FromDiscord<odexine> i wasn't discussing whether to make a new package manager, but whether to revise the nimble file format
15:22:32FromDiscord<Chronos [She/Her]> Ah
15:22:40FromDiscord<Chronos [She/Her]> How would you change it, then?
15:22:50FromDiscord<odexine> the conclusion was that it isnt needed
15:23:09FromDiscord<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:12FromDiscord<Chronos [She/Her]> Fair enough
15:23:17FromDiscord<odexine> it was mentioned in passing
15:23:19FromDiscord<odexine> by uhh
15:23:22FromDiscord<odexine> terry i think
15:23:27FromDiscord<Chronos [She/Her]> Hm
15:23:56FromDiscord<sOkam! 🫐> In reply to @odexine "the conclusion was that": care to explain why not or why yes was considered?
15:24:33FromDiscord<sOkam! 🫐> or just maybe link to the message, i might have missed it
15:24:37FromDiscord<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:52FromDiscord<odexine> i ended up thinking "oh well then that's what define flags are for aint they" in the end
15:25:02FromDiscord<sOkam! 🫐> optional features as in?
15:25:25FromDiscord<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:52FromDiscord<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:14FromDiscord<odexine> well personally i dont use nimble build xd
15:26:31FromDiscord<sOkam! 🫐> yeah but that's the problem to being with
15:26:41FromDiscord<odexine> begin with? ig
15:26:44FromDiscord<sOkam! 🫐> we cannot rely on a tool if nobody relies on it because X or Y
15:26:56FromDiscord<odexine> i personally only use nimble as a dep management tool
15:27:10FromDiscord<sOkam! 🫐> we talk about nimble, and the conversation always ends with "well i don't blablabla, so idc"
15:27:30FromDiscord<odexine> i dont think nimble tasks are a nice solution (although this is not backed by anything but opinion derived from anecdote)
15:27:33FromDiscord<sOkam! 🫐> and nimble ends up starved of good tools
15:28:19FromDiscord<Chronos [She/Her]> Either way I think for optional dependencies, define flags would have to be used anyway, right?
15:28:26FromDiscord<sOkam! 🫐> definitely
15:28:51FromDiscord<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:57FromDiscord<sOkam! 🫐> but i don't think the "not reading config options for defines" is good design
15:29:15FromDiscord<sOkam! 🫐> nimc can take config files, why the hell does nimble not do that
15:29:23FromDiscord<sOkam! 🫐> (edit) "nimc can take config files, why the hell does nimble not do that ... " added "for itself"
15:29:35FromDiscord<Chronos [She/Her]> Doesn't it work if it's in the src dir with the same name as the main file?
15:29:37FromDiscord<sOkam! 🫐> (edit) "files," => "files for defines,"
15:30:01FromDiscord<sOkam! 🫐> nimble simple does not understand -d flags defined for itself
15:30:06FromDiscord<sOkam! 🫐> (edit) "simple" => "simply"
15:30:19FromDiscord<Chronos [She/Her]> Via cli?
15:30:19FromDiscord<sOkam! 🫐> unless they are directly passed to cli
15:30:22FromDiscord<Chronos [She/Her]> Ah
15:30:24FromDiscord<Chronos [She/Her]> Config file
15:30:27FromDiscord<sOkam! 🫐> yeah
15:30:36FromDiscord<sOkam! 🫐> it reads them, and sends them to nimc
15:30:39FromDiscord<Chronos [She/Her]> Could fix that manually tbf
15:30:50FromDiscord<Chronos [She/Her]> Like, with a PR
15:30:53FromDiscord<sOkam! 🫐> but ignores them for itself... which is like... ok, you just completely removed the option of optional anything by that?
15:30:56FromDiscord<Chronos [She/Her]> I just don't have the knowledge really f
15:31:03FromDiscord<sOkam! 🫐> makes no sense design wise to keep that out of the featureset
15:31:29FromDiscord<odexine> i think nim just has an overall maintainer problem, many people willing to complain but no one to contribute, me included
15:31:41FromDiscord<Chronos [She/Her]> Yeah
15:32:09FromDiscord<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:31FromDiscord<sOkam! 🫐> so makes me reconsider what i do and how, and just keep to myself
15:32:48FromDiscord<odexine> In reply to @heysokam "I would contribute, but": ? why?
15:33:03FromDiscord<sOkam! 🫐> In reply to @odexine "? why?": have you seen the answers to my last 3 messages there?
15:33:19FromDiscord<jmgomez> In reply to @heysokam "I would contribute, but": to be fair you ask questions there that doesnt belong to the channel
15:33:20FromDiscord<odexine> i have probably seen but not committed it to memory
15:33:31FromDiscord<Chronos [She/Her]> Tbh I want a new programming language lmao tailored to my needs (Java programming but sane)
15:33:37FromDiscord<jmgomez> it is true that the answer you get is not always friendly 😛
15:33:45FromDiscord<odexine> In reply to @chronos.vitaqua "Tbh I want a": herculean effort
15:33:45FromDiscord<Chronos [She/Her]> I could make a backend but my motivation for that clearly isn't much aha
15:34:04FromDiscord<jmgomez> that said, there are many ways to contribute to Nim. You are already doing so by sharing your graphic lib
15:34:05FromDiscord<Chronos [She/Her]> In reply to @odexine "herculean effort": There's an (unofficial) assembler for it tbf
15:34:07FromDiscord<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:16FromDiscord<Chronos [She/Her]> In reply to @jmgomez "that said, there are": Also Confy exists
15:34:21FromDiscord<sOkam! 🫐> im happy to talk about it in a `#tools` channel, but there is none
15:35:07FromDiscord<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:21FromDiscord<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:36FromDiscord<jmgomez> (edit) "you" => "just"
15:35:47FromDiscord<sOkam! 🫐> (edit) "compiler," => "compiler tool,"
15:36:13FromDiscord<Chronos [She/Her]> In reply to @heysokam "confy just happened to": Oh huh? Really?
15:36:28FromDiscord<sOkam! 🫐> yeah
15:36:51FromDiscord<sOkam! 🫐> and my frustrations for nim build tooling made me implement more things, but it was originally only for C
15:37:00FromDiscord<Chronos [She/Her]> Yeah fair enough really
15:37:24FromDiscord<sOkam! 🫐> don't quite undersand why zigcc support was partially implemented at some point, and completely removed not long after
15:37:48FromDiscord<Chronos [She/Her]> I'd imagine since Zig cc is literally just a wrapper over clang
15:37:53FromDiscord<sOkam! 🫐> so... i made confy support nim, since its just a simple bunch of extra config options to the nimc setup
15:38:09FromDiscord<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:17FromDiscord<Chronos [She/Her]> How so?
15:38:27FromDiscord<sOkam! 🫐> you only notice them if you make a buildsystem with it, and another one without
15:38:35FromDiscord<Chronos [She/Her]> Hm fair enough
15:38:53FromDiscord<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:13FromDiscord<Chronos [She/Her]> 100s of lines bc of crosscompiling support or...?
15:39:16FromDiscord<sOkam! 🫐> yeah
15:39:23FromDiscord<Chronos [She/Her]> Makes sense
15:39:31FromDiscord<sOkam! 🫐> and multiple compilers setup, searching, making sure exists to not crash... etc etc etc
15:39:40FromDiscord<Chronos [She/Her]> Yeah
15:40:15FromDiscord<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:57FromDiscord<Chronos [She/Her]> Make seems a bit painful tbh
15:41:04FromDiscord<Chronos [She/Her]> Esp makefiles that generate cmake files-
15:41:15FromDiscord<sOkam! 🫐> this one is pure make, thankfully
15:41:24FromDiscord<sOkam! 🫐> make that generates cmake sounds horrific 🙈
15:41:33FromDiscord<Chronos [She/Her]> Lol
15:42:01FromDiscord<Chronos [She/Her]> I'd imagine it's still a massive task to port projects that use Makefiles to use Confy, no?
15:42:22FromDiscord<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:38FromDiscord<sOkam! 🫐> In reply to @chronos.vitaqua "I'd imagine it's still": i made a parser, so no not at all
15:42:46FromDiscord<Chronos [She/Her]> Really? Huh
15:43:03FromDiscord<Chronos [She/Her]> For CMake files?
15:43:14FromDiscord<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:28FromDiscord<sOkam! 🫐> In reply to @chronos.vitaqua "For CMake files?": for cmake you need to generate the makefiles, but after that yes
15:44:16FromDiscord<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:21FromDiscord<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:31FromDiscord<Chronos [She/Her]> In reply to @heysokam "i tried to do": Oof
16:01:45FromDiscord<sOkam! 🫐> In reply to @isofruit "I would argue that": there is more to tooling than nimble related things
16:02:16FromDiscord<Phil> I agree, it's more that nimble is tooling and it seems fair to generalize that channel a bit
16:03:22FromDiscord<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:54FromDiscord<sOkam! 🫐> exactly
16:04:07FromDiscord<sOkam! 🫐> or nimsuggest, etc etc
16:04:23FromDiscord<sOkam! 🫐> (edit) "or nimsuggest, ... etc" added "nimpretty,"
16:04:50FromDiscord<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:14FromDiscord<Phil> Therefore more the suggestion to generalize the nimble channel
16:05:15FromDiscord<sOkam! 🫐> which is why i mentioned a #tools one, not creating 10 channels one for each tool
16:06:57FromDiscord<Phil> Yeh, just more turning nimble channel onto a tools channel instead of adding a new channel
16:07:07FromDiscord<Phil> (edit) "onto" => "into"
16:10:14FromDiscord<pmunch> In reply to @heysokam "<@&371760044473319454> how do I": You just did!
16:11:51FromDiscord<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:07FromDiscord<ieltan> In reply to @heysokam "<@&371760044473319454> how do I": Renaming #nimble would be fine right?
16:32:27FromDiscord<sOkam! 🫐> i figure
16:32:37FromDiscord<sOkam! 🫐> the point is that if there is no conversation, nothing will get done ever
16:32:45FromDiscord<ieltan> #nimble -> #tooling
16:33:04FromDiscord<ieltan> Makes sense to me since atlas is around now
16:33:19FromDiscord<sOkam! 🫐> there is lots more than atlas+nimble
16:34:12FromDiscord<ieltan> Of course the point is that #nimble can be used to talk about both of them or more
16:48:18FromDiscord<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:18PMunchsOkam, that's why we should rename it
17:04:38PMunchIf we rename #nimble to #tooling then we can chat about all kinds of stuff in there
17:09:17FromDiscord<jmgomez> so what are you waiting for? 😛
17:11:35FromDiscord<sOkam! 🫐> _[insert mandatory gwen stefani lyrics here]_
17:12:25FromDiscord<Phil> Admin rights
17:13:25FromDiscord<ieltan> Also isn't the channel bridged to matrix? You'd need both matrix and discord admin perms right?
17:13:47FromDiscord<Phil> Matrix regarding that will surprisingly enough be easier on that front
17:14:47FromDiscord<jmgomez> oh I thought he was the admin already, from the outside PMunch seems the more involved in the community
17:15:32PMunchI think I have moderator status in some channels
17:15:36FromDiscord<Phil> Actually he might be, never checked
17:15:50PMunchWe also have to figure out what happens with the IRC room, you can't really rename those
17:16:21PMunchI guess we'd have to tell the bridge bot to send messages to #nim-tooling instead or something like that
17:36:14FromDiscord<Phil> That bridge is so much more flexible than we gave it credit for 😛
17:54:54*lumo_e quit (Quit: Quit)
17:57:22FromDiscord<bhunao> anyone one here uses neovim to code in nim?
17:59:49PMunch@bhunao, I use regular Vim to code Nim
18:00:29FromDiscord<bhunao> i'm trying to set lsp, linter or whatever but i dont know how
18:00:41FromDiscord<bhunao> i just dont want my code all the same color
18:07:20FromDiscord<Yardanico> restarting the IRC bridge
18:07:21*FromDiscord quit (Remote host closed the connection)
18:07:36*FromDiscord joined #nim
18:17:55FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRc
18:17:58FromDiscord<saint._._.> If I'm trying to do cpp interop
18:19:05FromDiscord<saint._._.> Would nimterop help
18:23:16FromDiscord<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:54FromDiscord<saint._._.> @jmgomez Thanks, the thing i don't get though is that I get
18:29:00FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRg
18:29:07FromDiscord<saint._._.> When just trying to import the .so file, without calling anything
18:30:36FromDiscord<saint._._.> Oh I need to link with libstdc++ ?
18:41:55FromDiscord<jmgomez> yep
18:44:15FromDiscord<saint._._.> How do I do that with nim
18:44:56FromDiscord<saint._._.> Oh passl
18:49:04FromDiscord<jmgomez> shoudlnt it be a compiler flag though? `-std=c++11`?
18:49:29FromDiscord<saint._._.> I tried adding that with passl but I still get the same problem
18:49:58FromDiscord<saint._._.> nim cpp --passl:"-std=c++11 -stdlib=libc++ " test2.nim
18:50:01FromDiscord<saint._._.> Is what I'm doing
18:50:15FromDiscord<jmgomez> try to do `--passC:"--std=c++11"`
18:50:19FromDiscord<saint._._.> ohh okay
18:50:20FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRn
18:50:23*Guest65 joined #nim
18:51:08FromDiscord<saint._._.> same problem @jmgomez
18:52:07FromDiscord<jmgomez> IIRC that worked for me in msvc and clang (MacOs)
18:52:18FromDiscord<saint._._.> I'm on macos too @jmgomez
18:52:24FromDiscord<jmgomez> ahh yeah
18:52:26FromDiscord<jmgomez> M1?
18:52:34FromDiscord<saint._._.> Intel https://media.discordapp.net/attachments/371759389889003532/1150141713441103972/message.txt
18:52:41FromDiscord<saint._._.> Intel
18:52:46FromDiscord<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:05FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRo
18:53:23FromDiscord<saint._._.> I guess that output doesn't really say anything
18:53:44FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRp
18:53:52FromDiscord<jmgomez> remove that `simdjson` link
18:53:55FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4FRq
18:54:02FromDiscord<saint._._.> Well if I remove it then it will work
18:54:05FromDiscord<saint._._.> But thats the whole problem
18:54:13FromDiscord<saint._._.> I can build simdjson with g++ on my system
18:54:16FromDiscord<saint._._.> But I can't link it to nim
18:54:30FromDiscord<jmgomez> ok, then is not stl
18:54:38FromDiscord<jmgomez> then path for `link` is absolute though
18:54:52FromDiscord<jmgomez> isnt it?
18:54:53FromDiscord<saint._._.> Yeah
18:54:57FromDiscord<saint._._.> Absolute
18:55:12FromDiscord<jmgomez> (edit) "then" => "the"
18:55:17FromDiscord<saint._._.> Just in my local dir
18:55:25FromDiscord<jmgomez> `{.link: "./simdjson.o".}` this doesnt look absolute
18:55:33FromDiscord<saint._._.> Oh sorry
18:55:46FromDiscord<saint._._.> I thought you meant like not an installed library
18:56:38FromDiscord<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:57FromDiscord<jmgomez> and then make sure it has x86 symbol
18:57:02FromDiscord<jmgomez> (edit) "symbol" => "symbols"
18:57:23FromDiscord<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:26FromDiscord<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:28FromDiscord<saint._._.> I'm just runnign g++ -c
18:57:44FromDiscord<saint._._.> In reply to @jmgomez "I would remove it": Hmm okay
18:57:49FromDiscord<saint._._.> Good idea
18:59:24FromDiscord<saint._._.> Ya I think u are right @jmgomez
18:59:51FromDiscord<saint._._.> Is std::cxx11::basic_string not stl ?
18:59:52*Guest65 quit (Quit: Client closed)
19:00:36*junaid_ joined #nim
19:01:26FromDiscord<kingterrytheterrible12> whats the point of dynamic dispatch
19:01:39FromDiscord<kingterrytheterrible12> cant we turn dynamic dispatch into overloads?
19:15:42FromDiscord<saint._._.> @jmgomez I got it to work, I had to build my lib with clang++ instead of g++
19:18:35FromDiscord<sOkam! 🫐> In reply to @bhunao "anyone one here uses": I do. lunarvim to be specific
19:19:42FromDiscord<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:57FromDiscord<sOkam! 🫐> I do `LspInstall nim` and works
19:20:32FromDiscord<sOkam! 🫐> (edit) "nim`" => "nimls`"
19:22:08FromDiscord<sOkam! 🫐> and for highlighter i use `{'zah/nim.vim'}, -- Syntax highlighter only`
19:22:32FromDiscord<sOkam! 🫐> its a really old one, but it works well for syntax highlight
19:22:42FromDiscord<sOkam! 🫐> i tried another one, but didn't personally like it
19:23:55FromDiscord<bhunao> In reply to @heysokam "and for highlighter i": gonna try it
19:25:34FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4FRt
19:26:51FromDiscord<sOkam! 🫐> ^ that would be sick
19:27:02FromDiscord<bhunao> @sOkam! 🫐 it worked, thanks
19:27:22FromDiscord<kingterrytheterrible12> In reply to @heysokam "^ that would be": very sick as the youngsters say
19:27:25FromDiscord<saint._._.> In reply to @bhunao "gonna try it": U can get tree-sitter syntax highlight for vim
19:27:26FromDiscord<saint._._.> nvim
19:27:28FromDiscord<saint._._.> I have it working
19:27:32FromDiscord<kingterrytheterrible12> it will be indeed bussin no cap
19:28:03FromDiscord<sOkam! 🫐> In reply to @saint._._. "U can get tree-sitter": its what zah/nim.vim does afaik 🤔
19:28:15FromDiscord<bhunao> In reply to @saint._._. "I have it working": how did u got it?
19:40:18FromDiscord<Chronos [She/Her]> Is there any point to me making new bindings for Chipmunk2D when some already exist?
19:45:13FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Is there any point": if its abandoned then yes
19:45:17FromDiscord<kingterrytheterrible12> otherwise no
19:45:50FromDiscord<Chronos [She/Her]> It's abandoned but Chipmunk hasn't updated the API so hm
19:47:52FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "otherwise no": So not sure tbh
19:48:17FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "It's abandoned but Chipmunk": have they added new shit that is unbinded?
19:48:29FromDiscord<Chronos [She/Her]> Not sure how to check lol
19:49:08FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Not sure how to": you gotta start checkin baby
19:50:04FromDiscord<Chronos [She/Her]> How tho
19:50:35FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "How tho": open the codebase
19:50:50FromDiscord<kingterrytheterrible12> your required to anyways or how else are ya gonna bind it hon
19:58:18FromDiscord<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:36FromDiscord<sOkam! 🫐> if they work, then no reason. since bindings sometimes rarely change
19:59:11FromDiscord<kingterrytheterrible12> +1
20:01:46FromDiscord<Chronos [She/Her]> Yeah no changes really
20:04:24FromDiscord<Chronos [She/Her]> Sigh... Chat app or MC server
20:04:27FromDiscord<Chronos [She/Her]> I'm doing chat app
20:06:32FromDiscord<Phil> But Chronos!↵Now you get to choose between "centralized chat app" and "decentralized chat app"!
20:07:16FromDiscord<Chronos [She/Her]> Decentralised, next question
20:08:07FromDiscord<Phil> Websockets or custom protocol?
20:08:09FromDiscord<saint._._.> In reply to @heysokam "its what zah/nim.vim does": Nah that just does regular syntax highlighting
20:08:12FromDiscord<Chronos [She/Her]> Websockets
20:08:22FromDiscord<Chronos [She/Her]> They're easy and convinient
20:08:31FromDiscord<Chronos [She/Her]> Gonna have a HTTP API too obvs
20:08:37FromDiscord<Phil> Custom communications protocol or XMPP interoperability ?
20:08:44FromDiscord<Chronos [She/Her]> XMPP?
20:08:50FromDiscord<Chronos [She/Her]> Was planning custom tbh
20:08:57FromDiscord<Phil> https://xmpp.org/
20:09:44FromDiscord<Phil> I actually don't know if XMPP is feasible in non-centralized setups. I think it should be but no promises
20:10:00FromDiscord<Phil> I have the faint suspicion it might be a protocol designed with centralized setups in mind
20:10:28FromDiscord<Chronos [She/Her]> Idk if that'll work with my way of authenticating
20:10:56FromDiscord<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:57FromDiscord<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:17FromDiscord<Phil> (edit) "other protocols" => "others implementing the protocol"
20:12:35*junaid_ quit (Remote host closed the connection)
20:12:37FromDiscord<Chronos [She/Her]> I'll prolly use my own protocol anyway
20:12:59FromDiscord<Phil> But jesus christ that's a lot to read
20:13:01FromDiscord<Chronos [She/Her]> Any other questions? :p
20:13:13FromDiscord<Phil> Chat rooms or not chat-rooms?
20:13:19FromDiscord<Phil> (edit) "not" => "no"
20:13:30FromDiscord<Phil> Important because no chat-rooms is simpler, with chat-rooms is more useful for users
20:13:35FromDiscord<Chronos [She/Her]> Chat rooms as in servers? Or as in channels?
20:13:56FromDiscord<Phil> channels. Basically "Do you have an alternative to DMs?"
20:14:05FromDiscord<Chronos [She/Her]> Yeah that'll be a thing
20:14:20FromDiscord<Chronos [She/Her]> DMs are gonna be a bit funky tbh but I'll figure it out
20:14:37FromDiscord<Phil> In that case you've got your first task cut out for you
20:14:50FromDiscord<Phil> Because in a decentralized setting, where are you loading the data of messages the other person sent you?
20:14:56FromDiscord<Phil> (edit) "you?" => "you while you were offline?"
20:15:22FromDiscord<Phil> (edit) "Because in a decentralized setting, ... where" added "from"
20:15:55FromDiscord<Chronos [She/Her]> My idea would be setting an instance as a mutual party for sharing messages
20:16:19FromDiscord<Phil> Ah, so centralized chat, you just control the instance, matrixlike basically
20:16:42FromDiscord<Chronos [She/Her]> They choose an instance to communicate on a mutual party there
20:17:03FromDiscord<Chronos [She/Her]> The chat server part and the account system are two separate programs here
20:17:26FromDiscord<Chronos [She/Her]> Like, you authenticate to a chat server using an account server
20:17:27FromDiscord<Phil> Yeah but now you've got 3 parts then:↵Chat client, chat server, account manager
20:18:19FromDiscord<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:18FromDiscord<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:50FromDiscord<kingterrytheterrible12> @Chronos [She/Her] if you want help i recently decided i will make a chat protocol in rust
20:20:24FromDiscord<kingterrytheterrible12> why rust not nim? because i need to bind it to frontends in kotlin swift and C++
20:20:34FromDiscord<kingterrytheterrible12> or nim for desktop
20:21:57FromDiscord<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:32FromDiscord<Phil> I can't quite materialize what you mean by "static" in this context
20:22:37FromDiscord<arathanis> why does the chat server and chat client need to communicate?
20:22:50FromDiscord<kingterrytheterrible12> how else can you forward messages
20:22:52FromDiscord<arathanis> (edit) "chat client" => "account server"
20:22:55FromDiscord<arathanis> sorry
20:22:57FromDiscord<arathanis> made an edit
20:23:28FromDiscord<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:31FromDiscord<arathanis> (edit) "server" => "~~server~~ manager"
20:24:21FromDiscord<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:37FromDiscord<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:42FromDiscord<kingterrytheterrible12> In reply to @isofruit "If your point of": thank god for branch predictors lol
20:25:04FromDiscord<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:15FromDiscord<kingterrytheterrible12> or just dont verify at all
20:26:01FromDiscord<kingterrytheterrible12> something like how emails work
20:26:20FromDiscord<kingterrytheterrible12> you dont need to verify if your allowed to send to someone
20:26:25FromDiscord<Phil> In reply to @arathanis "you just use JWT": Good shout there, makes things simpler a bit
20:26:27FromDiscord<kingterrytheterrible12> the client handles that
20:26:48FromDiscord<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:06FromDiscord<arathanis> its not talked about nearly enough imo
20:27:11FromDiscord<arathanis> everyone also uses the singular token
20:27:19FromDiscord<Phil> I guess that's how centralized auth could work in general in a microservice landscape
20:27:41FromDiscord<arathanis> thats exactly how I have done it, yes
20:27:51FromDiscord<fowl.mouth> Does Nim have a GRPC library?
20:28:00FromDiscord<kingterrytheterrible12> also isnt there too many chat clients and protocols?
20:28:50FromDiscord<arathanis> In reply to @kingterrytheterrible12 "also isnt there too": yes but implementing your own for academic purposes is still useful imo
20:29:19FromDiscord<kingterrytheterrible12> eh idk
20:29:30FromDiscord<kingterrytheterrible12> its better to go look at matrix source code no?
20:29:39FromDiscord<kingterrytheterrible12> or signal
20:29:52FromDiscord<arathanis> looking at source code doesn't give you architecture and design experience
20:30:03FromDiscord<kingterrytheterrible12> also is voip handled over websockets?
20:30:18FromDiscord<arathanis> In reply to @kingterrytheterrible12 "also is voip handled": by carrier pidgeon
20:30:24FromDiscord<kingterrytheterrible12> huh
20:30:27FromDiscord<arathanis> 😂
20:30:31FromDiscord<kingterrytheterrible12> dont troll
20:30:34FromDiscord<arathanis> yeah its usually web sockets
20:30:44FromDiscord<arathanis> im not trolling, just joking around
20:30:50FromDiscord<kingterrytheterrible12> bet
20:30:53FromDiscord<arathanis> or at least, that is my perception.
20:31:00FromDiscord<arathanis> i see trolling as actively trying to make people angry
20:31:20FromDiscord<kingterrytheterrible12> anyways voip wise when does it know to send the packet?
20:31:26FromDiscord<kingterrytheterrible12> what if the user never stops talking
20:31:32FromDiscord<kingterrytheterrible12> like has background noise or something
20:32:17FromDiscord<leorize> then you never stop sending data \:)
20:32:25FromDiscord<arathanis> In reply to @kingterrytheterrible12 "anyways voip wise when": you stream chunks
20:32:51FromDiscord<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:57FromDiscord<Chronos [She/Her]> sorry just had to brb
20:33:05FromDiscord<kingterrytheterrible12> In reply to @arathanis "so you dont wait": i see
20:33:09FromDiscord<Phil> Yeh, Architecture knowledge is built on the corpse of a lot of projects with flaws
20:33:20FromDiscord<kingterrytheterrible12> this can get reaaal complicated when 2 or more people start talking to each other
20:33:31FromDiscord<Phil> Where you learn what fundamental decision turns into which really annoying outcomes
20:33:32FromDiscord<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:53FromDiscord<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:56FromDiscord<arathanis> In reply to @kingterrytheterrible12 "this can get reaaal": you want to merge the audio streams
20:34:16FromDiscord<arathanis> instead of playing a different audio stream for each user
20:34:23FromDiscord<arathanis> you combine the incoming wave forms into a single wave form
20:34:27FromDiscord<Chronos [She/Her]> In reply to @arathanis "you just use JWT": So sign with private key, verify with public key?
20:34:29FromDiscord<arathanis> such a cool project haha
20:34:31FromDiscord<kingterrytheterrible12> playing 2 diffrent audio streams makes more sense
20:34:35FromDiscord<arathanis> In reply to @chronos.vitaqua "So sign with private": correct!
20:34:44FromDiscord<arathanis> you create the JWT and its signed with the private key
20:34:45FromDiscord<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:48FromDiscord<Chronos [She/Her]> That's actually a really good way to verify that the client is actually who they say they are
20:34:52FromDiscord<arathanis> someone looking to make sure its authorized simply needs the pub key
20:35:00FromDiscord<Chronos [She/Her]> In reply to @isofruit "<@909883978717204561> might want to": Wrong account, I thought you kicked it lmao
20:35:08FromDiscord<kingterrytheterrible12> @Chronos [She/Her] also this isnt some quick project to implement if you want a full featured client
20:35:12FromDiscord<Chronos [She/Her]> In reply to @isofruit "<@909883978717204561> might want to": I'll likely to use Postgres on both DBs tbh
20:35:13FromDiscord<Phil> I swear I did, trying again
20:35:13FromDiscord<kingterrytheterrible12> its gonna take a couple of years
20:35:19FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "<@524288464422830095> also this isnt": Yeah I'm aware lol
20:35:35FromDiscord<kingterrytheterrible12> you can just implement an uh
20:35:38FromDiscord<kingterrytheterrible12> chat client
20:35:40FromDiscord<Phil> @Chronos [She/Her] mieb merb murb
20:35:41FromDiscord<kingterrytheterrible12> with no voip
20:35:47FromDiscord<Chronos [She/Her]> That is moi
20:35:54FromDiscord<kingterrytheterrible12> thats ligma
20:35:59FromDiscord<Chronos [She/Her]> Yeah I'm just doing the client, no voice lol
20:36:17FromDiscord<kingterrytheterrible12> what about implementing the CANDICE protocol?
20:36:37FromDiscord<Chronos [She/Her]> But thanks @arathanis, that's actually a great solution lmao
20:36:45FromDiscord<arathanis> In reply to @chronos.vitaqua "But thanks <@136570191038513152>, that's": you are very welcome!
20:36:52FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "what about implementing the": Does that work with the JOE method?
20:37:12FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Does that work with": yes combined with the LIGMA solution its nice
20:37:26FromDiscord<kingterrytheterrible12> and i heard DEEZ works too
20:37:36FromDiscord<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:41FromDiscord<kingterrytheterrible12> bro
20:37:46FromDiscord<kingterrytheterrible12> its called public KEY
20:37:47FromDiscord<arathanis> In reply to @chronos.vitaqua "Also hm, I'd be": yes its safe for anyone to see the pubkey
20:37:49FromDiscord<kingterrytheterrible12> PUBLIC KEY
20:37:52FromDiscord<kingterrytheterrible12> PUBLIC
20:38:06FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "and i heard DEEZ": Hm, what I used SUGMA instead
20:38:16FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Hm, what I used": tf is SUGMA
20:38:17FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "PUBLIC": :p my brain is very dead lmao
20:38:23FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua ":p my brain is": can see
20:38:26FromDiscord<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:29FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "tf is SUGMA": Sugma balls
20:38:33FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "*Sugma balls*": NOOOOOOOOOOOOOOOOOO
20:38:38FromDiscord<Chronos [She/Her]> MUAHAHAHAHAH
20:38:52FromDiscord<kingterrytheterrible12> In reply to @arathanis "ive seen some things": on the hub?
20:38:55FromDiscord<kingterrytheterrible12> of git?
20:39:00FromDiscord<arathanis> 🤫
20:39:12FromDiscord<Chronos [She/Her]> I'm tryna figure out how you'd prove the server is authentic too hm
20:39:25FromDiscord<Chronos [She/Her]> Don't think there's a way to do that but
20:39:30FromDiscord<arathanis> In reply to @chronos.vitaqua "I'm tryna figure out": cert pinning
20:39:33FromDiscord<Phil> sent a long message, see http://ix.io/4FRH
20:39:38FromDiscord<kingterrytheterrible12> you gotta spend time making an flowchart and engineering everything
20:39:38FromDiscord<Chronos [She/Her]> What's that?
20:39:41FromDiscord<kingterrytheterrible12> dont just start making
20:39:44FromDiscord<arathanis> i do this at work all the time haha
20:40:02FromDiscord<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:13FromDiscord<arathanis> So it will only auth against the server
20:40:30FromDiscord<kingterrytheterrible12> all of this work
20:40:35FromDiscord<kingterrytheterrible12> only for your protocol to fail
20:40:36FromDiscord<kingterrytheterrible12> xd
20:41:03FromDiscord<kingterrytheterrible12> i generally like to spend time improving existing shit rather than making one
20:41:43FromDiscord<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:48FromDiscord<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:02FromDiscord<Phil> Chatapps make for really good learning projects imo
20:42:33FromDiscord<kingterrytheterrible12> In reply to @isofruit "Chatapps make for really": you learn as much as you would by contributing to matrix
20:42:42FromDiscord<kingterrytheterrible12> or signal
20:42:46FromDiscord<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:58FromDiscord<kingterrytheterrible12> also dont ever contribute to microsoft boys
20:43:11FromDiscord<kingterrytheterrible12> last time i did they converted my issue to a discussion and closed it
20:43:13FromDiscord<kingterrytheterrible12> fuck them
20:43:46FromDiscord<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:56FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "That's actually something I": ligmaflow
20:44:11FromDiscord<Chronos [She/Her]> In reply to @isofruit "Generally I agree, but": Yeah, it's mostly just so I can learn
20:44:13FromDiscord<kingterrytheterrible12> @Chronos [She/Her] https://app.diagrams.net/
20:44:19FromDiscord<kingterrytheterrible12> is what i use
20:44:23FromDiscord<Phil> In reply to @kingterrytheterrible12 "you learn as much": I disagree. These projects are too large to get a meaningful overview
20:44:24FromDiscord<Chronos [She/Her]> In reply to @arathanis "you force the client": How would that work if the client logs in from elsewhere?
20:44:31FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "<@524288464422830095> https://app.diagrams.net/": Thanks!
20:44:37FromDiscord<Phil> Got to first start walking before you spring a mile a minute and these apps are sprinting
20:44:37FromDiscord<arathanis> In reply to @chronos.vitaqua "How would that work": the client installation just has a certificate with it
20:44:48FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "ligmaflow": You lost all respect from me since you fell for my trick muahahahaha
20:45:01FromDiscord<kingterrytheterrible12> @Chronos [She/Her] also if you want to make a chatclient make a repo and send it over
20:45:10FromDiscord<kingterrytheterrible12> i wanna contribute rather than making my own shit
20:45:14FromDiscord<Chronos [She/Her]> Sure!
20:45:24FromDiscord<kingterrytheterrible12> its wasted effort for 2 of us making the exact same thing
20:45:27FromDiscord<Chronos [She/Her]> In reply to @arathanis "the client installation just": I don't understand how it'd work tbh aha
20:45:34FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4FRI
20:45:42FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "its wasted effort for": Yeah lol, I'll do that then
20:46:03FromDiscord<kingterrytheterrible12> also if its gonna go anywhere your gonna need some cybersecurity guy vetting out your repo
20:46:09FromDiscord<kingterrytheterrible12> before deploying to production
20:46:22FromDiscord<kingterrytheterrible12> so nobody does a lil trolling and steals all messages
20:46:30FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4FRJ
20:46:31FromDiscord<kingterrytheterrible12> WEB CLIENT
20:46:32FromDiscord<kingterrytheterrible12> IM OUT
20:46:33FromDiscord<kingterrytheterrible12> SEE YA
20:46:36FromDiscord<Chronos [She/Her]> Lmaooo
20:46:48FromDiscord<kingterrytheterrible12> WHY WEB BRO
20:46:53FromDiscord<kingterrytheterrible12> SHIT UX
20:46:55FromDiscord<Chronos [She/Her]> I need to learn HTML and shite properly too :p
20:47:21FromDiscord<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:23FromDiscord<kingterrytheterrible12> i dont understand the point of webclient when everyone who uses your app on desktop will just download the desktop app
20:47:24FromDiscord<kingterrytheterrible12> xd
20:47:36FromDiscord<kingterrytheterrible12> and mobile guys will want a mobile app
20:48:08FromDiscord<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:16FromDiscord<arathanis> (edit) "lock" => "like"
20:48:27FromDiscord<arathanis> (edit) "environment," => "environment using something" | "k8s," => "k8s"
20:49:02FromDiscord<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:13FromDiscord<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:16FromDiscord<kingterrytheterrible12> In reply to @isofruit "I mean, and then": if you make it badly (electron) then yes
20:49:23FromDiscord<kingterrytheterrible12> do it proper and use gtk or Qt
20:49:34FromDiscord<Phil> Ain't nobody got time for that for larger projects
20:49:52FromDiscord<kingterrytheterrible12> your gonna spend years making a chat protocol then half ass the desktop client?
20:49:58FromDiscord<kingterrytheterrible12> what is this discord all over again?
20:50:09FromDiscord<leorize> in fact that's how all successful projects managed
20:50:22FromDiscord<leorize> turns out the desktop client is not that important
20:50:25FromDiscord<kingterrytheterrible12> bruh
20:50:28FromDiscord<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:38FromDiscord<kingterrytheterrible12> dev speed?
20:50:45FromDiscord<kingterrytheterrible12> have you seen the IPC interface
20:50:59FromDiscord<kingterrytheterrible12> gtk and qt signal and slots are much better
20:51:24FromDiscord<kingterrytheterrible12> although i prefer callbacks but i also like signals and slots
20:51:29FromDiscord<leorize> have you seen react?
20:51:39FromDiscord<kingterrytheterrible12> unfortunately
20:51:49FromDiscord<arathanis> In reply to @isofruit "I can fully understand": these days I look at Tauri
20:51:55FromDiscord<leorize> turns out leaving mutation to computers make it easier for human brains
20:51:57FromDiscord<arathanis> its Electron but using Rust instead of Node so it hauls
20:52:01FromDiscord<kingterrytheterrible12> tauri is just electron with more problems
20:52:07FromDiscord<Phil> In reply to @arathanis "these days I look": If they had nim bindings I wouldn't be utterly ignoring them
20:52:10FromDiscord<kingterrytheterrible12> wow it doesnt ship a browser great
20:52:24FromDiscord<kingterrytheterrible12> yeah it turns out its fucking bad for compatibility
20:52:41FromDiscord<arathanis> I mostly just write CLIs though, GUIs are evil 🙂
20:52:46FromDiscord<Phil> But the last point of communication on their end was "Nobody seems to care enough" so eh
20:53:06FromDiscord<kingterrytheterrible12> ngl if you wanna do web based desktop shipping a whole browser is the way to go
20:53:24FromDiscord<pmunch> sent a code paste, see https://play.nim-lang.org/#ix=4FRL
20:53:24FromDiscord<leorize> tauri on linux uses webkitgtk
20:53:30FromDiscord<kingterrytheterrible12> In reply to @pmunch "What, three lines is": too much work
20:53:38FromDiscord<kingterrytheterrible12> im joking lol
20:53:39FromDiscord<leorize> compatibility is worse than safari
20:53:53FromDiscord<kingterrytheterrible12> In reply to @leorize "compatibility is worse than": therefore, shipping a browser is the way
20:54:05FromDiscord<leorize> or just write a PWA
20:54:10FromDiscord<Phil> Yeah I played around with my angular SPA on that thing and it's just... wtf
20:54:12FromDiscord<leorize> you get away with it like 80% of the time
20:54:22FromDiscord<kingterrytheterrible12> PWA have shit UX
20:54:22FromDiscord<Chronos [She/Her]> I mean if there's a way
20:54:25FromDiscord<Chronos [She/Her]> Sorry
20:54:38FromDiscord<leorize> most gui apps have shit ux
20:54:39FromDiscord<Phil> Eh, mangadex is a PWA and the UX is pretty decent
20:54:41FromDiscord<kingterrytheterrible12> or use flutter or something
20:54:45FromDiscord<leorize> web doesn't magically make it worse or better
20:54:54FromDiscord<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:54FromDiscord<leorize> you want good ux you have to learn ux first
20:54:55FromDiscord<kingterrytheterrible12> In reply to @leorize "most gui apps have": you clearly havent seen qbittorrent yet
20:55:00FromDiscord<kingterrytheterrible12> i love that app
20:55:06FromDiscord<Phil> ~~And UX on my PWA is only terrible because I can't design for shit~~
20:55:13FromDiscord<kingterrytheterrible12> its the most used foss app i ever used even before i became a programmer
20:55:24FromDiscord<leorize> yea and I can duplicate qbittorrent ux on the web
20:55:25FromDiscord<Chronos [She/Her]> WASM could do it but no lib for that afaik and accessibility obviously suffers
20:55:32FromDiscord<kingterrytheterrible12> bro
20:55:33FromDiscord<leorize> it's not a problem of toolkit
20:55:36FromDiscord<kingterrytheterrible12> ong just use native desktop
20:55:40FromDiscord<Chronos [She/Her]> Nah
20:55:41FromDiscord<kingterrytheterrible12> or fucking flutter bro
20:55:44FromDiscord<Chronos [She/Her]> I'm using web
20:55:46FromDiscord<Phil> Honestly I'm looking forward to bun speeding shit up
20:55:51FromDiscord<kingterrytheterrible12> In reply to @isofruit "Honestly I'm looking forward": 1.0 is out
20:55:55FromDiscord<Phil> I'm aware
20:55:56FromDiscord<kingterrytheterrible12> and also bun is lying btw
20:56:01FromDiscord<kingterrytheterrible12> its all lies
20:56:15FromDiscord<kingterrytheterrible12> `Bun.serve` is written in zig not javascript
20:56:17FromDiscord<Phil> I mean more if they can integrate into existing ecosystems and lead to performance improvements across the board there or not.
20:56:19FromDiscord<Chronos [She/Her]> Lol idk how to structure the flowchart
20:56:27FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Lol idk how to": gotta start learnin hon
20:56:46FromDiscord<Chronos [She/Her]> Ik how to do it just not how to structure my app on it
20:56:50FromDiscord<kingterrytheterrible12> https://www.youtube.com/watch?v=SWRDqTx8d4k&ab_channel=RobotRiedinger
20:57:09FromDiscord<Phil> Theoretically it is just a runtime and thus should be able to replace wherever the V8 engine is being used.
20:57:20FromDiscord<kingterrytheterrible12> yes but the speed is lies
20:57:26FromDiscord<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:29FromDiscord<kingterrytheterrible12> unless they gonna rewrite everything in zig
20:57:33FromDiscord<kingterrytheterrible12> like EVERYTHING
20:57:50FromDiscord<kingterrytheterrible12> the benchmarks on their site is just benchmarking javascript vs zig
20:57:58FromDiscord<kingterrytheterrible12> so
20:58:11FromDiscord<kingterrytheterrible12> if you gonna write the next nbody sim in javascript and hope bun will speed it up
20:58:15FromDiscord<kingterrytheterrible12> ya out of luck
20:58:51FromDiscord<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:06FromDiscord<Chronos [She/Her]> Then from there, write the actual flow of theprogram?
20:59:06FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Features I need in": markdown
20:59:20FromDiscord<kingterrytheterrible12> state what the app needs↵make flowchart↵start programming
20:59:27FromDiscord<Chronos [She/Her]> Gucci, thanks!
20:59:32FromDiscord<kingterrytheterrible12> bussin no cap
20:59:32FromDiscord<kingterrytheterrible12> ong
21:00:09FromDiscord<kingterrytheterrible12> also i wonder if gtk apps are any good on windowas
21:00:11FromDiscord<kingterrytheterrible12> (edit) "windowas" => "windows"
21:00:19FromDiscord<leorize> they works
21:00:24FromDiscord<leorize> packaging is a pita, though
21:00:31FromDiscord<kingterrytheterrible12> hm
21:00:35FromDiscord<kingterrytheterrible12> so ETO forms?
21:00:47FromDiscord<kingterrytheterrible12> i get gtk on linux and whatever mac is and winforms on windows
21:01:20FromDiscord<leorize> or you can write a webapp xdddddd
21:01:27FromDiscord<kingterrytheterrible12> its not native
21:01:28FromDiscord<kingterrytheterrible12> slow
21:01:29FromDiscord<kingterrytheterrible12> bad ux
21:01:50FromDiscord<leorize> maybe it's skill issue 😁
21:01:58FromDiscord<kingterrytheterrible12> web issue
21:02:45FromDiscord<leorize> you can always start by studying pre-existing protocols↵(@Chronos [She/Her])
21:03:33FromDiscord<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:49FromDiscord<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:50FromDiscord<kingterrytheterrible12> hm alright
21:04:04FromDiscord<Chronos [She/Her]> I may do that tbf
21:04:08FromDiscord<kingterrytheterrible12> In reply to @leorize "IETF is also working": the NSA and CIA are working on it
21:04:25FromDiscord<kingterrytheterrible12> the next open source chat protocol thats gonna put you in jail
21:05:18FromDiscord<kingterrytheterrible12> brb installing zorin os
21:06:05FromDiscord<leorize> if you&#x27;re approaching this as a learning exercise, try to figure out the invariant model behind their designs↵(@Chronos [She/Her])
21:06:33FromDiscord<kingterrytheterrible12> Ngl signal is the only protocol thats actually good
21:06:54FromDiscord<leorize> basically the roles of every participants and what is guaranteed by what
21:07:16FromDiscord<leorize> protocols like discord and facebook messenger has also been reverse-engineered in open source projects
21:07:38FromDiscord<leorize> those will give you a glimpse into how different groups approach the same problems
21:07:40FromDiscord<Chronos [She/Her]> In reply to @leorize "if you&#x27;re approaching this": invariant model?-
21:07:45FromDiscord<Chronos [She/Her]> Ah
21:12:27FromDiscord<leorize> just remember that you don't need perfection on right away
21:12:32FromDiscord<leorize> it's a process
21:16:38FromDiscord<Chronos [She/Her]> Yeah I understand lol
21:16:53FromDiscord<Chronos [She/Her]> Sigh this will be painful if I'm actually gonna try doing good management skills and such
21:17:07FromDiscord<Chronos [She/Her]> But oh well, I have to learn for the industry
21:17:16FromDiscord<leorize> just try to have fun
21:19:06FromDiscord<Chronos [She/Her]> I will not if I plan this out but ultimately I have to lmao
21:19:19FromDiscord<Chronos [She/Her]> Well
21:19:22FromDiscord<Chronos [She/Her]> The coding will be fun
21:19:24FromDiscord<Chronos [She/Her]> And a pain
21:21:22FromDiscord<Chronos [She/Her]> Planning will be alright too
21:21:25FromDiscord<Chronos [She/Her]> Research is hell
21:46:45*PMunch quit (Quit: leaving)
22:27:09*azimut quit (Ping timeout: 246 seconds)
22:42:00FromDiscord<taperfade> i always get this and idk what it means https://media.discordapp.net/attachments/371759389889003532/1150199453958025357/image.png
22:42:18FromDiscord<sOkam! 🫐> In reply to @taperfade "i always get this": it means that you are not clarifying what type you want
22:42:24FromDiscord<sOkam! 🫐> and your code could result in many
22:42:25FromDiscord<saint._._.> How do I map like multi level [] operators from c++ to nim?
22:42:37FromDiscord<saint._._.> like foo['a']['b']['c']
22:42:43FromDiscord<saint._._.> If they can be indefinite
22:43:03FromDiscord<Elegantbeef> It's the same
22:43:22FromDiscord<taperfade> im so confused
22:46:37FromDiscord<taperfade> iong+
22:46:50FromDiscord<taperfade> im trying to make a file
22:47:10FromDiscord<taperfade> and instead of making one it tries to add text to an existing one
22:47:14FromDiscord<taperfade> but it doesnt exist yet
22:55:27*azimut joined #nim
22:55:50FromDiscord<saint._._.> @ElegantBeouf is it possible to like "collect" all the [] indexes at once and then pass them off to my c++ function
22:56:20FromDiscord<saint._._.> so if I do in nim foo[a][b][c][d][e] for me to get a,b,c,d,e
22:56:26FromDiscord<saint._._.> I'm sure it's possible
22:57:14FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4FS6
22:58:00FromDiscord<saint._._.> Oh so I want it to an indefinite number of arguments
22:58:12FromDiscord<saint._._.> And also not a list but like a multi dimensional array type access
22:58:15FromDiscord<Elegantbeef> use `varargs[int]`
22:58:19FromDiscord<saint._._.> myFoo[0][1][2]
22:58:33FromDiscord<saint._._.> not myFoo[0,1,2]
22:58:43FromDiscord<Elegantbeef> I mean the top doesnt make sense
22:59:04FromDiscord<Elegantbeef> If it's a value `[0]` should grab the first instance, which should be indexable aswell
22:59:07FromDiscord<saint._._.> It does right? Like if I'm accessing json
22:59:22FromDiscord<saint._._.> jsonObj['key1']['key2']['key3']
22:59:23FromDiscord<Elegantbeef> Define a `[]` and there you go
22:59:29FromDiscord<Elegantbeef> Look at std/json
22:59:44FromDiscord<saint._._.> The diff is I don't want one [] to return a type and for that call to be recursive
22:59:59FromDiscord<saint._._.> As such, I want to collect all the arguments and then pass them as a batch to my c++
23:00:03FromDiscord<Elegantbeef> Nim sees `a[b][c][d]` as 3 different procedures
23:00:10FromDiscord<Elegantbeef> You need to do `a[b, c, d]`
23:00:15FromDiscord<saint._._.> yeah, is there some way to "collect" that
23:00:26FromDiscord<Elegantbeef> I said use varargs[int]
23:00:30FromDiscord<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:54FromDiscord<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:06FromDiscord<saint._._.> I'm guessing it's not super straightforward anyways is what you're saying right
23:01:16FromDiscord<Elegantbeef> I mean you could make a macro do it but then you have to do `myMacro foo[1][2][3]`
23:01:20FromDiscord<Elegantbeef> Which defeats the purpose
23:01:32FromDiscord<saint._._.> How would I make the macro
23:01:35FromDiscord<saint._._.> The macro might be good
23:02:03FromDiscord<saint._._.> can I make a macro that would convert foo[1][2][3] to foo[1,2,3]
23:02:07FromDiscord<saint._._.> Cause that would be perfect
23:02:18FromDiscord<saint._._.> or foo(1,2,3) rather
23:02:33FromDiscord<Elegantbeef> Seems pointless but you can yes
23:02:45FromDiscord<saint._._.> Its just for syntactic sugar
23:03:50FromDiscord<Elegantbeef> I mean it's' the same as `foo[1, 2, 3]` just worse api
23:11:11FromDiscord<taperfade> im slowly losing motivation on learning
23:11:34FromDiscord<taperfade> the errors dont tell me anything
23:17:49FromDiscord<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:22FromDiscord<.e.l.i> how do you format a float to specify accuracy
23:22:36FromDiscord<.e.l.i> was hoping a format string with $.2f would cut it
23:22:45FromDiscord<.e.l.i> (edit) "$.2f" => "%.2f"
23:25:46FromDiscord<Elegantbeef> Depends on how you're formatting
23:25:49FromDiscord<Elegantbeef> strformat has format string
23:25:49FromDiscord<.e.l.i> sent a code paste, see https://play.nim-lang.org/#ix=4FSb
23:25:59FromDiscord<Elegantbeef> https://nim-lang.org/docs/strformat.html#formatting-floats
23:26:53FromDiscord<.e.l.i> oh, it's : not %
23:27:03FromDiscord<.e.l.i> that's what I was looking for
23:30:25FromDiscord<taperfade> In reply to @.e.l.i "seems like you are": the string is the file
23:30:29FromDiscord<taperfade> when i echo cure
23:30:36FromDiscord<taperfade> it outputs this
23:30:42FromDiscord<taperfade> C:\Program Files\Hello.txt
23:31:01FromDiscord<.e.l.i> sent a code paste, see https://play.nim-lang.org/#ix=4FSf
23:31:05FromDiscord<.e.l.i> it is still a string
23:32:07FromDiscord<taperfade> how do i make it a file tpye
23:34:14FromDiscord<.e.l.i> maybe something in std/os?
23:35:32FromDiscord<.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:58FromDiscord<Elegantbeef> You need to open a file to write to
23:36:07FromDiscord<Elegantbeef> or use `writeFile` or whatever it is
23:37:17FromDiscord<.e.l.i> I'd imagine it would be good to defer closing it too
23:45:18FromDiscord<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'