00:01:50 | * | Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com) |
00:03:54 | * | icebattle quit (Quit: leaving) |
00:05:14 | FromGitter | <mratsim> Dunno, I tried to install Nim through Homebrew in the past and I had path issues, nimsuggest didn't work, etc ... So know I'm not installing it globally anymore |
00:13:43 | federico3 | algorithm.nim(428, 51) Error: undeclared identifier: 'HSlice' ...ouch |
00:16:48 | * | couven92 joined #nim |
00:20:31 | GitDisc | <spaceghost> I guess I just prefer asdf. To remove an older nim I just `rm -rf ~/.asdf/installs/nim/<version>` |
00:23:15 | federico3 | as I suspected, some steps in the install expect the binary to be in path :( |
00:23:18 | federico3 | nim c doc/nimcache/tut1/tut1_snippet_101.nim |
00:33:11 | * | vlad1777d joined #nim |
00:36:10 | * | d10n-work quit (Quit: Connection closed for inactivity) |
00:59:44 | * | couven92 quit (Ping timeout: 256 seconds) |
01:01:37 | * | xkapastel joined #nim |
01:26:05 | * | Yaiyan quit (Ping timeout: 240 seconds) |
01:32:40 | * | yaiyan joined #nim |
01:34:54 | * | couven92 joined #nim |
01:48:19 | * | tefter joined #nim |
01:56:43 | FromGitter | <zetashift> oh fuck lmao I thought 7drl started monday |
01:58:09 | FromGitter | <zetashift> I'm doing it with Nim guess I'll just start now |
02:12:26 | * | S1t1Schu joined #nim |
02:16:01 | * | S1tiSchu quit (Ping timeout: 248 seconds) |
02:22:59 | * | yglukhov joined #nim |
02:27:34 | * | yglukhov quit (Ping timeout: 256 seconds) |
02:33:41 | * | endragor joined #nim |
02:38:13 | * | endragor quit (Ping timeout: 252 seconds) |
02:40:25 | * | far4ia4650 quit (Ping timeout: 252 seconds) |
02:40:42 | * | far4ia4650 joined #nim |
03:04:39 | * | natrys joined #nim |
03:10:08 | * | couven92 quit (Ping timeout: 276 seconds) |
03:13:52 | * | endragor joined #nim |
03:34:05 | * | endragor quit (Remote host closed the connection) |
03:36:40 | * | endragor joined #nim |
04:13:31 | * | xkapastel quit (Ping timeout: 245 seconds) |
04:15:27 | * | xkapastel joined #nim |
04:24:01 | * | SenasOzys quit (Ping timeout: 248 seconds) |
04:37:53 | * | natrys quit (Ping timeout: 248 seconds) |
04:54:56 | * | arthurz quit () |
05:02:34 | * | r3d9u11 joined #nim |
05:31:06 | * | xkapastel quit (Quit: Connection closed for inactivity) |
05:43:56 | * | r3d9u11 quit (Remote host closed the connection) |
06:15:19 | * | r3d9u11 joined #nim |
06:18:25 | FromGitter | <gogolxdong> Is there any ssh library for inputting the password automatically? |
06:18:48 | Demos[m] | you can pass it on the command line |
06:19:06 | Demos[m] | and I'm sure libssh has an option |
06:19:12 | Demos[m] | but like, just use an rsa key |
06:22:30 | * | miran joined #nim |
06:33:32 | * | nsf joined #nim |
06:47:32 | * | arecacea1 quit (Remote host closed the connection) |
06:47:49 | * | arecacea1 joined #nim |
06:50:27 | * | yglukhov joined #nim |
06:55:20 | * | yglukhov quit (Ping timeout: 268 seconds) |
07:18:28 | * | yglukhov joined #nim |
07:20:13 | * | dddddd quit (Remote host closed the connection) |
07:36:40 | * | arecacea1 quit (Remote host closed the connection) |
07:36:58 | * | arecacea1 joined #nim |
07:53:14 | * | Trustable joined #nim |
07:58:32 | * | MyMind joined #nim |
07:58:35 | * | Sembei quit (Ping timeout: 240 seconds) |
08:22:30 | * | Trustable quit (Remote host closed the connection) |
08:31:20 | FromGitter | <tim-st> it seems (at least to me) that nimsuggest is much slower with 0.18. I also compiled a dev version of it from 25 days ago, which was quick. Maybe it's because of `--gc:markAndSweep` ? |
08:32:14 | FromGitter | <tim-st> or some new changes |
08:35:34 | * | rokups joined #nim |
08:39:48 | FromGitter | <tim-st> hm, not it seems quicker, maybe something like a warm up^^ |
08:39:52 | FromGitter | <tim-st> *now |
09:03:52 | def- | @tim-st you didn't accidentally compile it without -d:release? |
09:05:44 | * | jaco60 joined #nim |
09:13:56 | FromGitter | <tim-st> I'm using the 0.18 release version from website (`active boot switches: -d:release --gc:markAndSweep`) |
09:15:42 | FromGitter | <tim-st> But as I said now it works good like before 0.18. Maybe this "warm up" delay occured just for me |
09:16:14 | GitDisc | <Teapotrick> hey guys, is there a way to pass the symbol name into the applied pragma? eg. `proc thisFunc*(a: int): int {. something: <the name of this function> .}` |
09:25:02 | * | Vladar joined #nim |
09:39:56 | * | r3d9u11 quit (Read error: Connection reset by peer) |
09:44:12 | FromGitter | <mratsim> Generate the proc with a template, or use a macro for your pragma |
09:44:35 | FromGitter | <mratsim> The macro can retrieve the proc name |
09:45:25 | FromGitter | <tim-st> When I use the new `runnableExamples` I cannot use a type like `Rune` in it that was imported in outer scope? |
09:50:05 | Yardanico | you can AFAIK |
09:54:54 | * | r3d9u11 joined #nim |
09:56:48 | FromGitter | <tim-st> Doesnt work for me, I have to `import unicode` within the `runnableExamples` block |
09:57:25 | FromGitter | <tim-st> btw should these replace tests or should there be additional test cases at the end? |
10:01:36 | FromGitter | <tim-st> but when I think about it, it's not really bad, that something from non stdlib has to be imported so that one can safely recreate the example |
10:14:04 | * | nsf quit (Quit: WeeChat 2.0.1) |
10:15:42 | GitDisc | <Teapotrick> mratsim: i'm looking into macros, i can't see so far how to do what i want. i'll keep digging. |
10:32:50 | FromGitter | <mratsim> @Teapotrick, something like this is probably the easiest: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a9a79d226a769820b2a4db8] |
10:34:10 | FromGitter | <mratsim> and you use `genProc(MyAwesomeProc)` |
10:34:23 | * | xincognito10[m]1 joined #nim |
10:36:47 | * | leorize joined #nim |
10:37:09 | * | xincognito10[m] quit (Ping timeout: 256 seconds) |
10:37:10 | * | d10n quit (Ping timeout: 256 seconds) |
10:37:36 | * | Araq quit (Ping timeout: 256 seconds) |
10:37:52 | * | Araq joined #nim |
10:38:10 | * | dyce[m] quit (Ping timeout: 256 seconds) |
10:38:49 | * | dyce[m] joined #nim |
10:39:06 | * | d10n joined #nim |
10:39:06 | * | d10n quit (Changing host) |
10:39:06 | * | d10n joined #nim |
10:44:18 | * | SenasOzys joined #nim |
10:44:53 | * | nsf joined #nim |
10:47:59 | FromGitter | <mratsim> Is there a FAQ about the community name? https://forum.nim-lang.org/t/3596 |
10:48:30 | GitDisc | <Teapotrick> mratsim: interesting. i'll have to pass the args and return type in separately. that should be no problem, right? |
10:50:10 | FromGitter | <mratsim> not sure what you mean: here are full blown examples of proc generation via template: https://github.com/mratsim/Arraymancer/blob/6b1137214153d0cd8e58d9355818725032f83f8b/src/tensor/private/p_kernels_interface_cuda.nim#L23-L36 |
10:51:01 | FromGitter | <mratsim> proc `binding_name` —> backtick are optional for proc, but required if you want to generate variable names on the fly |
10:51:20 | FromGitter | <mratsim> Relevant part of the manual: https://nim-lang.org/docs/manual.html#templates-identifier-construction |
10:58:53 | GitDisc | <Teapotrick> because the arg list isn't the same for each proc, so i need to pass that in separately. i then want to prepend a small string to the procname when it's in the pragma too. i'm looking over the manual. |
11:00:56 | * | jaco60 left #nim ("Textual IRC Client: www.textualapp.com") |
11:01:09 | GitDisc | <Teapotrick> oh i see. i can use backticks for that |
11:02:49 | FromGitter | <mratsim> Another proc that might be useful for you at one point is `astToStr` to convert an identifier (proc name, variable name) to string. |
11:05:18 | FromGitter | <mratsim> also besides template you can use macro as pragma like this: https://forum.nim-lang.org/t/3310 |
11:05:39 | FromGitter | <mratsim> I’m pretty sure the macro can access the proc name in this case |
11:09:09 | leorize | hi, may I ask what's the current status of destructors? |
11:09:57 | FromGitter | <mratsim> @leorize, you can try them by compiling your code with —new runtime, latest development is described there: https://github.com/nim-lang/Nim/wiki/Destructors |
11:10:07 | FromGitter | <mratsim> —newruntime* |
11:11:28 | leorize | mratsim: I assume every feature listed are currently supported in HEAD? |
11:11:36 | * | wolf135 joined #nim |
11:11:41 | FromGitter | <mratsim> `sink` can be used as a modifier like `var`, it means that the parameter cannot be reused later. (Useful for closing filehandlers) it would be a compile-time error otherwise |
11:12:37 | FromGitter | <mratsim> There is a new `lent`modifier, which means you keep ownership of a param but other can access it read only (otherwise compile tie error) |
11:12:57 | FromGitter | <mratsim> Not all, it’s more a vision document |
11:13:14 | yglukhov | Is it valid for return type to be a typeclass? |
11:13:40 | FromGitter | <mratsim> @yglukhov it worked for me, but it’s a bit hacky |
11:13:57 | FromGitter | <mratsim> especially “auto" |
11:14:00 | yglukhov | It works for me too, but i've got now idea how |
11:14:12 | leorize | mratsim: Thanks. Do you know how could I set --newruntime for an entire nimble package (lib only)? |
11:14:43 | yglukhov | well auto i can understand. its inferred from the body. but typeclass (given that its an importcpp proc) i can't understand =) |
11:15:11 | FromGitter | <mratsim> @leorize, unfortunately I don’t think it’s possible, you can ship a nim.cfg but a package cannot enforce compilation flags |
11:15:41 | FromGitter | <mratsim> I would love to, in Arraymancer I would love to autodetect OpenMP for example |
11:16:13 | * | couven92 joined #nim |
11:16:15 | leorize | mratsim: many thanks for your help |
11:16:33 | FromGitter | <mratsim> @leorize: here is an example - https://github.com/mratsim/Arraymancer/blob/master/nim.cfg |
11:18:57 | leorize | IIRC one could have an projectName.nims file enforcing options for the project, but I haven't got any success applying it to a package |
11:20:01 | yglukhov | mratsim, Araq, zah: it looks like typeclass can be used as a return value as long as the same typeclass is used as an argument. then its inferred from the argument. is this intended and can be relied upon? |
11:20:20 | GitDisc | <Teapotrick> https://hastebin.com/uhogerevab.nim |
11:20:20 | GitDisc | <Teapotrick> |
11:20:20 | GitDisc | <Teapotrick> As you can see: I've got no idea what i'm doing |
11:21:42 | FromGitter | <mratsim> @leorize: What Araq told me was that if every package enforces its own custom options, it would be a complete mess so we leave that to end users. |
11:21:44 | GitDisc | <Teapotrick> 1. generate whole proc dec, using name, args, and ret type. |
11:21:44 | GitDisc | <Teapotrick> 2. just generate the pragma |
11:23:16 | FromGitter | <mratsim> for wrpping libraries, you can use c2nim |
11:23:22 | FromGitter | <mratsim> it will do it for you |
11:23:27 | leorize | mratsim: I assume a nice note in the README file would work then. But it would be nice if one can bails out when detect the lack of a feature. |
11:23:38 | FromGitter | <mratsim> agreed |
11:24:43 | FromGitter | <mratsim> @teapotrick, I think you’re overcomplicating things ;) |
11:25:40 | GitDisc | <Teapotrick> mratsim: that doesn't look like any fun at all! 😛 |
11:25:51 | GitDisc | <Teapotrick> complication is the spice of life. |
11:26:54 | FromGitter | <mratsim> ```code paste, see link``` ⏎ ⏎ Should work [https://gitter.im/nim-lang/Nim?at=5a9a867e012ff2bf681d1663] |
11:28:11 | FromGitter | <prollings> but that assumes the arg lisr |
11:28:15 | FromGitter | <mratsim> or use c2nim and strip the prefix ;) or nimgen: https://github.com/genotrance/nimgen |
11:28:49 | FromGitter | <Bennyelg> Hey |
11:28:59 | FromGitter | <mratsim> @prollings since he is wrapping a c library I suppose he can get the arg list from the header |
11:29:08 | FromGitter | <mratsim> hey Benny |
11:29:16 | FromGitter | <Bennyelg> Im trying to make a pull request for the first time, I am in my branch locally, I am trying to push it but I am with ` sufficient permissions ` |
11:29:25 | FromGitter | <Bennyelg> any help will be great. |
11:29:35 | GitDisc | <Teapotrick> i wanna do it by hand first, just so i know how this stuff works (second day using nim) |
11:30:29 | FromGitter | <mratsim> 1) fork the Nim repo in Github ⏎ 2) clone your fork ⏎ 3) Branch your fork ⏎ 4) push your commit to your fork ⏎ 5) PR from your fork to Nim main ... [https://gitter.im/nim-lang/Nim?at=5a9a875501a2b40f382d66d0] |
11:30:45 | FromGitter | <Bennyelg> thanks |
11:31:08 | wolf135 | Hi all, I have just started learning. The program in the first tutorial closes the cmd immediately after printing the second line. I figured out that "let input = readChar(stdin)" makes it wait for Enter, but I'd rather have any key close the program. How could I achieve it? |
11:31:52 | FromGitter | <mratsim> @teapotrick Cool, I would start first by getting the simple proc to work, and only then abstracting with a template. Anyway, macros on your second day, you’re quite intrepid ;) |
11:33:43 | GitDisc | <Teapotrick> suits my use cases. :D |
11:33:43 | GitDisc | <Teapotrick> Will do. |
11:38:35 | FromGitter | <mratsim> @teapotrick, here is a very simple wrapper of a C library I generated via c2nim 2 weeks ago: https://github.com/status-im/nim-rocksdb/blob/master/src/rocksdb_c.nim |
11:39:52 | FromGitter | <mratsim> remember, importc requires a string, the way to transform an identifier like procName to a string is `astToStr` in the macros module |
11:41:41 | GitDisc | <Teapotrick> mratsim: looks great. is it possible to get it to convert types from the header to nimcode, so that there's no requirement of actually having the header when building the module? D: |
11:41:55 | * | Pisuke joined #nim |
11:43:29 | * | MyMind quit (Ping timeout: 248 seconds) |
11:51:02 | dom96 | wolf135: this should work: https://nim-lang.org/docs/terminal.html#getch, |
11:54:00 | niv | sooooo, are there any plans for getting official docker images on track? |
11:55:01 | dom96 | niv: no |
11:56:26 | niv | not sure how i feel about that. the nimlang/ ones are very convenient, but outdated now |
11:56:52 | niv | next question: what about the `func` keyword? appears to be func-tional in 0.18, but documentation makes no mention of it |
11:57:05 | wolf135 | dom96: that worked, thanks! |
11:57:27 | dom96 | The core team doesn't have time to be maintaining these things. Contact the maintainer of that docker image. |
11:57:55 | dom96 | You can also create your own docker image :) |
11:59:43 | niv | yeah, i've opened an issue with them right now. i do create my own images right now but i'd rather stick to nimlang/. maybe they want some help with keeping them updated. |
12:00:14 | dom96 | it would certainly be nice if they give us access to that docker org |
12:00:15 | niv | fwiw, i think getting automated builds up on a really-official image repository would not be hard to do. i'd offer help with that too if that ever becomes a thing |
12:00:27 | niv | i think we could contact dockerhub and ask them to get the global "nim" tag |
12:00:37 | niv | and by we, i mean you |
12:00:44 | dom96 | niv: sounds like a good idea |
12:00:57 | dom96 | lol, why me? |
12:01:02 | Zevv | dom96: I'm chasing an occasional SIGSEGV in my code that only happens on -d:release, but does not show up without that flag. Valgrind finds a read from address 0x08. I suspect it might be something GC related, any hints on how to go on debugging this? |
12:01:08 | niv | because you are a nim developer/representative and i am not |
12:01:15 | dom96 | Nim isn't some centralised project where I and Araq hold all the power |
12:01:26 | niv | i bet dockerhub will want verification and a official contact point for issues |
12:01:29 | Zevv | Yeah, you're the benevolent dictators! |
12:01:41 | dom96 | We can't do everything, it's up to the community to step in i.e. you |
12:01:46 | dom96 | Especially if you want something to be done |
12:02:43 | dom96 | I can certainly help out if they need "official approval" or something, but at least try to get the ball rolling, I would appreciate that |
12:02:49 | niv | reading up on it now |
12:03:49 | * | Zevv quit (Remote host closed the connection) |
12:03:51 | * | Snircle joined #nim |
12:04:36 | dom96 | Zevv: Try compiling with -d:useGcAssert (hope you will see this in the IRC logs) |
12:04:43 | niv | yeah, it's a lengthy process. ugh. |
12:05:21 | * | xkapastel joined #nim |
12:05:41 | FromGitter | <dom96> Pretty sure it's @moigagoo who's the maintainer, we can ping him to update the docker image :) |
12:05:54 | niv | i've created a low-effort ticket asking them to update |
12:07:02 | niv | nim 0.18 was pleasant to upgrade, btw, even on a mid-sized codebase. just a couple of changes, none of them painful |
12:09:24 | dom96 | I think you just got lucky. This release has a lot of breaking changes :) |
12:09:51 | niv | i guess :) still, it's a data point |
12:17:44 | miran | ok, maybe it is time for me to upgrade too.... i've been waiting to see if any major bugs would be reported, but it seems everything's fine |
12:20:42 | FromGitter | <mratsim> @teapotrick: yes, c2nim ;), my wrapper doesn’t need the header, it only needs the shared lib |
12:21:16 | FromGitter | <mratsim> @zacharycarter don’t forget to update the playground to 0.18, printing arrays doesn’t work in the playground and it’s sad :/ |
12:29:25 | dom96 | !eval echo(NimVersion) |
12:29:27 | NimBot | 0.17.2 |
12:29:48 | dom96 | !eval if NimVersion != "0.18.0": echo(":'(") else: echo("yay") |
12:29:51 | NimBot | :'( |
12:30:04 | dom96 | Eventually we'll get a "yay" :P |
12:33:26 | dom96 | Definitely a lot more forum threads than usual :) |
12:35:25 | Yardanico | dom96, did you ask zachary to update? |
12:35:32 | Yardanico | zacharycarter I mean :) |
12:35:37 | dom96 | he knows |
12:36:10 | miran | dom96: and more new nicks here on irc, from what i've seen |
12:36:29 | dom96 | yep |
12:38:30 | federico3 | I wonder if FOSDEM has something to do with it :) |
12:39:01 | miran | federico3: or threads about 0.18 on HN and reddit? ;) |
12:41:15 | federico3 | miran: sure it's the release but people need to know and care about the language to notice |
12:42:17 | Yardanico | dom96, https://qiita.com/2vg/items/0e75b686800d0b27b5e9 :P |
12:42:35 | Yardanico | someone took their time to translate blog post to japanese |
12:42:56 | FromGitter | <ZarsBranchkin> Haha, that's pretty great! |
12:43:15 | miran | on /r/programming it received mostly positive comments and it stayed on a frontpage for a long time - i think these two things combined are enough for curious minds to notice and try a new language |
12:43:33 | Yardanico | https://sdtimes.com/ai/sd-times-news-digest-nim-0-18-0-intellij-idea-2018-1-learn-google-ai/ |
12:44:51 | dom96 | Yardanico: ooh |
12:45:30 | Yardanico | dom96, ? is this a big website? |
12:45:45 | dom96 | no, that was to the japanese translation link |
12:45:48 | Yardanico | ah, yeah |
12:46:00 | Yardanico | 2vg has some stuff in nim: https://github.com/2vg |
12:46:10 | dom96 | Funny to see Nim at the top and Rust at the bottom of that article though |
12:46:16 | Yardanico | https://github.com/2vg/mofuw :P |
12:47:01 | Yardanico | there's some benchmarks |
12:47:28 | Yardanico | and the best thing - it only uses stdlib |
12:47:35 | FromGitter | <mratsim> > not like libuv ? ⏎ > A. No. but, tired of memory management lel. |
12:47:46 | Yardanico | well, and also posix/winlean stuff - TCP_NODELAY |
12:48:07 | dom96 | heh, I guess I'm not the only one writing a fast HTTP server |
12:48:09 | Yardanico | https://github.com/2vg/mofuw/blob/master/example/helloworld/minimal.nim |
12:48:13 | Yardanico | seems pretty good |
12:48:15 | dom96 | and that's good |
12:48:24 | FromGitter | <ZarsBranchkin> I love how hyped that readme is |
12:48:25 | Yardanico | dom96, competition is always good |
12:48:40 | Yardanico | wait that |
12:48:44 | Yardanico | *what - "multi-thread event-loop." |
12:48:56 | miran | zars: on the other hand, it screams "i'm 13 year old" to me :D |
12:48:56 | Yardanico | he uses threadpool |
12:49:09 | Yardanico | miran, he's just japanese :P |
12:49:14 | enthus1a1t | asynchttp needs to be fuzzed, it was to easy back then to spot bugs |
12:49:21 | enthus1a1t | too |
12:49:23 | dom96 | Yardanico: Are you sure it's a he? :) |
12:49:32 | Yardanico | dom96, they :D |
12:49:39 | FromGitter | <mratsim> @miran, I agree but snapchat was built by 13yo :D |
12:49:41 | Yardanico | https://github.com/2vg/mofuparser his parser |
12:49:45 | Yardanico | their* |
12:49:56 | federico3 | https://ni-vg.com/ ehm |
12:50:00 | Yardanico | IDK what is this though - https://github.com/2vg/mofuparser/blob/master/mofuparser.nim#L1 |
12:50:23 | Yardanico | and parser is sadly unsafe (uses ptr and casts) |
12:50:26 | FromGitter | <ZarsBranchkin> damn, at least has more content than my website |
12:50:28 | Yardanico | well, for performance |
12:50:56 | FromGitter | <mratsim> we need more examples of safe DSL like the SQL one in the tutorial |
12:52:00 | dom96 | snapchat wasn't built by 13 year old? |
12:53:05 | dom96 | FWIW I was 14 when I started with Nim :P |
12:53:23 | miran | dom96: how old are you now? :) |
12:53:36 | dom96 | 22 |
12:53:54 | miran | wow!! i thought you were older! |
12:53:57 | miran | i was 31 when i started with nim |
12:54:12 | miran | and i'm 31 now :D |
12:54:12 | FromGitter | <ZarsBranchkin> oh wow, started off with Nim real early |
12:54:24 | FromGitter | <ZarsBranchkin> Yeah, started with Nim this year as well |
12:54:26 | Yardanico | miran, I was 16 when I started Nim :P |
12:54:43 | Yardanico | (one year ago) |
12:55:04 | FromGitter | <2vg> > **<Yardanico>** IDK what is this though - https://github.com/2vg/mofuparser/blob/master/mofuparser.nim#L1 ⏎ ⏎ It is used for some token check #L199 (https://github.com/2vg/mofuparser/blob/master/mofuparser.nim#L199) |
12:55:11 | miran | omg, what am i doing here among all you youngsters |
12:55:15 | planetis[m] | https://github.com/2vg/mofuw <- hey what language is he speaking? :p |
12:55:32 | federico3 | ZarsBranchkin: "real early" is 9 |
12:55:59 | FromGitter | <ZarsBranchkin> Well yeah, but I wasn't aware Nim was around for this long |
12:56:06 | Yardanico | @2vg , btw, maybe you can change these if statements to one statement and compare if value is in set? https://github.com/2vg/mofuparser/blob/master/mofuparser.nim#L109 |
12:56:11 | Yardanico | sets are very high performacne in nim too |
12:56:16 | Yardanico | *performance |
12:56:44 | Yardanico | like `if not(cast[ptr char](buf)[] in {'\72', '\84' etc}: |
12:57:04 | Yardanico | if not(cast[ptr char](buf)[] in {'\72', '\84' etc}): |
12:57:17 | planetis[m] | oh sorry didn't realise the author was here no offence mate |
12:57:18 | FromGitter | <2vg> > **<Yardanico>** @2vg , btw, maybe you can change these if statements to one statement and compare if value is in set? https://github.com/2vg/mofuparser/blob/master/mofuparser.nim#L109 |
12:57:41 | dom96 | miran: Don't worry, plenty of seniors here :P |
12:58:22 | Yardanico | @2vg ah, I understand |
12:58:29 | Yardanico | you need buf +=1 between these checks |
12:58:45 | miran | dom96: seniors? SENIORS? listen to me punk! when i was your age, we treated older people with respect!!! {P |
12:58:48 | miran | :P |
12:58:51 | FromGitter | <2vg> yes |
12:59:15 | FromGitter | <ZarsBranchkin> Sounds like something that can be turned into a macro though |
12:59:20 | federico3 | oh 2vg is here - youkoso |
12:59:20 | dom96 | miran: lol |
12:59:40 | Yardanico | ZarsBranchkin: template should be enough :) |
12:59:56 | Yardanico | or maybe for loop |
13:00:01 | Yardanico | yeah |
13:00:10 | FromGitter | <ZarsBranchkin> Yeah, not sure why for loop wasn't used here |
13:00:41 | Yardanico | anyway, I'm gonna experiment with mofuw |
13:00:52 | FromGitter | <2vg> arigatou ⏎ ⏎ By the way, I'm pretty interested by httpbeast (https://github.com/dom96/httpbeast) |
13:01:10 | dom96 | yeah, I need some time to work on it |
13:01:32 | federico3 | that's a lot of work |
13:01:34 | dom96 | I got discouraged though because I benchmarked the most barebones server and it didn't perform that much better than Rust's tokio |
13:02:41 | Yardanico | @2vg - btw, about tokio-minihttp vs your mofuw - does tokio have multi-threading? |
13:03:11 | Yardanico | it seems it's single-threaded, but I don't know Rust |
13:04:05 | FromGitter | <2vg> > **<Yardanico>** @2vg - btw, about tokio-minihttp vs your mofuw - does tokio have multi-threading? ⏎ ⏎ maybe. ⏎ I looked at lsof but had the same number of cores as the core thread. [https://gitter.im/nim-lang/Nim?at=5a9a9d4435dd17022e1781c5] |
13:05:02 | * | federico3 goes back to packaging Nim |
13:05:12 | dom96 | Pretty sure it does |
13:05:20 | dom96 | I remember seeing a 'spawn' in its source code somewhere |
13:06:26 | miran | dom96: just upgraded using choosenim, and now i get "Warning: Nimble v0.8.1 is not supported by choosenim, using it will yield errors." |
13:06:42 | dom96 | miran: update your choosenim |
13:07:05 | miran | choosenim update choosenim? |
13:07:14 | dom96 | no, just run the init.sh script again |
13:07:35 | dom96 | the newest version allows self updates via `choosenim update self` |
13:07:56 | miran | where's that script? |
13:08:26 | dom96 | curl https://nim-lang.org/choosenim/init.sh -sSf | sh |
13:08:27 | dom96 | Just run this |
13:09:03 | miran | Error: unhandled exception: cannot open: /home/miran/.nimble/bin/nimsuggest [IOError] |
13:09:30 | dom96 | is it running? |
13:10:08 | miran | heh, vscode was running. closed it, now it seems ok |
13:10:29 | * | couven92 quit (Ping timeout: 260 seconds) |
13:12:43 | miran | everything updated. it's testing time :) thanks for the help |
13:13:31 | FromGitter | <zacharycarter> @mratsim - updating the playground is going to be difficult without the docker image repo getting updated :/ |
13:13:42 | FromGitter | <zacharycarter> that or I can update the playground to use devel - but I'm not sure we want that |
13:13:56 | FromGitter | <mratsim> the one from @yglukhov ? |
13:14:15 | FromGitter | <zacharycarter> I'm using these - https://hub.docker.com/r/nimlang/nim/ |
13:15:02 | FromGitter | <zacharycarter> I guess this is the repo behind it https://github.com/moigagoo/nimage |
13:15:14 | FromGitter | <mratsim> oh, check this one: https://github.com/yglukhov/nim-docker |
13:15:58 | FromGitter | <zacharycarter> looks like that one only supports devel... |
13:16:12 | FromGitter | <zacharycarter> maybe I'll just write my own :P |
13:16:15 | FromGitter | <mratsim> https://github.com/moigagoo/nimage/issues/10 |
13:17:05 | FromGitter | <zacharycarter> ah - there we go |
13:17:48 | FromGitter | <zacharycarter> If he doesn't - I'll just fork his and update it and switch the playground to use my images instead |
13:20:01 | Yardanico | @zacharycarter: just make a pr? |
13:20:02 | Yardanico | https://github.com/moigagoo/nimage/commit/3238fc9cd3f17cb43cef1c9b241145ab0d4085cd |
13:20:06 | Yardanico | it seems easy enough :P |
13:24:02 | dom96 | I wonder how many people don't say "yes" to the choosenim analytics prompt |
13:25:15 | FromGitter | <zacharycarter> @Yardanico - I can make a PR - but if he's not actively maintaining the repo, what good will it do? I fit's that easy to fix - an issue should be just fine I think. |
13:27:01 | Yardanico | zacharycarter: I'll try to contact him on VK (russian social network) |
13:27:13 | FromGitter | <zacharycarter> sweet - thank you! |
13:29:23 | Yardanico | He said he's busy on work, but he'll try his best to update it today |
13:31:17 | * | momf joined #nim |
13:31:40 | FromGitter | <mratsim> Yet Another Concurrent lock free data structure: https://www.reddit.com/r/programming/comments/81d5hc/cachetries_a_new_lockfree_concurrent_data/ not sure about the use cases |
13:33:15 | dom96 | not what I wanted to do lol |
13:35:30 | FromGitter | <zacharycarter> Yardanico: sweet! thank you! |
13:42:17 | * | Vladar quit (Read error: Connection reset by peer) |
13:48:27 | * | r3d9u11 quit (Remote host closed the connection) |
13:49:11 | * | r3d9u11 joined #nim |
13:56:54 | * | r3d9u11 quit (Remote host closed the connection) |
13:58:04 | * | r3d9u11 joined #nim |
13:58:53 | FromGitter | <alehander42> I am probably missing something obvious: how can I compile a nim file to js "lib", so all `*` functions are actually generated (even if not invoked) |
13:59:06 | FromGitter | <alehander42> (the same way it works for c) |
13:59:50 | Yardanico | turn off deadCodeElim? |
14:00:10 | FromGitter | <alehander42> nope, still not generated |
14:01:26 | * | dddddd joined #nim |
14:02:01 | FromGitter | <alehander42> e.g. ⏎ ⏎ ```proc a*(e: int) = ⏎ echo e ⏎ ⏎ proc b*(x: int) = ⏎ a(x)``` ⏎ ⏎ always generates 0 function defs [https://gitter.im/nim-lang/Nim?at=5a9aaad9e4d1c63604b8d5ac] |
14:02:49 | * | wolf135 quit (Quit: Leaving) |
14:02:52 | * | couven92 joined #nim |
14:03:59 | * | momf quit (Ping timeout: 260 seconds) |
14:04:33 | dom96 | alehander42: you need to {.exportc.} them |
14:06:59 | Yardanico | yeah, you can just do {.push exportc.} at the start of the file and {.pop exportc.} and the end AFAIK |
14:09:16 | * | r3d9u11 quit (Remote host closed the connection) |
14:09:53 | FromGitter | <alehander42> thank you, guys, that's working great |
14:10:51 | FromGitter | <alehander42> still, I bit puzzled: why `exportc` makes it generate the functions, but not `*` ? (also, it seems the functions are always generated in C, even if they're not `*`) |
14:11:15 | FromGitter | <alehander42> `{.pop.}` btw |
14:12:14 | FromGitter | <alehander42> ah, I guess because it generates <name>_stuff which wouldn't be usable in another js module ? |
14:17:25 | dom96 | because the export marker is for Nim only |
14:19:42 | Yardanico | alehander42: nim generates unique names by default to not clash with functions from other libraries |
14:20:00 | FromGitter | <alehander42> yeah, I figured that out , makes sense |
14:32:34 | FromGitter | <alehander42> ah fuck |
14:32:56 | FromGitter | <alehander42> my asyncjs macro replaces all other pragmas of a function |
14:33:16 | FromGitter | <alehander42> I have a patch, but I should've found that a little bit earlier |
14:52:20 | * | r3d9u11 joined #nim |
15:00:40 | * | natrys joined #nim |
15:03:51 | FromGitter | <zacharycarter> It looks like - https://github.com/aidansteele/aws_sdk.nim - has quite a few API bindings now |
15:04:16 | FromGitter | <zacharycarter> Has anyone tried doing anything with it? I have a prototype I need to build for work - and I was going to use golang |
15:05:33 | FromGitter | <zacharycarter> assuming the aws bindings work for dynamodb - the only other missing piece for me to be able to advocate for being able to use Nim, would be the lack of an elasticsearch client |
15:08:56 | FromGitter | <ZarsBranchkin> Uhh, how can I get the name of the application being compiled? |
15:09:21 | FromGitter | <zacharycarter> https://nim-lang.org/docs/os.html#getAppFilename, |
15:10:02 | FromGitter | <ZarsBranchkin> Hmm, what about compile time? I wanted to use it in macro |
15:11:06 | FromGitter | <zacharycarter> not sure about that |
15:20:00 | miran | @mratsim: "Package 'arraymancer' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'arraymancer', but file 'ufunc.nim' is in a directory named 'tensor' instead. This will be an error in the future." |
15:21:20 | FromGitter | <mratsim> yes, but it’s a pain to move that to subdirectories, already told that in the relevant RFC: https://github.com/nim-lang/Nim/issues/6700 |
15:24:09 | miran | ok, i didn't know you know :) |
15:24:24 | FromGitter | <zacharycarter> miran: what are doing with arraymancer just ooc? |
15:25:21 | miran | zachary: i have just installed it right now, because 'neo' was very slow and impractical for one problem i'm trying to translate from python |
15:25:27 | FromGitter | <zacharycarter> @mratsim - what is the functional use case for arraymancer? Is it to provide the building blocks for another lib like tensorflow? Or is it meant to replace such a library? |
15:25:30 | FromGitter | <zacharycarter> miran: gotcha |
15:25:31 | miran | i'll see if i can do it in arraymancer |
15:26:33 | * | r3d9u11 quit (Ping timeout: 268 seconds) |
15:27:34 | miran | @mratsim: i have just started - wanted to create a constant tensor, i have seen in docs i should use 'ones' for that - and i get deprecation warning!? |
15:29:00 | leorize | hi, is it possible for one to interact with C va_list? |
15:29:05 | miran | warning doesn't say what should be used instead.... |
15:32:07 | FromGitter | <mratsim> mmmh ones is not deprecated, but there was a version that offered to choose a backend that is |
15:32:37 | FromGitter | <mratsim> `ones(3,3)`should work |
15:33:52 | miran | @mratsim: how to declare with the new syntax i want ones of type float? |
15:33:54 | FromGitter | <mratsim> well onesfloat32 (3,3) |
15:35:14 | miran | ok, i created with `ones[float](spaceSteps, timeSteps`, and it still raises a warning |
15:38:10 | FromGitter | <mratsim> I don’t have any warning with that: ⏎ ⏎ ```import ../src/arraymancer ⏎ let a = ones[float](10, 20) ⏎ echo a``` ⏎ ⏎ What version are you using? #head or a stable one? [https://gitter.im/nim-lang/Nim?at=5a9ac1623fe1be3704c9611e] |
15:38:34 | miran | stable, installed with `nimble install arraymancer` |
15:39:15 | FromGitter | <mratsim> oh, i know, there is a bug in Nim |
15:39:55 | FromGitter | <mratsim> https://github.com/nim-lang/Nim/issues/6436 |
15:40:11 | * | r3d9u11 joined #nim |
15:40:48 | FromGitter | <mratsim> I mentionned it in the PR that introduced the syntax change, the only way is to completely remove the deprecated proc: https://github.com/mratsim/Arraymancer/pull/72 |
15:42:11 | miran | ok, i'll keep using newer syntax |
15:42:28 | miran | would you recommend to install devel version of AM? |
15:45:33 | FromGitter | <mratsim> The difference between devel and the latest stable are: ⏎ ⏎ 1) MNIST data loader ⏎ 2) CSV file reader ⏎ 3) Neural net: softmax loss, maxpool, reshape, flatten layers ... [https://gitter.im/nim-lang/Nim?at=5a9ac31d01a2b40f382d67bc] |
15:45:39 | * | smt` joined #nim |
15:45:48 | FromGitter | <mratsim> There is no change to the pure tensor/Numpy like part |
15:46:19 | miran | ok |
15:47:20 | miran | how should i declare tensor parameters in functions? is it enough `t: Tensor`? should i give it a type? anything else? |
15:48:56 | * | smt quit (Ping timeout: 265 seconds) |
15:49:18 | FromGitter | <mratsim> Either t: Tensor[T] or t:Tensor if you never used the T |
15:53:02 | FromGitter | <zacharycarter> leorize: something like - https://play.nim-lang.org/?gist=4af33d4dcb7e4324a0718ea53ae662af - I imagine |
15:53:15 | miran | i'm getting an error here: `Ts[1..^2, t]` - i want to get elements of column `t`, from the second to the second-last |
15:54:14 | miran | similar error here: `Ts[^2, t+1]` |
15:55:36 | leorize | zacharycarter: I mean working with the va_list object itself. Some C func have callback that takes a va_list as a param |
15:56:26 | FromGitter | <zacharycarter> oh... |
15:57:02 | FromGitter | <mratsim> @miran: https://gist.github.com/mratsim/c03fe1ce187f4b0cb23ad694c06fcfe4 |
15:57:56 | FromGitter | <zacharycarter> leorize: maybe take a look at these search results: https://github.com/search?l=&q=va_list+language%3ANim&ref=advsearch&type=Code&utf8=%E2%9C%93 |
15:59:30 | miran | @mratsim: your example works. i'll try to see what am i doing wrong |
16:01:10 | miran | can it have something to do with trying to assign it to a column next to it? |
16:01:47 | miran | e.g. `Ts[^1, t+1] = Ts[^2, t+1]` |
16:02:55 | miran | ok, found the error |
16:03:06 | miran | as usual - i'm stupid :D |
16:03:32 | leorize | zacharycarter: none seems to implement any way to access the contents :/ |
16:04:40 | leorize | anyone know if it's possible to pass a type name from Nim to C? |
16:04:44 | leorize | http://www.cplusplus.com/reference/cstdarg/va_arg/ |
16:06:29 | miran | @mratsim: managed to run my program! from this basic example, i must say - arraymancer is very nice/easy/intuitive to use! well done!! |
16:07:28 | FromGitter | <mratsim> Thanks :) |
16:09:33 | FromGitter | <ZarsBranchkin> Hmm, I tried getAppFilename, but that didn't work for me. Somehow I want to find out the name of the dynamic library that is compiled from Nim |
16:12:12 | * | r3d9u11_ joined #nim |
16:12:12 | * | r3d9u11 quit (Read error: Connection reset by peer) |
16:12:12 | federico3 | Nim 0.18.0 is in Debian \o/ |
16:12:33 | FromGitter | <mratsim> wow, bleeding edge :P |
16:12:41 | * | Trustable joined #nim |
16:12:44 | federico3 | yep |
16:13:19 | * | smt` is now known as smt |
16:13:31 | dom96 | federico3: yay, great work :) |
16:13:41 | FromGitter | <ZarsBranchkin> heh, arch is still on 0.17, but at least already flagged as out of date |
16:14:04 | FromGitter | <mratsim> @ZarsBranchkin I’m pretty sure I saw a ModuleInfo proc somewhere for that |
16:14:10 | miran | @mratsim there is a gotcha with `[5 .. ^5]` vs `[5..^5]` (with and without whitespace). i didn't seen it mentioned in documentation/tutorial. should i make a pr? |
16:14:17 | federico3 | it should land in Ubuntu soon |
16:14:20 | FromGitter | <ZarsBranchkin> hmm, will try looking for it |
16:14:29 | FromGitter | <mratsim> @miran oh, yes please |
16:15:03 | miran | ok, i'll try to play some more to see if something else needs to be added/clarified |
16:15:18 | federico3 | dom96: it was quite a bit of work... and now it's on the new VCS e.g. https://salsa.debian.org/debian/nim/commits/master |
16:15:33 | FromGitter | <mratsim> @zrs |
16:15:43 | FromGitter | <mratsim> @ZarsBranchkin it’s instantiationInfo in system |
16:16:11 | FromGitter | <mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a9aca4a7685a046389c37bf] |
16:16:43 | * | wolf135 joined #nim |
16:19:24 | FromGitter | <ZarsBranchkin> Ah, neat. That's something, but kind of worried about library being renamed, thus name of the source file wouldn't really cut it |
16:19:35 | * | kunev quit (Ping timeout: 268 seconds) |
16:19:40 | FromGitter | <ZarsBranchkin> I basically get `libtestModule.so` and I want to get that string in Nim |
16:21:35 | * | MJCaley joined #nim |
16:21:55 | * | kunev joined #nim |
16:22:55 | * | r3d9u11_ quit (Remote host closed the connection) |
16:24:40 | * | r3d9u11 joined #nim |
16:30:27 | Yardanico | I think this can be closed? https://github.com/nim-lang/Nim/issues/7290 |
16:48:10 | * | r3d9u11 quit (Read error: Connection reset by peer) |
16:49:43 | * | endragor quit (Remote host closed the connection) |
16:51:05 | * | r3d9u11 joined #nim |
16:54:51 | GitDisc | <Teapotrick> I'm back from a long stint of procrastination: |
16:54:52 | GitDisc | <Teapotrick> https://thepasteb.in/p/oYhLc6D9B44XgF8 |
16:54:52 | GitDisc | <Teapotrick> |
16:54:52 | GitDisc | <Teapotrick> pls help. I know I can use c2nim and others, but this is a learning experience. I will use them eventually. |
16:54:52 | GitDisc | <Teapotrick> My aim is to call this template with a proc name, a list of its arguments (preferably named), and its return type. The args list is of variable length and types. |
16:57:55 | * | r3d9u11 quit (Remote host closed the connection) |
16:58:52 | * | r3d9u11 joined #nim |
17:16:58 | dom96 | Teapotrick: I'm afraid you will need to use a macro for this |
17:18:47 | GitDisc | <Teapotrick> waheee. back to macros. i'm okay with that. |
17:18:58 | GitDisc | <Teapotrick> any...hints? 😛 |
17:19:32 | dom96 | echo args.treeRepr |
17:19:52 | dom96 | dumpTree: <the proc you want to generate> |
17:20:02 | dom96 | figure out how to create the AST shown by `dumpTree` |
17:20:10 | dom96 | and use the info from 'args' to do it |
17:26:06 | * | MJCaley quit (Quit: MJCaley) |
17:38:28 | * | miran quit (Quit: Konversation terminated!) |
17:41:03 | * | r3d9u11 quit (Read error: Connection reset by peer) |
17:42:54 | * | r3d9u11 joined #nim |
17:43:20 | * | miran joined #nim |
17:44:03 | GitDisc | <Teapotrick> ah okay. that seems to be on the right tracks. it might take me a while to work out though. 😛 thank you! |
17:47:25 | Yardanico | @zacharycarter, dom96 - nimage has 0.18.0 added |
17:47:26 | Yardanico | 30 mins ago |
17:47:33 | Yardanico | https://github.com/moigagoo/nimage/commit/cf58d560e8b72ba2377efed3d062ac05bce2a449 |
17:47:49 | Yardanico | dom96 https://github.com/moigagoo/nimage/issues/11 :) |
17:49:48 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
17:49:49 | * | r3d9u11 quit (Read error: Connection reset by peer) |
17:49:49 | * | r3d9u11_ joined #nim |
18:05:32 | * | r3d9u11_ quit (Remote host closed the connection) |
18:06:39 | * | SenasOzys quit (Remote host closed the connection) |
18:10:46 | * | SenasOzys joined #nim |
18:17:42 | * | r3d9u11 joined #nim |
18:17:48 | couven92 | Haha, I just watched a YouTube video where someone pranked a "Microsoft Tech Support"-Scammer... Because these scammers often use TeamViewer for RemoteAccess, TeamViewer now just flat out denies any connection to an IP in India! LOL! |
18:18:02 | couven92 | https://www.youtube.com/watch?v=DFRbUhhQmZs |
18:18:30 | dom96 | couven92: #nim-offtopic |
18:18:43 | couven92 | dom96, yeah, sorry |
18:18:44 | couven92 | :P |
18:18:50 | couven92 | I forgot myself |
18:26:20 | * | r3d9u11 quit (Remote host closed the connection) |
18:29:44 | * | MJCaley joined #nim |
18:35:46 | dom96 | I submitted Nim to lobste.rs :) https://lobste.rs/s/gwzrlh/nim_v0_18_0_formatted_string_literals |
18:39:07 | * | PMunch joined #nim |
18:48:29 | Yardanico | dom96, Araq https://github.com/nim-lang/Nim/issues/7291 |
18:48:50 | Yardanico | this is intended, right? |
18:48:51 | Yardanico | or not? |
18:49:41 | Yardanico | wait, "a" < "" and "a" > "" both output false |
18:49:53 | PMunch | That sounds like a bug :P |
18:50:14 | PMunch | Otherwise "a" == "" should evaluate to true |
18:51:27 | Yardanico | but we have a lot of tests, how can this sneak into a major release? :D |
18:51:55 | dom96 | I doubt our test coverage is even at 10% |
18:55:13 | * | ofelas joined #nim |
18:55:50 | miran | well, another priority before 1.0 :) |
18:57:59 | Yardanico | dom96, 0.18.0 docker images are uploaded to docker hub |
18:58:41 | dom96 | Yardanico: okay, great, but why highlight me? |
18:59:49 | FromGitter | <moigagoo> Hi guys! |
19:00:03 | FromGitter | <moigagoo> I've just pushed Docker images for Nim 0.18.0 to Docker Hub. |
19:00:20 | Yardanico | dom96, well, IDK :P |
19:00:31 | Yardanico | @zacharycarter 0.18.0 images are on docker hub |
19:03:24 | FromGitter | <moigagoo> Unfortunately, I'm very busy at work and can't update the images as soon as a new release is ready. |
19:04:00 | FromGitter | <moigagoo> But adding a new version is pretty easy, anyone can do it. Just add a line to config.json and rebuild `build.nim` in Linux. |
19:04:19 | FromGitter | <moigagoo> All images will be rebuild on Travis CI after push to master. |
19:04:34 | FromGitter | <moigagoo> Which makes me think if we could automate that. |
19:04:46 | * | miran quit (Quit: Konversation terminated!) |
19:04:56 | FromGitter | <moigagoo> Should be pretty easy. |
19:07:22 | * | miran joined #nim |
19:07:58 | dom96 | moigagoo: thanks for updating :) |
19:09:22 | FromGitter | <moigagoo> @dom96 Thanks for the great new release ;-) |
19:09:43 | FromGitter | <moigagoo> @dom96 Who's in charge of Nim's CI routine? |
19:09:57 | dom96 | CI routine? |
19:10:25 | FromGitter | <moigagoo> I mean, Nim does use some sort of CI service to automate stuff on release, doesn't it? |
19:10:35 | dom96 | no |
19:10:50 | FromGitter | <moigagoo> Oh, now I see :-) |
19:14:09 | FromGitter | <moigagoo> Maybe we should discuss introducing one. I'm sure there are tasks other then building and uploading Docker images that could be automated. Even if it's the only one, I'd still like to get it automated. It's not a good situation when the availability of Nim's Docker images depend on my schedule and current workload. |
19:18:13 | avsej | hi guys, what revision has been released as 0.18.0? |
19:18:43 | avsej | when I download tarball, i see different code than at https://github.com/nim-lang/Nim/blob/v0.18.0/lib/pure/uri.nim for example |
19:19:01 | avsej | and tests are failing on the version from tarball |
19:19:48 | avsej | tarball version of uri.nim has parseQuery*, while on github there is no such function |
19:20:17 | FromGitter | <moigagoo> I guess I'll open a discussion issue on GitHub. |
19:21:42 | FromGitter | <mratsim> Give commit rights to dom96 :) |
19:21:56 | avsej | master and devel branches also do not have this function |
19:22:20 | FromGitter | <mratsim> or maybe have nimage be part of Nim repo |
19:22:20 | avsej | I wonder whether the source tarball was really tested at all |
19:22:54 | dom96 | oh that's bad |
19:23:24 | dom96 | but only uri.nim is affected |
19:23:29 | avsej | it was some PR branch? :) |
19:23:33 | avsej | I'm not sure |
19:23:50 | dom96 | no, I have non-committed changes which got pulled into the tarball |
19:23:52 | avsej | I have two failures at least, and right now it is only about failing "lib" tests |
19:24:09 | avsej | could you replace tarball with proper one? |
19:24:18 | dom96 | yeah, I will |
19:24:26 | avsej | also I have nimble tests failure, but I haven't looked into it yet |
19:25:04 | avsej | could you also check that "nimble-all" category passes on the release? thanks |
19:26:57 | dom96 | I'm just fixing the uri.nim |
19:27:02 | dom96 | any other issue are likely something else |
19:28:16 | dom96 | *likely caused by |
19:29:47 | dom96 | This is why we need definitely need to automate this |
19:30:04 | dom96 | *we definitely |
19:30:07 | * | dom96 can't write today |
19:33:28 | FromGitter | <tim-st> What is an example where `x <% y ` is different from `x < y` for x,y int64? I saw this op the first time today. It says `Returns true iff ``unsigned(x) < unsigned(y)` |
19:33:54 | FromGitter | <mratsim> negative int |
19:34:12 | FromGitter | <krux02> I just read through the changelog of version 18. I would have liked to see list comprehension to be deprecated without replacement. |
19:34:58 | FromGitter | <krux02> @tim-st the `<%` operators are a relic from the past. You should not use them. |
19:35:15 | avsej | thanks dom96 |
19:35:32 | dom96 | packeger's won't be happy |
19:35:35 | FromGitter | <tim-st> @mratsim does it have better peformance compared to `<` when I know of x >= 0 ? |
19:35:35 | FromGitter | <krux02> it is to threat singed integers as unsigned integers, but that is what converting to unsigend integers is for. |
19:35:50 | FromGitter | <tim-st> ok, thanks! |
19:36:05 | FromGitter | <mratsim> “threat” at gun point |
19:36:09 | FromGitter | <mratsim> :P |
19:36:15 | FromGitter | <krux02> and no it does not have better performance |
19:36:21 | FromGitter | <tim-st> @krux02 I'm currently porting the strutils procs like you said and it's used there |
19:36:27 | FromGitter | <tim-st> ok, thanks! |
19:36:38 | avsej | dom96, have you uploaded new tarball already? |
19:36:42 | FromGitter | <tim-st> (fixing `\0`) |
19:36:59 | FromGitter | <krux02> @tim-st my memory is corrupted, what did I say about the strutils procs? |
19:37:15 | dom96 | avsej: no, uploading now |
19:38:05 | avsej | wow |
19:38:16 | FromGitter | <tim-st> @krux02 that it would be good to have the `\0` bugs fixed in strutils and that you would have a look at a pull request when I would fix it 😄 |
19:38:18 | avsej | from 4.1MB to 31MB? |
19:38:34 | dom96 | yeah, i'm not sure what happened there |
19:38:34 | avsej | dom96, I guess something wrong again |
19:38:46 | avsej | could you package it on the clean tree? |
19:38:53 | FromGitter | <krux02> ah that one. Yes I can take a look at the pull request. |
19:38:59 | FromGitter | <tim-st> 👍 |
19:39:46 | dom96 | avsej: it's probably just the xz compression level |
19:40:09 | avsej | afair niminst has -9 level hardcoded |
19:40:42 | dom96 | I recompressed it manually |
19:40:42 | avsej | https://github.com/nim-lang/Nim/blob/devel/tools/niminst/niminst.nim#L688 |
19:40:55 | avsej | could you recompress with -9 |
19:41:06 | dom96 | I tried |
19:41:14 | avsej | 31M is not acceptable for source archive, so it still big? |
19:41:23 | FromGitter | <krux02> today I wrote a two people chat application in bash that worked with pipes to send messages. It was a single line of code |
19:41:26 | avsej | maybe some binary sneaked into archive? |
19:42:20 | dom96 | let me try again with the same command niminst uses |
19:42:49 | FromGitter | <mratsim> So D lang removed dependencies on Visual Studio on Windows: https://dlang.org/blog/2018/03/03/dmd-2-079-0-released/. It’s raining release today |
19:44:33 | dom96 | avsej: ok, that worked |
19:44:38 | avsej | thanks |
19:49:00 | federico3 | and takes forever to decompress |
19:49:36 | * | Mat4 joined #nim |
19:50:50 | dom96 | yeah, but 4mb! |
19:50:57 | dom96 | I wish I could get the tar.gz that far down |
19:51:53 | Mat4 | hello |
19:52:23 | federico3 | c_code is by far the biggest dir |
19:55:52 | federico3 | dom96: after hardlinking duplicate files in c_code it went from 396MB to 152MB |
20:01:26 | avsej | better keep it smaller, because it will save space on mirrors and all derived packages (like SRPMs), and also saves network traffic. CPU spent on decompression is not that important, as releases are not done every day |
20:01:52 | FromGitter | <mratsim> +1, if you want to save CPU, kill Javascript ;) |
20:02:08 | federico3 | compressing c_code only led to 10MB tho |
20:03:10 | Mat4 | is it planed to support multiple return values ? |
20:03:17 | Yardanico | Mat4, it's already supported |
20:03:19 | Yardanico | just use a tuple |
20:03:40 | FromGitter | <mratsim> you’re too fast Yarda :P |
20:04:05 | Yardanico | federico3, well, I use zstd compression on my btrfs fs and csource uses 87mb (zstd compressed it with 5x ratio) |
20:07:06 | Mat4 | well, I would prefer a direct possibility to manipulate return values |
20:07:48 | FromGitter | <mratsim> @mat4, do you use `result.a = …` and `result.b = …` |
20:07:57 | FromGitter | <mratsim> or give us a pseudo code snippet |
20:19:58 | Mat4 | I must declare global variables as interface to specific machine-code routines which are compiled at runtime. I want to replace this variabes though functions to be called at demand because such way the JIT compiler generating this code woukd be executable as independent process. |
20:23:25 | Mat4 | using a tuple just complicate the call overhead without reason |
20:26:55 | dom96 | Mat4: is there an equivalent in another language that you want in Nim? |
20:27:11 | FromGitter | <mratsim> Do you have any snippet? ⏎ If you don’t want any overhead you shouldn’t use result but pass alredy allocated buffers as var to your procs. ⏎ You can use the tuple destructuring to easily assign tuples to variables like `let (a, b) = MyFooTupleProc(foo)` ⏎ You can also use a tuple of pointers if passing var buffers is overkill [https://gitter.im/nim-lang/Nim?at=5a9b051e26a769820b2a5006] |
20:27:14 | dom96 | tuples are literally multiple return values |
20:27:54 | FromGitter | <mratsim> Also as far as I know, all languages that have multiple return values uses tuples. |
20:29:40 | * | ipjk joined #nim |
20:29:59 | * | PMunch quit (Quit: leaving) |
20:30:12 | FromGitter | <krux02> not the go language |
20:31:17 | Mat4 | I just evaluate possibilities at moment. |
20:31:29 | FromGitter | <mratsim> @Mat4: this is an example of globals retrieved at runtime: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/backend/opencl_global_state.nim#L29 |
20:32:03 | FromGitter | <mratsim> Proc is defined here: https://github.com/unicredit/nimcl/blob/e47dfa77c30dfd56694f591bafbc8e563e5c45c8/nimcl.nim#L111-L117 |
20:33:22 | FromGitter | <mratsim> @krux02 I’m reading that but I think it’s tuples no? https://gobyexample.com/multiple-return-values |
20:34:38 | FromGitter | <krux02> it looka like it. but there is no tuple type in the language. |
20:35:20 | FromGitter | <krux02> just functions with n aruments and m return values. |
20:35:59 | FromGitter | <cabhishek> Hi everyone, I think the "search" feature on the docs is broken. Steps to reproduce 1) goto https://nim-lang.org/docs/tut1.html 2) type "json" (works) 3) On the actual json doc page typing anything in the search box doesn't seem to work. |
20:36:33 | FromGitter | <cabhishek> console says ```dochack.js:1448 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined ⏎ ⏎ ```at dosearch_28190 (dochack.js:1448) ⏎ at wrapper_28415 (dochack.js:1527)`````` [https://gitter.im/nim-lang/Nim?at=5a9b0750888332ee3af63cb2] |
20:36:47 | Mat4 | mratsim: thanks, good example |
20:37:08 | FromGitter | <cabhishek> I am seeing that in chrome Version 64.0.3282.186 |
20:37:47 | dom96 | cabhishek: yeah, please report it on GitHub |
20:38:21 | FromGitter | <cabhishek> @dom96 will do thanks |
20:38:24 | Mat4 | ciao |
20:38:27 | * | Mat4 quit (Quit: Leaving) |
20:41:54 | * | r3d9u11 joined #nim |
20:54:42 | * | MJCaley quit (Quit: MJCaley) |
20:59:40 | miran | @mratsim: been playing with arraymancer some more.... it seems it is memory-hungry :) the same example takes twice as many RAM as python/numpy :/ |
21:00:43 | FromGitter | <krux02> miran: I haven't been using arraymancer, but that surely is suspicious, because generally I would expect Nim to have more compact data structures that python could have. |
21:01:22 | miran | krux02: it might be because of my mishandling.... |
21:02:20 | dom96 | wow, Elm language drama: https://www.reddit.com/r/elm/comments/81bo14/do_we_need_to_move_away_from_elm/ |
21:02:31 | * | rokups quit (Quit: Connection closed for inactivity) |
21:04:32 | FromGitter | <mratsim> @miran post the code as a bug report. As far as I know the only memory issue in Arraymancer is converting to strings, the function is recursive and allocates a lot but for computation it should be far more efficient |
21:05:26 | * | S1t1Schu is now known as SitiSchu |
21:05:35 | miran | no strings here, just big 2d arrays (tested on 10k x 10k and larger) |
21:06:26 | SitiSchu | How would I go about dynamically importing a dll provides as CLI argument ? I cant use a variable in the dynlib pragma |
21:07:18 | * | r3d9u11 quit (Remote host closed the connection) |
21:07:40 | * | r3d9u11 joined #nim |
21:07:50 | SitiSchu | oh nvm |
21:07:53 | miran | mratsim, krux02: here's a quick example: https://gist.github.com/anonymous/5c8766cc3f5b8eb6eb08cfb1c5a39c75 |
21:08:04 | SitiSchu | instead of using a var I can just use paramStr(1) which works |
21:08:14 | miran | if there's something i'm doing wrong and needs to be changed, please let me know |
21:11:09 | FromGitter | <krux02> @mratsim you can make a few little changes to make string generation without a lot of allocaitons. |
21:11:27 | miran | btw, this example is also 2x slower than python version.... |
21:12:03 | FromGitter | <krux02> insted of ``proc `$`(arg: Tensor)`` you write ``proc add(result: string; arg: Tensor)`` |
21:12:59 | FromGitter | <krux02> ``proc `$`(arg: Tensor): string`` will be implemented as ``result = ""; result.add(arg)`` |
21:13:52 | FromGitter | <krux02> and all instanceces of ``result.add($child)``you change to ``result.add(child`` |
21:13:58 | FromGitter | <krux02> that's it |
21:14:47 | FromGitter | <mratsim> @miran did you compile with -d:release? it indeed use a lot of memory but it doesn’t seem slow |
21:14:52 | * | Trustable quit (Remote host closed the connection) |
21:15:15 | miran | i did. it takes 8GB of ram and runs in 13.8 sec on my computer |
21:15:32 | FromGitter | <krux02> oh, then I can't run it without swapping |
21:15:33 | miran | python version is 3.9GB and runs in 6.1 sec |
21:15:52 | FromGitter | <mratsim> I’m tracing it |
21:17:34 | miran | krux: lower `timeSteps` to 10000 - it takes 2.5GB here and runs in 2.7 sec (python: 700MB, 1.3 sec) |
21:18:42 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/ys1n/2018-03-03_22-18-27.png) |
21:19:34 | federico3 | mratsim: where's that tracer coming from? |
21:19:37 | FromGitter | <mratsim> btw does Python use float64 by default |
21:19:48 | FromGitter | <mratsim> Apple Instruments.app |
21:21:23 | * | natrys quit (Quit: natrys) |
21:22:00 | FromGitter | <krux02> miran: I looked at the code, and for my personal taste the amount of used Ram should not depend on the amount of timesteps at all. |
21:22:22 | miran | mratsim: now i tried to give float64 explicitly (`Ts = starting_temp * np.ones((time_steps, space_steps), dtype=np.float64)`) - still the same ram usage and speed |
21:22:24 | FromGitter | <krux02> These operations all seem to create intermediate tensors on the heap |
21:22:56 | FromGitter | <krux02> float is just an alias for float64 |
21:23:13 | miran | krux02: anything i can do to make this nicer? |
21:23:34 | FromGitter | <mratsim> @krux02 normally it shouldn’t, Arraymancer uses reference semantics since a while ago and same for Python |
21:23:53 | FromGitter | <krux02> I once had a project that compiled expression like this: |
21:24:02 | FromGitter | <mratsim> so slicing shouldn’t create intermediate tensors |
21:24:15 | FromGitter | <krux02> tensorMagic: ⏎ ⏎ ```Ts[t+1, 1..^2] = Ts[t, 1..^2] + dt * f(Ts[t, _])``` [https://gitter.im/nim-lang/Nim?at=5a9b127f35dd17022e19903c] |
21:24:56 | FromGitter | <krux02> into loops and calls to blas. No aloocations |
21:25:33 | FromGitter | <krux02> but at some point I did not continue on the project |
21:25:45 | FromGitter | <krux02> the syntax was also a bit different |
21:27:24 | FromGitter | <krux02> ``X[i,j] = A[i] * B[j]`` would be an outer product and ``X = A[i] * B[i]`` would be a dot product. And I could do all combinations and stuff |
21:27:55 | FromGitter | <mratsim> ah that would be interesting, I’d like to add einsum with a similar syntax |
21:28:26 | FromGitter | <krux02> yes einstein notation |
21:28:50 | FromGitter | <krux02> But I don't have anything personally to do with tensors. |
21:29:32 | FromGitter | <krux02> But I peeked into Einsteins relativity theory to read his introduction of Einstein notation (he din't call it that way, he just declared to use it that way) |
21:31:20 | * | couven92 quit (Remote host closed the connection) |
21:32:02 | * | couven92 joined #nim |
21:36:54 | FromGitter | <mratsim> @miran I have some idea of what is going on |
21:37:01 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/GEoP/2018-03-03_22-36-42.png) |
21:38:04 | miran | now i tried to create an array (`array[timeSteps, Tensor[float]]`) with 1d tensors |
21:41:00 | FromGitter | <mratsim> I have some heap allocations somewhere, I think maybe in the metadata, like taking a slice of strides of shape |
21:41:57 | FromGitter | <Bennyelg> why I see ''no side effects'' twice ? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a9b16a5f3f6d24c68329ffa] |
21:44:03 | miran | using array and 1d tensor: 12 seconds (instead of 13), and 6 GB ram (instead of 8) |
21:46:42 | miran | for example with 10000 timeSteps: 900MB (instead of 2.5 GB) |
21:47:55 | FromGitter | <Bennyelg> ```code paste, see link``` ⏎ ⏎ any example? [https://gitter.im/nim-lang/Nim?at=5a9b180b35dd17022e19a6ad] |
21:49:27 | * | miran quit (Quit: Konversation terminated!) |
21:50:05 | FromGitter | <mratsim> @miran: I think this is also slow in Arraymancer: assignment to slices `Ts[t+1, 1..^2] = Ts[t, 1..^2] + dt * f(Ts[t, _])` |
21:52:55 | * | r3d9u11 quit (Remote host closed the connection) |
21:54:01 | FromGitter | <zacharycarter> !eval echo NimVersion |
21:54:04 | NimBot | 0.18.0 |
21:54:12 | FromGitter | <zacharycarter> \o/ |
21:54:39 | FromGitter | <zacharycarter> playground is g2g for 18.0 thank you @moigagoo ! |
21:55:19 | FromGitter | <mratsim> =) |
21:57:56 | FromGitter | <mratsim> @miran, I’ve commented stuff out and found the issue: https://github.com/mratsim/Arraymancer/issues/190#issuecomment-370183068 |
21:58:29 | FromGitter | <mratsim> Not sure how to solve it though, it’s assigning to a slice in a loop |
21:59:13 | FromGitter | <Bennyelg> @mratsim how do you debug ? |
21:59:16 | FromGitter | <Bennyelg> I like it |
21:59:34 | Yardanico | another big issue with docs (regression) - https://github.com/nim-lang/Nim/issues/7294#issue-302034307 |
21:59:53 | Yardanico | (well probably it's a regression) |
22:00:18 | FromGitter | <mratsim> @bennyelg I use Apple Instruments.App for profiling, check the offending proc, check the C source |
22:01:05 | FromGitter | <mratsim> then I deactivate stuff until the issue disappears to narrow down the offender |
22:01:31 | * | rockcavera quit (Remote host closed the connection) |
22:01:46 | FromGitter | <mratsim> The only thing I can’t debug is when code is uniformly slow: http://wiki.c2.com/?UniformlySlowCode |
22:03:12 | dom96 | !eval if NimVersion != "0.18.0": echo(":'(") else: echo("yay") |
22:03:14 | NimBot | yay |
22:03:18 | dom96 | :D |
22:03:47 | Yardanico | !eval "a" > "" |
22:03:49 | NimBot | Compile failed: in.nim(1, 5) Error: expression 'false' is of type 'bool' and has to be discarded |
22:03:52 | FromGitter | <Bennyelg> !eval if NimVersion == "0.18.0": echo("OMG") |
22:03:54 | NimBot | OMG |
22:05:40 | * | fredrik92 joined #nim |
22:06:20 | * | freddy92 joined #nim |
22:09:30 | * | couven92 quit (Ping timeout: 256 seconds) |
22:10:04 | * | fredrik92 quit (Ping timeout: 256 seconds) |
22:14:04 | FromGitter | <mratsim> @miran @krux02 I’ve think I’ve narrowed down the issue to Nim allocation: https://github.com/mratsim/Arraymancer/issues/190#issuecomment-370184078 |
22:16:01 | dom96 | maybe it's a bug in the new allocator algorithm? |
22:16:13 | dom96 | can you try it with 0.17.2? |
22:18:25 | FromGitter | <mratsim> it’s even slower because it does not incorporate edubart seq creation fixes |
22:19:10 | FromGitter | <mratsim> The slowness is in the newSeqWith proc I think, when I use “zeros” instead of “ones” it’s 5x faster |
22:43:28 | * | nsf quit (Quit: WeeChat 2.0.1) |
22:46:46 | FromGitter | <mratsim> https://github.com/nim-lang/Nim/issues/7295 |
23:18:38 | * | smt quit (Ping timeout: 256 seconds) |
23:31:05 | * | MJCaley joined #nim |
23:55:38 | dom96 | invalid type in format string for string, expected 's', but got X [ValueError] |
23:55:47 | dom96 | This should really happen at compile-time... |