<< 25-03-2021 >>

00:10:29FromDiscord<Tristan> Question, are the built-in defines (eg. `-d:release`) documented anywhere? I can't seem to find anything, I might just not be looking in the right places.
00:12:39FromDiscord<ElegantBeef> https://nim-lang.org/docs/nimc.html
00:12:59FromDiscord<ElegantBeef> That gives a vast majority of options
00:15:34FromDiscord<Tristan> I think this is what I was looking for 🤦‍♂️ https://nim-lang.org/docs/nimc.html#additional-compilation-switches
00:15:55FromDiscord<Tristan> Definitely skimmed that page more than once too lol. Thanks.
00:35:51*Tlangir joined #nim
00:50:02*Tlanger joined #nim
00:52:32*Tlangir quit (Ping timeout: 260 seconds)
01:04:18*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:04:38*njoseph joined #nim
01:04:57*krux02 quit (Remote host closed the connection)
01:23:29*cornfeedhobo joined #nim
01:26:26*cornfeedhobo quit (Quit: ZNC - https://znc.in)
01:32:33*cornfeedhobo joined #nim
02:07:43*NimBot joined #nim
02:34:50*xiangv joined #nim
02:35:23xiangvso
02:36:57FromDiscord<Rika> ?
02:39:34xiangvcould someone send some nim-lang project that is on github
02:40:53FromDiscord<Rika> just search `language:nim` on github?
02:43:31xiangvI mean,some project that used or created by famous company, like feacbook, google
02:44:55FromDiscord<Yardanico> we don't have nim projects created by feacbook [sic!] sadly
02:45:55FromDiscord<Yardanico> also, why did you use https://www.compart.com/en/unicode/U+FF0C instead of a normal comma? :D
02:46:26FromDiscord<Rika> might be a language thing
02:46:31FromDiscord<Rika> IME thing i mean
02:50:05xiangvmy native language (not english)input software outputs
03:37:25FromDiscord<Rika> what the heck? i can access outside bounds of my array??? i dont know how to minimise this
03:39:12leorizeare you on -d:danger?
03:41:26FromDiscord<Rika> oh yeah
03:41:28FromDiscord<Rika> makes sense
03:41:38FromDiscord<Rika> but odd that x[0] is not == the actual contents
03:41:58leorizeyou should never use -d:danger unless you're benchmarking
03:42:17FromDiscord<Rika> which i am
03:42:31leorizewhat are you making? :P
03:42:48FromDiscord<Rika> nothing important enough to benchmark actually
03:43:02FromDiscord<Rika> ignoring the index oob issue
03:43:12FromDiscord<Rika> x[0] != what x prints when echoed
03:43:42FromDiscord<Rika> ah
03:43:52FromDiscord<Rika> okay nevermind
03:44:08leorize-d:danger is dangerous I guess :P
03:44:16FromDiscord<Rika> okay wait
03:44:28FromDiscord<Rika> on d:release now
03:44:44FromDiscord<Rika> x[-1] on an array[1, T] doesnt seem to oob
03:44:54FromDiscord<Rika> instead just exiting with nonzero status code
03:45:03FromDiscord<Rika> oh wait i forgot
03:45:12FromDiscord<Rika> okay okay i forgot to unset something let me see again
03:45:47FromDiscord<Rika> yeah okay
03:46:27FromDiscord<Rika> i wish i could use a prover
03:47:23leorizeprover?
03:48:03FromDiscord<Rika> id rather exert more effort trying to write something that describes my program than to figure out shit that breaks when i try making a change
03:48:50leorizethose stuff are great but I wouldn't say that they are easy to master :P
03:49:47FromDiscord<Rika> well of course but it really feels like it beats this shit for me
03:50:26leorizewriting tests is the best way to do things rn
03:50:57FromDiscord<Rika> i already have tests aaaaaa
03:51:02FromDiscord<Rika> need more coverage ig
03:51:25FromDiscord<Rika> and testing internals actually i dont test that hm
03:51:41FromDiscord<ElegantBeef> Wait you can test code? 😄
03:51:49FromDiscord<Rika> are assertions off on release or only dangere
03:52:02leorizeonly danger atm
03:52:18FromDiscord<ElegantBeef> It depends on if you did `assert` or `doAssert` though
03:52:21leorizenothing stop you from `-d:release --assertions:off` though (in fact I recommend it)
03:53:06FromDiscord<Rika> i mean assert not doassert
03:53:09FromDiscord<Rika> so yeah
03:53:12FromDiscord<Rika> okay
03:53:33FromDiscord<ElegantBeef> As usual just giving some extra information no one asked for 😄
03:53:37FromDiscord<ElegantBeef> Me that is
03:53:45FromDiscord<Rika> xd
03:53:49FromDiscord<Rika> congrats
03:54:10FromDiscord<Rika> i didnt know that compile time bounds checking was also off for danger
03:54:15FromDiscord<Rika> thought only runtime
03:54:25FromDiscord<Yardanico> ??
03:54:38leorizenow that sounds like a bug
03:54:39FromDiscord<Yardanico> danger does not affect compile time checks
03:54:43FromDiscord<Rika> it does??
03:54:57FromDiscord<Rika> what the heck then let me see if i fucked something
03:55:03FromDiscord<Yardanico> can you show an example?
03:55:13FromGitter<iffy> I'm getting `value out of range: 38654705806 notin 0 .. 2147483647` on Android when trying to use the `miniz` library. Did I set some flag wrong when compiling my Nim?
03:56:01leorizenah, probably just int/cint confusion
03:56:17FromDiscord<Rika> literally just `let a: array[1, string] = [""]; echo a[1]`
03:56:24FromDiscord<Rika> compiles just fine on d:danger
03:56:38FromDiscord<Rika> (i mean it compiles but shouldnt)
03:56:43leorize@iffy usually it's the type in Nim doesn't match the type in the library that you're interfacing
03:57:52FromDiscord<Rika> nim devel with hash `6cb26d8010cecf480d909a80e143c168996cfd34`
03:58:15FromGitter<iffy> @leorize here's the Nim part of the library: https://github.com/treeform/miniz/blob/master/src/miniz.nim Would you guess the trouble might be in the C file instead? Or is this miniz.nim file misusing the C file?
03:58:17FromDiscord<Yardanico> !eval let a = [""]; echo a[1]
03:58:18NimBotCompile failed: /usercode/in.nim(1, 20) Error: index 1 not in 0 .. 0
03:58:24FromDiscord<Rika> needs danger
03:58:29FromDiscord<Yardanico> I'm just testing
03:58:33FromDiscord<Rika> oh ok
03:59:53leorize@iffy the .nim file is not matching the .h declarations
04:00:03leorizethough not in any way that could've resulted in your issue...
04:00:21leorizedoes your trace point out the line?
04:00:33FromDiscord<treeform> @iffy, @leorize don't use nimiz, use https://github.com/guzba/zippy instead
04:00:37FromGitter<iffy> No, when I'm in Android land I get hardly anything
04:00:58FromDiscord<treeform> zippy is pure nim, supports more features and faster then miniz.
04:01:22FromDiscord<Rika> wonder how its faster ngl
04:01:34FromGitter<iffy> I'm happy to try that
04:01:45FromDiscord<treeform> miniz was not hard to beat, zlib (the main one is though).
04:02:16FromDiscord<treeform> miniz used a worse algorithm and un-optimized data structures.
04:02:29*spiderstew_ joined #nim
04:02:31FromDiscord<treeform> (edit) "one" => "one)" | "though)." => "though."
04:03:07*spiderstew quit (Ping timeout: 256 seconds)
04:03:10leorize@iffy if you use termux you can compile with debug on :P
04:03:39FromDiscord<treeform> if you don't care about backward compatibility with existing compression libs https://github.com/guzba/supersnappy is much faster then zlib's deflate.
04:04:16FromGitter<iffy> My code is only talking to itself, so compatibility is not an issue
04:04:25*hyiltiz quit (Remote host closed the connection)
04:04:26FromDiscord<treeform> Use https://github.com/guzba/zippy if you need to talk compression with some one else, use https://github.com/guzba/supersnappy if you need compression for yourself only.
04:04:38FromGitter<iffy> well... actually I'd better go with zippy
04:05:29FromDiscord<treeform> zlib's deflate algorithm is like for the 80s, you should take advantage of 40 years of theoretical research since then.
04:05:52leorizelooks like we don't have any library for zstd
04:06:15FromDiscord<Yardanico> In reply to @Rika "(i mean it compiles": This is probably not a bug
04:06:18FromDiscord<Yardanico> See https://github.com/nim-lang/Nim/issues/14950
04:06:47FromDiscord<treeform> we believe snappy algo is "better" then zstd.
04:06:56leorizeYardanico: uh I don't see how that relate
04:08:22FromDiscord<Rika> I didn’t expect it though
04:08:31leorizecompile-time bound checking is a safety feature of the language and I don't think should be disable-able
04:09:59FromDiscord<Yardanico> --boundChecks:off seems to disable bound checks at compile time
04:10:09*hyiltiz joined #nim
04:10:12leorizesounds like a bug to me
04:10:20leorize!eval let a = uint8 65535
04:10:21NimBotCompile failed: /usercode/in.nim(1, 15) Error: 65535 can't be converted to uint8
04:10:32leorize^ this stuff doesn't work even if you compile with -d:danger
04:10:42FromDiscord<Yardanico> yeah you're right in this case
04:10:46FromGitter<iffy> @treeform: snappy > zstd for speed or compression ratio? or something else?
04:10:58FromGitter<iffy> (I have no compression algorithm knowledge)
04:11:55FromDiscord<Yardanico> Seems like it always was the case, it's not a regression
04:12:36FromDiscord<Yardanico> @Rika you can open an issue if you want, or I can do it myself
04:12:51FromDiscord<Rika> if you dont mind T_T sorry
04:12:52FromDiscord<Yardanico> About --boundChecks:off affecting compile time bound checks
04:13:00FromDiscord<Yardanico> Ah ok
04:13:10FromDiscord<Rika> i dont know how to word things properly enough lmao
04:13:18leorize@treeform I'm curious about your assessment of zstd as well
04:14:33FromDiscord<Yardanico> https://facebook.github.io/zstd/ in this benchmark snappy is slightly faster than zstd but has worse compression ratio
04:15:18FromDiscord<Yardanico> faster than default zstd settings
04:16:30FromDiscord<Yardanico> There seems to be a Nim wrapper available at https://github.com/wltsmrz/nim_zstd
04:17:57FromDiscord<treeform> In reply to @iffy "<@107140179025735680>: snappy > zstd": Yes snappy reference implementation is faster then zstd, guzba's version is faster then the reference implementation of snappy. Its really fast. The algorithm is very simple too. Beautify simple too.
04:18:19FromDiscord<treeform> While zstd does get higher compression ratio but it goes slower. Very complex algorithm though.
04:19:44FromDiscord<treeform> Just look at it its only like 400 lines: https://github.com/guzba/supersnappy/blob/master/src/supersnappy.nim
04:19:47FromDiscord<treeform> its very cool.
04:20:58FromDiscord<treeform> While zstd is very complex: https://github.com/facebook/zstd/tree/dev/lib many files, confusing things, hard to reason about.
04:21:46FromDiscord<treeform> I like simple things that work really well in small amount of code.
04:21:52FromDiscord<treeform> That's why I choose snappy.
04:22:48leorizeit's unfair to compare like that given how facebook's zstd implementation do much more than just compressing
04:23:58FromDiscord<treeform> you asked for my assessment of zstd, I never claimed I was fair 🙂
04:24:17*hyiltiz quit (Ping timeout: 260 seconds)
04:24:21leorizetrue :P
04:24:45FromDiscord<treeform> I like that snappy is tight and simple, I don't like that zstd is bloated and complex.
04:27:20FromDiscord<Yardanico> https://blog.cloudflare.com/squeezing-the-firehose/
04:28:55FromDiscord<Yardanico> tldr: they tried different compression algos which were in Kafka (gzip, lz4, snappy), chose snappy, but then found out that zstd would be even better and switched to it
04:29:29leorizeI've skimmed through snappy description in it's github repo
04:29:40leorizeit does look very simple compared to zstd's RFC: https://tools.ietf.org/html/rfc8878
04:29:58leorizewell I suppose there's a limit to how much you can compress with simple algorithms
04:29:58FromDiscord<Yardanico> I totally agree that snappy is much simpler than zstd
04:30:15FromDiscord<Yardanico> But I don't think that it can really beat zstd
04:30:26*hyiltiz joined #nim
04:30:26*hyiltiz quit (Changing host)
04:30:26*hyiltiz joined #nim
04:30:44FromDiscord<treeform> What do you mean its beats it on speed?
04:30:58FromDiscord<treeform> zstd is better at compression ratio
04:31:03FromDiscord<treeform> choose which one wins for you
04:35:46leorizeand if you can't choose, just try a sample of your data with `lzbench`
04:39:22*hyiltiz quit (Ping timeout: 268 seconds)
04:40:21*hyiltiz joined #nim
05:01:06*spiderstew joined #nim
05:01:45FromDiscord<Yardanico> https://github.com/nim-lang/Nim/issues/17503
05:01:53FromDiscord<Yardanico> now lets check the logic in the compiler
05:02:26*spiderstew_ quit (Ping timeout: 264 seconds)
05:05:05FromDiscord<ajusa> @Yardanico not to ping you if you're busy or anything, but did you have a chance to take a look at https://github.com/Yardanico/cosmonim/issues/1? Just making sure it didn't get buried for you 😄
05:05:21FromDiscord<Yardanico> oh, I saw this, yeah
05:05:38FromDiscord<Yardanico> it's probably a limitation of cosmopolitan, I tried experimenting with illwill and std/terminal but didn't get much success
05:05:47FromDiscord<ajusa> Ah okay, just checking
05:06:33FromDiscord<ajusa> Yeah from what I could tell it is partly due to the way the Nim stdlib checks for terminal width and because cosmopolitan doesn't provide that one constant
05:29:00*vicfred joined #nim
05:29:25*haxscramper joined #nim
05:44:57*narimiran joined #nim
06:20:17*lritter joined #nim
06:45:08*xiangv quit (Quit: Connection closed)
07:11:12*rockcavera quit (Remote host closed the connection)
07:15:30ForumUpdaterBotNew Nimble package! rcedit - A new awesome nimble package, see https://github.com/bung87/rcedit
08:04:57ForumUpdaterBotNew thread by Alexeypetrushin: Wildpattern, handle any request in Jester?, see https://forum.nim-lang.org/t/7697
08:13:14*wasted_youth2 quit (Ping timeout: 264 seconds)
08:13:40*wasted_youth2 joined #nim
08:16:58ForumUpdaterBotNew thread by Alexeypetrushin: Can't set wild-pattern matching any route in Jester, see https://forum.nim-lang.org/t/7698
08:22:22FromDiscord<archiloque> Hello, I'm a Java and Ruby dev learning Nim, I've read the book and start to do some coding and I'm frustrated because I can't figure how the reference part is working from the manual and book (I've done some C so I understand how the underlying is supposed to work). Could anyone suggest me an article to read that explain this part, maybe I just need an explanation worded in another way? Thanks!
08:23:12FromDiscord<haxscramper> > "how the reference part is working"↵By 'reference' you mean `ref` type?
08:23:26FromDiscord<haxscramper> http://zevv.nl/nim-memory/
08:23:36FromDiscord<archiloque> Yes, thanks !
08:27:30*fredrikhr joined #nim
08:29:15Clonkk[m]<FromDiscord "<archiloque> Hello, I'm a Java a"> IN a nutshell, reference are heap allocated pointer managed by the garbage collector.
08:29:40FromDiscord<ElegantBeef> They're all your objects in java!
08:29:52FromDiscord<ElegantBeef> Heap allocated and dynamic dispatch supporting
08:30:54FromDiscord<archiloque> I mean I understand the underlying model, what I'm struggling with is the syntax for the different cases
08:31:10FromDiscord<archiloque> (edit) "cases" => "cases, but perhaps I just need to come more and I'll get it"
08:33:23FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2U1W
08:34:04FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2U1X
08:34:50FromDiscord<haxscramper> `AlwaysRef()` is a fine way to initialize things, but in most cases you'd better write constructor proc that returns object, like `proc newAlwasyRef(): AlwaysRef`
08:35:22FromDiscord<haxscramper> `reference[]` is for dereferencing
08:36:25FromDiscord<archiloque> I'm reading the article and the explanations and trying in my code, thanks
09:04:39FromDiscord<archiloque> I have a more precise question: when I declare a new object type, what are the case(s) where I should declare a non-ref object?
09:05:26*wasted_youth2 quit (Ping timeout: 264 seconds)
09:05:49*wasted_youth2 joined #nim
09:06:13saemStack allocation
09:06:28FromDiscord<haxscramper> When you need object to be allocated on stack, or you want to avoid double indirection
09:06:42saemOr when you want to be able to choose stack vs heap allocation.
09:06:45FromDiscord<haxscramper> Like `seq[T]` is stored in one block
09:06:46FromDiscord<mratsim> In reply to @archiloque "I have a more": usually you use a non-ref first
09:07:58FromDiscord<mratsim> is your object unique (for example does it represent a resource like a DB handle or memory or a person) or does it represent something interchangeable/fungible (money, meters, boxes).
09:09:06FromDiscord<mratsim> 2 person with the same characteristics (height, number of limbs, location, citizenship) may not be the same person and may not be interchanged
09:09:21FromDiscord<mratsim> so they need ref semantics, you can't copy/duplicate/clone them
09:10:48FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2U28
09:10:54FromDiscord<haxscramper> Which is used quite often
09:11:04ForumUpdaterBotNew thread by Pietroppeter: Using expressions in default values for procedure's parameters, see https://forum.nim-lang.org/t/7699
09:11:23FromDiscord<archiloque> Is it a standard practice even if you don't intend to use the `Node` type ?
09:13:38FromDiscord<ElegantBeef> Nope
09:13:46FromDiscord<haxscramper> It depends on use case, but sometimes for `ref` type you might need underlying one
09:13:55FromDiscord<ElegantBeef> It depends on the case
09:14:03FromDiscord<haxscramper> And if you declared it as `ref T` you have to do `typeof(node[])`
09:14:22FromDiscord<ElegantBeef> and if you declared just an object you do `new Node`
09:14:26FromDiscord<archiloque> Thanks
09:14:30FromDiscord<haxscramper> But you can do whatever you see fit for the most part, I just said it you might do something like that
09:14:45FromDiscord<haxscramper> If you are not sure about `ref` vs non-ref, or you need both
09:16:03FromDiscord<archiloque> I've seen the pattern used, but was I wasn't sure if was a standard practice or something you do only when you need it
09:16:12FromDiscord<archiloque> (edit) "it" => "it, and now I know"
09:24:42*PMunch joined #nim
10:06:02*krux02 joined #nim
10:12:53FromDiscord<mratsim> In reply to @haxscramper "Which is used quite": It's used because in the past you couldn't declare fields of ref objects
10:14:41FromDiscord<haxscramper> In reply to @haxscramper "It depends on use": This is also a valid consideration. Always do try to do this, because it takes me only one line, but in return I `ref[]` is a sane type
10:14:53FromDiscord<haxscramper> i always try to do this
10:14:59FromDiscord<haxscramper> (edit) "i" => "I"
10:46:28*haxscramper quit (Remote host closed the connection)
10:49:12*fredrikhr quit (Quit: Client Disconnecting)
10:54:04*Vladar joined #nim
10:54:30*pycoder[m] joined #nim
11:32:03giaco__hello! I'd like to add to my nim program the capability of merging pdf files (add pages of second file at the end of first file). Do you know if there's any nim lib capable of that? Thanks
11:32:54FromDiscord<Yardanico> you might have success with https://github.com/jangko/nimpdf
11:33:26FromDiscord<Yardanico> but I'm not sure if it can read PDF files
11:34:07giaco__yeah I've already skimmed some docs but seems write only
11:34:34FromDiscord<Yardanico> then you're out of luck :)
11:34:45FromDiscord<Yardanico> you can try finding some C library to bind, or write your own solution :P
11:34:52FromDiscord<Yardanico> or use an existing tool that does it
11:40:30giaco__Yardanico: yeah but I was trying tu build a cross platform solution and an external tool make it less appealing to maintain
11:40:50FromDiscord<Yardanico> no one stops you from shipping that tool with your software
11:43:13giaco__yeah but I was trying to use the full nim potential of moving a single file application
11:43:55giaco__it's a kind of exercise to find out how far can I go with nim when trying to develop general utilities
12:09:52*krux02 quit (Remote host closed the connection)
12:11:59*NimBot joined #nim
12:18:23*rockcavera joined #nim
12:21:15*narimiran quit (Ping timeout: 268 seconds)
12:43:05*Vladar quit (Quit: Leaving)
13:22:13*Gustavo6046 quit (Ping timeout: 272 seconds)
13:33:56*haxscramper joined #nim
14:06:44giaco__can I redirect the unittest output to a UI item like a text field? I'm writing a a program to validate xlsx files and I'd like to leverate on unittest as validation toolkit
14:06:58giaco__s/leverate/leverage/
14:08:49giaco__I'm considering using https://nim-lang.org/docs/unittest.html#JUnitOutputFormatter, but not sure if this is the right direction or I should try to redirect stdout
14:10:13*rockcavera quit (Remote host closed the connection)
14:12:43*Vladar joined #nim
14:37:26*narimiran joined #nim
14:39:51ForumUpdaterBotNew thread by Alexeypetrushin: `sleep_async` behaves as if it's blocking, strange, see https://forum.nim-lang.org/t/7700
15:16:18*sacredfrog quit (Quit: ZNC 1.8.2 - https://znc.in)
15:16:56*sacredfrog joined #nim
15:27:03*Vladar quit (Quit: Leaving)
15:31:05*PMunch quit (Quit: leaving)
15:52:19Oddmongerwith nim+vim+ale, i often get fake errors when accessing a member of object
15:52:54Oddmongerfor a strange reason the lsp thinks sometimes i want to call a function, instead of accessing a member
15:53:35Oddmongeryou know, the sugar syntax like « x.foo() » for calling « foo(x) »
15:54:42Oddmonger(the correct term has slipped my mind)
15:55:15leorizenim check is not the best tool atm, sadly
15:56:08Oddmongerwell it's a nice effort anyway… but sometimes i have to save my session (:mksession) and the reopen it and *poof* no more errors
15:57:11Oddmongeri can't resolve to switch to vscode which has a lot of disadvantages for me
15:57:32Oddmongerbut i'm afraid that the nim support is better on vscode :/
15:57:49leorizeif you're using zah/nim.vim, then yes, vscode is better
15:58:17leorizeif you're using nim.nvim, then you only miss out on functions that ale provides
16:00:52Oddmongerthis one : Plug 'alaviss/nim.nvim'
16:03:03leorizethen you're enjoying one of the top editor integration
16:03:10leorizebut I'm very biased since I wrote that one :P
16:03:19Oddmongerhehe
16:04:10FromDiscord<Mustache Man> Hey all, I'm just getting started with Nim. I have some questions if this is the right place to ask
16:04:23leorizeyou're in the right place
16:04:29giaco__I'm running nim 1.4.4 and I'm trying zip/zipfiles module, but it is complaining "could not load: libzip(|2).so(|.4|.2|.1|.0)". A quick locate on my ubuntu LTS box finds /usr/lib/x86_64-linux-gnu/libzip.so.5
16:06:01leorizegiaco__: you should use zippy instead, which is a native implementation of the zip format in nim
16:06:08FromDiscord<Mustache Man> I'm trying to filter a sequence using sequtils and sugar. Using vscode and Nim 0.6.6 plug-in.
16:07:09FromDiscord<Mustache Man> i don't understand why i'm seeing this message https://media.discordapp.net/attachments/371759389889003532/824675780725440522/unknown.png
16:07:16giaco__leorize: thanks!
16:08:23leorize@Mustache you will have to compile your program to get the full message
16:08:39leorizeeditor integration is still spotty regrading these messages
16:09:23FromDiscord<Mustache Man> ah, then i get Error: expression 'newSeq(Natural(0))' has no type (or is ambiguous)
16:11:00leorizestill on that line?
16:11:05leorizethen probably a sequtils bug
16:11:24FromDiscord<Mustache Man> yeah on that line, character 13
16:14:26giaco__I'm using this module, but it says "error: undeclared identifier: 'random'" https://github.com/euantorano/tempdir.nim/blob/master/src/tempdir.nim
16:14:27leorizetry c.timers = c.timers.filterIt().mapIt()
16:15:00giaco__on line 39
16:15:14euantoranogiaco__: Which version of Nim?
16:15:22euantorano(author of library here)
16:15:37euantorano`random` is a core Nim module: https://nim-lang.org/docs/random.html
16:15:53leorize@Mustache though I would not recommend usage of those for functional programming :P
16:16:14giaco__euantorano: nim 1.4.4
16:16:23euantoranoit looks like the function is now called `rand` rather than `random`
16:16:41leorizerandom has been deprecated since 1.0 iirc
16:17:41euantoranoif it has, there's no deprecation notice in the docs 🤷
16:17:52FromDiscord<Mustache Man> In reply to @leorize "@Mustache though I would": you would recommend against sequtil? i'm not looking to assign the value, i just want to invoke a function when the timer ends
16:18:34*Gustavo6046 joined #nim
16:18:34narimiraneuantorano: https://nim-lang.org/1.2.0/random.html#random,int ;)
16:18:37euantoranogiaco__: Issue created, patching now: https://github.com/euantorano/tempdir.nim/issues/1
16:19:03giaco__I've replaced random with sample, just for quick testing
16:19:03euantoranothat would do it, then it's been removed in 1.4
16:19:19narimiraneuantorano: so, it was deprecated since March 1st 2018 ;)
16:19:21*rockcavera joined #nim
16:19:31leorize@Mustache wouldn't a for-loop work better here?
16:19:48FromDiscord<Rika> Maybe a removal notice would be warranted for docs
16:20:00euantoranonarimiran: Last commit was June 2017, so that checks out 🤪
16:21:02FromDiscord<Mustache Man> In reply to @leorize "@Mustache wouldn't a for-loop": maybe, i'm just more used to this paradigm. but i'll also have to remove the timers from the sequence as they expire
16:23:41leorizehttps://play.nim-lang.org/#ix=2U41 <- try something like this
16:25:22leorizethis way, your filter + callback happens in one loop
16:27:06FromDiscord<Mustache Man> yes, that works. and i can return the un-expired timers to reassign to c.timers
16:27:20FromDiscord<Mustache Man> thank you!
16:30:10leorizeyou're welcome
16:36:23giaco__by default vscode wants me to indent 2 spaces when working with nim files. Is this the way to go, I prefer 4
16:37:17FromDiscord<Rika> its the default
16:37:20FromDiscord<Rika> you can always change it
16:42:02euantoranogiaco__: Version 1.0.1 of tempdir released, should now work. Updated tests to target 1.2.0 and latest too.
16:47:41FromDiscord<zajrik> @giaco I prefer 4 spaces as well. You can safely use 4 without any compiler problems, you just won't be following the Nim standard
16:47:50FromDiscord<zajrik> Gotta be a rebel sometimes
16:48:34FromDiscord<Rika> hey its a standard nim literally has features that allow you to break the standard (style insensitivity)
16:52:56*leorize quit (Remote host closed the connection)
16:53:31*leorize joined #nim
16:56:40FromDiscord<zajrik> oof yeah
16:56:48FromDiscord<zajrik> that actually bothers me sometimes
16:57:17FromDiscord<zajrik> I had identifier case-insensitivity throw me off earlier lol
16:57:39FromDiscord<zetashift> The first letter is always case sensitive though
16:58:20giaco__euantorano: got it! Thanks for the update
17:09:58FromDiscord<Mustache Man> i am stuck again 😞 https://play.nim-lang.org/#ix=2U4j
17:10:38FromDiscord<Rika> need to add the field names
17:11:01FromDiscord<Rika> Timer(callback: p, startAt: c.time, endAt: c.time + timeToEnd)
17:11:25FromDiscord<Rika> also line 35 `for i in 0...20:` is this right? there's no ... proc is there?
17:12:29FromDiscord<Mustache Man> oh oops, i'll make that change and get a new code to share
17:12:32*lritter quit (Ping timeout: 260 seconds)
17:13:01FromDiscord<Mustache Man> https://play.nim-lang.org/#ix=2U4k
17:13:08FromDiscord<Rika> if youre asking about `type mismatch: got <proc (){.closure.}> but expected 'proc (){.closure, noSideEffect.}'` its exactly as said
17:13:40FromDiscord<Rika> `p: () -> void` is not a `{.noSideEffect.}` proc (idk how to attach pragmas to sugar syntax, maybe the same way)
17:14:10FromDiscord<Mustache Man> hmm yes, that's what i was unsure of. or what's the alternative syntax that doesn't need sugar?
17:14:30FromDiscord<Rika> `p: proc () {.noSideEffect.}`
17:15:32FromDiscord<Mustache Man> got it, thanks!
17:16:51*tane joined #nim
17:18:39FromDiscord<Mustache Man> ah echo is a side effect xD well i've removed the nosideeffect and it all works now!
17:18:51*YovelKey-Cohen[m quit (*.net *.split)
17:18:51*Stephen[m]2 quit (*.net *.split)
17:18:51*liblq-dev quit (*.net *.split)
17:18:51*lnxw37d4 quit (*.net *.split)
17:18:51*crem quit (*.net *.split)
17:18:54*so quit (*.net *.split)
17:18:54*shashlick quit (*.net *.split)
17:18:54*D_ quit (*.net *.split)
17:18:54*Ekho quit (*.net *.split)
17:18:54*casaca quit (*.net *.split)
17:18:55*mal`` quit (*.net *.split)
17:18:55*blueberrypie quit (*.net *.split)
17:18:55*grobe0ba quit (*.net *.split)
17:18:55*dom96 quit (*.net *.split)
17:18:55*voidpi quit (*.net *.split)
17:18:55*ee7[m] quit (*.net *.split)
17:18:55*k0mpjut0r quit (*.net *.split)
17:18:55*rwiser[m] quit (*.net *.split)
17:18:55*qwr quit (*.net *.split)
17:18:55*euantorano quit (*.net *.split)
17:18:55*gangstacat quit (*.net *.split)
17:18:55*koltrast quit (*.net *.split)
17:18:55*blitzworks quit (*.net *.split)
17:18:56*blackpawn quit (*.net *.split)
17:18:56*revere quit (*.net *.split)
17:18:56*ForumUpdaterBot quit (*.net *.split)
17:18:56*shodan45 quit (*.net *.split)
17:18:56*xace quit (*.net *.split)
17:18:56*tribly quit (*.net *.split)
17:19:01*qwr_ joined #nim
17:19:05*shodan45 joined #nim
17:19:06*ForumUpdaterBot joined #nim
17:19:06*D__ joined #nim
17:19:06*casaca joined #nim
17:19:07*euantorano joined #nim
17:19:08*grobe0ba joined #nim
17:19:11*voidpi joined #nim
17:19:14*blueberrypie joined #nim
17:19:15*crem joined #nim
17:19:16*xace joined #nim
17:19:21*revere joined #nim
17:19:35*gangstacat joined #nim
17:19:36*dom96 joined #nim
17:19:41*dom96 quit (Changing host)
17:19:41*dom96 joined #nim
17:19:42*tribly joined #nim
17:19:50*so joined #nim
17:20:08*shashlick joined #nim
17:20:26*vicfred quit (Quit: Leaving)
17:20:35*unclechu quit (*.net *.split)
17:20:35*drbixx[m] quit (*.net *.split)
17:20:35*nxnl[m] quit (*.net *.split)
17:20:35*Simon[m]4 quit (*.net *.split)
17:20:35*Benjamin[m]2 quit (*.net *.split)
17:20:36*FromGitter quit (*.net *.split)
17:20:36*teasea quit (*.net *.split)
17:20:36*jxy quit (*.net *.split)
17:20:45*koltrast joined #nim
17:20:56*teasea joined #nim
17:20:57*jxy joined #nim
17:20:58*FromGitter joined #nim
17:21:13*blackpawn joined #nim
17:21:26FromDiscord<Rika> echo is a side effect as printing to stdout is IO
17:21:26*GitterIntegratio quit (Ping timeout: 240 seconds)
17:21:35*leorize[m] quit (Ping timeout: 240 seconds)
17:21:54*mal`` joined #nim
17:21:55*Clonkk[m] quit (Ping timeout: 240 seconds)
17:21:56*stisa quit (Ping timeout: 240 seconds)
17:21:57*fbpyr[m] quit (Ping timeout: 244 seconds)
17:21:57*antholop[m] quit (Ping timeout: 244 seconds)
17:22:14*Zoom[m] quit (Ping timeout: 258 seconds)
17:22:14*ShalokShalom[m] quit (Ping timeout: 258 seconds)
17:22:35*reversem3 quit (Ping timeout: 240 seconds)
17:22:35*watzon quit (Ping timeout: 240 seconds)
17:22:37*j-james[m] quit (Ping timeout: 258 seconds)
17:22:48*pycoder[m] quit (Ping timeout: 268 seconds)
17:22:56*Avatarfighter[m] quit (Ping timeout: 240 seconds)
17:22:59*BitPuffin quit (Ping timeout: 244 seconds)
17:22:59*i_use_arch_btw[m quit (Ping timeout: 244 seconds)
17:23:00*sekao[m] quit (Ping timeout: 258 seconds)
17:23:00*jfondren[m] quit (Ping timeout: 258 seconds)
17:23:23*Avahe[m] quit (Ping timeout: 258 seconds)
17:25:20*Ekho joined #nim
17:25:50*MTRNord quit (Ping timeout: 264 seconds)
17:28:20ForumUpdaterBotNew Nimble package! parsegemini - Library for parsing text/gemini, see https://github.com/autumngray/parsegemini
17:41:34*Gustavo6046_ joined #nim
17:41:55*Gustavo6046 quit (Ping timeout: 268 seconds)
17:41:55*Gustavo6046_ quit (Remote host closed the connection)
17:42:08*FromGitter quit (*.net *.split)
17:42:08*grobe0ba quit (*.net *.split)
17:42:08*rockcavera quit (*.net *.split)
17:42:08*sacredfrog quit (*.net *.split)
17:42:08*haxscramper quit (*.net *.split)
17:42:08*hyiltiz quit (*.net *.split)
17:42:09*zedeus quit (*.net *.split)
17:42:09*Lord_Nightmare quit (*.net *.split)
17:42:09*kinkinkijkin quit (*.net *.split)
17:42:09*vqrs quit (*.net *.split)
17:42:09*robertmeta quit (*.net *.split)
17:42:09*ormiret quit (*.net *.split)
17:42:09*kwilczynski quit (*.net *.split)
17:42:09*mal`` quit (*.net *.split)
17:42:10*narimiran quit (*.net *.split)
17:42:10*Tlanger quit (*.net *.split)
17:42:10*Q-Master quit (*.net *.split)
17:42:10*FromDiscord quit (*.net *.split)
17:42:11*aeverr quit (*.net *.split)
17:42:11*zopsi quit (*.net *.split)
17:42:11*kitech1 quit (*.net *.split)
17:42:11*dgb_ quit (*.net *.split)
17:42:11*Onionhammer quit (*.net *.split)
17:42:11*sknebel quit (*.net *.split)
17:42:11*asdflkj quit (*.net *.split)
17:42:11*Northstrider[m] quit (*.net *.split)
17:42:12*skelett quit (*.net *.split)
17:42:12*Adeon quit (*.net *.split)
17:42:12*blackbeard420 quit (*.net *.split)
17:42:12*cornfeedhobo quit (*.net *.split)
17:42:12*xet7 quit (*.net *.split)
17:42:12*mahlon quit (*.net *.split)
17:42:13*acidx quit (*.net *.split)
17:42:13*ddevault quit (*.net *.split)
17:42:13*Araq quit (*.net *.split)
17:42:13*ldlework quit (*.net *.split)
17:42:13*jken quit (*.net *.split)
17:42:13*lain quit (*.net *.split)
17:42:13*clemens3 quit (*.net *.split)
17:42:13*junland quit (*.net *.split)
17:42:14*xace quit (*.net *.split)
17:42:14*voidpi quit (*.net *.split)
17:42:14*arecaceae quit (*.net *.split)
17:42:15*conkker quit (*.net *.split)
17:42:15*deepend quit (*.net *.split)
17:42:15*Oddmonger quit (*.net *.split)
17:42:15*bozaloshtsh quit (*.net *.split)
17:42:15*mfiano quit (*.net *.split)
17:42:15*EastByte quit (*.net *.split)
17:42:17*hyiltiz_ joined #nim
17:42:18*^Q-Master^ joined #nim
17:42:20*jken joined #nim
17:42:23*haxscramper joined #nim
17:42:26*acidx joined #nim
17:42:26*acidx quit (Changing host)
17:42:26*acidx joined #nim
17:42:28*mfiano joined #nim
17:42:31*Oddmonger joined #nim
17:42:31*Onionhammer joined #nim
17:42:32*kitech1 joined #nim
17:42:34*kitech1 quit (Changing host)
17:42:34*kitech1 joined #nim
17:42:36*xace joined #nim
17:42:37*sacredfrog joined #nim
17:42:37*voidpi joined #nim
17:42:39*arecaceae joined #nim
17:42:39*junland joined #nim
17:42:40*skelett1 joined #nim
17:42:40*FromDiscord joined #nim
17:42:40*wasted_youth2 quit (Read error: Connection reset by peer)
17:42:51*dgb_ joined #nim
17:42:54*zedeus joined #nim
17:42:54*kinkinkijkin joined #nim
17:42:54*robertmeta joined #nim
17:42:55*bozaloshtsh joined #nim
17:42:56*FromGitter joined #nim
17:42:59*ormiret joined #nim
17:43:02*zopsi joined #nim
17:43:02*xet7 joined #nim
17:43:03*ldlework joined #nim
17:43:05*rockcavera joined #nim
17:43:06*wasted_youth2 joined #nim
17:43:14*Adeon joined #nim
17:43:14*lain joined #nim
17:43:16*asdflkj joined #nim
17:43:16*EastByte joined #nim
17:43:18*robertmeta quit (Changing host)
17:43:18*robertmeta joined #nim
17:43:18*robertmeta quit (Changing host)
17:43:18*robertmeta joined #nim
17:43:18*zedeus quit (Changing host)
17:43:18*zedeus joined #nim
17:43:23*Araq joined #nim
17:43:38*lain is now known as Guest49079
17:43:41*bozaloshtsh quit (Changing host)
17:43:41*bozaloshtsh joined #nim
17:43:53*mahlon joined #nim
17:43:55*clemens3_ joined #nim
17:44:00*grobe0ba joined #nim
17:44:02*vqrs joined #nim
17:44:02*kwilczynski joined #nim
17:44:05*Tlangir joined #nim
17:44:06*narimiran joined #nim
17:44:10*sknebel joined #nim
17:44:17*blackbeard420 joined #nim
17:44:20*ddevault joined #nim
17:44:20*Gustavo6046 joined #nim
17:44:36*Lord_Nightmare joined #nim
17:44:37*deepend joined #nim
17:44:44*voidpi quit (Client Quit)
17:45:03*d10n-work quit (Ping timeout: 257 seconds)
17:45:22*voidpi joined #nim
17:45:26*npgm quit (Ping timeout: 240 seconds)
17:45:44*Guest49079 is now known as lain
17:45:52*aeverr joined #nim
17:46:06*Northstrider[m] joined #nim
17:46:26*hoek quit (Ping timeout: 240 seconds)
17:46:53*deepend quit (Client Quit)
17:47:20*mal`` joined #nim
17:47:59*deepend joined #nim
17:48:08*npgm joined #nim
17:49:00*d10n-work joined #nim
17:50:10*hoek joined #nim
17:55:11*Avatarfighter[m] joined #nim
17:57:26*JStoker quit (*.net *.split)
17:57:26*Prestige quit (*.net *.split)
17:57:26*joast quit (*.net *.split)
17:57:26*GreaseMonkey quit (*.net *.split)
17:57:26*nisstyre quit (*.net *.split)
17:57:26*giaco__ quit (*.net *.split)
17:57:26*saem quit (*.net *.split)
17:57:26*astronavt___ quit (*.net *.split)
17:57:26*notchris quit (*.net *.split)
17:57:26*beatmox quit (*.net *.split)
17:57:26*surma quit (*.net *.split)
17:57:35*JStoker joined #nim
17:57:37*greaser|q joined #nim
17:57:38*beatmox- joined #nim
17:57:46*nisstyre joined #nim
17:57:47*astronavt joined #nim
17:57:52*Prestige joined #nim
17:57:54*notchris joined #nim
17:58:02*surma joined #nim
17:58:03*saem joined #nim
17:58:09*gangstacat quit (*.net *.split)
17:58:09*Lura quit (*.net *.split)
17:58:09*l1x quit (*.net *.split)
17:58:09*timdorohin quit (*.net *.split)
17:58:09*ehmry quit (*.net *.split)
17:58:09*pbb quit (*.net *.split)
17:58:09*ebb quit (*.net *.split)
17:58:10*rayman22201 quit (*.net *.split)
17:58:10*nikki93 quit (*.net *.split)
17:58:10*zielmicha__ quit (*.net *.split)
17:58:10*hpyc9 quit (*.net *.split)
17:58:10*sirn quit (*.net *.split)
17:58:10*qwertfisch quit (*.net *.split)
17:58:10*Yardanico quit (*.net *.split)
17:58:10*raboof quit (*.net *.split)
17:58:10*fowl quit (*.net *.split)
17:58:21*Yardanico joined #nim
17:58:22*SunDwarf joined #nim
17:58:24*ebb joined #nim
17:58:25*zielmicha__ joined #nim
17:58:26*rayman22201 joined #nim
17:58:27*fowl joined #nim
17:58:30*hpyc9 joined #nim
17:58:32*nikki93 joined #nim
17:58:33*sirn joined #nim
17:58:35*pbb joined #nim
17:58:36*qwertfisch joined #nim
17:58:42*gangstacat joined #nim
17:58:43*l1x joined #nim
17:58:49*raboof joined #nim
17:59:10*timdorohin joined #nim
17:59:28*ehmry joined #nim
17:59:29*giaco__ joined #nim
17:59:43*teasea quit (*.net *.split)
17:59:43*so quit (*.net *.split)
17:59:43*tribly quit (*.net *.split)
17:59:44*fputs quit (*.net *.split)
17:59:44*Cthalupa quit (*.net *.split)
17:59:44*shmorgle quit (*.net *.split)
17:59:44*WilhelmVonWeiner quit (*.net *.split)
17:59:44*cyraxjoe quit (*.net *.split)
17:59:44*pauwel_k1ak quit (*.net *.split)
17:59:44*def- quit (*.net *.split)
17:59:44*d10n quit (*.net *.split)
17:59:45*CcxWrk quit (*.net *.split)
17:59:45*GaveUp quit (*.net *.split)
17:59:45*Amun_Ra quit (*.net *.split)
17:59:52*pauwel_kwak joined #nim
17:59:52*WilhelmV1nWeiner joined #nim
17:59:53*GaveUp joined #nim
17:59:56*def-- joined #nim
17:59:56*Cthalupa joined #nim
17:59:57*so_ joined #nim
18:00:07*fputs joined #nim
18:00:10*CcxWrk joined #nim
18:00:10*tribly joined #nim
18:00:15*tribly quit (Signing in (tribly))
18:00:15*tribly joined #nim
18:00:19*def-- is now known as def-
18:00:23*teasea joined #nim
18:00:54*cyraxjoe joined #nim
18:00:55*d10n joined #nim
18:00:55*d10n quit (Changing host)
18:00:55*d10n joined #nim
18:03:18*Oddmonger quit (Changing host)
18:03:18*Oddmonger joined #nim
18:03:34FromDiscord<no name fits> There is that debugecho thing if you're testing
18:03:38FromDiscord<Rika> Head broke, understood that as parsege mini
18:03:48*hoek quit (*.net *.split)
18:03:48*deepend quit (*.net *.split)
18:03:49*npgm quit (*.net *.split)
18:03:49*mal`` quit (*.net *.split)
18:03:49*revere quit (*.net *.split)
18:03:49*waleee-cl quit (*.net *.split)
18:03:49*r4vi quit (*.net *.split)
18:03:49*nickster quit (*.net *.split)
18:03:49*sirn quit (*.net *.split)
18:03:49*nikki93 quit (*.net *.split)
18:03:49*l1x quit (*.net *.split)
18:03:49*zielmicha__ quit (*.net *.split)
18:03:49*Prestige quit (*.net *.split)
18:03:50*JStoker quit (*.net *.split)
18:03:50*Avatarfighter[m] quit (*.net *.split)
18:03:50*d10n-work quit (*.net *.split)
18:03:50*Lord_Nightmare quit (*.net *.split)
18:03:50*qwr_ quit (*.net *.split)
18:03:50*Xe quit (*.net *.split)
18:03:50*idxu quit (*.net *.split)
18:03:50*madnight_ quit (*.net *.split)
18:03:50*oprypin quit (*.net *.split)
18:03:50*Jjp137 quit (*.net *.split)
18:04:10*revere joined #nim
18:04:10*deepend joined #nim
18:04:12*nickster joined #nim
18:04:17*waleee-cl joined #nim
18:04:20*r4vi joined #nim
18:04:28*l1x joined #nim
18:04:28*sirn joined #nim
18:04:28*nikki93 joined #nim
18:04:28*zielmicha__ joined #nim
18:04:28*Prestige joined #nim
18:04:28*JStoker joined #nim
18:04:28*Avatarfighter[m] joined #nim
18:04:28*d10n-work joined #nim
18:04:28*Lord_Nightmare joined #nim
18:04:28*qwr_ joined #nim
18:04:28*Xe joined #nim
18:04:28*idxu joined #nim
18:04:28*madnight_ joined #nim
18:04:28*oprypin joined #nim
18:04:28*Jjp137 joined #nim
18:04:38*npgm joined #nim
18:04:49*oprypin quit (Max SendQ exceeded)
18:04:56*oprypin joined #nim
18:04:57*hoek joined #nim
18:05:08*conkker joined #nim
18:05:09*zielmicha__ quit (*.net *.split)
18:05:09*l1x quit (*.net *.split)
18:05:09*sirn quit (*.net *.split)
18:05:09*nikki93 quit (*.net *.split)
18:05:09*Prestige quit (*.net *.split)
18:05:09*JStoker quit (*.net *.split)
18:05:09*Avatarfighter[m] quit (*.net *.split)
18:05:09*d10n-work quit (*.net *.split)
18:05:09*Lord_Nightmare quit (*.net *.split)
18:05:09*qwr_ quit (*.net *.split)
18:05:10*Xe quit (*.net *.split)
18:05:10*idxu quit (*.net *.split)
18:05:10*madnight_ quit (*.net *.split)
18:05:10*Jjp137 quit (*.net *.split)
18:05:17*qwr joined #nim
18:05:18*madnight joined #nim
18:05:20*mal`` joined #nim
18:05:27*Jjp137 joined #nim
18:05:29*idxu joined #nim
18:05:39*Xe joined #nim
18:05:39*Prestige joined #nim
18:05:40*zielmicha__ joined #nim
18:05:59*Lord_Nightmare joined #nim
18:06:12*superbia joined #nim
18:06:18*nikki93 joined #nim
18:06:24*Northstrider[m] quit (*.net *.split)
18:06:24*aeverr quit (*.net *.split)
18:06:24*ddevault quit (*.net *.split)
18:06:24*narimiran quit (*.net *.split)
18:06:24*vqrs quit (*.net *.split)
18:06:24*grobe0ba quit (*.net *.split)
18:06:24*mahlon quit (*.net *.split)
18:06:24*kwilczynski quit (*.net *.split)
18:06:24*asdflkj quit (*.net *.split)
18:06:25*FromGitter quit (*.net *.split)
18:06:25*Adeon quit (*.net *.split)
18:06:25*ormiret quit (*.net *.split)
18:06:25*robertmeta quit (*.net *.split)
18:06:25*koltrast quit (*.net *.split)
18:06:38*koltrast_ joined #nim
18:06:38*vqrs joined #nim
18:06:39*grobe0ba_ joined #nim
18:06:46*ormiret joined #nim
18:06:49*FromGitter joined #nim
18:06:53*narimiran joined #nim
18:06:59*ddevault joined #nim
18:07:00*robertmeta joined #nim
18:07:01*JStoker joined #nim
18:07:04*Adeon joined #nim
18:07:07*grobe0ba_ is now known as grobe0ba
18:07:21*kwilczynski joined #nim
18:07:27*asdflkj joined #nim
18:07:52*sirn joined #nim
18:07:58*l1x joined #nim
18:08:05*mahlon joined #nim
18:08:56*Avatarfighter[m] joined #nim
18:10:22*aeverr joined #nim
18:10:28*leorize quit (*.net *.split)
18:13:18giaco__What's wrong with "let myDirContents = walkDir(myDir).items" ?
18:14:03giaco__I'm receiving"Error: attempting to call routine: 'walkDir", found 'os.walkDir(dir: string, relative: bool, checkDir: bool) of type 'iterator'
18:14:31*Northstrider[m] joined #nim
18:15:12FromDiscord<dk> the `.items`
18:15:33FromDiscord<dk> `let myDirContents = toSeq walkDir(myDir)` should work
18:15:39FromDiscord<dk> but `import sequtils`
18:16:10*NimBot joined #nim
18:16:14*crem joined #nim
18:16:15giaco__I thinkg I've misread the doc
18:16:15*revere joined #nim
18:16:17*literal_ joined #nim
18:16:20*spiderstew joined #nim
18:16:20*oz joined #nim
18:16:20*stefantalpalaru joined #nim
18:16:21*blackpawn joined #nim
18:16:21*tane joined #nim
18:16:34*mids joined #nim
18:16:41*letto joined #nim
18:16:42*ForumUpdaterBot joined #nim
18:16:43*teiresias joined #nim
18:16:43*ozzz joined #nim
18:16:56*kaliy joined #nim
18:16:58*mids quit (Changing host)
18:16:58*mids joined #nim
18:16:58*mids quit (Changing host)
18:16:58*mids joined #nim
18:17:04*teiresias quit (Changing host)
18:17:04*teiresias joined #nim
18:17:06*euantorano joined #nim
18:17:09*njoseph joined #nim
18:17:11*casaca joined #nim
18:17:17*euantorano quit (Changing host)
18:17:17*euantorano joined #nim
18:17:17*Kaivo joined #nim
18:17:27*mwbrown joined #nim
18:17:29*rockcavera joined #nim
18:17:30*D_ joined #nim
18:17:44*shashlick joined #nim
18:17:49*antranigv joined #nim
18:17:49*federico3 joined #nim
18:17:50*Mister_Magister joined #nim
18:18:23*shodan45 joined #nim
18:18:25giaco__dk, toSeq walkDir(myDir) return same error
18:18:31*fredsted joined #nim
18:18:41*dom96 joined #nim
18:18:41*dom96 quit (Changing host)
18:18:41*dom96 joined #nim
18:19:17*dddddd joined #nim
18:19:46*d10n-work joined #nim
18:20:54FromDiscord<dk> `import sequtils, os; echo toSeq walkDir("/home")` works for me
18:21:05FromDiscord<dk> at least compiles
18:21:18*jxy joined #nim
18:22:10*stefantalpalaru quit (Changing host)
18:22:10*stefantalpalaru joined #nim
18:24:33giaco__dk, if I do "for f in walkDir(myDir): echo f" it works, if I do "let foo = toSeq(walkDir(myDir))" it doesn't: Error: attempting to call routine: 'walkDir'
18:26:10FromDiscord<dk> I have no idea
18:28:03*Ekho joined #nim
18:28:41*Avatarfighter[m] quit (Ping timeout: 245 seconds)
18:32:47giaco__dk, I've found the culprit but is even more strage. I have to remove "import xlsx" from top of the file, even if I don't yet call any function of that module
18:33:02giaco__and the error doesn't mention that module
18:33:49giaco__and "https://github.com/xflywind/xlsx/search?q=walkDir" returns nothing
18:34:06*joast joined #nim
18:37:19*leorize joined #nim
18:39:35giaco__yeah, that module must be doing something wrong: https://play.nim-lang.org/#ix=2U4z
18:41:52FromDiscord<no name fits> why is it so hard to find a book on how to design web server software, and not a book on how to use web server software 😕
18:47:32FromDiscord<zajrik> Oh, weird. Last time I tried using a caseStmtMacro (pattern matching, specifically), it was erroring when attempting to treat it as an expression but now it's working
18:47:34FromDiscord<zajrik> :Thonk:
18:48:32FromDiscord<zajrik> (edit) "specifically)," => "specifically) as an expression," | removed "when attempting to treat it as an expression"
18:48:40FromDiscord<zajrik> I wonder if I'm just misremembering
18:52:36*Avatarfighter[m] joined #nim
19:06:41*Kaivo quit (Quit: WeeChat 3.0.1)
19:07:12*Kaivo joined #nim
19:08:32FromDiscord<haxscramper> you need to have an `else` branch, because internally it generates series of `if/elif/else`
19:08:41FromDiscord<haxscramper> there is no exhaustiveness check
19:09:23FromDiscord<haxscramper> so explicit `else` is required
19:17:28*fredrikhr joined #nim
19:19:56FromDiscord<zajrik> I'm 90% certain I had an explicit `else` branch at the time that it was giving me errors
19:20:21FromDiscord<zajrik> but I can't recall exactly if there were any other differences between what the case macro looked like then vs what it looks like now
19:21:53FromDiscord<zajrik> When I encountered the error I resolved to just use `return`s in my case branches but I decided to check again to see if I could figure out how to make it work and it just worked after I removed the `return`s
19:21:54FromDiscord<zajrik> ¯\_(ツ)_/¯
19:23:30FromDiscord<zajrik> I just assumed at the time that the pattern matching case statement macro didn't work as an expression and I was out of luck
19:24:14FromDiscord<zajrik> You know how it is with macro/template errors. They tend to be pretty unhelpful lol
19:26:59*MTRNord joined #nim
19:26:59*k0mpjut0r joined #nim
19:26:59*unclechu joined #nim
19:27:00*Benjamin[m]11 joined #nim
19:27:00*jfondren[m] joined #nim
19:27:00*Avahe[m] joined #nim
19:27:00*i_use_arch_btw[m joined #nim
19:27:00*reversem3 joined #nim
19:27:00*GitterIntegratio joined #nim
19:27:00*Clonkk[m] joined #nim
19:27:00*j-james[m] joined #nim
19:27:01*watzon joined #nim
19:27:01*antholop[m] joined #nim
19:27:01*fbpyr[m] joined #nim
19:27:01*leorize[m] joined #nim
19:27:01*lnxw37d4 joined #nim
19:27:01*BitPuffin joined #nim
19:27:01*liblq-dev joined #nim
19:27:01*stisa joined #nim
19:27:05*sekao[m] joined #nim
19:27:06*ee7[m] joined #nim
19:27:06*Stephen[m]1 joined #nim
19:27:06*nxnl[m] joined #nim
19:27:06*YovelKey-Cohen[m joined #nim
19:27:06*Zoom[m] joined #nim
19:27:07*ShalokShalom[m] joined #nim
19:27:07*pycoder[m] joined #nim
19:27:11*Simon[m]7 joined #nim
19:27:37*rwiser[m] joined #nim
19:27:37*drbixx[m] joined #nim
19:33:03*Amun_Ra joined #nim
20:13:05*superbia quit (Quit: WeeChat 3.1)
20:14:18*superbia joined #nim
20:23:10FromDiscord<dk> is there any workaround for `std/json` not properly supporting tuples, other than creating a type for every tuple type I use?
20:24:21leorizeuse objects :p
20:24:48FromDiscord<dk> but I want to serialize proc args
20:24:52FromDiscord<dk> :^(
20:25:21leorizethen wouldn't an object be an excellent typed container?
20:26:52FromDiscord<dk> tuple is more convenient because I can inline it in the template call https://media.discordapp.net/attachments/371759389889003532/824741144881528892/unknown.png
20:29:43FromDiscord<dk> I guess I can declare a new object type in the implementation, based on the tuple type
20:29:57FromDiscord<dk> that's fugly but should work
20:30:14leorizewouldn't taking a proc prototype generate better-looking code?
20:30:30FromDiscord<dk> I wanted to avoid macros
20:30:37FromDiscord<dk> this is just a template
20:31:10leorizehttps://play.nim-lang.org/#ix=2U4Z
20:31:49leorizedon't stress the templating system too much then :P
20:34:43leorizeat one point I'd recommend using the macro system, they're just much more pleasant to work with
20:35:03FromDiscord<dk> there's no way to do this without macros when the number of args is different for each proc
20:35:12*narimiran quit (Ping timeout: 252 seconds)
20:35:45FromDiscord<dk> other than what I was trying to do
20:37:25leorizefrom my uneducated guess I'd say you can write this easier if you use macros
20:37:31leorizebut I'm not sure what you're doing :P
20:39:22FromDiscord<dk> this can barely get any easier https://media.discordapp.net/attachments/371759389889003532/824744289925464134/unknown.png
20:39:42FromDiscord<dk> it would be a shame to make it into a messy macro
20:40:05FromDiscord<dk> I'll just use third party json library
20:48:04*teiresias quit (Quit: ZNC - https://znc.in)
20:48:35*teiresias joined #nim
20:49:03*haxscramper quit (Remote host closed the connection)
20:50:49*Gustavo6046 quit (Read error: Connection reset by peer)
20:53:37*Gustavo6046 joined #nim
20:59:12*blueberrypie joined #nim
21:09:04FromDiscord<zajrik> is there some sort of package identifier that represents the root of the project for importing files in your project? I really don't care for relative pathing in imports like `import ../foo`, I'd much rather be able to do like `import package/foo` but I wasn't able to find any documentation that suggests something like this exists
21:18:02leorizeit doesn't exist, unfortunately
21:23:27FromDiscord<zajrik> Shoot.
21:23:32FromDiscord<zajrik> A man can dream
21:26:10*blitzworks joined #nim
21:28:15FromDiscord<exelotl> @zajrik you can make `import foo` work no matter which subdirectory the current file is in, with the right config: https://github.com/exelotl/natu/blob/master/examples/hello_world/config.nims#L38
21:30:15FromDiscord<zajrik> hmm
21:31:23FromDiscord<zajrik> Not quite sure I understand how that works lol
21:31:46*kaliy quit (Ping timeout: 240 seconds)
21:32:26FromDiscord<no name fits> mood
21:33:16*kaliy joined #nim
21:34:49FromDiscord<zajrik> Okay, so I added `switch "path", projectDir()` to a `config.nims` and threw it in my src dir. It's compiling and it appears to work. It's compiling fine. But it's breaking nimlsp :drakeLUL:
21:35:32FromDiscord<zajrik> (edit) "It's compiling fine." => "I am able to import the files without the need for relative pathing now."
21:36:10leorizenote that would only work if your project is not a library
21:36:28FromDiscord<zajrik> It is not a library 👍
21:36:46*filcuc joined #nim
21:38:41FromDiscord<zajrik> But if it's crashing nimlsp then I can't really work with it so I'm out of luck for now I suppose lol
21:38:57FromDiscord<zajrik> I'm very reliant on editor tooling
21:39:08FromDiscord<zajrik> :bloblaughcry:
21:39:10filcuchow can i return a call with a return value from a macro? https://pastebin.com/bSy2vYEY
21:41:09filcucappending discard before the macro invokation doesn't discard the return value of the "call" injected by the macro
21:44:09*Gustavo6046 quit (Ping timeout: 245 seconds)
21:44:23*pycoder[m] left #nim ("User left")
21:46:03FromDiscord<dk> @filcuc make the macro untyped
21:46:28FromDiscord<dk> I general, do that every time a template/macro returns something funny
21:48:18leorize@filcuc: https://play.nim-lang.org/#ix=2U5r
21:49:00FromDiscord<no name fits> I'm having some choice paralysis
21:52:53leorizewhat are you having difficulty choosing?
21:52:55filcucleorize: dk: thanks
21:53:06FromDiscord<no name fits> how to design a web server
21:53:12filcucbut what's the default then? typed?
21:53:25filcuci mean the default return type for a macro
21:53:47filcucgiven that just specifying untyped as the result type fixed my issue
21:53:51leorizemacro can only return untyped
21:54:06leorize(for now, that is)
21:54:41filcucleorize: then i don't understand the difference between macro foo() and macro foo(): untyped
21:55:00filcucthe second one fixed my issue
21:55:01leorizeit's a bug iirc :P
21:55:07FromDiscord<no name fits> So the standard lib provides the server + the request/response stuff stuff.↵So I'll be implementing routing, templating and data access myself, and there's so many ways to go about it
21:55:15*leorize quit (Remote host closed the connection)
21:55:20filcucdoh
21:55:24filcuc:D
21:55:36FromDiscord<no name fits> I do know I want it to be configurable instead of convention driven
21:55:46*leorize joined #nim
21:59:57FromDiscord<no name fits> but other than that I'm finding it difficult to make design decisions. It's hard to compare something like MVC vs MVVM, because one isn't just "better" than the other
22:27:52*filcuc quit (Quit: Konversation terminated!)
22:38:38*superbia quit (Quit: WeeChat 3.1)
22:41:12*jxy quit (Quit: leaving)
23:01:08ForumUpdaterBotNew thread by Niminem: Chrome Extensions with Nim, who would have thought?, see https://forum.nim-lang.org/t/7701
23:18:04*tane quit (Quit: Leaving)
23:37:06FromDiscord<dk> In reply to @no name fits "So the standard lib": you have karax for templating, ormin for data access, and routing is trivial
23:48:59FromDiscord<no name fits> I'll take a look at how they do things. Since you say routing is trivial, is that because there's a generally agreed upon "best way" of doing it?
23:49:39FromDiscord<no name fits> Because I've seen a few different ways of handling routing
23:52:25FromDiscord<no name fits> @dk
23:56:06FromDiscord<no name fits> Anyway I need to sleep, so please ping if you respond
23:56:34FromDiscord<dk> In reply to @no name fits "Anyway I need to": I think tries are "agreed upon"
23:56:47FromDiscord<dk> but it doesn't really matter if there will be few people visiting your website
23:56:53FromDiscord<dk> and you can change it at any time
23:58:14FromDiscord<no name fits> well I mean in some frameworks you create an object that contains the routes, the order the routes are in, and what they map to. Other ones create the route table based on decorators on the methods/handlers/controllers. I'm talking design-wise
23:58:24FromDiscord<no name fits> I'm having trouble with design decisions
23:59:06FromDiscord<no name fits> And I don't believe there is an objective best in that regard, so I'm trying to figure out what the parameters are that I'm comparing against