00:10:29 | FromDiscord | <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:39 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/nimc.html |
00:12:59 | FromDiscord | <ElegantBeef> That gives a vast majority of options |
00:15:34 | FromDiscord | <Tristan> I think this is what I was looking for 🤦♂️ https://nim-lang.org/docs/nimc.html#additional-compilation-switches |
00:15:55 | FromDiscord | <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:23 | xiangv | so |
02:36:57 | FromDiscord | <Rika> ? |
02:39:34 | xiangv | could someone send some nim-lang project that is on github |
02:40:53 | FromDiscord | <Rika> just search `language:nim` on github? |
02:43:31 | xiangv | I mean,some project that used or created by famous company, like feacbook, google |
02:44:55 | FromDiscord | <Yardanico> we don't have nim projects created by feacbook [sic!] sadly |
02:45:55 | FromDiscord | <Yardanico> also, why did you use https://www.compart.com/en/unicode/U+FF0C instead of a normal comma? :D |
02:46:26 | FromDiscord | <Rika> might be a language thing |
02:46:31 | FromDiscord | <Rika> IME thing i mean |
02:50:05 | xiangv | my native language (not english)input software outputs |
03:37:25 | FromDiscord | <Rika> what the heck? i can access outside bounds of my array??? i dont know how to minimise this |
03:39:12 | leorize | are you on -d:danger? |
03:41:26 | FromDiscord | <Rika> oh yeah |
03:41:28 | FromDiscord | <Rika> makes sense |
03:41:38 | FromDiscord | <Rika> but odd that x[0] is not == the actual contents |
03:41:58 | leorize | you should never use -d:danger unless you're benchmarking |
03:42:17 | FromDiscord | <Rika> which i am |
03:42:31 | leorize | what are you making? :P |
03:42:48 | FromDiscord | <Rika> nothing important enough to benchmark actually |
03:43:02 | FromDiscord | <Rika> ignoring the index oob issue |
03:43:12 | FromDiscord | <Rika> x[0] != what x prints when echoed |
03:43:42 | FromDiscord | <Rika> ah |
03:43:52 | FromDiscord | <Rika> okay nevermind |
03:44:08 | leorize | -d:danger is dangerous I guess :P |
03:44:16 | FromDiscord | <Rika> okay wait |
03:44:28 | FromDiscord | <Rika> on d:release now |
03:44:44 | FromDiscord | <Rika> x[-1] on an array[1, T] doesnt seem to oob |
03:44:54 | FromDiscord | <Rika> instead just exiting with nonzero status code |
03:45:03 | FromDiscord | <Rika> oh wait i forgot |
03:45:12 | FromDiscord | <Rika> okay okay i forgot to unset something let me see again |
03:45:47 | FromDiscord | <Rika> yeah okay |
03:46:27 | FromDiscord | <Rika> i wish i could use a prover |
03:47:23 | leorize | prover? |
03:48:03 | FromDiscord | <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:50 | leorize | those stuff are great but I wouldn't say that they are easy to master :P |
03:49:47 | FromDiscord | <Rika> well of course but it really feels like it beats this shit for me |
03:50:26 | leorize | writing tests is the best way to do things rn |
03:50:57 | FromDiscord | <Rika> i already have tests aaaaaa |
03:51:02 | FromDiscord | <Rika> need more coverage ig |
03:51:25 | FromDiscord | <Rika> and testing internals actually i dont test that hm |
03:51:41 | FromDiscord | <ElegantBeef> Wait you can test code? 😄 |
03:51:49 | FromDiscord | <Rika> are assertions off on release or only dangere |
03:52:02 | leorize | only danger atm |
03:52:18 | FromDiscord | <ElegantBeef> It depends on if you did `assert` or `doAssert` though |
03:52:21 | leorize | nothing stop you from `-d:release --assertions:off` though (in fact I recommend it) |
03:53:06 | FromDiscord | <Rika> i mean assert not doassert |
03:53:09 | FromDiscord | <Rika> so yeah |
03:53:12 | FromDiscord | <Rika> okay |
03:53:33 | FromDiscord | <ElegantBeef> As usual just giving some extra information no one asked for 😄 |
03:53:37 | FromDiscord | <ElegantBeef> Me that is |
03:53:45 | FromDiscord | <Rika> xd |
03:53:49 | FromDiscord | <Rika> congrats |
03:54:10 | FromDiscord | <Rika> i didnt know that compile time bounds checking was also off for danger |
03:54:15 | FromDiscord | <Rika> thought only runtime |
03:54:25 | FromDiscord | <Yardanico> ?? |
03:54:38 | leorize | now that sounds like a bug |
03:54:39 | FromDiscord | <Yardanico> danger does not affect compile time checks |
03:54:43 | FromDiscord | <Rika> it does?? |
03:54:57 | FromDiscord | <Rika> what the heck then let me see if i fucked something |
03:55:03 | FromDiscord | <Yardanico> can you show an example? |
03:55:13 | FromGitter | <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:01 | leorize | nah, probably just int/cint confusion |
03:56:17 | FromDiscord | <Rika> literally just `let a: array[1, string] = [""]; echo a[1]` |
03:56:24 | FromDiscord | <Rika> compiles just fine on d:danger |
03:56:38 | FromDiscord | <Rika> (i mean it compiles but shouldnt) |
03:56:43 | leorize | @iffy usually it's the type in Nim doesn't match the type in the library that you're interfacing |
03:57:52 | FromDiscord | <Rika> nim devel with hash `6cb26d8010cecf480d909a80e143c168996cfd34` |
03:58:15 | FromGitter | <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:17 | FromDiscord | <Yardanico> !eval let a = [""]; echo a[1] |
03:58:18 | NimBot | Compile failed: /usercode/in.nim(1, 20) Error: index 1 not in 0 .. 0 |
03:58:24 | FromDiscord | <Rika> needs danger |
03:58:29 | FromDiscord | <Yardanico> I'm just testing |
03:58:33 | FromDiscord | <Rika> oh ok |
03:59:53 | leorize | @iffy the .nim file is not matching the .h declarations |
04:00:03 | leorize | though not in any way that could've resulted in your issue... |
04:00:21 | leorize | does your trace point out the line? |
04:00:33 | FromDiscord | <treeform> @iffy, @leorize don't use nimiz, use https://github.com/guzba/zippy instead |
04:00:37 | FromGitter | <iffy> No, when I'm in Android land I get hardly anything |
04:00:58 | FromDiscord | <treeform> zippy is pure nim, supports more features and faster then miniz. |
04:01:22 | FromDiscord | <Rika> wonder how its faster ngl |
04:01:34 | FromGitter | <iffy> I'm happy to try that |
04:01:45 | FromDiscord | <treeform> miniz was not hard to beat, zlib (the main one is though). |
04:02:16 | FromDiscord | <treeform> miniz used a worse algorithm and un-optimized data structures. |
04:02:29 | * | spiderstew_ joined #nim |
04:02:31 | FromDiscord | <treeform> (edit) "one" => "one)" | "though)." => "though." |
04:03:07 | * | spiderstew quit (Ping timeout: 256 seconds) |
04:03:10 | leorize | @iffy if you use termux you can compile with debug on :P |
04:03:39 | FromDiscord | <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:16 | FromGitter | <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:26 | FromDiscord | <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:38 | FromGitter | <iffy> well... actually I'd better go with zippy |
04:05:29 | FromDiscord | <treeform> zlib's deflate algorithm is like for the 80s, you should take advantage of 40 years of theoretical research since then. |
04:05:52 | leorize | looks like we don't have any library for zstd |
04:06:15 | FromDiscord | <Yardanico> In reply to @Rika "(i mean it compiles": This is probably not a bug |
04:06:18 | FromDiscord | <Yardanico> See https://github.com/nim-lang/Nim/issues/14950 |
04:06:47 | FromDiscord | <treeform> we believe snappy algo is "better" then zstd. |
04:06:56 | leorize | Yardanico: uh I don't see how that relate |
04:08:22 | FromDiscord | <Rika> I didn’t expect it though |
04:08:31 | leorize | compile-time bound checking is a safety feature of the language and I don't think should be disable-able |
04:09:59 | FromDiscord | <Yardanico> --boundChecks:off seems to disable bound checks at compile time |
04:10:09 | * | hyiltiz joined #nim |
04:10:12 | leorize | sounds like a bug to me |
04:10:20 | leorize | !eval let a = uint8 65535 |
04:10:21 | NimBot | Compile failed: /usercode/in.nim(1, 15) Error: 65535 can't be converted to uint8 |
04:10:32 | leorize | ^ this stuff doesn't work even if you compile with -d:danger |
04:10:42 | FromDiscord | <Yardanico> yeah you're right in this case |
04:10:46 | FromGitter | <iffy> @treeform: snappy > zstd for speed or compression ratio? or something else? |
04:10:58 | FromGitter | <iffy> (I have no compression algorithm knowledge) |
04:11:55 | FromDiscord | <Yardanico> Seems like it always was the case, it's not a regression |
04:12:36 | FromDiscord | <Yardanico> @Rika you can open an issue if you want, or I can do it myself |
04:12:51 | FromDiscord | <Rika> if you dont mind T_T sorry |
04:12:52 | FromDiscord | <Yardanico> About --boundChecks:off affecting compile time bound checks |
04:13:00 | FromDiscord | <Yardanico> Ah ok |
04:13:10 | FromDiscord | <Rika> i dont know how to word things properly enough lmao |
04:13:18 | leorize | @treeform I'm curious about your assessment of zstd as well |
04:14:33 | FromDiscord | <Yardanico> https://facebook.github.io/zstd/ in this benchmark snappy is slightly faster than zstd but has worse compression ratio |
04:15:18 | FromDiscord | <Yardanico> faster than default zstd settings |
04:16:30 | FromDiscord | <Yardanico> There seems to be a Nim wrapper available at https://github.com/wltsmrz/nim_zstd |
04:17:57 | FromDiscord | <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:19 | FromDiscord | <treeform> While zstd does get higher compression ratio but it goes slower. Very complex algorithm though. |
04:19:44 | FromDiscord | <treeform> Just look at it its only like 400 lines: https://github.com/guzba/supersnappy/blob/master/src/supersnappy.nim |
04:19:47 | FromDiscord | <treeform> its very cool. |
04:20:58 | FromDiscord | <treeform> While zstd is very complex: https://github.com/facebook/zstd/tree/dev/lib many files, confusing things, hard to reason about. |
04:21:46 | FromDiscord | <treeform> I like simple things that work really well in small amount of code. |
04:21:52 | FromDiscord | <treeform> That's why I choose snappy. |
04:22:48 | leorize | it's unfair to compare like that given how facebook's zstd implementation do much more than just compressing |
04:23:58 | FromDiscord | <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:21 | leorize | true :P |
04:24:45 | FromDiscord | <treeform> I like that snappy is tight and simple, I don't like that zstd is bloated and complex. |
04:27:20 | FromDiscord | <Yardanico> https://blog.cloudflare.com/squeezing-the-firehose/ |
04:28:55 | FromDiscord | <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:29 | leorize | I've skimmed through snappy description in it's github repo |
04:29:40 | leorize | it does look very simple compared to zstd's RFC: https://tools.ietf.org/html/rfc8878 |
04:29:58 | leorize | well I suppose there's a limit to how much you can compress with simple algorithms |
04:29:58 | FromDiscord | <Yardanico> I totally agree that snappy is much simpler than zstd |
04:30:15 | FromDiscord | <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:44 | FromDiscord | <treeform> What do you mean its beats it on speed? |
04:30:58 | FromDiscord | <treeform> zstd is better at compression ratio |
04:31:03 | FromDiscord | <treeform> choose which one wins for you |
04:35:46 | leorize | and 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:45 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/issues/17503 |
05:01:53 | FromDiscord | <Yardanico> now lets check the logic in the compiler |
05:02:26 | * | spiderstew_ quit (Ping timeout: 264 seconds) |
05:05:05 | FromDiscord | <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:21 | FromDiscord | <Yardanico> oh, I saw this, yeah |
05:05:38 | FromDiscord | <Yardanico> it's probably a limitation of cosmopolitan, I tried experimenting with illwill and std/terminal but didn't get much success |
05:05:47 | FromDiscord | <ajusa> Ah okay, just checking |
05:06:33 | FromDiscord | <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:30 | ForumUpdaterBot | New Nimble package! rcedit - A new awesome nimble package, see https://github.com/bung87/rcedit |
08:04:57 | ForumUpdaterBot | New 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:58 | ForumUpdaterBot | New thread by Alexeypetrushin: Can't set wild-pattern matching any route in Jester, see https://forum.nim-lang.org/t/7698 |
08:22:22 | FromDiscord | <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:12 | FromDiscord | <haxscramper> > "how the reference part is working"↵By 'reference' you mean `ref` type? |
08:23:26 | FromDiscord | <haxscramper> http://zevv.nl/nim-memory/ |
08:23:36 | FromDiscord | <archiloque> Yes, thanks ! |
08:27:30 | * | fredrikhr joined #nim |
08:29:15 | Clonkk[m] | <FromDiscord "<archiloque> Hello, I'm a Java a"> IN a nutshell, reference are heap allocated pointer managed by the garbage collector. |
08:29:40 | FromDiscord | <ElegantBeef> They're all your objects in java! |
08:29:52 | FromDiscord | <ElegantBeef> Heap allocated and dynamic dispatch supporting |
08:30:54 | FromDiscord | <archiloque> I mean I understand the underlying model, what I'm struggling with is the syntax for the different cases |
08:31:10 | FromDiscord | <archiloque> (edit) "cases" => "cases, but perhaps I just need to come more and I'll get it" |
08:33:23 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2U1W |
08:34:04 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2U1X |
08:34:50 | FromDiscord | <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:22 | FromDiscord | <haxscramper> `reference[]` is for dereferencing |
08:36:25 | FromDiscord | <archiloque> I'm reading the article and the explanations and trying in my code, thanks |
09:04:39 | FromDiscord | <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:13 | saem | Stack allocation |
09:06:28 | FromDiscord | <haxscramper> When you need object to be allocated on stack, or you want to avoid double indirection |
09:06:42 | saem | Or when you want to be able to choose stack vs heap allocation. |
09:06:45 | FromDiscord | <haxscramper> Like `seq[T]` is stored in one block |
09:06:46 | FromDiscord | <mratsim> In reply to @archiloque "I have a more": usually you use a non-ref first |
09:07:58 | FromDiscord | <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:06 | FromDiscord | <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:21 | FromDiscord | <mratsim> so they need ref semantics, you can't copy/duplicate/clone them |
09:10:48 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2U28 |
09:10:54 | FromDiscord | <haxscramper> Which is used quite often |
09:11:04 | ForumUpdaterBot | New thread by Pietroppeter: Using expressions in default values for procedure's parameters, see https://forum.nim-lang.org/t/7699 |
09:11:23 | FromDiscord | <archiloque> Is it a standard practice even if you don't intend to use the `Node` type ? |
09:13:38 | FromDiscord | <ElegantBeef> Nope |
09:13:46 | FromDiscord | <haxscramper> It depends on use case, but sometimes for `ref` type you might need underlying one |
09:13:55 | FromDiscord | <ElegantBeef> It depends on the case |
09:14:03 | FromDiscord | <haxscramper> And if you declared it as `ref T` you have to do `typeof(node[])` |
09:14:22 | FromDiscord | <ElegantBeef> and if you declared just an object you do `new Node` |
09:14:26 | FromDiscord | <archiloque> Thanks |
09:14:30 | FromDiscord | <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:45 | FromDiscord | <haxscramper> If you are not sure about `ref` vs non-ref, or you need both |
09:16:03 | FromDiscord | <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:12 | FromDiscord | <archiloque> (edit) "it" => "it, and now I know" |
09:24:42 | * | PMunch joined #nim |
10:06:02 | * | krux02 joined #nim |
10:12:53 | FromDiscord | <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:41 | FromDiscord | <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:53 | FromDiscord | <haxscramper> i always try to do this |
10:14:59 | FromDiscord | <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:03 | giaco__ | 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:54 | FromDiscord | <Yardanico> you might have success with https://github.com/jangko/nimpdf |
11:33:26 | FromDiscord | <Yardanico> but I'm not sure if it can read PDF files |
11:34:07 | giaco__ | yeah I've already skimmed some docs but seems write only |
11:34:34 | FromDiscord | <Yardanico> then you're out of luck :) |
11:34:45 | FromDiscord | <Yardanico> you can try finding some C library to bind, or write your own solution :P |
11:34:52 | FromDiscord | <Yardanico> or use an existing tool that does it |
11:40:30 | giaco__ | Yardanico: yeah but I was trying tu build a cross platform solution and an external tool make it less appealing to maintain |
11:40:50 | FromDiscord | <Yardanico> no one stops you from shipping that tool with your software |
11:43:13 | giaco__ | yeah but I was trying to use the full nim potential of moving a single file application |
11:43:55 | giaco__ | 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:44 | giaco__ | 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:58 | giaco__ | s/leverate/leverage/ |
14:08:49 | giaco__ | 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:51 | ForumUpdaterBot | New 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:19 | Oddmonger | with nim+vim+ale, i often get fake errors when accessing a member of object |
15:52:54 | Oddmonger | for a strange reason the lsp thinks sometimes i want to call a function, instead of accessing a member |
15:53:35 | Oddmonger | you know, the sugar syntax like « x.foo() » for calling « foo(x) » |
15:54:42 | Oddmonger | (the correct term has slipped my mind) |
15:55:15 | leorize | nim check is not the best tool atm, sadly |
15:56:08 | Oddmonger | well 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:11 | Oddmonger | i can't resolve to switch to vscode which has a lot of disadvantages for me |
15:57:32 | Oddmonger | but i'm afraid that the nim support is better on vscode :/ |
15:57:49 | leorize | if you're using zah/nim.vim, then yes, vscode is better |
15:58:17 | leorize | if you're using nim.nvim, then you only miss out on functions that ale provides |
16:00:52 | Oddmonger | this one : Plug 'alaviss/nim.nvim' |
16:03:03 | leorize | then you're enjoying one of the top editor integration |
16:03:10 | leorize | but I'm very biased since I wrote that one :P |
16:03:19 | Oddmonger | hehe |
16:04:10 | FromDiscord | <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:23 | leorize | you're in the right place |
16:04:29 | giaco__ | 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:01 | leorize | giaco__: you should use zippy instead, which is a native implementation of the zip format in nim |
16:06:08 | FromDiscord | <Mustache Man> I'm trying to filter a sequence using sequtils and sugar. Using vscode and Nim 0.6.6 plug-in. |
16:07:09 | FromDiscord | <Mustache Man> i don't understand why i'm seeing this message https://media.discordapp.net/attachments/371759389889003532/824675780725440522/unknown.png |
16:07:16 | giaco__ | leorize: thanks! |
16:08:23 | leorize | @Mustache you will have to compile your program to get the full message |
16:08:39 | leorize | editor integration is still spotty regrading these messages |
16:09:23 | FromDiscord | <Mustache Man> ah, then i get Error: expression 'newSeq(Natural(0))' has no type (or is ambiguous) |
16:11:00 | leorize | still on that line? |
16:11:05 | leorize | then probably a sequtils bug |
16:11:24 | FromDiscord | <Mustache Man> yeah on that line, character 13 |
16:14:26 | giaco__ | 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:27 | leorize | try c.timers = c.timers.filterIt().mapIt() |
16:15:00 | giaco__ | on line 39 |
16:15:14 | euantorano | giaco__: Which version of Nim? |
16:15:22 | euantorano | (author of library here) |
16:15:37 | euantorano | `random` is a core Nim module: https://nim-lang.org/docs/random.html |
16:15:53 | leorize | @Mustache though I would not recommend usage of those for functional programming :P |
16:16:14 | giaco__ | euantorano: nim 1.4.4 |
16:16:23 | euantorano | it looks like the function is now called `rand` rather than `random` |
16:16:41 | leorize | random has been deprecated since 1.0 iirc |
16:17:41 | euantorano | if it has, there's no deprecation notice in the docs 🤷 |
16:17:52 | FromDiscord | <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:34 | narimiran | euantorano: https://nim-lang.org/1.2.0/random.html#random,int ;) |
16:18:37 | euantorano | giaco__: Issue created, patching now: https://github.com/euantorano/tempdir.nim/issues/1 |
16:19:03 | giaco__ | I've replaced random with sample, just for quick testing |
16:19:03 | euantorano | that would do it, then it's been removed in 1.4 |
16:19:19 | narimiran | euantorano: so, it was deprecated since March 1st 2018 ;) |
16:19:21 | * | rockcavera joined #nim |
16:19:31 | leorize | @Mustache wouldn't a for-loop work better here? |
16:19:48 | FromDiscord | <Rika> Maybe a removal notice would be warranted for docs |
16:20:00 | euantorano | narimiran: Last commit was June 2017, so that checks out 🤪 |
16:21:02 | FromDiscord | <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:41 | leorize | https://play.nim-lang.org/#ix=2U41 <- try something like this |
16:25:22 | leorize | this way, your filter + callback happens in one loop |
16:27:06 | FromDiscord | <Mustache Man> yes, that works. and i can return the un-expired timers to reassign to c.timers |
16:27:20 | FromDiscord | <Mustache Man> thank you! |
16:30:10 | leorize | you're welcome |
16:36:23 | giaco__ | 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:17 | FromDiscord | <Rika> its the default |
16:37:20 | FromDiscord | <Rika> you can always change it |
16:42:02 | euantorano | giaco__: Version 1.0.1 of tempdir released, should now work. Updated tests to target 1.2.0 and latest too. |
16:47:41 | FromDiscord | <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:50 | FromDiscord | <zajrik> Gotta be a rebel sometimes |
16:48:34 | FromDiscord | <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:40 | FromDiscord | <zajrik> oof yeah |
16:56:48 | FromDiscord | <zajrik> that actually bothers me sometimes |
16:57:17 | FromDiscord | <zajrik> I had identifier case-insensitivity throw me off earlier lol |
16:57:39 | FromDiscord | <zetashift> The first letter is always case sensitive though |
16:58:20 | giaco__ | euantorano: got it! Thanks for the update |
17:09:58 | FromDiscord | <Mustache Man> i am stuck again 😞 https://play.nim-lang.org/#ix=2U4j |
17:10:38 | FromDiscord | <Rika> need to add the field names |
17:11:01 | FromDiscord | <Rika> Timer(callback: p, startAt: c.time, endAt: c.time + timeToEnd) |
17:11:25 | FromDiscord | <Rika> also line 35 `for i in 0...20:` is this right? there's no ... proc is there? |
17:12:29 | FromDiscord | <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:01 | FromDiscord | <Mustache Man> https://play.nim-lang.org/#ix=2U4k |
17:13:08 | FromDiscord | <Rika> if youre asking about `type mismatch: got <proc (){.closure.}> but expected 'proc (){.closure, noSideEffect.}'` its exactly as said |
17:13:40 | FromDiscord | <Rika> `p: () -> void` is not a `{.noSideEffect.}` proc (idk how to attach pragmas to sugar syntax, maybe the same way) |
17:14:10 | FromDiscord | <Mustache Man> hmm yes, that's what i was unsure of. or what's the alternative syntax that doesn't need sugar? |
17:14:30 | FromDiscord | <Rika> `p: proc () {.noSideEffect.}` |
17:15:32 | FromDiscord | <Mustache Man> got it, thanks! |
17:16:51 | * | tane joined #nim |
17:18:39 | FromDiscord | <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:26 | FromDiscord | <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:20 | ForumUpdaterBot | New 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:34 | FromDiscord | <no name fits> There is that debugecho thing if you're testing |
18:03:38 | FromDiscord | <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:18 | giaco__ | What's wrong with "let myDirContents = walkDir(myDir).items" ? |
18:14:03 | giaco__ | 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:12 | FromDiscord | <dk> the `.items` |
18:15:33 | FromDiscord | <dk> `let myDirContents = toSeq walkDir(myDir)` should work |
18:15:39 | FromDiscord | <dk> but `import sequtils` |
18:16:10 | * | NimBot joined #nim |
18:16:14 | * | crem joined #nim |
18:16:15 | giaco__ | 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:25 | giaco__ | 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:54 | FromDiscord | <dk> `import sequtils, os; echo toSeq walkDir("/home")` works for me |
18:21:05 | FromDiscord | <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:33 | giaco__ | 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:10 | FromDiscord | <dk> I have no idea |
18:28:03 | * | Ekho joined #nim |
18:28:41 | * | Avatarfighter[m] quit (Ping timeout: 245 seconds) |
18:32:47 | giaco__ | 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:02 | giaco__ | and the error doesn't mention that module |
18:33:49 | giaco__ | 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:35 | giaco__ | yeah, that module must be doing something wrong: https://play.nim-lang.org/#ix=2U4z |
18:41:52 | FromDiscord | <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:32 | FromDiscord | <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:34 | FromDiscord | <zajrik> :Thonk: |
18:48:32 | FromDiscord | <zajrik> (edit) "specifically)," => "specifically) as an expression," | removed "when attempting to treat it as an expression" |
18:48:40 | FromDiscord | <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:32 | FromDiscord | <haxscramper> you need to have an `else` branch, because internally it generates series of `if/elif/else` |
19:08:41 | FromDiscord | <haxscramper> there is no exhaustiveness check |
19:09:23 | FromDiscord | <haxscramper> so explicit `else` is required |
19:17:28 | * | fredrikhr joined #nim |
19:19:56 | FromDiscord | <zajrik> I'm 90% certain I had an explicit `else` branch at the time that it was giving me errors |
19:20:21 | FromDiscord | <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:53 | FromDiscord | <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:54 | FromDiscord | <zajrik> ¯\_(ツ)_/¯ |
19:23:30 | FromDiscord | <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:14 | FromDiscord | <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:10 | FromDiscord | <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:21 | leorize | use objects :p |
20:24:48 | FromDiscord | <dk> but I want to serialize proc args |
20:24:52 | FromDiscord | <dk> :^( |
20:25:21 | leorize | then wouldn't an object be an excellent typed container? |
20:26:52 | FromDiscord | <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:43 | FromDiscord | <dk> I guess I can declare a new object type in the implementation, based on the tuple type |
20:29:57 | FromDiscord | <dk> that's fugly but should work |
20:30:14 | leorize | wouldn't taking a proc prototype generate better-looking code? |
20:30:30 | FromDiscord | <dk> I wanted to avoid macros |
20:30:37 | FromDiscord | <dk> this is just a template |
20:31:10 | leorize | https://play.nim-lang.org/#ix=2U4Z |
20:31:49 | leorize | don't stress the templating system too much then :P |
20:34:43 | leorize | at one point I'd recommend using the macro system, they're just much more pleasant to work with |
20:35:03 | FromDiscord | <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:45 | FromDiscord | <dk> other than what I was trying to do |
20:37:25 | leorize | from my uneducated guess I'd say you can write this easier if you use macros |
20:37:31 | leorize | but I'm not sure what you're doing :P |
20:39:22 | FromDiscord | <dk> this can barely get any easier https://media.discordapp.net/attachments/371759389889003532/824744289925464134/unknown.png |
20:39:42 | FromDiscord | <dk> it would be a shame to make it into a messy macro |
20:40:05 | FromDiscord | <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:04 | FromDiscord | <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:02 | leorize | it doesn't exist, unfortunately |
21:23:27 | FromDiscord | <zajrik> Shoot. |
21:23:32 | FromDiscord | <zajrik> A man can dream |
21:26:10 | * | blitzworks joined #nim |
21:28:15 | FromDiscord | <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:15 | FromDiscord | <zajrik> hmm |
21:31:23 | FromDiscord | <zajrik> Not quite sure I understand how that works lol |
21:31:46 | * | kaliy quit (Ping timeout: 240 seconds) |
21:32:26 | FromDiscord | <no name fits> mood |
21:33:16 | * | kaliy joined #nim |
21:34:49 | FromDiscord | <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:32 | FromDiscord | <zajrik> (edit) "It's compiling fine." => "I am able to import the files without the need for relative pathing now." |
21:36:10 | leorize | note that would only work if your project is not a library |
21:36:28 | FromDiscord | <zajrik> It is not a library 👍 |
21:36:46 | * | filcuc joined #nim |
21:38:41 | FromDiscord | <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:57 | FromDiscord | <zajrik> I'm very reliant on editor tooling |
21:39:08 | FromDiscord | <zajrik> :bloblaughcry: |
21:39:10 | filcuc | how can i return a call with a return value from a macro? https://pastebin.com/bSy2vYEY |
21:41:09 | filcuc | appending 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:03 | FromDiscord | <dk> @filcuc make the macro untyped |
21:46:28 | FromDiscord | <dk> I general, do that every time a template/macro returns something funny |
21:48:18 | leorize | @filcuc: https://play.nim-lang.org/#ix=2U5r |
21:49:00 | FromDiscord | <no name fits> I'm having some choice paralysis |
21:52:53 | leorize | what are you having difficulty choosing? |
21:52:55 | filcuc | leorize: dk: thanks |
21:53:06 | FromDiscord | <no name fits> how to design a web server |
21:53:12 | filcuc | but what's the default then? typed? |
21:53:25 | filcuc | i mean the default return type for a macro |
21:53:47 | filcuc | given that just specifying untyped as the result type fixed my issue |
21:53:51 | leorize | macro can only return untyped |
21:54:06 | leorize | (for now, that is) |
21:54:41 | filcuc | leorize: then i don't understand the difference between macro foo() and macro foo(): untyped |
21:55:00 | filcuc | the second one fixed my issue |
21:55:01 | leorize | it's a bug iirc :P |
21:55:07 | FromDiscord | <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:20 | filcuc | doh |
21:55:24 | filcuc | :D |
21:55:36 | FromDiscord | <no name fits> I do know I want it to be configurable instead of convention driven |
21:55:46 | * | leorize joined #nim |
21:59:57 | FromDiscord | <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:08 | ForumUpdaterBot | New 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:06 | FromDiscord | <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:59 | FromDiscord | <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:39 | FromDiscord | <no name fits> Because I've seen a few different ways of handling routing |
23:52:25 | FromDiscord | <no name fits> @dk |
23:56:06 | FromDiscord | <no name fits> Anyway I need to sleep, so please ping if you respond |
23:56:34 | FromDiscord | <dk> In reply to @no name fits "Anyway I need to": I think tries are "agreed upon" |
23:56:47 | FromDiscord | <dk> but it doesn't really matter if there will be few people visiting your website |
23:56:53 | FromDiscord | <dk> and you can change it at any time |
23:58:14 | FromDiscord | <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:24 | FromDiscord | <no name fits> I'm having trouble with design decisions |
23:59:06 | FromDiscord | <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 |