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