<< 20-08-2021 >>

00:03:33madpropshttps://madprops.github.io/numberstring/
00:05:48FromDiscord<Elegantbeef> Want a code review?
00:06:52madpropsif you want to do that, sure
00:08:45madpropsjust so you know there are some bash scripts to run and test
00:08:55FromDiscord<Elegantbeef> Yea i seen the useless scripts
00:09:13madpropshow are they useless?
00:09:17FromDiscord<Elegantbeef> nimble has a built in `nimble test` which will run all files with `t.nim`
00:09:50FromDiscord<Elegantbeef> so if you just named `intergration` `tintergration` you'd have it apart of the test suite
00:10:09madpropsah
00:10:13madpropsgood to know
00:10:26madpropst_integration
00:10:31FromDiscord<Elegantbeef> the run is pointless since there is no code ran in the main file
00:10:54madpropsi think it's mostly so the binary gets placed in /bin
00:11:26FromDiscord<Elegantbeef> So then make a `config.nims` dont use bash πŸ˜€
00:21:57madpropsgot an example of a config.nims ?
00:23:09madpropsok think i found an example
00:25:18madpropsswitch("out", "bin/debug") won't cut it
00:25:26madpropsError: command expects a filename
00:25:51madpropsoh nvm
00:27:39madpropsi guess there's no way in avoiding adding: src/numberstring.nim as an argument to the command
00:30:12madpropsalso wondering if the config in config.nims affects both debug and release binaries
00:31:32FromDiscord<Elegantbeef> Well here is my quick review https://github.com/beef331/numberstring/commit/db60d293436fccb46dfb56d3a1c6bdcd7310bb7e#diff-a607b90233afd98462387f44deda392986bec82aab75db20ce1b161e904d0a65 removed stuff that isnt overly sensible and comment for stuff that felt needed an explanation
00:33:07madpropsthe constants file wasn't supposed to be there
00:33:10madpropsforgot to delete it
00:33:31madpropslets see
00:34:20FromDiscord<Elegantbeef> config.nims is passed to the compiler as a config file so yes
00:36:21FromDiscord<Elegantbeef> Feel free to ask any questions of course
00:37:14madpropsthe idea of the ns_x vars was because they were going to be exported
00:37:17madpropsand didn't want to pollute ns
00:37:20madpropsnamespace
00:37:27FromDiscord<Elegantbeef> Well that's silly
00:37:35FromDiscord<Elegantbeef> yes i have abrasive views
00:39:01madpropswhy though
00:39:11madpropsnames like "vowels" could cause problems
00:39:13FromDiscord<Elegantbeef> It's not an issue at least in my view, cause there are vehicles to get around it
00:39:27FromDiscord<Elegantbeef> It could cause problems and the compiler will tell you when it does
00:41:40madprops"No reason to parse int here, there are cheaper methods of getting leading digit"
00:41:48FromDiscord<Elegantbeef> let's look at the difference between your version and and mine when if there is ambiguity `ns_vowels` vs. `numberstring.Vowels` we did the exact same thing but my way is optional
00:42:08FromDiscord<Elegantbeef> This isnt C so i dont get the C style approach, but YMMV
00:42:29FromDiscord<Elegantbeef> Nothing states you have to accept my view, so live life the way you want to
00:42:46madpropsthe randomize thing was interesting
00:42:56madpropsdidn't realize it could change the program itself
00:42:59madpropswhich can cause problems
00:45:13madpropsoh you changed the timeago output lol
00:45:42madpropsit was meant to be used like on internet posts "posted 1 hour ago"
00:45:48madpropsso it carried less information
00:48:06FromDiscord<Elegantbeef> Ah was unclear by the name and description
00:48:22madpropsyeah i should have described it better
00:48:53FromDiscord<Elegantbeef> Well calling randomize inside the main body is certain to cause issues if anyone has a randomized state, when dealing with random you should have a lazy one that uses global state and a non lazy one which takes a `Rand`
00:49:03FromDiscord<Elegantbeef> This way you dont change the seed unless the programmer doesnt care
00:54:49madpropsso I should be adding runnableExamples to each proc
00:55:02madpropshow is it actually runnable?
00:55:07FromDiscord<Elegantbeef> It's a second layer of testing and gives a code example
00:55:12FromDiscord<Elegantbeef> It runs on doc gen
00:57:48madpropsok so Digits and digits is not the same var, I thought it would, so the namespacing makes less sense now
00:58:30madpropssince this_cat == thisCat i wasn't sure
00:58:50FromDiscord<Elegantbeef> Ah first character is case sensitive
01:21:44madpropshow can I pass arguments to nimble test?
01:21:51madpropsi mean arguments for the test itself
01:21:53madpropsnot to nimble
01:23:18FromDiscord<Elegantbeef> Dont know if you can
01:24:17madpropsyeah probably doesn't make sense
01:24:28FromDiscord<impbox [ftsf]> they should be self-contained ideally
01:24:47FromDiscord<impbox [ftsf]> if you need to test multiple arguments, just make more checks
01:24:56FromDiscord<impbox [ftsf]> and test them all
01:26:44*tiorock joined #nim
01:26:44*tiorock quit (Changing host)
01:26:44*tiorock joined #nim
01:26:44*rockcavera is now known as Guest1210
01:26:44*tiorock is now known as rockcavera
01:29:40*Guest1210 quit (Ping timeout: 240 seconds)
01:33:04FromDiscord<NumLock> hello
01:33:20FromDiscord<Elegantbeef> Hello
01:33:43FromDiscord<NumLock> Why is the main conversation in this server taken up by bots
01:35:00FromDiscord<JSONBash> Not actual bots
01:35:16FromDiscord<JSONBash> It’s a way to distinguish people who are bridged over from other platform
01:35:23FromDiscord<JSONBash> ElegentBeef is on matrix
01:35:29FromDiscord<NumLock> Ok
01:35:32FromDiscord<JSONBash> Other are on IRC
01:35:38FromDiscord<JSONBash> But I am on discord
01:35:57FromDiscord<JSONBash> Hello btw! πŸ‘‹
01:36:04FromDiscord<NumLock> Hello\
01:36:05FromDiscord<NumLock> hru
01:37:17madpropsbeep boop
01:37:42FromDiscord<βƒŸβƒŸ> design discussion:
01:37:52FromDiscord<βƒŸβƒŸ> file path joining with the `/` operator should be removed
01:38:08FromDiscord<βƒŸβƒŸ> or atleast written that its not reccomended
01:38:14FromDiscord<Elegantbeef> Why?
01:38:31FromDiscord<βƒŸβƒŸ> because i find i extremely confusing
01:38:39FromDiscord<βƒŸβƒŸ> its dividing a path
01:38:47FromDiscord<Elegantbeef> It's an operator
01:38:55FromDiscord<βƒŸβƒŸ> really they use `/` cause theyre used to filesystem that uses `/` to seperate paths
01:39:20FromDiscord<Elegantbeef> Yes, so what's the issue
01:39:28FromDiscord<βƒŸβƒŸ> its confusing
01:39:33FromDiscord<βƒŸβƒŸ> compared to a function call which is not
01:39:41FromDiscord<Elegantbeef> So then use the function
01:39:51FromDiscord<βƒŸβƒŸ> i would
01:40:02FromDiscord<Elegantbeef> So then what's the issue
01:40:03FromDiscord<βƒŸβƒŸ> but i want to discourage the use of `/` or remove it all together
01:40:06FromDiscord<βƒŸβƒŸ> like i said
01:40:14FromDiscord<Elegantbeef> Not going to happen it's fantastic
01:40:32FromDiscord<βƒŸβƒŸ> why ?
01:40:52FromDiscord<βƒŸβƒŸ> i do not like using operators in ways like this
01:41:09FromDiscord<βƒŸβƒŸ> i expect `/` to divide something
01:41:18FromDiscord<Elegantbeef> Cause it's more ergonomic than `"dir".joinPath("subDir").joinPath("subSubDir")` `"dir" / "subDir" / "subSubDir"`
01:41:29FromDiscord<Elegantbeef> Well i like operators to do operations, so it's fine
01:41:56FromDiscord<βƒŸβƒŸ> `joinPath("a", "b", "c")`
01:42:14FromDiscord<βƒŸβƒŸ> also
01:42:21FromDiscord<Elegantbeef> Ah didnt realize there was a vararg version
01:42:25FromDiscord<βƒŸβƒŸ> thats already so confusing
01:42:33FromDiscord<βƒŸβƒŸ> it looks like youre dividing a string
01:42:51FromDiscord<βƒŸβƒŸ> c++ uses `/` too but atleast there it has to clearly be with a file path object
01:42:54FromDiscord<Elegantbeef> No it looks like i'm calling `/("dir", "subDir")`
01:43:19madpropssince you can't divide strings, it makes sense to me. Also python does the same thing with Path
01:43:21FromDiscord<Elegantbeef> So then what should `{10u8} {20u8}` do?
01:43:46FromDiscord<Elegantbeef> or `"hello $#" % 100`
01:45:04FromDiscord<βƒŸβƒŸ> if you wrote `divide("a", "b", "c")` it would be confusing, so using `/` is also confusing because you expect this to be for division, so now the programmer is expected to put it in his mind that `/` can also mean file path seperator (his operating system might not even use `/` for it too)
01:45:41FromDiscord<Elegantbeef> but that isnt `divide` that is the `/` operator
01:46:17FromDiscord<βƒŸβƒŸ> if you want to start using operators arbitrarily instead of functions thats gonna be very confusing in my opinion
01:46:29FromDiscord<βƒŸβƒŸ> now `+` or `/` no longer mean roughly the same thing
01:46:35FromDiscord<Elegantbeef> And nim encourages ergonomics by enabling the above
01:46:42FromDiscord<Elegantbeef> So i dont see the issue
01:46:56FromDiscord<Elegantbeef> It's more ergonomic/readable, if you dont like it dont use it
01:47:09madpropsergonomics ... if that was so strings would be concatenated with + instead of &
01:47:21madpropsbut i got used to it eventually
01:47:34FromDiscord<Elegantbeef> If you dont know what the operator is doing you can always goto definition
01:47:43FromDiscord<βƒŸβƒŸ> i dont think thats a valid response to this problem, its in the standard library, people are going to use `/`, i might be reading the code of people who use it
01:48:05FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/878092994073489438/image.png
01:48:06FromDiscord<Elegantbeef> Or even just hover it
01:48:28FromDiscord<Elegantbeef> yes i realize my code here is dumb, dont question it
01:48:51FromDiscord<βƒŸβƒŸ> reducing operators to just arbitrary symbols is not something i would do
01:48:55FromDiscord<βƒŸβƒŸ> i want `+` to add
01:48:58FromDiscord<βƒŸβƒŸ> `-` to substract
01:48:59FromDiscord<βƒŸβƒŸ> etc
01:51:18madpropsI think it's easy to get the concepts after some thought though
01:51:27madpropscontext based operators
01:51:38madpropsbut i do get what you're saying
01:53:04madpropsmost languages at least use + for addition and string concat
01:53:43madpropswell at least some do
01:55:25FromDiscord<Elegantbeef> i dont buy the "i dont like it so it must be removed" make an RFC so people can either agree or disagree, instead of complaining here
01:59:26FromDiscord<exelotl> I like `/` for paths, its readable and unambiguous in all the situations I've ever seen it
02:01:38FromDiscord<exelotl> I think we have our share of questionable operators (why is there a json operator lol) but / isn't one of them
02:03:50FromDiscord<impbox [ftsf]> I also like `/` for path joining
02:04:04FromDiscord<impbox [ftsf]> but what about `\\` ? ;)
02:04:20FromDiscord<Elegantbeef> Lol impbox
02:04:50FromDiscord<βƒŸβƒŸ> since paths seem to just be strings i think that makes `/` even worse than it normally would be
02:05:08FromDiscord<βƒŸβƒŸ> string now have an operator specifically for using the paths api
02:05:18FromDiscord<impbox [ftsf]> have you encountered a place where it's problematic and confusing?
02:05:26FromDiscord<βƒŸβƒŸ> yes
02:05:31FromDiscord<Elegantbeef> Oh noes, when you `import std/os` you get code that it exports!
02:05:47FromDiscord<impbox [ftsf]> you don't get std divided by os?
02:05:50FromDiscord<Elegantbeef> Wait until you learn about distinct types
02:06:17FromDiscord<Elegantbeef> Impbox that is the most evil question i've seen today
02:06:17FromDiscord<βƒŸβƒŸ> those are nice
02:06:36FromDiscord<βƒŸβƒŸ> why arent paths a distinct type
02:07:29FromDiscord<Elegantbeef> There are probably answers to that question on github, the forums or irclogs
02:08:02FromDiscord<impbox [ftsf]> https://nim-lang.org/docs/compiler/pathutils.html
02:08:18FromDiscord<impbox [ftsf]> they are
02:08:32FromDiscord<βƒŸβƒŸ> well the joinPath function dosent seem to use those
02:09:26FromDiscord<βƒŸβƒŸ> this makes me even more confused
02:09:34FromDiscord<βƒŸβƒŸ> do i use this or the other library?
02:10:46FromDiscord<impbox [ftsf]> what are you trying to do?
02:11:20FromDiscord<βƒŸβƒŸ> work with file paths
02:11:42FromDiscord<impbox [ftsf]> i'd just use strings and `/`
02:12:15FromDiscord<impbox [ftsf]> but if you want to add extra security you could add your own version that only takes a distinct type
02:12:46FromDiscord<impbox [ftsf]> what kind of work are you doing with file paths?
02:13:11FromDiscord<βƒŸβƒŸ> what pathJoin or `/` do
02:13:30FromDiscord<βƒŸβƒŸ> well even if i use this distinct library
02:13:38FromDiscord<βƒŸβƒŸ> my strings will still have `/` if i import os
02:13:39FromDiscord<impbox [ftsf]> if your application is just joining paths, sounds like you should use `/` since it works
02:14:07FromDiscord<Elegantbeef> so then do \`\`\`import std/os except \`/\`\`\`\`
02:14:15FromDiscord<impbox [ftsf]> yep
02:14:37FromDiscord<Elegantbeef> I fucked that formatting up but anywho
02:14:59FromDiscord<impbox [ftsf]> sent a code paste, see https://paste.rs/y7W
02:20:21FromDiscord<Elegantbeef> and mad seems `&` was copied from ada, if interested why it's not `+`
02:20:30madpropsah
02:21:21madpropsi would prefer + but whatevs
02:21:35FromDiscord<Elegantbeef> well you can alias it, so you can have what you want
02:21:39FromDiscord<impbox [ftsf]> yeah, i wouldn't mind it being +, you can always add it i guess
02:21:47FromDiscord<impbox [ftsf]> is aliasing a thing now?
02:22:07FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3wvh
02:22:10FromDiscord<Elegantbeef> I consider that aliasing
02:23:24madprops& has the advantage that you know for sure that your'e dealing with strings
02:24:18madpropswhich can be their own realm
02:27:04FromDiscord<JohnAD (John Dupuy)> The mathemetician in me dislikes using `+` for strings since ("a" + "b") != ("b" + "a"). That is, you cannot really add strings since they do not follow the communitive property.
02:28:31FromDiscord<JohnAD (John Dupuy)> Unless, of course, the plus sign represents some kind of rolling cipher operation. "abc" + "foo" == "foo" + "abc" == "e8\\"
02:29:44FromDiscord<JohnAD (John Dupuy)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/878102810963632158): The mathemetician in me dislikes using `+` for strings since ("a" + "b") != ("b" + "a"). That is, you cannot really add strings since they do not follow the communative property.
02:30:02FromDiscord<Elegantbeef> Quick someone get the nerd beating stick πŸ˜›
02:30:45FromDiscord<Elegantbeef> I'm pretty in different about `+` vs. `&` since it's just an operator and not overly messy either way
02:31:17FromDiscord<Elegantbeef> It's not like we're doing `a +&%#@ b` πŸ˜€
02:31:25madprops+ is faster to type with my hands though
02:31:42madpropsmuscle memory etc
02:32:27madpropsbut it's almost the same
02:33:37FromDiscord<Elegantbeef> Dont make me suggest we should only use `a` for everything to make it so we have the easiest language to type
02:34:51FromDiscord<Elegantbeef> Yes i have no control over my hyperbolic comments they just appear after i think them, quite odd
02:35:20madpropseven brainfuck uses +
02:35:45madprops++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.
02:35:45madprops<<+++++++++++++++.>.+++.β€”β€”.——–.>+.>.
02:35:51madpropshaha
02:52:57madpropsi decided to not put runnableExamples
02:53:05madpropstheres' already an integration test
02:53:09madpropsand the comments get too bloated
02:53:23FromDiscord<Elegantbeef> The examples are for showing examples
02:53:30FromDiscord<Elegantbeef> So what your comments already do
02:54:42madpropsexcept comments don'pt need to be compilable
02:54:57madpropsso i can freely explain with some sentences
02:55:10madpropsi do like showing examples but it feels bloated
02:55:12FromDiscord<Elegantbeef> Which is a problem imo
02:55:12FromDiscord<Elegantbeef> Sure but do a doc comment then throw the example in
02:56:05FromDiscord<Elegantbeef> Yea idk it's not that bloated https://nim-lang.org/docs/strutils.html#allCharsInSet%2Cstring%2Cset%5Bchar%5D
02:56:39madpropsit looks great on the doc
02:56:42madpropsbut i mean in the src itself
02:57:38madpropsbut yeah probably worth it
02:58:28FromDiscord<impbox [ftsf]> the doAssert in the docs looks odd
02:58:40FromDiscord<impbox [ftsf]> since that's now how you'd use it in practice
02:58:44FromDiscord<Elegantbeef> old docs should be `assert`
02:58:48FromDiscord<impbox [ftsf]> which is what an example should be
02:59:04FromDiscord<Elegantbeef> Oh that's what you mean \:D
02:59:44FromDiscord<impbox [ftsf]> yep
03:00:07FromDiscord<Elegantbeef> Idk for documenting procedures it seems fine to me, for explaining things more advanced you can always write more elaborate RST
03:05:54FromDiscord<gogolxdong (liuxiaodong)> Is there any yaml library is Nim?
03:08:18nrds<Prestige99> I see https://nimble.directory/pkg/yaml
03:08:44nrds<Prestige99> oh a whole site - https://nimyaml.org/
03:11:24*rockcavera quit (Remote host closed the connection)
03:14:14*arkurious quit (Quit: Leaving)
03:19:51madpropsdecided to add the runnableExamples
03:35:05FromDiscord<creonico> Is it possible to view the compiled c version of my nim code?
03:35:14FromDiscord<creonico> and if so, how?
03:37:25*vicfred joined #nim
03:37:52nrds<Prestige99> I believe there's a cache somewhere, but I don't recall where
03:38:11FromDiscord<Elegantbeef> the output C is thrown in a temp folder, you can tell it to output it somewhere else with `--nimCache:somePath`
03:38:22FromDiscord<impbox [ftsf]> @creonico yep, it's stored in "nimcache", but you can specify with --nimCache:dirname
03:38:24FromDiscord<Elegantbeef> It's in `.cache/nim/projectname` on linux
03:38:25FromDiscord<impbox [ftsf]> damn beef
03:38:40FromDiscord<Elegantbeef> It's ok imp you'll be faster next time
03:38:56FromDiscord<impbox [ftsf]> nah, my RSI means i'll never be able to compete
03:39:15FromDiscord<impbox [ftsf]> https://nim-lang.org/docs/nimc.html#compiler-usage-generated-c-code-directory
03:49:08madpropsdoc generation always trigger a git diff becuse it uses a timestamp
03:49:26madpropsis there a way to just check the doc runnableExamples without generating ?
04:06:01*supakeen quit (Quit: WeeChat 3.2)
04:06:30*supakeen joined #nim
04:16:35madpropswhat's the equivalent of: import std/[os, parseopt, strformat, strutils]
04:16:38madpropsfor local modules?
04:16:49madpropsshould I use pkg?
04:18:28madpropsok nvm I just comma separate it
04:20:22madpropsweird thing is, if I import the modules like: import types, utils, types
04:20:29madpropsthen I get an error about something being undefined
04:20:46madpropswait why is types twice there..
04:20:59madpropsoh that was an export
04:21:08madpropsnvm
04:43:28*flynn quit (Read error: Connection reset by peer)
04:44:35*flynn joined #nim
05:03:21*nrds quit (Remote host closed the connection)
05:26:57*kayabaNerve quit (Remote host closed the connection)
05:27:16*kayabaNerve joined #nim
06:51:06*PMunch joined #nim
06:55:01*Vladar joined #nim
06:59:15FromDiscord<j-james> What is the C type `dev_t`'s equivalent in Nim?
06:59:23FromDiscord<j-james> I've found things saying both `int32` and `culong`, depending on where I look
07:01:11FromDiscord<Rika> https://nim-lang.org/docs/posix.html#Dev
07:01:27*jjido joined #nim
07:07:37FromDiscord<j-james> Fantastic, thank you
07:20:02FromDiscord<j-james> Do you know what `ssize_t` is?
07:22:28*jjido quit (Ping timeout: 250 seconds)
07:23:38FromDiscord<Rika> https://jameshfisher.com/2017/02/22/ssize_t/
07:34:08*max22- joined #nim
07:43:08*max22- quit (Quit: Leaving)
07:49:35*jjido joined #nim
08:08:37*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:38:42*vicfred quit (Quit: Leaving)
08:39:13*xxov joined #nim
08:51:55FromDiscord<moein> what array of object in js would be in a nim app? objects have fixed keys and value types
08:54:17FromDiscord<moein> sent a long message, see http://ix.io/3ww8
08:54:27FromDiscord<moein> what i wrote so far but it has some issues.
08:55:06FromDiscord<moein> how can i specify return proc is array of CaloriesMap? am i adding object to calories array in right way?
08:59:56*jjido joined #nim
09:02:46FromDiscord<Elegantbeef> seems fine, though wouldnt call it a map
09:02:47FromDiscord<Elegantbeef> remove square braces
09:02:52FromDiscord<Elegantbeef> just `: CaloriesMap`
09:06:42FromDiscord<Rika> I think he wants an array and not a single value
09:06:44FromDiscord<moein> yeah table is right name i guess. shouldn't it be array[1,CaloriesMap]? since i'm want to return array of CaloriesMap
09:06:57FromDiscord<moein> (edit) "i'm" => "i"
09:07:12FromDiscord<Elegantbeef> `seq[CaloriesMap]` possibly since you're adding
09:07:21FromDiscord<Elegantbeef> Arrays are fixed size in Nim they have to be known at compile time
09:11:44FromDiscord<moein> so I can initiate empty sequence like var calories = @[] ?
09:11:55FromDiscord<moein> and how to add to it?
09:13:26FromDiscord<moein> what i tried
09:13:29FromDiscord<moein> var calories = seq[CaloriesMap]↡ calories.add(CaloriesMap(calorie:1000,difficulty:"hard",suitable:false))
09:14:00FromDiscord<Elegantbeef> you need to do `var calories: seq[CalorieMap]` then just `calories.add`
09:15:25FromDiscord<moein> thank you
09:16:43*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
09:24:20NimEventerNew post on r/nim by tobiasbarco666: How to get files from a directory?, see https://reddit.com/r/nim/comments/p81nza/how_to_get_files_from_a_directory/
09:35:23FromDiscord<moein> do people use nim to create rest apis?
09:36:42FromDiscord<moein> right now i'm learning new languages simply to increase my knowledge about more languages and their differences
09:37:08FromDiscord<moein> for what purposes nim is a good choice?
09:37:49FromDiscord<enthus1ast> sure↡(@moein)
09:40:07FromDiscord<haxscramper> CLI tooling, compiler development, working with C libraries from a saner language↡(@moein)
09:44:53FromDiscord<enthus1ast> @moein\: i honestly think you can use nim for mostly everything (and i do)
09:45:18*max22- joined #nim
09:45:36FromDiscord<xflywind> > Good for everything, from shell scripting to web front and backend, to machine learning, high-performance computing (HPC), and embedded.
09:46:51FromDiscord<enthus1ast> you will of course find rough edges here and there, but if more people start using it, finding bugs, and contributing it gets better and better (and it got a LOT better since i used nim)
09:47:21FromDiscord<moein> is it right to say writing rest apis in let's say something like nodejs is easier in terms of libraries and development speed comparing to nim?
09:48:26NimEventerNew post on r/nim by hotmilki: Is nim good for my use case?, see https://reddit.com/r/nim/comments/p82026/is_nim_good_for_my_use_case/
09:48:29FromDiscord<haxscramper> Js has more libraries, but development speed depends on what you used to
09:49:39FromDiscord<haxscramper> It is possible hack together semi-working js code pretty quickly, from what I can tell, nim requires a little more forethought, being statically typed language and all
09:49:54FromDiscord<moein> In reply to @moein "is it right to": but in other hand nim offers better type checking and performance (I guess)
09:49:57FromDiscord<haxscramper> And it has more built-in features that you would need to learn
09:50:26FromDiscord<haxscramper> Like macros
10:09:14*max22- quit (Remote host closed the connection)
10:13:06*jjido joined #nim
10:50:21*PMunch quit (Read error: Connection reset by peer)
10:51:14*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
10:51:56*PMunch joined #nim
10:54:54*max22- joined #nim
10:58:35PMunch@moein, I've used Nim to set up REST APIs before, and I've never been able to do it more easily than with Nim. Performance will be good, but since performance of web stuff is mostly down to handling HW interactions and async behaviour you won't see as great a boost with Nim as you do in more computationally heavy areas when compared to e.g. Node.
11:17:36*PMunch quit (Quit: Leaving)
11:19:23*PMunch joined #nim
11:27:21FromDiscord<moein> In reply to @PMunch "<@368734642679054338>, I've used Nim": do you recommend any tutorial or library to write rest api?
11:29:28FromDiscord<moein> jester looks a decent tool
11:29:34FromDiscord<moein> (edit) "jester looks ... a" added "like"
11:29:40PMunchYeah I was using Jester
11:30:17PMunchDidn't really use any tutorials for it though, it's pretty straight forward to use
11:36:58*pro joined #nim
11:48:24NimEventerNew thread by Chat_noir: [termux pkg] nim:SSL routines:tls_process_server_certificate:certificate verify failed [SslError], see https://forum.nim-lang.org/t/8345
11:51:43FromDiscord<moein> how can i convert array of sequence to json?
11:51:57FromDiscord<moein> routes:↡ get "/":↡ resp result
11:52:18FromDiscord<moein> result variable is an array of sequence
11:52:18FromDiscord<enthus1ast> does `% ` work?
11:52:41FromDiscord<enthus1ast> resp %\ result
11:53:44FromDiscord<moein> no compiler says Error: undeclared identifier: '%'
11:53:51FromDiscord<enthus1ast> import json
11:54:49FromDiscord<moein> i did that before, didn't find anything in docs
11:55:30FromDiscord<enthus1ast> https://nim-lang.org/docs/json.html#%25%2A.m%2Cuntyped
11:56:01FromDiscord<moein> In reply to @moein "var calories = seq[CaloriesMap]": it's related to this. the calories is what i want to convert to json
11:56:26PMunchWhat is a CaloriesMap?
11:56:45FromDiscord<moein> it's an object
11:56:53FromDiscord<moein> sent a long message, see http://ix.io/3wwX
11:58:17PMunchSeems to work fine: https://play.nim-lang.org/#ix=3wwZ
11:59:39*pro quit (Quit: WeeChat 3.2)
12:00:43*xxov quit (Ping timeout: 246 seconds)
12:01:39FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3wx3
12:03:01FromDiscord<enthus1ast> https://play.nim-lang.org/#ix=3wx4
12:03:33*xxov joined #nim
12:04:08FromDiscord<moein> sent a code paste, see https://play.nim-lang.org/#ix=3wx5
12:04:11FromDiscord<moein> sent a long message, see https://paste.rs/iKx
12:04:24FromDiscord<enthus1ast> you can only return string
12:04:34*max22- quit (Ping timeout: 250 seconds)
12:04:34FromDiscord<enthus1ast> so `$ % ` should be it
12:04:59FromDiscord<enthus1ast> %\ transforms your input to JsonNode
12:05:25FromDiscord<enthus1ast> but jester wants strings \:)
12:05:55PMunchSo you need to use $ to turn the JSON into a string :)
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:24PMunchLike so: https://play.nim-lang.org/#ix=3wx7
12:06:30*supakeen joined #nim
12:08:21FromDiscord<moein> oddly neither of those works
12:08:31*Vladar quit (Quit: Leaving)
12:10:06PMunchCould you share your full snippet? Or a minimal version?
12:10:18PMunchMuch easier to test when you actually have the code
12:11:55FromDiscord<moein> sent a code paste, see https://paste.rs/y81
12:12:19FromDiscord<moein> it's just a simple exercise for me to get familiar with nim
12:12:45FromDiscord<enthus1ast> result
12:12:49FromDiscord<enthus1ast> ist the issue
12:12:54FromDiscord<enthus1ast> call it something else
12:12:59FromDiscord<enthus1ast> seems like a bug
12:13:14FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3wxa
12:13:40FromDiscord<enthus1ast> maybe worth an issue at jesters repo
12:14:19PMunchBy the way, you don't need float64, float is by default 64 bits
12:14:40FromDiscord<moein> In reply to @enthus1ast "call it something else": oh ok. thank you for helping
12:14:58FromDiscord<moein> In reply to @PMunch "By the way, you": nice. I didn't know that
12:15:57PMunchThat was my suspicion as well, but I wanted to try it out myself
12:16:19PMunchBasically `result` is a special variable in Nim, it's automatically declared to be the same type as your return type
12:16:55PMunchSo in your nearestCalorie procedure for example you can drop the `var nearest = 0` part and simply use result instead
12:17:09PMunchIt will default to binary zero for whatever your type is, so for an int it would be zero
12:21:56FromDiscord<moein> In reply to @PMunch "So in your nearestCalorie": like this? var nearest = result
12:23:18FromDiscord<haxscramper> Like this
12:23:22FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wxc
12:24:03PMunchNope, simple remove `var nearest = 0` and then use `result` instead of `nearest`, like this: https://play.nim-lang.org/#ix=3wxe
12:24:21PMunch`result` is automatically returned at the end of the procedure
12:24:41PMunch@haxscramper, you missed one on line 7
12:26:16FromDiscord<moein> nice this really makes it cleaner
12:27:28PMunchNim has a couple of neat features like that
12:27:53PMunchHere you can read more about implicit return and result: https://peterme.net/tips-and-tricks-with-implicit-return-in-nim.html
12:29:23FromDiscord<moein> since you read my code would you give me feedback about usage of array and object and sequences i used in my app? I mean did i use proper methods for those data or there is better approach? I'm coming from javascript and we use array and object for everything πŸ™‚
12:34:05PMunchHmm, well in calcCaloriesToLose I would return a tuple instead
12:34:11PMunchMuch faster than building a hash table
12:35:36PMunchHmm, well that might be hard with the other stuff you're doing. It's a bit hard to tell what the goal here is
12:37:00PMunchYou can use result in calcCaloriesToLoseMap by the way
12:37:09PMunchThe default value of a seq is an empty sequence
12:38:08FromDiscord<moein> sent a code paste, see https://paste.rs/RBA
12:39:08PMunchRight..
12:40:15FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wxl
12:40:41FromDiscord<haxscramper> You can use enum instead of magical strings like "medium", and nim allows you to index into `array` using enums as well
12:41:40PMunchMakes it a bit more work to turn it into that JSON output though
12:41:50PMunchDefinitely a balance to be struck here
12:43:18*rockcavera joined #nim
12:43:18*rockcavera quit (Changing host)
12:43:18*rockcavera joined #nim
12:51:05PMunchI'd probably do something like this: http://ix.io/3wxn/
12:51:12*arkurious joined #nim
12:53:00PMunchA bit dependent on what that "activity" thing actually is
12:53:18PMunchBut I assume it might come from the request, and as such is a string
12:53:54PMunchBut you could do that as an enum/array combination as well, and use parseEnum to convert it
12:54:09PMunch@moein ^
12:54:44*Jjp137 quit (Read error: Connection reset by peer)
12:57:32FromDiscord<moein> yeah exactly activity could be an enum since it values are specific.
12:58:03FromDiscord<moein> so this changes also affect to performance?
12:58:13FromDiscord<moein> (edit) "affect to" => "affects"
12:58:19PMunchYes, this will be more performant than your version
12:59:25PMunchA table is a full hash table with buckets and room to grow (all of which involves using the GC both for the string keys but also for the buckets themselves). An array[Difficulty, int] is simply three integers crammed together in memory and might even be passed directly on the stack.
13:00:40PMunchSince we're using the result variable it's also possible that they are written to directly on the callers stack and not even copied from one place to another. Or the whole procedure might even be inlined because it's not trivially simple.
13:06:41FromDiscord<haxscramper> If we are talking about microoptimizations like inlining you can also use `toJson(calMap)` from https://github.com/treeform/jsony instead of `$(%(calMap))`. jsony converts directly to string, avoiding lots of intermediate allocations that std/json does
13:08:02FromDiscord<haxscramper> On the sequence of four CaloriesMaps difference is about five times (faster)
13:08:09FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wxr
13:16:39*Vladar joined #nim
13:34:10*xxov quit (Ping timeout: 246 seconds)
13:37:14*max22- joined #nim
13:37:14arkanoidhow bad is the idea to automatically convert nil of T in none(T) of Option[T]
13:38:56FromDiscord<Rika> if you wrap a ref type in an option that is automatically done i believe
13:39:09PMunchNot any longer I believe
13:39:12FromDiscord<Rika> or do you mean a converter of T to Option[T]?
13:39:27PMunchIt was supposed to be an optimisation, but it turns out that it was a silly idea
13:39:34FromDiscord<Rika> oh really? huh
13:39:41arkanoidnot sure yet how to implement it, but I was just thinking if it was worth it
13:40:04arkanoidyeah, I also smell that it might be a silly idea
13:41:25FromDiscord<konsumlamm> it's still done, because changing the behaviour would be a breaking change
13:41:30PMunchThe problem is that you suddenly have no way of having Option[pointer] that makes any sense
13:41:32FromDiscord<konsumlamm> but it is a silly idea, ye
13:41:47FromDiscord<konsumlamm> see https://github.com/nim-lang/Nim/pull/18401
13:42:01PMunchYou could just use a normal pointer and have it take special value nil, but if you need more than that there simply would be no way to do it
13:42:13PMunchWell, there would be a way, just not a very practical one
13:43:01FromDiscord<konsumlamm> In reply to @arkanoid "not sure yet how": are you aware that stdlib already has an `Option[T]` type?
13:43:28PMunchAh, so it still has this behaviour..
13:47:15arkanoidkonsumlamm, sure, but I didn't know that it was automatically doing the nil to none thing
13:54:04*flynn quit (Read error: Connection reset by peer)
13:55:11*flynn joined #nim
13:55:39FromDiscord<moein> In reply to @PMunch "But you could do": why array? why not an object?
13:56:09FromDiscord<moein> (edit) "In reply to @PMunch "But you could do": why array? why not an object?" => "sent a code paste, see https://play.nim-lang.org/#ix=3wxF"
13:57:00*max22- quit (Quit: Leaving)
13:59:59FromDiscord<moein> In reply to @moein "why array? why not": I'm asking this because i need to get value by key name if that's possible with array I'm good to go
14:00:07FromDiscord<βƒŸβƒŸ> in relation to the previous conversation
14:00:13FromDiscord<βƒŸβƒŸ> i dont think `+` should be used for strings
14:00:29FromDiscord<βƒŸβƒŸ> basically for the same reasons why i dont think `/` should be used
14:01:39PMunch@moein, array because you can use parseEnum to get an enum that can index an array. But you can't (easily) parse a string into a field to access from the object.
14:02:13*xet7 quit (Remote host closed the connection)
14:02:22PMunchAnyways, I'm off
14:02:25*PMunch quit (Quit: Leaving)
14:03:25*xet7 joined #nim
14:04:55*max22- joined #nim
14:05:41arkanoidhow can I declare aliases for generic procs?
14:13:56FromDiscord<moein> can i set enum values while defining enum in first place?
14:15:06FromDiscord<moein> sent a code paste, see https://paste.rs/Av1
14:15:10FromDiscord<moein> but i get: Error: ordinal type expected; given: float
14:29:03NimEventerNew thread by Doctor: Read command-line arguments, see https://forum.nim-lang.org/t/8346
14:29:12*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
14:29:23FromDiscord<moein> sent a code paste, see https://play.nim-lang.org/#ix=3wxP
14:30:04FromDiscord<moein> those values are always the same, is there better way to initial them?
14:33:12arkanoidis there any convenience in replacing all equal string literals with a const?
14:33:17FromDiscord<ynfle (ynfle)> parseEnum needs a string
14:33:28arkanoidI mean, they should be const anyway, right?
14:34:14FromDiscord<Rika> In reply to @moein "ok i changed my": what's the last line supposed to do?
14:34:25FromDiscord<ynfle (ynfle)> They aren't const, strings are imutable
14:34:30FromDiscord<ynfle (ynfle)> \mutable
14:34:38FromDiscord<Rika> you can probably do `var ... = [1.2, 1.37, 1.55, 1.72, 1.9]`
14:34:47FromDiscord<moein> In reply to @Rika "what's the last line": returns 1.37
14:35:07FromDiscord<Rika> `paParams[light]`
14:35:18FromDiscord<ynfle (ynfle)> @moein, `Activity` isn't an enum
14:35:26arkanoidynfle, but literal strings? compiler should know if they are actually changed or not
14:36:28FromDiscord<ynfle (ynfle)> You mean as an optimization? Maybe. You'd have to check the c code and assembler
14:38:22arkanoidk, I think I will leave them as string literals
14:38:33FromDiscord<moein> sent a long message, see http://ix.io/3wxR
14:39:53FromDiscord<ynfle (ynfle)> You can have an object type and access the fields like pa.light.
14:41:12FromDiscord<ynfle (ynfle)> sent a code paste, see https://paste.rs/vV7
14:42:44FromDiscord<Ondrejoda> sent a code paste, see https://paste.rs/Azw
14:42:59FromDiscord<ynfle (ynfle)> No
14:43:11FromDiscord<ynfle (ynfle)> you need to do var rect = new Rect
14:43:24FromDiscord<Ondrejoda> πŸ€¦β€β™‚οΈ
14:43:31FromDiscord<ynfle (ynfle)> There is probably a wrapper proc for it
14:43:44FromDiscord<Ondrejoda> i was trying `var rect = Rect.new()`
14:43:56FromDiscord<Rika> that should work too
14:45:00FromDiscord<Ondrejoda> well it doesn't seem to
14:45:26*jjido joined #nim
14:46:04FromDiscord<Rika> what error are you getting
14:55:09*Jjp137 joined #nim
15:09:32FromDiscord<Yardanico> In reply to @Ondrejoda "i have a small": with sdl2 or sdl2_nim ?
15:10:29FromDiscord<Yardanico> in sdl2 Rect is a tuple
15:10:37FromDiscord<Yardanico> so you do it like↡↡`var rect = (x, y, 50, 50)`
15:10:47FromDiscord<Yardanico> or, if you like specifying the type explicitly, `var rect: Rect = (x, y, 50, 50)`
15:12:45FromDiscord<Yardanico> there's also a helper `rect` proc in sdl2 so you can create a rect like `rect(x, y, 50, 50)`
15:13:15FromDiscord<Yardanico> that said, sdl2_nim has Rect as a Nim object
15:14:33*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
15:15:27*xxov joined #nim
15:21:19*jjido joined #nim
15:27:14*robertmeta quit (Read error: Connection reset by peer)
15:31:55*robertmeta joined #nim
15:45:03FromDiscord<Ondrejoda> how do i convert int to cint?
15:45:26FromDiscord<enthus1ast> 123.cint
15:45:32FromDiscord<Ondrejoda> oh
15:45:40FromDiscord<Ondrejoda> so int(my_variable).cint?
15:46:55FromDiscord<Ondrejoda> yeah that works
15:47:02FromDiscord<Rika> no need for int()
15:48:22FromDiscord<Yardanico> also sdl2_nim doesn't require such conversions :P
15:48:55FromDiscord<enthus1ast> my\_variable.cint should also work
15:52:30*max22- quit (Remote host closed the connection)
15:53:19*max22- joined #nim
15:53:48FromDiscord<marceneiro> sent a long message, see https://paste.rs/Z3u
15:54:31FromDiscord<marceneiro> (edit) "long message," => "code paste," | "http://ix.io/3wyK" => "https://paste.rs/L7a"
15:55:17FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wyM
15:55:26FromDiscord<haxscramper> https://nim-lang.org/docs/manual.html#statements-and-expressions-case-statement
15:56:48FromDiscord<Rika> `'+'` not`"+"`
15:57:19FromDiscord<Yardanico> In reply to @Rika "`'+'` not`"+"`": huh?
15:57:32FromDiscord<Yardanico> why char instead of string? marceniero asked about matching strings
15:57:50FromDiscord<Yardanico> in rust strings are double quotes, chars are single quotes
15:57:56FromDiscord<Rika> yes but doesnt regular case not allow for matching strings
15:57:59FromDiscord<Yardanico> it does
15:58:02FromDiscord<Yardanico> there's no problem with that
15:58:03FromDiscord<Rika> it does?
15:58:06FromDiscord<Yardanico> yes lol
15:58:12FromDiscord<Yardanico> it always did :P
15:58:17FromDiscord<Rika> i probably forgot over time
16:00:25FromDiscord<Yardanico> you can't have runtime strings in of branches, maybe that's what you remembered
16:00:32FromDiscord<Yardanico> but literal strings are fine
16:00:36FromDiscord<Yardanico> (or const ones)
16:01:45FromDiscord<Rika> no i dont know im probably mixing some other language
16:04:10FromDiscord<marceneiro> Thanks @Rika and @Yardanico , that worked
16:04:21FromDiscord<Rika> dont forget hax lol
16:05:10FromDiscord<marceneiro> Oh, god. Sorry mate @haxscramper , much appreciated
16:28:20*rockcavera quit (Remote host closed the connection)
16:34:49arkanoidwhoever invented xml and decided to build a schema around it, must be a kind of evil man
16:42:44*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
16:42:49FromDiscord<βƒŸβƒŸ> how do i make the automatic name changing thing an error
16:42:50FromDiscord<βƒŸβƒŸ> so like
16:43:01FromDiscord<βƒŸβƒŸ> `parse_file` instead of `parseFile`
16:43:04FromDiscord<βƒŸβƒŸ> how do i make that an error
16:47:43FromDiscord<Rika> cannot
16:47:53FromDiscord<Rika> you can make `parse_file` an error but not the reverse
16:49:17FromDiscord<Rika> oh, apparently `--styleCheck:usages` exists now, not sure when but i assume only in devel
16:49:38FromDiscord<haxscramper> 1.4.8 has it
16:49:58FromDiscord<Rika> i assume this emits errors, right?
16:52:08FromDiscord<βƒŸβƒŸ> it dosent seem to emit errors or warnings
16:52:12FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wyQ
16:52:16FromDiscord<βƒŸβƒŸ> ^
16:53:03FromDiscord<Rika> maybe requires a prior --styleCheck:error
16:53:24FromDiscord<haxscramper> `command line(1, 2) Error: 'on' or 'off' expected, but 'error' found`
16:53:44FromDiscord<haxscramper> `--styleCheck:off|hint|error` literally in fullhelp
16:53:47FromDiscord<haxscramper> wtf
16:53:47FromDiscord<Rika> `echo -e "proc aaa_q() = discard\naaaQ()" | nim r --styleCheck:error --styleCheck:usages`
16:53:50FromDiscord<Rika> (edit) "--styleCheck:usages`" => "--styleCheck:usages -`"
16:53:58FromDiscord<Rika> doesnt work either
16:54:26FromDiscord<Rika> yeah i dont think it works at all
16:55:19FromDiscord<haxscramper> https://github.com/nim-lang/fusion/issues/82 it works when someone is concerned with stray capital S at least
16:57:15FromDiscord<βƒŸβƒŸ> so i cant do it?
16:59:00FromDiscord<Rika> could if the issue is fixed
16:59:23FromDiscord<Sorrow> Hello. Is it possible to build a single executable? Looked at the documentation and couldn't see a way.
16:59:39FromDiscord<Sorrow> With all the required dlls etc packed in.
16:59:56FromDiscord<Rika> what dynamic libraries are you using
17:00:13FromDiscord<Sorrow> I mean Nim's own dlls.
17:00:18FromDiscord<βƒŸβƒŸ> do you really want ALL the required things?
17:00:29FromDiscord<βƒŸβƒŸ> probably you will have to use a alternative libc
17:00:59FromDiscord<Rika> i dont know for windows sorry
17:01:25FromDiscord<Rika> maybe just a --passL:-static would work
17:01:56FromDiscord<Sorrow> I'll try that later, thanks. Go's my main lang, but wanna start using Nim, too.
17:02:00FromDiscord<Rika> what dynlibs does nim even use on windows?
17:02:09FromDiscord<Sorrow> Quite a few.
17:02:27FromDiscord<βƒŸβƒŸ> how do you check
17:02:33FromDiscord<Sorrow> (edit) "Nim," => "Nim again,"
17:02:34FromDiscord<Rika> i asked what, not how many
17:02:47FromDiscord<Sorrow> Idk, not at pc.
17:02:50FromDiscord<Rika> okay
17:03:00FromDiscord<Rika> anyone who can check>
17:03:00FromDiscord<βƒŸβƒŸ> im using windows and at my pc
17:03:04FromDiscord<βƒŸβƒŸ> so just tell me how to check
17:03:10FromDiscord<βƒŸβƒŸ> quickly though im going soon
17:06:19FromDiscord<βƒŸβƒŸ> i found KERNEL32 and msvcrt
17:06:31FromDiscord<Rika> `dumpbin /imports`
17:06:32FromDiscord<Rika> ?
17:06:42FromDiscord<βƒŸβƒŸ> i dont have that
17:06:47FromDiscord<Sorrow> https://media.discordapp.net/attachments/371759389889003532/878324195581366343/Untitled.png
17:07:21FromDiscord<Rika> only needed for certain modules
17:10:15FromDiscord<Sorrow> Didn't work unfortunately.
17:10:30FromDiscord<Sorrow> (edit) "Didn't work unfortunately. ... " added "`could not load: (libcrypto-1_1-x64|libeay64).dll`"
17:15:23FromDiscord<Rika> well what did the code you compiled look like
17:15:56FromDiscord<Sorrow> Just a basic script using json and httpclient.
17:16:14FromDiscord<Rika> theres the module
17:16:20FromDiscord<Rika> httpclient requires that dll
17:16:28FromDiscord<Rika> (of course, SSL)
17:16:50FromDiscord<Sorrow> I wanna include that in the compilation.
17:17:32FromDiscord<Rika> yes im looking into it
17:18:32FromDiscord<Rika> https://github.com/nim-lang/Nim/issues/15220
17:20:05FromDiscord<Sorrow> Thanks.
17:21:02FromDiscord<Rika> not sure if it helps, actually
17:26:24*pro joined #nim
17:37:16FromDiscord<JSONBash> I am in the process of making a website (https://www.nim.wiki/) that gives people with nim related GitHub Pages websites a domain name (https://demo.nim.wiki/). I could use a couple people going through thr process and giving feedback if that is something people would be willing to do
17:55:34FromDiscord<RattleyCooper> How can I add something to the event loop with `asyncdispatch`? I'm trying to make a discord bot with `dimscord` and need to check an outside api for something then post a message depending on the result, but I can't figure out how to add something to the event loop. It seems that I can either `runForever` or `waitFor`. What am I missing here?
18:02:10FromDiscord<Yardanico> In reply to @RattleyCooper "How can I add": I don't exactly understand, do you mean that you want to periodically check for something and then send a discord message if that check is successful?
18:02:22FromDiscord<RattleyCooper> Correct
18:02:56FromDiscord<Yardanico> you can just create a proc with a infinite loop (+ await sleepAsync) and call it with asyncCheck proc()
18:03:02FromDiscord<Yardanico> and do whatever checking you need inside the loop's body
18:03:44FromDiscord<RattleyCooper> Ok cool, do you know if `poll` is also required?
18:03:52FromDiscord<Yardanico> no
18:03:56FromDiscord<RattleyCooper> sent a code paste, see https://paste.rs/CXj
18:03:57FromDiscord<Yardanico> no, you misunderstood me
18:03:58FromDiscord<RattleyCooper> Ok
18:04:06FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3wz2
18:04:10FromDiscord<Yardanico> then call that with "asyncCheck" somewhere at the start of your program once
18:04:16FromDiscord<Yardanico> asyncCheck waitForEvent()
18:04:45FromDiscord<Yardanico> there's also another way
18:13:15FromDiscord<Rika> In reply to @Yardanico "then call that with": And then at the end you call run forever right?
18:13:26FromDiscord<Yardanico> In reply to @Rika "And then at the": well, that depends on how your async app works generally
18:13:36FromDiscord<Yardanico> i assumed he already had that set up so didn't mention it
18:13:40FromDiscord<Rika> As long as something calls poll at the end
18:14:02FromDiscord<RattleyCooper> Yeah, ngl I'm pretty lost bc the docs don't really explain it
18:14:11FromDiscord<Yardanico> well, what's your issue exactly?
18:14:16FromDiscord<Yardanico> dimscord has plenty of examples
18:14:22FromDiscord<RattleyCooper> It's not running anything in while true:
18:14:30FromDiscord<Rika> Basically, by merely calling an async proc, it is put in the event loop
18:14:41FromDiscord<RattleyCooper> I'm not having issues with dimscord though
18:14:42FromDiscord<Rika> As far as I know, at least
18:14:48FromDiscord<Yardanico> In reply to @RattleyCooper "It's not running anything": well, that was a code example, you're supposed to add your own checking for whatever api you need instead of # ...
18:14:50FromDiscord<RattleyCooper> I need to add a simple while loop to the event loop
18:15:01FromDiscord<Yardanico> In reply to @RattleyCooper "I need to add": as I said, write a proc like that and add it with asyncCheck
18:16:47FromDiscord<RattleyCooper> In reply to @Yardanico "as I said, write": I got you, looks like it did need `runForever`
18:16:55FromDiscord<Yardanico> well, but you do that for dimscord usually
18:17:03FromDiscord<Yardanico> e.g. `waitFor discord.startSession()` for dimscord
18:17:05FromDiscord<RattleyCooper> Here is what works for me
18:17:22FromDiscord<RattleyCooper> sent a code paste, see https://play.nim-lang.org/#ix=3wz4
18:17:25FromDiscord<Yardanico> nonono
18:17:52FromDiscord<RattleyCooper> Don't need runForever
18:17:54FromDiscord<RattleyCooper> Gotcha
18:17:54FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3wz5
18:17:55FromDiscord<Yardanico> that's all you need
18:17:58FromDiscord<RattleyCooper> Ok cool
18:18:09FromDiscord<RattleyCooper> Thanks for the help πŸ˜„
18:26:05*nrds joined #nim
18:30:44nrds<Prestige99> I feel like the async system could have better docs, it's always a bit confusing to me
18:31:28FromDiscord<Yardanico> well, idk, nim's default async seems pretty natural to me
18:31:33FromDiscord<Yardanico> and similar to e.g. python's async
18:32:14nrds<Prestige99> The different keywords throw me off, I need to learn it in-depth. Feel like I'm missing something
18:32:47FromDiscord<Yardanico> well, not sure I can relate, never had a problem with them :P
18:33:35FromDiscord<Yardanico> asyncCheck - start a future, don't wait for completion, waitFor - start and wait for the future to complete
18:33:39FromDiscord<Yardanico> runForever - run the event loop forever
18:33:48FromDiscord<Jakraes> Does nim have a perlin noise library?
18:33:54FromDiscord<Yardanico> waitFor is the "await" for non async procs
18:33:58FromDiscord<Yardanico> or for global-level code
18:34:23nrds<Prestige99> I would think all non-async procs would be blocking
18:34:25FromDiscord<Yardanico> In reply to @Jakraes "Does nim have a": check https://github.com/search?q=language%3Anim+perlin+noise maybe there's something that suits your needs
18:34:36FromDiscord<Yardanico> @Prestige in what sense?
18:34:58nrds<Prestige99> like if I call foo() I would expect execution to not continue, until foo has finished
18:35:04nrds<Prestige99> unless foo were async
18:35:11FromDiscord<Yardanico> yes, that is true for all non-sync procs
18:35:16FromDiscord<Yardanico> non-async
18:35:47nrds<Prestige99> the sentence "waitFor is the "await" for non async procs" didn't make sense to me
18:36:30FromDiscord<Yardanico> I meant that waitFor is when you need to wait for future's completion and get a result, but you're not in an async context
18:36:42FromDiscord<Yardanico> so usually global code or the proc where you start your main async proc
18:37:08FromDiscord<Yardanico> and waitFor itself does block (since it waits till the future completes)
18:37:41nrds<Prestige99> oh I see. Interesting
18:38:07FromDiscord<Yardanico> also don't be scared by async stuff in the stdlib, it has pretty readable source code as well :P
18:38:31FromDiscord<Yardanico> e.g. waitFor is just 3 lines https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L1932
18:38:35nrds<Prestige99> My knee-jerk reaction tells me it'd make more sense if it was still "await" instead of "waitFor", and it just handled things differently in different contexts
18:38:58FromDiscord<Yardanico> well, I think that'd be even more confusing - the same thing will be doing different stuff based on the context it's in
18:39:07nrds<Prestige99> true
18:39:25FromDiscord<Yardanico> you don't use waitFor a lot anyway
18:39:39FromDiscord<Yardanico> it's mainly used to start some main async loop or something similar
18:39:41nrds<Prestige99> I guess the part that confuses me is that the proc names aren't super descriptive but that'd be really hard to pull off
18:43:42nrds<Prestige99> Probably just need to work on more async stuff in Nim πŸ™‚
18:44:38*max22- quit (Ping timeout: 256 seconds)
18:53:12*jjido joined #nim
19:10:09madpropsNim is the most powerful programming language!
19:15:37*max22- joined #nim
19:17:10FromDiscord<βƒŸβƒŸ> how do i make `join_path` instead of `joinPath` a compile error then
19:19:56FromDiscord<haxscramper> I don't think nim compiler has a way to enforce identifiers that don't conform to the official style guide
19:21:00FromDiscord<haxscramper> And IIRC `styleCheck:usage` is supposed to make it possible to use library with "incorrect" identifiers in your code together with `--styleCheck:error`
19:21:38FromDiscord<βƒŸβƒŸ> :(
19:24:17FromDiscord<haxscramper> Ah, sorry I read your question backwards, though second part still applies ... and styleCheck is like supposed to work, but maybe I don't know what exactly triggers it
19:24:30FromDiscord<tandy> \`Error\: unhandled exception\: assignment to discriminant changes object branch; compile with -d\:nimOldCaseObjects for a transition period [FieldDefect]\`
19:24:36FromDiscord<tandy> what does this mean?
19:27:53FromDiscord<haxscramper> You can't assign to discriminant fields
19:28:02FromDiscord<haxscramper> case kind\:
19:29:00FromDiscord<tandy> oh
19:29:10FromDiscord<βƒŸβƒŸ> nim syntax
19:29:25FromDiscord<βƒŸβƒŸ> sent a code paste, see https://paste.rs/c2W
19:29:37FromDiscord<haxscramper> do you need to switch object branch or this just happened accidentally?
19:29:37FromDiscord<βƒŸβƒŸ> sent a code paste, see https://paste.rs/NCD
19:29:40FromDiscord<βƒŸβƒŸ> you have to watch out for spaces
19:29:53FromDiscord<haxscramper> I.e there a ways to work around this if you need
19:30:02FromDiscord<tandy> im trying to create a func to create a new object which has discriminant fields
19:30:03FromDiscord<βƒŸβƒŸ> maybe that should be a compile error or warning
19:30:26FromDiscord<carpal> sent a code paste, see https://play.nim-lang.org/#ix=3wA1
19:30:44FromDiscord<haxscramper> okay, so in simple constructor you just need to assign when creating object `result = Obj(kind: <input>)`
19:30:50FromDiscord<carpal> something:↡xxxx
19:30:52FromDiscord<carpal> xxxx
19:30:59FromDiscord<Yardanico> In reply to @carpal "xxxx": it's different
19:31:01FromDiscord<haxscramper> this ia a language feature called MCS↡(@βƒŸβƒŸ)
19:31:03FromDiscord<Yardanico> spaces before f vs no spaces
19:31:09FromDiscord<carpal> In reply to @Yardanico "it's different": yes
19:31:24FromDiscord<carpal> but it was a bit funny to see
19:31:45FromDiscord<Yardanico> In reply to @haxscramper "this ia a language": is it in this case? he's talking about how f without a space binds stronger than f with a space
19:32:17FromDiscord<haxscramper> whatever this bs is called, mcs/ufcs
19:32:20FromDiscord<haxscramper> command syntax
19:32:22FromDiscord<haxscramper> method call syntax
19:32:27FromDiscord<haxscramper> regular proc call syntax
19:32:50FromDiscord<haxscramper> command call syntax yes
19:32:55FromDiscord<βƒŸβƒŸ> i would want the nim compiler to detect cases like the one i showed
19:33:18FromDiscord<haxscramper> it is not possible to do since it is not a "case" that can be detected
19:33:20FromDiscord<haxscramper> both are valid usages
19:33:36FromDiscord<haxscramper> `echo (12, 2)` is just as justified as `echo(12, 2)`
19:33:47FromDiscord<haxscramper> or whatewher infix operator you might have added in
19:34:06FromDiscord<βƒŸβƒŸ> is that a tuple?
19:34:09FromDiscord<βƒŸβƒŸ> vs normal call
19:34:14FromDiscord<haxscramper> yes
19:34:30FromDiscord<βƒŸβƒŸ> so its even more confusing than i thought
19:34:40FromDiscord<Yardanico> it's more consistent :)
19:34:46FromDiscord<haxscramper> has space - tuple↡no space - call
19:35:00FromDiscord<βƒŸβƒŸ> ok what about this
19:35:07FromDiscord<βƒŸβƒŸ> `f (1+2) + 3`
19:35:12FromDiscord<βƒŸβƒŸ> is that a tuple with 3 in it
19:35:25FromDiscord<βƒŸβƒŸ> or the math `()~
19:35:26FromDiscord<βƒŸβƒŸ> (edit) "`()~" => "`()`"
19:36:33FromDiscord<konsumlamm> that's `f` applied to `(1+2) + 3`
19:36:57FromDiscord<konsumlamm> command syntax doesn't magically turn everything into tuples
19:37:15FromDiscord<konsumlamm> but `(a, b)` happens to be the syntax for tuples
19:37:21FromDiscord<Yardanico> @βƒŸβƒŸ have you read https://nim-lang.org/docs/manual.html#procedures-command-invocation-syntax ?
19:37:31FromDiscord<βƒŸβƒŸ> i think nim should have it syntax reworked
19:37:53FromDiscord<konsumlamm> command syntax is very unlikely to change
19:37:56FromDiscord<Yardanico> In reply to @βƒŸβƒŸ "i think nim should": create a forum thread, see if other people agree with you
19:37:59FromDiscord<Yardanico> (edit) "In reply to @βƒŸβƒŸ "i think nim should": create a forum thread, see if other people agree with you ... " added "or not"
19:38:16FromDiscord<haxscramper> I think command syntax is one of the best things in nim
19:38:20proevening lads
19:38:25FromDiscord<haxscramper> no break-the-language-by-making-print-an-operator
19:38:39FromDiscord<haxscramper> aka python
19:38:46FromDiscord<haxscramper> eveything is consistent and can be used uniformly
19:38:49FromDiscord<Yardanico> also await
19:38:54FromDiscord<haxscramper> echo
19:39:00FromDiscord<Yardanico> they had to make it a keyword as well
19:39:30FromDiscord<haxscramper> In reply to @Yardanico "also await": yes, things like await & other stuff that looks and feels like a keyword but does not have to have a special language support
19:40:43FromDiscord<konsumlamm> ~~and also works worse than if it was builtin, from what i've heard~~
19:40:49FromDiscord<Yardanico> how so?
19:41:40FromDiscord<haxscramper> In reply to @konsumlamm "~~and also works worse": it is related to the internal implementation and not syntax but yeah, there were some talks about making async not a macro transform
19:41:50FromDiscord<haxscramper> but a built-in language feature
19:42:03FromDiscord<haxscramper> but there are like trillion opinons on that one
19:42:04FromDiscord<dain> doesnt async pose problems for the garbage collector
19:42:16FromDiscord<Yardanico> no
19:42:19FromDiscord<haxscramper> IIRC it creates lots of cycles?
19:42:27FromDiscord<haxscramper> but that's as far as it goes
19:42:30FromDiscord<Yardanico> well yes, but i don't think this can be considered a real "problem"
19:42:40FromDiscord<Yardanico> In reply to @dain "doesnt async pose problems": maybe you read that from people talking about async + orc
19:42:46FromDiscord<Yardanico> this has been already fixed
19:42:49FromDiscord<tandy> just if statement?
19:42:50FromDiscord<tandy> depending on the kind I need to pass in different input though, how would i do that?
19:42:50FromDiscord<dain> yeah that must have been it
19:42:50FromDiscord<Yardanico> async doesn't leak with orc
19:43:41FromDiscord<dain> i want to use nim in something bc it seems so comfy but none of the stuff i work on would benefit from it :S
19:43:46FromDiscord<enthus1ast> do you know of a ready to use parseStr that parses a nim str but respects simple escaping like\: "
19:43:53FromDiscord<enthus1ast> \\"
19:44:00FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wAC
19:44:12FromDiscord<tandy> ahh
19:44:12FromDiscord<dain> i just do simple scripting that is almost entirely IO bound, so the extra speed vs python means nothing
19:44:52FromDiscord<haxscramper> You want to parse simple string literal, or this is related to nim code parsing?
19:46:40FromDiscord<enthus1ast> i must rewrite the nimja lexer, and it uses constructs like {% extends "fooBaaBaz" %} or {{ """ }}
19:46:59FromDiscord<enthus1ast> but it should follow the same rules nim uses
19:47:15FromDiscord<enthus1ast> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/878364434035245057): i must rewrite the nimja lexer, and it uses constructs like {% extends "fooBaaBaz" %} or {{ "\\"" }}
19:47:34FromDiscord<enthus1ast> at least "foo \\"baa\\" baz"
19:47:51FromDiscord<enthus1ast> before i roll my own i though i ask you guys \:)
19:47:58FromDiscord<haxscramper> You can copy one from `compiler/lexer.getStr():~757`
19:48:22FromDiscord<haxscramper> but I'm not aware of any built-in stdlib implementation that does the same
19:48:52FromDiscord<haxscramper> I think copying nim lexer part would be the best idea, since you want to reproduce it anyway
19:49:02FromDiscord<enthus1ast> yeah i must have written 4 or 5 of them all are half assed
19:49:59FromDiscord<enthus1ast> yeah
19:50:16FromDiscord<tandy> https://pastebin.com/NqsKFfj8
19:50:24FromDiscord<tandy> \`Error\: unhandled exception\: 'apiKey' is not accessible using discriminant 'service' of type 'ServiceUser' [FieldDefect]\`
19:50:35FromDiscord<tandy> i get this error \:(
19:51:54FromDiscord<Yardanico> show the code?
19:52:28FromDiscord<tandy> i sent it in the pastebin https://pastebin.com/NqsKFfj8↡(@Yardanico)
19:52:33FromDiscord<tandy> didnt wanna spam chat
19:53:02FromDiscord<Yardanico> that should work just fine
19:53:51FromDiscord<Yardanico> and your pastebin example does indeed compile fine for me
19:53:53FromDiscord<tandy> strange
19:54:09FromDiscord<tandy> maybe its somewhere else, il take a look
19:54:48FromDiscord<Yardanico> you are probably assigning to .apiKey somewhere else without checking if the branch is correct
19:55:05FromDiscord<Yardanico> well, not assigning, just accessing
19:55:13FromDiscord<Yardanico> try to search for ".apiKey" in your codebase
19:56:21FromDiscord<tandy> \`newUser(services = [lastFmUser, listenBrainzUser]).services[lastFm].apiKey\`
19:56:37FromDiscord<Yardanico> eh what does .services[lastFm] even mean?
19:56:50FromDiscord<tandy> i missed out some other code
19:57:04*xxov quit (Ping timeout: 246 seconds)
19:57:23FromDiscord<tandy> \`\`\` User\ = ref object services\\: array[Service, ServiceUser] playingNow\\: Option[Track] listenHistory\\: seq[Track] func newUser\( services\: array[Service, ServiceUser], playingNow\: Option[Track] = none(Track), listenHistory\: seq[Track] = @[])\: User = ## Create new User object new(result) result.services = services result.playingNow = playingNow result.listenHistory = listenHistory \`\`\`
19:58:02FromDiscord<tandy> https://pastebin.com/vkKfVh2E
19:59:08FromDiscord<Yardanico> uhh, do your Users always have both services?
19:59:16FromDiscord<tandy> \`listenBrainzUser = newServiceUser(service = listenBrainz, username = "tandy1000")\`
20:00:32FromDiscord<Yardanico> but your newUser proc from that pastebin doesn't take a services array
20:00:44FromDiscord<Yardanico> can you post more code, I'm still quite confused
20:00:54FromDiscord<Yardanico> i understand that you want to have a single user with one or more ServiceUsers attached to it
20:10:00FromDiscord<tandy> im post the github repo↡(@Yardanico)
20:11:05FromDiscord<tandy> https://github.com/Listen2gether/website
20:11:08nrds<prestigebot99> itHub: 7"Sync your listens on Last.fm and ListenBrainz with other people."
20:11:30FromDiscord<tandy> \`nim c -r src/listentogether.nim\`
20:11:43FromDiscord<tandy> oh shit leme push actualy
20:13:43*pro quit (Quit: WeeChat 3.2)
20:14:44FromDiscord<Yardanico> have you pushed yet?
20:16:53FromDiscord<tandy> done↡(@Yardanico)
20:17:36FromDiscord<Yardanico> and where does the error happen?
20:18:17FromDiscord<Yardanico> i mean file and line
20:18:24FromDiscord<tandy> \`nim c -r src/listentogether.nim\`↡(@Yardanico)
20:20:10*flynn quit (Read error: Connection reset by peer)
20:20:26FromDiscord<Yardanico> newUser(services = [listenBrainzUser])
20:21:13FromDiscord<Yardanico> you have array[Service, ServiceUser] argument in your newUser which means that it can only accepts an array with two values both at the same time
20:21:18*flynn joined #nim
20:21:23FromDiscord<Yardanico> you can't pass an array with only one value to it
20:21:35FromDiscord<tandy> oh
20:21:47FromDiscord<Yardanico> you can for example make it a seq instead of an array
20:22:10FromDiscord<Yardanico> also, do you only need two of these services or plan to expand it to more services later on?
20:22:47FromDiscord<tandy> oh it somehow started compiling
20:23:20FromDiscord<tandy> this, i dont think i will need to, because there arent really other services, but i want to design it to be expandable↡(@Yardanico)
20:23:38FromDiscord<Yardanico> ah okay, then you can just keep it as a seq
20:23:43FromDiscord<Yardanico> is this spam or not? πŸ€” https://media.discordapp.net/attachments/371759389889003532/878373753661308968/unknown.png
20:23:45FromDiscord<Yardanico> seems like it's not
20:24:23FromDiscord<tandy> but then i cant index it by service↡(@Yardanico)
20:25:25FromDiscord<tandy> wait the error is back
20:25:35FromDiscord<tandy> its the indexing issue, i pushed it
20:28:22FromDiscord<Yardanico> because you're missing an argument
20:28:31FromDiscord<Yardanico> newSyncLastFM expects two string arguments at minimum, you're only passing one
20:29:12FromDiscord<tandy> this is the error though \`Error\: unhandled exception\: 'apiKey' is not accessible using discriminant 'service' of type 'ServiceUser' [FieldDefect]\`
20:29:53FromDiscord<tandy> also, the other args are optional↡(@Yardanico)
20:29:57FromDiscord<Yardanico> no
20:30:03FromDiscord<Yardanico> your first two are required
20:30:16FromDiscord<tandy> oh you might need to update to head
20:30:16FromDiscord<Yardanico> apiKey, apiSecret: string; sessionKey: string = "" means that first two are required
20:30:24FromDiscord<Yardanico> as to your issue, you actually don't create the array correctly
20:30:55FromDiscord<tandy> ohh
20:31:02FromDiscord<tandy> il look into that
20:32:07FromDiscord<Yardanico> @tandy in mirroredUser you should pass services as [listenBrainz: listenBrainzUser, lastFm: lastFmUser]
20:32:39FromDiscord<Yardanico> and IMO a "cleaner" way would be to have newUser accept services as a seq and then add them to an array inside of a loop with a case, but that's not needed in your case since I doubt you'll be actually calling newUser in a lot of places
20:33:09FromDiscord<Yardanico> array[Service, ServiceUser] means that your array is indexed by Service, and the first value here is listenBrainz
20:33:36FromDiscord<Yardanico> so when you did services[lastFm] before you actually accessed the listenBrain'z ServiceUser since you had [lastFmUser, listenBrainzUser]
20:35:21FromDiscord<tandy> oh thats a good idea↡(@Yardanico)
20:35:38*max22- quit (Quit: Leaving)
20:35:42FromDiscord<Yardanico> but as I said, that'll be be cleanliness for the sake of cleanliness :)
20:36:09FromDiscord<Yardanico> since your listen2gether isn't a library so you'll only have it a few times in the code at max
20:36:17FromDiscord<tandy> true
20:36:56FromDiscord<tandy> thanks for your help
20:46:23FromDiscord<tandy> i wish a library like https://github.com/gruns/icecream for nim
20:46:26nrds<prestigebot99> itHub: 7"🍦 Never use print() to debug again."
20:46:35FromDiscord<tandy> i wish there was\
20:48:41nrds<Prestige99> You could make it ;)
20:49:18FromDiscord<InventorMatt> That would be pretty trivial to implement in nim with a macro
20:49:30nrds<Prestige99> ^^^
20:49:33FromDiscord<Elegantbeef> Seems like a lot of work for something that exists
20:49:34nrds<Prestige99> Looks neat, too
20:49:40FromDiscord<Elegantbeef> https://github.com/treeform/print
20:49:43nrds<prestigebot99> itHub: 7"Print is a set of pretty print macros, useful for print-debugging."
20:51:26FromDiscord<tandy> looks good, does it support json pretty printing?
20:52:42FromDiscord<Elegantbeef> I dont know i'm not a jsonologis
20:53:17FromDiscord<tandy> lol
20:53:26FromDiscord<tandy> it doesnt sadly
20:53:44FromDiscord<Yardanico> In reply to @tandy "looks good, does it": nim's json module can pretty-format json
20:53:58FromDiscord<Yardanico> https://nim-lang.org/docs/json.html#pretty%2CJsonNode%2Cint
21:11:43*max22- joined #nim
21:14:07*max22- quit (Client Quit)
21:23:09*max22- joined #nim
21:29:17*max22- quit (Quit: Leaving)
21:30:26FromDiscord<rishavs (Rishav Sharan)> @treeform does https://github.com/treeform/pg being maintained?
21:30:28nrds<prestigebot99> itHub: 7"Very simple PostgreSQL async api for nim."
21:40:36*max22- joined #nim
21:41:45FromDiscord<tandy> how can i test if my jsony hooks are working?
21:41:59*max22- quit (Client Quit)
21:42:15FromDiscord<tandy> some object in object json isnt being parsed
21:48:48*Vladar quit (Quit: Leaving)
21:55:36FromDiscord<Fractal> @Fractal happy Bday
21:57:54FromDiscord<Yardanico> wat
22:00:59*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
22:02:36madpropsis creating procs inside a proc a bad idea, performance wise?
22:03:31FromDiscord<Elegantbeef> Should be the same regardless
22:04:14madpropsI just have a short one like
22:04:17madpropsproc cs(s: string): string = capitalizer(s, string_mode)
22:04:42madpropsbut it's inside a proc that could be called a lot
22:05:22madpropsso I'm just wondering if the process of building procs is expensive
22:05:25madpropsbut I guess not
22:07:42FromDiscord<Elegantbeef> Well you may want to add `{.inline.}` to that proc definition to increase the likelyhood of being inlined, or even make it a `template` instead
22:10:29*max22- joined #nim
22:48:40*cyraxjoe quit (Quit: No Ping reply in 210 seconds.)
22:50:01*cyraxjoe joined #nim
23:02:13*flynn quit (Read error: Connection reset by peer)
23:03:20*flynn joined #nim
23:11:53*max22- quit (Remote host closed the connection)