00:05:40 | * | ven473 quit (Ping timeout: 246 seconds) |
00:15:58 | * | stefanos82 quit (Quit: Quitting for now...) |
00:17:56 | zachcarter | quit |
00:18:11 | zachcarter | whoops |
00:18:42 | zachcarter | https://gist.github.com/zacharycarter/947aa1c002d930cba00ebe5a8cb7536a - is working now :D thanks for all the help alehander42 |
00:30:49 | zachcarter | we can start writing components at work! - https://viperhtml.js.org/hyperhtml/examples/#!fw=React&example=Custom%20Component & https://viperhtml.js.org/hyperhtml/examples/#!fw=React&example=Stateful%20Component |
00:39:15 | * | Cube22 joined #nim |
00:44:02 | * | Cube22 quit (Remote host closed the connection) |
00:57:05 | FromGitter | <gogolxdong> Is nes another library? |
01:08:40 | * | sblop joined #nim |
01:11:51 | * | sblop quit (Client Quit) |
01:12:23 | * | sblop joined #nim |
01:12:40 | * | pankracy20 joined #nim |
01:13:37 | * | demotomohiro joined #nim |
01:14:56 | zachcarter | gogolxdong: nes = Nim ECMAScript |
01:14:56 | * | demotomohiro quit (Read error: Connection reset by peer) |
01:14:56 | zachcarter | it's the macro that provides the DSL for generating ES6 classes |
01:15:02 | * | demotomohiro joined #nim |
01:15:34 | * | SenasOzys quit (Ping timeout: 240 seconds) |
01:17:18 | * | SenasOzys joined #nim |
01:17:23 | * | pankracy20 quit (Remote host closed the connection) |
01:25:36 | * | abm quit (Ping timeout: 252 seconds) |
01:59:54 | FromDiscord | <π Aareon π³> Howdy everyone |
02:08:46 | * | dddddd quit (Remote host closed the connection) |
02:31:33 | * | leorize quit (Quit: WeeChat 2.2) |
03:05:22 | * | NimBot joined #nim |
03:07:04 | * | smt quit (Ping timeout: 240 seconds) |
03:09:20 | * | arecaceae quit (Remote host closed the connection) |
03:09:39 | * | arecaceae joined #nim |
03:13:19 | * | vegax87 quit (Ping timeout: 252 seconds) |
03:25:12 | * | vegax87 joined #nim |
03:37:28 | * | flaviu joined #nim |
03:43:39 | * | zachcarter quit (Ping timeout: 244 seconds) |
03:44:56 | flaviu | When I create 2 enums with the same member name, I get "test.nim(5, 5) Error: redefinition of 'kill'" |
03:45:30 | flaviu | https://gist.github.com/flaviut/7bd738654647b690c92fbdfeb71bc3db from what I've read, shouldn't this work and allow me to disambiguate at the use site? |
04:08:14 | * | Sembei quit (Max SendQ exceeded) |
04:09:23 | * | Sembei joined #nim |
04:12:51 | * | sblop quit (Quit: WeeChat 1.9.1) |
04:20:08 | * | miran joined #nim |
04:30:18 | FromGitter | <codenoid> good noon |
04:30:24 | * | flaviu quit (Remote host closed the connection) |
04:58:55 | * | cncr04s25 joined #nim |
05:00:59 | * | flaviu joined #nim |
05:01:47 | * | cncr04s25 quit (Remote host closed the connection) |
05:16:55 | * | darithorn quit (Quit: WeeChat 2.2) |
05:20:42 | * | requested joined #nim |
05:23:33 | * | requested quit (Remote host closed the connection) |
05:24:10 | * | SenasOzys quit (Ping timeout: 246 seconds) |
05:34:09 | * | miran quit (Quit: Konversation terminated!) |
05:37:43 | * | nsf joined #nim |
05:51:47 | * | demotomohiro quit (Ping timeout: 240 seconds) |
05:53:31 | * | leorize joined #nim |
06:17:12 | * | SenasOzys joined #nim |
06:37:33 | * | xet7 joined #nim |
06:37:38 | monofuel[m] | I automated building docker images from nim devel, making images for amd64 and arm https://hub.docker.com/r/monofuel/nim/ |
06:38:17 | monofuel[m] | wanted to make it easier to toy with the latest version of nim on raspberry pi without waiting for it to compile |
06:47:28 | flaviu | monofuel[m]: Nice job; that looks useful! A point of possible improvement: each time you make a layer in docker (i.e. use a command), that adds a layer to the image. So to reduce the image size, you can use line continuations and "&&" to chain commands. If you do this, as well as delete unnecessary files (nimcache, csources, .git), you could probably get the image under 50MB. |
06:47:48 | flaviu | You can also merge all those apk lines into one "apk --update --no-cache git build-base" |
06:48:30 | flaviu | Actually, looks like you don't need the "--update" when using "--no-cache" |
06:57:19 | * | dpn`24 joined #nim |
06:57:31 | FromGitter | <alehander42> no problem @zacharycarter can't wait to see the lib |
06:58:01 | * | dpn`24 quit (Remote host closed the connection) |
06:58:37 | FromGitter | <alehander42> what version of nim do you typically use here? last stable / some recent devel / current devel? |
06:58:46 | FromGitter | <alehander42> (people here) |
07:03:13 | * | TheLemonMan joined #nim |
07:10:54 | * | Vladar joined #nim |
07:39:06 | FromGitter | <Bennyelg> hey what does this syntax means ?[(position + i) and 15] |
07:39:43 | FromGitter | <Bennyelg> what doe the `and` means |
07:39:49 | FromGitter | <narimiran> @Bennyelg this is from my AoC solution, right? :) |
07:40:01 | FromGitter | <Bennyelg> yea good bless you here |
07:40:06 | FromGitter | <narimiran> `and 15` is the same as `mod 16` |
07:40:07 | FromGitter | <Bennyelg> I am eating my self |
07:40:22 | FromGitter | <Bennyelg> first time seeing this |
07:40:25 | FromGitter | <Bennyelg> in my live |
07:40:27 | FromGitter | <Bennyelg> life* |
07:40:46 | FromGitter | <narimiran> haha, look it up under bit-masking |
07:40:55 | FromGitter | <Bennyelg> thanks |
07:41:46 | FromGitter | <narimiran> theoretically should/could be faster than doing `mod`, but probably compiler optimizes it so in practice might be the same |
07:42:29 | Araq | flaviu, that still requires the .pure annotation to work |
07:42:33 | FromGitter | <Bennyelg> go it :D, I ate myself around 2 hours just trying to understand what the hack |
07:43:27 | FromGitter | <alehander42> i guess it's bit and ? usually it's `&`, i find it confusing when called `and` |
07:43:35 | FromGitter | <Bennyelg> yea |
07:43:50 | FromGitter | <alehander42> ok |
07:43:51 | FromGitter | <Bennyelg> if it was `&` I would understand it right away |
07:44:35 | FromGitter | <narimiran> i would rather that it was `&`, but our BDFL doesn't like (well-known) symbols and he prefers words :( |
07:44:59 | FromGitter | <alehander42> ahh i finally get it |
07:45:14 | FromGitter | <alehander42> `{.base.}` warning is when you accidentally DONT override a method in a subclass |
07:45:27 | Araq | '&' is already concat |
07:45:33 | FromGitter | <alehander42> a hint would do wonders for that error message |
07:46:10 | FromGitter | <alehander42> `(are you trying to override a parent method? this signature doesn't match any)` |
07:46:27 | Araq | and fyi I would prefer 'bitand' these days |
07:46:36 | FromGitter | <alehander42> yeah bitand would be cool |
07:47:35 | FromGitter | <Bennyelg> agree |
07:47:45 | FromGitter | <Bennyelg> bitand will be much more applicable here |
07:47:56 | FromGitter | <narimiran> you cannot concat two numbers with `&` ;) |
07:48:04 | FromGitter | <Bennyelg> yea |
07:48:07 | FromGitter | <Bennyelg> I tried it now |
07:48:10 | FromGitter | <alehander42> because honestly before that I thought I have to fix my base method somehow (after all the error message shows `base` several times which actually doesn't have a lot to do with the error usually) |
07:48:11 | FromGitter | <Bennyelg> and you can't |
07:48:37 | Araq | alehander42: RFC is wip |
08:01:11 | FromGitter | <alehander42> `0` is invalid module name |
08:01:51 | FromGitter | <alehander42> that's what happens when you start autogenerating nim files with other nim files |
08:03:25 | * | gmpreussner quit (Ping timeout: 246 seconds) |
08:03:32 | * | gmpreussner_ joined #nim |
08:10:56 | TheLemonMan | a test case with 11 `when defined` subcases, @timotheecour you deserve a prize or something like that |
08:19:06 | * | abm joined #nim |
08:34:22 | * | PMunch joined #nim |
08:36:42 | FromGitter | <mratsim> @thelemonman something to keep an eye on: https://github.com/BurntSushi/critcmp "A command line tool for comparing benchmarks run by Criterion." |
08:44:22 | TheLemonMan | that's something I wanted to write, but as a simple web-based app with some nice graphs |
08:54:53 | pigmej | a haskell Criterion? |
08:56:47 | TheLemonMan | there's a Nim one too :) |
08:56:53 | pigmej | oh |
08:57:31 | pigmej | it seems that you're the author :D |
08:57:40 | * | leorize quit (Ping timeout: 272 seconds) |
09:03:59 | TheLemonMan | thanks to some macro magic we have the best DSL out of the other criterions (IMO ofc :) |
09:10:08 | pigmej | you'r opinion may be bit biased :P |
09:10:11 | pigmej | your* |
09:32:00 | PMunch | Nim macros are great for making DSLs though, so I wouldn't be surprised if he was right :) |
09:42:22 | * | a_b_m joined #nim |
09:43:18 | * | a__b__m joined #nim |
09:43:55 | * | xet7 quit (Quit: Leaving) |
09:45:28 | * | abm quit (Ping timeout: 245 seconds) |
09:45:56 | * | abm joined #nim |
09:46:34 | * | a_b_m quit (Ping timeout: 240 seconds) |
09:48:34 | * | a__b__m quit (Ping timeout: 240 seconds) |
09:52:07 | * | ven473 joined #nim |
09:56:58 | * | noonien joined #nim |
10:10:56 | * | dddddd joined #nim |
10:12:17 | FromGitter | <mratsim> Haskell as Monads :P |
10:12:23 | FromGitter | <mratsim> has* |
10:16:00 | * | Vladar quit (Remote host closed the connection) |
10:18:30 | * | navin joined #nim |
10:21:25 | * | Sembei quit (Max SendQ exceeded) |
10:22:33 | * | Sembei joined #nim |
10:34:44 | * | Vladar joined #nim |
10:38:26 | * | couven92 quit (Quit: Client disconnecting) |
10:46:52 | FromGitter | <bung87> (https://files.gitter.im/nim-lang/Nim/GsTP/Screen-Shot-2018-09-19-at-6.46.15-PM.png) |
10:47:20 | FromGitter | <bung87> I wrote a test lib using macro , get a lot of fun |
10:50:53 | * | Vladar quit (Ping timeout: 245 seconds) |
10:53:42 | FromGitter | <bung87> https://github.com/bung87/luna/blob/master/src/luna.nim#L110 take a look |
10:58:08 | * | Vladar joined #nim |
11:05:03 | * | jsn- quit (Ping timeout: 245 seconds) |
11:05:14 | * | jsn- joined #nim |
11:06:49 | TheLemonMan | Araq, why did you re-add osx to the allow_failures section? |
11:08:56 | FromGitter | <kaushalmodi> @bung87 Very cool. Can you add a README that also includes how this compares to the unittest stdlib? |
11:09:37 | FromGitter | <kaushalmodi> https://nim-lang.org/docs/unittest.html |
11:10:40 | FromGitter | <vivekimsit> Hi Guys, I have just recently started learning Nim and recently published a small utility module in github |
11:10:59 | FromGitter | <vivekimsit> it would be great if someone can have a quick overview and give me some feedback |
11:11:09 | FromGitter | <vivekimsit> https://github.com/vivekimsit/pretty-bytes |
11:13:44 | FromGitter | <bung87> well , thereβs more feature considering in commented code, `parallel `,output to file , the mose favour part is the terminal prints styles. |
11:15:19 | FromGitter | <xmonader> Is it just me or the parsetoml isn't really friendly to use? |
11:15:20 | * | navin quit (Remote host closed the connection) |
11:15:44 | FromGitter | <bung87> also considering add consumed time |
11:15:51 | FromGitter | <kaushalmodi> @vivekimsit Comments unrelated to code, you shouldn't commit the binaries to the git repo. |
11:16:28 | * | navin joined #nim |
11:17:17 | FromGitter | <kaushalmodi> The binaries would be specific to your OS. So anyone building this themselves on a different OS will anyways have to build it again. Read on how to distribute binaries as GitHub Releases assets instead. |
11:18:55 | FromGitter | <kaushalmodi> About the code, good job adding tests. I'd also add tests for arbitrary values. Right now, you are using just rounded "clean" byte values which are not very realistic. |
11:20:32 | FromGitter | <vivekimsit> @kaushalmodi thanks for the comments, I am still in very early stage of learning vim so any comment will definitely help me out |
11:20:47 | * | navin quit (Ping timeout: 240 seconds) |
11:20:51 | FromGitter | <vivekimsit> I need to add more tests for sure |
11:21:17 | FromGitter | <vivekimsit> and find some edge cases so any pull requests are welcome |
11:21:40 | * | stefanos82 joined #nim |
11:22:19 | FromGitter | <vivekimsit> also, right now the output is always in this format: `x.y` it would be better if I could trim the `0` after the decimal if the result is an integer |
11:28:55 | FromGitter | <kaushalmodi> About trimming the trailing .0, look at the `g`/`G` format for printing floats using `fmt`. Here are my notes on that: https://scripter.co/notes/nim-fmt/#type--only-for-numbers |
11:31:14 | * | leorize joined #nim |
11:32:20 | * | SenasOzys quit (Ping timeout: 250 seconds) |
11:33:29 | FromGitter | <kaushalmodi> I think you will get an error if you do just `var number = 123` in your test, because then number would be an int and not a float. |
11:33:40 | FromGitter | <alehander42> @bung87 looks good |
11:34:03 | FromGitter | <kaushalmodi> @vivekimsit You would need to add support for int types too. |
11:34:41 | FromGitter | <kaushalmodi> Better, make that proc a generic, and slightly tweak the behavior of int vs float inside that generic proc definition. |
11:34:49 | FromGitter | <alehander42> But the killing feature for me in unittest is that it can show you the subvalues in the expected nodes |
11:35:03 | FromGitter | <alehander42> E.g. a + b , can show a and b |
11:35:16 | FromGitter | <alehander42> But the problem is it's very inconsistent in it |
11:35:30 | FromGitter | <alehander42> If your lib can do this well too, I'll use it |
11:35:47 | FromGitter | <kaushalmodi> @xmonader admittedly, I haven't used parsetoml much. But using it was fine. |
11:36:51 | FromGitter | <kaushalmodi> You can find an example in here: https://github.com/kaushalmodi/nbuild/blob/master/src/nbuild.nim |
11:37:44 | FromGitter | <kaushalmodi> See the cfg variable in there |
11:37:55 | FromGitter | <bung87> havnβt look that further ,just using literal value for testing ,since it suitable for mine another lib, will keep it in mind . |
11:44:02 | FromGitter | <xmonader> @kaushalmodi well, basic usage doesn't even work β https://github.com/NimParsers/parsetoml/issues/23 |
11:46:45 | FromGitter | <kaushalmodi> I see, that error is due to the removal of string nil recently |
11:46:57 | FromGitter | <kaushalmodi> I haven't tried parsetoml after that. |
11:47:15 | FromGitter | <kaushalmodi> It should be an easy fix I believe. |
11:48:00 | FromGitter | <kaushalmodi> For now, you should be able to continue using an experimental switch; don't remember it right now. |
11:48:26 | FromGitter | <kaushalmodi> If someone can help, that switch temporarily allows nil string on devel. |
11:49:51 | FromGitter | <xmonader> compiling with nilseqs:on works but still raises errors |
11:53:06 | FromGitter | <kaushalmodi> The error is evident :) |
11:53:16 | FromGitter | <kaushalmodi> You have four quotes at the beginning |
11:53:28 | FromGitter | <kaushalmodi> `""""` |
11:54:32 | * | krux02 joined #nim |
11:54:57 | * | SenasOzys joined #nim |
12:00:17 | FromGitter | <dandevelo> Trying to build the latest nim and getting this error: lib/system/sysstr.nim(87, 25) Error: type mismatch: got (ptr UncheckedArray[system.char]) but expected 'cstring = CString' |
12:04:02 | FromGitter | <dandevelo> Does it work on your side? |
12:06:50 | * | navin joined #nim |
12:11:13 | * | navin quit (Ping timeout: 246 seconds) |
12:15:13 | Araq | dandevelop: remove old Nim installations and do what travis/appveyor does |
12:18:12 | FromGitter | <kaushalmodi> @Araq: Thanks for merging the nightly docs PR. They are alive! https://nim-lang.github.io/Nim/ |
12:18:56 | FromGitter | <kaushalmodi> Are you going to add the commit hash to the footer? |
12:20:40 | FromGitter | <kaushalmodi> (Well, not "nightly" any more, they get updated with each devel commit. :)) |
12:34:46 | FromGitter | <bung87> ` β plus(1, 2) == 4 [3 == 4]` how to nicely log the results? reverse operator? |
12:34:51 | Araq | yeah, but "nightly" builds have priority and are coming too |
12:35:40 | FromGitter | <bung87> @alehander42 get something for you |
12:37:28 | * | navin joined #nim |
12:41:07 | FromGitter | <bung87> well ,make it `[3 and 4]` |
12:50:26 | * | navin quit (Remote host closed the connection) |
12:58:25 | * | Vladar quit (Remote host closed the connection) |
12:59:03 | FromGitter | <narimiran> `got 3, expected 4`? |
13:00:02 | FromGitter | <bung87> seems not suitable for `a() == b()` |
13:07:22 | FromGitter | <narimiran> yup, it isn't |
13:08:34 | FromGitter | <bung87> ah, got a option for humans :) |
13:10:03 | * | SenasOzys__ joined #nim |
13:11:34 | * | SenasOzys quit (Read error: Connection reset by peer) |
13:12:50 | * | kapil___ joined #nim |
13:13:04 | * | Febo1 joined #nim |
13:13:44 | * | Febo1 quit (Remote host closed the connection) |
13:20:33 | * | ryanhowe joined #nim |
13:22:18 | * | ryanhowe quit (Client Quit) |
13:29:50 | krux02 | dandevelo: that looks like a cast[cstring](...) |
13:29:54 | krux02 | is missing |
13:32:07 | * | Vladar joined #nim |
13:35:25 | * | SenasOzys joined #nim |
13:36:08 | * | SenasOzys__ quit (Remote host closed the connection) |
13:53:55 | FromGitter | <Bennyelg> @mratsim how was the performance agingest julia? β https://github.com/mratsim/nim-julia-challenge |
13:58:07 | FromGitter | <bketelsen> morning nimmers |
13:59:10 | FromGitter | <bketelsen> I'm stuck on a version problem trying to build the nim forum. I have the latest nim built as of this morning : `choosenim show β Channel: devel β Version: #devel β β ``` Path: /Users/bketelsen/.choosenim/toolchains/nim-#devel```` [https://gitter.im/nim-lang/Nim?at=5ba2562e7dca30650323e743] |
13:59:25 | FromGitter | <bketelsen> `nimble v0.8.11 compiled at 2018-09-19 13:43:33 β git hash: 1f79f17de90702abad31a6f70d3f9c74195cb105` |
13:59:40 | FromGitter | <bketelsen> nim forum is at #master |
14:01:42 | FromGitter | <bketelsen> nimble install fails with errors about headers: `but expression 'headers' is of type: RawHeaders` so I changed jester to #head in nimforum.nimble, but that gives me a different error about isNil being a user defined error. |
14:02:15 | FromGitter | <bketelsen> `forum.nim(79, 46) Error: usage of 'isNil' is a user-defined error` |
14:02:27 | FromGitter | <bketelsen> Can anyone suggest what I'm doing wrong? |
14:03:11 | Araq | maybe nothing and we need to update nimforum :-) |
14:05:01 | PMunch | bketelsen, in the newest version of Nim sequences and strings can't be nil |
14:05:35 | PMunch | You can go back to the old behaviour with --nilseqs:on, or you can use a stable version of Nim |
14:08:25 | FromGitter | <bketelsen> brilliant! That fixed the build error. Thank you @PMunch and @Araq |
14:11:06 | FromGitter | <kaushalmodi> *s/fixed/bypassed :) |
14:11:20 | * | ven473 quit (Remote host closed the connection) |
14:11:37 | * | ven473 joined #nim |
14:11:48 | PMunch | Too bad these "user-defined errors" can't have custom messages |
14:12:05 | PMunch | Would be nice to leave a little notice of this change in the error message |
14:13:04 | Araq | PMunch: yeah good idea, consider it done |
14:13:13 | FromGitter | <kaushalmodi> How come they cannot have detailed messages? |
14:13:31 | FromGitter | <kaushalmodi> I put in detailed messages in the exceptions I throw. |
14:13:36 | Araq | but I need to hack it into the compiler because user-defined error messages could be supported but would break boostrapping otherwise |
14:14:43 | FromGitter | <kaushalmodi> OK, may be because these are compile time errors. |
14:14:51 | FromGitter | <bketelsen> https://github.com/nim-lang/nimforum/issues/204 <-- filed issue on nimforum repo |
14:16:39 | * | seni joined #nim |
14:23:08 | * | rockcavera quit (Remote host closed the connection) |
14:26:22 | * | navin joined #nim |
14:27:59 | FromGitter | <razuit> how does one cleanly close an AsyncHTTPServer that is running on a separate thread? I have this Nim program that spawns another thread for running an HttpServer, then waits for a key and then wants to cleanly stop the HTTP server β β ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ba25cefd655361f7622241f] |
14:33:23 | TheLemonMan | oh fuck, appvoyeur timed out once again |
14:33:33 | FromGitter | <mratsim> voyeur lol |
14:39:34 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
14:51:10 | * | rockcavera joined #nim |
14:57:19 | FromGitter | <Vindaar> @razuit why does the server run in a separate thread, if it's an async HTTP server already? Is this just a simplified case? |
15:00:00 | * | couven92 joined #nim |
15:07:36 | * | navin quit (Remote host closed the connection) |
15:08:37 | * | navin joined #nim |
15:10:01 | * | navin quit (Remote host closed the connection) |
15:14:54 | * | SenasOzys quit (Ping timeout: 252 seconds) |
15:16:42 | * | Vladar quit (Ping timeout: 264 seconds) |
15:21:49 | * | SenasOzys joined #nim |
15:25:52 | * | Trustable joined #nim |
15:26:29 | * | Trustable quit (Remote host closed the connection) |
15:27:24 | * | Trustable joined #nim |
15:30:34 | * | demotomohiro joined #nim |
15:35:49 | * | skrylar joined #nim |
15:38:40 | * | Vladar joined #nim |
15:42:25 | * | PMunch quit (Quit: Leaving) |
15:47:25 | * | xet7 joined #nim |
16:01:15 | * | Aareon joined #nim |
16:11:04 | * | abm quit (Ping timeout: 240 seconds) |
16:11:26 | * | TheLemonMan joined #nim |
16:12:14 | * | wildlander joined #nim |
16:17:07 | * | navin joined #nim |
16:35:36 | * | darithorn joined #nim |
16:38:54 | * | navin quit (Remote host closed the connection) |
16:40:04 | FromGitter | <iffy> Is there a way to statically link (a specific version of) sqlite into my binary and still use the `db_sqlite` module? |
16:44:48 | * | Aareon quit (Remote host closed the connection) |
16:48:34 | * | navin joined #nim |
16:50:40 | FromGitter | <mratsim> probably with dynlibOverride |
16:51:15 | FromGitter | <iffy> ooo, let me try that |
16:51:17 | FromGitter | <mratsim> I saw some questions on the forum recently about static linking |
16:55:03 | FromGitter | <iffy> I guess dynlibOverride is assuming I've already built the static sqlite lib, right? There's not a way to use sqlite source (and have nim compile everything in one step)? |
16:59:56 | FromGitter | <iffy> yep |
17:00:00 | FromGitter | <iffy> wow... that was too easy |
17:11:56 | * | Aareon joined #nim |
17:11:59 | FromGitter | <bung87> is there a Deep learn framework in nim ? |
17:12:34 | Aareon | There are wrappers for Tensor iirc |
17:12:35 | TheLemonMan | no, only shallow learning ones |
17:12:43 | Aareon | Maybe... lol |
17:12:57 | FromGitter | <bung87> wrappers .. |
17:13:13 | TheLemonMan | there's nimtorch & arraymancer |
17:14:02 | Aareon | ArrayMancer is a good one |
17:15:22 | FromGitter | <bung87> ah seems fit my needs, I βll give a try |
17:15:43 | FromGitter | <bung87> thanks guys! |
17:16:11 | * | Aareon_ joined #nim |
17:16:31 | * | Aareon_ left #nim (#nim) |
17:16:47 | * | Aareon left #nim (#nim) |
17:16:53 | * | Aareon_ joined #nim |
17:17:08 | * | Aareon_ is now known as Aareon |
17:17:55 | TheLemonMan | Araq, what about deprecating {int,str}define pragmas and instead have a compiler plugin generate a CT-tuple (a-la locals()) with all the user defines? |
17:19:02 | Aareon | `locals()` as in Python `locals()`? |
17:20:07 | monofuel[m] | flaviu: thanks for the feedback, i'll look into updating it later today. I'm not familiar with optimizing dockerfiles for size, normally I try to optimize for making it easy change with fast rebuild but size would be better in this case. |
17:20:12 | FromGitter | <kaushalmodi> TheLemonMan: How will the value type be derived? |
17:20:30 | FromGitter | <kaushalmodi> Interestingly, I *just* learned about the *define pragma.. noted that here: https://scripter.co/notes/nim/#define-switch-value |
17:21:24 | TheLemonMan | kaushalmodi, the compiler already knows about them |
17:22:13 | FromGitter | <kaushalmodi> I thought it assigned it as string or int based on strdefine or intdefine.. |
17:22:32 | * | Aareon quit (Quit: Igloo IRC: https://iglooirc.com) |
17:24:15 | TheLemonMan | of course all of them are strings, because all the -d: switches are indeed strings, and the user is responsible for parsing it (& error handling) |
17:26:07 | FromGitter | <kaushalmodi> hmm, makes sense |
17:26:14 | * | SenasOzys quit (Ping timeout: 272 seconds) |
17:26:32 | FromGitter | <kaushalmodi> I also find it *magical* that a define switch of strdefine type gets a `"true"` value by default |
17:27:20 | FromGitter | <kaushalmodi> if the switch value is stored as string, we need to distinguish between a `-d:foo` switch vs `-d:foo=bar` switch vs no switch |
17:27:38 | FromGitter | <kaushalmodi> so I think option[string] will need to enter that scene |
17:27:42 | * | SenasOzys joined #nim |
17:28:52 | TheLemonMan | conflating `-d:foo` and `-d:foo=` may help without bringing into the table the big (optional) guns :) |
17:33:25 | * | navin quit (Remote host closed the connection) |
17:33:27 | FromGitter | <kaushalmodi> yes, actually I wasn't talking of that case.. I was talking about the case of a define switch not being used. |
17:33:40 | FromGitter | <kaushalmodi> But thinking more, we wouldn't need to worry of such cases |
17:33:57 | FromGitter | <kaushalmodi> as there won't be a tuple element for missing switches :) |
17:33:58 | TheLemonMan | oh, if the -d: is missing then you'd have a missing-field error |
17:34:21 | FromGitter | <kaushalmodi> If I understood you correctly, passing `-d:foo -d:bar=val` will be analogous to `const locals = [("foo", ""), ("bar", "val")]` |
17:34:23 | FromGitter | <kaushalmodi> right? |
17:35:20 | TheLemonMan | more like `(foo: "", bar: "val")`, a tuple is nicer than a table here |
17:35:25 | FromGitter | <iffy> Is there a way to access the correctly-typed values of returned db_sqlite result rows? e.g. `select 1 as first, "foo" as second` and then `row.first == 1` and `row.second == "foo"`? |
17:35:44 | FromGitter | <kaushalmodi> TheLemonMan: yes, thanks |
17:36:18 | FromGitter | <kaushalmodi> so yeah, that `locals` suggestion would be nice |
17:36:48 | FromGitter | <kaushalmodi> how would Nim ensure that there's no name collision with a `locals` in user code? |
17:37:43 | TheLemonMan | err, `defines` is a better name here :) it'd be implemented as a compiler plugin like `locals()` is |
17:38:47 | FromGitter | <kaushalmodi> OK, I'll trust you guys because I don't know what `locals()` is :) |
17:38:54 | FromGitter | <kaushalmodi> But yes, `defines` is nicer |
17:39:07 | FromGitter | <kaushalmodi> You want to make an RFC? |
17:40:12 | * | Trustable quit (Remote host closed the connection) |
17:41:39 | TheLemonMan | it's more a brain-fart than a full-blown RFC right now heh |
17:42:33 | FromGitter | <kaushalmodi> Another tangent to that |
17:42:42 | FromGitter | <kaushalmodi> we already have `defined` proc (macro?) |
17:42:53 | FromGitter | <kaushalmodi> but it's a user-facing proc like thing |
17:43:03 | FromGitter | <kaushalmodi> right now defined returns either true or false |
17:43:19 | FromGitter | <kaushalmodi> would be nice if it returned true/false/stringval |
17:43:22 | FromGitter | <kaushalmodi> wdyt? |
17:43:49 | FromGitter | <kaushalmodi> or.. if it returned (again) option[string] :) |
17:44:09 | * | navin joined #nim |
17:44:20 | FromGitter | <kaushalmodi> so instead of a user having to check `defined` and the new `defines`, then now need the same old `defined` |
17:44:27 | TheLemonMan | my opinion is that since `defined` is a question (is it defined or not?) it should just return a bool |
17:44:53 | FromGitter | <kaushalmodi> hmm |
17:49:40 | TheLemonMan | it's like elisp predicates :) |
17:49:53 | FromGitter | <kaushalmodi> hey! |
17:49:55 | FromGitter | <kaushalmodi> You use emacs? |
17:50:05 | FromGitter | <kaushalmodi> it's like alist in elisp :) |
17:50:17 | FromGitter | <kaushalmodi> ok, you meant `defined` |
17:50:26 | * | demotomohiro quit (Quit: Leaving) |
17:50:53 | FromGitter | <kaushalmodi> when you pasted `(foo: "", bar: "val")`, I was thinking alists.. `'((foo . "") (bar . "val"))` |
17:51:05 | TheLemonMan | I've sunk way too much time/effort in vim, but I wr{i,o}te quite a lot of scheme heh |
17:51:13 | FromGitter | <kaushalmodi> hmm |
17:53:02 | * | stefanos82 quit (Quit: Quitting for now...) |
17:54:49 | * | xet7 quit (Quit: Leaving) |
18:05:50 | * | druonysus joined #nim |
18:36:47 | * | navin quit (Remote host closed the connection) |
18:58:15 | FromDiscord | <treeform> I found this module "coro" https://github.com/nim-lang/Nim/blob/master/lib/pure/coro.nim |
18:58:20 | FromDiscord | <treeform> Does not seem to be used much |
18:58:29 | FromDiscord | <treeform> there are some tests in the folder but it looks very limiting... |
18:58:47 | FromDiscord | <treeform> is the new async stuff super seeds this? What is the history behind it? |
19:00:38 | * | Piraty joined #nim |
19:00:58 | Piraty | hi, is there any known distro that packages nim-forum? |
19:01:59 | * | aerth quit (Quit: later versions) |
19:07:58 | * | SenasOzys quit (Ping timeout: 245 seconds) |
19:11:05 | federico3 | the forum itself? no |
19:23:37 | * | Jesin quit (Quit: Leaving) |
19:26:02 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
19:31:59 | * | Jesin joined #nim |
19:32:43 | * | SenasOzys joined #nim |
19:38:34 | * | PrimHelios joined #nim |
19:55:51 | * | navin joined #nim |
19:58:04 | ng0 | hey, is there a due date for applications for the core dev position(s) that are open? |
19:59:00 | * | gmpreussner_ quit (Ping timeout: 252 seconds) |
20:00:09 | * | navin quit (Ping timeout: 244 seconds) |
20:17:11 | FromDiscord | <treeform> I have not seen a due date? Usually job applications don't have one. |
20:23:55 | * | voice_ftp_ quit (Ping timeout: 244 seconds) |
20:29:39 | * | ritchie_ quit (Remote host closed the connection) |
20:30:09 | FromDiscord | <Shield> I feel that I've seen a staticfor template in nim files, anybody knows where is it? if not, what's a simple way to do it |
20:32:38 | * | voiceftp joined #nim |
20:34:55 | Araq | ng0, October or November |
20:37:35 | ng0 | Araq: thanks |
20:40:55 | * | zachcarter joined #nim |
20:49:37 | * | Bercik5 joined #nim |
20:52:10 | * | Bercik5 quit (Remote host closed the connection) |
20:54:16 | * | PrimHelios quit (Quit: Leaving) |
21:04:38 | * | zachcarter quit (Ping timeout: 245 seconds) |
21:10:31 | * | krux02 quit (Remote host closed the connection) |
21:11:56 | * | ritchie_ joined #nim |
21:19:12 | * | Vladar quit (Remote host closed the connection) |
21:33:41 | * | nsf quit (Quit: WeeChat 2.2) |
21:40:32 | * | solidsnack23 joined #nim |
21:41:12 | * | solidsnack23 quit (Remote host closed the connection) |
21:41:56 | * | zachcarter joined #nim |
21:51:56 | * | kapil___ quit (Quit: Connection closed for inactivity) |
22:01:37 | FromGitter | <iffy> Can I make a proc that returns a proc and has access to the outer proc's arguments? I'm getting an illegal capture error |
22:03:34 | FromGitter | <iffy> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ba2c7b6e6046343f388cdff] |
22:04:16 | FromGitter | <iffy> the compiler doesn't like me using `statements` from within the inner proc |
22:25:04 | FromGitter | <iffy> Can I copy those statements to some other variable for later use? |
22:25:42 | FromGitter | <drewp> picking up from @dm1try idea at https://gitter.im/nim-lang/Nim?at=5b9ef81db4990c30eec684d5 , my code is now like https://gist.github.com/drewp/d299548fd28c9db22dc1c8f0b1cf8f8a and it looks pretty except for the casts on 33-34 |
22:41:46 | * | zachcarter quit (Ping timeout: 260 seconds) |
22:44:16 | FromGitter | <rayman22201> @iffy it's the openArray. You can't capture an openArray because it may not have an address. If you make that a concrete type like a seq it will work. |
22:45:28 | FromGitter | <iffy> k, I tried a seq after that and I though it compiled, I was still getting errors. I need to get a smaller example of my whole code. Thanks for the tip! |
22:45:51 | * | enthus1ast joined #nim |
22:46:31 | FromGitter | <rayman22201> You could make it a template instead |
22:46:40 | FromGitter | <iffy> That's where I started :) |
22:46:52 | FromGitter | <iffy> let me paste my full file (shortened) |
22:46:54 | enthus1ast | any idea how i could convert (in js context) a stdlib.json to a js json object? |
22:49:11 | enthus1ast | anything better than: JSON.parse(($j)) |
22:49:11 | * | abm joined #nim |
22:49:41 | FromGitter | <rayman22201> @enthus1ast I don't understand the question. what is a stdlib.json? |
22:50:08 | enthus1ast | im useing `json` from the stdlib to parse a json msg in the browser |
22:50:55 | FromGitter | <iffy> @rayman22201 can I paste 30 lines here or is there a better pastebin? |
22:51:18 | enthus1ast | but when i call a callback, which is defined by javascript code, i see the implementation of json, not the json data |
22:51:48 | FromGitter | <rayman22201> @iffy, pastebin |
22:52:53 | FromGitter | <iffy> @rayman22201 https://gist.github.com/iffy/ac3fc7a8710149ada8b44ab20d137bd6 |
22:53:39 | * | wildlander quit (Quit: Konversation terminated!) |
22:56:21 | FromGitter | <rayman22201> @enthus1ast I understand your question now. I think the answer is that there really isn't a good way. Nim is not Javascript. You have to convert across the boundary somehow. |
23:02:22 | FromGitter | <iffy> when I try a template like this: ``` β template sqlList(sql_arr: untyped) = β β `````` [https://gitter.im/nim-lang/Nim?at=5ba2d57de6046343f389178d] |
23:02:38 | enthus1ast | maybe it would be a good idea to port my code to the native JSON api... |
23:02:52 | FromGitter | <iffy> I get "expression 'proc anon(db227039: DbConn) = ... has no type (or is ambiguous)" |
23:03:08 | enthus1ast | BUT it would be cool if stdlib json would have such a function out of the box :) |
23:04:43 | FromGitter | <rayman22201> @enthus1ast maybe try the jsFromAST macro in the jsffi module? https://nim-lang.org/docs/jsffi.html#jsFromAst |
23:04:55 | FromGitter | <rayman22201> I'm not sure though |
23:05:42 | FromGitter | <rayman22201> @iffy, your proc doesn't have a return type, and the code below wants it to have a return type. I'm looking closer at why |
23:06:29 | FromGitter | <iffy> in the template version or the pastebin version? (oh... or both?) |
23:08:08 | enthus1ast | i think the error is in the context of sqlList |
23:08:45 | enthus1ast | could you nopaste where you use sqlList? |
23:09:00 | FromGitter | <iffy> what is nopaste? |
23:09:36 | FromGitter | <iffy> fwiw, this compiles: β β ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ba2d730be4f300626bc14cb] |
23:09:38 | enthus1ast | could you send the code |
23:10:01 | FromGitter | <iffy> @enthus1ast https://gist.github.com/iffy/ac3fc7a8710149ada8b44ab20d137bd6 |
23:13:29 | FromGitter | <kaushalmodi> Is there a simple example somewhere that shows how to create a Nim application wrapper around a JS library? |
23:13:51 | FromGitter | <kaushalmodi> I am interested in creating a CLI utility that uses https://github.com/microlinkhq/metascraper |
23:15:56 | FromGitter | <iffy> I'm off now, but I'll read later if you have any ideas; thanks! |
23:16:21 | FromGitter | <rayman22201> ttyl @iffy |
23:19:15 | enthus1ast | try |
23:19:23 | enthus1ast | template sqlList(sql_arr: untyped): proc (db:DbConn) = |
23:20:05 | enthus1ast | ^ iffy |
23:20:37 | * | enclyp joined #nim |
23:20:58 | * | enclyp quit (Remote host closed the connection) |
23:21:00 | * | a5m012 joined #nim |
23:21:55 | * | a5m012 quit (Remote host closed the connection) |
23:26:41 | enthus1ast | funny this could also help me with my issue |
23:27:06 | enthus1ast | but https://github.com/pragmagic/karax/blob/master/karax/jjson.nim could help you aswell @kaushalmodi |
23:27:48 | FromGitter | <rayman22201> Karax to the rescue lol |
23:28:40 | enthus1ast | @kaushalmodi https://github.com/pragmagic/karax/blob/master/karax/jwebsockets.nim |
23:32:17 | FromGitter | <kaushalmodi> I'm not sure what kind of example will help me. I have 0 JS knowledge. I believe I'll need to translate the JS require to Nim somehow? See https://github.com/microlinkhq/metascraper/blob/master/README.md#usage |
23:33:03 | enthus1ast | do you must use metacrawler or "just want to crawl some data from a site"? |
23:33:46 | enthus1ast | metascraper i mean |
23:35:28 | * | Tiiffi16 joined #nim |
23:36:21 | * | Tiiffi16 quit (Remote host closed the connection) |
23:37:11 | FromGitter | <kaushalmodi> I want to just scrape meta data: author, title and abstract. |
23:38:25 | FromGitter | <kaushalmodi> The challenge is that the data could be in JSON-LD, mf2, DC, og and variety of meta data formats. |
23:38:53 | enthus1ast | ok |
23:43:59 | enthus1ast | then it must run inside nodejs i guess? |
23:44:45 | * | PrimHelios joined #nim |
23:49:19 | FromGitter | <kaushalmodi> .. I believe so .. I assumed, which I shouldn't have, that Nim will compile to JS code, which should act as wrapper for that library.. and then "somehow" (I believe using `npm`) that can be converted to a binary. |
23:50:00 | FromGitter | <kaushalmodi> Is that plan technically possible? |
23:51:33 | enthus1ast | you could compile yourscript.nim to yourscript.js which could be executed by nodejs then |
23:52:27 | enthus1ast | but it would not be a standalone executable |
23:52:38 | FromGitter | <kaushalmodi> Hmm, OK |
23:52:53 | FromGitter | <adam-r-kowalski> How come this code doesnβt compile? β β ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ba2e1541043315947b8231d] |
23:53:37 | FromGitter | <kaushalmodi> enthus1ast: Thanks for your time. There are quite a many "I don't know how" in that plan :) |
23:54:04 | FromGitter | <kaushalmodi> I'll look for some other way to parse URL metadata from CLI. |
23:54:29 | FromGitter | <kayabaNerve> Nim needs better UI options |
23:54:33 | FromGitter | <kayabaNerve> Nimx is flat out broken |
23:55:09 | FromGitter | <zetashift> Easier said than done :P |
23:56:32 | FromGitter | <kayabaNerve> ... yep |
23:56:35 | FromGitter | <adam-r-kowalski> Is there a resouce on composing Concepts? Like I want to say that in order to be this concept you must also fullfill the interface of another concept |
23:56:37 | FromGitter | <kayabaNerve> Just pushed 4 new commits to mine |
23:58:01 | enthus1ast | adam-r-kowalski `s.len is int` compiles for me |
23:58:38 | FromGitter | <kayabaNerve> I complain about a lot of stuff without doing anything because I'm a very critical person. That said, I need an UI lib, and the options out there are so bad I'm actually writing one. |
23:58:52 | enthus1ast | i know its terrible |
23:59:01 | FromGitter | <adam-r-kowalski> Oh thanks! For some reason vscode was giving me an error message on the s is Iterator line |
23:59:13 | enthus1ast | i have the same isse :) |
23:59:17 | enthus1ast | issue |
23:59:47 | enthus1ast | the best thing i found for nim really was webview |