<< 19-11-2021 >>

00:01:10FromDiscord<Elegantbeef> https://github.com/OpenSystemsLab/q.nim for instance
00:01:23*qwr would use the case object, if there is only certain types needed (any type is usually not very useful anyway, as you can't do much with random bytes without knowning their format)
00:02:13FromDiscord<Elegantbeef> Yea Union is easier than case objects in that case https://github.com/alaviss/union
00:35:25*Colt joined #nim
00:56:30*src_ joined #nim
00:59:46*src quit (Ping timeout: 256 seconds)
01:06:32*krux02 quit (Remote host closed the connection)
01:27:10*src_ quit (Quit: Leaving)
01:27:21*src joined #nim
01:40:55*Mister_Magister quit (Quit: bye)
01:52:06*neurocyte0132889 quit (Ping timeout: 265 seconds)
01:54:51*src quit (Quit: Leaving)
02:00:36FromDiscord<sharpcdf> sent a code paste, see https://play.nim-lang.org/#ix=3Fpg
02:02:31FromDiscord<Elegantbeef> Well whatever you're trying to do is very wrong
02:02:56FromDiscord<Elegantbeef> it should be something like `l[x.len .. x.len + 7]` or something similar
02:04:23FromDiscord<Elegantbeef> and then there will be the issue that removePrefix is an inplace operation
02:04:23FromDiscord<sharpcdf> In reply to @Elegantbeef "it should be something": i want it to remove all chars up to the end of `"url":`
02:04:38FromDiscord<Elegantbeef> Ok so what's the input data?
02:04:52FromDiscord<sharpcdf> In reply to @Elegantbeef "Ok so what's the": some html
02:05:06FromDiscord<Elegantbeef> I mean provide an example
02:05:28FromDiscord<Elegantbeef> Attempting to reason off of 3 lines of code and give an adequate solution is an exercise and a half
02:05:36FromDiscord<sharpcdf> sent a code paste, see https://play.nim-lang.org/#ix=3Fph
02:05:58FromDiscord<sharpcdf> basically im trying to get the first github link that shows when i send a get request to github with "awesome nim"
02:06:23FromDiscord<Elegantbeef> This is needlessly string op heavy πŸ˜€
02:06:51FromDiscord<sharpcdf> lol im just trying to get the hang of stringutils and http requests right now
02:07:17FromDiscord<Elegantbeef> Give me a minute and i'll give you a cleaner solution
02:07:19FromDiscord<sharpcdf> im just having a hard time splitting the the target url(inside of `l`) from the rest of the html(`l`)
02:07:24FromDiscord<sharpcdf> alright
02:11:24FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3Fpi something like this is more sane
02:13:52FromDiscord<sharpcdf> in one word, wow
02:13:59FromDiscord<sharpcdf> significantly more compressed
02:14:27FromDiscord<sharpcdf> it doesnt check if the link is a repo though
02:14:36FromDiscord<sharpcdf> but other than that its good
02:14:38FromDiscord<Elegantbeef> I mean that's easy
02:14:42FromDiscord<sharpcdf> yea
02:15:02FromDiscord<sharpcdf> i kinda forgot that the element was a link hehe...
02:15:09FromDiscord<sharpcdf> thanks for the help
02:15:21FromDiscord<Elegantbeef> Check if `l.attr("payload")` has a length \> 0 and then parse the payload to json then check that information
02:15:26FromDiscord<Elegantbeef> I do have an impl done here that does that πŸ˜›
02:15:51FromDiscord<Elegantbeef> Or not πŸ˜€
02:16:12FromDiscord<Elegantbeef> Ah it's more complicated than that
02:16:22FromDiscord<sharpcdf> In reply to @Elegantbeef "Check if `l.attr("payload")` has": i think ill just stick to the plain href πŸ™ƒ
02:16:37FromDiscord<Elegantbeef> Lol i'll show the impl when it's working in a minute
02:16:48FromDiscord<sharpcdf> ok
02:18:22FromDiscord<sharpcdf> also, didnt know you could use brackets to import multiple things at once
02:18:45FromDiscord<sharpcdf> but whats the difference between adding and not adding `std/`?
02:18:50FromDiscord<sharpcdf> seems to work for me
02:19:05FromDiscord<Elegantbeef> It's better practice to use `std/` as newer modules force it
02:19:14FromDiscord<Elegantbeef> And it ensures you dont have an overlap from your own modules
02:19:34FromDiscord<sharpcdf> oh alright
02:20:46FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3Fpk
02:20:48FromDiscord<Elegantbeef> There you go
02:21:25FromDiscord<Elegantbeef> Much less silly and more clear than using strutils for json/xml πŸ˜›
02:22:29FromDiscord<sharpcdf> nice
02:24:27FromDiscord<Elegantbeef> Should note one should do `client.close` after the request since you no longer need the socket, and otherwise the OS will not free it until the program closes
02:24:49FromDiscord<sharpcdf> alright
02:27:03FromDiscord<sharpcdf> well i edited the href method, and now it returns an empty string, not sure why as i even append an additional string
02:27:06FromDiscord<sharpcdf> no error or anything
02:27:20FromDiscord<sharpcdf> sent a code paste, see https://play.nim-lang.org/#ix=3Fpl
02:27:41FromDiscord<sharpcdf> i think the if statement may be accidentally excluding all elements, but im not sure
02:28:36FromDiscord<Elegantbeef> I'm sorry i'm not going to help with that masochistic solution
02:29:00FromDiscord<sharpcdf> lol
02:29:23FromDiscord<sharpcdf> i absolutely love destroying my own mind
02:29:51FromDiscord<Elegantbeef> You have xml and json, the proper way to do it is by converting it, reimplementing json/xml parsers that already exist for no reason but self harm is not something i can condone
02:30:39FromDiscord<Elegantbeef> They embed json data into the data click thingy
02:30:45FromDiscord<sharpcdf> ill probably end up doing it your way, but for now i just want to see it work
02:31:13FromDiscord<sharpcdf> In reply to @Elegantbeef "They embed json data": haha funny click thing send data and go brrr
02:31:28FromDiscord<Elegantbeef> That's what i imagine the developers said to eachother
02:31:36FromDiscord<Elegantbeef> Who encodes data like that inside the xml
02:32:14FromDiscord<sharpcdf> lol
02:37:35FromDiscord<sharpcdf> wooo my completely unorthodox method works
02:38:16FromDiscord<Elegantbeef> Congrats, doesnt mean i hate it any less πŸ˜›
02:38:49FromDiscord<Elegantbeef> Also remember nim has an implicit `result` so you can do `result = yourUrl` instead of `var link: string` and `return link`
02:39:16FromDiscord<sharpcdf> yea i know, im just used to manually returning things
02:39:29FromDiscord<sharpcdf> and makes it a little more readable for me
02:45:20FromDiscord<sharpcdf> also i actually didnt see that the `data-hydro-click` attribute was a json literal πŸ˜…
02:45:36FromDiscord<π™§π™šπ™’> i have a really ambigous error im getting
02:45:58FromDiscord<Elegantbeef> I have am ambiguous solution
02:46:01FromDiscord<Elegantbeef> an\
02:46:20FromDiscord<π™§π™šπ™’> sent a code paste, see https://play.nim-lang.org/#ix=3Fpq
02:46:36FromDiscord<Elegantbeef> Oh boy is someone making a window manager!
02:46:38FromDiscord<π™§π™šπ™’> yes
02:46:43FromDiscord<π™§π™šπ™’> results in this
02:46:46FromDiscord<π™§π™šπ™’> sent a code paste, see https://play.nim-lang.org/#ix=3Fpr
02:47:17FromDiscord<π™§π™šπ™’> what does thie error mean
02:47:23FromDiscord<π™§π™šπ™’> and why am i getting this, the types match
02:47:42FromDiscord<sharpcdf> sent a code paste, see https://play.nim-lang.org/#ix=3Fpt
02:47:53FromDiscord<π™§π™šπ™’> but thats not possible since the code works if i put myConfig in the same file?
02:48:03FromDiscord<sharpcdf> hmmm
02:48:04FromDiscord<π™§π™šπ™’> only when i move to an external config.nim it breaks
02:48:34FromDiscord<Elegantbeef> is this on a repo?
02:48:36FromDiscord<sharpcdf> are you including instead of importing
02:48:43FromDiscord<sharpcdf> In reply to @Elegantbeef "is this on a": https://github.com/megabytesofrem/whim/
02:48:45FromDiscord<π™§π™šπ™’> yes but its outdated code and no im importing
02:48:52FromDiscord<sharpcdf> try including instead
02:48:53FromDiscord<π™§π™šπ™’> the code on there is not the new code
02:49:33FromDiscord<sharpcdf> pretty sure the path is relative though so do `include folder/file` or whatever necessary
02:49:57FromDiscord<π™§π™šπ™’> i get this
02:50:01FromDiscord<π™§π™šπ™’> sent a code paste, see https://play.nim-lang.org/#ix=3Fpu
02:50:06FromDiscord<Elegantbeef> No dont inclue the path
02:50:11FromDiscord<π™§π™šπ™’> oh wait
02:50:17FromDiscord<π™§π™šπ™’> i dont do `config.myConfig`now
02:50:19FromDiscord<π™§π™šπ™’> this worked
02:50:23FromDiscord<π™§π™šπ™’> but why wasnt importing it working?
02:50:29FromDiscord<sharpcdf> In reply to @Elegantbeef "No dont inclue the": isnt that what youre supposed to do for adding local files
02:50:54FromDiscord<sharpcdf> In reply to @π™§π™šπ™’ "but why wasnt importing": not sure, might have something to do with exporting the types
02:50:59FromDiscord<Elegantbeef> You do not include you do `import`
02:51:06*rockcavera quit (Remote host closed the connection)
02:51:11FromDiscord<π™§π™šπ™’> i was askign why it didnt work w/ import
02:51:12FromDiscord<Elegantbeef> include is only for specific casees
02:51:22FromDiscord<π™§π™šπ™’> i import evertyhing else
02:51:26FromDiscord<Elegantbeef> Yea i'm trying to see the entire problem
02:51:28FromDiscord<π™§π™šπ™’> this was the only thing that borked
02:51:41FromDiscord<sharpcdf> In reply to @Elegantbeef "You do not include": isnt include for when you want to split up a file into several pieces basically
02:52:01FromDiscord<Elegantbeef> Yea it's not often needed
02:52:04FromDiscord<π™§π™šπ™’> the nimble syntax highlighter in vs is still bitching at me now
02:52:08FromDiscord<sharpcdf> oh
02:52:25FromDiscord<sharpcdf> i mean for what im doing rn i just included my other file to help organize it
02:52:27FromDiscord<π™§π™šπ™’> this compiles but the "error" is still there
02:52:32FromDiscord<Elegantbeef> If you want to push to a branch then nuke it after i can take a look at it
02:52:45FromDiscord<Elegantbeef> I just want the full picture and it's hard to see presently for me
02:52:48FromDiscord<π™§π™šπ™’> how do i create a new branch
02:52:55FromDiscord<π™§π™šπ™’> im git noob
02:52:58FromDiscord<Elegantbeef> \`git checkout -b "someDummyBranch"
02:52:59FromDiscord<sharpcdf> dont mind me asking but whats the specific use case of importing? non-local files?
02:53:04FromDiscord<π™§π™šπ™’> thanks
02:53:06FromDiscord<π™§π™šπ™’> ill push this
02:53:17FromDiscord<Elegantbeef> when you want to use a module from another module
02:53:29FromDiscord<π™§π™šπ™’> pls dont judge my shit code im still learning both nim and x11 lol
02:53:35FromDiscord<sharpcdf> yea thats what i thought
02:53:48FromDiscord<Elegantbeef> including pastes the file as is into the file you include to, import doesnt, it only brings in symbols that are exported
02:53:51FromDiscord<sharpcdf> so thats surprising that include has low use cases
02:53:56FromDiscord<Elegantbeef> Dont worry about that, my WM is garbage to
02:53:58FromDiscord<sharpcdf> In reply to @Elegantbeef "including pastes the file": yea ik
02:54:09FromDiscord<π™§π™šπ™’> @ElegantBeef link
02:54:18FromDiscord<Elegantbeef> https://github.com/beef331/goodwm if you ever want to look at shit code
02:54:19FromDiscord<π™§π™šπ™’> also holy shit do i know u
02:54:19FromDiscord<sharpcdf> just not sure why people would mainly choose import over include for local files
02:54:23FromDiscord<π™§π™šπ™’> we talked in that game dev server
02:54:40FromDiscord<π™§π™šπ™’> i was just udner a different username
02:54:50FromDiscord<Elegantbeef> Are you the D fan?
02:54:53FromDiscord<π™§π™šπ™’> yes
02:54:58FromDiscord<Elegantbeef> Ah
02:54:58FromDiscord<sharpcdf> lmao
02:56:32FromDiscord<Elegantbeef> Just tell me when you push πŸ˜€
02:56:55FromDiscord<π™§π™šπ™’> https://github.com/megabytesofrem/whim/tree/broken-config
02:57:00FromDiscord<π™§π™šπ™’> also theres irc for this server?
02:57:13FromDiscord<Elegantbeef> There is, also matrix
02:57:17FromDiscord<π™§π™šπ™’> linkies?
02:57:29FromDiscord<π™§π™šπ™’> planning to leave discord soon bc privacy concerns n shit
02:57:49FromDiscord<Elegantbeef> Scroll down to community https://nim-lang.org/
02:59:04FromDiscord<Elegantbeef> Uhh you dont have `whim/types`
02:59:21FromDiscord<π™§π™šπ™’> wdym
02:59:31FromDiscord<π™§π™šπ™’> isnt it in the whim folder
02:59:31FromDiscord<Elegantbeef> https://github.com/megabytesofrem/whim/tree/broken-config/src
02:59:43FromDiscord<Elegantbeef> For some reason you're missing files on this branch
02:59:44FromDiscord<π™§π™šπ™’> wtf
02:59:56FromDiscord<π™§π™šπ™’> did git pull a braindead
03:00:00FromDiscord<π™§π™šπ™’> lemme check out this
03:01:17FromDiscord<π™§π™šπ™’> done it
03:01:28FromDiscord<π™§π™šπ™’> unfortunately had to commit the binary which has the same name of whim
03:01:35FromDiscord<π™§π™šπ™’> that was what was fucking it up
03:01:41FromDiscord<Elegantbeef> ah git ignore it πŸ˜€
03:01:44FromDiscord<π™§π™šπ™’> idk if i can only exclude binary w/ the same name
03:02:12FromDiscord<Elegantbeef> Yea you can there is a way to remove all binaries then add dirs
03:02:23FromDiscord<π™§π™šπ™’> probably effortℒ️
03:02:31FromDiscord<Elegantbeef> It's like 4 lines of git
03:02:41FromDiscord<π™§π™šπ™’> oof
03:02:43FromDiscord<π™§π™šπ™’> anyway
03:02:45FromDiscord<π™§π™šπ™’> take a look pls
03:03:49FromDiscord<Elegantbeef> The issue is you dont export `tables`
03:04:22FromDiscord<π™§π™šπ™’> hm?
03:04:24FromDiscord<Elegantbeef> there is no `[]=` in the config space for `Table` so you either need to `import std/tables` there or `export tables` in types
03:04:42FromDiscord<Elegantbeef> Exported types dont bring in procedures with them unless they're also exported
03:04:47FromDiscord<π™§π™šπ™’> ahhh
03:05:01FromDiscord<π™§π™šπ™’> how would i do it the export route
03:05:01FromDiscord<Elegantbeef> You either need to export your dependant modules or import them in the other module
03:05:02FromDiscord<π™§π™šπ™’> im curious
03:05:09FromDiscord<Elegantbeef> I showed
03:05:11FromDiscord<Elegantbeef> `export tables`
03:05:17FromDiscord<π™§π™šπ™’> inside the types block?
03:05:24FromDiscord<Elegantbeef> Put that in `types.nim` after the import
03:05:41FromDiscord<π™§π™šπ™’> ahh
03:05:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3FpB
03:05:51FromDiscord<Elegantbeef> And yes I'll continue pushing `std/` on people
03:06:09FromDiscord<π™§π™šπ™’> i use it anyways
03:06:13FromDiscord<π™§π™šπ™’> seems wrong to not
03:06:59FromDiscord<Elegantbeef> And that's why `include` fixed it
03:07:12FromDiscord<Elegantbeef> cause now that module was importing tables
03:08:12FromDiscord<π™§π™šπ™’> ah i see
03:08:49FromDiscord<π™§π™šπ™’> how can i delete this dummy branch now
03:09:23FromDiscord<Elegantbeef> `git branch -d origin/branchName` `git checkout main`
03:09:30FromDiscord<Elegantbeef> Or whatever you call the master branch
03:09:43FromDiscord<Elegantbeef> It might move you back to main automatically
03:09:59FromDiscord<Elegantbeef> Ah sorry that's locally it's `git push origin --delete origin/branchName`
03:14:42*arkurious quit (Quit: Leaving)
03:25:01FromDiscord<sharpcdf> why are more desktop irc clients being created if discord already exists
03:25:11FromDiscord<Elegantbeef> Lol
03:25:13FromDiscord<sharpcdf> makes no sense at all
03:25:18FromDiscord<Elegantbeef> Discord is a proprietary chat application
03:25:19FromDiscord<π™§π™šπ™’> because no one likes electron ;)
03:25:25FromDiscord<Elegantbeef> People like IRC
03:25:28FromDiscord<sharpcdf> true and truer
03:25:43FromDiscord<Elegantbeef> Also as i see you joined on matrix, matrix isnt IRC
03:25:55FromDiscord<sharpcdf> oh really?
03:25:56FromDiscord<sharpcdf> what is it
03:25:58FromDiscord<Elegantbeef> Matrix is a newer open protocol
03:26:20FromDiscord<sharpcdf> also either way discord isnt in its infancy like a lot of these matrix clients look like
03:26:41FromDiscord<sharpcdf> i think it makes more sense to use discord at least until matrix clients progress more
03:26:58FromDiscord<Elegantbeef> It's also a closed source chat client, you cannot self host, or use your own clients
03:26:59nrds<Prestige99> Yeah matrix client aren't good atm
03:27:07FromDiscord<Elegantbeef> So it's awful if you ask me
03:27:11nrds<Prestige99> Sticking to IRC till that happens
03:27:17FromDiscord<Elegantbeef> Eh element seems fine to me
03:27:25FromDiscord<sharpcdf> true, but again just for everyday use discord is just the better option
03:27:26FromDiscord<sharpcdf> (for now)
03:27:27nrds<Prestige99> really? Element has been terrible for me
03:27:35FromDiscord<Elegantbeef> In what way?
03:27:44FromDiscord<sharpcdf> im on element rn it just seems too basic
03:28:06nrds<Prestige99> especially on mobile - takes forever to load, messages get stuck, calls are buggy/don't work half the time
03:28:12FromDiscord<sharpcdf> and you cant join anything without an invite, which can kind of defeat the purpose of having communities on it
03:28:18nrds<Prestige99> on desktop it takes like a full minute to load chat
03:28:22FromDiscord<sharpcdf> then you just need a direct invite
03:28:24FromDiscord<Elegantbeef> You can join communities
03:28:32FromDiscord<Elegantbeef> you dont need invites
03:28:44FromDiscord<Elegantbeef> there are public communities anyone can join
03:28:52FromDiscord<sharpcdf> yea im comparing element delay to discord rn its about 2 seconds↡(<@709044657232936960_nrds=5b=49=52=43=5d>)
03:28:53FromDiscord<sharpcdf> really long
03:29:10FromDiscord<Elegantbeef> Yea i dont have any of these issues on desktop element
03:29:19FromDiscord<Elegantbeef> Though i havent used the voip
03:29:38FromDiscord<π™§π™šπ™’> the voip is not bad
03:29:54FromDiscord<sharpcdf> i mean i think its decent, it just needs to have more things that people can use instead of just the basic chat and voIP
03:30:24FromDiscord<sharpcdf> there needs to be at least community discovery if its going to get nearly as popular as discord
03:30:27FromDiscord<sharpcdf> (in my opinion)
03:30:31FromDiscord<Elegantbeef> There is
03:30:39FromDiscord<sharpcdf> wait what
03:30:42FromDiscord<sharpcdf> where lol i dont see it
03:30:47FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/911096135706361886/image.png
03:30:55FromDiscord<sharpcdf> whattt
03:30:56FromDiscord<sharpcdf> all i see is create room
03:31:04FromDiscord<sharpcdf> oph snap i see it
03:31:07FromDiscord<sharpcdf> alright nice
03:31:41FromDiscord<sharpcdf> now its starting to appeal to me
03:31:43FromDiscord<sharpcdf> especially since its open source
03:31:43FromDiscord<sharpcdf> and it can integrate with discord
03:31:43FromDiscord<Elegantbeef> Lol we did it we sold someone on the premise of the matrix protocol
03:31:44FromDiscord<sharpcdf> lets gooooo
03:31:46FromDiscord<sharpcdf> one more member!
03:32:11FromDiscord<Elegantbeef> Spaces(equivalent to discord servers) are in beta but will be eventually stable
03:32:16FromDiscord<sharpcdf> and you can freely add servers to the discovery
03:32:18FromDiscord<sharpcdf> but one thing
03:32:21FromDiscord<sharpcdf> as far as i know
03:32:24FromDiscord<sharpcdf> theres no bots
03:32:27FromDiscord<sharpcdf> \:(
03:32:29FromDiscord<Elegantbeef> There are bots
03:32:33FromDiscord<sharpcdf> bro what
03:32:36FromDiscord<Elegantbeef> The bridge is a bot
03:32:41FromDiscord<sharpcdf> i know
03:32:43FromDiscord<sharpcdf> but im talking like
03:32:48FromDiscord<Elegantbeef> The entire thing is open source how do you go "No bots" πŸ˜€
03:32:52FromDiscord<sharpcdf> an api for making bots
03:32:59FromDiscord<Elegantbeef> https://matrix.org/docs/projects/other/python-matrix-bot-api/
03:33:01FromDiscord<sharpcdf> just didnt think anyone made it yet
03:33:07FromDiscord<Elegantbeef> https://matrix.org/bots/
03:33:26FromDiscord<sharpcdf> ok this is πŸ”₯
03:33:52FromDiscord<Elegantbeef> Yea i very much want it to succeed, there is also someone working on a nim sdk for matrix
03:34:37FromDiscord<sharpcdf> nice
03:35:02FromDiscord<sharpcdf> what are the currente api bindings
03:36:03FromDiscord<Elegantbeef> This is what i was talking about https://github.com/dylhack/matrix-nim-sdk
03:36:25FromDiscord<sharpcdf> ohh nice
03:37:02FromDiscord<sharpcdf> lets go theres a go sdk
03:37:09FromDiscord<Elegantbeef> No let's not
03:37:15FromDiscord<sharpcdf> lol wdym
03:37:19FromDiscord<Elegantbeef> It's go
03:37:19FromDiscord<sharpcdf> i personally favor golang
03:37:42FromDiscord<sharpcdf> its stdlib is extremely versatile
03:37:48FromDiscord<sharpcdf> i get why people dont like it
03:37:54FromDiscord<sharpcdf> but to me the pros outweigh the cons
03:39:00FromDiscord<sharpcdf> well so far im liking element but dont appreciate the paid version
03:39:21FromDiscord<Elegantbeef> Element is a for profit company so what do you expect
03:40:01FromDiscord<Elegantbeef> You can self host your own matrix servers and use the client with no issue
03:40:23FromDiscord<Elegantbeef> So given that they do need money to actually develop/compete with other chat apps i think it's a fine method
03:40:27FromDiscord<sharpcdf> Β―\\\_(ツ)\_/Β―
03:42:13FromDiscord<sharpcdf> also about golang, i would 100% switch to zig(hopefully you know it lol), but the compiler errors constantly with an AccessDenied error
03:42:22FromDiscord<sharpcdf> anddd its not even v1.0.0 yet
03:42:29FromDiscord<sharpcdf> its like v0.8.1
03:42:45FromDiscord<sharpcdf> really hoping that they fix the bug soon
03:48:37*vicfred quit (Quit: Leaving)
03:48:54FromDiscord<Elegantbeef> Dammit i now want to work on the matrix sdk, i hate you all!
03:49:42FromDiscord<sharpcdf> Haha, you've fallen into my trap! You'll never survive this one, Elegantbeef!
03:50:00FromDiscord<Elegantbeef> You're right i should jump in a snowbank until i come to my senses
04:06:02*supakeen quit (Quit: WeeChat 3.3)
04:06:32*supakeen joined #nim
04:16:42*elph quit (Quit: Connection closed for inactivity)
04:18:42FromDiscord<evoalg> It never snows in the city I'm in, and the first time I touched snow was as an adult
04:19:32FromDiscord<Elegantbeef> Damn it snows here so it's fun!
04:19:59FromDiscord<evoalg> at least I didn't know what I was missing
04:20:56FromDiscord<evoalg> When I first wanted to chat on nim for the first time (recently) I tried to find a non-paid irc client and downloaded LimeChat, but I couldn't get it going to I jumped on Discord (which I already had)
04:22:22FromDiscord<evoalg> In reply to @Elegantbeef "And yes I'll continue": the syntax highlighter I use doesn't recognize "std/" when I import, so it bugs me
04:23:49FromDiscord<Elegantbeef> You're using nvim eh?
04:24:44FromDiscord<evoalg> yes
04:29:22FromDiscord<evoalg> sent a long message, see http://ix.io/3FpN
04:30:14FromDiscord<Elegantbeef> Yea i had issues setting up nvim aswell, though it's not my main editor
04:30:23FromDiscord<Elegantbeef> Kinda interested in onivim2 since it's super easy to setup
04:30:42FromDiscord<evoalg> I ended up having to look up how to turn off popups for autocomplete as it was I found it annoying as hell
04:30:52FromDiscord<evoalg> ohhh what's your main editor? vscode?
04:31:26FromDiscord<Elegantbeef> Yea i use vscode, but toy with nvim, which is why onivim2 is interesting
04:31:33FromDiscord<Elegantbeef> Vscode like extensions/gui but a vim editor
04:31:47FromDiscord<Elegantbeef> i say like extensions, but it just uses vscode extensions πŸ˜€
04:32:17FromDiscord<Elegantbeef> I know a few other Nim developers used it and liked it πŸ˜€
04:32:33FromDiscord<evoalg> oh nice!
04:34:12FromDiscord<evoalg> when I tried vscode I don't think I set it up properly either, as it doesn't highlight lint errors or something .. eg if I do `x = 3` when x in a string it doesn't tell me like nvim does (something like that anyway)
04:34:28FromDiscord<Elegantbeef> Yep you didnt set it up right
04:34:53FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/911112268337545226/image.png
04:35:06FromDiscord<evoalg> ok ... since I'm a vim lover I guess I didn't look for a solution
04:35:18FromDiscord<Elegantbeef> Lol
04:36:18FromDiscord<evoalg> I just fired up vscode and put that exact example and it didn't complain
04:37:00FromDiscord<evoalg> I tried the konst and the saem one
04:37:22FromDiscord<Elegantbeef> you need `errorLens` πŸ˜€
04:37:51FromDiscord<evoalg> oh .... disclaimer ... I had never used vscode before either
04:37:52FromDiscord<Elegantbeef> https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens though even with out it the line should get a squiggle
04:38:05FromDiscord<Rika> I’d use Oni 2 if it wasn’t more vscode like
04:38:18FromDiscord<Elegantbeef> But eitherway no reason to use vscode if you like vim
04:38:18FromDiscord<evoalg> lol
04:39:05FromDiscord<evoalg> looks like errorlens is in the list for me to install
04:39:53FromDiscord<evoalg> restarted ... still doesn't work
04:40:21FromDiscord<Rika> Do you have an error provider
04:41:03FromDiscord<evoalg> I don't know what that is
04:41:07FromDiscord<Elegantbeef> There is a "Nim\: Lint On Save"
04:41:16FromDiscord<Elegantbeef> So you might have that disabled, but yea odd behaviour
04:41:43FromDiscord<evoalg> ahhh maybe ....
04:43:54FromDiscord<Rika> Your nim plugin is not giving you errors?
04:44:05FromDiscord<evoalg> in my vscode preferences I searched for lint and it's got "Nim: Lint On Save" but that's already ticked
04:44:21FromDiscord<Rika> Does your code have errors in the first place haha
04:45:23FromDiscord<evoalg> yea I used the example Elegantbeef did above ... assigning an int to a string var
04:50:01FromDiscord<evoalg> I run the code and I get `Error: type mismatch: got 'int literal(300)' for '300' but expected 'string'` which is what it should be, but no lint highlighting ... hate vscode!
04:50:40FromDiscord<Elegantbeef> Understandable
04:53:15FromDiscord<evoalg> I installed the one off the site you gave me and disabled the other one, still no joy
04:55:02FromDiscord<Elegantbeef> Well errorlens is just to present the code on the line, the nim extension is still needed to be enabled, but i worry this is just going to fuel a "i must get it working regardless of time"
04:55:40FromDiscord<evoalg> yea it's a distractions I guess πŸ˜‰
04:59:59FromDiscord<Elegantbeef> You can hit `ctrl + j` then go to ouput and click the nim extension in the dropdown to see if there are any issues
05:00:54FromDiscord<evoalg> command + j ... I'm on a mac
05:01:06FromDiscord<Elegantbeef> Sorry for your loss
05:03:24FromDiscord<evoalg> no issue found when doing that ... the only message is under "Explorer: Outline" which says "no symbols found in document 'bar.nim'"
05:04:52FromDiscord<evoalg> I know I don't like mac that much, I prefer linux ... in fact I run linux on docker on this mac, and I run vnim and nim on linux that way. I have no gui, but that's that way I like it
05:05:24FromDiscord<Elegantbeef> Is that an apple silicon mac atleast?
05:07:31FromDiscord<evoalg> no it's intel
05:14:37FromDiscord<evoalg> yesterday I went through a whole heap of plugins for nvim, and each one annoyed me, and so I've gone back to no "plugged" plugins at all, just the alaviss plugin for syntax highlighting etc
05:36:36FromDiscord<Elegantbeef> You best have given up by now! πŸ˜€
06:30:13FromDiscord<Valdar> In reply to @evoalg "yea I used the": VSCode only lints on saved files, not just on what is on the screen. Turn on autosave and set to "save on delay" and it should show errors in about a sec after you stop typing
06:30:44FromDiscord<evoalg> ok I'll try
06:32:34FromDiscord<evoalg> woefully it was already set that both of those things
06:33:52FromDiscord<evoalg> but thank you for trying ... but no worries, my true love is vim anyway. Sometimes I try other things to see what the fuss it about
06:34:11FromDiscord<Elegantbeef> We cant wait for you to try programming πŸ˜›
06:36:33FromDiscord<evoalg> https://play.nim-lang.org/#ix=3Fq7 like this you mean?
06:37:23FromDiscord<Elegantbeef> Shit you got me
06:38:26FromDiscord<Elegantbeef> That's an interesting way to sum
06:39:06FromDiscord<evoalg> I need practice at recursion so I'm starting small
06:49:02*ozzz quit (Ping timeout: 265 seconds)
06:49:22*ozzz joined #nim
07:15:09FromDiscord<Valdar> In reply to @evoalg "ok I'll try": hmm, that's the only thing I've ever needed, and I use it every day. Are you using Saem's linter and enabled globally?
07:16:35FromDiscord<evoalg> I'm using Saem's nim and Error Lens ... is Saem's linter something different?
07:23:05FromDiscord<evoalg> ... but I'd better get back to nimming or Elegant will have a beef with me πŸ˜‰
07:37:59*Lord_Nightmare quit (Remote host closed the connection)
07:40:21*Lord_Nightmare joined #nim
07:46:41FromDiscord<Valdar> no, just Saem's Nim extension (it has to be enabled; not just installed). I haven't tried Error Lens. I'll have to check it out. I'm on Windows and I've only touched on vim a tiny bit over the years. I might try it again now that the Win version has gotten more love. I like VSCode a lot, but I can never seem to get the suggestion popups like I want them, no matter how I change settings.
07:49:53*vicfred joined #nim
07:53:50FromDiscord<evoalg> saem's nim extension was already enabled so it's not that (but thank you for trying). Sounds like you might like onivim2 that Elegantbeef was mentioning ... might be the best of vim and vscode combined (maybe)
07:55:48FromDiscord<Valdar> np, sorry it didn't work. I'll have a look at onivim2, thx
07:56:07FromDiscord<evoalg> it's still alpha though at the moment I think
07:56:33FromDiscord<Elegantbeef> It is, and you have to build it from source if you want to test it unless you subscribe to their patreon
07:57:10*krux02 joined #nim
07:57:23FromDiscord<Valdar> does it have a language extension for Nim?
07:57:58FromDiscord<Elegantbeef> It uses Vscode extensions
07:58:03FromDiscord<Elegantbeef> So yes
07:58:51FromDiscord<Valdar> Thx, I'll definitely check it out then
07:58:55FromDiscord<Elegantbeef> It only uses JS for the vscode extensions, otherwise it's compiled code
07:59:12FromDiscord<Elegantbeef> So it's pretty interesting, as it's not electron and not running js for all code
08:07:12FromDiscord<evoalg> The advantage of vim is it's so lite and is standard with linux, so if you have to ssh to a command-line-only server (for example) then you can still do programming with vim. Not user-friendly though. It's been around for a looong time.
08:07:24FromDiscord<enthus1ast> Do you use a message queue from nim (rabbitmq, mqtt, Kafka, etc)? If yes which one? Which module you use?
08:08:17FromDiscord<evoalg> (don't forget zeromq)
08:19:21FromDiscord<enthus1ast> Yeah maybe zmq↡I was thinking of just use postgres (as I do for mostly everything now) since postgres also has pub sub etc
08:20:16*vicfred quit (Quit: Leaving)
08:22:06*PMunch joined #nim
08:22:35FromDiscord<enthus1ast> The feature I need is pub/ack. And when there is no ack resend to another worker. Since this would be an internet project I expect thinks to break often 😁
08:26:41FromDiscord<enthus1ast> And I kinda want the producers just fire and forget and not handle failures by themself
08:32:21FromDiscord<Rika> I was planning on wrapping zero mama but I have no time
08:32:24FromDiscord<Rika> Mq wow
08:32:25FromDiscord<Rika> Lol
09:51:14FromDiscord<enthus1ast> @Rika\: what's wrong with the "official" wrapper?
10:09:38FromDiscord<Rika> Probably didn’t see it actually
10:09:40FromDiscord<Rika> There is!
10:09:42FromDiscord<Rika> ?
10:15:27FromDiscord<Yardanico> In reply to @Rika "There is!": https://github.com/nim-lang/nim-zmq
10:17:07FromDiscord<Rika> Nice
10:17:12FromDiscord<Rika> Guess I don’t need to make one then
11:01:18FromDiscord<machineko> In reply to @Elegantbeef "https://github.com/saem/vscode-nim#debugging": thanks for link i tried it before but have problem with preLaunchTask cant find any info how to link it
11:08:33*Vladar joined #nim
11:09:02FromDiscord<evoalg> I'm trying to recursively sum values in an irregular tuple, eg `(1, 2, (3, 4), (5, 6))` and this is the closest I've come up with but I can't get the type right or something: https://play.nim-lang.org/#ix=3Fr3 ... how would I be able to do it?
11:11:51FromDiscord<Yardanico> In reply to @evoalg "I'm trying to recursively": you are checking a type and in nim types are static, so you should use `when`
11:11:59FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Fr5
11:12:03FromDiscord<Yardanico> but why do this? tuples aren't really supposed to be used for this
11:13:51FromDiscord<Yardanico> also be aware that this approach will generate a lot of functions for each tuple, because it's an implicit generic
11:13:58FromDiscord<Yardanico> so it has to generate a function for each combination of types
11:14:13FromDiscord<Yardanico> in the code above it'll make two functions
11:15:02FromDiscord<evoalg> Thank you ... I was trying some easy recursive exercises from python and seeing if I could do it in nim ... the exercise was to sum the python list `[1, 2, [3, 4], [5, 6]]` but in nim only tuples can be heterogeneous right?
11:15:33FromDiscord<Yardanico> well, in this case yes, but generally you wouldn't use such an approach in nim
11:15:46FromDiscord<Yardanico> and also tuples aren't a good way to replicate this python behaviour
11:15:56FromDiscord<Yardanico> because you can't "create" new tuple types in runtime
11:16:16FromDiscord<evoalg> ahhh I see
11:16:20FromDiscord<Yardanico> the best approach to replicate this would be to use a `seq` storing object variants
11:16:23FromDiscord<Yardanico> something like
11:17:35FromDiscord<evoalg> I understand, thank you!
11:19:24PMunchOr just store the two first numbers in a single-element seq
11:19:56FromDiscord<hmmm> nimions my rudimentary cs knowledge is failing me, why can't I build a mixed std/table like this: {"thingy":false,"thongy":"thongydata"}
11:20:11FromDiscord<hmmm> should I just use type objects and call it a day?
11:20:16FromDiscord<Yardanico> In reply to @hmmm "nimions my rudimentary cs": because tables only support a 1-1 type mapping
11:20:28FromDiscord<Yardanico> you can do what you want with object variants, e.g. with `std/json` module, or create a custom object variant
11:20:35FromDiscord<Yardanico> In reply to @evoalg "I understand, thank you!": it might not be the best way, but :
11:20:40FromDiscord<Yardanico> just a rough example
11:20:42FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Fr6
11:22:01FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Fr7
11:22:16FromDiscord<Yardanico> % is a generic proc to convert a nim type to the one of the json object variant
11:22:33FromDiscord<hmmm> it basically takes false bool and makes it a string?
11:22:36FromDiscord<Yardanico> why do you need what you want though?
11:22:38FromDiscord<Yardanico> In reply to @hmmm "it basically takes false": no
11:22:53FromDiscord<Yardanico> json supports bool as a native data type, so it makes a object variant with the kind of JBool
11:23:06FromDiscord<hmmm> hmmm
11:23:35FromDiscord<hmmm> well the idea is that I don't have thingy data right now and I when I will have it in the future I will update the table
11:24:00FromDiscord<Yardanico> still not sure what you mean, sorry
11:24:09FromDiscord<Yardanico> if you mean you want a placeholder for non-existing data, you can just use std/options
11:24:16FromDiscord<hmmm> yea I want a placeholder
11:24:17FromDiscord<Yardanico> or just don't create entries in the table
11:24:23FromDiscord<Yardanico> you can just check if something's in the table
11:24:50FromDiscord<hmmm> I want to be able to check if first part is in the table tho, so I'd like to be there in the table
11:25:01FromDiscord<Yardanico> then yeah, use std/options
11:25:21FromDiscord<Yardanico> you can also check for string emptyness for that, but it's a bit of a hack
11:25:32FromDiscord<hmmm> yea I wanted to avoid that
11:27:01FromDiscord<Yardanico> another way is to use getOrDefault
11:27:06FromDiscord<Yardanico> and think of some other placeholder for an empty value :)
11:27:20FromDiscord<Yardanico> ah nvm, just use options
11:28:37FromDiscord<Yardanico> @hmmm
11:28:38FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Fr9
11:28:46FromDiscord<evoalg> In reply to @PMunch "Or just store the": I guess the idea is that we are pretending we don't know what the tuple will look like, but in practice we will know in Nim as it can't be built in runtime (if I understand correctly?) so that means we will know what it looks like and we can handle it much more easily, right?
11:28:57FromDiscord<Yardanico> it's sometimes good to think of another way of doing something rather than replicating the way you did it in another language :)
11:29:14FromDiscord<evoalg> very true
11:29:33FromDiscord<Yardanico> In reply to @evoalg "I guess the idea": the problem is that you can't construct a tuple in runtime, so all the usefulness of such nested list approach goes away
11:29:40FromDiscord<Yardanico> so it has to be done with object variants
11:29:47FromDiscord<evoalg> makes sense
11:30:20FromDiscord<hmmm> damn option is perfect
11:30:29FromDiscord<hmmm> ty yardy :nim1:
11:31:12FromDiscord<Yardanico> In reply to @hmmm "damn option is perfect": i also used getOrDefault to avoid nested `if`s and a bit nicer code
11:38:42FromDiscord<MrOkram> Hello, quick question, if i use `createThread` to create a long running thread, how can i later stop/destroy it? I've seen a `destroyThread` function in `threads.nim`, but can't seem to access it.
11:44:53FromDiscord<Yardanico> In reply to @MrOkram "Hello, quick question, if": the quick answer is that you can't
11:45:23FromDiscord<Yardanico> https://forum.nim-lang.org/t/7092, there are other forum threads too
11:48:46*pro joined #nim
12:01:16*crem quit (Ping timeout: 260 seconds)
12:06:02*supakeen quit (Quit: WeeChat 3.3)
12:06:32*supakeen joined #nim
13:07:06FromDiscord<Clonkk> Currently, the best solution is to use Channel / Messaging queue as a synchronization method↡(@MrOkram)
13:07:39FromDiscord<evoalg> In reply to @Yardanico "so it has to": Don't hate me (I only did this as a learning exercise): https://play.nim-lang.org/#ix=3Frs πŸ˜‰
13:08:01FromDiscord<Yardanico> In reply to @evoalg "Don't hate me (I": well that still won't work
13:08:14FromDiscord<Yardanico> it won't be a tuple in runtime anyway
13:08:16FromDiscord<Yardanico> it'll be a string
13:08:27FromDiscord<Yardanico> you wouldn't be able to create a tuple from that string at runtime
13:08:33FromDiscord<MrOkram> In reply to @Clonkk "Currently, the best solution": It's a locking thread, aka, i'm using it to run a powershell command that blocks and doesn't exit. I found a solution, and that's to just get that powershell's process ID and kill it.
13:08:59FromDiscord<MrOkram> Not the most graceful way to do it, but it works.
13:09:21FromDiscord<MrOkram> Also, any recommendations for SSH libraries that still work ?
13:11:49FromDiscord<Tom> sent a code paste, see https://play.nim-lang.org/#ix=3Frt
13:13:34FromDiscord<Yardanico> In reply to @Tom "I'm trying to study": I don't know of such a way, you either have side effects or don't have them. There are tags though, but they're not widely used
13:13:35FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#effect-system-tag-tracking
13:13:45FromDiscord<Tom> Thanks for the info!
13:14:23FromDiscord<Yardanico> also for some recent discussion on effects see https://forum.nim-lang.org/t/8613 https://forum.nim-lang.org/t/8631
13:15:01PMunchYou can of course do this: https://play.nim-lang.org/#ix=3Fru
13:16:01PMunchBut just for completeness the way you're "supposed" to do it is to create a Rand object with `initRand` and then pass that in as a var parameter
13:16:25PMunchThat will avoid the side effect and not simply hide it
13:16:38FromDiscord<Yardanico> In reply to @PMunch "You can of course": that wasn't the problem
13:16:56FromDiscord<Yardanico> as I understand it Tom asked for a way to specify _which_ side effect is fine specifically
13:17:02FromDiscord<Yardanico> " a way to specify that this is the only side effect I expect"
13:18:16PMunchI know, and as you said you can't really do that as sideEffect is one single effect
13:18:28PMunchBut you can do something like this: https://play.nim-lang.org/#ix=3Frz
13:19:15PMunchNow you say only the side effects of `rand(high - 1)` are allowed, but no other side effect, which is essentially what they asked for
13:20:11PMunch(you could of course move `high - 1` outside the cast to make sure that no one overrides `-` and creates side effects
13:20:55PMunchSomething like this: https://play.nim-lang.org/#ix=3FrA
13:21:39PMunchYou could of course move that into a template or it's own func if you liked
13:22:25FromDiscord<Tom> For reference, here's the same in koka: https://github.com/contextfreecode/procfun/blob/13f3b5d5358181618ca84b6dde64605d3595f336/guess.kk#L28
13:23:03FromDiscord<Tom> And yeah, I want to clearly annotate the side effects of the procedure. To whatever extent is possible and/or idiomatic in Nim.
13:23:42FromDiscord<Tom> In reply to @PMunch "But just for completeness": That's a good point. I'll consider that option.
13:23:59PMunchSomething like this: https://play.nim-lang.org/#ix=3FrC
13:24:14FromDiscord<Tom> In reply to @Yardanico "also for some recent": These are about possible future language features, right?
13:24:26FromDiscord<Tom> In reply to @Yardanico "I don't know of": I might experiment with tags.
13:25:42*arkurious joined #nim
13:26:33FromDiscord<Tom> In reply to @PMunch "Something like this: https://play.nim-lang.org/#ix=": I'd prefer the hint to be at the top level of the pickAnswer function and then require recognition by callers. To me, calling it a `func` hides the effect. I'd rather just say `proc`. I only said `func` earlier to force the error to see what it told me.
13:30:00PMunchAh, well as Yardanico already mentioned, side effects are a single effect in Nim. So you can't really limit your side effects to only specific things (unless you pass in var arguments like I suggested, this makes the caller aware that this argument will be mutated(.
13:32:26FromDiscord<Tom> Yeah, the argument idea is good. The tags seem to get the effect done somewhat, too, although it requires explicit `{.tags: [].}` or such in the caller to check against them. And I might need to occasionally suppress effects if I know they're handled within a function, so thanks much for the cast examples.
13:32:56FromDiscord<Tom> And glad to know tags aren't used much. I like to know what's idiomatic. Thanks much to both of you for the feedback!
13:39:33FromDiscord<Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3FrL
13:42:12PMunchSomething like `pragma(t.getImpl)` works
13:42:52PMunch`pragma` is defined in the macros module, I recommend checking there when you need to find things related to macros
13:46:05FromDiscord<Tanguy> Oh, thanks, I had found pragma, but not getImpl
13:48:29FromDiscord<Tom> In reply to @Tom "And glad to know": By the way, I've now got examples for both a `var Rand` parameter and a `{.tags: [Rand].}` option, and both are interesting for compare and contrast. Thanks!
13:49:14PMunchCurious how you did the tags version, did you just override the rand procedure to add an effect?
13:59:32*pro quit (Quit: WeeChat 3.3)
14:02:21FromDiscord<tandy> how can you compare enum values which are ints?
14:02:44FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3Fs1
14:03:00FromDiscord<tandy> thats the enum, and im getting an error when comparing it to an int
14:04:00PMunchWhy are you comparing it to an int?
14:04:16PMunchTo get the integer value of an enum you can use `ord`
14:04:40FromDiscord<tandy> oh i see↡(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
14:04:58FromDiscord<tandy> program logic needs to check if some int is below difficulty value↡(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
14:05:08PMunchAah I see
14:05:18PMunchWell then `ord` is the way to go
14:05:39FromDiscord<tandy> nicee that works tyty
14:09:02*Vladar quit (Read error: Connection reset by peer)
14:13:30*Colt quit (Quit: Leaving)
14:18:04*crem joined #nim
14:23:03FromDiscord<hmmm> hey what does the {inline} thingy do
14:23:55*src joined #nim
14:24:12PMunchIt inlines things :P
14:25:26PMunchBasically a procedure call takes a little bit of work to do. Inlining is the act of taking the content of the procedure and copy it to the callsite, instead of calling the procedure.
14:25:40PMunchThis is, in a way, the same thing a template does
14:26:05PMunchBut `inline` is a C concept, so the {.inline.} pragma simply tells the C compiler that you want this to be inlined.
14:26:17PMunchIt is free to ignore it however, if it decides it would be faster not to
14:34:19FromDiscord<hmmm> hmm
14:34:42FromDiscord<hmmm> ok not something I need lol
14:42:07PMunchIt's mainly used for optimisations
15:16:13*PMunch quit (Quit: leaving)
15:22:30FromDiscord<Tom> sent a code paste, see https://paste.rs/wP8
15:30:53FromDiscord<dom96> oh hello @Tom πŸ™‚β†΅Yep, that's exactly the idea.
15:43:08FromDiscord<exelotl> I saved this lost interview with @Araq, maybe it should be reposted somewhere? (on the nim blog or forums or something?)
15:43:12FromDiscord<exelotl> https://paste.sr.ht/~exelotl/be96c1f0efc658a407f4d6e5299f036572388a2e
16:13:21FromDiscord<enthus1ast> But There's stuff missing eg the curve functions
16:38:35FromDiscord<Fish-Face> With 1.6 I see there is `iterable[T]` - are there equivalents to `sequtils` which make use of it yet?
16:39:03FromDiscord<Fish-Face> and/or other stdlib stuff - I'd like to be able to `map` and `sum` specifically
16:39:53FromDiscord<IsaacPaul> https://github.com/zero-functional/zero-functional - macro↡https://github.com/def-/nim-iterutils - for iterators
16:40:07FromDiscord<Fish-Face> ah ok
16:40:23FromDiscord<Fish-Face> is there any plan to incorporate that functionality into the standard library?
16:40:28FromDiscord<IsaacPaul> I'm not sure how well it works with iterable[T] but thats what I'm aware of
16:45:52FromDiscord<Vindaar> Ideally `sequtils` should be using `iterable[T]` already, yes. Not sure if all `sequtils` procs map nicely to `iterable[T]` though
16:51:10FromDiscord<jtiai> I know how to make bit-flags with cuchar and enum. But what if I have bit fields like `0aabbccc` where aa and bb are two bit flags and ccc is three bit flag. Is there some simple way to have such flags?
16:51:45FromDiscord<Fish-Face> thanks, useful to know
16:59:02FromDiscord<dom96> In reply to @exelotl "I saved this lost": sure, it would work best on an external website but if all else fails we can post it on nim-lang.org
17:01:56*Vladar joined #nim
17:13:45FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3Ft5
17:14:11FromDiscord<IsaacPaul> the string name or some what for me to figure out what it is lol
17:14:18FromDiscord<IsaacPaul> (edit) "what" => "way"
17:36:13FromDiscord<brainproxy> is there a platform-independent way to determine the nimble/pkgs dir in the context of a project's `.nimble` file?
17:41:00FromDiscord<dom96> In reply to @brainproxy "is there a platform-independent": what's the context? Do you need it for an app you're writing?
17:45:09FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3Ftd
17:45:18FromDiscord<brainproxy> (edit) "https://play.nim-lang.org/#ix=3Ftd" => "https://play.nim-lang.org/#ix=3Fte"
17:45:37FromDiscord<brainproxy> (edit) "https://play.nim-lang.org/#ix=3Fte" => "https://play.nim-lang.org/#ix=3Ftf"
17:47:10FromDiscord<brainproxy> btw, it would be nifty if choosenim's `init.sh` allowed you to (optionally) spec the choosenim install dir and the nimble dir, so e.g. can have unified logic including Windows when driving windows from MSYS2
17:47:29FromDiscord<brainproxy> (edit) "windows" => "Windows"
17:48:48FromDiscord<brainproxy> (edit) "btw, it would be nifty if choosenim's `init.sh` allowed you to (optionally) spec the choosenim install dir and the nimble dir, so e.g. can have unified logic including Windows when driving Windows from MSYS2 ... " added "bash"
18:09:18FromDiscord<jtiai> sent a code paste, see https://play.nim-lang.org/#ix=3Ftl
18:10:27FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3Fto
18:11:05FromDiscord<dom96> In reply to @brainproxy "it's related to that": I see, `staticExec("nimble path foo@#head")` might work. If not it's a bug and we should fix it, but the basic implementation of this is there I hope πŸ™‚
18:11:40FromDiscord<dom96> in general though it seems like you are working around a limitation in nimble
18:11:41FromDiscord<brainproxy> but what if the branch I want is not head?
18:12:23FromDiscord<brainproxy> ah, sorry, you're just giving example, I misread
18:12:29FromDiscord<brainproxy> will give it a shot
18:12:35FromDiscord<dom96> good question, I don't think other branches will work actually
18:12:42FromDiscord<brainproxy> ah, interesting
18:12:43FromDiscord<dom96> hm
18:12:46FromDiscord<dom96> they might
18:12:51FromDiscord<dom96> I can't remember what nimble does in that case
18:13:15FromDiscord<dom96> just make sure you install via `nimble install foo@#branch`
18:13:42FromDiscord<dom96> but still, we should resolve that limitation you are working around
18:13:51FromDiscord<dom96> why are you passing these paths explicitly?
18:15:42FromDiscord<reilly> In reply to @dom96 "why are you passing": IIRC Package A needs Version X of of Package C, but Package B (or maybe their own code?) needs version Y of Package C.
18:20:37FromDiscord<exelotl> sent a code paste, see https://paste.rs/WKl
18:21:36FromDiscord<jtiai> In reply to @exelotl "you mean using a": Yea I have `SysFlags = set[SysFlag]`
18:22:12FromDiscord<exelotl> ohh right, you want different names for the same bit?
18:22:59FromDiscord<jtiai> In reply to @exelotl "ohh right, you want": Yeas, exactly.
18:23:18FromDiscord<exelotl> do you want them to be interchangeable e.g. {a1, a2} == {a1}
18:25:12FromDiscord<exelotl> you might be able to just use constants
18:25:25FromDiscord<exelotl> e.g. const a2 = a1
18:25:48FromDiscord<jtiai> In reply to @exelotl "do you want them": Nope, fixed bit patterns.
18:27:00FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3Fts
18:27:31FromDiscord<jtiai> sent a code paste, see https://play.nim-lang.org/#ix=3Ftu
18:28:31*vicfred joined #nim
18:33:29FromDiscord<jtiai> (I should have done smarter system in my emulator... πŸ˜„ )
18:38:05FromDiscord<Yardanico> In reply to @Vindaar "Ideally `sequtils` should be": The problem with iterable[T] is that the name is quite misleading - it's not a something like an Iterable[T] concept, it's just a way to pass iterators to templates specifically. Sure sequtils templates can get a bit shorter by using it and it solves the gotcha with method call syntax, but nothing more. @Fish-Face answer to you too
18:38:11FromDiscord<Yardanico> https://github.com/nim-lang/Nim/blob/version-1-6/changelogs/changelog_1_6_0.md#iterablet see the changelog entry about it
18:40:17*rb quit (Quit: ZNC - https://znc.in)
18:40:36*rwb joined #nim
18:41:19FromDiscord<Yardanico> I mean in the future it can be expanded, but as of now it has limited usefulness
18:46:52FromDiscord<Vindaar> In reply to @Yardanico "The problem with iterable[T]": oh, damn. Then I misremembered. I thought it was a concept
18:47:08FromDiscord<Yardanico> yeah I was confused at first too
18:50:32FromDiscord<Vindaar> well, then let's rephrase and say it'd be great to have an `Iterable[T]` concept that we use for `sequtils`, heh
18:51:36*advesperacit joined #nim
18:52:32FromDiscord<Alaindevos> nim creates c files with a stupid character "@" . Can this be disables so it creates files with normal characters ?
18:52:43*vicfred quit (Quit: Leaving)
18:52:51FromDiscord<Alaindevos> (edit) "nim creates c files with a stupid character "@" . Can this be disables so it creates files with ... normal" added "only"
18:53:12FromDiscord<Alaindevos> (edit) "disables" => "disabled"
18:53:54NimEventerNew thread by Araq: The Cylons have a Plan, see https://forum.nim-lang.org/t/8642
19:02:08*advesperacit quit (Ping timeout: 256 seconds)
19:02:47*advesperacit joined #nim
19:21:31*PMunch joined #nim
19:29:17FromDiscord<brainproxy> sent a long message, see http://ix.io/3FtM
19:30:12FromDiscord<brainproxy> (edit) "http://ix.io/3FtM" => "http://ix.io/3FtN"
19:34:46FromDiscord<zetashift> Is it bad that I still don't really know what a `concept` is? It's like a trait/typeclass right?
19:36:13FromDiscord<IsaacPaul> Kinda like alike an interface
19:36:16FromDiscord<zetashift> if it is, that's also probably how I can fix it, learn what a type class really is \:P
19:36:33FromDiscord<zetashift> I know from Scala that traits are used like an interface
19:36:36FromDiscord<IsaacPaul> (edit) "alike" => ""
19:37:17FromDiscord<brainproxy> kind of a monad?
19:37:32FromDiscord<reilly> What non-stdlib multithreading packages are out there besides Weave?
19:37:55FromDiscord<zetashift> I don't think it's like a monad \:P
19:38:38FromDiscord<IsaacPaul> https://gist.github.com/honewatson/583135c1b191119a3b3be3fdbfe8607b
19:38:50FromDiscord<IsaacPaul> examples of concepts ^
19:41:22FromDiscord<brainproxy> In reply to @zetashift "I don't think it's": I was just being 🀑
19:45:22FromDiscord<zetashift> ah haha
19:45:34FromDiscord<zetashift> the M-word has a lot of power
19:58:48*Colt joined #nim
20:03:25FromDiscord<sharpcdf> sent a code paste, see https://play.nim-lang.org/#ix=3Fu0
20:03:49FromDiscord<sharpcdf> i tried `include src/foo` and just plain `include foo`
20:03:56FromDiscord<sharpcdf> (and yes i mean include not import)
20:06:00*elph joined #nim
20:06:24FromDiscord<enthus1ast> in regards to araqs post, i actually like how the compiler api threads absolute and relative path
20:06:42FromDiscord<enthus1ast> or at least, that they have their own type
20:07:18FromDiscord<enthus1ast> then we don't have to guess if this particular api uses a absolute or a relative path
20:09:09FromDiscord<enthus1ast> @sharpcdf\: i don't know for sure, but would intuitively try either `import foo` or move main.nim also to src/
20:09:47FromDiscord<enthus1ast> you can check if you folder structure is good with `nimble check`
20:09:53FromDiscord<sharpcdf> i have no reason for using import as i want to use everything in each file, i just want to seperate them for organization
20:10:03FromDiscord<sharpcdf> but ill just include main.nim into the src folder too
20:10:05FromDiscord<sharpcdf> ill try that
20:16:18FromDiscord<0xc45> Hi all, does anyone have any experience with the `The specified module could not be found` error when cross-compiling a Winim DLL from Linux to Windows?↡I'm aware this is a very vague query but I seem to be running circles trying to debug it 😦
20:17:34FromDiscord<hmmm> 🀨
20:18:07FromDiscord<hmmm> araq made a plan for 2.0 and didn't considered my informal rfc of changing string.toLowerAscii to string.lower 🧐
20:18:26FromDiscord<hmmm> didn't considered is english 3.0 btw
20:19:08FromDiscord<enthus1ast> @hmmm\: because there is `toLower` in the unicode module already
20:19:15FromDiscord<hmmm> hmmmmm
20:19:26FromDiscord<hmmm> if python did something good in this world is getting the name right
20:19:30FromDiscord<hmmm> names
20:20:08FromDiscord<enthus1ast> afaik we had a lower (or was it toLower?) in strutils a few years ago, but imho it was depricated if i remember correctly
20:22:31FromDiscord<hmmm> on the other hand our thingy.add() is clearly superior to the 19th century .append, so we have that for us which is nice πŸ€”
20:28:27*src_ joined #nim
20:29:21*src__ joined #nim
20:29:28*src__ quit (Remote host closed the connection)
20:29:30FromDiscord<IsaacPaul> i mean if we had different types for ascii strings and unicode strings having a shorter method makes sense.. otherwise explicit > implicit is cleaner to me.
20:31:40*src quit (Ping timeout: 256 seconds)
20:33:09*src_ quit (Ping timeout: 268 seconds)
20:33:14FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3Fu9
20:33:53*rockcavera joined #nim
20:33:54*rockcavera quit (Changing host)
20:33:54*rockcavera joined #nim
20:34:30FromDiscord<enthus1ast> i mean, this function is so seldom used...
20:34:34FromDiscord<enthus1ast> why bother \:)
20:34:43FromDiscord<hmmm> ha! I had a plan for that, unicode was string.loweru 😎
20:35:00FromDiscord<Yardanico> why not call it `lu` then
20:35:03FromDiscord<Yardanico> if you want short name slike that
20:35:05FromDiscord<hmmm> perfect!
20:35:06FromDiscord<Yardanico> (edit) "name slike" => "names like"
20:35:21FromDiscord<IsaacPaul> In reply to @Yardanico "why not call it": D:
20:36:51FromDiscord<IsaacPaul> all 1-2 character variables can die in a fire unless you're `i`. If you ask me.
20:37:22FromDiscord<Yardanico> what about j and k ? :/
20:37:29FromDiscord<hmmm> also v
20:37:32FromDiscord<Yardanico> no
20:37:41FromDiscord<Yardanico> never used `v` as a single char variable name :)
20:37:50FromDiscord<Yardanico> `s` yes, for string or seq or some stuff
20:37:51FromDiscord<hmmm> for i,v!
20:37:56FromDiscord<enthus1ast> never use single char variables at all ;)
20:37:58FromDiscord<Yardanico> In reply to @hmmm "for i,v!": `e` for elem
20:38:36FromDiscord<IsaacPaul> I understand j and k .. but it's still a code smell to me
20:40:00FromDiscord<enthus1ast> single char var == hell lot of fun to grep for it, or replace it, or multicursor it; please don't
20:40:16FromDiscord<Yardanico> pfft
20:40:21FromDiscord<Yardanico> i can use single-letter unicode names
20:40:24FromDiscord<Yardanico> that's the peak programming!
20:40:32FromDiscord<enthus1ast> at least double it\: ss, ii, ee
20:40:33FromDiscord<IsaacPaul> In reply to @enthus1ast "single char var ==": you should see the nim source code T.T
20:40:36FromDiscord<Yardanico> var Π° = 5; echo a
20:40:38FromDiscord<Yardanico> good luck
20:43:44FromDiscord<hmmm> oh python also has the beautiful int(thingy) and float(thingy)
20:43:49FromDiscord<hmmm> you cannot beat that
20:47:24FromDiscord<Yardanico> In reply to @hmmm "oh python also has": yeah, which is not really good
20:47:32FromDiscord<Yardanico> you just think that it's good because python uses it and is popular :)
20:47:58FromDiscord<hmmm> hmm
20:49:30FromDiscord<Yardanico> and maybe stop trolling and go do something serious for once ;)
20:49:42FromDiscord<Elegantbeef> Never do that
20:49:58FromDiscord<hmmm> πŸ˜…
20:50:18*oz quit (Read error: Connection reset by peer)
20:50:34FromDiscord<IsaacPaul> I do like the constructor-like format for primitives. Swift uses it. It looks good to me. `var myFloat = Float(myInt)`↡I don't know what it is in python tho, Imma assume the same.
20:50:49FromDiscord<Yardanico> In reply to @IsaacPaul "I do like the": it's not that
20:50:55FromDiscord<Yardanico> in python it's multi-purpose
20:51:04FromDiscord<Yardanico> you can do `float('1.0')` and it'll convert a string to a float
20:51:15FromDiscord<IsaacPaul> oh..
20:51:42FromDiscord<Yardanico> in Nim it behaves as a normal type conversion, yes, you can do `int(5.9)` and it'll only keep the whole part (truncate)
20:51:57FromDiscord<Elegantbeef> It does the proper thing
20:52:20FromDiscord<Elegantbeef> `someType(anotherType)` is a type conversion in nim
20:52:32FromDiscord<Yardanico> yes
20:52:37FromDiscord<Elegantbeef> Which should be a cheap and even sometimes free operation
20:53:14FromDiscord<Yardanico> and contrast to simple float-to-int or int-to-float string parsing involves exceptions
20:54:43*Vladar quit (Quit: Leaving)
21:06:55*src joined #nim
21:16:03*krux02 quit (Quit: Leaving)
21:16:33*krux02 joined #nim
21:18:48FromDiscord<IsaacPaul> I was trying to get c2nim to support inline cpp constructors... _nevermind.._
21:20:14FromDiscord<evoalg> curious ... what exceptions would string parsing have to mean parseInt has to be used instead of making int do string-to-int ?
21:20:40FromDiscord<Yardanico> In reply to @evoalg "curious ... what exceptions": what if a string doesn't contain a number?
21:20:46FromDiscord<Elegantbeef> The string isnt an int
21:23:26FromDiscord<evoalg> just trying to understand "someType(anotherType) is a type conversion in nim" <-- so int(string) fit's that? ... if the string doesn't have an int then an exception is raised in python too?
21:23:40FromDiscord<Yardanico> In reply to @evoalg "just trying to understand": in python an exception in raised, in nim it won't work
21:23:46FromDiscord<Yardanico> because in nim it's just a type conversion, not parsing
21:24:00FromDiscord<evoalg> ahhh ok
21:33:23*rockcavera quit (Remote host closed the connection)
21:53:58*src quit (Quit: Leaving)
21:54:29*src joined #nim
22:16:30FromDiscord<tandy> https://github.com/nim-lang/RFCs/issues/437
22:16:39*advesperacit quit (Quit: advesperacit)
22:21:17FromDiscord<deech> sent a long message, see http://ix.io/3Fuy
22:22:14FromDiscord<Elegantbeef> https://github.com/status-im/questionable#options probably what you want
22:22:23FromDiscord<Elegantbeef> Dont really need a macro for this as a macro will just work
22:22:27FromDiscord<Elegantbeef> as a template\
22:23:35FromDiscord<Elegantbeef> I'd say make type aliases since you probably should anyway but i dont generally like tuples so... probably biased
22:23:46FromDiscord<deech> I'm not sure how this makes it easier, the `none` case still requires me to specify the type in full.
22:24:42FromDiscord<Elegantbeef> If you type alias that mess of a type you'd safe yourself the headache πŸ˜›
22:25:22FromDiscord<deech> Yeah I know. πŸ™‚ But sometimes you just need some type inference.
22:26:02FromDiscord<Elegantbeef> What do you mean?
22:26:31FromDiscord<π™§π™šπ™’> in that library instead of `?int` it should be `int?` like every other language
22:26:34FromDiscord<π™§π™šπ™’> looks weird af
22:26:37FromDiscord<deech> Like given the previous example I just want to do `p(none)`, not `p(none(seq[tuple[..]]])`
22:26:50FromDiscord<Elegantbeef> No postfix operators in nim
22:26:56FromDiscord<Elegantbeef> other than ``
22:28:34FromDiscord<enthus1ast> wondering if `auto` would work there
22:33:20FromDiscord<deech> Like just pass in `p(auto)`?
22:33:47FromDiscord<enthus1ast> mh does not work, just tried it
22:37:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3FuB
22:38:04FromDiscord<Elegantbeef> Without explict calling of the converter it gives a nice error
22:41:51FromDiscord<Elegantbeef> Given the way overloading works and converters i dont imagine there is a way to do this automagically
22:42:39FromDiscord<Elegantbeef> Like a converter cannot go `X -> Generic[T]`
22:43:22FromDiscord<Elegantbeef> I do have to look at the issue i found above, seems simple to fix
22:46:40FromDiscord<Elegantbeef> The converter should work implicitly so hopefully i can fix that today
23:00:34*anddam joined #nim
23:00:38anddamhowdy
23:01:18FromDiscord<Elegantbeef> Hello!
23:59:38*averell quit (Quit: .)
23:59:54*averell joined #nim