<< 31-03-2021 >>

00:24:58*Tanger quit (Ping timeout: 252 seconds)
00:25:36*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
00:25:57*njoseph joined #nim
00:35:45*casaca joined #nim
01:04:09*Tanger joined #nim
01:07:50*Tlangir joined #nim
01:10:06*Tanger quit (Ping timeout: 240 seconds)
01:20:38ForumUpdaterBotNew thread by Nnahito: I want to use gecko driver headless., see https://forum.nim-lang.org/t/7722
01:23:22FromDiscord<Zachary Carter> going live
01:30:46FromDiscord<Dav1s> any command for nim to show the installation path?
01:33:50FromDiscord<ElegantBeef> Install path?
01:33:54FromDiscord<Dav1s> yep
01:34:04FromDiscord<ElegantBeef> where the nim binary is?
01:34:08FromDiscord<Dav1s> yep
01:34:10FromDiscord<ElegantBeef> `which nim` on nix afaik
01:34:13FromDiscord<ElegantBeef> No clue on windows
01:34:25FromDiscord<Dav1s> damn
01:34:43FromDiscord<Dav1s> I installed an older version by mistake
01:34:48FromDiscord<ElegantBeef> Well use choosenim
01:35:11FromDiscord<Dav1s> can't manage to find where is installed xd
01:35:21FromDiscord<Dav1s> In reply to @ElegantBeef "Well use choosenim": k
01:35:58FromDiscord<ElegantBeef> Best way to install any language is to use something like that simply so you can easily move around
01:37:06FromDiscord<Dav1s> https://media.discordapp.net/attachments/371759389889003532/826631152278044672/unknown.png
01:37:08FromDiscord<Dav1s> https://media.discordapp.net/attachments/371759389889003532/826631161014386749/unknown.png
01:37:12FromDiscord<Dav1s> well
01:37:32FromDiscord<ElegantBeef> You have two installed
01:37:38FromDiscord<Dav1s> yep
01:37:38FromDiscord<ElegantBeef> Remove the path var for the other version
01:38:08FromDiscord<Dav1s> In reply to @ElegantBeef "Remove the path var": the problem is that I can't find the other one in the path var list xd
01:39:21FromDiscord<Dav1s> the only one there is 1.4.4 https://media.discordapp.net/attachments/371759389889003532/826631721112829983/unknown.png
01:39:46FromDiscord<ElegantBeef> Did you install it with chocolatey?
01:39:49FromDiscord<Dav1s> yep
01:40:26FromDiscord<ElegantBeef> So uninstall it from there
01:42:35FromDiscord<Dav1s> k
01:42:58FromDiscord<Dav1s> I miss apt whish I was on linux xd
01:43:03FromDiscord<ElegantBeef> lol
01:43:15FromDiscord<ElegantBeef> Apt wouldnt help you much here really, since you installed a language through a repository
01:43:52FromDiscord<ElegantBeef> The most recent apt package for nim seems to be 1.0.6
01:44:10FromDiscord<Dav1s> could just remove the package xd
01:44:16FromDiscord<Dav1s> choco is giving me random errors
01:44:18FromDiscord<ElegantBeef> Oh
01:44:20FromDiscord<ElegantBeef> Lol
01:44:30FromDiscord<ElegantBeef> ~~Stab at window package managers here~~
01:44:53FromDiscord<Dav1s> I mean it's a decent workaroud
01:46:34FromDiscord<ElegantBeef> Well hey atleast windows is working on a first class package manager, only took them what 30 years?
01:47:13FromDiscord<Dav1s> 99% sure they won't actually implement it
01:47:34FromDiscord<Dav1s> neither MacOS
01:47:44FromDiscord<ElegantBeef> I mean they're making it
01:47:50FromDiscord<Dav1s> In reply to @Dav1s "neither MacOS": still from what I heard, looks like bre is really good
01:47:51FromDiscord<ElegantBeef> win-get exists 😄
01:47:57FromDiscord<Dav1s> In reply to @ElegantBeef "win-get exists 😄": wait, wtf
01:47:59FromDiscord<Dav1s> lemme test
01:48:00FromDiscord<Dav1s> xd
01:48:07FromDiscord<ElegantBeef> https://github.com/microsoft/winget-cli
01:48:19FromDiscord<Dav1s> In reply to @Dav1s "lemme test": not built-in
01:48:38FromDiscord<ElegantBeef> I suppose
01:48:43FromDiscord<Dav1s> windoes is a complete joke
01:48:44FromDiscord<ElegantBeef> I dont know, i dont develop on windows
01:48:51FromDiscord<Dav1s> I hate windows
01:49:01FromDiscord<Dav1s> literally I just use it cuz I have to
01:49:17FromDiscord<ElegantBeef> Well a majority of the developers here use nix so probably concur
01:49:37FromDiscord<ElegantBeef> Atleast the active ones tend to be
01:50:47FromDiscord<Dav1s> what is nix?
01:50:53FromDiscord<Dav1s> never heard of that
01:50:59FromDiscord<ElegantBeef> unix derived OSs
01:51:03FromDiscord<Dav1s> oh
01:51:23FromDiscord<ElegantBeef> hence the `` on nix since they're related but dont really have an umbrella term
01:52:10FromDiscord<Dav1s> In reply to @ElegantBeef "unix derived OSs": yep best choice overall
01:52:27FromDiscord<ElegantBeef> Tell that to users
01:52:32FromDiscord<Dav1s> Linux distros are best
01:52:46FromDiscord<Dav1s> MacOS is decent
01:52:50FromDiscord<Dav1s> In reply to @ElegantBeef "Tell that to users": well
01:52:54Prestigelinux is great but I think mac os is a joke
01:53:16FromDiscord<ElegantBeef> I've been wanting to try openbsd for a while but never get around to it 😄
01:53:52FromDiscord<Dav1s> The only reason why people don't use linux in desktop is because windows comes preinstalled
01:54:02FromDiscord<Dav1s> people just use whatever comes preinstalled
01:54:17FromDiscord<Dav1s> prob the average user don't even know what windows is
01:54:24FromDiscord<Dav1s> In reply to @Prestige "linux is great but": why?
01:56:52PrestigeThe OS is a hinderance, doesn't allow the user to do anything with the system. Very cookie-cutter
01:58:48FromDiscord<Dav1s> I kinda like it
02:02:24FromDiscord<ElegantBeef> As a gamer/game dev i dont understand the choice to kill off 32bit application support, and to not go with vulkan as a graphics API, especially since they're a minor part of the marketshare 😄
02:02:45FromDiscord<ElegantBeef> I mean i get why "proprietaryness"
02:02:57FromDiscord<ElegantBeef> But anyway, get your nim fixed?
02:08:08FromDiscord<Dav1s> pain https://media.discordapp.net/attachments/371759389889003532/826638962516820009/unknown.png
02:08:23FromDiscord<Dav1s> In reply to @ElegantBeef "As a gamer/game dev": yeah, there is no point to do that, or is it?
02:08:37FromDiscord<Dav1s> any advantages of killing the support?
02:08:55FromDiscord<ElegantBeef> Yea it makes more work for programmers that want crossplatform applications
02:09:22FromDiscord<Dav1s> xd
02:09:27FromDiscord<Dav1s> more jobs 😎
02:12:50FromDiscord<Dav1s> well
02:13:02FromDiscord<Dav1s> I found the folder where nim is stored
02:13:36FromDiscord<Dav1s> if I delete manually without choco will I have any problem?
02:13:51FromDiscord<ElegantBeef> Probably not, but possibly
02:14:55FromDiscord<Dav1s> fuck https://media.discordapp.net/attachments/371759389889003532/826640673489944626/unknown.png
02:15:24FromDiscord<Rika> Only windows things
02:15:45FromDiscord<Dav1s> I hate windows
02:19:23FromDiscord<Valdar> Well, not to defend windows, but if you have the folder locked by another app, that's to be expected
02:20:14FromDiscord<Valdar> and you have 2 path assignments, one system, and on user. you might want to check both
02:25:32FromDiscord<Dav1s> In reply to @Valdar "Well, not to defend": the isn't any app locking it
02:25:38FromDiscord<Dav1s> (edit) "the" => "there"
02:26:02FromDiscord<Dav1s> already checked
02:26:10FromDiscord<Valdar> do you have a terminal/cmd window open in that folder maybe?
02:26:20FromDiscord<Dav1s> nah
02:26:31FromDiscord<Dav1s> looks like vs code was the problem
02:26:44FromDiscord<Dav1s> but there wasn't anything opened
02:27:09FromDiscord<Dav1s> well, fixed
02:27:10FromDiscord<Dav1s> https://media.discordapp.net/attachments/371759389889003532/826643755801116755/unknown.png
02:27:12FromDiscord<Valdar> yeah, VSC locks its source folders
02:35:26FromDiscord<Dav1s> what is tha zip thing?
02:36:07FromDiscord<ElegantBeef> Zip thing?
02:36:21FromDiscord<Dav1s> zipfilename
02:37:32FromDiscord<Dav1s> got stuck
02:38:37FromDiscord<Dav1s> did it manually, fixed
02:38:47FromDiscord<Dav1s> ok, now it's time to code!
02:47:09FromDiscord<Dav1s> thx for the help
02:48:45*Zectbumo joined #nim
03:00:50ForumUpdaterBotNew thread by Xioren: Void return type, see https://forum.nim-lang.org/t/7724
03:02:57FromDiscord<Dav1s> Just done my hello world in nim
03:02:57FromDiscord<Dav1s> xd
03:03:02FromDiscord<Dav1s> compilation is kinda slow
03:03:17FromDiscord<ElegantBeef> uhh
03:03:21FromDiscord<Dav1s> really small runtime environment considering it's not C/C++
03:03:21FromDiscord<ElegantBeef> it shouldnt be
03:03:44FromDiscord<ElegantBeef> Nim outputs C or C++ code so that's why
03:03:59FromDiscord<Dav1s> In reply to @ElegantBeef "Nim outputs C or": ik
03:04:05FromDiscord<Rika> wdym by really slow anyway
03:04:21FromDiscord<Dav1s> im going to compare it with a c++ hello world
03:04:22FromDiscord<ElegantBeef> .437s here for it
03:04:53FromDiscord<ElegantBeef> Also get a compiler built with danger if it's that much of a concern
03:05:15FromDiscord<Rika> sigsegv
03:05:44FromDiscord<ElegantBeef> I mean saem uses a danger built compiler since it's faster
03:05:53FromDiscord<Rika> how much faster
03:05:58FromDiscord<ElegantBeef> 20%+ iirc
03:05:59FromDiscord<Dav1s> In reply to @ElegantBeef ".437s here for it": well tried again, now it took like 0.5
03:06:12FromDiscord<Dav1s> looks like first time was slower for some reason
03:06:20FromDiscord<ElegantBeef> well do `nim c -f` to skip the cache
03:07:07FromDiscord<Rika> In reply to @ElegantBeef "20%+ iirc": sounds like something someone here called lqd here should try xdddddd
03:07:10FromDiscord<Dav1s> well
03:07:15FromDiscord<Dav1s> https://media.discordapp.net/attachments/371759389889003532/826653842421579806/unknown.png
03:07:19FromDiscord<ElegantBeef> Indeed saem concurs with that
03:07:44FromDiscord<ElegantBeef> Well yea without `-f` it's using the cache
03:07:49FromDiscord<Rika> In reply to @Dav1s "well": that means your c compiler is slow or somehting
03:08:12FromDiscord<ElegantBeef> and yea your compiler errored
03:09:58FromDiscord<Dav1s> In reply to @ElegantBeef "and yea your compiler": yeah, cuz I just installed the proper migw version
03:10:18FromDiscord<Dav1s> I had another version of mingw
03:10:29FromDiscord<Dav1s> just downloaded the one in the nim's website
03:10:41FromDiscord<Dav1s> (edit) "migw" => "mingw"
03:10:43FromDiscord<Rika> idk whats your processor
03:11:26FromDiscord<Dav1s> In reply to @Rika "that means your c": prob
03:11:36FromDiscord<Dav1s> In reply to @Rika "idk whats your processor": ryzen 2600
03:11:38FromDiscord<Rika> https://media.discordapp.net/attachments/371759389889003532/826654946757443643/unknown.png
03:11:47FromDiscord<Dav1s> In reply to @Dav1s "ryzen 2600": prob decent enought
03:12:02FromDiscord<Dav1s> In reply to @Rika "": I love that theme
03:12:08FromDiscord<Dav1s> looks so nice
03:12:11FromDiscord<Rika> its just dark solarized
03:12:13FromDiscord<ElegantBeef> Solarized dark heathen!
03:12:15FromDiscord<Dav1s> what code editor is that?
03:12:20FromDiscord<Rika> its not an editor
03:12:22FromDiscord<Rika> its just a terminal
03:12:35FromDiscord<Rika> konsole w/ fira font
03:12:50FromDiscord<Rika> fish w/ some theme which i forgot the name of
03:12:56FromDiscord<Rika> fish shell
03:13:02FromDiscord<Dav1s> In reply to @Rika "its not an editor": facts, didn't look at it xd
03:20:36FromDiscord<Dav1s> why is the .exe file size smaller in nim?
03:20:48FromDiscord<Dav1s> (edit) ".exe" => "output"
03:20:58FromDiscord<Rika> compile options may be different
03:22:18FromDiscord<ElegantBeef> With just hello world it's 20ms faster danger vs. release
03:22:43FromDiscord<Rika> damn, thats some important 20ms hm
03:23:07FromDiscord<ElegantBeef> Well this isnt a large example 😄
03:24:39FromDiscord<ElegantBeef> For a more elaborate example it's .5s faster
03:26:32FromDiscord<ElegantBeef> So 10% faster roughly
03:30:38FromDiscord<Dav1s> any good nim addons for vscode
03:31:04FromDiscord<ElegantBeef> https://marketplace.visualstudio.com/items?itemName=nimsaem.nimvscode
03:35:49FromDiscord<cherry> is there no way to store object files from the compiler? I think I was using a lexer library the other day but I was completely persuaded from using it because the macros led to such a long compile time
03:38:15FromDiscord<ElegantBeef> That's what IC is for if i understand your issue 😄
03:38:52FromDiscord<ElegantBeef> But it's not out yet, so not at the moment
03:38:55FromDiscord<cherry> ah
03:39:13FromDiscord<cherry> that's unfortunate but thanks
03:39:38FromDiscord<cherry> is there a page with information about this? I can't seem to find it on an initial google search
03:39:47*spiderstew_ joined #nim
03:40:47FromDiscord<Dav1s> what is verbosity? https://media.discordapp.net/attachments/371759389889003532/826662278149177344/unknown.png
03:41:06*spiderstew quit (Ping timeout: 258 seconds)
03:41:35FromDiscord<ElegantBeef> https://github.com/nim-lang/RFCs/issues/46
03:41:41FromDiscord<ElegantBeef> Probably the best spot for all things IC
03:41:55FromDiscord<cherry> perfect!
03:54:01FromDiscord<ElegantBeef> https://nim-lang.org/docs/nimc.html if you didnt find it yet @Dav1s
04:12:25FromDiscord<fenrave> In reply to @Dav1s "what is verbosity?": Information thats printed out into the terminal, that setting determines how much information and the complexity of said information.
04:12:34FromDiscord<fenrave> Mostly for debugging or making sure something actually happened
04:23:25FromDiscord<Dav1s> done some test, overall im impressed with the speed
04:54:59FromDiscord<Dav1s> what is best for compilation target? C or c++?
04:55:54*narimiran joined #nim
04:56:54FromDiscord<ElegantBeef> C is typically used unless using C++ interop
04:58:09FromDiscord<Dav1s> I find this language extremely underrated
05:00:35FromDiscord<InventorMatt> i think we all do
05:07:54FromDiscord<ElegantBeef> Yep it's a two step club, use the language a bit then question why it's not more used and cry
05:10:44FromDiscord<cherry> when I first started using it, it reminded me of how someone would use DSLs in common lisp to do things and I think I really liked that a lot, especially with what I've tested of jester for example
05:11:13FromDiscord<cherry> er that may not be the right term but im more just thinking of the idea
05:11:35FromDiscord<ElegantBeef> DSLs? That's the right term
05:11:43FromDiscord<cherry> ah alright
05:18:59ForumUpdaterBotNew Nimble package! suru - A tqdm-style progress bar in Nim, see https://github.com/de-odex/suru
06:16:43FromDiscord<Dav1s> this language is sooooooo goood
06:25:29FromDiscord<ElegantBeef> Go spread the word, you'll either get shunned from other places or get more people interested 😄
06:32:09FromDiscord<mattrb> Can someone help me understand if its possible to use converters and generics, or if I'm using this wrong? I tried to minimize my example without generics and it seems to work. On the top half is the reduced version that works and on the bottom is what I would _like_ to work https://play.nim-lang.org/#ix=2UCp
06:32:56FromDiscord<Reading Bee movie script> In reply to @Dav1s "this language is sooooooo": rickroll avatar
06:33:12FromDiscord<ElegantBeef> Ok?
06:33:19FromDiscord<Reading Bee movie script> i got rickrolled
06:33:26FromDiscord<ElegantBeef> Ah
06:33:26FromDiscord<Reading Bee movie script> ._.
06:39:52FromDiscord<mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2UCu
06:40:13FromDiscord<ElegantBeef> I'm toying around currently, but you really need to drop the `regto` and `u16to` 😄
06:40:15FromDiscord<Dav1s> is there eny equivalent in nim of "pass"?
06:40:18FromDiscord<ElegantBeef> `discard`
06:40:19FromDiscord<Dav1s> pass, from python
06:40:22FromDiscord<Dav1s> k
06:40:26FromDiscord<ElegantBeef> or `continue`
06:40:36FromDiscord<ElegantBeef> Dont recall what pass does
06:40:39FromDiscord<Dav1s> In reply to @ElegantBeef "or `continue`": it's not the same thing
06:40:41FromDiscord<ElegantBeef> Never used python
06:40:53FromDiscord<Dav1s> In reply to @ElegantBeef "Dont recall what pass": pass basically does nothing
06:41:01FromDiscord<Dav1s> just to fill a line
06:41:03FromDiscord<ElegantBeef> Then yea discard will work
06:41:11FromDiscord<Dav1s> ok, sure
06:41:23FromDiscord<Dav1s> thx
06:42:15FromDiscord<mattrb> In reply to @ElegantBeef "I'm toying around currently,": Ah, I'll just update to `toU16` and `toReg16` to match the convention here https://nim-lang.org/docs/manual.html#converters 👍
06:42:29FromDiscord<ElegantBeef> Well it doesnt solve the problem just ugly to read/write 😛
06:42:46FromDiscord<mattrb> If it's implicit then I don't need to write it 🙂
06:42:49FromDiscord<ElegantBeef> Sure
06:42:56FromDiscord<ElegantBeef> But you do need to read it 😛
06:43:31FromDiscord<mattrb> Not if I tuck it into a util file that I don't look at 🙈
06:43:44FromDiscord<ElegantBeef> I dont know how generics play with converters but i reason it will not work the way you want
06:43:51FromDiscord<ElegantBeef> Since the left hand doesnt tell the right hand what to do
06:43:57FromDiscord<ElegantBeef> Atleast i dont think it does
06:44:20FromDiscord<ElegantBeef> This is a slightly cleaner version of what you had
06:44:22FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2UCw
06:44:27FromDiscord<ElegantBeef> But still explict call
06:46:15FromDiscord<mattrb> Ah, I didn't realize I could do `reg.type` so that I don't have to take a generic type to `write16`. I think this accomplishes what I'm hoping for even if the syntax isn't _quite_ what I wanted. Thanks!
06:47:13FromDiscord<ElegantBeef> Well you can also do something like this https://play.nim-lang.org/#ix=2UCx
06:47:30FromDiscord<ElegantBeef> Sadly we cannot override the `=` for uint16 and reg
06:48:11FromDiscord<mattrb> Ah that looks decent too, thanks for taking a look 🙂
06:48:21FromDiscord<mattrb> Related question: How does the nim compiler handle procs with union types? Does it split it into multiple procs I assume? I guess I could check this trivially :p
06:48:52FromDiscord<ElegantBeef> No clue about unions, i didnt realize it supported them until recently 😄
06:50:32FromDiscord<ElegantBeef> Also by the way consider using `set[T]` instead of cuints there 😄
06:50:46FromDiscord<ElegantBeef> `mode` for instance is better represented by a set of modes 😄
06:51:05FromDiscord<mattrb> Oh yeah I saw that in the docs and wanted to ask about that
06:51:37FromDiscord<mattrb> I need to access these values as uint16s frequently. When using `set[T]`, is it efficient to convert from/to `set[T]`?
06:51:58FromDiscord<ElegantBeef> A set is just a nice abstraction over a bitset so it should just be an integer underneath
06:52:56FromDiscord<ElegantBeef> So a simple `cast[byte](yourSet).uint16` would be fine
06:53:14FromDiscord<ElegantBeef> Though with your not byte aligned that might be wrong
06:53:44FromDiscord<mattrb> Oh wait actually sorry misinterpreted. Why `set[T]` rather than `cuint`? I don't follow
06:53:54FromDiscord<ElegantBeef> So maybe slightly worse than using a cuint, but more ergonomic since you can do `{modeA, modeB, modeC}` instead of `modeA or modeB or modeC`
06:54:10FromDiscord<mattrb> My brain jumped to the conclusion that you were suggesting this over bitfields https://nim-lang.org/docs/manual.html#set-type-bit-fields
06:54:46FromDiscord<ElegantBeef> and you can do `modeA in reg.mode` instead of `modeA and reg.mode == modeA`
06:55:08FromDiscord<mattrb> Oh in this case mode is just a num 0-7 so a set isn't really what I want I think?
06:55:09FromDiscord<ElegantBeef> But yea i was also thinking that a set made more sense than the bitsize, but uncertain what/how this data was used
06:55:51FromDiscord<mattrb> It's not a series of flags
06:57:03FromDiscord<ElegantBeef> Ah
07:07:21FromGitter<bung87> Can i cast a seq of array[3,byte] to seq of byte for free , the underly seq len need change but i dont know how
07:07:23FromDiscord<mattrb> Thanks again for the help 🙂
07:11:41FromDiscord<Dav1s> wtf https://media.discordapp.net/attachments/371759389889003532/826715358870241340/unknown.png
07:14:15FromDiscord<Dav1s> why does that happen?
07:17:11FromDiscord<ElegantBeef> Cause you're using `'` for strings
07:17:31FromDiscord<ElegantBeef> `"` is for strings `'` is for chars
07:19:23FromDiscord<Dav1s> is this a nim only thing?
07:20:28liblq-devno
07:20:30liblq-devC/C++ also do that
07:20:34liblq-devJava, C#
07:21:01FromDiscord<Dav1s> ok
07:21:03liblq-devreally most languages that allow `'a'` to be used for strings are the bad ones like javascript
07:21:18FromDiscord<Dav1s> im pretty new to coding xd
07:21:22ForumUpdaterBotNew thread by Nnahito: How can I use SendMessage?, see https://forum.nim-lang.org/t/7725
07:21:40liblq-dev@Dav1s that's fine, we're here to help
07:23:43FromDiscord<Dav1s> In reply to @liblq-dev "<@728697032390213653> that's fine, we're": ❤️
07:29:07*Zectbumo quit (Remote host closed the connection)
07:43:32FromDiscord<Dav1s> Any equivalent for this in nim? https://media.discordapp.net/attachments/371759389889003532/826723370719903774/unknown.png
07:43:58FromDiscord<Rika> Exactly as written but use echo?
07:44:16FromDiscord<Dav1s> I mean in
07:44:19FromDiscord<Dav1s> not print
07:44:21FromDiscord<Rika> Yes
07:44:24FromDiscord<Rika> That's what I mean
07:44:34FromDiscord<Dav1s> works exactly the same way?
07:44:47FromDiscord<Rika> !eval if 1 in [1,2,3]: echo "yes"
07:44:50NimBotyes
07:45:03FromDiscord<Rika> Warning about not in tough
07:45:05FromDiscord<Rika> Though
07:45:22FromDiscord<Rika> You have to use notin (see lack of space)
07:45:57FromDiscord<Dav1s> !eval if "asd" in "asdasddsdsdsds": echo "yes"
07:45:58FromDiscord<Rika> !eval if 1 notin [2,3]: echo "ok"
07:45:59NimBotCompile failed: /usercode/in.nim(1, 10) Error: type mismatch: got <string, string>
07:46:00NimBotok
07:46:14FromDiscord<Dav1s> In reply to @Dav1s "!eval if "asd" in": why?
07:46:27FromDiscord<Rika> !eval import strutils; if "asd" in "asdasddsdsdsds": echo "yes"
07:46:30NimBotyes
07:46:36FromDiscord<Rika> Strutils needed
07:47:28FromDiscord<Rika> If you want to search for these procs the name is “contains”
07:47:45FromDiscord<Rika> In is a template to convert a in b to b.contains a
07:48:14FromDiscord<Rika> @Dav1s
07:49:21FromDiscord<ElegantBeef> It's a nice feature to enable `a.contains(b)` or `b in a`
07:50:25FromDiscord<Dav1s> In reply to @Rika "Strutils needed": Do I need to install it?
07:50:29FromDiscord<Rika> No
07:50:31FromDiscord<ElegantBeef> no it's in the stdlib
07:50:34FromDiscord<ElegantBeef> `std/strutils`
07:50:38FromDiscord<Dav1s> Or already
07:50:43FromDiscord<Dav1s> Oh, thx
07:50:46FromDiscord<Rika> Damn you and your real keyboard beef
07:50:51FromDiscord<ElegantBeef> https://nim-lang.org/docs/theindex.html all the stdlib modules are listed here
07:50:55FromDiscord<Rika> My hands cannot type quickly on a mobile
07:51:33FromDiscord<ElegantBeef> When i try to type on mobile i just start weeping since i use my phone so little i cannot hit any key i want to
07:51:55FromDiscord<ElegantBeef> I suppose they're all(or atleast should all) be here as well https://nim-lang.org/docs/lib.html
07:52:50FromDiscord<Rika> Most not all
07:53:09FromDiscord<Dav1s> :SPclap:
07:53:12FromDiscord<Rika> Did you know there’s a saturated math module in the compiler?
07:53:34FromDiscord<Dav1s> In reply to @Rika "Did you know there’s": What do u mean?
07:54:01FromDiscord<Rika> There’s a module for saturated math in the compiler
07:54:05FromDiscord<Rika> What else could I mean
08:06:16*lritter joined #nim
08:07:14*Tlangir quit (Remote host closed the connection)
08:19:44FromDiscord<Goel> A uint8 means value from 0 to 255? It is possible to use its hexadecimal value instead? (0x00)
08:19:58FromDiscord<ElegantBeef> Yes
08:20:18FromDiscord<ElegantBeef> `0x00u8` if you want to be certain it's a byte
08:20:38FromDiscord<Goel> Ok thanks
08:26:32FromDiscord<Dav1s> !eval import strutils; if "10" in "477382747rjjrj4jfjfufjgbjfurjnrjeiuejfjwkkwjfjeifjjeuejoyeoeyr9e6e5e8teyfugjgkhojlyiryetw4q4wte5w5r75i58697070707gihkhlhlbi10": echo "yes"
08:26:36NimBotyes
08:29:18FromDiscord<Dav1s> I see
08:29:40FromDiscord<Dav1s> :peepoHappyLove:
08:30:44FromDiscord<ElegantBeef> `nimble install inim` `inim`
08:31:00FromDiscord<ElegantBeef> you wont regret it
08:36:10*sknebel_ is now known as sknebel
08:37:17Zoom[m]<FromDiscord "<Yardanico> well, what about wit"> arc: 7.1s, refc: 9.2s, markAndSweep: 10.7s, regions: 13.1s, boehm: 21.2. Go-lang: 5.8s
08:37:33Oddmongerbtw, is there an option for upgrading all packages with nimble ?
08:38:06Oddmongerthere are «refresh» and «update» which seem to do the same things, but no «upgrade»
08:38:20FromDiscord<ElegantBeef> Dont think so
08:38:46Oddmongerit's not so hard with a shell loop on the nimble directory, but i'm lazy
08:38:58FromDiscord<ElegantBeef> Well go make a PR 😛
08:39:05FromDiscord<ElegantBeef> Not that i see much merit
08:39:22FromDiscord<ElegantBeef> Since updating all packages willy nilly doesnt server much when nimble files exist
08:39:28FromDiscord<ElegantBeef> (edit) "server" => "serve"
08:39:39FromDiscord<ElegantBeef> Though i guess with binary only packages it does
08:40:00Oddmongerfor tools and libs
08:40:33Oddmongerand removing old versions too
08:40:53FromDiscord<ElegantBeef> Well removing old versions might be silly since you may have projects rely on them
08:40:54Oddmongerfor example, i have godot-0.7.28 and godot.0.8.1 installed
08:41:07Oddmongerah yes
08:41:24Oddmongerwhen you have several versions, is the most recent used by default ?
08:41:51FromDiscord<ElegantBeef> Depends on the nimble file, but i believe so
08:42:40FromDiscord<ElegantBeef> Guess you said "by default"
08:42:41Oddmongerso compiler find the two godot directories, and look «version» in «godot.nimble» for chosing ?
08:43:14FromDiscord<ElegantBeef> I think it chooses the most recent one, but i'm uncertain
09:04:55*Tanger joined #nim
09:35:51FromDiscord<Dav1s> In reply to @ElegantBeef "`nimble install inim` `inim`": What does it do?
09:49:45Oddmongerit's a nim REPL
10:02:43*tane joined #nim
10:25:52Zoom[m]Pushed my countwords version to GH: https://github.com/ZoomRmc/countwords_nim Anyone familiar with Go to profile and determine the source of the speed difference?
11:27:37*NimBot joined #nim
11:31:04*xet7 quit (Remote host closed the connection)
11:32:21FromGitter<wrq> https://play.nim-lang.org/#ix=2UDm ⏎ ⏎ can a var argument be given a default value? I've been fiddling with this for a minute
11:32:25*xet7 joined #nim
11:40:58*Vladar joined #nim
11:43:59FromDiscord<Yardanico> Just overload the proc?
11:50:21FromGitter<wrq> that works, I guess. thanks
11:50:45*vicfred quit (Quit: Leaving)
12:05:29*skelett1 quit (Quit: WeeChat 2.9)
12:06:53*skelett joined #nim
12:20:26*Rudde joined #nim
12:59:03*krux02 joined #nim
13:09:51*Vladar quit (Quit: Leaving)
13:11:58ForumUpdaterBotNew thread by Francisl: Why is there no compile error when accessing uninitialize variable, see https://forum.nim-lang.org/t/7727
13:15:06*narimiran quit (Ping timeout: 260 seconds)
13:17:29FromDiscord<Rika> dammit yardanico
14:18:04*Vladar joined #nim
15:10:06*lritter quit (Quit: Leaving)
15:12:56FromDiscord<ilkxy_y> how would i attempt an ssh login with nim? (assuming im on a linux distro)
15:22:12reversem3Just don't use inim emacs
15:22:17reversem3 * Just don't use inim in emacs
15:32:44*narimiran joined #nim
15:42:28*icebattle joined #nim
16:02:37Clonkk[m]Why does nimble try to install a package that I already ``nimble develop`` and then refuse to the develop one ?
16:04:22ForumUpdaterBotNew thread by HJarausch: Nim Devel cannot compile Weave any more, see https://forum.nim-lang.org/t/7728
16:05:58*xet7 quit (Remote host closed the connection)
16:06:55*xet7 joined #nim
16:16:11*Tlangir joined #nim
16:18:50*Tanger quit (Ping timeout: 268 seconds)
16:31:33FromDiscord<ilkxy_y> to insert a password when trying to log-in i have to place the password instead of "mkdir Test" ? https://media.discordapp.net/attachments/371759389889003532/826856252121940008/unknown.png
16:32:28*haxscramper joined #nim
16:32:53*haxscramper quit (Remote host closed the connection)
16:33:18*haxscramper joined #nim
16:42:16FromDiscord<Yardanico> why does ssh have astersisk?
16:42:31FromDiscord<Yardanico> and I doubt that this will work, you need to use something like sshpass
16:42:47FromDiscord<ilkxy_y> In reply to @Yardanico "and I doubt that": is there any example
16:42:54FromDiscord<Yardanico> ssh asks the password interactively, it's not a part of the argument list
16:43:31FromDiscord<Yardanico> @ilkxy_y you just call sshpass as a process, see e.g. https://www.redhat.com/sysadmin/ssh-automation-sshpass
16:44:09FromDiscord<Yardanico> but generally you'd want to use private keys for SSH instead of passwords since it'll be more secure and won't require you to use wrappers like sshpass
16:44:53FromDiscord<Yardanico> also, have you seen https://github.com/ba0f3/libssh2.nim ?
16:45:00FromDiscord<ilkxy_y> alright thank you
16:45:04FromDiscord<Yardanico> or https://github.com/treeform/asyncssh
16:45:07FromDiscord<ilkxy_y> In reply to @Yardanico "also, have you seen": nope ill take a look now
17:03:11*lritter joined #nim
17:33:55*letto quit (Quit: Konversation terminated!)
17:35:06*lritter quit (Ping timeout: 240 seconds)
17:36:03*letto joined #nim
17:54:12FromGitter<iffy> I have either a FileHandle or a Stream and I want to read up to N bytes from it. What proc do I use? If there's no data available, I'd like to read 0 bytes.
17:54:33FromGitter<iffy> I'd like for the read to return immediately
18:00:04FromDiscord<jtiai> Are there language parser libs for Nim? Like I could define grammar like in (E)BNF and let Nim to parse (and tokenize) it for me?
18:02:36FromGitter<iffy> jtiai: does one of these work for you? https://nim-lang.org/docs/lib.html#pure-libraries-parsers
18:03:31FromGitter<iffy> lexbase might be useful. There's also https://nim-lang.org/docs/pegs.html
18:03:52liblq-devhttps://github.com/zevv/npeg
18:04:06liblq-devstd/pegs is kinda iffy and this attempts to make it better
18:04:16liblq-devand, i can confirm, it is significantly better :)
18:05:05Zoom[m]For basics std/pegs work fine, though.
18:14:20FromDiscord<haxscramper> In reply to @jtiai "Are there language parser": https://gist.github.com/haxscramper/3562fa8fee4726d7a30a013a37977df6 https://github.com/loloicci/nimly
18:16:47FromDiscord<jtiai> npeg is promising, nimly is definitely something I was also looking for (want to implement my first computer BASIC interpreter someday...)
18:17:29FromDiscord<haxscramper> Although I would advise to just go with recursive descent + pratt parser
18:18:58FromDiscord<haxscramper> Because it is not that hard and it would take probably just as much time as learning how to use LALR parser, dealing with grammar conflicts and so on. And recursive-descent is more flexible + full control over how AST is generated
18:19:58FromDiscord<jtiai> Well now I need something relatively simple
18:19:58*vicfred joined #nim
18:31:44FromDiscord<jtiai> And os progressing - now I have basics of terminal done... 🙂
18:34:03FromDiscord<haxscramper> By the way, do you have it open-source or this is a closed project?
18:35:30FromDiscord<jtiai> Open. Haven't yet pushed to github but I will. Probably during eastern.
18:35:50FromDiscord<haxscramper> looking forward to this
18:36:27FromDiscord<haxscramper> I want to try writing my OS in nim too, at some point, though it is most likely will be a close clone of xv6
18:37:32FromDiscord<jtiai> I'm targetting more like cp/m or msdos level..
18:42:09*willyboar joined #nim
18:49:28FromDiscord<Mustache Man> What other languages pair well with Nim for web dev? Would you write a full-stack web app in Nim?
18:50:13FromDiscord<Mustache Man> (edit) "What other languages pair well with Nim for web dev? Would you write a full-stack web app in Nim? ... " added "If so, what is your approach to web dev in Nim and do you use a web framework?"
18:55:21*kaliy quit (Ping timeout: 260 seconds)
18:56:49FromDiscord<willyboar> In reply to @Mustache Man "What other languages pair": Interesting conversation. Better open it at #webdev channel.
18:57:21FromDiscord<Mustache Man> Oh good point 👍
19:01:01*vicfred quit (Quit: Leaving)
19:03:33*ozzz quit (Quit: Bye)
19:06:26*ozzz joined #nim
19:21:17*kenran joined #nim
19:37:59*haxscramper quit (Remote host closed the connection)
19:38:05FromDiscord<fwsgonzo> os there a way to forward-declare a function as being .exportc ?
19:38:12FromDiscord<fwsgonzo> (edit) ".exportc" => "exportc"
19:38:18FromDiscord<fwsgonzo> (edit) "os" => "is"
19:38:22*haxscramper joined #nim
19:38:24*haxscramper quit (Remote host closed the connection)
19:38:48FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=2UFf
19:40:15FromDiscord<fwsgonzo> (edit) "https://play.nim-lang.org/#ix=2UFf" => "https://play.nim-lang.org/#ix=2UFh"
19:51:04*kaliy joined #nim
19:57:08*narimiran quit (Ping timeout: 268 seconds)
20:06:14*willyboar quit (Remote host closed the connection)
20:06:28*willyboar joined #nim
20:13:38*kenran_ joined #nim
20:23:05ForumUpdaterBotNew thread by Japplegame: Weak symbols, see https://forum.nim-lang.org/t/7730
20:25:01*kenran quit (Quit: Lost terminal)
20:30:28FromDiscord<Zachary Carter> https://twitch.tv/hahahaitsfunny streaming Nim game dev
20:38:13*kenran_ quit (Quit: leaving)
20:53:55FromDiscord<Yardanico> @fwsgonzo just declare the pragmas in both forward definition and the implementation
21:11:27*willyboar quit (Remote host closed the connection)
21:12:03*willyboar joined #nim
21:14:59*willyboa_ joined #nim
21:15:53*tane quit (Quit: Leaving)
21:16:04*willyboa_ quit (Client Quit)
21:16:12*willyboar quit (Ping timeout: 246 seconds)
21:17:44FromDiscord<fwsgonzo> yes but im actually trying to simplify the implementation
21:18:01FromDiscord<fwsgonzo> so wondering if the definition could be complex and the implementation simplified so it looks better
21:35:16FromDiscord<sealmove> I have an `HttpClient` created with `newHttpClient`. How can I see what it sent by a proc, for example `getContent`? Is there a way to see the raw string that is sent?
21:40:15FromDiscord<Yardanico> not without modifying the module
21:41:13ForumUpdaterBotNew thread by Elcritch: More Nim on more Microcontrollers!? (Arm CMSIS / Zephyr RTOS), see https://forum.nim-lang.org/t/7731
21:42:15FromDiscord<sealmove> In reply to @Yardanico "not without modifying the": that's sad
21:49:03*Vladar quit (Quit: Leaving)
22:07:53FromDiscord<ElegantBeef> last call for TMWN 😛
22:12:11FromDiscord<Yardanico> ah right
22:12:13FromDiscord<Yardanico> I can post https://github.com/Yardanico/cosmonim
22:13:11saemcosnimpolitan :D
22:14:56FromDiscord<dom96> So I uploaded our first Nim online meetup: https://youtu.be/xZQ-Z98q5r4
22:21:21saemLook ma' I'm on (internet) TV.
22:21:37FromDiscord<ElegantBeef> Lol
22:25:00FromDiscord<Yardanico> @ElegantBeef does tmwn allow for blog posts? :P
22:25:02*oprypin quit (Quit: Bye)
22:25:07FromDiscord<ElegantBeef> I mean i think so
22:25:10*oprypin joined #nim
22:25:30FromDiscord<ElegantBeef> I dont have very solid rules since no one told me anything i should restrict 😄
22:36:23FromDiscord<ElegantBeef> Yardanico you made my life more difficult with the `highlight with link` 😄
22:36:29FromDiscord<Yardanico> why? :D
22:36:34FromDiscord<Yardanico> oh, you can just copy markdown, right
22:36:37FromDiscord<ElegantBeef> Yep
22:36:38FromDiscord<Yardanico> forgot about that
22:36:50FromDiscord<ElegantBeef> Not a big deal but yea
22:37:22FromDiscord<will> im trying to access a string index and im getting an error about evaluating at compile time, is there any way around this?
22:37:31FromDiscord<Yardanico> can you share more context?
22:37:35FromDiscord<ElegantBeef> examples guide the way
22:38:14FromDiscord<will> I have a function that takes in a string and it has a index in a while loop from 0 to the length of the string
22:38:21FromDiscord<will> im trying to use i to index into the string
22:38:36FromDiscord<Yardanico> can you show the full compiler error?>
22:38:38FromDiscord<Yardanico> (edit) "error?>" => "error?"
22:38:47FromDiscord<ElegantBeef> Code would also be useful
22:38:50FromDiscord<will> https://media.discordapp.net/attachments/371759389889003532/826948674587852900/Screen_Shot_2021-04-01_at_00.38.45.png
22:39:04FromDiscord<Yardanico> and what does that line have?
22:39:10FromDiscord<Yardanico> and are you trying to run that code at compile-time ?
22:39:22FromDiscord<will> oh you know what I was using const instead of let
22:39:32FromDiscord<will> that would be my issue
22:39:59FromDiscord<Yardanico> @ElegantBeef i guess its best to put the blog post link to the header? although some people might miss it, so idk 🤔
22:40:07FromDiscord<Yardanico> maybe just add "Link: link"
22:40:14FromDiscord<ElegantBeef> eh https://media.discordapp.net/attachments/371759389889003532/826949030688456704/unknown.png
22:40:27FromDiscord<Yardanico> so the latter?
22:41:36FromDiscord<ElegantBeef> Yea the title is the link
22:41:55FromDiscord<Yardanico> well i mean if it doesn't look that good we can just add "Link: the link"
22:42:04FromDiscord<ElegantBeef> I think it looks fine
22:42:25FromDiscord<Yardanico> ok, thanks :)
22:42:33FromDiscord<Yardanico> as usual, submissions in the last day XD
22:42:41FromDiscord<ElegantBeef> Eh i dont mind
22:42:45FromDiscord<ElegantBeef> Only takes a few minutes to do
22:42:56FromDiscord<ElegantBeef> Just wish more people submiitted 😛
22:43:12FromDiscord<Yardanico> bump the forum post from time to time :P
22:43:41FromDiscord<ElegantBeef> I dont bug people
22:44:31FromDiscord<ElegantBeef> I might be annoying but that's unrelated
23:09:53FromDiscord<Zachary Carter> https://twitch.tv/hahahaitsfunny second round