00:10:47 | * | dhalinar joined #nim |
00:17:45 | * | libman quit (Quit: Connection closed for inactivity) |
00:22:14 | adam12 | What's everybody building with Nim? |
00:24:23 | * | yglukhov quit (Remote host closed the connection) |
00:25:03 | * | jsgrant quit (Read error: Connection reset by peer) |
00:31:59 | * | def-pri-pub joined #nim |
00:36:44 | * | francisl joined #nim |
00:41:03 | * | taaperotassu quit (Ping timeout: 248 seconds) |
00:49:06 | * | taaperotassu joined #nim |
00:50:09 | * | thmslld quit (Ping timeout: 248 seconds) |
01:06:54 | * | zachk quit (Quit: Leaving) |
01:07:26 | * | chemist69 quit (Disconnected by services) |
01:07:31 | * | chemist69_ joined #nim |
01:19:29 | FromGitter | <genotrance> right now I'm trying to wrap openssl's SHA functions |
01:39:55 | * | def-pri-pub quit (Quit: Leaving.) |
01:44:10 | adam12 | Cool :) |
02:08:07 | adam12 | What's a good way of getting a tuple with a certain value out of a seq? |
02:10:21 | * | smt` joined #nim |
02:13:21 | * | smt quit (Ping timeout: 248 seconds) |
02:15:00 | * | def-pri-pub joined #nim |
02:15:33 | * | gangstacat joined #nim |
02:20:34 | * | endragor quit (Remote host closed the connection) |
02:21:06 | * | endragor joined #nim |
02:25:28 | * | endragor quit (Ping timeout: 240 seconds) |
02:41:37 | * | endragor joined #nim |
02:54:48 | * | dddddd quit (Remote host closed the connection) |
02:57:35 | * | dhalinar quit (Ping timeout: 258 seconds) |
03:17:19 | * | def-pri-pub quit (Quit: Leaving.) |
03:17:24 | * | n0xff left #nim (#nim) |
03:17:48 | * | mahsav joined #nim |
03:58:18 | * | francisl quit (Quit: francisl) |
04:16:13 | * | def-pri-pub joined #nim |
04:17:39 | * | jsgrant joined #nim |
04:28:03 | * | skrylar quit (Remote host closed the connection) |
04:40:29 | FromGitter | <citycide> is a macro capable of something like dart's cascade operator? it'd need a different token obviously because `..` is the slice operator. for the unaware, the cascade operator is a chain of expressions / assignments all acting on the initial value, and returning the initial value at the end. |
04:41:29 | FromGitter | <citycide> more on dart's cascades: http://news.dartlang.org/2012/02/method-cascades-in-dart-posted-by-gilad.html |
04:55:46 | FromGitter | <citycide> adam12: if you mean a seq of tuples and you want to match exactly, you can use `find`, ie. `someSeqOfTuples.find(("one", 2))`. otherwise I think you'll want to iterate over it if you're looking for only partial equality |
05:05:44 | * | miran joined #nim |
05:23:03 | Araq | citycide: cascade x: |
05:23:08 | Araq | add "foo" |
05:23:11 | Araq | add "bar" |
05:23:16 | Araq | add "more here" |
05:23:38 | Araq | makes for a good introduction into Nim's macro system |
05:23:49 | Araq | it's pretty simple to implement |
05:24:22 | * | def-pri-pub quit (Quit: Leaving.) |
05:26:25 | FromGitter | <citycide> @Araq: that was my plan exactly, for learning the macros and Nim itself |
05:27:31 | Araq | to make it more interesting you can also support cascade(a(), b(), c()) |
05:29:25 | FromGitter | <citycide> I'll play around on it for a bit |
05:30:02 | * | empxre joined #nim |
05:30:48 | * | empxre quit (Client Quit) |
06:01:36 | * | nsf joined #nim |
06:05:02 | * | miran quit (Ping timeout: 258 seconds) |
06:06:37 | * | PMunch joined #nim |
06:07:04 | * | smt` quit (Quit: Leaving) |
06:21:59 | * | azur_kind joined #nim |
06:32:46 | * | sz0 joined #nim |
06:44:52 | * | solitudesf joined #nim |
06:46:33 | PMunch | Interesting read as always with the community survey dom96 |
06:51:36 | * | azur_kind quit (Read error: Connection reset by peer) |
06:53:45 | * | gokr joined #nim |
07:23:29 | * | PMunch quit (Quit: Leaving) |
07:37:01 | * | taaperotassu quit (Ping timeout: 240 seconds) |
07:40:44 | * | Vladar joined #nim |
07:44:17 | * | taaperotassu joined #nim |
07:45:37 | FromGitter | <Bennyelg> Hey |
07:45:43 | FromGitter | <Bennyelg> I want to Hash Passwords of my users |
07:46:00 | FromGitter | <Bennyelg> hash("some password") gives me negetive string, is it ok? |
07:49:51 | euantor | Use bcrypt, same as the nimforum. There are two options: https://github.com/flaviut/easy-bcrypt or https://github.com/ithkuil/bcryptnim |
07:50:01 | euantor | Neither have been updated in a while unfortunately |
07:50:10 | FromGitter | <Bennyelg> thanks\ |
07:52:06 | Araq | they are also both Unix specific and with Unix specific security problems |
07:54:13 | FromGitter | <Bennyelg> bycrpt is not working |
07:54:26 | FromGitter | <Bennyelg> :( just wanted to hash my users password :D |
07:58:53 | Araq | we need a pure Nim bcrypt library and add it to the stdlib |
08:05:45 | FromGitter | <Bennyelg> Yea, I wish my knowledge on nim was better to contribute |
08:15:53 | FromGitter | <Yardanico> Araq: will karaxdsl be separated as a different module to use it instead of htmlgen? |
08:16:20 | Araq | I have no plans to do that, 'nimble install karax' |
08:16:47 | Araq | is easy enough |
08:20:03 | euantor | Yes, a pure Nim bcrypt module would be great |
08:24:44 | * | yglukhov joined #nim |
08:25:10 | FromGitter | <Bennyelg> Im still waiting to some docs |
08:29:02 | Araq | look at the examples? |
08:29:42 | FromGitter | <Bennyelg> You are not planning to create docs? |
08:54:46 | Araq | I will create docs eventually |
08:59:08 | * | solitudesf quit (Ping timeout: 240 seconds) |
09:01:12 | * | solitudesf joined #nim |
09:01:19 | * | yglukhov_ joined #nim |
09:03:14 | * | Arrrr joined #nim |
09:03:14 | * | Arrrr quit (Changing host) |
09:03:14 | * | Arrrr joined #nim |
09:04:41 | * | yglukhov quit (Ping timeout: 240 seconds) |
09:11:24 | * | ShalokShalom quit (Ping timeout: 246 seconds) |
09:17:58 | * | PMunch joined #nim |
09:18:50 | Arrrr | Is nim the dark souls of programming languages? |
09:20:42 | FromGitter | <Grabli66> No. It's like GTA :) |
09:21:51 | Vladar | more like minecraft |
09:22:06 | Vladar | with all the macros |
09:22:18 | FromGitter | <Grabli66> Nimcraft :) |
09:26:13 | * | vlad1777d joined #nim |
09:30:14 | * | sz0 quit (Quit: Connection closed for inactivity) |
09:42:41 | * | solitudesf quit (Ping timeout: 240 seconds) |
09:47:55 | * | solitudesf joined #nim |
10:04:23 | * | Vladar quit (Remote host closed the connection) |
10:04:37 | * | PMunch_ joined #nim |
10:05:19 | * | solitudesf quit (Ping timeout: 248 seconds) |
10:07:27 | * | PMunch quit (Ping timeout: 248 seconds) |
10:09:00 | * | Vladar joined #nim |
10:11:14 | * | PMunch_ is now known as PMunch |
10:23:37 | FromGitter | <Jipok> Is there a name for the hash algorithm used in nim? |
10:27:09 | * | xet7 quit (Quit: Leaving) |
10:32:55 | Araq | "slow hash that needs to be replaced" |
10:33:32 | FromGitter | <Jipok> https://github.com/rurban/smhasher |
10:33:58 | FromGitter | <Jipok> M.b. to take something from here? |
10:34:50 | Araq | use what Rust uses to avoid shitstorms |
10:40:12 | FromGitter | <Bennyelg> How Can I do Something like that? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3690cbbbf9f1a381823a1] |
10:40:37 | FromGitter | <Jipok> Option? |
10:40:47 | FromGitter | <Bennyelg> what do you mean :] |
10:40:49 | FromGitter | <Bennyelg> example |
10:41:04 | FromGitter | <Jipok> http://devdocs.io/nim/options |
10:42:23 | FromGitter | <krux02> @Bennyelg I recommend variant type |
10:42:49 | FromGitter | <Bennyelg> explain :] ⏎ (BTW: the option is not good for me in this case) |
10:43:03 | FromGitter | <krux02> you need a type that is either a User or an error message why you don't have a user |
10:43:21 | FromGitter | <krux02> in Rust there is a Result type in the standard library for exactly this case |
10:43:38 | FromGitter | <Bennyelg> Oh I see |
10:43:39 | FromGitter | <krux02> Result[User] would either be a user or an error message |
10:43:39 | FromGitter | <Bennyelg> Nice |
10:43:51 | FromGitter | <Bennyelg> Now you refreshed my mind |
10:44:09 | FromGitter | <krux02> sadly there is no Result in the nim standard library, but it would be easy to write one |
10:44:55 | * | xet7 joined #nim |
10:45:31 | FromGitter | <Bennyelg> ```type ⏎ SingleUserReturn* = ref object ⏎ returnSet: User | string ⏎ ``` [https://gitter.im/nim-lang/Nim?at=59d36a4ab59d55b82368ea93] |
10:45:39 | FromGitter | <krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36a53177fb9fe7e321a6e] |
10:46:15 | FromGitter | <krux02> you should not do User | string in this case |
10:46:38 | FromGitter | <Bennyelg> Because I can't actually handle the returned type properlly? |
10:46:56 | FromGitter | <Bennyelg> I liked you example Im going to adopt it |
10:46:58 | FromGitter | <krux02> no, User | string is internally a generi |
10:47:05 | FromGitter | <krux02> `````` |
10:47:10 | FromGitter | <krux02> `````` |
10:47:34 | FromGitter | <ephja> are you going to deal with both exceptions and "results"? |
10:48:00 | FromGitter | <krux02> ```proc foo(a: float) = $a ⏎ proc foo(a: int) = $a``` [https://gitter.im/nim-lang/Nim?at=59d36ae07f323fc375ff6216] |
10:48:42 | FromGitter | <Bennyelg> yea 2 singatures |
10:53:55 | FromGitter | <Bennyelg> @krux02 ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36c43f7299e8f53a10cf7] |
10:54:00 | FromGitter | <Bennyelg> how to use it |
10:54:38 | FromGitter | <krux02> result.hasValue = true; result.value = user |
10:54:57 | dom96 | https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html?ref=irc |
10:55:01 | FromGitter | <krux02> you have to set hasValue to true otherwise it won't work |
10:55:08 | dom96 | Something that didn't make it into my book, hope you enjoy it :) |
10:55:33 | FromGitter | <Bennyelg> hehe I finished your book today |
10:55:56 | planetis[m] | nice article dom96 good work :) |
10:56:00 | FromGitter | <Bennyelg> I still have to go through some staff again but it was very very fun |
10:56:22 | dom96 | Bennyelg: *stuff :) |
10:56:33 | FromGitter | <Bennyelg> *sorry |
10:56:34 | FromGitter | <Bennyelg> hehe |
10:57:01 | FromGitter | <Jipok> Is this acceptable? ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59d36cfc01110b72316ef30f] |
10:57:01 | dom96 | Not a big deal, just notice this mistake a lot and think it's good to make you aware of it. |
10:57:07 | FromGitter | <Bennyelg> And I paid the full price, And I would do it again any case this is one of the fewest books I really enjoyed |
10:57:19 | dom96 | Bennyelg: awesome, thanks :) |
10:57:44 | FromGitter | <Bennyelg> Cheers, I am waiting for "The Advance concepts of Nim" book |
10:57:54 | FromGitter | <Bennyelg> dont eliminate this idea, just start to write :P |
10:58:17 | FromGitter | <krux02> @dom96 I don't know lldb since I use gdb, but I guess it has an equivalent of rbreak that is especially useful for nim |
10:58:41 | FromGitter | <krux02> ``rbreak foobar`` breaks on all functions containing "foobar" |
10:59:21 | FromGitter | <Bennyelg> @Arne, How do you instantiate Result variable ? |
10:59:27 | FromGitter | <Bennyelg> Error: cannot instantiate: 'Result' |
11:00:02 | FromGitter | <krux02> can you show me the code you have where you got the error? |
11:00:24 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36dc7bbbf9f1a38183e01] |
11:02:03 | FromGitter | <krux02> that should work |
11:02:08 | FromGitter | <krux02> I have this: |
11:02:11 | FromGitter | <Bennyelg> should :D |
11:02:17 | FromGitter | <krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36e38614889d4756c2b38] |
11:03:05 | euantor | Figure 1. 4 in that article isn't loading for me @dom96 - https://nim-lang.org/assets/news/images/asciidoc/ch05_gdb_adder.png is 404 |
11:03:17 | FromGitter | <Jipok> ```looks unnecessary``` |
11:03:40 | FromGitter | <krux02> yes that is what I already removed |
11:03:45 | FromGitter | <krux02> nim has an implicit result variable |
11:03:51 | dom96 | euantor: huh, thanks for letting me know |
11:03:52 | FromGitter | <krux02> didn't expect that to be so useful |
11:04:19 | FromGitter | <Bennyelg> Still not work hehe |
11:04:37 | FromGitter | <krux02> @Jipok I am currently trying your webassembly examples :P |
11:04:58 | FromGitter | <krux02> I kind of don't like the webassembly stack everything is so slow |
11:05:00 | FromGitter | <Bennyelg> var alfred = Users["Alfres"] |
11:05:05 | FromGitter | <krux02> I mean the tools |
11:05:14 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36eeab59d55b823690a2e] |
11:05:23 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36ef3bbbf9f1a3818464c] |
11:05:24 | euantor | Same goes for Figure 1. 9 - https://nim-lang.org/assets/news/images/asciidoc/ch05_gdb_adder_3.png and Figure 1. 11 - https://nim-lang.org/assets/news/images/asciidoc/ch05_gdb_adder_4.png |
11:05:49 | dom96 | fixed |
11:05:51 | FromGitter | <krux02> @Bennyelg: when you solved your problem with the result type, you probably should use a Table[string, User] |
11:05:59 | FromGitter | <andreaferretti> your `Result` type is generic |
11:06:05 | euantor | Nice one |
11:06:06 | FromGitter | <Bennyelg> oh |
11:06:10 | FromGitter | <Bennyelg> yea I need add[T] |
11:06:11 | FromGitter | <andreaferretti> you need to return `Result[User]` |
11:06:12 | FromGitter | <Bennyelg> to my method |
11:06:49 | FromGitter | <krux02> oh yea sorry my bad I forgot that Result needed a generic parameter, but why did it work then? |
11:06:55 | FromGitter | <Bennyelg> Works |
11:06:58 | FromGitter | <Bennyelg> like lolipop |
11:06:59 | FromGitter | <Bennyelg> thanks |
11:07:40 | FromGitter | <krux02> this is weird on my system it works without the generic [User] ... |
11:07:44 | FromGitter | <krux02> Nim is weird |
11:07:46 | * | francisl joined #nim |
11:07:54 | FromGitter | <Bennyelg> hehe 0.17.2 |
11:07:59 | FromGitter | <Bennyelg> wait to 1. |
11:08:31 | FromGitter | <ephja> it's inferred from the body? |
11:08:50 | FromGitter | <ephja> I dunno if that's a good thing or not |
11:09:22 | FromGitter | <krux02> completely unrelated random post. I now have an Everdrive for my Gameboy Color :P I am thinking if I should invest some time to try writing a Gamboy game in Nim :P |
11:09:41 | FromGitter | <krux02> my random guess would be, that it would a huge time sink |
11:10:01 | FromGitter | <Jipok> How nim determines that T = User. Looks at the further use of result? |
11:10:52 | FromGitter | <krux02> @ephja generally yes, but as long as this behavior is not explicitly documented an how it works and what the rules are, it scares me more |
11:11:37 | FromGitter | <Bennyelg> After I return the result of Result[user] |
11:11:40 | FromGitter | <krux02> then I wuold prefer an error message like "you need to add the generic parameter '[User]' here" |
11:11:48 | FromGitter | <Bennyelg> How Do I actually the the user data |
11:12:15 | FromGitter | <krux02> you access is with ``value`` |
11:12:36 | FromGitter | <Bennyelg> I thought i can but nop I should * the value right? |
11:13:43 | FromGitter | <Bennyelg> Yea |
11:13:46 | FromGitter | <Bennyelg> works like charm |
11:13:50 | FromGitter | <krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d370edb20c642429b8ce5b] |
11:15:56 | FromGitter | <alehander42> @krux02 I don't believe Result without T worked with your program, but maybe you didn't call your `[]` so Nim just didn't have to instantiate it and that's why no error |
11:16:18 | FromGitter | <krux02> yes I did not use it |
11:16:49 | FromGitter | <alehander42> yep ⏎ ⏎ ```proc a: Result = ⏎ result.hasValue = true ⏎ result.value = 2 ⏎ ⏎ # discard a()``` ⏎ ⏎ it works like this because nothing is actually generated, if you have the discard a() it will give an error [https://gitter.im/nim-lang/Nim?at=59d371a101110b72316f0ce3] |
11:19:13 | FromGitter | <alehander42> which is fun because you can write ⏎ ⏎ ```proc a: Result = ⏎ result.h = true + 2``` [https://gitter.im/nim-lang/Nim?at=59d37231210ac269209fea84] |
11:19:18 | FromGitter | <alehander42> and it compiles :D |
11:22:44 | FromGitter | <krux02> @Jipok how do I start the webassembly builds? |
11:22:57 | FromGitter | <krux02> there is an index.html, but nothing happens when I open them in the browser |
11:29:48 | * | vlad1777d quit (Ping timeout: 240 seconds) |
11:31:15 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d37503177fb9fe7e3258bf] |
11:32:20 | FromGitter | <Bennyelg> @krux02 |
11:32:25 | FromGitter | <Bennyelg> @Araq |
11:32:26 | FromGitter | <Bennyelg> * |
11:32:59 | FromGitter | <BigEpsilon> Hi all, I have a little question: How to access an enum value from a generic enum type ? ⏎ examples ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59d3756a7f323fc375ff9dd4] |
11:33:29 | FromGitter | <BigEpsilon> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d37588177fb9fe7e325c00] |
11:34:27 | FromGitter | <alehander42> why is it generic? |
11:35:08 | FromGitter | <BigEpsilon> because I want to import the enum from cpp header |
11:35:09 | FromGitter | <alehander42> @Bennyelg you can't just run a script compiled for browser, you have to include it in your html with e.g. <script> |
11:35:25 | FromGitter | <BigEpsilon> and the enum is nested in a templated class |
11:36:19 | FromGitter | <BigEpsilon> example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3763301110b72316f27b8] |
11:37:24 | FromGitter | <Bennyelg> @alehander42 and than what |
11:37:29 | FromGitter | <Bennyelg> how to I pack it |
11:45:25 | FromGitter | <krux02> that is something I don't know, sorry |
11:46:10 | FromGitter | <krux02> @BigEpsilon this is the first time I see a generic parameter at an enum |
11:46:35 | FromGitter | <krux02> and is c++ you can't have template parameters on enums |
11:46:44 | FromGitter | <krux02> so maybo your [T] is wrong |
11:47:56 | FromGitter | <krux02> ah I get it, it is Foo that has the generic parameter, and Deep Enum just happens to be inside of it |
11:50:10 | FromGitter | <ephja> interfacing with C++ seems like fun :-) |
11:50:24 | FromGitter | <Jipok> @krux02 About wasm. What exactly do you do? |
11:51:04 | * | ShalokShalom joined #nim |
11:51:30 | * | vlad1777d joined #nim |
11:52:43 | FromGitter | <krux02> @Jipok well I did execute the build script |
11:55:06 | FromGitter | <krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d37a9a614889d4756c7229] |
11:58:15 | FromGitter | <Jipok> It's strange. It works for me. |
11:58:24 | FromGitter | <Jipok> And not just for me. |
11:58:24 | * | dddddd joined #nim |
11:58:46 | planetis[m] | about the post: rst documentation says double backticks for code but nim doc produces bold. Is it a bug? |
11:58:48 | FromGitter | <krux02> I open the index.html from chromium |
12:04:04 | FromGitter | <BigEpsilon> @krux02 , yes it is only to interface with C++ |
12:04:19 | FromGitter | <Jipok> @krux02 In the evening I will try to deal with this. |
12:04:26 | dom96 | planetis[m]: I think it produces an emphasised monospace font |
12:04:45 | FromGitter | <BigEpsilon> maybe @Araq can hint me |
12:06:40 | FromGitter | <krux02> @BigEpsilon I am not 100% sure, but my guess is that you hat a c++ feature that is not simply mapable to nim. Is it possible to modify the c++ code or write some glue code, so that you don't have an enum in a templated class anymore? |
12:07:21 | FromGitter | <Jipok> @krux02 try this https://jipok.github.io/Nim-SDL2-and-Emscripten/ex208_framerate/index.html |
12:08:02 | FromGitter | <krux02> yes that works |
12:08:16 | FromGitter | <krux02> I have astonishing 9 FPS |
12:08:20 | FromGitter | <krux02> but it works |
12:08:36 | FromGitter | <krux02> (mesa software rendering) |
12:08:42 | Arrrr | Hope araq doesn't remove </> overloading |
12:09:00 | FromGitter | <krux02> why should he? |
12:12:12 | FromGitter | <ephja> I dunno lol |
12:13:57 | FromGitter | <krux02> @Jipok when I run that file from my harddrive I get this error: ``` ⏎ index.html:1310 Failed to load file:///home/arne/proj/nim/webassembly-demos/ex208_framerate/index.html.mem: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. ⏎ (anonymous) @ index.html:1310 ⏎ index.js:1 Failed to load file:///home/arne/proj/nim/webassembly-demos/ex208_framerate/index.data: |
12:13:57 | FromGitter | ... Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. ⏎ fetchRemotePackage @ index.js:1 ... [https://gitter.im/nim-lang/Nim?at=59d37f04f7299e8f53a1772b] |
12:15:03 | * | BitPuffin|osx joined #nim |
12:15:59 | FromGitter | <Varriount> @krux02 My phone gets 44 fps. :3 |
12:16:04 | FromGitter | <ephja> hmmm always 50 fps |
12:16:27 | FromGitter | <krux02> yea I know my computer 3D rendering is super slow |
12:16:38 | FromGitter | <ephja> and then firefox hung when I switched to another tab. well, that should improve eventually |
12:17:35 | FromGitter | <krux02> eventually I hope I can write an sdl app and simply change from "nim c -r" to "nim c -wasm -r" |
12:17:44 | FromGitter | <krux02> and it will be executed |
12:18:45 | FromGitter | <krux02> @Jipok how do you launch the generated index.html? |
12:18:50 | yglukhov_ | krux02: nimx nake supports that ;) nake -d:wasm |
12:18:51 | FromGitter | <krux02> opening it in a browser doesn't work |
12:19:09 | yglukhov_ | also will start your browser with the build |
12:19:22 | FromGitter | <Jipok> with some restrictions. Browsers do not yet support multithreading for wasm. |
12:19:40 | FromGitter | <krux02> I don't need multithreading |
12:19:50 | FromGitter | <Jipok> @krux02 just open it |
12:20:01 | FromGitter | <krux02> as long as I don't load big assets in the background I don't think I need it |
12:20:19 | FromGitter | <krux02> yea opening it result in the error shown to you |
12:20:36 | FromGitter | <BigEpsilon> @krux02 , I'm implementing that in c2nim, so it will be better if I can make it work |
12:20:45 | FromGitter | <krux02> it is a security mechanism that prevents accessing local files |
12:21:42 | FromGitter | <Jipok> Most likely some features of the work are emscripten + chromium |
12:23:50 | * | couven92 joined #nim |
12:32:02 | * | PMunch quit (Ping timeout: 246 seconds) |
12:33:17 | FromGitter | <krux02> @jipok did you enable something in chromium to enable local file path access? |
12:35:06 | FromGitter | <Jipok> I turned on the local web server. So far, I do not see any other solutions. |
12:35:26 | FromGitter | <krux02> "the local web server"? |
12:35:29 | FromGitter | <krux02> what is that? |
12:35:59 | FromGitter | <krux02> and how do I do that, too? |
12:36:16 | FromGitter | <Jipok> Also you can start the chromium with the key --allow-file-access-from-files |
12:36:44 | FromGitter | <krux02> ahh thanks |
12:36:47 | FromGitter | <krux02> I try it |
12:37:30 | FromGitter | <Jipok> "the local web server"? - sudo systemctl start httpd |
12:38:20 | FromGitter | <krux02> ah, did not know it |
12:38:22 | FromGitter | <krux02> thanks a lot |
12:38:30 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
12:38:56 | FromGitter | <krux02> can you add those things somewhere in the readme? |
12:39:03 | FromGitter | <krux02> would have been great help to me |
12:39:31 | FromGitter | <Jipok> I will add, but later |
12:39:37 | FromGitter | <krux02> just for curiosity, why didn't you use scancodes for your enput? |
12:42:39 | * | Snircle joined #nim |
12:42:41 | * | PMunch joined #nim |
12:43:53 | FromGitter | <krux02> @Jipok when I want to run the examples without webassembly just for faster development cycles, how do I do it |
12:44:25 | FromGitter | <krux02> ``nim c -r example.nim`` doesn't work: cannot open sdl |
12:44:36 | crem | In the survey results, reason to stop using nim "Compiler doesn’t conform to Unix traditions and outputs HUGE binaries." listed twice. |
12:46:46 | * | Snircle quit (Client Quit) |
12:46:56 | FromGitter | <krux02> without the browser I have 39 istead of 9 FPS is the framerate example |
12:47:29 | * | ShalokShalom quit (Ping timeout: 248 seconds) |
12:47:47 | * | ShalokShalom_ joined #nim |
12:59:16 | Araq | crem: yeah we already noticed. filed under "troll plus a troll's friend" |
13:02:52 | * | francisl quit (Ping timeout: 258 seconds) |
13:03:33 | * | Snircle joined #nim |
13:03:59 | * | francisl joined #nim |
13:05:07 | FromGitter | <Jipok> @krux02 ⏎ ⏎ > scancodes for your input ⏎ ⏎ I took examples from Vladar4/sdl2_nim. [https://gitter.im/nim-lang/Nim?at=59d38b0201110b72316f9f7d] |
13:14:36 | * | ShalokShalom_ is now known as ShalokShalom |
13:20:08 | * | gangstacat quit (Ping timeout: 240 seconds) |
13:21:25 | * | gangstacat joined #nim |
13:26:33 | * | TjYoco joined #nim |
13:40:03 | * | manjaro-kde5 quit (Remote host closed the connection) |
13:48:54 | * | vlad1777d quit (Remote host closed the connection) |
13:49:24 | * | d10n-work joined #nim |
13:54:19 | * | corey1 joined #nim |
13:54:33 | * | corey1 quit (Client Quit) |
13:56:53 | * | gravycake joined #nim |
13:57:20 | * | okapi210 quit (Quit: Page closed) |
13:57:54 | * | gravycake left #nim (#nim) |
13:58:31 | * | okapi210 joined #nim |
13:59:37 | * | PMunch_ joined #nim |
14:00:32 | * | manjaro-kde5 joined #nim |
14:01:23 | * | azur_kind joined #nim |
14:02:01 | * | PMunch quit (Ping timeout: 240 seconds) |
14:07:37 | * | PMunch_ quit (Quit: Leaving) |
14:09:45 | * | relax joined #nim |
14:12:02 | FromGitter | <ephja> why a separate package for un-tar'ing :p |
14:12:17 | * | taaperotassu quit (Ping timeout: 248 seconds) |
14:17:33 | * | BigEpsilon joined #nim |
14:21:39 | * | solitudesf joined #nim |
14:22:21 | * | taaperotassu joined #nim |
14:25:52 | FromGitter | <Varriount> Don't forget that tar both bundles and compresses files! |
14:27:01 | * | endragor quit (Remote host closed the connection) |
14:27:59 | FromGitter | <Varriount> @Jipok I get 55 fps on my laptop |
14:28:05 | FromGitter | <Varriount> Very constant too. |
14:28:34 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:29:59 | FromGitter | <ephja> @Varriount the tar format itself doesn't include compression, but I assume that archiving without compressing is rare |
14:33:18 | * | Jesin quit (Quit: Leaving) |
14:33:32 | * | miran joined #nim |
14:34:39 | FromGitter | <ephja> I thought you meant that it always did both. anyway, I've created a library for creating tar archives |
14:40:06 | * | Snircle joined #nim |
14:40:26 | * | nsf quit (Quit: WeeChat 1.9) |
14:42:01 | * | endragor joined #nim |
14:43:02 | * | endragor quit (Remote host closed the connection) |
14:45:18 | * | endragor joined #nim |
14:45:53 | * | libman joined #nim |
14:46:47 | * | jsgrant quit (Quit: jsgrant) |
14:47:13 | * | jsgrant joined #nim |
14:49:16 | * | Pisuke joined #nim |
14:49:25 | * | MyMind quit (Ping timeout: 255 seconds) |
14:51:43 | * | jsgrant quit (Client Quit) |
14:52:01 | * | jsgrant joined #nim |
14:55:01 | * | TjYoco quit (Ping timeout: 240 seconds) |
14:58:22 | * | TjYoco joined #nim |
15:04:05 | * | nsf joined #nim |
15:13:15 | * | Jesin joined #nim |
15:14:37 | FromGitter | <Jipok> @yglukhov What is difference between nimx/context.nim and NanoVG? |
15:15:17 | Araq | lol |
15:16:09 | FromGitter | <ephja> are those related? |
15:17:25 | * | rauss quit (Quit: WeeChat 1.9.1) |
15:17:51 | * | rauss joined #nim |
15:18:06 | * | rauss quit (Client Quit) |
15:18:20 | FromGitter | <Jipok> They both represent drawing tools on top of OpenGL. Even the names of the functions overlap. |
15:19:13 | * | rauss joined #nim |
15:20:55 | * | couven92 quit (Read error: Connection reset by peer) |
15:28:08 | FromGitter | <BigEpsilon> @Araq , can you help me with some thing ? |
15:28:22 | Araq | ok |
15:28:27 | FromGitter | <BigEpsilon> Can an enum have generic parameter ? |
15:28:59 | FromGitter | <BigEpsilon> example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3acba177fb9fe7e33b7cc] |
15:29:15 | FromGitter | <BigEpsilon> that what I'm trying to do |
15:29:21 | FromGitter | <BigEpsilon> it compiles |
15:29:26 | FromGitter | <genotrance> yay I got the openssl SHA1 algorithm building into a nim module |
15:29:34 | FromGitter | <BigEpsilon> but I cannot access the enum elements |
15:29:45 | * | Sentreen quit (Ping timeout: 246 seconds) |
15:30:10 | FromGitter | <BigEpsilon> ```code paste, see link``` ⏎ ⏎ will fail [https://gitter.im/nim-lang/Nim?at=59d3ad01614889d4756db1fb] |
15:31:02 | FromGitter | <BigEpsilon> the generic param is here just to be passed to the parent class Foo |
15:33:12 | FromGitter | <BigEpsilon> it is the last piece for a c2nim PR |
15:33:32 | * | endragor quit (Remote host closed the connection) |
15:33:35 | * | gokr quit (Ping timeout: 240 seconds) |
15:33:59 | Araq | bigepsilon: enums cannot be generic |
15:34:04 | * | endragor joined #nim |
15:34:16 | Araq | I guess syntactically it's allowed but what's the point? |
15:35:05 | FromGitter | <BigEpsilon> it is for the importcpp parameter |
15:35:32 | FromGitter | <BigEpsilon> so the anum can be mapped to the correct cpp representation |
15:35:38 | FromGitter | <BigEpsilon> enum* |
15:37:41 | * | Demos joined #nim |
15:38:20 | * | Demos quit (Client Quit) |
15:38:30 | * | endragor quit (Ping timeout: 246 seconds) |
15:39:54 | * | Jesin quit (Quit: Leaving) |
15:43:34 | * | Sentreen joined #nim |
15:45:41 | * | derlafff quit (Remote host closed the connection) |
15:47:24 | * | derlafff joined #nim |
15:48:04 | FromGitter | <BigEpsilon> so I guess enums that are in generic classes cannot be used from nim |
15:48:22 | FromGitter | <krux02> I just found out that scancodes on webassembly don't work |
15:49:15 | FromGitter | <krux02> I mean sdl2 webassembly |
15:54:16 | * | derlafff quit (Remote host closed the connection) |
15:55:32 | * | derlafff joined #nim |
15:55:37 | Arrrr | Once '<' is deprecated, will still be overridable? |
15:56:13 | Araq | Arrrr: yeah, it's just a .deprecated annotation in system.nim |
15:56:38 | Araq | eventually it will go away and then proc `<`(x: T) still will be possible |
15:57:33 | * | derlafff quit (Remote host closed the connection) |
15:58:31 | * | derlafff joined #nim |
15:59:48 | * | derlafff quit (Remote host closed the connection) |
16:00:52 | * | derlafff joined #nim |
16:13:13 | * | adamchainz joined #nim |
16:17:03 | * | BitPuffin|osx quit (Ping timeout: 248 seconds) |
16:17:09 | * | couven92 joined #nim |
16:22:11 | FromGitter | <krux02> do you mean the decrement `<`? |
16:22:31 | FromGitter | <krux02> like in ``for i in 0 .. <3:``? |
16:25:11 | * | gokr joined #nim |
16:27:02 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
16:27:55 | * | yglukhov_ quit (Remote host closed the connection) |
16:29:10 | * | solitudesf quit (Remote host closed the connection) |
16:30:32 | * | yglukhov joined #nim |
16:31:46 | * | yglukhov_ joined #nim |
16:31:46 | * | yglukhov quit (Read error: Connection reset by peer) |
16:32:55 | * | derlafff quit (Remote host closed the connection) |
16:33:43 | * | derlafff joined #nim |
16:35:50 | FromGitter | <exts> 'Zero-indexed counting have two shortcuts ..< and ..^ to simplify counting to one less than the higher index:' can someone give me an example of how to use that `^` caret? |
16:36:05 | * | yglukhov_ quit (Ping timeout: 240 seconds) |
16:36:10 | FromGitter | <exts> there's no real example anywhere and i don't know what it's called to google it |
16:37:04 | miran | isn't ^x the same as -x in python? that is - an index, counting from right to left |
16:38:50 | FromGitter | <Yardanico> @exts there's many of examples |
16:39:10 | * | d10n-work quit (Quit: Connection closed for inactivity) |
16:39:13 | FromGitter | <Yardanico> did you check the tutorial? https://nim-lang.org/docs/tut1.html#advanced-types-slices |
16:50:00 | FromGitter | <exts> must've missed that example, thanks |
16:51:38 | FromGitter | <krux02> ``data[^x]`` is equal to ``data[data.len-x]`` |
16:51:48 | FromGitter | <exts> ah, yeah thanks :) |
16:52:20 | FromGitter | <krux02> so `^` only has a meaning in the ``[]`` operator |
16:52:29 | FromGitter | <exts> going to get back into gamedev w/ nim once i brush off my rust (no pun intended) |
16:52:53 | FromGitter | <krux02> well but it has double meaning |
16:53:03 | FromGitter | <krux02> so you need to clarify |
16:53:21 | FromGitter | <exts> rust as in, being rusty :P |
16:53:28 | FromGitter | <krux02> key |
16:53:33 | FromGitter | <exts> haven't used nim in forever |
16:53:47 | FromGitter | <exts> according to my rep almost 2 years |
16:53:52 | FromGitter | <exts> repo* |
16:53:54 | FromGitter | <exts> https://github.com/g4mr/enjoy2d |
16:54:03 | FromGitter | <exts> think im going to rewrite that |
16:54:19 | FromGitter | <krux02> nim is a very cool language with a lot of dirty corners that you can simply ignore by not going there :P |
16:54:42 | FromGitter | <krux02> what platfor do you use? |
16:55:03 | FromGitter | <krux02> Windows Linux OSX? |
16:55:05 | FromGitter | <exts> windows |
16:55:14 | FromGitter | <krux02> ah, ok |
16:55:21 | FromGitter | <exts> well i have a linux box about 4 feet away from me so linux mint as well |
16:55:41 | FromGitter | <krux02> I would like to have a few volunteers for my rendering macro project |
16:56:03 | FromGitter | <krux02> well I only test on Arch and Manjaro |
16:56:07 | FromGitter | <krux02> but mint should be fine |
16:56:11 | okapi210 | exit |
16:56:18 | FromGitter | <exts> ah |
16:56:18 | FromGitter | <krux02> lol |
16:56:19 | FromGitter | <Bennyelg> osx? |
16:56:24 | * | okapi210 quit (Remote host closed the connection) |
16:56:25 | FromGitter | <exts> have a repo? |
16:56:41 | FromGitter | <krux02> I sadly don't support OSX at the moment |
16:57:03 | FromGitter | <exts> hacktoberfest is this month so would be cool to see what i can get my hands on once i refresh my memory |
16:57:07 | FromGitter | <krux02> I don't have that platform and the OpenGL support for that Platform is Antique |
16:57:35 | FromGitter | <Yardanico> @exts well you can do PRs to any public repo anyway :) |
16:57:36 | FromGitter | <krux02> https://github.com/krux02/opengl-sandbox |
16:57:43 | FromGitter | <Yardanico> and they will count for hacktoberfest too |
16:58:10 | FromGitter | <krux02> it is for rapid prototyping of rendering code |
17:00:57 | * | Trustable joined #nim |
17:02:27 | * | gokr quit (Read error: No route to host) |
17:02:44 | FromGitter | <exts> @Yardanico yeah |
17:03:45 | FromGitter | <krux02> @exts getting started: cd examples; nim c -r <example> |
17:04:44 | FromGitter | <exts> going to star it for now |
17:14:04 | TjYoco | @krux02 im getting cannot open glm what should I download? |
17:14:49 | FromGitter | <krux02> nimble install glm |
17:15:23 | TjYoco | *facepalm* im tired today |
17:16:23 | FromGitter | <krux02> you also need sdl2_nim |
17:16:35 | FromGitter | <krux02> it is the not_official sdl2 binding |
17:17:50 | * | nsf quit (Quit: WeeChat 1.9) |
17:18:21 | FromGitter | <genotrance> where can I find an example of variable argument types? int | string? and how do I detect one vs. other |
17:21:24 | Araq | genotrance: don't use it, it doesn't do what you think it does and is usually bad design |
17:21:45 | * | smt joined #nim |
17:30:53 | * | yglukhov joined #nim |
17:33:07 | * | voiceftp quit (Ping timeout: 258 seconds) |
17:35:29 | * | yglukhov quit (Ping timeout: 248 seconds) |
17:36:53 | FromGitter | <Yardanico> @genotrance ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ But yeah, I agree with @Araq - I haven't found any good usecase for it :) [https://gitter.im/nim-lang/Nim?at=59d3cab57f323fc37501adb1] |
17:37:38 | * | Guest41251 joined #nim |
17:39:43 | * | yglukhov joined #nim |
17:41:37 | FromGitter | <Yardanico> it's something like implicit generics |
17:41:50 | * | gokr joined #nim |
17:43:37 | * | voiceftp joined #nim |
17:46:32 | * | gokr quit (Ping timeout: 258 seconds) |
17:51:11 | * | Guest41251 quit (Quit: Guest41251) |
17:51:27 | * | Guest41251 joined #nim |
17:54:16 | FromGitter | <genotrance> I see, will keep it in mind |
17:54:58 | FromGitter | <genotrance> @Yardanico @Araq thank you for the info! |
17:55:21 | FromGitter | <genotrance> what I was thinking is accepting a string or a seq of strings - if seq, run in a loop |
17:55:35 | FromGitter | <genotrance> but ya, can just make it a seq and call it a day |
17:56:51 | FromGitter | <Yardanico> you can accept varargs |
17:57:59 | FromGitter | <Yardanico> @genotrance ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3cfa77f323fc37501c9b9] |
17:58:25 | FromGitter | <Yardanico> https://nim-lang.org/docs/manual.html#types-varargs |
17:59:39 | FromGitter | <genotrance> neat |
18:00:08 | * | gokr joined #nim |
18:00:33 | FromGitter | <Yardanico> @Araq is "This transformation is only done if the varargs parameter is the last parameter in the procedure header. It is also possible to perform type conversions in this context:" still relevant? ⏎ I'm able to define "proc test(x: varargs[string], d: float) = " and call it like test("hello", "world", 5.0) |
18:00:55 | FromGitter | <Bennyelg> ```code paste, see link``` ⏎ ⏎ anyone see something wrong? [https://gitter.im/nim-lang/Nim?at=59d3d05601110b7231716144] |
18:00:58 | FromGitter | <Yardanico> I mean implicit array creation |
18:01:11 | FromGitter | <Yardanico> @Bennyelg ⏎ runForever() ? |
18:01:19 | * | ipjk joined #nim |
18:01:25 | FromGitter | <Yardanico> you need it to start endless jester loop :) |
18:01:27 | FromGitter | <Bennyelg> no it's not that, something in route |
18:01:33 | FromGitter | <Bennyelg> routes keyword |
18:01:35 | FromGitter | <Bennyelg> crying |
18:01:37 | FromGitter | <Yardanico> ??? |
18:01:48 | FromGitter | <Bennyelg> only when I remove the let db its work |
18:01:58 | FromGitter | <Bennyelg> erver.nim(7, 1) template/generic instantiation from here ⏎ lib/core/macros.nim(369, 57) Error: undeclared identifier: 'Future' |
18:02:01 | FromGitter | <Bennyelg> this is what I get |
18:02:10 | FromGitter | <Yardanico> you forgot to import asyncdispatch |
18:02:27 | FromGitter | <Bennyelg> thanks |
18:03:59 | FromGitter | <Yardanico> ah, sorry |
18:04:07 | FromGitter | <Yardanico> I misread the manual about varargs :P |
18:04:19 | FromGitter | <Yardanico> ah wait, no, I didn't |
18:04:37 | FromGitter | <genotrance> c2nim replaces the void type with nil, this is broken right? |
18:04:46 | FromGitter | <Yardanico> @genotrance no |
18:04:48 | * | Arrrr quit (Ping timeout: 246 seconds) |
18:04:51 | FromGitter | <Yardanico> ah |
18:04:57 | FromGitter | <Yardanico> "void" type with nil? probably |
18:05:10 | FromGitter | <Yardanico> @Araq ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3d1567f323fc37501d31f] |
18:05:25 | FromGitter | <Yardanico> works - https://gist.github.com/Yardanico/e354e98ec97ec38514802d458e4c60b4 |
18:05:27 | FromGitter | <krux02> you know you can join a path also with the ``/`` operator? |
18:05:43 | FromGitter | <Yardanico> I do :) |
18:05:46 | FromGitter | <krux02> getAppDir() / "file.dat" |
18:05:56 | FromGitter | <Yardanico> yeah, this is a neat thing |
18:06:20 | FromGitter | <krux02> one of the few things where operator overloading is really cool and useful. |
18:06:32 | * | Arrrr joined #nim |
18:07:02 | * | TjYoco quit (Ping timeout: 260 seconds) |
18:07:19 | * | Guest41251 quit (Quit: Guest41251) |
18:07:33 | * | Guest41251 joined #nim |
18:15:12 | * | Guest41251 quit (Ping timeout: 260 seconds) |
18:16:32 | * | gokr quit (Ping timeout: 248 seconds) |
18:16:53 | FromGitter | <krux02> is there no system.free? |
18:17:15 | FromGitter | <krux02> there is just freeShared |
18:17:20 | FromGitter | <krux02> I am confused |
18:18:29 | FromGitter | <krux02> there is just resize(0) |
18:18:37 | FromGitter | <ephja> dealloc? :p |
18:19:26 | * | vivus joined #nim |
18:20:05 | FromGitter | <krux02> well the documentation of ``resize`` talks about ``free`` |
18:20:14 | FromGitter | <krux02> that can be addressed |
18:22:50 | FromGitter | <Bennyelg> How can I make this work```nim ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59d3d57ab20c642429bb4bb6] |
18:22:57 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3d580bbbf9f1a381ab8ef] |
18:24:22 | vivus | has anybody built a big/interactive website with nim/jester here? |
18:24:31 | * | zachk joined #nim |
18:24:36 | dom96 | nimforum, if that counts |
18:24:49 | FromGitter | <Yardanico> @Bennyelg just use karax :) |
18:24:52 | FromGitter | <ephja> @Bennyelg 'add' takes 2 arguments |
18:25:08 | FromGitter | <Bennyelg> @Yardanico i WILL EVANTUALLY |
18:25:45 | FromGitter | <ephja> either add more calls to 'add' or concatenate strings with & |
18:25:58 | vivus | dom96: is your framework still the go-to for web-apps? |
18:27:41 | dom96 | I'd say so |
18:29:08 | Araq | I agree. |
18:29:32 | * | Jesin joined #nim |
18:29:46 | * | TjYoco joined #nim |
18:30:37 | Calinou | I remember Jester having performance bottlenecks, is this still the case? |
18:30:56 | * | PMunch joined #nim |
18:31:07 | * | nsf joined #nim |
18:31:19 | Araq | most of these bottlenecks are in Nim's stdlib |
18:31:59 | Calinou | that kind of sucks… this means that most complex programs won't be fast |
18:32:15 | Araq | file uploads and downloads used to be really super bad, now they are ok'ish, I hope? |
18:32:20 | vivus | "fast" is relative, as I assume jester is 'faster' than Flask |
18:32:27 | Calinou | surely it is, yeah |
18:32:50 | Calinou | I've only done back-end development in CodeIgniter/Django/Symfony myself :P |
18:33:01 | Araq | the stdlib needs to use 'sendfile' but doesn't. PRs welcome |
18:33:07 | Calinou | haven't really tried the lower-end options, I found them too cumbersome to use |
18:33:18 | Calinou | (lack of docs/community resources is also a big problem) |
18:33:20 | vivus | Calinou: whatever pays the bills. PHP gets loads of flack, but it runs more sites/apps than Go ever will |
18:33:29 | Calinou | vivus: true, PHP is not that bad if you follow good practices |
18:33:34 | Calinou | and it can be fairly speedy, too |
18:33:43 | Calinou | (not quite as fast as Go, but "fast enough" for a lot of use cases already) |
18:34:24 | vivus | Does anybody use vim with auto-complete for nim? |
18:34:32 | PMunch | vivus, I do |
18:34:45 | PMunch | Or, well I'm not sure if I've got auto-complete.. |
18:34:51 | vivus | PMunch: which vundle-plugin do you use? |
18:34:55 | * | endragor joined #nim |
18:35:15 | PMunch | zah/nim.vim |
18:35:20 | PMunch | And scroolose/syntastic |
18:35:31 | PMunch | Those are the only ones I've got for Nim I think |
18:35:49 | FromGitter | <BigEpsilon> I couldn't find a vim plugin thats support nimsuggest |
18:36:20 | FromGitter | <BigEpsilon> VS code is better in that regard |
18:36:52 | PMunch | https://medium.com/@caspervonb/why-i-still-use-vim-67afd76b4db6?h |
18:37:02 | PMunch | Yes, but VC code is horrible in pretty much anything else.. |
18:37:46 | FromGitter | <BigEpsilon> vim+tmux FTW |
18:37:49 | vivus | I saw a nimsuggest wrapper for vim like the other day |
18:38:03 | * | gokr joined #nim |
18:38:07 | PMunch | What do you need tmux for? |
18:38:36 | FromGitter | <ephja> obligatory announcement regarding nimsuggest leaks: https://gist.github.com/ephja/70375009b9b6de00e3e115e3d7682ec2 |
18:38:37 | FromGitter | <BigEpsilon> panes and tabs |
18:38:46 | FromGitter | <BigEpsilon> with easy navigation |
18:38:58 | FromGitter | <BigEpsilon> and good integration with vim |
18:39:02 | PMunch | Multiple buffers and Vim keybindings :) |
18:39:08 | * | endragor quit (Ping timeout: 240 seconds) |
18:39:22 | FromGitter | <BigEpsilon> still I prefer using tmux terminal |
18:39:33 | FromGitter | <ephja> neovim terminals |
18:39:36 | PMunch | http://ix.io/AHC |
18:39:43 | vivus | https://github.com/BitR/ycm-nimsuggest |
18:39:43 | FromGitter | <ephja> they seem broken on windows though |
18:39:47 | PMunch | That's my buffer navigation bindings |
18:39:54 | FromGitter | <BigEpsilon> I tried neovim terminal |
18:40:03 | FromGitter | <BigEpsilon> but I prefer tmux |
18:40:24 | vivus | compilation from within neovim? |
18:40:35 | FromGitter | <BigEpsilon> no need for extra keys strokes to enter/exit insert mode |
18:40:57 | FromGitter | <BigEpsilon> and I can save my entire workspace with tmux |
18:41:10 | FromGitter | <BigEpsilon> attach/detach |
18:43:58 | FromGitter | <ephja> vivus: yes, in a single quadrant for example |
18:44:41 | FromGitter | <ephja> that's the only thing I've wanted it for |
18:44:42 | FromGitter | <Jipok> Why does everyone choose between vim and vscode? Why not Sublime Text? |
18:45:35 | miran | "VS code is horrible in pretty much anything else" -> PMunch, what do you mean by that? i use VS code regularly and don't feel like it is horrible |
18:45:48 | FromGitter | <Jipok> electron |
18:45:59 | FromGitter | <ephja> doesn't bother me |
18:46:25 | PMunch | miran, check the link I sent |
18:46:26 | FromGitter | <ephja> what does is the fact that you can't have a symbol browser next to the editor for example |
18:46:33 | PMunch | Hogs memory like there's no tomorrow |
18:47:17 | PMunch | And the sum of all those tiny inefficiencies than front-end devs like to sweep under the rug adds up |
18:47:26 | dom96 | it doesn't for me |
18:47:30 | dom96 | Using 63mb right now |
18:47:30 | miran | PMunch: i've read that before, but it didn't convince me it is horrible ;) |
18:47:35 | PMunch | Noticed a drastic boost in battery life after I switched to vim as well, which is always nice :) |
18:47:49 | PMunch | The horrible part was a bit tongue in cheek |
18:47:50 | dom96 | oh wait, there is a bunch of "Code Helper"s |
18:48:03 | miran | eh, i use desktop, so i have no idea about battery life |
18:48:07 | PMunch | It's not horrible, just horribler than vim :P |
18:48:24 | vivus | VSCode is an Electron app? |
18:48:28 | FromGitter | <Jipok> + |
18:48:33 | FromGitter | <ephja> it used about 500mb when I worked on the compiler and a few other things. I don't think the CPU usage was high |
18:48:52 | ipjk | 63 mb isn't that bad |
18:49:02 | PMunch | vivus, yup |
18:49:13 | dom96 | ipjk: nah, I'm wrong, it's way more than that |
18:49:23 | vivus | even sublime is better than electron-apps |
18:49:24 | ipjk | My emacs is running at 50 with all the files in lib/nim open |
18:49:25 | miran | PMunch: i'm vim noob, so i'm much more productive in vs code |
18:49:33 | dom96 | But I've got 16GB, doesn't bother me |
18:49:42 | PMunch | Oh yeah, that's definitely a factor miran :P |
18:49:58 | miran | and more memory consumption doesn't bother me, for the same reason dom96 just mentioned :) |
18:50:16 | PMunch | But with a tiling WM and good keybindings in Nim I can blaze through all kinds of tasks in a jiffy |
18:50:20 | FromGitter | <ephja> it doesn't result in all the RAM being used, but unnecessary bloat still bothers me |
18:50:22 | dom96 | I tried getting into vim. It simply has too many irregularities, VS Code is at least consistent with the rest of my OS... |
18:51:01 | miran | i started to use vim keybindings in vs code. so far - very nice experience |
18:51:14 | FromGitter | <Jipok> But using such software you support it. So it's not a matter of consumed memory. |
18:51:15 | FromGitter | <ephja> "Code requires a whopping 349 megabytes in order to open a 60 byte file" hmmm |
18:51:57 | PMunch | Yeah, I would guess the 60 byte file accounts for about 60 bytes of that total :P |
18:52:43 | FromGitter | <ephja> doesn't correspond to dom's experience at all then |
18:53:11 | ipjk | 349 isn't really that much in this day and age |
18:53:23 | dom96 | Like I said, I was wrong about its memory usage. |
18:53:28 | vivus | the only editor that matters is the 1 Araq uses XD |
18:53:32 | FromGitter | <ephja> ok |
18:53:38 | PMunch | ipjk, still it's quite the overhead.. |
18:54:17 | miran | what use is of 16GB of ram, if you constantly have 15GB free? ;) |
18:54:23 | dom96 | ^^ |
18:54:43 | vivus | is anybody familiar with a reddit SPA? I don't see any on GH that I could build a Jester API for |
18:54:46 | FromGitter | <ephja> @Jipok well, I haven't mentioned it to that many people, so not much harm done :p |
18:54:58 | PMunch | SPA? |
18:55:03 | vivus | miran: your chrome browser needs 2GB to see stackoverflow |
18:55:04 | FromGitter | <Yardanico> API maybe ? :) |
18:55:14 | vivus | PMunch: Single Page Application |
18:55:17 | miran | vivus: :) |
18:56:20 | PMunch | Aah |
18:56:28 | vivus | I don't really like JS with all its fancy frameworks though ಠ_ಠ |
18:56:45 | ipjk | What's more to discuss about electron-based applications, are their filesize |
18:58:55 | miran | would i like that vs code is lighter/faster? yeah. would i like it so much that i'm ready to pay $80 for sublime? hell no. |
18:59:02 | FromGitter | <Yardanico> well also they're too heavy :( |
18:59:05 | FromGitter | <Yardanico> sublime is three |
18:59:06 | FromGitter | <Yardanico> *free |
18:59:08 | FromGitter | <Yardanico> all dev builds are |
18:59:14 | PMunch | "Free" |
18:59:28 | PMunch | Isn't it the same kind of free as WinRAR was? |
18:59:58 | ipjk | "Sublime Text 3 dev builds are currently available to licensed users only." |
19:00:01 | miran | well, i don't want to constantly see popups to remind me i could pay for it |
19:00:09 | planetis[m] | With the latest Ast changes in nim you may need to create a StmtList for the result. |
19:00:37 | miran | and community/extensions seem on vsc side too |
19:01:05 | ipjk | Aslong as users are happy with editor x, it doesn't really matte. |
19:02:07 | vivus | miran: same can be said for electron, neovim, emacs and sublime |
19:03:00 | * | TjYoco quit (Quit: Leaving) |
19:03:48 | FromGitter | <Jipok> If you do not like closed Sublime, then maybe need to fix plugin for textadept? |
19:03:57 | FromGitter | <Jipok> https://github.com/xomachine/textadept-nim |
19:05:12 | FromGitter | <Jipok> Well, or contribute Aporia |
19:05:37 | * | Vladar quit (Quit: Leaving) |
19:10:15 | miran | vivus: what do you mean? |
19:10:29 | vivus | community/extensions |
19:10:33 | miran | aha |
19:19:52 | * | Arrrr quit (Read error: Connection reset by peer) |
19:26:57 | * | azur_kind quit (Remote host closed the connection) |
19:27:38 | * | Guest41251 joined #nim |
19:28:27 | * | Guest41251 quit (Read error: Connection reset by peer) |
19:33:28 | * | BigEpsilon quit (Ping timeout: 240 seconds) |
19:36:01 | * | gokr quit (Ping timeout: 248 seconds) |
19:36:45 | * | Trustable quit (Remote host closed the connection) |
19:41:02 | PMunch | Hmm, this DSL is hard to get right.. |
19:41:48 | * | gokr joined #nim |
19:48:51 | * | Jesin quit (Quit: Leaving) |
20:04:54 | * | salewski joined #nim |
20:05:16 | salewski | I assume there is a better way to write this: |
20:05:21 | salewski | if name.endsWith("Mask"): name = name[0 .. ^5] |
20:08:21 | * | miran quit (Ping timeout: 240 seconds) |
20:08:30 | * | solitudesf joined #nim |
20:13:48 | * | jsgrant quit (Read error: Connection reset by peer) |
20:13:52 | FromGitter | <Varriount> salewski: You could also use setlen |
20:13:53 | salewski | Ah yes, I think strutils.removeSuffix() will do. |
20:14:47 | salewski | Yes, setlen() is also good, thanks. |
20:16:08 | * | salewski quit (Quit: WeeChat 1.9) |
20:16:12 | FromGitter | <Bennyelg> who worte nim-template |
20:16:19 | FromGitter | <Bennyelg> does he chat somethings here? |
20:16:32 | FromGitter | <Bennyelg> @sschober |
20:16:56 | onionhammer | nim-templates is mine, if you're talking about what im thinking of |
20:17:06 | FromGitter | <Bennyelg> Yea i need help for a sec |
20:17:17 | FromGitter | <Bennyelg> just let me grap my charger my laptop is going to shutdown |
20:18:12 | FromGitter | <Bennyelg> @onionhammer Did you ever tried to print Seq of custom types? |
20:18:37 | FromGitter | <Bennyelg> In example ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3f09d7f323fc375028e6e] |
20:18:41 | onionhammer | example code? |
20:19:51 | FromGitter | <Bennyelg> what I am getting now is: 'category.name' is string and it has to be discarded |
20:19:57 | onionhammer | that should work |
20:20:12 | FromGitter | <Bennyelg> well it doesn't :| |
20:20:19 | onionhammer | can you look at the code being generated? |
20:20:33 | FromGitter | <Bennyelg> how do I do that? |
20:20:54 | FromGitter | <Bennyelg> I can't compile it |
20:20:57 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3f129bac826f0542f1935] |
20:20:59 | FromGitter | <krux02> there is nimcache |
20:21:43 | FromGitter | <krux02> that error means that you have an expression that is not used for anything |
20:21:52 | FromGitter | <krux02> in most languages this isn't an error |
20:21:54 | FromGitter | <krux02> in Nim it is |
20:21:57 | onionhammer | try $() instead of ${} |
20:22:07 | onionhammer | ${ statement } vs $( expression ) |
20:22:22 | FromGitter | <krux02> you can sinlence it with a ``discard`` around that expression, but it is still code smell |
20:22:32 | FromGitter | <Bennyelg> I tried |
20:22:38 | FromGitter | <Bennyelg> it not shown in the page if I do that |
20:22:44 | Calinou | Visual Studio Code is the best editor (≠ IDE) I've ever used |
20:22:54 | Calinou | it's not really open source, unfortunately, but at least it's free of charge… |
20:23:01 | FromGitter | <krux02> where do you use the "category.name"? |
20:23:01 | onionhammer | does VSCode support tmpl highlighting for nim-templates? |
20:23:08 | FromGitter | <Bennyelg> ( ) worked @ onionhammer |
20:23:10 | FromGitter | <krux02> are you in a macro? |
20:23:13 | FromGitter | <krux02> can you print the ast? |
20:23:20 | Calinou | (see https://aur.archlinux.org/packages/visual-studio-code-oss/) |
20:23:30 | onionhammer | @Bennyyelg yeah sorry, it's been a while since I wrote that, forgot that detail. |
20:23:35 | Calinou | onionhammer: I don't know, I've only used its basic Nim support brought by the Nim add-on |
20:23:56 | onionhammer | @Calinou try pasting @Bennyelg's example above |
20:24:01 | FromGitter | <Bennyelg> Add more examples, maintane the package it's very useful, a specially hwen nothing is around |
20:24:04 | FromGitter | <krux02> onionhammer: what do you mean by tmpl highlighting? |
20:24:05 | Calinou | I'd like to see an IntelliJ plugin, but I don't think it's going to happen soon |
20:24:07 | Calinou | :P |
20:24:12 | onionhammer | it should highlight as HTML in Sublime |
20:24:19 | * | PMunch quit (Quit: leaving) |
20:24:28 | FromGitter | <krux02> semantic highlighting, different colors for templates procedures methods? |
20:24:41 | onionhammer | correct |
20:25:08 | FromGitter | <krux02> I don't know |
20:25:14 | onionhammer | myproc = tmpl html""" highlight as html """ , where you can swap out "html" for "css", other languages |
20:26:12 | FromGitter | <krux02> ah that you mean |
20:26:24 | FromGitter | <krux02> almost forgot about that nim feature |
20:26:35 | onionhammer | it's not a nim feature ;) |
20:26:45 | FromGitter | <krux02> you mean the templating engine |
20:26:53 | FromGitter | <krux02> not nim templates |
20:27:01 | onionhammer | it's a nim-templates + syntax highlighting feature supported in github and nimlime |
20:27:16 | onionhammer | since github uses the nimlime grammar files |
20:28:03 | onionhammer | see samples here https://github.com/onionhammer/nim-templates |
20:31:13 | FromGitter | <Bennyelg> anyway to run jester with debug mode? |
20:34:19 | * | Snircle joined #nim |
20:39:25 | FromGitter | <Bennyelg> @dom96 |
20:42:28 | dom96 | it's debug by default |
20:42:31 | dom96 | what are you looking for? |
20:42:57 | FromGitter | <Bennyelg> I am working on routes on server but every edit i need to recompile all |
20:43:06 | FromGitter | <Bennyelg> there is any way to auto recompile after every save ? |
20:43:16 | dom96 | no |
20:43:24 | FromGitter | <Bennyelg> thanks |
20:43:50 | onionhammer | @dom96 what about nims |
20:43:52 | onionhammer | nimscript files |
20:44:29 | dom96 | what about them? |
20:44:41 | onionhammer | those dont need to be "compiled", right? you just run them |
20:44:47 | federico3 | Bennyelg: recompile nim code when a file is changed? https://github.com/FedericoCeratto/nim-testrunner/ does that |
20:45:03 | dom96 | onionhammer: sure, how does this help here? |
20:45:13 | onionhammer | its not the same as hot reloading, but it might be a slightly faster development loop |
20:45:54 | dom96 | nims doesn't support the ffi |
20:46:04 | onionhammer | ahh, still? :P |
20:46:30 | FromGitter | <Bennyelg> Thanks I will look into that :D |
20:54:54 | * | Jesin joined #nim |
21:01:48 | FromGitter | <Bennyelg> How to extract the number ? |
21:01:50 | FromGitter | <Bennyelg> get re"/forums/forum_id[0-9]/": |
21:05:40 | * | libman quit (Quit: Connection closed for inactivity) |
21:09:59 | FromGitter | <adamrezich> I'm playing around with "hotloading", using dynlib to call a proc in a nim DLL (in a new thread). passing ints and floats works fine, but how do you pass pointers? can you? (I know very little about DLL/FFI stuff tbh) |
21:19:17 | * | jsgrant joined #nim |
21:19:22 | FromGitter | <zacharycarter> o/ |
21:21:05 | * | solitudesf quit (Ping timeout: 240 seconds) |
21:22:07 | * | relax quit (Ping timeout: 248 seconds) |
21:24:32 | * | obadz quit (Quit: WeeChat 1.9) |
21:40:02 | * | dhalinar joined #nim |
21:46:47 | FromGitter | <zacharycarter> def-pri-pub: you around? |
21:47:39 | dom96 | Bennyelg: get re"/forums/forum_id([0-9])/": echo request.matches[0] |
21:48:01 | FromGitter | <Bennyelg> @dom96 I did it:) thanks |
22:01:34 | FromGitter | <zacharycarter> https://imgur.com/a/GCIoG |
22:04:50 | * | nsf quit (Quit: WeeChat 1.9) |
22:10:35 | * | taaperotassu quit (Ping timeout: 246 seconds) |
22:18:38 | * | taaperotassu joined #nim |
22:19:51 | * | Ven`` quit (Ping timeout: 258 seconds) |
22:27:25 | * | relax joined #nim |
22:31:27 | FromGitter | <bogen> @adamrezich I needed to do the same, I used the example from here: https://forum.nim-lang.org/t/1400 |
22:32:07 | * | taaperotassu quit (Ping timeout: 258 seconds) |
22:32:09 | * | libman joined #nim |
22:40:59 | * | taaperotassu joined #nim |
22:48:04 | * | relax quit (Ping timeout: 240 seconds) |
22:57:38 | * | obadz joined #nim |
23:05:24 | * | thmslld joined #nim |
23:07:13 | * | Sentreen quit (Ping timeout: 248 seconds) |
23:11:34 | * | thmslld quit (Ping timeout: 240 seconds) |
23:20:48 | * | vivus quit (Quit: Leaving) |
23:20:58 | * | Sentreen joined #nim |
23:42:37 | * | ftsf joined #nim |
23:42:58 | * | ftsf quit (Read error: Connection reset by peer) |
23:45:20 | * | gokr quit (Ping timeout: 258 seconds) |
23:48:15 | * | dhalinar quit (Ping timeout: 248 seconds) |
23:50:30 | ipjk | adamrezich: Isn't it possible to pass the address? |