00:01:52 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
00:02:16 | * | njoseph joined #nim |
00:07:44 | * | clyybber quit (Remote host closed the connection) |
00:29:13 | * | Tanger joined #nim |
01:14:50 | FromDiscord | <Saken> Hello friends, very interested in Nim, but can not find any time to learn it. For projects at the moment using Fastify. But wanted to choose one strictly typed server side language as Java is too verbose. How is nim like on server side. Did some research and available options are Jester and Prologue. Can you share your experience on using Nim on backend? How is fast compared to Fastify? |
01:30:38 | FromDiscord | <Zachary Carter> I think someone else would have had to use Fastify to compare Jester or Prologue to it haha |
01:41:05 | FromDiscord | <Saken> I think its normal when developers jump from one language to another or testing some different frameworks... |
01:43:59 | FromDiscord | <Saken> Main question was How is nim like on server side, different database support and quirks in dev etc |
01:51:02 | * | spiderstew_ joined #nim |
01:51:47 | * | spiderstew quit (Ping timeout: 250 seconds) |
01:59:34 | * | tiorock joined #nim |
01:59:34 | * | rockcavera quit (Killed (niven.freenode.net (Nickname regained by services))) |
01:59:34 | * | tiorock is now known as rockcavera |
01:59:34 | * | rockcavera quit (Changing host) |
01:59:34 | * | rockcavera joined #nim |
02:05:40 | PMunch | @Saken, I've used Nim on server side. It's pretty good. But I've never tried Fastify, so can't really compare it |
02:06:22 | * | vicfred_ joined #nim |
02:06:45 | * | vicfred quit (Remote host closed the connection) |
02:07:00 | FromDiscord | <Saken> In reply to @PMunch "<@821244146277679124>, I've used Nim": Thanks. Very interested and hope will find time to learn it. Thanks |
02:33:02 | * | vicfred_ quit (Quit: Leaving) |
02:41:59 | * | PMunch quit (Quit: leaving) |
03:04:15 | FromDiscord | <ajusa> WIP, but I've been trying to write a tutorial/example for sealmove's binarylang. If anyone is interested, here it is: https://ajusa.github.io/binarylang-fun/intro.html↵Huge thanks to nimib and pietroppeter, makes writing and updating this sort of stuff painless. I'm planning on including a section on parsing binary stuff next (that is what it is designed for) and web scraping |
03:04:27 | FromDiscord | <ajusa> (edit) "scraping" => "scraping. I would appreciate any feedback!" |
03:34:24 | * | rockcavera quit (Remote host closed the connection) |
03:39:28 | * | spiderstew joined #nim |
03:42:16 | * | spiderstew_ quit (Ping timeout: 268 seconds) |
04:24:40 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
04:24:49 | * | njoseph joined #nim |
04:42:17 | * | wasted_youth2 quit (Read error: Connection reset by peer) |
05:18:50 | * | haxscramper joined #nim |
05:22:41 | FromDiscord | <pietroppeter> I found it very readable. I did not know about binarylang and did not expect it could be used to parse also non binary stuff, and it actually seems to be pretty great about it! And of course I loved the fact that it was the first public usage of nimib I have seen around 🙂 |
05:34:55 | * | narimiran joined #nim |
05:55:05 | ForumUpdaterBot | New Nimble package! newfix - FIX Protocol optimized parser (Financial Information eXchange), see https://github.com/inv2004/newfix |
06:01:55 | saem | Fun, this might be a good for reducing some test cases. https://comby.dev/blog/2021/03/26/comby-reducer |
06:03:35 | FromDiscord | <flywind> This also helps(though it doesn't compile anymore) https://github.com/disruptek/dust |
06:04:17 | saem | Oh, that's neat |
06:27:53 | FromDiscord | <cp> It would be nice(tm) to have a wrapper for this no ? https://github.com/arrayfire |
06:30:11 | FromDiscord | <dmitmel> sent a code paste, see https://play.nim-lang.org/#ix=2UwI |
06:53:29 | FromDiscord | <Dav1s> any good benchmark comparing nim with c++ and go? |
06:53:42 | FromDiscord | <Dav1s> https://github.com/kostya/benchmarks |
06:53:42 | FromDiscord | <ElegantBeef> https://github.com/kostya/benchmarks |
06:53:45 | FromDiscord | <Dav1s> is this a good one? |
06:53:52 | FromDiscord | <ElegantBeef> I mean it's a benchmark |
06:57:38 | FromDiscord | <Dav1s> Im planning ditching python for nim in my personal projects |
06:57:47 | FromDiscord | <haxscramper> In reply to @dmitmel "hi! I'm trying to": If you need to have a structure that can either be `"string"` or something else you should use variant objects https://nim-lang.org/docs/manual.html#types-object-variants |
06:58:00 | FromDiscord | <ElegantBeef> Yea i wrote this example to show how to do that https://play.nim-lang.org/#ix=2UwO |
06:58:07 | FromDiscord | <ElegantBeef> Dont plan on it do it 😛 |
06:58:25 | FromDiscord | <ElegantBeef> Macros, static typing, speed, nicer syntax we got it here |
06:58:25 | FromDiscord | <Dav1s> In reply to @ElegantBeef "Dont plan on it": No need to plan im doing it rn |
06:58:36 | FromDiscord | <Dav1s> (edit) "plan" => "plan," |
07:00:25 | FromDiscord | <Rika> JsonNode is already a variant object |
07:00:38 | FromDiscord | <dmitmel> sent a code paste, see https://play.nim-lang.org/#ix=2UwT |
07:00:48 | FromDiscord | <Rika> You can just parse the JSON string and restructure the data into your type from there |
07:01:10 | FromDiscord | <haxscramper> In reply to @dmitmel "don't they result in": You can write own converter to json |
07:01:11 | FromDiscord | <Avatarfighter> o7 everyone how are you all |
07:01:20 | FromDiscord | <haxscramper> I thought you are asking about how to represent this on nim side |
07:01:44 | FromDiscord | <haxscramper> Everything else you can just implement parser/serializer for to fit into specific json structure |
07:02:04 | FromDiscord | <dmitmel> writing my own converter is a possibility, but I'd prefer to use the existing unmarshaller or something based on it |
07:02:05 | FromDiscord | <Dav1s> In reply to @ElegantBeef "Macros, static typing, speed,": How should I get into it? |
07:02:12 | FromDiscord | <Dav1s> any good guide |
07:02:12 | FromDiscord | <Rika> If you didn’t know, you can monkey patch the json module without editing the actual file |
07:02:31 | FromDiscord | <Rika> Look into a proc called initFromJson or something I think |
07:02:36 | FromDiscord | <Rika> Or was it backwards |
07:02:52 | FromDiscord | <ElegantBeef> My recommendation is https://nim-lang.org/docs/tut1.html |
07:02:58 | FromDiscord | <Rika> I don’t know but from there just write a similar proc in your module for your type then use the to macro |
07:03:31 | FromDiscord | <haxscramper> In reply to @dmitmel "writing my own converter": https://nim-lang.org/docs/marshal.html you can check if this fits your needs |
07:04:01 | FromDiscord | <haxscramper> If now then write custom `load[T]` for it |
07:06:00 | FromDiscord | <haxscramper> If you end up writing `toRecord(json: JsonNode): Record` you can try using pattern matching https://nim-lang.github.io/fusion/src/fusion/matching.html#matching-different-things-kvminuspairs-matching and field iterators https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CT |
07:06:53 | FromDiscord | <dmitmel> oh, btw, forgot to tell. `Record` is nothing special, it's just what typescript uses to define an dictionary of one type to another, smth like `Map<string, string>` if this looks more familiar. |
07:07:13 | FromDiscord | <haxscramper> We have `Table[string, sting]` |
07:07:18 | FromDiscord | <dmitmel> nice |
07:08:54 | FromDiscord | <haxscramper> In reply to @cp "It would be nice(tm)": https://github.com/bitstormGER/ArrayFire-Nim |
07:09:39 | FromDiscord | <cp> It is magic 🙂 |
07:12:24 | Q-Master | @dmitmel you can also check this https://github.com/Q-Master/packets.nim |
07:13:14 | FromDiscord | <dmitmel> thanks, looks interesting |
07:42:02 | FromDiscord | <Rika> are there better/other code cov solutions than `gcov` and `coverage` nimble package? |
07:44:10 | * | Eyess joined #nim |
07:45:17 | * | ddevault_ joined #nim |
07:47:00 | * | SunDwarf quit (Quit: Disconnect by user.) |
07:47:00 | * | deepend quit (Quit: o/) |
07:47:00 | * | ddevault quit (Quit: Why do I even put this quit message in if I never quit) |
07:47:00 | * | cyraxjoe quit (Quit: No Ping reply in 180 seconds.) |
07:47:00 | * | ddevault_ is now known as ddevault |
07:47:05 | * | MightyJoe joined #nim |
07:48:45 | * | deepend joined #nim |
08:05:07 | * | NimBot joined #nim |
08:08:42 | * | Tanger quit (Remote host closed the connection) |
08:09:15 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
08:11:16 | * | Lord_Nightmare joined #nim |
09:15:18 | Clonkk[m] | @Rika See https://forum.nim-lang.org/t/7024 . TL;DR : No. |
09:15:37 | FromDiscord | <Rika> damn |
09:15:39 | FromDiscord | <Rika> okay |
09:15:48 | Clonkk[m] | Timotheethecour has a compiler branch where he started working on code coverage if you feel like itnkering with it |
09:15:56 | Clonkk[m] | (it's all in the forums thread) |
09:29:38 | * | l1x joined #nim |
09:46:43 | * | Tanger joined #nim |
10:01:04 | * | krux02 joined #nim |
10:09:00 | * | lritter joined #nim |
10:24:55 | FromGitter | <bung87> anyone know how to solve this `libzip_all.c.o:libzip_all.c:(.text+0x6de8): undefined reference to `crc32' ⏎ collect2.exe: error: ld returned 1 exit status` am on windows |
10:27:51 | FromDiscord | <Zachary Carter> sounds like the linker can't find c3c32 |
10:27:57 | FromDiscord | <Zachary Carter> (edit) "c3c32" => "crc32" |
10:28:09 | FromDiscord | <Zachary Carter> are you on windows or linux? |
10:28:15 | FromDiscord | <Zachary Carter> or macOS? |
10:28:20 | FromGitter | <bung87> windows |
10:29:04 | FromGitter | <bung87> I remember it will use pure nim on windows as it doesn"t have libzip |
10:32:04 | FromGitter | <bung87> oh it include zlib.h |
10:38:15 | FromDiscord | <Valdar> In reply to @Dav1s "any good benchmark comparing": https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/go-gpp.html |
11:13:16 | FromDiscord | <Aiz> sent a code paste, see https://play.nim-lang.org/#ix=2UxM |
11:13:36 | * | natrys joined #nim |
11:13:56 | FromDiscord | <Aiz> (edit) "https://play.nim-lang.org/#ix=2UxM" => "https://play.nim-lang.org/#ix=2UxO" |
11:13:57 | FromDiscord | <Rika> might be unintentional? |
11:17:40 | FromDiscord | <Aiz> if the point of `split` and `splitWhitespace` is empty string↵than why `unicode.splitWhitespace` different from `strutils.splitWhitespace` |
11:17:49 | FromDiscord | <Aiz> (edit) "string↵than" => "string↵then" |
11:21:06 | * | Gustavo6046_ joined #nim |
11:21:37 | * | Gustavo6046 quit (Ping timeout: 260 seconds) |
11:23:17 | * | Gustavo6046_ is now known as Gustavo6046 |
11:26:49 | FromDiscord | <Aiz> also, i think i saw that people prefer to use `toSeq(iterator)` than another proc↵should we deprecate `proc split` or something like that |
11:27:12 | FromDiscord | <Aiz> that's just my thoughts↵i'm not nim expert |
11:27:28 | FromDiscord | <Aiz> (edit) "also, i think i saw ... that" added "somewhere" |
11:29:11 | FromDiscord | <Rika> its not a preference, its more of just because most iterators do not have a corresponding proc |
11:30:06 | * | narimiran quit (Ping timeout: 240 seconds) |
11:32:16 | FromDiscord | <Yardanico> In reply to @bung87 "I remember it will": Why not use zippy? |
11:32:26 | FromDiscord | <Yardanico> https://github.com/guzba/zippy |
11:35:06 | FromGitter | <bung87> yeah I just switch to zippy , found it can't open my zip file |
11:35:53 | FromGitter | <bung87> https://github.com/guzba/zippy/issues/11 I create a issue for this |
11:41:51 | * | xet7 quit (Quit: Leaving) |
11:43:28 | * | rockcavera joined #nim |
11:44:27 | * | xet7 joined #nim |
11:54:37 | * | wasted_youth2 joined #nim |
12:01:43 | * | rockcavera quit (Remote host closed the connection) |
12:06:56 | * | rockcavera joined #nim |
12:08:13 | * | rockcavera quit (Remote host closed the connection) |
12:19:24 | * | rockcavera joined #nim |
12:26:03 | * | willyboar joined #nim |
12:30:18 | * | dmc joined #nim |
12:30:41 | * | dmc is now known as Guest82781 |
12:33:01 | Guest82781 | hello! I wonder if anyone is able to help me.... i'm developing some client/server software, the client runs on windows and is sending a wide char string, the server is nim and it's receiving it as a string, but processing anything on it (e.g. comparison) fails since it's actually wide char (confirmed by checking the hex which was e.g. 4100420043 etc) |
12:33:18 | Guest82781 | is there any simple/quick way to convert to a common format |
12:34:02 | FromDiscord | <Rika> maybe check within https://nim-lang.org/docs/widestrs.html |
12:34:38 | Guest82781 | oo thanks i did not see this |
12:44:53 | Guest82781 | hmmm, if i newWideCString it I only get the first char :/ |
12:49:55 | FromDiscord | <Rika> strange |
12:50:14 | FromDiscord | <Rika> do you have a \0 in there? |
12:54:11 | Guest82781 | yes, it's wide char so it's 2 byte chars |
12:54:24 | Guest82781 | e.g. A = 0x0041 |
12:55:28 | Guest82781 | e.g. as bytes... [100, 0, 109, 0, 99, 0, |
12:55:50 | FromDiscord | <Rika> nim widestr uses uint16 |
12:55:58 | FromDiscord | <Rika> combine the bytes into uint16s first |
12:56:27 | Guest82781 | hmm ok |
12:58:22 | * | junland quit (Quit: %ZNC Disconnected%) |
12:59:29 | * | junland joined #nim |
13:03:15 | Guest82781 | surely there must be a simpler way to do this? |
13:05:10 | Guest82781 | looks like the winstr module might be helpful |
13:12:45 | Guest82781 | or not :D |
13:39:18 | FromDiscord | <Yardanico> @Guest82781 why widestrs doesn't work for you? |
13:39:38 | FromDiscord | <Yardanico> you just do let mystr = newWideCString(yourstring) |
13:39:52 | FromDiscord | <Yardanico> or you can use treeform's |
13:39:57 | FromDiscord | <Yardanico> https://github.com/treeform/encode |
13:40:11 | FromDiscord | <Yardanico> use fromUTF16LE from there |
13:40:24 | FromDiscord | <Yardanico> it converts a windows wide string to a nim string |
13:40:38 | FromDiscord | <Yardanico> why are you not using utf-8 in your client though? :) |
13:44:24 | FromDiscord | <Rika> is it still worth supporting nim 1.0 or should i support until 1.2? |
13:44:29 | FromDiscord | <Rika> for packages |
13:45:20 | FromDiscord | <Yardanico> you can support 1.4+ just fine :P |
13:45:33 | FromDiscord | <Yardanico> but really check https://nim-lang.org/blog/2021/01/20/community-survey-results-2020.html |
13:45:34 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/826452090817478726/09.png |
13:45:40 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/826452115530317824/unknown.png |
13:46:26 | FromDiscord | <Yardanico> 472+86 = 558 ~= 85% of all Nim users were on 1.4 or devel |
13:46:52 | FromDiscord | <Yardanico> (out of those who responded in this survey) |
13:48:02 | FromDiscord | <Rika> okay |
13:51:38 | * | rockcavera quit (Remote host closed the connection) |
13:52:52 | * | Vladar joined #nim |
13:57:24 | * | narimiran joined #nim |
14:03:35 | Oddmonger | wow 558 users of nim worlwide, you can almost know them all |
14:04:14 | FromDiscord | <Rika> i barely know 20 people at a time what makes you think i can know five hundred |
14:04:58 | Oddmonger | i wonder how a political professional can remember |
14:05:30 | Oddmonger | « Hey welcome ! Still with nim ?! » « i'm using rust, assh**** » |
14:05:47 | FromDiscord | <Rika> are you ok |
14:05:52 | * | willyboar quit (Remote host closed the connection) |
14:06:23 | * | willyboar joined #nim |
14:12:41 | Guest82781 | @Yardanico: newWideCString takes the first char, presumably due to the nulls, as i metnioned |
14:12:51 | FromDiscord | <Yardanico> but why do you have nulls in your string? |
14:13:14 | Guest82781 | because it's a wchar string from windows? |
14:13:25 | Guest82781 | e.g. 00410042 |
14:13:29 | Guest82781 | utf16 |
14:13:40 | FromDiscord | <Yardanico> wait |
14:13:49 | FromDiscord | <Yardanico> do you receive your data as a string or cstring? |
14:14:29 | Guest82781 | well it's coming back from decryptCBC of nimAES, which gives it me as a string |
14:15:32 | Guest82781 | but the decrypted content is wchar |
14:20:21 | FromDiscord | <will> how can you initialize an array with a certain number of all the same value |
14:20:22 | FromDiscord | <will> (edit) "value" => "value>" |
14:20:25 | FromDiscord | <will> (edit) "value>" => "value?" |
14:20:46 | FromDiscord | <mratsim> import std/algorithm and use `fill` |
14:21:06 | FromDiscord | <will> thank you! |
14:22:56 | FromDiscord | <Yardanico> does anyone know of scratchpad plugins for vscode so that I can quickly test some nim code without polluting my project's files? |
14:23:01 | FromDiscord | <Yardanico> (edit) "plugins" => "plugin" |
14:31:40 | * | whitefly joined #nim |
14:32:15 | saem | That's an annoying thing about VSCode, I miss it from InteliJ. I looked a while back but didn't find one that I liked at the time. |
14:34:48 | * | Guest82781 quit (Quit: leaving) |
14:51:42 | * | willyboa_ joined #nim |
14:52:52 | * | willybo__ joined #nim |
14:54:45 | * | willyboar quit (Ping timeout: 252 seconds) |
14:56:12 | * | willyboa_ quit (Ping timeout: 246 seconds) |
14:57:14 | FromDiscord | <Valdar> Can't you just open a new instance of VS? |
14:57:58 | FromDiscord | <no name fits> In reply to @Yardanico "does anyone know of": I usually have an extra project just to test out code. I know it's not exactly what you want, but it works for me |
14:58:28 | FromDiscord | <Yardanico> @Valdar that's less comfortable (one extra window) instead of quickly opening a new file (in the same instance), testing some code and discarding it or saving to some special dir :) |
14:58:38 | FromDiscord | <no name fits> True |
15:01:50 | FromDiscord | <Valdar> In reply to @Yardanico "<@!458164811889377290> that's less comfortable": Ageed. It's the only way I know around it tho. If you find something like a scratchpad, I'd like it as well 🙂 |
15:03:04 | * | willyboar joined #nim |
15:06:00 | * | willybo__ quit (Ping timeout: 246 seconds) |
15:16:35 | FromDiscord | <Mustache Man> Can R's nonstandard evaluation be replicated in Nim? E.g. passing an unquoted field name into a method and accessing that field on an object as in myPersonSeq.filter(height < 170) |
15:20:19 | FromDiscord | <Rika> prolly yeah |
15:20:27 | FromDiscord | <Rika> sounds kinda easy |
15:27:35 | FromDiscord | <Yardanico> @Mustache Man it's already kinda possible with the filterIt template |
15:27:40 | FromDiscord | <Yardanico> myPersonSeq.filterIt(it.height <170) |
15:27:42 | FromDiscord | <Yardanico> (edit) "<170)" => "< 170)" |
15:27:54 | FromDiscord | <Yardanico> https://nim-lang.org/docs/sequtils.html#filterIt.t%2Cuntyped%2Cuntyped |
15:28:12 | FromDiscord | <Yardanico> but if you don't want the "it" at all then you'd have to make a macro I guess |
15:30:35 | FromDiscord | <Yardanico> that search query sounds very weird out-of-context https://media.discordapp.net/attachments/371759389889003532/826478519395024947/unknown.png |
15:30:37 | FromDiscord | <Yardanico> 1 nim with sugar please |
15:38:42 | FromDiscord | <Rika> great |
15:38:42 | FromDiscord | <Rika> i made the macro but it got wiped because of ix |
15:45:20 | FromDiscord | <Mustache Man> In reply to @Yardanico "but if you don't": Yeah that'd be a big win.↵ I may be in the minority but I find the "it" is distracting |
15:45:26 | FromDiscord | <Yardanico> huh |
15:45:40 | FromDiscord | <Yardanico> I don't like too much implicitness in that case, it looks good enough for me :) |
15:45:47 | FromDiscord | <Yardanico> but yeah, you can make a macro that'll do it I guess |
15:46:23 | FromDiscord | <Yardanico> the simplest you can do (I guess) is to create a macro which will create templates for all fields of the type you're filtering on |
15:48:28 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2Uzv |
15:48:31 | FromDiscord | <Rika> rudimentary macro |
15:48:32 | FromDiscord | <Mustache Man> I'm just on my first week of learning Nim but, one thing I'm trying to find is how to accept the unquoted field name |
15:48:40 | FromDiscord | <Rika> not very good but should be ok to extend? |
15:49:03 | * | whitefly quit (Read error: Connection reset by peer) |
15:49:06 | FromDiscord | <Rika> @Mustache Man try it, see if i made the right thing |
15:50:40 | FromDiscord | <Yardanico> @Rika wow nice that's simple |
15:50:48 | FromDiscord | <Yardanico> it works for @Mustache Man 's use case as well |
15:50:55 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2Uzy |
15:51:05 | FromDiscord | <Yardanico> ah I see how you do it, right |
15:52:10 | FromDiscord | <Mustache Man> I'm on mobile so I can't easily copy paste :) the example you sent worked |
15:53:36 | FromDiscord | <Rika> i can think of some cases where it MIGHT not work too well |
15:53:48 | FromDiscord | <Rika> but i made this in a few minute so |
15:53:56 | FromDiscord | <Yardanico> yeah I can think of those cases too :P |
15:54:06 | FromDiscord | <Yardanico> hm, what if.. |
15:54:10 | * | willyboa_ joined #nim |
15:54:34 | FromDiscord | <Yardanico> hm yeah that won't work as I wanted it to |
15:55:36 | * | willybo__ joined #nim |
15:55:52 | FromDiscord | <Mustache Man> Pretty nice from what I can tell. I'll have to try it out more deeply later! Thanks so much |
15:56:05 | * | rockcavera joined #nim |
15:56:13 | FromDiscord | <Yardanico> @Mustache Man this only works on simple predicates though, but it shouldn't be too hard to expand it |
15:56:24 | * | willyboar quit (Ping timeout: 246 seconds) |
15:57:00 | FromDiscord | <Mustache Man> Yup, I need to learn how to write Macros so at least I have a jumping off point and a purpose now |
15:58:30 | * | willyboa_ quit (Ping timeout: 246 seconds) |
16:13:21 | FromDiscord | <Yardanico> @Mustache Man this is how I can make it work for all types of predicates and fields, but it's a bit "cursed" :P |
16:13:37 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/wQU |
16:14:50 | FromDiscord | <Yardanico> basically there's a special fieldPairs iterator which the compiler unrolls into field name (as a string) and field value of some object, so for each field we call genFilterTempl which creates a template with the name as that field name which returns the actual field value from the current iterated value from the iterator |
16:14:59 | FromDiscord | <Yardanico> although this will only work for objects |
16:17:57 | FromDiscord | <Rika> yeah if you have procs it wont work then |
16:18:06 | FromDiscord | <Rika> whilst mine still kinda does |
16:18:34 | FromDiscord | <Yardanico> well the problem is that if you have different predicates, possibly function calls, etc, it can become kind of complicated |
16:19:33 | FromDiscord | <Rika> bring out the cursed acronym |
16:19:48 | FromDiscord | <Rika> ||~~nti~~|| |
16:19:56 | FromDiscord | <Yardanico> lol |
16:20:41 | FromDiscord | <dk> sent a code paste, see https://play.nim-lang.org/#ix=2UzF |
16:22:02 | FromDiscord | <Yardanico> In reply to @dk "these are templates, sir": ? |
16:22:10 | FromDiscord | <Yardanico> they're not, you can't do this with a template |
16:26:44 | FromDiscord | <no name fits> So what's a good way to get started learning how to do stuff like the ``get "foo/bar": code`` I sometimes see. Like making your own get command(?) |
16:26:50 | FromDiscord | <no name fits> I'm not sure what to call it |
16:27:47 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2UzL |
16:27:53 | FromDiscord | <no name fits> oh it's just templates? |
16:27:56 | FromDiscord | <Yardanico> it can be macros too |
16:28:13 | FromDiscord | <Yardanico> or even procs (with do) if you have an expression that evaluates to a value and just want that value |
16:29:42 | FromDiscord | <no name fits> Thanks |
16:36:25 | FromDiscord | <dk> sent a code paste, see https://play.nim-lang.org/#ix=2UzM |
16:37:18 | * | lritter quit (Ping timeout: 240 seconds) |
16:37:39 | FromDiscord | <no name fits> What's that supposed to do? |
16:40:31 | FromDiscord | <haxscramper> In reply to @dk "would be pretty cool": You can do this with `superQuote` from https://github.com/PMunch/macroutils |
16:40:53 | FromDiscord | <haxscramper> I.e. allow function call interpolation inside of backticks instead of just identifier name |
16:41:59 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2UzN |
16:45:16 | * | vicfred joined #nim |
16:46:12 | FromDiscord | <dk> In reply to @haxscramper "You can do this": will normal quote ever work that way? |
16:46:38 | FromDiscord | <haxscramper> It might (because `superquote` provides superset of the features) |
16:47:01 | FromDiscord | <haxscramper> So it not a breaking change at least |
16:47:55 | FromDiscord | <haxscramper> Though `quote` in itself still has many limitations like inability to splice nodes, and in a lot of cases people end up with `newTree` |
16:47:59 | FromDiscord | <haxscramper> for anything remotely complex |
16:48:58 | FromDiscord | <no name fits> So I'm trying to google what it means to "lift" something in programming (like a proc) but I keep getting links for body builders and how lifts are programmed |
16:49:26 | FromDiscord | <Rika> lambda lifting? |
16:49:35 | FromDiscord | <haxscramper> that is a FP term, so something like "functional programming lift" |
16:49:58 | FromDiscord | <no name fits> thanks! got an answer on the first result now |
16:50:34 | FromDiscord | <no name fits> found this https://github.com/hemanth/functional-programming-jargon |
16:51:29 | FromDiscord | <Rika> i mean https://en.wikipedia.org/wiki/Lambda_lifting |
16:51:37 | FromDiscord | <Rika> pretty simple here as well |
16:51:53 | FromDiscord | <no name fits> you underestimate my stupidity |
16:53:17 | * | willybo__ is now known as willyboar |
18:09:35 | ForumUpdaterBot | New thread by JPLRouge: Import to thread help, see https://forum.nim-lang.org/t/7720 |
19:10:58 | * | leorize quit (Quit: WeeChat 3.0) |
19:18:35 | * | haxscramper quit (Remote host closed the connection) |
19:38:35 | FromDiscord | <hotdog> Anyone ever seen SIGSEGV during compilation? That's a new one for me |
19:47:29 | * | rockcavera quit (Remote host closed the connection) |
19:49:15 | FromDiscord | <Yardanico> @hotdog https://media.discordapp.net/attachments/371759389889003532/826543614163025920/9k.png |
19:49:43 | FromDiscord | <Yardanico> if the code's rather small you can share it and I can try to minimize it |
19:49:43 | Prestige | lmao |
19:58:00 | FromDiscord | <hotdog> @Yardanico haha |
19:58:27 | FromDiscord | <hotdog> I've seen compiler crashes but usually get the thing telling you to do a koch build or something |
19:58:42 | FromDiscord | <hotdog> This was just a sigsegv halfway through, nothing else |
19:58:47 | FromDiscord | <hotdog> I fixed it though |
19:58:50 | FromDiscord | <Yardanico> yes you can build a debug version of the compiler with ./koch temp |
19:58:58 | FromDiscord | <Yardanico> @hotdog well it still would be good to know what caused the compiler to crash |
19:58:58 | FromDiscord | <hotdog> Yeah |
19:59:55 | FromDiscord | <hotdog> I'm not sure I can make a simple reproduction |
20:10:14 | FromDiscord | <fwsgonzo> is there any incremental build support? |
20:10:46 | FromDiscord | <no name fits> Increasing a number every build? |
20:10:50 | FromDiscord | <fwsgonzo> (edit) "is there any incremental build support? ... " added "and bonus points for caching" |
20:10:57 | FromDiscord | <hotdog> @fwsgonzo in progress |
20:11:01 | FromDiscord | <fwsgonzo> ok |
20:11:19 | FromDiscord | <fwsgonzo> bonus points for ccache behavior |
20:11:41 | * | willyboar quit () |
20:12:10 | FromDiscord | <hotdog> @fwsgonzo https://github.com/nim-lang/RFCs/issues/46 |
20:12:27 | FromDiscord | <Yardanico> yep, exactly |
20:12:29 | FromDiscord | <hotdog> There's also discussions about it on the forum etc |
20:12:42 | FromDiscord | <no name fits> oh that |
20:12:43 | * | tane joined #nim |
20:12:55 | FromDiscord | <fwsgonzo> im quite bottlenecked right now as I have hundreds of subprojects as part of my build |
20:13:02 | FromDiscord | <fwsgonzo> and i dont want to rebuild all of them when I change one file |
20:13:19 | FromDiscord | <fwsgonzo> they are currently written in C++ but I would like to be able to use C/Nim |
20:13:39 | FromDiscord | <no name fits> I guess a workaround would be compartmentalising the build |
20:13:50 | FromDiscord | <Yardanico> well, nim compilation is quite fast and can be faster than C/C++ |
20:13:52 | FromDiscord | <Yardanico> because no headers :P |
20:14:09 | FromDiscord | <Yardanico> that said, macros (depending on how they're written), converters, concepts, etc can slow down the compilation a lot |
20:14:25 | FromDiscord | <fwsgonzo> im already using ninja/ccache, which is the best you can get, and its still annoying |
20:14:33 | FromDiscord | <fwsgonzo> (edit) "ninja/ccache," => "CMake/ninja/ccache," |
20:14:47 | FromDiscord | <fwsgonzo> i know that Nim always rebuilds, simple as that |
20:15:13 | FromDiscord | <fwsgonzo> thanks for the RFC link 🙂 |
20:15:32 | FromDiscord | <Yardanico> the IC implementation is already in progress |
20:16:23 | FromDiscord | <no name fits> Other than looking at the issues, is there a way to see the current todo feature list? |
20:16:34 | FromDiscord | <Yardanico> you mean for IC? |
20:16:40 | FromDiscord | <no name fits> For Nim in general |
20:16:45 | FromDiscord | <Yardanico> nim doesn't really have a "todo" list like that |
20:17:00 | FromDiscord | <no name fits> Probably why I couldn't find one then 😛 |
20:17:34 | FromDiscord | <Yardanico> we have some small milestones https://github.com/nim-lang/Nim/milestones and we also have different labels in issues |
20:17:41 | FromDiscord | <no name fits> thanks |
20:17:44 | FromDiscord | <Yardanico> for 2021 the main thing is IC as far as I know |
20:17:51 | * | hyiltiz_ quit (Ping timeout: 245 seconds) |
20:18:52 | FromDiscord | <no name fits> Right. Right now I'm mainly using Nim for graphics with Vulkan and web stuff (been trying to write my own web server), and I was wondering if there was going to be more work for native GUI stuff for mobile and business apps |
20:19:26 | FromDiscord | <no name fits> Something like Xamarin, but not shit |
20:19:30 | FromDiscord | <Yardanico> for third party things (not directly related to the stdlib/compiler) the best we have is https://github.com/nim-lang/needed-libraries/ |
20:19:43 | FromDiscord | <no name fits> thanks! |
20:19:44 | * | hyiltiz joined #nim |
20:19:44 | * | hyiltiz quit (Changing host) |
20:19:44 | * | hyiltiz joined #nim |
20:20:25 | FromDiscord | <no name fits> I also don't mind helping, but I have limited knowledge and experience with this stuff 🙂 |
20:20:46 | FromDiscord | <no name fits> I really like Nim and I use it for free, so feels like the least I could od |
20:20:52 | FromDiscord | <no name fits> (edit) "od" => "do" |
20:21:56 | FromDiscord | <no name fits> So far I've only helped with docs a tiny bit, so |
20:45:56 | * | narimiran quit (Ping timeout: 268 seconds) |
20:48:07 | ForumUpdaterBot | New thread by Stefan_Salewski: Processing elements of a sequence with conditional deletion, see https://forum.nim-lang.org/t/7721 |
21:14:18 | Zoom[m] | Hey, everyone, what's the status of CPS? It was the next big thing just this January and a hot topic here. Anything happened? |
21:14:52 | Zoom[m] | I've been out of the loop for about 3 months now |
21:15:33 | FromDiscord | <ElegantBeef> Disruptek got banned and has left Nim, and now someone needs to take the reigns |
21:15:45 | FromDiscord | <ElegantBeef> reins even |
21:17:02 | Zoom[m] | Ah, that is unfortunate |
21:19:27 | Zoom[m] | So, I took a stab at benhoyt/countwords and my version of optimized.nim is like 3% faster than the one on the repo |
21:19:46 | Zoom[m] | But it's stil nowhere near optimized.go and this is disturbing |
21:21:46 | Zoom[m] | Don't know what Go uses, but in our case clearly murmur makes it a bit slower. As far as I understand, you can't simply switch to hashWangYi1 for tables? Why? |
21:23:09 | Zoom[m] | Also, since the program scans words to make them lowercase, it would be nice to hash along the way, but is there a way to put some data and its hash into the table? |
21:26:08 | Zoom[m] | I mean, you're supposed to overload hash proc, but I can't pass the precalculated hash into it, unless I pack the data into a structure, which defeats the purpose. |
21:31:01 | FromDiscord | <ElegantBeef> Well cant you just grab each word and use https://nim-lang.org/docs/hashes.html#hashIgnoreStyle%2Cstring |
21:33:05 | * | natrys quit (Quit: natrys) |
21:35:52 | Zoom[m] | Ah, since it hashes ordinals it will use wyhash. |
21:35:55 | FromGitter | <bung87> what's the problem ? tables already used hashWangyi |
21:39:39 | Zoom[m] | @bung87 Not for strings or arrays of bytes/chars: https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/hashes.nim#L440 |
21:44:28 | FromGitter | <bung87> but when you use hashIgnoreStyle it will not use wyhash |
21:49:31 | Zoom[m] | yep, so I'm a bit lost here. And the other question (with regards to hashing along the way) stands |
21:50:52 | * | tane quit (Quit: Leaving) |
21:52:20 | FromGitter | <bung87> you may need custom your type's hash op `proc hash(x: Person): Hash =` |
21:54:26 | FromDiscord | <ElegantBeef> Also are you doing it in a danger build + trying different GCs? |
21:56:03 | FromDiscord | <Dav1s> any nim cheat sheet? |
21:56:18 | FromDiscord | <ElegantBeef> Coming from python right? |
21:56:25 | FromDiscord | <Dav1s> yep |
21:56:25 | FromDiscord | <ElegantBeef> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers |
21:58:59 | FromDiscord | <Dav1s> thx m8 |
21:59:42 | Zoom[m] | ElegantBeef, of course, all the whistles with danger and flto. Mostly using arc. |
22:00:08 | FromDiscord | <ElegantBeef> Just making sure, some people are silly with their benchmarks |
22:00:40 | FromGitter | <bung87> reply to zoom , you may need custom type and manage array with index and you precalculated hash if the precalculated hash coming from external resources |
22:04:53 | Zoom[m] | Currently it's just a slice into a string, not sure how I could implement that. Distinct type? |
22:05:26 | FromDiscord | <ElegantBeef> Are you slicing with `[a..b]` or `toOpenArray`? |
22:05:40 | FromDiscord | <ElegantBeef> The latter will give you a view where as the former does a copy |
22:07:45 | * | Wezl joined #nim |
22:09:54 | * | Wezl left #nim ("bye") |
22:11:31 | Zoom[m] | ElegantBeef great catch, but the only time I'm actually slicing is when passing to counttable.inc |
22:12:21 | FromGitter | <bung87> You need implement your own get put delete use keys store in array . am not sure tou really need this |
22:12:41 | FromDiscord | <Dav1s> In reply to @ElegantBeef "https://github.com/nim-lang/Nim/wiki/Nim-for-Python": really good guide |
22:12:42 | FromDiscord | <ElegantBeef> Yea i used my strviewutils and only got marginally better when i tested, was like .6s |
22:12:57 | FromDiscord | <ElegantBeef> or 60ms dont recall the scale |
22:15:09 | Zoom[m] | So, getting rid of murmur and just using !& gave another 4-5% bump |
22:17:32 | Zoom[m] | Currently at 6.96s for 50 bibles vs 5.33 for version in Go. |
22:25:40 | * | Vladar quit (Quit: Leaving) |
22:29:34 | Zoom[m] | I'm not very familiar with cachegrind, but it shows `rawAlloc_system_5008.constprop.0` and `rawDealloc_system_5146.constprop.0` at 15.2% and 8.5% |
22:37:49 | * | blueberrypie7 joined #nim |
22:41:22 | * | blueberrypie quit (Quit: Ping timeout (120 seconds)) |
22:41:22 | * | casaca quit (Ping timeout: 265 seconds) |
22:41:22 | * | blueberrypie7 is now known as blueberrypie |
22:41:47 | * | mwbrown quit (Ping timeout: 265 seconds) |
22:42:11 | * | sknebel_ joined #nim |
22:42:16 | * | Ekho quit (Ping timeout: 265 seconds) |
22:42:20 | * | mwbrown joined #nim |
22:42:31 | * | voidpi quit (Disconnected by services) |
22:42:59 | * | xace_ joined #nim |
22:43:11 | * | voidpi joined #nim |
22:43:13 | * | shmorgle quit (Ping timeout: 240 seconds) |
22:43:13 | * | xace quit (Ping timeout: 240 seconds) |
22:43:13 | * | jxy quit (Ping timeout: 240 seconds) |
22:43:13 | * | sknebel quit (Ping timeout: 240 seconds) |
22:43:24 | * | jxy joined #nim |
22:48:12 | * | Ekho joined #nim |
23:15:17 | FromDiscord | <Yardanico> @Zoom are you on latest devel or stable? |
23:15:21 | FromDiscord | <Yardanico> can you check the timings with --gc:arc |
23:16:41 | Zoom[m] | Devel, though a week's old or so. It's already arc |
23:17:41 | FromDiscord | <Yardanico> well, what about without arc? :P |
23:18:27 | * | krux02 quit (Remote host closed the connection) |
23:41:08 | * | shmorgle joined #nim |