<< 31-03-2022 >>

00:02:27*lumo_e quit (Quit: Quit)
00:14:34FromDiscord<biz> what is `{.<code>.}`?
00:14:37FromDiscord<biz> ive seen things like
00:14:40FromDiscord<biz> `{.async.}`
00:14:44FromDiscord<Elegantbeef> It's a pragma
00:15:03FromDiscord<biz> what does it do?
00:15:07FromDiscord<Elegantbeef> In the case of `async` it's a macro which converts the procedure to an iterator generator so it can be used async
00:15:24FromDiscord<Elegantbeef> Othercases it's just talking to the compiler, and in some cases it's just a tag
00:15:40FromDiscord<biz> seems a tad confusing
00:15:48FromDiscord<Elegantbeef> It's not really
00:15:48FromDiscord<biz> could i ask you the same question but with an example?
00:16:02FromDiscord<Elegantbeef> If you have the question probably
00:16:26FromDiscord<biz> sent a code paste, see https://play.nim-lang.org/#ix=3TTd
00:16:26FromDiscord<biz> `{.event(discord).}`
00:17:22FromDiscord<biz> what does this seem to be used for?
00:17:24FromDiscord<Elegantbeef> Same thing as asnyc it modifies the procedure so the dimscord API can use it
00:17:38FromDiscord<Elegantbeef> https://github.com/krisppurg/dimscord/blob/d0444dfad3f982497e0ba35ae337b6895df23edb/dimscord/helpers.nim#L11-L12
00:17:48FromDiscord<Elegantbeef> It's a shorthand for adding a procedure to the event handler
00:18:08FromDiscord<biz> so its basically
00:18:13FromDiscord<biz> applying the event you created
00:18:15FromDiscord<biz> to the handler
00:18:35FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TTe
00:18:42FromDiscord<biz> very interesting
00:18:48FromDiscord<biz> i understand it a bit more now
00:18:58FromDiscord<Elegantbeef> When you have macros you can really make life easier using them
00:19:08FromDiscord<Elegantbeef> It might be a bit obscure at first but it can very much make it easier
00:19:18FromDiscord<biz> o
00:19:25FromDiscord<biz> i dont understanding exactly what the `{.` means
00:19:31FromDiscord<biz> but i understand how that was being used
00:19:53FromDiscord<Elegantbeef> It's just a pragma and in this case it's a call to that macro
00:20:03FromDiscord<Elegantbeef> Pragmas can be used for a lot of things, it depends on context
00:20:27FromDiscord<biz> ill make it a habit to use `{.events().}` in the bot, and maybe it will register more eventually
00:20:41FromDiscord<biz> so if `await` can be used without `{.async.}`, what does async provide?
00:20:47FromDiscord<Elegantbeef> `proc doThing() {.noSideEffect.}` for instance isnt a macro but is telling Nim that the procedure cannot have any side effect
00:21:01FromDiscord<Elegantbeef> await can only be used inside an async setting
00:21:14FromDiscord<Elegantbeef> async mutates a procedure to be awaitable
00:21:31FromDiscord<Elegantbeef> In Nim async is implemented 100% in user space, there is no code in the compiler explicitly for it
00:21:45FromDiscord<biz> so i dont have to use `{.async.}`?
00:21:58FromDiscord<biz> or i do?
00:22:04FromDiscord<Elegantbeef> For dimscord?
00:22:07FromDiscord<biz> just in general
00:22:15FromDiscord<Elegantbeef> Dimscord will add `async` to the procedure with `event`
00:22:18FromDiscord<biz> i come from lua and javascript
00:22:22FromDiscord<biz> so these concepts are a bit obsucre
00:22:23FromDiscord<Elegantbeef> If you want a procedure to be `async` you need to use it
00:22:24FromDiscord<biz> obscure
00:22:27FromDiscord<biz> In reply to @Elegantbeef "If you want a": okay
00:22:37FromDiscord<biz> i should use await for promises like normal
00:22:38FromDiscord<biz> correct?
00:22:58FromDiscord<Elegantbeef> I'm not one to really talk about async with, i've hardly touched it
00:23:05FromDiscord<biz> understandable
00:23:09FromDiscord<biz> nim seems pretty cool
00:23:13FromDiscord<Elegantbeef> I know how it works in Nim and that you use it if you have a bunch of IO
00:23:26FromDiscord<biz> why are your messages
00:23:30FromDiscord<biz> in the form of a webhook delivery?
00:23:34FromDiscord<Elegantbeef> I'm on matrix using a bridge
00:23:39FromDiscord<biz> matrix
00:23:40FromDiscord<biz> ?
00:23:53FromDiscord<Elegantbeef> This discord server is bridged to the IRC and Matrix protocls
00:24:18FromDiscord<Elegantbeef> Matrix is an open protocol for implementing multimedia clients
00:24:51FromDiscord<Elegantbeef> It has similar functionality to Discord but isnt proprietary and as such you can use a number of clients to access it
00:25:15FromDiscord<biz> hmm
00:25:33FromDiscord<biz> cool
00:25:42FromDiscord<biz> https://matrix.org/docs/projects/try-matrix-now/
00:25:44FromDiscord<biz> im checking it out
00:26:07FromDiscord<biz> what client are you using?
00:26:25FromDiscord<Elegantbeef> I'm using element right now, but i do want to eventually make my own 😛
00:26:58FromDiscord<biz> downloading element
00:34:11FromDiscord<biz> hi
00:34:13FromDiscord<biz> elegant
00:34:16FromDiscord<biz> i made an acc
00:34:28FromDiscord<biz> @nimc:matrix.org
00:35:01FromDiscord<Elegantbeef> Odd name if you're curious how to join here it's https://matrix.to/#/#nim:envs.net
00:39:17*yoyojambo joined #nim
00:40:21*yiggityswaps quit (Ping timeout: 245 seconds)
00:41:08FromDiscord<nimc> i figured it out
00:41:10FromDiscord<nimc> 😋
00:42:15FromDiscord<ok> meow
00:42:27FromDiscord<Elegantbeef> I regret everything in life
00:42:37FromDiscord<biz> why
00:42:40FromDiscord<Elegantbeef> You saying "meow"
00:42:46FromDiscord<Elegantbeef> Anyway this isnt nim related anymore
00:51:49*noeontheend joined #nim
00:59:03FromDiscord<Shinyzenith> I was wondering what the meow notification was 🤣🤣🤣
00:59:22FromDiscord<Elegantbeef> Some people that have keyboards shouldnt
01:00:52FromDiscord<huantian> what's wrong with meow lol
01:00:59FromDiscord<biz> fr
01:00:59FromDiscord<biz> meow
01:01:23FromDiscord<Shinyzenith> I think we should get back to nim talk
01:01:32FromDiscord<biz> i successfully installed nim just now
01:01:35FromDiscord<biz> that was pretty easy
01:01:45FromDiscord<Shinyzenith> Hope you enjoy the language
01:01:54FromDiscord<biz> will do 👍️
01:02:03FromDiscord<Elegantbeef> How'd you install it?
01:02:17FromDiscord<biz> used 64x
01:02:18FromDiscord<biz> zip folder
01:02:21FromDiscord<biz> unzipped
01:02:23FromDiscord<biz> moved to downloads
01:02:27FromDiscord<biz> put Nim/bin in path
01:02:33FromDiscord<Shinyzenith> Sounds like a bad idea
01:02:35FromDiscord<Elegantbeef> Ah ideally you use choosenim
01:02:37FromDiscord<Shinyzenith> A really bad one
01:02:43FromDiscord<biz> I do this with every lang
01:02:46FromDiscord<biz> even moonscript
01:02:57FromDiscord<Shinyzenith> Why this horrific method
01:03:01FromDiscord<biz> very simple
01:03:07FromDiscord<biz> and i know exactly where the nim binaries are
01:03:19FromDiscord<Elegantbeef> Had to check since i moved to debian, and ya debian sid actually has 1.6.4, that's amazing
01:03:33FromDiscord<Elegantbeef> The reason you want to use things like choosenim or rust up is easy versioning of the language
01:03:37FromDiscord<huantian> Isn't that to be expected from a rolling release repo
01:03:56FromDiscord<Shinyzenith> Yeah distro independent versioning is nice
01:04:07FromDiscord<biz> i like manual more
01:04:16FromDiscord<Elegantbeef> I was on ubuntu's package rep where it was super outdated so i had a very low bar
01:04:19FromDiscord<biz> the delays of msgs using the bridge is horrid
01:04:25FromDiscord<Elegantbeef> This is the first i've used a rolling distro 😛
01:04:29FromDiscord<biz> (edit) "is" => "are"
01:05:00FromDiscord<Elegantbeef> The bridge has issues on and off, sometimes it's fast othertimes it's slow. othertimes it crashes for a few
01:05:02FromDiscord<biz> element is like guilded and discord together
01:05:11FromDiscord<huantian> Ubuntu is just permanently out of date always
01:05:22FromDiscord<Elegantbeef> Yea i know
01:05:38FromDiscord<huantian> I used guilded for 1 second, realized they didn't allow arbitrary file types and dipped
01:05:41FromDiscord<Elegantbeef> I'm not an idiot just jokingly observing rolling is magical
01:05:58FromDiscord<biz> its so over complicated too
01:06:09FromDiscord<biz> id use element permanently but discord has more to offer
01:06:19FromDiscord<biz> also all the servers im in dont have bridges
01:06:19FromDiscord<biz> except this
01:06:38FromDiscord<biz> OMFG I JUST ACCIDENTALLY ACTIVATED LIGHT MODE
01:08:43FromDiscord<Elegantbeef> Just seen this library due to the submission to TMWN and damn is it nice https://github.com/can-lehmann/owlkettle
01:09:23FromDiscord<huantian> rolling is magical!
01:09:35FromDiscord<biz> is there a `nimble init`
01:09:38FromDiscord<biz> like that type of stuff
01:09:47FromDiscord<Elegantbeef> There is an `iniit`
01:09:52FromDiscord<Elegantbeef> `init` even
01:10:21FromDiscord<biz> should i do
01:10:24FromDiscord<biz> library
01:10:25FromDiscord<biz> or hybrid
01:10:51FromDiscord<biz> this is a cool ass fucking installer
01:10:52FromDiscord<Elegantbeef> Are you making a library or binary, or both?
01:10:59FromDiscord<biz> not sure
01:11:02FromDiscord<biz> would a bot be a binary
01:11:04FromDiscord<biz> seems like a binary
01:11:22FromDiscord<Elegantbeef> It only really matters if people do `nimble install myPackage`
01:11:38FromDiscord<Elegantbeef> simplescreenrecorder-2022-03-30\_19.10.20.mp4 https://media.discordapp.net/attachments/371759389889003532/958896319961923674/simplescreenrecorder-2022-03-30_19.10.20.mp4
01:11:48FromDiscord<biz> finished init
01:11:50FromDiscord<Elegantbeef> But yea this is less than 30 lines of code with owl
01:11:51FromDiscord<biz> i just did binary
01:12:12FromDiscord<Elegantbeef> Quite a nice library
01:12:29FromDiscord<biz> what exactly is `when`
01:12:37FromDiscord<Elegantbeef> compile time `if` that doesnt open a scope
01:12:57FromDiscord<biz> elaborate
01:13:17FromDiscord<Elegantbeef> It's used like `if` but for changing what a program does at compile time
01:13:28FromDiscord<Elegantbeef> Think platform specific compilation or specialized generics
01:13:34FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement
01:13:51FromDiscord<biz> so
01:13:55FromDiscord<biz> how could this be useful
01:14:20FromDiscord<huantian> oooh that's cool
01:14:25FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TTo
01:14:43FromDiscord<Elegantbeef> Slight issue with owlkettle lacking fixed height, but yea it's pretty nifty
01:14:48FromDiscord<biz> god damn pragma confusion
01:14:49FromDiscord<Elegantbeef> And my search algo is fucking garbage
01:14:52FromDiscord<biz> 😭
01:15:03FromDiscord<biz> i use windows..
01:15:17FromDiscord<Elegantbeef> Exactly the joke
01:15:19FromDiscord<aph> sent a code paste, see https://play.nim-lang.org/#ix=3TTp
01:15:25FromDiscord<huantian> I'm just lazy and always used kd's krunner, which works pretty well so I never looked into anythign else
01:15:27FromDiscord<Elegantbeef> WSL would count as \nix
01:15:33FromDiscord<aph> yay
01:16:08FromDiscord<biz> why do some people use `when` mid-code
01:16:12FromDiscord<Elegantbeef> Yea i'm just playing around with it right now, i do kinda want my own launcher
01:16:23FromDiscord<Elegantbeef> Cause their code requires platform or type specific logic
01:16:35FromDiscord<Elegantbeef> do you have an example?
01:16:39FromDiscord<huantian> for your linux binary, you don't want windows specific code
01:16:43FromDiscord<huantian> and vice versa
01:16:45FromDiscord<biz> no i dont remember
01:16:55FromDiscord<biz> so is it just for pre-compile
01:16:58FromDiscord<biz> i meant
01:17:01FromDiscord<biz> compile tinme
01:17:01FromDiscord<biz> time
01:17:03FromDiscord<congusbongus> when is a fancy ifdef
01:17:10FromDiscord<Generic> no it's a thousand times more powerful
01:17:16FromDiscord<biz> i just came to nim idk what the hell that is
01:17:20FromDiscord<Generic> you can plug in any constant value
01:17:21FromDiscord<huantian> image.png https://media.discordapp.net/attachments/371759389889003532/958897756552966234/image.png
01:17:31FromDiscord<congusbongus> it's a thousand times more fancy
01:17:53FromDiscord<Elegantbeef> Yea i've used kde before huan
01:17:53FromDiscord<biz> so the `when` in ur main file runs before anything else
01:17:58FromDiscord<Elegantbeef> No
01:18:05FromDiscord<biz> oh
01:18:13FromDiscord<Generic> Nim has no preprocessor
01:18:23FromDiscord<Elegantbeef> The compile checks the condition of `when` at compiile time and if it passes it then checks the body of the when
01:18:32FromDiscord<biz> i meant if you did like
01:18:35FromDiscord<biz> `when true:`
01:18:37FromDiscord<Elegantbeef> Only the true branch of a when elif is emitted
01:19:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TTr
01:19:18FromDiscord<Elegantbeef> This enables code that can run on different platforms, or can be specialized for a given type
01:19:32FromDiscord<biz> note to self im not going to use when anytime soon
01:19:35FromDiscord<biz> 😋
01:19:41FromDiscord<huantian> It can also be useful if you say have debug code, which you don't want to include in your release binaries at all
01:19:55FromDiscord<Generic> sent a code paste, see https://paste.rs/1Ch
01:20:00FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TTs
01:20:11FromDiscord<biz> so like
01:20:14FromDiscord<biz> in that case
01:20:18FromDiscord<biz> how is that better than `if`
01:20:18FromDiscord<huantian> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/958898344338554920): It can also be useful if you say have debug code, which you don't want to include in your release binaries at all, nor have a runtime check to see if this is a debug or rele
01:20:23FromDiscord<Elegantbeef> It's done statically
01:20:30*neurocyte861 joined #nim
01:20:34FromDiscord<Elegantbeef> Meaning for a string it only has `echo "Hello: ", a` in the body
01:20:43FromDiscord<Elegantbeef> and all the other types have `echo "Buh bye: ", a`
01:20:52FromDiscord<Elegantbeef> There is 0 runtime cost for the diferentiating logic
01:20:55FromDiscord<Generic> if you would use an if to check a generic type there would be an error
01:21:06FromDiscord<Elegantbeef> Well that aswell
01:21:08FromDiscord<biz> wtf↵(@Generic)
01:21:28FromDiscord<huantian> ok but if you're checking a generic type at runtime, why
01:21:37FromDiscord<Elegantbeef> Nim's statically typed doing `if x is int` a thing needed
01:21:40FromDiscord<Generic> generics only work at compile time
01:21:42FromDiscord<huantian> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/958898791547830363): ok but if you're checking a generic type at runtime, why↵it makes sense to do that checking at compile time, since it's already known then
01:21:46*yiggityswaps joined #nim
01:21:53FromDiscord<biz> im just going to use if atp
01:21:55FromDiscord<Generic> they're gone at runtime
01:21:55FromDiscord<biz> \:sob
01:21:58FromDiscord<biz> 😭
01:22:06FromDiscord<Generic> sent a code paste, see https://paste.rs/9YU
01:22:07FromDiscord<Elegantbeef> Yes you're only going to use `if` unless you need when
01:22:11FromDiscord<Elegantbeef> And you'll know when you need when
01:22:14FromDiscord<biz> if and when
01:22:19FromDiscord<biz> 😏
01:22:23*neurocyte86 quit (Ping timeout: 260 seconds)
01:22:24*neurocyte861 is now known as neurocyte86
01:22:33FromDiscord<biz> if and when i need it
01:22:37FromDiscord<biz> funny joke
01:22:43FromDiscord<Generic> that code I sent would break when a is not a string
01:22:48FromDiscord<Elegantbeef> In the case you need when you'll be going "I really wish i could run specific code for X thing"
01:23:01FromDiscord<biz> but how woul
01:23:02FromDiscord<biz> d
01:23:04FromDiscord<biz> if be any less specific
01:23:26FromDiscord<Elegantbeef> The issue the whole "only when branches that pass are considered"
01:23:44FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TTt
01:23:59FromDiscord<Elegantbeef> In this case `a.someOpe...` is checked so if `a is int` it attempts to call `a.someOpe...`
01:24:10FromDiscord<Elegantbeef> when in the case of `when` that branch isnt considered
01:24:17FromDiscord<Elegantbeef> so there is no compile time error
01:24:33FromDiscord<biz> do u mean a is string
01:24:38FromDiscord<Elegantbeef> No
01:24:46FromDiscord<biz> so why would it call it
01:24:47*yoyojambo quit (Ping timeout: 260 seconds)
01:24:59FromDiscord<Elegantbeef> In the case `a is int` the type system checks the type of `a.someOperation` and cause it cannot call it it errors statically
01:25:10FromDiscord<Elegantbeef> Nim is statically typed, if the programm is not type logical it errors
01:25:34FromDiscord<biz> do ints have any functions at all
01:25:43FromDiscord<Elegantbeef> if you have no `someOperation(a: int)` and you do `10.someOperation` it will error at compile time even if it's inside a `if false`
01:26:01FromDiscord<Elegantbeef> All nim procedures can be called `myProc(a)` or `a.myProc` so yes
01:26:14FromDiscord<biz> ill figure this all out in the future i hope
01:26:26FromDiscord<Elegantbeef> Well you cant figure it out in the past
01:26:34FromDiscord<biz> 🙄
01:26:41FromDiscord<huantian> and the present of the past is in the past
01:27:08FromDiscord<Elegantbeef> Like i said just use if and you'll be fine
01:27:32FromDiscord<Elegantbeef> In the case you need when the compiler will tell you
01:27:40FromDiscord<Elegantbeef> And by that i mean it'll say "I cannot compile this code"
01:28:25FromDiscord<Elegantbeef> It sounds like you've never used a static typed language before, so it'll be a learning experience but it'll be so much nicer
01:28:40FromDiscord<Elegantbeef> Weak/dynamic typed languages are tedious to write imo since you need to run code to see if there are problems
01:29:01FromDiscord<biz> ive used typescript, c++, and a few others
01:29:07FromDiscord<biz> i just never messed with nim
01:29:16FromDiscord<biz> i also used golang for a year
01:29:29FromDiscord<biz> types in golang r frustrating
01:30:46FromDiscord<Elegantbeef> Hell it has sub range types so `var a: 0..3 = 4` errors
01:30:47FromDiscord<Elegantbeef> Well Nim's type system is a treat if you like programs that statically assure safety
01:30:53FromDiscord<huantian> Me when I have to check generics at runtime with C# 😔
01:31:41FromDiscord<Generic> haha
01:32:03FromDiscord<biz> do you know if dimscord
01:32:05FromDiscord<biz> supports slash cmds
01:32:16FromDiscord<huantian> yeah it does
01:32:20FromDiscord<biz> ok thank you
01:32:23FromDiscord<biz> i found their
01:32:23FromDiscord<biz> docs
01:32:25FromDiscord<biz> on the wiki
01:32:31FromDiscord<huantian> at least I do remember seeing slash commands on dimscmd
01:32:31FromDiscord<biz> i want to get good with nim
01:32:41FromDiscord<biz> ive made bots in literally like
01:32:42FromDiscord<biz> 10 languages
01:32:45FromDiscord<biz> its how ive always started
01:39:07FromDiscord<biz> do you guys hacve any recommended
01:39:09FromDiscord<biz> vscode packages for nim
01:39:17FromDiscord<Elegantbeef> saem's is the best
01:39:47FromDiscord<biz> ty
01:39:48FromDiscord<biz> e
01:40:24FromDiscord<biz> i see no difference from
01:40:26FromDiscord<biz> the other one
01:40:31FromDiscord<biz> do i need to customize
01:40:49FromDiscord<huantian> I mean there's not much to see
01:41:08FromDiscord<huantian> it's just more stable and supports debuggin
01:41:40FromDiscord<huantian> there's not many visual changes
01:41:59FromDiscord<biz> ah
01:42:11FromDiscord<biz> can i use tab
01:42:15FromDiscord<biz> repl.it doesnt allow tabs
01:42:21FromDiscord<Elegantbeef> Nim only supports spaces
01:42:33FromDiscord<biz> horrid
01:43:08FromDiscord<Elegantbeef> It's a whitespace significant language that chose spaces due to places horrifically rendering tabs
01:43:19FromDiscord<biz> oh
01:43:31FromDiscord<Elegantbeef> Allowing both is a terrible idea, as such using the one that renders the most consistently is best for everyone
01:43:40FromDiscord<huantian> there's this cool button in vscode that makes it change from tabs to spaces
01:43:45FromDiscord<huantian> I'd recommend pushing ti
01:43:54FromDiscord<biz> so if i
01:43:55FromDiscord<biz> put a tab
01:43:57FromDiscord<biz> itll convert it
01:44:05FromDiscord<Elegantbeef> I mean that's the default
01:44:25FromDiscord<Elegantbeef> 99% of text editors insert spaces for tab keys
01:44:27FromDiscord<biz> where is this button
01:44:45FromDiscord<huantian> image.png https://media.discordapp.net/attachments/371759389889003532/958904653825863730/image.png
01:44:53FromDiscord<huantian> bottom right
01:45:36FromDiscord<biz> kk
01:46:05*yoyojambo joined #nim
01:48:31*yiggityswaps quit (Ping timeout: 250 seconds)
01:51:39nrds<Prestige99> With nimble, is there a way to differentiate between project dependencies and "developer" dependencies? E.g. if someone wants to use my seq2d library, they really don't need to download the testing framework I'm using
01:52:31FromDiscord<Elegantbeef> Nope disruptek had the same issue
01:56:02FromDiscord<biz> my bots online!
01:56:04FromDiscord<biz> \:D
01:56:09FromDiscord<biz> sent a code paste, see https://play.nim-lang.org/#ix=
01:56:17FromDiscord<huantian> 1?
01:56:23FromDiscord<biz> sent a code paste, see https://paste.rs/oMp
01:56:23FromDiscord<biz> my bad
01:56:29FromDiscord<biz> im new to this element shit
01:57:21FromDiscord<biz> welcome
01:57:34FromDiscord<aph> sup
01:58:01FromDiscord<huantian> 🌊
02:01:40FromDiscord<Elegantbeef> The owlkettle dev added fixed image size and told me how to fix my problem, so now i have a proper gui
02:01:43FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/958908920120872970/image.png
02:02:23FromDiscord<huantian> ooh nice
02:02:25FromDiscord<huantian> I see you use firefox, truely a man of culture
02:03:31FromDiscord<Elegantbeef> Now what's the best way to start a forked process in Nim... 😛
02:04:02FromDiscord<Elegantbeef> Rather a detatched process
02:04:07FromDiscord<huantian> stab it with the fork
02:06:12*Zectbumo joined #nim
02:06:21FromDiscord<huantian> I'd assume there's something in std/os
02:06:28FromDiscord<biz> 'std'
02:06:31FromDiscord<biz> weirdest term ever
02:06:33FromDiscord<biz> in coding
02:08:02FromDiscord<Elegantbeef> Seems like i can just do `startProcess`
02:15:57FromDiscord<ajusa> In reply to @biz "'std'": Shorter than writing out "standard" each time
02:16:11FromDiscord<Elegantbeef> But longer than `s`
02:16:14FromDiscord<biz> i think of
02:16:17FromDiscord<biz> std as
02:16:21FromDiscord<biz> sexually transmitted disease
02:16:22FromDiscord<biz> every time
02:16:24FromDiscord<biz> that is the issue.
02:16:27FromDiscord<biz> 😭
02:16:28FromDiscord<Elegantbeef> Well be giddy and carry on
02:16:41FromDiscord<congusbongus> ok it should be `sti` then
02:16:52FromDiscord<biz> sexually transmitted infection
02:26:12nrds<Prestige99> Elegantbeef thanks for the info, maye
02:26:24nrds<Prestige99> Maybe I should submit a pr to nimble*
02:26:27FromDiscord<Elegantbeef> My name's not maye, mate
02:26:40nrds<Prestige99> Phone is hard to type on :(
02:35:05FromDiscord<demotomohiro> Phone is hard type, but SSH to remote machine and writing Nim code on phone on my bed is nice 🙂
02:52:05FromDiscord<huantian> ah neato
02:52:13FromDiscord<huantian> not too much code nice
02:52:27FromDiscord<Elegantbeef> Yea it's quite simple, though some UX issuex
02:52:47FromDiscord<Elegantbeef> But eitherway it works lovely
02:53:56FromDiscord<Elegantbeef> Much better than i imagined it would be
02:55:43*noeontheend quit (Ping timeout: 260 seconds)
02:56:41nrds<Prestige|99> https://github.com/nim-lang/nimble/issues/506#issuecomment-755830324 well that works I guess
02:56:59nrds<Prestige|99> Still pretty odd to me that it isn't outright supported
03:00:28FromDiscord<retkid> if a programming language was a person
03:00:34FromDiscord<retkid> fuck marry kill
03:00:40FromDiscord<retkid> uhhh
03:00:48FromDiscord<retkid> JavaScript, Python, C
03:02:38nrds<Prestige|99> what does that even imply?
03:04:22FromDiscord<Elegantbeef> Let's be honest all three of those fuck you over writing them, and will drive you to want to kill someone
03:04:43FromDiscord<Elegantbeef> You'll wish you were married cause atleast that way you'd have something to look forward to when you're not writing those three
03:05:19FromDiscord<Elegantbeef> Also prestige today you're feeling different something \| off about you
03:07:29FromDiscord<retkid> The only language that fills be with that level of Existential dread is Java
03:07:38FromDiscord<retkid> I was offered a job in java and turned it down today
03:07:51FromDiscord<retkid> which is bad because its the only job I've been offered out of like 60 applications
03:08:48FromDiscord<retkid> I want java on my resume, but I don't want people to think I ACTUALLY want to write my code in it
03:09:11*arkurious quit (Quit: Leaving)
03:27:23FromDiscord<ShalokShalom> In .Net, it seems to be more and more accepted, when you apply as a F# developer. JVM seems to still require Java
03:27:39FromDiscord<michaelb.eth> In reply to @retkid "I was offered a": see if they'll let you write Clojure and compile it down class files 😄
03:27:42FromDiscord<ShalokShalom> Maybe because more devs are available
03:27:52FromDiscord<michaelb.eth> all you'd need is to provide a little shim for Java consumers
03:28:07FromDiscord<ShalokShalom> Issue is, your code lives further
03:28:20FromDiscord<retkid> In reply to @michaelb.eth "see if they'll let": I dont know Clojure
03:28:20FromDiscord<ShalokShalom> So they need to know, that they can find other Clojure devs
03:28:25FromDiscord<retkid> but it seems cool
03:28:26FromDiscord<ShalokShalom> Scala, Kotlin
03:28:30FromDiscord<retkid> I do know Kotli0n
03:28:32FromDiscord<retkid> (edit) "Kotli0n" => "Kotlin"
03:28:34FromDiscord<retkid> dont like it
03:28:37FromDiscord<ShalokShalom> So there you are
03:28:45FromDiscord<ShalokShalom> Its the recommended language in Android dev anyway
03:28:59FromDiscord<retkid> Kotlin is cool
03:29:02FromDiscord<retkid> but like
03:29:02FromDiscord<ShalokShalom> Scala is indendat now
03:29:03FromDiscord<retkid> not good
03:29:04FromDiscord<Equinox> In reply to @retkid "dont like it": why not?
03:29:06FromDiscord<retkid> y'jknow
03:29:07FromDiscord<michaelb.eth> Clojure is more fun, but yeah, has a learning curve and smaller hiring pool
03:29:09FromDiscord<retkid> (edit) "y'jknow" => "y'know"
03:29:15FromDiscord<ShalokShalom> (edit) "indendat" => "intended"
03:29:19FromDiscord<retkid> It just feels very generic c-like language
03:29:22FromDiscord<Equinox> In reply to @michaelb.eth "Clojure is more fun,": generally good income though
03:29:32FromDiscord<ShalokShalom> In reply to @retkid "It just feels very": Just on the surface
03:29:40FromDiscord<ShalokShalom> I dont like it for the same reason, though
03:29:45FromDiscord<Equinox> In reply to @Equinox "generally good income though": rated number one average pay on stack overflow
03:29:47FromDiscord<retkid> I know, im not the best Kotlin dev
03:29:55FromDiscord<retkid> and i know super crazy stuff i can do if i look further
03:30:05FromDiscord<ShalokShalom> In reply to @Equinox "rated number one average": Wasnt it F#?
03:30:06FromDiscord<michaelb.eth> and if Clojure isn't FP enough for you, go for Frege: https://github.com/Frege/frege
03:30:08FromDiscord<retkid> but when im doing really complex stuff, I would do it in something else
03:30:10FromDiscord<ShalokShalom> Guess that changes every year.
03:30:20FromDiscord<retkid> if that makes sesne
03:30:22FromDiscord<Equinox> In reply to @ShalokShalom "Wasnt it F#?": Clojure iirc
03:30:23FromDiscord<huantian> I should learn f# at some point, seems like a decent lang
03:30:30FromDiscord<retkid> F# looks cool
03:30:30FromDiscord<ShalokShalom> But thats also down to being used so much in financial institutes.
03:30:33FromDiscord<Equinox> In reply to @huantian "I should learn f#": it does seem very cool
03:30:37FromDiscord<retkid> I wanna get better at C# but I just...
03:30:38FromDiscord<retkid> eh
03:30:47FromDiscord<retkid> ehhhhhhhh
03:30:47FromDiscord<Equinox> In reply to @retkid "eh": I feel that
03:30:48FromDiscord<ShalokShalom> F# also looks very similar to Nim
03:30:54FromDiscord<huantian> C# is a decent lang imo
03:31:04FromDiscord<ShalokShalom> And type inference is quite a generation ahead
03:31:04FromDiscord<michaelb.eth> F# iiuc is basically OCaml for .Net
03:31:08FromDiscord<huantian> F# seems a Lot more functional than nim
03:31:13FromDiscord<michaelb.eth> definitely
03:31:19FromDiscord<Equinox> In reply to @huantian "C# is a decent": it's fine, I really think it is the epitome of average
03:31:19FromDiscord<ShalokShalom> In reply to @huantian "F# seems a Lot": Tooling is much improved
03:31:20FromDiscord<retkid> When i learn C# I'm like "I KNOW JAVA I DONT NEED TO DO THIS, ITSS OK CAROLINE"
03:31:28FromDiscord<retkid> (edit) "When i ... learn" added "try to"
03:31:41FromDiscord<retkid> The next language im learning is R
03:31:43FromDiscord<retkid> i swear to god
03:31:45FromDiscord<retkid> im gonna do it
03:31:50FromDiscord<ShalokShalom> In reply to @michaelb.eth "F# iiuc is basically": Tooling is much improved
03:31:53FromDiscord<Equinox> In reply to @retkid "The next language im": I don't like R
03:32:02FromDiscord<retkid> Ocaml is an odd lang
03:32:05FromDiscord<retkid> I wanna learn more
03:32:13FromDiscord<retkid> but its hard.
03:32:15FromDiscord<retkid> itss not an easy lang
03:32:17FromDiscord<ShalokShalom> OCaml has also more oddities.
03:32:29FromDiscord<michaelb.eth> I learned R decently well at one point, something of a brain bender, and there are crazy perf pitfalls all over the place
03:32:42FromDiscord<ShalokShalom> Its an older lang, F-Sharp solved most of its issues from the start.
03:32:52FromDiscord<ShalokShalom> Yeah, R is odd.
03:32:56FromDiscord<retkid> In reply to @ShalokShalom "Its an older lang,": does F sharp do ;;
03:33:00FromDiscord<retkid> i dont undestand the point of ;
03:33:04FromDiscord<retkid> (edit) ";" => ";;"
03:33:07FromDiscord<ShalokShalom> Most people in R do no or less other languages
03:33:13FromDiscord<retkid> I hate ;, ;; is twice as bad
03:33:26FromDiscord<ShalokShalom> No ;
03:33:33FromDiscord<retkid> oh neat
03:33:37FromDiscord<michaelb.eth> while R has a lot of marketshare, if you can pick, seems like Julia would be the way to go for data science and ML, if you don't want to use Python or Nim (Arraymancer, etc.)
03:33:38FromDiscord<ShalokShalom> I currently port a F# code to Nim
03:33:44FromDiscord<ShalokShalom> You could help :p
03:33:58FromDiscord<retkid> intereting
03:34:03FromDiscord<retkid> i still need to learn nim macros
03:34:10FromDiscord<retkid> yo I've been so busy doing nothing
03:34:12FromDiscord<retkid> lmao
03:34:41FromDiscord<retkid> planning the next project, applying for jobs, thinking about the concept of death, comming out to my mom
03:34:41FromDiscord<ShalokShalom> https://github.com/ShalokShalom/fsharp-nim/blob/master/dev-aspect.nim
03:34:43FromDiscord<retkid> (edit) "mom" => "mom, cooking"
03:34:48FromDiscord<ShalokShalom> lol
03:34:51FromDiscord<ShalokShalom> In that order
03:35:09FromDiscord<retkid> order of priority
03:35:10FromDiscord<retkid> yea
03:35:27FromDiscord<ShalokShalom> I already ported the type definitions
03:36:16FromDiscord<ShalokShalom> They look and feel very similar in both languages.
03:36:34FromDiscord<retkid> @ShalokShalom looking through your github for traditonal fshap
03:36:35FromDiscord<retkid> (edit) "fshap" => "fsharp"
03:36:40FromDiscord<retkid> do you have a good one
03:36:50FromDiscord<retkid> https://github.com/ShalokShalom/Love_and_scare
03:36:52FromDiscord<retkid> wait i got this
03:36:58FromDiscord<ShalokShalom> I am still a newbiw in programming in general
03:37:12FromDiscord<retkid> why do you have so many repos lmao
03:37:14FromDiscord<ShalokShalom> This is an early concept for a video game
03:37:21FromDiscord<ShalokShalom> Most are forks
03:37:27FromDiscord<ShalokShalom> For PRs
03:37:32FromDiscord<retkid> I KNOW
03:37:33FromDiscord<retkid> but likew hy
03:37:36FromDiscord<retkid> (edit) "likew hy" => "like why"
03:37:40FromDiscord<Elegantbeef> Did you ever port that to Nim?
03:37:43FromDiscord<ShalokShalom> typos and stuff 😛
03:37:54FromDiscord<ShalokShalom> In reply to @Elegantbeef "Did you ever port": Its at the current state
03:37:55FromDiscord<retkid> you're new to programming
03:38:01FromDiscord<retkid> but you got the programming energy down pat
03:38:01FromDiscord<ShalokShalom> Yes
03:38:15FromDiscord<retkid> you remind me of like a 40 year old who will be like
03:38:22FromDiscord<retkid> "I PROGRAMMED LISP ON MY MACBOOK IN 1872"
03:38:29FromDiscord<ShalokShalom> I am 33, soon 34
03:38:40FromDiscord<retkid> see
03:38:47FromDiscord<ShalokShalom> Yeah, I studied the history and some theory, before I jumped into practice
03:38:58FromDiscord<retkid> nah i just meet the energy
03:39:03FromDiscord<ShalokShalom> I see 🙂
03:39:04FromDiscord<retkid> mean
03:39:18FromDiscord<retkid> you say the word "neat" more tho
03:39:25FromDiscord<retkid> when someone says an interesting idea, go "neat"
03:39:44FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/958933591176409108/unknown.png
03:39:49FromDiscord<ShalokShalom> Nim has great bindings to Godot
03:39:54FromDiscord<ShalokShalom> F# is good on Unreal
03:39:58FromDiscord<retkid> they kinda suck
03:40:03FromDiscord<retkid> Idk
03:40:10FromDiscord<retkid> just use gdscript
03:40:12FromDiscord<retkid> be an adul
03:40:14FromDiscord<retkid> adult
03:40:20FromDiscord<ShalokShalom> Nah
03:40:35FromDiscord<ShalokShalom> I will study it for its tutorials
03:40:40FromDiscord<ShalokShalom> But not the actual game
03:40:57FromDiscord<ShalokShalom> I feel more comfortable, knowing I have a real programming language in my backhand
03:41:17FromDiscord<ShalokShalom> I also like it, because I can use the APIs to create UI applications.
03:41:31FromDiscord<retkid> its dificult
03:41:40FromDiscord<retkid> i tried to use godot to make a gui application
03:41:43FromDiscord<retkid> it was a bit difficult
03:41:48FromDiscord<retkid> very clunk
03:41:49FromDiscord<retkid> (edit) "clunk" => "clunky"
03:41:52FromDiscord<Elegantbeef> But between elcritches fidget widgets and owlkettle we're going to have nice Nim GUI applications 😛
03:41:58FromDiscord<ShalokShalom> https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b
03:42:24FromDiscord<ShalokShalom> In reply to @Elegantbeef "But between elcritches fidget": Yeah. I mean one is half way proprietary
03:42:31FromDiscord<ShalokShalom> And QT QML exists too.
03:42:31FromDiscord<Elegantbeef> No
03:42:45FromDiscord<Elegantbeef> Did you read 'fidget widgets'?
03:42:46FromDiscord<ShalokShalom> Well, the UI designer is
03:42:56FromDiscord<Elegantbeef> Again reread what i'm saying
03:43:02FromDiscord<Elegantbeef> I'm not talking about figma
03:43:04FromDiscord<ShalokShalom> Without UI designer, why would I prefer it to Godot
03:43:14FromDiscord<ShalokShalom> I know
03:43:28FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/9059
03:43:57FromDiscord<Elegantbeef> It's about making a declarative UI that uses widgets like a GUI TK so it'd lovely to use
03:44:17FromDiscord<huantian> You don’t need to use figma for fidget
03:44:27FromDiscord<Elegantbeef> look how simple that application launcher i wrote today using owlkettle is, it was like 30 loc for all the UI
03:44:42FromDiscord<ShalokShalom> I like to drag and resize and place my UI elements in a GUI
03:44:45FromDiscord<ShalokShalom> Not by code
03:45:08FromDiscord<Elegantbeef> And i dont like resizing or placing UI
03:45:10FromDiscord<ShalokShalom> Fidgets widgets add nothing to the eqation, that Qml has not already?
03:45:19FromDiscord<ShalokShalom> (edit) "eqation," => "equation,"
03:45:43FromDiscord<Elegantbeef> I mean it's native code that easily works with Nim code, so i'd say it does but YMMV
03:46:05FromDiscord<ShalokShalom> Wll, QML has GPU acceleration and tons of other features
03:46:21FromDiscord<ajusa> Owlkettle?
03:46:29FromDiscord<ShalokShalom> Particullary, I use KDE and would likely write some Plasma elements sooner or later
03:46:43FromDiscord<Elegantbeef> A nice declarative API for gtk https://github.com/can-lehmann/owlkettle
03:46:57FromDiscord<ShalokShalom> ... based on GTK
03:47:00FromDiscord<ShalokShalom> Thanks, NO!!
03:47:06FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3TTz is the afformentioned application launcher
03:47:20FromDiscord<Elegantbeef> Jesus people are unbearable about what GUI toolkit they use
03:47:40FromDiscord<ajusa> Interesting approach, good use of Nim as DSL
03:48:30FromDiscord<ajusa> But yeah I'd prefer something more cross platform (mobile use)
03:48:31NimEventerNew thread by Mardiyah: On multi nested macros (templates) in sparse argument pass, see https://forum.nim-lang.org/t/9061
03:48:55FromDiscord<ShalokShalom> https://www.youtube.com/watch?v=gGZyVSOnqm0
03:49:07FromDiscord<Elegantbeef> Yea i mean that's where fidget's widgets would be nice
03:49:10FromDiscord<ShalokShalom> In reply to @ajusa "But yeah I'd prefer": Qt is fully cross platform
03:49:13FromDiscord<ShalokShalom> Godot too 😛
03:50:01FromDiscord<ajusa> Yeah but they aren't as nice to work with as Fidget yet, as far as using them in Nim. Godot seems overkill though, it's a game engine
03:50:12FromDiscord<ShalokShalom> In reply to @ajusa "Interesting approach, good use": DSL looks nice, yeah
03:52:48*vicfred joined #nim
03:54:56*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
03:56:55FromDiscord<ShalokShalom> In reply to @ajusa "Yeah but they aren't": Recommendation https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b
03:58:28*Lord_Nightmare joined #nim
03:59:16FromDiscord<Elegantbeef> Also if figma is something you really dislike make support using https://github.com/akiraux/Akira or similar
04:13:11*rockcavera quit (Remote host closed the connection)
04:38:33*toulene quit (Quit: The Lounge - https://thelounge.chat)
04:49:00*slowButPresent quit (Quit: leaving)
05:04:19FromDiscord<treeform> If you don't like Figma there is Sketch, Adobe XD, InVision...
05:04:55FromDiscord<treeform> https://www.creative-tim.com/blog/web-design/adobe-xd-vs-sketch-figma-invision/
05:05:38FromDiscord<Elegantbeef> I mean their dislike is that it's not OSS
05:05:46FromDiscord<Elegantbeef> So Pencil or Akira are the solution to them
05:06:10FromDiscord<treeform> They would be hard pressed to find a Designer that knows Pencil or Akira...
05:06:49FromDiscord<Elegantbeef> That's hardly the point to them
05:06:58FromDiscord<Elegantbeef> They want a GUI designer that's OSS that works with fidget
05:07:15FromDiscord<treeform> That's a lot of filters there 🙂
05:07:47FromDiscord<treeform> I would like an OSS tool that makes crossplatform UIs easy too 🙂
05:08:37FromDiscord<Elegantbeef> Oh you reminded me of another one which is https://penpot.app/
05:08:47FromDiscord<Elegantbeef> So there's variety someone just has to write the code to support it
05:08:51FromDiscord<spoon> there's also ui's that rely on webkit
05:09:02FromDiscord<Elegantbeef> Eh we're talking native gui
05:09:52FromDiscord<spoon> would probably best be qt open source then
05:10:06FromDiscord<Elegantbeef> To be clear treeform i dont expect you to go out of you way to support any of these, i was more suggesting them to do it if they wanted it badly
05:11:46FromDiscord<spoon> actually, what was brought up about godot engine before, i know godot is being used as the ui in teslas and with nim bindings its def an option
05:12:01*kayabaNerve joined #nim
05:12:23FromDiscord<spoon> may be able to find professionals there and stick with the open source ecosystem
05:12:24FromDiscord<Elegantbeef> Yea that's what they've decided to use
05:12:33FromDiscord<spoon> nice
05:13:24FromDiscord<Elegantbeef> But given that fidget and other tools are OSS it seems like if they want to use fidget with a OSS UI designer they just have to put in the work
05:14:40FromDiscord<treeform> In reply to @Elegantbeef "Oh you reminded ": That actually looks pretty far along.
05:16:00FromDiscord<spoon> i feel like if you wanted to use nim and also wanted a designer, you'd have to at least be using an open standard like html or qml that can be implemented in different languages to get the wide range support, that or the #jobs channel
05:16:07*yoyojambo quit (Read error: Connection reset by peer)
05:16:26FromDiscord<Elegantbeef> Are you disregarding everything i say?
05:17:47FromDiscord<spoon> is fidget the nim library or am i dumb
05:18:10FromDiscord<Elegantbeef> Fidget is the nim library
05:18:10FromDiscord<Elegantbeef> Pencil, Penpot, Akira are opensource GUI designers
05:18:30FromDiscord<Elegantbeef> fidget has a figma extension to generate fidget code from figma
05:18:57FromDiscord<spoon> meant something with wide adoption but those are probably easy enough to port your skills to
05:19:02FromDiscord<Elegantbeef> So if one wanted to use an OSS tool they could look at one of the 3 designers i mentioned, see if they can generate fidget code just like the figma extension does and live happily in an OSS ecosystem
05:19:56*yoyojambo joined #nim
05:20:58FromDiscord<Elegantbeef> And i'm certain they'd atleast get one pat on the back from treeform, maybe even a gold star
05:21:49FromDiscord<spoon> how mature is fidget right now?
05:22:12FromDiscord<Elegantbeef> Presently in a rewrite but it works well for what it says it does
05:24:31*yoyojambo quit (Read error: Connection reset by peer)
05:24:37FromDiscord<spoon> i'll have to give it another shot, iirc last time i tried a year or so ago there were a few quirks
05:25:06FromDiscord<Elegantbeef> Well ideally you use it with figma to make your UI
05:25:16FromDiscord<Elegantbeef> But there is an initiative for making widgets for iit
05:25:55FromDiscord<spoon> figma is just for mockup, right?
05:26:15FromDiscord<Elegantbeef> It's a UI designer and there is a figma -\> fidget tool
05:26:45FromDiscord<spoon> huh. that's cool
05:30:22FromDiscord<spoon> have flutter and nim been combined before?
06:44:35FromDiscord<Phil> Ohhh that gtk package looked nice
06:44:39*neurocyte861 joined #nim
06:44:45FromDiscord<Phil> Makes me want to contemplate doing some native GUI application
06:45:01FromDiscord<Phil> (edit) removed "want to"
06:45:19*neurocyte86 quit (Ping timeout: 260 seconds)
06:45:27FromDiscord<Phil> Just don't really have a usecase unless I build a native client for my website which seems like a massive amount of wasted effort just to make stuff even smoother
06:45:33FromDiscord<Phil> Though I guess an android client could be nice...
06:53:31FromDiscord<enthus1ast> i find it interesting that most of the gui stuff talks about "design" but not small, fast, feature rich, stable and easy to develop and use native guis
06:56:20FromDiscord<enthus1ast> i was working for kfc several years, and they had a till system that was build for dos (yes MS DOS) the managment software looked like crap, but it was super fast, reliable, and all the work could be done by keyboard shortcuts. So you could do you stuff in seconds (literally). The newer system was windows c# was slow and buggy, but looked quite nice.
07:00:04FromDiscord<enthus1ast> Currently i have the feeling that, most of the "designed" guys, are throw away guis, build for the "average user" while the ugly guis, are build for professionals that needs work to be done
07:03:19FromDiscord<enthus1ast> s/guys/guis/
07:15:52FromDiscord<ShalokShalom> In reply to @Elegantbeef "Also if figma is": I dont like repeating things. What is figma adding over qml?
07:16:13FromDiscord<ShalokShalom> Which is fitting fine into my desktop
07:16:33FromDiscord<ShalokShalom> Sharing resources, being able to be themed in sync with my other apps
07:16:50FromDiscord<ShalokShalom> Being hardware accelerated, tons of other benefits
07:17:24FromDiscord<Rika> Probably gives more control to the designer with regards to how they want the app to look like
07:17:30FromDiscord<ShalokShalom> In reply to @treeform "I would like an": There are a couple, as we already discussed ^^
07:48:02*jmdaemon quit (Ping timeout: 260 seconds)
07:49:11FromDiscord<ShalokShalom> In reply to @spoon "actually, what was brought": In Tesla's, really?
07:49:56FromDiscord<ShalokShalom> Yeah, the Nim bindings are actually considered one of the best language bindings in Godot at all.↵↵The documentation even is good.
07:52:04FromDiscord<ShalokShalom> In reply to @Rika "Probably gives more control": How does QML limit that?
07:52:14FromDiscord<Elegantbeef> Well i like having a pure nim backend as it makes it easier to contribute to for me.↵(@ShalokShalom)
07:53:16FromDiscord<ShalokShalom> There is even also a non-free GUI designer, if you want that: https://doc-snapshots.qt.io/qtcreator-4.0/creator-using-qt-quick-designer.html↵↵But its still a far cry from Godoz
07:54:25FromDiscord<ShalokShalom> (edit) "There is even also" => "sent" | "non-free GUI designer, if you want that: https://doc-snapshots.qt.io/qtcreator-4.0/creator-using-qt-quick-designer.html↵↵But its still a far cry from Godoz" => "long message, see http://ix.io/3TUd"
07:55:54FromDiscord<ShalokShalom> sent a long message, see http://ix.io/3TUg
07:56:12FromDiscord<ShalokShalom> And I dont think much contributions are needed there. But idk 🤷🏻‍♂️
07:56:32FromDiscord<ShalokShalom> (edit) "🤷🏻‍♂️" => "🤔"
07:56:52FromDiscord<Elegantbeef> I mean i dont really see the downsides the way you see them
08:00:02FromDiscord<ShalokShalom> sent a long message, see https://paste.rs/5V4
08:00:16FromDiscord<Elegantbeef> What do you mean?
08:03:27FromDiscord<Rika> In reply to @ShalokShalom "How is the community": if they achieve whatever theyre trying to, I'm for sure to switch
08:03:32FromDiscord<Rika> and I'm thinking of helping
08:04:50FromDiscord<ShalokShalom> Awesome
08:04:55FromDiscord<ShalokShalom> In reply to @Elegantbeef "What do you mean?": https://github.com/nim-works/nimskull
08:05:16FromDiscord<Elegantbeef> I know what it is
08:05:25FromDiscord<Elegantbeef> I'm fucking apart of the organization somehow 😛
08:05:39FromDiscord<ShalokShalom> What you think about it?
08:05:49FromDiscord<Elegantbeef> I'm indifferent
08:06:29FromDiscord<Elegantbeef> There is a mixture of circle jerkiness and sincere want for betterment
08:06:30FromDiscord<ShalokShalom> I specifically welcome full type inference, while they had not answered my question about its inclusion
08:06:49FromDiscord<ShalokShalom> In reply to @Elegantbeef "There is a mixture": Sounds like how other projects could describe Nim
08:06:50FromDiscord<Elegantbeef> Ehh full type inference does not really make sense
08:07:41FromDiscord<ShalokShalom> F# does it
08:07:49FromDiscord<Elegantbeef> Sure
08:07:54FromDiscord<Elegantbeef> And F# is a FP language
08:07:54FromDiscord<ShalokShalom> Why does it make no sense in Nim
08:10:00FromDiscord<Elegantbeef> Eh it's just my view mostly, i dont see it working well
08:10:49FromDiscord<ShalokShalom> Well, f-sharp is functional first
08:11:11FromDiscord<ShalokShalom> You can even write it imperativ, down to GPUs
08:11:22FromDiscord<ShalokShalom> And I dont see, how this plays a role?
08:11:29FromDiscord<Rika> the type systems are different
08:11:40FromDiscord<ShalokShalom> Sure
08:11:43FromDiscord<Elegantbeef> I mean my point of it being an FP language is mostly "they do thinks funky anyway"
08:11:51FromDiscord<Rika> perhaps there are features in nim's type system that would not be compatible with D#'s
08:11:53FromDiscord<Rika> (edit) "D#'s" => "F#'s"
08:12:01FromDiscord<Rika> In reply to @Elegantbeef "I mean my point": so what? we do as well?
08:12:03FromDiscord<ShalokShalom> Could be
08:12:28FromDiscord<ShalokShalom> Andreas said he is not adding it, because he thinks "people should not be so lazy"
08:12:30FromDiscord<Rika> and the reverse would be a possibility
08:12:35FromDiscord<ShalokShalom> Sure
08:12:44FromDiscord<ShalokShalom> I think this is not really the point
08:13:00FromDiscord<Elegantbeef> Hey cant i just discredit it by saying it's FP 😛
08:13:01FromDiscord<ShalokShalom> Type inference is also something different as actual type checking
08:13:30FromDiscord<ShalokShalom> In reply to @Elegantbeef "Hey cant i just": No, not really↵↵Since I suspect the type inference, that is already in Nim, is using a lot of fp
08:13:37FromDiscord<Rika> im not sure, im not against inference
08:13:43FromDiscord<ShalokShalom> Thats at least how you develop such systems
08:13:50FromDiscord<ShalokShalom> Afaik
08:14:02FromDiscord<Rika> im against inference to the point that you dont need to write a single type in the proc signature hotugh
08:14:04FromDiscord<Rika> (edit) "hotugh" => "though"
08:14:17FromDiscord<Elegantbeef> Concepts \> typeless prcocedures
08:14:46FromDiscord<Elegantbeef> Full type inference is backwards and forwards no?
08:14:56PMunchThe flip side is that error messages get really tough
08:15:06PMunchThe error messages in F# are absolutely horrendous IIRC
08:15:31FromDiscord<ShalokShalom> In reply to @Rika "im against inference to": Well, thats the point↵↵F# handles it, by recommending it in functions, who get used in other files
08:15:36FromDiscord<Elegantbeef> Nim's type inference is relatively simple using the `typeof` part of the compiler to iterate down to the lowest nodes to figure out their type
08:15:46FromDiscord<ShalokShalom> Other than that, the editor can show it to you
08:15:55FromDiscord<Rika> then i'm wholly against it then
08:16:03FromDiscord<ShalokShalom> It makes the code more script like
08:16:05FromDiscord<Rika> i'd like some reverse type inference
08:16:06FromDiscord<Rika> no
08:16:10FromDiscord<Rika> i would hate that
08:16:15FromDiscord<ShalokShalom> Ah, I see
08:16:24FromDiscord<ShalokShalom> You dont need to use it
08:16:26FromDiscord<Elegantbeef> I mean you dont need to lose types to gain that functionality
08:16:28FromDiscord<Elegantbeef> I like concrete types
08:16:32FromDiscord<Rika> the reason i left python for nim is because of the type system
08:16:40FromDiscord<ShalokShalom> And you can require, that the compiler fills it in
08:16:44FromDiscord<Rika> i dont need to sure but if i read someone elses code then i do
08:16:50FromDiscord<ShalokShalom> In reply to @Rika "the reason i left": How is that comparable?
08:16:51FromDiscord<Rika> i want them on the file
08:16:57FromDiscord<ShalokShalom> You can
08:17:03FromDiscord<Rika> In reply to @ShalokShalom "How is that comparable?": i want to see the type without an editor
08:17:07FromDiscord<ShalokShalom> Elm does enforce such issues
08:17:11FromDiscord<ShalokShalom> I would be for that
08:17:16FromDiscord<Rika> on libraries i use?
08:17:21FromDiscord<ShalokShalom> You compile the code, it gets unified.
08:17:21FromDiscord<Elegantbeef> I mean you'd need to dynamically emit the concept
08:17:26FromDiscord<Rika> im not following you then
08:17:37FromDiscord<Rika> i read code without compiling most of the time
08:17:45FromDiscord<Rika> i read code without tools
08:17:52FromDiscord<ShalokShalom> All code that lands in the official repos, is formatted in the right style
08:18:02FromDiscord<Rika> then that's not like nim
08:18:07FromDiscord<Rika> nim doesnt enforce style
08:18:12FromDiscord<Rika> its not like it to do so
08:18:12FromDiscord<ShalokShalom> In reply to @Rika "i read code without": See how its done in Elm
08:18:28FromDiscord<ShalokShalom> They have an unified style over everything
08:18:35FromDiscord<Rika> thats not nim
08:18:41FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/2qs
08:18:41FromDiscord<Rika> thats not like nim to do so
08:18:54FromDiscord<ShalokShalom> You can even do it on save
08:19:03FromDiscord<ShalokShalom> Just dont confuse me
08:19:11FromDiscord<Rika> i'm confused as well
08:19:15FromDiscord<Elegantbeef> Generics should infer implementation restrictions anyway
08:19:17FromDiscord<Rika> i dont know what the issue is
08:19:21FromDiscord<ShalokShalom> Well, you get you code
08:19:46FromDiscord<ShalokShalom> In reply to @Rika "i dont know what": From all the concepts, I face as a newbie, type declaration is one of the most staggering
08:20:06FromDiscord<ShalokShalom> Its code smell, in my way and should die in hell
08:20:13FromDiscord<Rika> then i will say
08:20:17FromDiscord<Rika> you are using the wrong language.
08:20:22FromDiscord<ShalokShalom> Code density is important in Nim
08:20:29FromDiscord<ShalokShalom> No, I still prefer static types
08:20:48FromDiscord<ShalokShalom> Its just too cumbersome to have them in my code
08:21:03FromDiscord<ShalokShalom> At least how its written in most languages
08:21:08FromDiscord<Rika> well to me
08:21:08FromDiscord<ShalokShalom> Haskell does a good job here
08:21:09FromDiscord<Rika> removing that
08:21:19FromDiscord<Rika> will nullify the benefit to static typing to me
08:21:38FromDiscord<ShalokShalom> You can see it in your editor
08:21:43FromDiscord<Rika> i dont use plugins
08:21:45FromDiscord<ShalokShalom> Always
08:22:01FromDiscord<ShalokShalom> In F#, you just hover over the piece of code
08:22:05FromDiscord<Rika> i dont want to do that
08:22:13FromDiscord<Rika> i dont want to use a plugin to see what type my shit is
08:22:15FromDiscord<ShalokShalom> There is even an online snippet platform, that shows that
08:22:22FromDiscord<ShalokShalom> Its not a plugin
08:22:26FromDiscord<Elegantbeef> Rika doesnt use tools to read code
08:22:27FromDiscord<Rika> i want it on the file, written, not dynamically changed until i change what i wrote
08:22:28FromDiscord<ShalokShalom> Its the standard language plugin
08:22:33FromDiscord<Rika> i dont USE PLUGINS
08:22:38FromDiscord<ShalokShalom> Aha
08:22:43FromDiscord<Elegantbeef> rika uses vim with a syntax highlighter
08:22:50FromDiscord<ShalokShalom> Well, then come of the middle age
08:22:56FromDiscord<Elegantbeef> Atleast i hope they have a syntax highlighter
08:23:07FromDiscord<Rika> i use neovim with the nim plugin only for the semantic highlighting and even then its whatever, i could live with none
08:23:09FromDiscord<ShalokShalom> I think this is hindering newbies to come to the language
08:23:21FromDiscord<Elegantbeef> It's really not
08:23:22FromDiscord<Elegantbeef> Type definitions are simple and concrete
08:23:29*vicfred quit (Quit: Leaving)
08:23:57FromDiscord<Elegantbeef> Introducing extremely unclear logic would hinder noobs
08:24:11FromDiscord<Elegantbeef> You're the only person i've ever heard about go "Damn i hate declaring types"
08:24:11PMunchAnd the poor error messages that stem from it
08:24:30PMunchWell, some people say it, then they try a typed language and quickly changes their mind
08:24:54FromDiscord<Rika> if i read code on my browser like github now what the fuck do i do? if i print my code (and i imagine i would) what?
08:25:00FromDiscord<ShalokShalom> We cant cater to the diehards and then potential new people at the same time
08:25:04FromDiscord<Rika> of course
08:25:07FromDiscord<Rika> so we chose the diehards
08:25:10FromDiscord<Elegantbeef> You do my least favourite thing and play compiler rika
08:25:17FromDiscord<Rika> i do that already
08:25:23FromDiscord<ShalokShalom> @PMunch Do you know the messages from Elm?
08:25:27FromDiscord<Rika> yes we do
08:25:33PMunchYes, they are super verbose
08:25:36FromDiscord<ShalokShalom> They are quite well known for being superior
08:25:38FromDiscord<Rika> its a lot of work to incorporate those
08:25:40FromDiscord<Rika> its nice i say
08:25:44FromDiscord<ShalokShalom> Not only verbose
08:25:52FromDiscord<ShalokShalom> Precise
08:26:01FromDiscord<ShalokShalom> And most of it all: Helpful
08:26:08*Zectbumo quit (Remote host closed the connection)
08:26:14FromDiscord<ShalokShalom> I dont think type inference ruins error messages
08:26:17PMunchWhen I tried it it was a matter of reading the message through once, then just recognising the pattern of the message and reading the one word that actually mattered in it
08:26:22FromDiscord<ShalokShalom> You probably have that from Haskell
08:26:35PMunchNah, I have that from F#
08:26:50PMunchHaven't really used Haskell a lot
08:26:52FromDiscord<ShalokShalom> Well, from when? Its much improved today
08:26:59FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/959005878017736724/image.png
08:27:01FromDiscord<Elegantbeef> This is just noise
08:27:07PMunchThis was like half a year ago or something
08:27:14FromDiscord<Rika> noise for the experienced, helpful for the new
08:27:18FromDiscord<ShalokShalom> Well, for a newbie its important information
08:27:28FromDiscord<Rika> theres no fix for this other than to have two versions of output
08:27:28FromDiscord<ShalokShalom> I find it quite elitist, to say that
08:27:45FromDiscord<Rika> and thats work no one seems to be willing to do
08:27:55FromDiscord<ShalokShalom> We will never grow, so long as we push away those, who are new and interested
08:28:21FromDiscord<Elegantbeef> It's not really elitist when it takes a whole paragraph to say "Invalid type got\: string expected html"
08:28:27FromDiscord<ShalokShalom> The noise doesnt really matter
08:28:27PMunchIt's not elitist, we all agree that Elm error messages are better for newcomers. But they are really distracting if you know what you're doing, and they take a lot of work to implement.
08:28:46FromDiscord<ShalokShalom> Its worth it.
08:28:55FromDiscord<Elegantbeef> I do love that i'm accused of pushing those who are new and interested away
08:28:55PMunchAnd we don't push away anyone, I spend hours helping newcomers both here and on the forum
08:28:56FromDiscord<Rika> you may not see it
08:29:02FromDiscord<Rika> you said yourself you're not very experienced
08:29:23FromDiscord<ShalokShalom> Its also a lot of work to do a programming language in the first place
08:29:27FromDiscord<Elegantbeef> For most of the day this is like "Beef helps people the Nim channel"
08:29:29FromDiscord<Rika> and you said yourself it's elitist to say "i like this because its better for me, or the kind i am"
08:30:05FromDiscord<Rika> again i said there isnt a single solution here
08:30:16FromDiscord<ShalokShalom> No, I think its elitist, to say "I am so experienced, I dont need this. And so newbies are not getting it anyway"
08:30:28PMunchThat would be elitist, yes
08:30:30FromDiscord<Rika> its either the nice helpful messages for newbies, yet noise for experienced, or concise errors for the experienced, yet jargon for the newbies
08:30:33PMunchBut that's not what we're saying
08:30:36FromDiscord<ShalokShalom> @PMunch You would need to help less, if the compiler does that
08:30:49FromDiscord<Rika> yes indeed
08:31:10FromDiscord<ShalokShalom> Well, that's what I got
08:31:17PMunchWe're all in agreement that they are better for newcomers. I wouldn't mind if someone went through and implemented error messages like that. But I'd prefer it if it was able to be turned down to a less verbose version
08:31:22FromDiscord<Elegantbeef> We've digressed from full type inference
08:31:39FromDiscord<ShalokShalom> Same as "full type inference won't let me use tech from 1970, so I am wholly against it"
08:31:41FromDiscord<Phil> I don't think I see why full type inference would be desireable or why type declarations are bad
08:31:52FromDiscord<ShalokShalom> Since they are noise
08:31:54FromDiscord<Phil> They're a clarification and debugging help
08:31:55FromDiscord<Elegantbeef> Oh pmunch you havent seen my application launcher i made today! 😛
08:32:07FromDiscord<Rika> okay
08:32:08PMunchBut that takes a lot of work, and I'd rather have the brilliant people working on the Nim compiler spend their time on more important features
08:32:25FromDiscord<Elegantbeef> Hey dont call me brilliant!
08:32:27FromDiscord<Phil> You read code 10 times more than you write it. Having it clear what type a variable is makes it more readable. I completely disagree with type declarations being noise
08:32:29FromDiscord<ShalokShalom> In reply to @Isofruit "They're a clarification and": Well, but you can have them, when you are debugging and reading code, and NOT needing to type them.
08:32:56FromDiscord<ShalokShalom> In reply to @PMunch "But that takes a": More important than helping newbies, you mean.
08:33:02FromDiscord<Elegantbeef> Also no one noticed my procedure mismatch message cleanup so no more error message cleanup
08:33:09FromDiscord<Rika> okay
08:33:09FromDiscord<ShalokShalom> And I am talking about Nimskull
08:33:10PMunchSince one is type declarations noise? You're just being concrete and telling both the reader and the compiler exactly what you expect. This means that errors can be more concise
08:33:22FromDiscord<ShalokShalom> Andreas had been clear, that he will never do this.
08:33:37PMunch@ShalokShalom, yes, more important than helping newcomers. There's no point for new people to learn Nim if the language isn't great
08:33:37FromDiscord<Rika> i highly doubt those in nimskull would do it
08:33:51PMunchSo let's have the compiler devs work on how to make the language great first
08:33:55FromDiscord<ShalokShalom> In reply to @PMunch "Since one is type": I dont have to tell that. Fsharp figures it out. And is mostly right about it.
08:34:03FromDiscord<Rika> In reply to @ShalokShalom "I dont have to": keyword mostly?
08:34:07PMunch@ShalokShalom, not in my experience
08:34:13FromDiscord<ShalokShalom> In reply to @PMunch "<@208199869301522432>, yes, more important": The language is great already
08:34:16FromDiscord<ShalokShalom> Otherwise
08:34:57PMunchAs a professional programmer with a degree in computer science I had a hard time understad F# error messages because types somehow trickled through my entire program so I could get an error messages popping up with line numbers miles away from the actual source of the bug
08:35:12FromDiscord<ShalokShalom> In reply to @Rika "keyword mostly?": Yeah, by far. Very few exceptions. As said, its common agreement, that we use declarations for functions, that do get used in other files.
08:35:15PMunch@ShalokShalom, well it is pretty great, but there is room for improvement
08:35:33FromDiscord<ShalokShalom> In reply to @Rika "i highly doubt those": Then we dont need to talk about it.
08:35:54PMunchBesides, most of the newcomers who try Nim seems to be very happy with how easy it is to learn it. I haven't had a single person in here (bar you) complaining about type inference
08:35:59FromDiscord<Elegantbeef> So pmunch i'm never going to use XLunch again, https://streamable.com/bt7237 😛
08:36:07PMunchNooo :(
08:36:13PMunchMy lovely xlunch
08:36:21FromDiscord<Phil> I've learned my lessons of variables without type annotations, I've come to the conclusion that in terms of what type I have where I want to be explicit to give clarity about the data you're dealing with at any given moment.↵Which is an opinion shared at my working environment so far.
08:36:24FromDiscord<ShalokShalom> In reply to @PMunch "Besides, most of the": Because they dont know it
08:36:43FromDiscord<ShalokShalom> F# is literally the only language, that can do it, and actually encourages it
08:36:51FromDiscord<Elegantbeef> Nim can do it
08:37:11FromDiscord<Elegantbeef> `proc doThing(a: auto)` there we did it
08:37:18FromDiscord<ShalokShalom> Haskell is too complicated for it to work, particularly due to type classes↵↵And Elm adds it, if you dont provide it ↵They want it in code also
08:37:25PMunch@Elegantbeef, wait, why didn't you just theme xlunch to look like that?
08:37:30PMunchInstead of writing your own program?
08:37:41FromDiscord<Elegantbeef> Cause xlunch uses the DSV and not desktop files
08:37:51FromDiscord<ShalokShalom> But every fsharp dev, who actually uses it, compared to theorising about it, can not think the language without it
08:38:00PMunchWell it has a script that converts desktop files to that dsv
08:38:06PMunchWhich is what I use on my system
08:38:07FromDiscord<Solitude> sucks for them
08:38:13FromDiscord<Elegantbeef> Sure but i dont want to run that whenever i open a program
08:38:20FromDiscord<ShalokShalom> In reply to @Elegantbeef "Nim can do it": This is new to me. When did this get added?
08:38:21FromDiscord<Elegantbeef> Well i mean install
08:38:26FromDiscord<Rika> In reply to @ShalokShalom "This is new to": long time ago
08:38:28FromDiscord<Rika> no one uses it
08:38:29PMunchOf course not, that's why it reads the DSV file instead
08:38:30FromDiscord<Rika> guess why
08:38:33PMunchIt's sort of like a cace
08:38:35PMunchcache*
08:38:36FromDiscord<Solitude> In reply to @ShalokShalom "This is new to": what is not new to you?
08:38:46FromDiscord<Elegantbeef> Yea pmunch exactly my point
08:38:54FromDiscord<Elegantbeef> Also this is like 100 loc
08:38:57FromDiscord<Elegantbeef> So why not write a new launcher 😛
08:38:59PMunchI've been meaning to write a small Nim program which functions like a small daemon, reading desktop files and keeping the DSV up to date
08:39:03FromDiscord<ShalokShalom> In reply to @Isofruit "I've learned my lessons": Well, that experience is 100% tied to the implementation you are using
08:39:05FromDiscord<ShalokShalom> Obviously
08:40:01FromDiscord<ShalokShalom> In reply to @Rika "long time ago": Well, it would be helpful to add it to the documentation, which is suited for newboes
08:40:07FromDiscord<haxscramper> Getting to type inference where regular typing barely works in a lot of cases is too ambitious for me
08:40:09FromDiscord<ShalokShalom> (edit) "newboes" => "newbies"
08:40:15FromDiscord<haxscramper> Even putting aside personal preferences
08:40:28FromDiscord<Rika> oh heres the lead nimskull guy i'd say
08:40:31FromDiscord<Elegantbeef> Ah there's the circle jerky i've grown to love
08:40:32FromDiscord<ShalokShalom> In reply to @haxscramper "Getting to type inference": Of course, nobody asked for this.
08:40:56FromDiscord<Phil> It isn't, it's about the experience you have while reading a given codebase.↵"What type was variable X again? Got to look at place Y to figure out"↵Type is integral information about how a function will work and I don't want to have to infer that information myself while reading.
08:41:06FromDiscord<ShalokShalom> You just look at it
08:41:13FromDiscord<haxscramper> In reply to @Rika "oh heres the lead": I'm temporary super busy IRL, so for now I'm on vacation from nimskull
08:41:13FromDiscord<Rika> In reply to @Isofruit "It isn't, it's about": his argument is that tooling will help
08:41:15FromDiscord<Rika> and yes i get it
08:41:17FromDiscord<ShalokShalom> With the solution I propose, you can always do that
08:41:26FromDiscord<hmmm> hey broskis, can hashset[string] somehow match a partial string that hit? like if the string was something like "path:C:\\blabla" can I write if "path..." in hashset?
08:41:37FromDiscord<Elegantbeef> No
08:41:37FromDiscord<Rika> no that doesnt work
08:41:52FromDiscord<Rika> partial matching makes everything a lot more complicated
08:42:08FromDiscord<Elegantbeef> You want a `seq` and `startswith`
08:42:17FromDiscord<ShalokShalom> It would so help, if people could see in practice
08:42:31FromDiscord<ShalokShalom> Then they would not be blended by the idea, that they have of it
08:42:41FromDiscord<ShalokShalom> And see the reality
08:42:42FromDiscord<hmmm> hmm ok, I finally got my options working with set[enum] but those options need some metadata and storing them in hashset seemed neater than using seq
08:43:16FromDiscord<Elegantbeef> Well you want to use substrs to find a value
08:43:24FromDiscord<Elegantbeef> You need to use a different collection
08:43:32FromDiscord<hmmm> hmm I see
08:43:38PMunch@hmmm, what you could do if you're doing paths is put all of the sub-paths in the hashset
08:43:45PMunchNot super efficient, but would work
08:44:06PMunchOf course a better solution would be a proper string search tree
08:44:08FromDiscord<hmmm> hmm depending on the options the metadata can be a path or not
08:44:23PMunchWhat are you doing here?
08:44:29FromDiscord<Rika> In reply to @PMunch "Of course a better": dont we have some impl of this?
08:44:29FromDiscord<Elegantbeef> Perhaps time to stop using strings
08:44:32FromDiscord<Elegantbeef> Types exist
08:44:38PMunchIt sounds like you're hand-rolling some weird dynamically typed thing
08:45:01PMunch@Rika, not exactly sure, if not someone should write it
08:45:25FromDiscord<hmmm> nununu we got types nailed down it works and I don't want to change them, I'll fiddle with options some more and find another way
08:45:37FromDiscord<Elegantbeef> "Types nailed down"
08:45:38FromDiscord<Elegantbeef> Uh oh
08:45:39FromDiscord<hmmm> lol
08:45:43FromDiscord<hmmm> 😃
08:45:56FromDiscord<Elegantbeef> That's 'type decls suck' a second time in one night
08:45:59FromDiscord<Rika> it works until it doesnt
08:46:14PMunch@hmmm, what problem are you trying to solve?
08:46:24FromDiscord<Rika> i really get what he means now though
08:47:44FromDiscord<hmmm> I'm having my app that is basically 90% ready for github I think, I'm adding some non core side options and those options can came with additional data I need to store, I have a metadata field prepared for it and need to decide if it needs to be string, seq, set or whatever
08:48:13FromDiscord<Rika> maybe it's a minor(maybe not so minor) inconvenience when i encounter "detyped" code in the wild, if nim were to gain full inference, but i can see some benefit
08:48:15FromDiscord<Elegantbeef> Pmunch do you by anychance know why some .desktops have `%U` in there `Exec` variable?
08:48:20FromDiscord<Rika> i can see demerits too though
08:48:33FromDiscord<Rika> how would the inference work anyway
08:48:52FromDiscord<Elegantbeef> Reverse inference and inferred concepts for parameters
08:48:54PMunch@Elegantbeef, https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables
08:49:04PMunchYes, it's a list of URLs that can be passed in
08:49:06FromDiscord<Rika> i dont know about the inferred concept thing
08:49:11FromDiscord<Rika> its going to be annoying for errors
08:49:17FromDiscord<Rika> "oh we inferred this for you"
08:49:27FromDiscord<Elegantbeef> Ah so it doesnt matter to my launcher
08:49:43PMunchWell, not in it's current state
08:49:54FromDiscord<Elegantbeef> Not ever
08:50:05PMunchBut if you wanted to add support for a "Open file with" kind of thing then it might matter
08:50:18FromDiscord<Elegantbeef> I'm the guy that uses `dmenu` and `rofi` in desktop mode
08:50:24FromDiscord<Elegantbeef> I dont use it to run commands
08:51:04PMunchYeah just saying, that's what those are for
08:51:29PMunchAnd I've added a bunch of stuff to xlunch I thought I'd never have to use :P
08:53:59FromDiscord<Elegantbeef> I mean i'm basically writing a desktop mode launcher
08:54:01FromDiscord<Elegantbeef> It's nothing fancy
08:54:40FromDiscord<Elegantbeef> I'm very happy with the UI library i used though
08:54:52FromDiscord<Zoom> Maybe you can use a trie for this? Query all leafs of the tree that start with your key. Unfortunately, would work only for starts of the strings.↵(@hmmm)
08:54:56FromDiscord<Elegantbeef> The UI code is less than my search logic
08:55:38PMunchWhich UI library is it?
08:55:55FromDiscord<Elegantbeef> Owlkettle
08:56:13FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3TUs full code if interested
08:56:13PMunchAaah, yes that did look interesting
08:56:42PMunchI love that we can write full programs in 100 lines of code
08:56:57FromDiscord<Elegantbeef> It's something
08:57:15PMunchWhy is view a method?
08:57:37FromDiscord<Elegantbeef> Owlkettle uses OOP for extending app state
08:58:02PMunchAah, I see
08:58:05FromDiscord<Elegantbeef> Could it be statically dispatched, probably
08:58:32PMunchYeah probably
08:59:00PMunchBut for UI OOP is fine
08:59:20*jjido joined #nim
08:59:25FromDiscord<Elegantbeef> Yea
08:59:36FromDiscord<Elegantbeef> Have the macro for it anyway
09:00:42*jjido quit (Client Quit)
09:03:32*gsalazar_ joined #nim
09:03:51*gsalazar_ quit (Remote host closed the connection)
09:06:40*gsalazar quit (Ping timeout: 272 seconds)
09:17:42FromDiscord<ShalokShalom> In reply to @Rika "maybe it's a minor(maybe": As said. You save, compile, or do anything of that sorts: The types get immediately added to your code. You upload only code that is fully declared.
09:18:24FromDiscord<Elegantbeef> So you're mutating source code files as their being written?
09:18:30FromDiscord<Elegantbeef> they're\
09:19:31FromDiscord<ShalokShalom> Yes
09:20:02FromDiscord<Elegantbeef> That's wildly unsafe and an IO nightmare
09:20:03FromDiscord<ShalokShalom> Elm is doing so since 10 years or something, they forcibly format the code on compilation and everybody is happy
09:20:29FromDiscord<ShalokShalom> IDK why this would be dangerous
09:20:43FromDiscord<Elegantbeef> Cause you have IO going both ways now
09:20:52FromDiscord<ShalokShalom> Both ways?
09:21:09FromDiscord<ShalokShalom> Idk how Elm has implemented this, but surely not in an unsafe way
09:21:12FromDiscord<Elegantbeef> I'm typing and as i'm typing the tooling is pooping out into my buffer
09:21:24FromDiscord<ShalokShalom> I have never heard about any issue with it, nor even mentioning that it could be an issue
09:21:34FromDiscord<ShalokShalom> In reply to @Elegantbeef "I'm typing and as": No, its not like that
09:21:37FromDiscord<ShalokShalom> On compilation
09:21:41FromDiscord<ShalokShalom> Optionally on save.
09:21:46FromDiscord<Elegantbeef> > You save, compile, or do anything of that sorts
09:21:57FromDiscord<ShalokShalom> Yeah, ditch that anything of that sorts
09:22:15FromDiscord<ShalokShalom> That was more meant for the case, someone might know about another point in time, to apply this
09:22:27FromDiscord<ShalokShalom> Its mainly done on compilation
09:22:29*jjido joined #nim
09:22:42FromDiscord<Rika> In reply to @ShalokShalom "As said. You save,": i mean its still an annoyance, if i'm reading github code and it isnt forced to be typed
09:22:53FromDiscord<ShalokShalom> In reply to @Rika "i dont know about": I really recommend, you see this in real code
09:23:02FromDiscord<ShalokShalom> In reply to @Rika "i mean its still": It is!
09:23:13FromDiscord<ShalokShalom> You cannot upload anything, without being formatted.
09:23:24FromDiscord<ShalokShalom> One thing is, that Elm also hosts its package repository.
09:23:31FromDiscord<Rika> if its only type formatted sure, but i want my code to be readable in my way
09:23:37FromDiscord<Rika> In reply to @ShalokShalom "One thing is, that": nim doesnt lol
09:23:37FromDiscord<ShalokShalom> Nothing there is allowed unformatted.
09:23:49PMunchThat would require every editor to know this (spoiler, they wont)
09:23:58FromDiscord<ShalokShalom> In reply to @Rika "if its only type": Well, Elm enforces a certain way. But we can do this only for types.
09:24:05FromDiscord<ShalokShalom> In reply to @PMunch "That would require every": No, why?
09:24:19FromDiscord<ShalokShalom> Its just done by the compiler
09:24:25FromDiscord<ShalokShalom> It is actually part of the compiler, iirc
09:24:29PMunchTo add types into the file when you save them?
09:24:45PMunchOh so you compile and upload a compilation artifact instead of source code?
09:24:56PMunchThat sounds.. Strange
09:25:05FromDiscord<Rika> i mean nim is all about strange no?
09:25:09PMunchAnd what happens if I use the edit feature on a PR in GitHub?
09:25:29FromDiscord<Rika> well i assume its not t ogithub in elms case
09:25:54PMunchThere has actually been cases of languages which didn't use text formats for their sources
09:25:58PMunchBut rather binary formats
09:26:09PMunchSo you would need a compatible editor to even open the code
09:26:31PMunchThey haven't really caught on though
09:26:51FromDiscord<Rika> in nim's case whos to say though that "i'll use nim compilers upload option to upload my proj"
09:27:00FromDiscord<Rika> they can easily bypass that for our case
09:27:04FromDiscord<Rika> so thats not really feasible
09:29:33FromDiscord<Elegantbeef> You guys arent storing your nim code as a Json AST tree?
09:29:57FromDiscord<Elegantbeef> The tree is on json so no that's not redundant
09:30:19FromDiscord<aph> ohh, i can store ast in json?
09:30:32FromDiscord<aph> that might help a bit, am writing a transpiler from python to nim
09:30:34FromDiscord<Rika> oh god see what you did beef
09:30:45FromDiscord<Elegantbeef> Lol
09:30:51FromDiscord<Elegantbeef> I made a joke
09:30:54FromDiscord<Phil> Beef says one line
09:30:58FromDiscord<Phil> Immediately spawns a sin
09:31:06FromDiscord<aph> In reply to @Isofruit "Immediately spawns a sin": guess i'm the sin
09:31:09FromDiscord<aph> 😈
09:32:25*lumo_e joined #nim
09:34:19FromDiscord<ShalokShalom> In reply to @Rika "in nim's case whos": Well, not if you make that law in Nimskull
09:34:33FromDiscord<Rika> which likely wont
09:34:51FromDiscord<Rika> how do you make it law anyway?
09:35:06FromDiscord<ShalokShalom> In reply to @PMunch "Oh so you compile": No, you just add them, where they belong. How you would normally add them, just by the compiler. The inference becomes visible
09:35:18FromDiscord<Elegantbeef> You neuter the compiler so it follows your 3 tenants
09:35:20FromDiscord<ShalokShalom> In reply to @Rika "how do you make": Well, look at Elm 😛
09:35:26FromDiscord<Rika> we're not elm
09:35:29FromDiscord<Rika> we dont have the same structure
09:35:36FromDiscord<ShalokShalom> I am not talking about Nim
09:35:37FromDiscord<Rika> we dont have a single central repo
09:35:41FromDiscord<Rika> we dont want a single central repo
09:35:48FromDiscord<Rika> nimskull follows nim
09:35:49FromDiscord<Elegantbeef> We are legion
09:35:49FromDiscord<ShalokShalom> As said, Andreas has already said he wont do full inference
09:35:56FromDiscord<Rika> nimskull will not vary too much from nim
09:35:59FromDiscord<Rika> i doubt they will
09:36:04FromDiscord<Elegantbeef> I know saem he's also opposed to it iirc
09:36:21FromDiscord<Rika> i cant imagine disruptek liking this at all lmfao
09:36:24FromDiscord<Elegantbeef> He wants to have concepts be used more
09:36:29FromDiscord<Rika> we're mentioning nimskull devs btw
09:36:32FromDiscord<Elegantbeef> Saem that is
09:36:43FromDiscord<ShalokShalom> In reply to @Rika "we dont want a": Well, you could still make it yourself. Like downloading a file and converting it yourself. It would just miss the Github visibility of types.
09:37:09FromDiscord<Tanguy> You can already do full inference with auto, what more do you want?
09:37:13FromDiscord<ShalokShalom> In reply to @Rika "i doubt they will": Well, then its done.
09:37:37FromDiscord<ShalokShalom> In reply to @Tanguy "You can already do": Thats a good step in the right direction. When you type it, you still add noise
09:37:52FromDiscord<ShalokShalom> So more dense code which is in line with Nims strategy
09:37:53PMunchYou say noise, I say clarity
09:38:05FromDiscord<ShalokShalom> 🤷‍♂️
09:38:06FromDiscord<Tanguy> You can probably write a macro which adds auto everywhere
09:38:07FromDiscord<Rika> this is an opinion thing really
09:38:07FromDiscord<Phil> I'll stick with Pmunch on that one
09:38:27FromDiscord<ShalokShalom> If I like clarity, I hover with the mouse over it.
09:38:30FromDiscord<Elegantbeef> You cannot write a macro that inserts auto everywhere
09:38:37FromDiscord<Rika> and many people dont want to do that
09:38:40FromDiscord<Phil> That's 2 seconds of my life wasted repeatedly
09:38:52FromDiscord<Phil> 5 variables, make that 10 seconds + mouse-movement-time
09:38:56FromDiscord<Rika> this is super opinionated really
09:39:19FromDiscord<Rika> i mean programming languages in general are
09:39:22FromDiscord<Rika> opinionated
09:39:48FromDiscord<Tanguy> Nim is amongst the less opiniated one, since he generally lets you choose what you want
09:40:19FromDiscord<Elegantbeef> Also how do you do type inference with sub range types?
09:40:24FromDiscord<Phil> ~~I feel like that word does not suffice for describing some compilers out there but in general I agree~~
09:40:31FromDiscord<Rika> having choice is an opinion as well, some would argue
09:40:37FromDiscord<Rika> otherwise people would hate go
09:40:42FromDiscord<ShalokShalom> In reply to @Isofruit "That's 2 seconds of": To me, its time wasted reading this
09:40:50FromDiscord<Rika> "well you dont have to read it"
09:40:50FromDiscord<ShalokShalom> Since in most cases, I dont want
09:40:58FromDiscord<ShalokShalom> In reply to @Rika ""well you dont have": Its code noise
09:41:04FromDiscord<ShalokShalom> You neither have to read Java code noise
09:41:07FromDiscord<Elegantbeef> I'm actually interested in how type inference handles subrange types
09:41:18FromDiscord<ShalokShalom> Ask F# 😛
09:41:43FromDiscord<Elegantbeef> > Alas, the F# type system doesn't provide a way to define a subrange type -- that is, a type representing some subset of the values representable by an existing type.
09:41:45FromDiscord<ShalokShalom> https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system
09:41:49FromDiscord<Phil> In reply to @ShalokShalom "Its code noise": I mean, the other way around could be described as code obfuscation
09:41:54FromDiscord<Rika> we dont use HM type system
09:41:55FromDiscord<Elegantbeef> It doesnt support subrange types
09:42:04FromDiscord<ShalokShalom> Its an answer to his question
09:42:09FromDiscord<Rika> there are concepts in nim which arent compatible with the HM system i am led to believe
09:42:27FromDiscord<Elegantbeef> Well subrange types is a an example that doesnt work with type inference
09:42:37FromDiscord<Elegantbeef> You cannot infer an integer should be within 0..10
09:42:47FromDiscord<Elegantbeef> Unless you have `if x in 0..10` of course
09:43:03FromDiscord<Tanguy> `assert x in 0..10`, and then smart compilers which reads the predicate
09:43:19FromDiscord<Rika> so flow typing
09:43:22FromDiscord<Elegantbeef> Hey i know you read my RFC so shush 😛
09:43:46FromDiscord<haxscramper> @sh_oe why not argue for better lsp that would completet the types for you somehow?
09:43:54FromDiscord<haxscramper> And also plugin to hide types in editor
09:43:56FromDiscord<Rika> wrong ping lol
09:44:06FromDiscord<haxscramper> @ShalokShalom
09:44:07FromDiscord<haxscramper> Righ
09:44:32FromDiscord<haxscramper> Anyway, it would be easier to hide things you don't like then restructure the whole world
09:44:37FromDiscord<Tanguy> :p though it's programming by contract, not just your rfc
09:44:42PMunchOh yeah, @hmmm I say you asked yesterday for a ternary type (true, false, falsefalse) and got recommended a Option[bool], another option (aport from enums) would be to return a range[0..2] type https://play.nim-lang.org/#ix=3TUy
09:45:09FromDiscord<Zoom> Don't we all?
09:45:25FromDiscord<Elegantbeef> I'm very vocal about encouraging concept usage
09:45:43FromDiscord<Phil> Did they get moved out of the experimental section yet?
09:45:44FromDiscord<Elegantbeef> No hax dont say "they dont work"
09:45:49FromDiscord<Elegantbeef> No they're still there
09:45:56FromDiscord<Elegantbeef> Doesnt meant you cant use them
09:46:04FromDiscord<Elegantbeef> Hax stop typing
09:46:07FromDiscord<haxscramper> I couldn't figure out how to use them
09:46:15FromDiscord<Elegantbeef> I swear if you write "they dont work" i'm flying to you
09:46:24FromDiscord<Phil> From what I get so far, you essentially just do compile time asserts in them
09:46:35FromDiscord<haxscramper> I mean, I'm willing to give the benefit of the doubt, but they literally don't work for me
09:46:43FromDiscord<haxscramper> I would also like concepts
09:46:54FromDiscord<haxscramper> I really love the idea
09:47:00FromDiscord<haxscramper> Just like view types
09:47:11FromDiscord<Elegantbeef> I'll give you view types not working
09:47:16*xet7 quit (Remote host closed the connection)
09:47:24FromDiscord<Elegantbeef> 99% of the time i run into a codegen error
09:47:25FromDiscord<Zoom> That's what I think to myself when people start bashing Rust \:P↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
09:47:25FromDiscord<haxscramper> And i even agree with clybber that it is worth expending energy to make old concepts work
09:47:31FromDiscord<ShalokShalom> In reply to @haxscramper "And also plugin to": For me, its mostly that I dont know them in advance. Most of the type, I want types to have the same handle as the variable/function name, or something sane as default. I dont like to care for types. Same as you want to rely on an airbag, and not caring for it while driving.
09:48:30FromDiscord<haxscramper> I'd you didn't want to care for types you would be using dynamic language
09:48:39FromDiscord<haxscramper> That's where types are airbag
09:48:53FromDiscord<ShalokShalom> It works in F#
09:49:01FromDiscord<haxscramper> If everything blows up at least there some safety after the impact
09:49:16FromDiscord<haxscramper> But airbag does not prevent impact
09:49:18FromDiscord<ShalokShalom> Ergonomics of dynamic languages, stability and refactoring of static languages
09:49:27FromDiscord<Zoom> I'd prefer to not care about names instead, they are noise, not types.↵(@ShalokShalom)
09:49:37FromDiscord<ShalokShalom> Sometimes
09:49:48FromDiscord<ShalokShalom> Then, you dont like to add types even more
09:49:50FromDiscord<Elegantbeef> No more paramters we just do `MyType[0]`
09:50:03FromDiscord<ShalokShalom> Why not just imply [auto]?
09:50:07FromDiscord<ShalokShalom> That would already help
09:50:13FromDiscord<ShalokShalom> I like to have it out of my way.
09:50:17FromDiscord<Phil> ... oh shite, I just looked at my first draft of a "SearchableModel" Concept... I understand none of it anymore, like half of it is macros and templates ;_;
09:50:18FromDiscord<Elegantbeef> Cause implying auto is a mess
09:50:30FromDiscord<ShalokShalom> Then its not good
09:50:37FromDiscord<ShalokShalom> I assume that just some type deduction?
09:50:42FromDiscord<ShalokShalom> Not some real inference
09:50:44FromDiscord<Elegantbeef> No it's generic
09:50:48FromDiscord<ShalokShalom> Well -.-
09:50:57FromDiscord<Elegantbeef> Auto means it takes in any type
09:50:57FromDiscord<ShalokShalom> Why do you offer it to me as a solution anyway
09:51:02FromDiscord<Elegantbeef> And if the instantiation failes it fails
09:51:04FromDiscord<ShalokShalom> Oh, even worse.
09:51:08FromDiscord<Elegantbeef> Cause it works the same as type inference
09:51:10FromDiscord<ShalokShalom> Thats not type inference.
09:51:12FromDiscord<ShalokShalom> No
09:51:13FromDiscord<ShalokShalom> Hell not
09:51:24FromDiscord<ShalokShalom> Inference does not mean it takes any type
09:51:40FromDiscord<ShalokShalom> Inference means, its intelligently infers the type for you
09:51:49FromDiscord<ShalokShalom> It knows, which type is mostly meant.
09:51:56FromDiscord<ShalokShalom> You cannot just use it as a dynamic language
09:51:59FromDiscord<ShalokShalom> Thats horrible
09:52:17FromDiscord<Elegantbeef> The difference between `auto` and F# type inference is an instantiation error vs descriptive error
09:52:19FromDiscord<Phil> "Determine the type that must be there for me at compile time" vs "Accept any type at runtime" I think is where the hang up is, auto is the latter I assume?
09:52:28FromDiscord<Elegantbeef> No
09:52:35FromDiscord<Elegantbeef> Both are static at compile time
09:52:49FromDiscord<ShalokShalom> Inference in F# knows which type is meant. 95% of the time.
09:52:51FromDiscord<Elegantbeef> F# type inference in parameters is identical to unconstrained generic polymorphism
09:53:00FromDiscord<ShalokShalom> Sometimes you have to go on and add more code, so that it works.
09:53:01FromDiscord<Tanguy> Yes you can beef
09:53:02FromDiscord<Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3TUz
09:53:11FromDiscord<ShalokShalom> Or add the type temporarily
09:53:14FromDiscord<Elegantbeef> You said everywhere
09:53:26FromDiscord<Tanguy> Oh right, the good old "can't push custom macros"
09:53:27FromDiscord<ShalokShalom> How you mean?
09:53:43FromDiscord<Tanguy> (edit) "https://play.nim-lang.org/#ix=3TUz" => "https://play.nim-lang.org/#ix=3TUB"
09:54:11FromDiscord<Elegantbeef> How do i mean what?
09:55:12FromDiscord<Elegantbeef> F#'s type inference generates what Nim considers a concept and it fails the predication before instantiation instead of during instantiation
09:55:31FromDiscord<Elegantbeef> The way to do what you want is really with manual concepts in Nim
09:56:21FromDiscord<ShalokShalom> You mean, how to do something that I want automatic, is done by hand?
09:56:41FromDiscord<Elegantbeef> Nim isnt magic what you want isnt going to magically appear
09:56:43FromDiscord<ShalokShalom> Manual concepts sound like I have to care about them again.
09:57:00FromDiscord<ShalokShalom> I didnt ask for it to magically appear.
09:57:08FromDiscord<ShalokShalom> And I didnt ask for it in Nim
09:57:18FromDiscord<Elegantbeef> I'm going to sleep so have fun
09:57:21FromDiscord<ShalokShalom> I know it wont come in Nim.
09:57:24FromDiscord<ShalokShalom> Good night
09:57:24FromDiscord<Phil> Move debate to offtopic if not nim related?
09:57:27FromDiscord<ShalokShalom> Sleep well
09:57:35FromDiscord<ShalokShalom> It was Nimskull related.
09:58:47FromDiscord<Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3TUC
09:58:59FromDiscord<Tanguy> (edit) "https://play.nim-lang.org/#ix=3TUC" => "https://play.nim-lang.org/#ix=3TUD"
09:59:05*msimm joined #nim
10:00:42FromDiscord<Zoom> Nimskull has a whole Matrix space with a bunch of channels there\: #nimworks\:envs.net↵(@ShalokShalom)
10:01:30FromDiscord<Phil> Which is why I'm tempted to still suggest offtopic
10:06:22FromDiscord<ShalokShalom> At all started, since I wanted to hear the opinion of people here about Nimskull
10:06:26FromDiscord<ShalokShalom> Its over now.
10:11:50FromDiscord<qb> I'm trying to hit a pattern on a byte string without any libraries. Any ideas? https://play.nim-lang.org/#ix=3TUH
10:14:00FromDiscord<Phil> I haven't actually worked with bytestrings before, but from a glance of it, could you try to use as pattern a seq of sets of bytes?
10:14:14FromDiscord<Phil> With a given set containing all allowed bytes for that position
10:15:47FromDiscord<Phil> If the implementation is allowed to be naive then you could do the naive way and iterate over the bytes, look for a hit where a byte matches the first set in your byte-set-seq and try to match all other sets
10:18:07*Gustavo6046 quit (Ping timeout: 250 seconds)
10:19:15FromDiscord<Phil> Hmm you'd still need "matches any" placeholders, so maybe rather a `seq[Option[Set<<Whatever type a bytestring has>>]]` and a custom `contains(s: string, pattern: Option[Set[<bytestringtype>]]): bool` that returns true when Option is none
10:20:14FromDiscord<Phil> (edit) "`seq[Option[Set<<Whatever type a bytestring has>>]]`" => "`seq[Option[Set[byte-type or something]]]`" | "Option[Set[<bytestringtype>]]):" => "Option[Set[byte-type or something]]):"
10:23:39PMunch@qb, your problem is that you don't stop when you hit a match
10:24:20FromDiscord<Phil> Ohhhh this was a "I have a bug" question
10:25:32PMunchThis works @qb: https://play.nim-lang.org/#ix=3TUL
10:28:23PMunchWait, that's not right. This is right: https://play.nim-lang.org/#ix=3TUO
10:29:57FromDiscord<Phil> Is the intent to get the starting index of the first hit?
10:30:20FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3TUQ
10:30:38PMunch@Phil, oh wait, in that case my version is not right either :P
10:30:48PMunchIt would return the last index of the character in the pattern
10:30:53PMunchFor the first match
10:31:31FromDiscord<Phil> Check, I was unsure whether qb wanted that or the number of matches
10:31:36PMunchI assumed that was what they wanted
10:32:04FromDiscord<Phil> Makes sense, getting the index of the first isn't much of an addition either way
10:32:21PMunchAh well, if they want number of matches it's a simple matter of not having `return` where I have it, but rather `hitChars = 0; inc result`
10:32:38FromDiscord<Phil> Could also just go result - pattern.len()
10:32:47PMunchBut they where increasing the result in their original version, so I assumed it would be the position
10:32:57PMunchYeah, that's pretty much how you'd solve that
10:33:20PMunchOr if you're cheeky start of result at negative pattern length ;)
10:34:10PMunchMy version would return bytes.len in the case the pattern was not found as well, which is a bit strange :P
10:36:52*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
10:38:08FromDiscord<Phil> Petition to make the return type an optional
10:44:35PMunchHmm, someone should add support for automatic sentinel values in Option
10:45:10PMunchIf I return Option[Positive] or Option[range[0..100]] it should just pick a number outside of the range and use that as a sentinel value
10:45:17PMunchAvoids having a separate bool field
10:51:39FromDiscord<Zoom> I remember I suggested something like that with someone here or on the forum, may be it was Hax.↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
10:53:44FromDiscord<Zoom> That would be Type Specialization, in cpp lingo, right?
10:56:23PMunchHmm, I'm unable to find any good results for that term
10:56:27PMunchBut maybe
10:56:55PMunchThis would be pretty easy to add in Nim
10:57:38PMunchOption is already specialised for pointer types (although that seems to be a super bad idea
10:57:40PMunch)*
10:59:34FromDiscord<Zoom> It's interesting to try to implement some generic way to specialize for all range types.
11:00:05PMunchShouldn't be that hard I think
11:00:48PMunchGet the underlying base type, check high and low for the range and find a point that is outside of that but still inside the base type
11:00:55PMunchThis could also work for enums of course
11:22:36*msimm quit (Quit: Leaving)
11:25:23*xet7 joined #nim
11:28:26FromDiscord<ShalokShalom> Where do I find docs about concepts?
11:28:29FromDiscord<ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/959051551593345064/unknown.png
11:29:31PMunchhttps://nim-lang.org/docs/manual_experimental.html#concepts
11:32:25FromDiscord<ShalokShalom> Thanks a lot
11:33:01FromDiscord<ShalokShalom> Well, that is awesome, and I didnt knew Nim has type classes
11:33:12FromDiscord<ShalokShalom> But idk how this should replace type inference
11:33:26FromDiscord<ShalokShalom> As Elegantbeef has suggested
11:40:49FromDiscord<Forest> How hard would it theoretically be to make a JVM backend for Nim? What would be the limitations/potential complications?
11:45:19FromDiscord<Rika> making the backend
11:45:23FromDiscord<Rika> is the complication
11:45:27FromDiscord<Rika> xd
11:45:49FromDiscord<Rika> maybe the general compatibility of the ideas of nim with the JVM
11:48:27FromDiscord<ShalokShalom> In reply to @Forest "How hard would it": It already does.
11:48:46FromDiscord<Forest> Wdym?
11:48:47FromDiscord<Forest> @ShalokShalom
11:48:53FromDiscord<Forest> Nim doesn't have a JVM backend
11:48:53FromDiscord<Rika> jnim is not a jvm backend i believe
11:48:55FromDiscord<Forest> Only JS
11:49:04FromDiscord<Forest> In reply to @Rika "jnim is not a": Yeah that's just JNI bindings
11:49:12FromDiscord<ShalokShalom> GraalVM
11:49:14FromDiscord<Forest> In reply to @Rika "maybe the general compatibility": Hm fair
11:49:24FromDiscord<ShalokShalom> It compiles LLVM code
11:49:27FromDiscord<Forest> In reply to @ShalokShalom "GraalVM": I don't understand how you'd compile native code to the JVM with Graal tho
11:49:33FromDiscord<ShalokShalom> https://en.wikipedia.org/wiki/GraalVM
11:49:35FromDiscord<Forest> In reply to @ShalokShalom "It compiles LLVM code": Oh?
11:50:05FromDiscord<ShalokShalom> https://www.graalvm.org/22.0/reference-manual/llvm/
11:50:32FromDiscord<ShalokShalom> I think you could run theoretically Javascript code as well, so basically every compilation target is supported.
11:50:37FromDiscord<Forest> Hm neat, but i still have no idea how I'd do that lol
11:50:53FromDiscord<ShalokShalom> Well, you compile LLVM code. Graal is indifferent to that
11:51:00FromDiscord<ShalokShalom> If you compile Rust, Nim or Haskell
11:51:19FromDiscord<ShalokShalom> Graal does care only about LLVM or its other implementations.
11:51:20PMuncheu
11:51:32FromDiscord<Forest> But how would you access Java classes and libraries lol
11:51:43FromDiscord<ShalokShalom> Read the documentation.
11:52:08FromDiscord<Forest> To me the main reason I'd want a JVM backend for Nim would purely be for the syntax, Java is just bleh, Scala and Kotlin don't fit the bill either
11:52:11FromDiscord<Forest> Hm fair enough
11:53:22PMunchSorry, I was testing out my keyboard
11:53:37PMunchTurns out I have a wire that's come loose
11:53:49PMunchSo it kept spamming random keys
11:54:09FromDiscord<ShalokShalom> https://www.graalvm.org/22.0/reference-manual/llvm/Interoperability
11:55:05FromDiscord<ShalokShalom> In reply to @Forest "To me the main": You know Scala 3 is fairly different, a complete redesign including optional "indentation to build blocks"?
11:55:41FromDiscord<Forest> Hm, I'll check it out again later
11:55:45FromDiscord<ShalokShalom> In reply to @Forest "To me the main": Only issue is, that this is not compatible with normal JVM. So in a company, you wont be allowed using it
11:55:59FromDiscord<ShalokShalom> While you wont be allowed using Nim in the first place, so ..
11:56:02FromDiscord<Forest> Oof fair
11:59:04*toulene joined #nim
12:01:00FromDiscord<ShalokShalom> Hmm, maybe it would make sense, to advertise this more?
12:03:42FromDiscord<Rika> if you want, its a non-goal for nim i believe
12:05:49PMunchDepends on the company, I've been sprinkling some Nim here and there at work
12:07:28FromDiscord<Phil> Given I do webdev, the ecosystem would need to fast track development of quite a few packages very significantly before mine would even begin to contemplate
12:08:09PMunchI do a little webdev in Nim, but it's mostly the server side
12:08:19FromDiscord<Phil> They would need an opinionated fully encompassing framework to make it work
12:08:49PMunchAh, they're that kind of crowd
12:08:54FromDiscord<Phil> I was actually only referring to the server side
12:09:03FromDiscord<Phil> Frontend is angular
12:10:25FromDiscord<Phil> Basically if we can expand prologue to fully become like Django with Django rest framework but in nim then we've got a starting point
12:11:17PMunchWait, what part of Django is it missing
12:11:24PMunchNot very familiar with Django
12:11:27FromDiscord<Phil> In reply to @PMunch "Ah, they're that kind": Current experience is that even if the framework has an intended way of doing things people develop around it
12:11:38FromDiscord<Phil> (edit) "In reply to @PMunch "Ah, they're that kind": Current experience is that even if the framework has an intended way of doing things people develop around it ... " added "sometimes"
12:14:39PMunchOh I almost forgot about this: https://github.com/PMunch/webexperiment
12:14:56PMunchWould probably work much better with ARC
12:15:13PMunchI wonder how ARC works across dynamic libraries
12:15:51FromDiscord<Phil> Django signals, fully encompassing database management, a fully featured orm (norm doesn't do views and can't deal with nosql), plug and play elasticsearch integration, async logging appender
12:15:59FromDiscord<Phil> Off the top of my head
12:16:15PMunchAh I see
12:17:01PMunchIf Nim provided a better way to identify modules I'd do some more work on superlog as well
12:17:13PMunchORMs are hard though
12:19:15*slowButPresent joined #nim
12:19:29FromDiscord<Phil> Yeh. What bugs me is that in norm I can't fetch a record of table a and all records with a fk pointing to that record from table b in one query
12:20:32FromDiscord<Phil> Not sure if the Django orm could do that, but in norm you have to fetch every many to x relationship to your record in a separate query
12:21:04PMunchOUch, that's not great
12:22:47FromDiscord<Phil> For my usecase that's fine, the way my stuff is structured I'll never fetch a seq of entries and then query the many to x relationship of every single one
12:22:50FromDiscord<Phil> But damn
12:23:29FromDiscord<Phil> Still means that if I want to look at the full data of one entry I'll be doing 6 queries at times
12:25:11FromDiscord<Phil> Do we actually have a good messaging system in norm? Something like active q
12:25:24FromDiscord<Phil> (edit) "active q" => "activemq"
12:25:39FromDiscord<Phil> (edit) "norm?" => "nim?"
12:29:05FromDiscord<Phil> Actually, we wouldn't need our own messaging system, just clients for activemq
12:30:00PMunchI'm using librdkafka in my applications, works fine
12:31:23FromDiscord<ajusa> does anyone know why Nim's JS backend doesn't use string/js objects directly as backing for a nim string and a Nim table? Instead a Nim string is an array of bytes and a Table is the entire internal representation, which is very inefficient.
12:32:11PMunchProbably for compatibility with Nim libraries, but I'm not sure
12:32:41PMuncharray of bytes shouldn't be inefficient though, is it?
12:33:04FromDiscord<ajusa> well it's a whole Javascript array, so it's implemented in JS rather than in the native JS engine
12:34:08FromDiscord<ajusa> each "byte" is actually 8 bytes from my understanding, so a string takes up 8x the memory because it's actually an array of numbers less than 256 (but the JS engine doesn't know that)
12:34:31PMunchOh yikes, that's not great
12:35:07PMunchI thought the Nim JS target was pretty good at doing stuff which made JS able to optimise things
12:36:01FromDiscord<ajusa> but the last time someone tried making the default std library more compatible with the JS backend I think araq shut it down: https://github.com/nim-lang/Nim/pull/17373#issuecomment-896623016↵it's kind of a pain to pull everything into a new module though
12:36:27FromDiscord<ajusa> In reply to @PMunch "I thought the Nim": I mean it's acceptable but there's a lot of performance being left behind
12:36:31FromDiscord<ShalokShalom> In reply to @Rika "if you want, its": Well, it doesnt need a goal, in the sense of Nim has anything to do for it.
12:37:39FromDiscord<ajusa> especially the table thing though - Nim's implementation has the entire hashing function implemented in JS, which is probably 10x slower than just using an object. Thankfully `jsffi` has a type called JsAssoc which is basically a table, but it doesn't have all of the procs from `std/tables` so it isn't great either.
12:37:52FromDiscord<ShalokShalom> But if someone else is implementing it on such a huge platform, why would we ignore that
12:39:40PMunch@ajusa, I'm guessing that's why the tables module isn't running as a JsAssoc, because it wouldn't be compatible
12:39:59FromDiscord<Phil> Thaaaat solidifies me in my belief I really should keep my current frontend in angular, that sounds painful to even understand
12:42:06FromDiscord<Phil> I wonder if I'll have to start eating my words once WASM gets enough capabilities that one would actually want to write frontends with it and not feel limited
12:42:25FromDiscord<Phil> Which actually reminds me that I should check what WASM has gained in the meantime
12:42:49FromDiscord<ajusa> In reply to @Isofruit "Thaaaat solidifies me in": to be clear - the JS backend works perfectly well for pretty much everything I've thrown at it. I'm just more concerned about performance and code size. Eg, a simple hello world type thing that uses std/tables is 10kb gzipped and minified
12:43:36FromDiscord<ajusa> Nim's forum system does use it heavily after all, but I think it downloads like 800kb of JS
12:43:50FromDiscord<ShalokShalom> In reply to @Isofruit "I wonder if I'll": I think wasm is already ready, since it can run Godot :p
12:44:05FromDiscord<ShalokShalom> You can run an entire game in it, what would it need?
12:44:18FromDiscord<Phil> Last I checked some DOM manipulation stuff was still inconvenient
12:44:32FromDiscord<Phil> Which has been a while to be fair
12:44:33FromDiscord<ShalokShalom> 🤷‍♂️
12:48:55FromDiscord<Phil> From what I can find on the DOM front not a lot has changed.↵The usecase appears to remain that if you have a single heavy duty computation step it might make sense to outsource that to WASM etc.
12:49:18FromDiscord<Phil> (edit) "single" => "single/low number of"
12:49:24FromDiscord<Phil> (edit) "step" => "steps"
12:51:42FromDiscord<Phil> Though I guess you could write an entire QT-frontend and run that via WASM?
12:53:18FromDiscord<ajusa> sent a code paste, see https://paste.rs/1Ft
12:56:11FromDiscord<Phil> I find myself saddened by the fact "GTK in WASM" doesn't produce google hits
12:58:43FromDiscord<Phil> Writing a webpage client in QT and compiling that to WASM is something I'd actually contemplate
12:59:23FromDiscord<Phil> It sounds still like the experience would be sandpaper-smooth, but it would be interesting at the very least
12:59:34FromDiscord<ajusa> yeah that sounds painful
13:00:49*jjido joined #nim
13:01:12FromDiscord<Phil> In reply to @ajusa "yeah that sounds painful": I mean, hopefully whatever comes out at the end is a bit faster than your typical angular code to the point that even your phone could load the page and have a desktop-like experience
13:01:14*rockcavera joined #nim
13:01:14*rockcavera quit (Changing host)
13:01:14*rockcavera joined #nim
13:01:30FromDiscord<ShalokShalom> In reply to @Isofruit "I find myself saddened": GTK does even run fine on Windows and MacOS
13:01:36FromDiscord<ShalokShalom> How would it run on the web?
13:01:46FromDiscord<Phil> A man can dream Shalok!
13:01:54FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3TVa
13:02:15FromDiscord<ShalokShalom> That sounds more like delusion. 😛
13:02:28FromDiscord<ShalokShalom> Close to a dream, just not quite like it 😉
13:02:54FromDiscord<ShalokShalom> (edit) "does" => "doesnt"
13:03:01FromDiscord<ShalokShalom> (edit) "doesnt" => "does not"
13:03:21FromDiscord<Phil> Also you said it doesn't run "fine"... does that mean they run at all? I was under the impression GTK is pretty much dead outside of linux
13:03:26FromDiscord<Phil> (edit) "Also you said it doesn't run "fine"... does that mean they run at all? I was under the impression GTK is pretty much dead ... outside" added "completely"
13:03:32FromDiscord<Phil> (edit) "linux" => "linux, with not even the faintest signs of life"
13:04:12FromDiscord<ShalokShalom> https://www.youtube.com/watch?v=gGZyVSOnqm0
13:04:18FromDiscord<ShalokShalom> This is the state of 2014
13:04:28FromDiscord<ShalokShalom> So possible, that its completely dead now.
13:05:54FromDiscord<Phil> Can't be dead completely if GTK is stubbornly maintaining docs for setting up GTK for windows applications:↵WebAssembly is unable to access the DOM, so any DOM manipulation needs to be done indirectly through JavaScript or using a tool such as Emscripten. There are plans to add the ability to reference DOM and other Web API objects directly, but that's still in the proposal phase.
13:06:02FromDiscord<Phil> (edit) "applications:↵WebAssembly is unable to access the DOM, so any DOM manipulation needs to be done indirectly through JavaScript or using a tool such as Emscripten. There are plans to add the ability to reference DOM and other Web API objects directly, but that's still in the proposal phase." => "applications:↵https://www.gtk.org/docs/installations/windows"
13:06:13FromDiscord<Phil> Some day I'll learn to CTRL+C properly
13:06:22FromDiscord<ShalokShalom> GTK having docs?
13:06:26FromDiscord<ShalokShalom> Thats a new thing
13:07:15FromDiscord<qb> In reply to @PMunch "Wait, that's not right.": Thank you. Yea I needed the index of the first hit and it should return 0 on no hit. https://play.nim-lang.org/#ix=3TVc
13:08:45FromDiscord<Tanguy> In reply to @m4ul3r "I'm trying to use": There are global variables in nim
13:09:50FromDiscord<Phil> They in fact exist so much a global variable is the center piece of my db-connection pool for sqlite connections
13:09:55FromDiscord<Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3TVe
13:10:06FromDiscord<Phil> You've got the {.global.} pragma
13:11:49FromDiscord<Phil> sent a code paste, see https://paste.rs/chT
13:12:08FromDiscord<Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3TVf
13:12:42FromDiscord<Tanguy> (difference being, everytime you call `createWatcher`, a new `apple` will be created, instead of it being shared with every watcher)
13:15:21FromDiscord<Phil> In reply to @m4ul3r "I'm trying to use": For further stuff around global variables on top of what Tanguy already wrote):↵https://nim-lang.org/docs/manual.html#pragmas-global-pragma
13:16:14PMunch@qb, how would you differentiate that it hit the pattern on the first character and no match then?
13:39:47*pch_ joined #nim
13:40:00FromDiscord<m4ul3r> Thank you both, that was helpful. I was able to get it working with `var apple = "string_test"` at the beginning and adding `{.gcsafe.}` to the checkFile func.
13:41:47*pch quit (Ping timeout: 256 seconds)
13:43:33FromDiscord<Phil> This might be a dumb question but how do you actually instantiate a variable with a type that is `type X = distinct string` ?
13:44:43*pch_ quit (Remote host closed the connection)
13:45:05*pch_ joined #nim
13:47:22FromDiscord<konsumlamm> `X(someString)`
13:48:05*pch joined #nim
13:50:14FromDiscord<Phil> Oh, right the default way of instantiating more complicated types
13:50:28*pch_ quit (Ping timeout: 260 seconds)
13:54:34PMunchHmm, so I have my `loadTemplates` macro. It reads in all the files in a folder and for each file `<name>.<extension>` creates `to<extension>(argument: <name>): string` so `MyType.html` would create `proc toHtml(argument: MyType): string`. Now I want to make some kind of generic dispatch for this system. So that I could say `myType.to(<something describing the template to use>)` so if I have `MyType.rss` and `MyType.html` for example I could have in my code
13:54:34PMunch`resp myPage.to(request.headers["accept"].getExt())` and it would return the correct templated string based on the "Accept" HTTP header
13:54:45PMunchNow the question is, how would I generate that `to` procedure?
13:55:31PMunchI guess I could have a global table mapping types to possible extensions
13:55:55PMunchAnd whenever I call `loadTemplates` it would add to this table
13:56:14PMunchThen `to` could simply look up in this table and run the correct procedure
13:56:51PMunchThe table would need to just hold pointers though as the procedures have different signatures
13:57:20*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
14:08:09*arkurious joined #nim
14:12:30FromDiscord<fbpyr> @ajusa\: what does the 'run it through closure compiler' step involve?↵do you have a pointer to an article/video by any chance?
14:13:15FromDiscord<ajusa> sent a code paste, see https://paste.rs/OjO
14:13:27FromDiscord<ajusa> that get rid of a ton of the unneeded js code that Nim outputs by default
14:13:30FromDiscord<fbpyr> @ajusa\: thanks!! 🙂
14:17:05FromDiscord<xflywind> In reply to @ajusa "just tried an actual": if you wanna mimimal JS output, don't use string/echo. I would use `console.log cstring"Hello world"` in my frameworks by enforcing `-d:nimSlimSystem`.
14:17:18FromDiscord<xflywind> (edit) "by enforcing" => "and enforce"
14:18:02FromDiscord<Zoom> Nim forum is nice and minimalistic and I'd expect it to be much lighter. On the other hand, most of the time I wish we had just copied the D forum - it's sooo nice.↵(@ajusa)
14:18:32FromDiscord<ajusa> In reply to @flywind "if you wanna mimimal": Huh, I haven't heard of nimSlimSystem before, is it documented anywhere? Searching in the Nim source code didn't yield anything
14:20:46FromDiscord<xflywind> It exists in devel. It means you need to import `std/syncio` or `std/assetions` to use echo, assert/doassert stuffs.
14:22:19FromDiscord<ajusa> interesting, sounds useful for embedded systems too.
14:24:14FromDiscord<xflywind> sent a long message, see http://ix.io/3TVv
14:32:50FromDiscord<ajusa> In reply to @flywind "We may need a": this is what would be ideal - I shouldn't need to change my code to get better JS output, it should be a part of the standard library or compiler ideally. For now I'll probably end up making a wrapper module around std/tables that uses jsassoc as the backing, but it'd be nice if the js codegen could be improved in the future
15:54:58*Gustavo6046 joined #nim
15:56:54*Gustavo6046 quit (Max SendQ exceeded)
15:56:58*gsalazar joined #nim
15:57:15*Gustavo6046 joined #nim
16:29:54*jjido joined #nim
16:52:14*vicfred joined #nim
17:26:21*jmdaemon joined #nim
18:13:49*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
18:14:08*jmdaemon joined #nim
18:15:05FromDiscord<hmmm> yo boiz! if I wanted to have some strings to use at runtime it's more normal to slurp them or like place them in a module as variables and export them for use? 🤔
18:18:56PMunchNot quite sure what you mean
18:19:27PMunchslurp is used to read a file during compile-time and embed it into your program
18:19:37FromDiscord<hmmm> and that is plan A
18:20:31FromDiscord<hmmm> plan B would be just leaving the strings in some modules and import them as needed, plan C would be to pack them in a file with all my types data but I don't want to lol
18:20:36PMunchYou could of course have a module of variables which are slurped
18:20:57PMunchYou really shouldn't store types data in a file like you're doing anyways..
18:21:04PMunchIf I've understood correctly what you're doing
18:21:15*rez joined #nim
18:21:19FromDiscord<hmmm> I'm jasonying them and compressing them to a file
18:21:47FromDiscord<hmmm> seems they work just fine
18:22:42*lumo_e quit (Ping timeout: 260 seconds)
18:23:26PMunchBut for what purpose
18:24:24FromDiscord<hmmm> it's a surprise! 😃
18:31:43*lumo_e joined #nim
18:39:52NimEventerNew thread by ErikWDev: Searching "jester" on nimble puts it on the bottom, see https://forum.nim-lang.org/t/9062
18:41:29*Zectbumo joined #nim
18:41:58FromDiscord<treeform> In reply to @hmmm "I'm jasonying them and": I think you just want an external data file... the staticRead for big files make your compile times really slow!
18:42:13*rez quit (Ping timeout: 240 seconds)
18:58:25FromDiscord<demotomohiro> When you embed a 4GB file to the executable file with `staticRead`, it always uses at least of 4GB of memory, isn't it?
19:04:10*rez joined #nim
19:20:40FromDiscord<Zoom> Asking for help implementing a surprise program might have surprising effects.↵(@hmmm)
19:24:56*rez quit (Ping timeout: 245 seconds)
19:25:29FromDiscord<hmmm> In reply to @treeform "I think you just": oh treeformy my bro, hmm it's very possible I'm doing something wrong, but things seems working right now. Apropos! I was using flatty to put things down to disk but after some creative changes to my types flatty refused to eat them, but jsony eat them just fine so I'm happy. Files are a bit more fatty but I can live with it
19:26:12FromDiscord<hmmm> In reply to @Zoom "Asking for help implementing": lol zoom is nothing suspicios, I don't even have the skills to write anything malicious lol. It will be a sane honest to the Lord github GPL smol project
19:26:52FromDiscord<hmmm> I can give you boyz a preview of the logo lol https://media.discordapp.net/attachments/371759389889003532/959171942391373854/Untitled3.png
19:27:44FromDiscord<Zoom> I don't suspect you or anything like that. Just that advice given without enough context can be hit-or-miss.
19:28:07FromDiscord<hmmm> yea, but my needs are smol like my programs so it's all fine really 😊
19:31:42FromDiscord<Zoom> K. Bear with me for a moment. See, the question in the way you formulated it looks like either you wanted to know a bit more than you asked or you don't completely understand how embedding things into your program works.↵(@hmmm)
19:32:36FromDiscord<Zoom> Slurping files with text data into your program is absolutely the same thing as storing the text directly inside your code, and modules don't matter.
19:33:45FromDiscord<hmmm> hmm basically it's really about like 2 paragraphs of strings, I can do it both ways I said or the boring one that is putting them down to disk. What I wanted to know is what for experienced programmers feels more natural since I have no idea of what looks normal and what looks weird as fug lol
19:41:13*perro quit (Ping timeout: 250 seconds)
19:43:29*perro joined #nim
20:02:59FromDiscord<Rika> one or the other looks weird as fuck in differing circumstances
20:06:05*PMunch quit (Quit: leaving)
21:16:01*rez joined #nim
21:35:05FromDiscord<tandy> yes, this work happens directly in nodejs lib now↵(@ajusa)
21:35:14FromDiscord<tandy> me and juan are main users of js backend it seems lol
21:35:46FromDiscord<tandy> use -d\:danger↵(@ajusa)
21:35:55FromDiscord<tandy> and closure compiler
21:36:51*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
21:38:57FromDiscord<tandy> i hope to have a big enough brain to be able to work on jsgen one day
21:39:15FromDiscord<Elegantbeef> Well when you get that brain feel free to clean it up 😛
21:39:44FromDiscord<Elegantbeef> One of my PRs caused a jsgen issue and i had some grand adventure making it generate the code properly
21:43:15*wyrd quit (Ping timeout: 240 seconds)
21:44:04FromDiscord<Elegantbeef> Damn for some reason my app launcher fails to launch some applications and i have 0 clue why
21:55:02*yoyojambo joined #nim
21:55:25*wyrd joined #nim
21:56:52*rez quit (Quit: much snoozes...)
21:59:04FromDiscord<Phil> The pains people go through are fascinating
21:59:22FromDiscord<Elegantbeef> What do you mean?
22:00:11nrds<Prestige99> Making an app launcher?
22:02:51FromDiscord<Phil> In reply to @Elegantbeef "What do you mean?": The pain of dealing with a js backend, meaning you get all the complexity of the original problem you wanted to solve, but now you also have to understand the conversion of your code to js if issues arise.↵↵That becomes moot ofc once the backend becomes so flawless you'll have all js features and no bugs, but until then dealing with compiling to js seems like a pain
22:03:51FromDiscord<Phil> (edit) "In reply to @Elegantbeef "What do you mean?": The pain of dealing with a js backend, meaning you get all the complexity of the original problem you wanted to solve, but now you also have to understand the conversion of your code to js if issues arise.↵↵That becomes moot ofc once the backend becomes so flawless you'll have all js features and ... no" added "(in practical use)"
22:06:42FromDiscord<Elegantbeef> It's a subset of Nim that compiles to JS and the jsgen is only like 3k loc
22:07:09FromDiscord<Elegantbeef> There is actually a complexity reduction going to JS instead of C since JS provides a ton of what you have to generate code for
22:07:48FromDiscord<Elegantbeef> The most complex thing about the jsbackend is the pointer/value emulation
22:08:36FromDiscord<Phil> Wait, nim manages to encompass the entirety of js fictionality in a compiler with just 3k loc?
22:08:50FromDiscord<Elegantbeef> jsgen.nim is roughly 3k loc
22:08:52FromDiscord<Phil> Functionality, damn you phone
22:09:14FromDiscord<Elegantbeef> Jsgeneration is the final path of Nim -\> JS
22:09:46FromDiscord<Elegantbeef> It's only a subset of Nim that can compiler to JS, but like i said going to JS is generally less complex than C/C++
22:11:40FromDiscord<Elegantbeef> From my recollection the most confusing part is how things how addressing goes in JS things like `ref T` appear as an array of a single element that's T
22:11:57FromDiscord<Phil> I mean that last bit I never would have doubted, my base assumption would just have been that the js backend would be more likely to contain bugs than the c /cpp path since I would assume one gets significantly more attention than the other
22:12:25FromDiscord<Elegantbeef> Well JS is also tested
22:12:32FromDiscord<Phil> But that was before I became aware that the complexity of the js backend is that much less
22:14:10FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/959214046081593405/image.png
22:15:14FromDiscord<Recruit_main707> i swear vscode highlight issues with nim make me want to hang myself, how come the most used editor by far has the worst highlighting
22:15:36FromDiscord<Phil> Not that I want to express that going to js is easy, I just thought it only a minor league below going to c /cpp
22:15:39FromDiscord<Elegantbeef> Cause it doesnt have semantic highlighting
22:16:07nrds<Prestige99> Beef do you know much about asyncdispatch in Nim? I have a collection of files that are downloading at the same time, I want to wait for all futures to complete
22:16:20FromDiscord<Recruit_main707> its wonky af either way
22:16:25FromDiscord<Elegantbeef> I know how it works and how to use it, i dont know how best to use it
22:16:31FromDiscord<Phil> Vscode has bad highlighting? I mean, the suggestions are terrible, but the highlighting seemed alright
22:16:34FromDiscord<Elegantbeef> Just use kate with nimlsp and be merry 😛
22:19:04FromDiscord<Recruit_main707> sent a code paste, see https://paste.rs/2Us
22:20:08FromDiscord<Recruit_main707> this kind of stuff only happens with nim
22:20:21FromDiscord<Phil> Can't watch that right now because phone but will lauter
22:20:24FromDiscord<Phil> I think
22:20:52FromDiscord<Phil> Assuming I don't forget
22:20:57FromDiscord<auxym> I don't have too many gripes with highlighting in vs code. What I miss the most is good completion... not sure if the issue is the extension or nimsuggest (I assume the latter), but autocomplete for python and c++ is like 10X better than nim in vsc
22:21:25*jmdaemon quit (Ping timeout: 240 seconds)
22:21:26FromDiscord<auxym> In reply to @Isofruit "Vscode has bad highlighting?": yeah that, I agree
22:21:52FromDiscord<Phil> I don't generally like Java, but damn if the suggestions there aren't really damn good
22:22:35nrds<Prestige99> oh man I found this finally https://nim-lang.org/docs/asyncfutures.html#all%2Cvarargs%5BFuture%5BT%5D%5D
22:22:36nrds<Prestige99> sweet
22:23:49FromDiscord<auxym> if java (and c#) win at one point it's definitely IDE support. refactoring support is also magic (in IDEA at least), and same with support for find usages / go to definition, and debugging is really good too
22:24:29FromDiscord<Phil> Though I guess generics, templates and macros throw a bit of a wrench into good auto completion
22:25:28FromDiscord<Elegantbeef> Yea prestige I manually implemented it just to mock you 😛 https://play.nim-lang.org/#ix=3TY1
22:25:30FromDiscord<Phil> I'm not sure how one would know if specific function exists pre compilation if you only know they're there after compilation
22:25:42FromDiscord<auxym> meh, I can't even get nimsuggest to complete pure enums most of the time, I'd settle for good completion except macros
22:26:00nrds<Prestige99> I manually implemented it to, then found it immediately after. lol
22:26:23FromDiscord<Elegantbeef> Not really with UFCS and the fact the compiler knows they exist↵(@Phil)
22:26:31FromDiscord<WintonMc_twitter (WintonMc)> Pasando a saludar a todos
22:26:34FromDiscord<WintonMc_twitter (WintonMc)> me encanta el lenguaje
22:27:01FromDiscord<Elegantbeef> `doThing(a: SomeOrdinal)` when doing `doThing(` can show all symbols that are `SomeOrdinal` in scope
22:27:36FromDiscord<Elegantbeef> Macros, templates, and generics do not change basic procedure matching
22:28:13FromDiscord<Elegantbeef> Yea prestige i knew it existed but couldnt remember where it was
22:28:17FromDiscord<Phil> In reply to @Elegantbeef "Not really with UFCS": Then it's the only reason that we don't have good auto complete the fact that nobody is ~~masochistic~~ valiant enough to write is?!
22:28:36FromDiscord<Phil> (edit) "it's" => "is" | "is?!" => "it?!"
22:28:45FromDiscord<Phil> What a terrible fate!
22:29:02FromDiscord<Elegantbeef> Nimsuggest is relatively untouched
22:29:47*gsalazar quit (Ping timeout: 250 seconds)
22:30:13FromDiscord<Elegantbeef> There is an issue with how flexible Nim is for suggestions though
22:30:23FromDiscord<Elegantbeef> say you're doing `proc doThing(a: `
22:30:48FromDiscord<Elegantbeef> Any template/macro that returns `untyped` and `typeOf` are validd there
22:31:45FromDiscord<Elegantbeef> So it should suggest all types, typeof, any template/macro that returns untyped
22:32:39FromDiscord<Elegantbeef> Though we could say it has to be all procedures that return `typedesc` and just all types in scope
22:35:48FromDiscord<Elegantbeef> Be the brave soul and go make it better 😛
22:37:18nrds<Prestige99> Hm something weird is going on with futures.all
22:38:56nrds<Prestige99> https://play.nim-lang.org/#ix=3TY3 it's getting stuck if I do more than 1 future
22:39:13nrds<Prestige99> but if I only have 1 entry in the table, no matter which, it works fine
22:39:55nrds<Prestige99> https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/asyncfutures.nim#L468 when T is void, wonder if there's something wrong here or if my code is not right
22:40:56nrds<Prestige99> Doesn't that if statement on 493 look fishy? Like if any of these fail, would it actually exit the `all` proc?
22:42:04FromDiscord<Elegantbeef> Jesus you're using a table for this
22:42:49nrds<Prestige99> it's going to get even worse, because a lot of these are symlinks on github I'll have to resolve, to find the actual files...
22:43:19FromDiscord<Elegantbeef> I'm mostly joking just cause there isnt any value with the present code with a table
22:43:26nrds<Prestige99> hell maybe I'll just make a step that renames and tar's them
22:43:48nrds<Prestige99> then I only have 1 download anyway
22:43:50FromDiscord<Generic> sent a code paste, see https://play.nim-lang.org/#ix=3TY5
22:44:17FromDiscord<Elegantbeef> You're using a single client for 4 requests
22:44:21FromDiscord<Elegantbeef> I dont know if that's valid
22:44:26FromDiscord<Generic> it will be in the next release with a few more highliting fixes
22:44:58nrds<Prestige99> since it's an async client I thought it could handle multiple connections. But anyway, I think I don't need to do this, now
22:45:48FromDiscord<Elegantbeef> Also do you actually need the Key -\> val relation? 😛
22:46:11FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3TY6 anyway joke aside this works for this demo
22:46:14nrds<Prestige99> well I won't anymore
22:46:34nrds<Prestige99> ah so the issue was multiple clients eh
22:47:29FromDiscord<Elegantbeef> Hey "eh" is my word
22:47:38FromDiscord<Elegantbeef> You have your words like burgers and freedom fries
22:49:12*jmdaemon joined #nim
22:49:25nrds<Prestige99> I'm all over the place man
22:53:17*Zectbumo quit (Remote host closed the connection)
23:18:52*nullsh joined #nim