<< 03-10-2017 >>

00:10:47*dhalinar joined #nim
00:17:45*libman quit (Quit: Connection closed for inactivity)
00:22:14adam12What'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:29FromGitter<genotrance> right now I'm trying to wrap openssl's SHA functions
01:39:55*def-pri-pub quit (Quit: Leaving.)
01:44:10adam12Cool :)
02:08:07adam12What'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:29FromGitter<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:29FromGitter<citycide> more on dart's cascades: http://news.dartlang.org/2012/02/method-cascades-in-dart-posted-by-gilad.html
04:55:46FromGitter<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:03Araqcitycide: cascade x:
05:23:08Araq add "foo"
05:23:11Araq add "bar"
05:23:16Araqadd "more here"
05:23:38Araqmakes for a good introduction into Nim's macro system
05:23:49Araqit's pretty simple to implement
05:24:22*def-pri-pub quit (Quit: Leaving.)
05:26:25FromGitter<citycide> @Araq: that was my plan exactly, for learning the macros and Nim itself
05:27:31Araqto make it more interesting you can also support cascade(a(), b(), c())
05:29:25FromGitter<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:33PMunchInteresting 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:37FromGitter<Bennyelg> Hey
07:45:43FromGitter<Bennyelg> I want to Hash Passwords of my users
07:46:00FromGitter<Bennyelg> hash("some password") gives me negetive string, is it ok?
07:49:51euantorUse bcrypt, same as the nimforum. There are two options: https://github.com/flaviut/easy-bcrypt or https://github.com/ithkuil/bcryptnim
07:50:01euantorNeither have been updated in a while unfortunately
07:50:10FromGitter<Bennyelg> thanks\
07:52:06Araqthey are also both Unix specific and with Unix specific security problems
07:54:13FromGitter<Bennyelg> bycrpt is not working
07:54:26FromGitter<Bennyelg> :( just wanted to hash my users password :D
07:58:53Araqwe need a pure Nim bcrypt library and add it to the stdlib
08:05:45FromGitter<Bennyelg> Yea, I wish my knowledge on nim was better to contribute
08:15:53FromGitter<Yardanico> Araq: will karaxdsl be separated as a different module to use it instead of htmlgen?
08:16:20AraqI have no plans to do that, 'nimble install karax'
08:16:47Araqis easy enough
08:20:03euantorYes, a pure Nim bcrypt module would be great
08:24:44*yglukhov joined #nim
08:25:10FromGitter<Bennyelg> Im still waiting to some docs
08:29:02Araqlook at the examples?
08:29:42FromGitter<Bennyelg> You are not planning to create docs?
08:54:46AraqI 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:50ArrrrIs nim the dark souls of programming languages?
09:20:42FromGitter<Grabli66> No. It's like GTA :)
09:21:51Vladarmore like minecraft
09:22:06Vladarwith all the macros
09:22:18FromGitter<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:37FromGitter<Jipok> Is there a name for the hash algorithm used in nim?
10:27:09*xet7 quit (Quit: Leaving)
10:32:55Araq"slow hash that needs to be replaced"
10:33:32FromGitter<Jipok> https://github.com/rurban/smhasher
10:33:58FromGitter<Jipok> M.b. to take something from here?
10:34:50Araquse what Rust uses to avoid shitstorms
10:40:12FromGitter<Bennyelg> How Can I do Something like that? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3690cbbbf9f1a381823a1]
10:40:37FromGitter<Jipok> Option?
10:40:47FromGitter<Bennyelg> what do you mean :]
10:40:49FromGitter<Bennyelg> example
10:41:04FromGitter<Jipok> http://devdocs.io/nim/options
10:42:23FromGitter<krux02> @Bennyelg I recommend variant type
10:42:49FromGitter<Bennyelg> explain :] ⏎ (BTW: the option is not good for me in this case)
10:43:03FromGitter<krux02> you need a type that is either a User or an error message why you don't have a user
10:43:21FromGitter<krux02> in Rust there is a Result type in the standard library for exactly this case
10:43:38FromGitter<Bennyelg> Oh I see
10:43:39FromGitter<krux02> Result[User] would either be a user or an error message
10:43:39FromGitter<Bennyelg> Nice
10:43:51FromGitter<Bennyelg> Now you refreshed my mind
10:44:09FromGitter<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:31FromGitter<Bennyelg> ```type ⏎ SingleUserReturn* = ref object ⏎ returnSet: User | string ⏎ ``` [https://gitter.im/nim-lang/Nim?at=59d36a4ab59d55b82368ea93]
10:45:39FromGitter<krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36a53177fb9fe7e321a6e]
10:46:15FromGitter<krux02> you should not do User | string in this case
10:46:38FromGitter<Bennyelg> Because I can't actually handle the returned type properlly?
10:46:56FromGitter<Bennyelg> I liked you example Im going to adopt it
10:46:58FromGitter<krux02> no, User | string is internally a generi
10:47:05FromGitter<krux02> ``````
10:47:10FromGitter<krux02> ``````
10:47:34FromGitter<ephja> are you going to deal with both exceptions and "results"?
10:48:00FromGitter<krux02> ```proc foo(a: float) = $a ⏎ proc foo(a: int) = $a``` [https://gitter.im/nim-lang/Nim?at=59d36ae07f323fc375ff6216]
10:48:42FromGitter<Bennyelg> yea 2 singatures
10:53:55FromGitter<Bennyelg> @krux02 ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36c43f7299e8f53a10cf7]
10:54:00FromGitter<Bennyelg> how to use it
10:54:38FromGitter<krux02> result.hasValue = true; result.value = user
10:54:57dom96https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html?ref=irc
10:55:01FromGitter<krux02> you have to set hasValue to true otherwise it won't work
10:55:08dom96Something that didn't make it into my book, hope you enjoy it :)
10:55:33FromGitter<Bennyelg> hehe I finished your book today
10:55:56planetis[m]nice article dom96 good work :)
10:56:00FromGitter<Bennyelg> I still have to go through some staff again but it was very very fun
10:56:22dom96Bennyelg: *stuff :)
10:56:33FromGitter<Bennyelg> *sorry
10:56:34FromGitter<Bennyelg> hehe
10:57:01FromGitter<Jipok> Is this acceptable? ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59d36cfc01110b72316ef30f]
10:57:01dom96Not a big deal, just notice this mistake a lot and think it's good to make you aware of it.
10:57:07FromGitter<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:19dom96Bennyelg: awesome, thanks :)
10:57:44FromGitter<Bennyelg> Cheers, I am waiting for "The Advance concepts of Nim" book
10:57:54FromGitter<Bennyelg> dont eliminate this idea, just start to write :P
10:58:17FromGitter<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:41FromGitter<krux02> ``rbreak foobar`` breaks on all functions containing "foobar"
10:59:21FromGitter<Bennyelg> @Arne, How do you instantiate Result variable ?
10:59:27FromGitter<Bennyelg> Error: cannot instantiate: 'Result'
11:00:02FromGitter<krux02> can you show me the code you have where you got the error?
11:00:24FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36dc7bbbf9f1a38183e01]
11:02:03FromGitter<krux02> that should work
11:02:08FromGitter<krux02> I have this:
11:02:11FromGitter<Bennyelg> should :D
11:02:17FromGitter<krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36e38614889d4756c2b38]
11:03:05euantorFigure 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:17FromGitter<Jipok> ```looks unnecessary```
11:03:40FromGitter<krux02> yes that is what I already removed
11:03:45FromGitter<krux02> nim has an implicit result variable
11:03:51dom96euantor: huh, thanks for letting me know
11:03:52FromGitter<krux02> didn't expect that to be so useful
11:04:19FromGitter<Bennyelg> Still not work hehe
11:04:37FromGitter<krux02> @Jipok I am currently trying your webassembly examples :P
11:04:58FromGitter<krux02> I kind of don't like the webassembly stack everything is so slow
11:05:00FromGitter<Bennyelg> var alfred = Users["Alfres"]
11:05:05FromGitter<krux02> I mean the tools
11:05:14FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36eeab59d55b823690a2e]
11:05:23FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d36ef3bbbf9f1a3818464c]
11:05:24euantorSame 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:49dom96fixed
11:05:51FromGitter<krux02> @Bennyelg: when you solved your problem with the result type, you probably should use a Table[string, User]
11:05:59FromGitter<andreaferretti> your `Result` type is generic
11:06:05euantorNice one
11:06:06FromGitter<Bennyelg> oh
11:06:10FromGitter<Bennyelg> yea I need add[T]
11:06:11FromGitter<andreaferretti> you need to return `Result[User]`
11:06:12FromGitter<Bennyelg> to my method
11:06:49FromGitter<krux02> oh yea sorry my bad I forgot that Result needed a generic parameter, but why did it work then?
11:06:55FromGitter<Bennyelg> Works
11:06:58FromGitter<Bennyelg> like lolipop
11:06:59FromGitter<Bennyelg> thanks
11:07:40FromGitter<krux02> this is weird on my system it works without the generic [User] ...
11:07:44FromGitter<krux02> Nim is weird
11:07:46*francisl joined #nim
11:07:54FromGitter<Bennyelg> hehe 0.17.2
11:07:59FromGitter<Bennyelg> wait to 1.
11:08:31FromGitter<ephja> it's inferred from the body?
11:08:50FromGitter<ephja> I dunno if that's a good thing or not
11:09:22FromGitter<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:41FromGitter<krux02> my random guess would be, that it would a huge time sink
11:10:01FromGitter<Jipok> How nim determines that T = User. Looks at the further use of result?
11:10:52FromGitter<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:37FromGitter<Bennyelg> After I return the result of Result[user]
11:11:40FromGitter<krux02> then I wuold prefer an error message like "you need to add the generic parameter '[User]' here"
11:11:48FromGitter<Bennyelg> How Do I actually the the user data
11:12:15FromGitter<krux02> you access is with ``value``
11:12:36FromGitter<Bennyelg> I thought i can but nop I should * the value right?
11:13:43FromGitter<Bennyelg> Yea
11:13:46FromGitter<Bennyelg> works like charm
11:13:50FromGitter<krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d370edb20c642429b8ce5b]
11:15:56FromGitter<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:18FromGitter<krux02> yes I did not use it
11:16:49FromGitter<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:13FromGitter<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:18FromGitter<alehander42> and it compiles :D
11:22:44FromGitter<krux02> @Jipok how do I start the webassembly builds?
11:22:57FromGitter<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:15FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d37503177fb9fe7e3258bf]
11:32:20FromGitter<Bennyelg> @krux02
11:32:25FromGitter<Bennyelg> @Araq
11:32:26FromGitter<Bennyelg> *
11:32:59FromGitter<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:29FromGitter<BigEpsilon> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d37588177fb9fe7e325c00]
11:34:27FromGitter<alehander42> why is it generic?
11:35:08FromGitter<BigEpsilon> because I want to import the enum from cpp header
11:35:09FromGitter<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:25FromGitter<BigEpsilon> and the enum is nested in a templated class
11:36:19FromGitter<BigEpsilon> example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3763301110b72316f27b8]
11:37:24FromGitter<Bennyelg> @alehander42 and than what
11:37:29FromGitter<Bennyelg> how to I pack it
11:45:25FromGitter<krux02> that is something I don't know, sorry
11:46:10FromGitter<krux02> @BigEpsilon this is the first time I see a generic parameter at an enum
11:46:35FromGitter<krux02> and is c++ you can't have template parameters on enums
11:46:44FromGitter<krux02> so maybo your [T] is wrong
11:47:56FromGitter<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:10FromGitter<ephja> interfacing with C++ seems like fun :-)
11:50:24FromGitter<Jipok> @krux02 About wasm. What exactly do you do?
11:51:04*ShalokShalom joined #nim
11:51:30*vlad1777d joined #nim
11:52:43FromGitter<krux02> @Jipok well I did execute the build script
11:55:06FromGitter<krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d37a9a614889d4756c7229]
11:58:15FromGitter<Jipok> It's strange. It works for me.
11:58:24FromGitter<Jipok> And not just for me.
11:58:24*dddddd joined #nim
11:58:46planetis[m]about the post: rst documentation says double backticks for code but nim doc produces bold. Is it a bug?
11:58:48FromGitter<krux02> I open the index.html from chromium
12:04:04FromGitter<BigEpsilon> @krux02 , yes it is only to interface with C++
12:04:19FromGitter<Jipok> @krux02 In the evening I will try to deal with this.
12:04:26dom96planetis[m]: I think it produces an emphasised monospace font
12:04:45FromGitter<BigEpsilon> maybe @Araq can hint me
12:06:40FromGitter<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:21FromGitter<Jipok> @krux02 try this https://jipok.github.io/Nim-SDL2-and-Emscripten/ex208_framerate/index.html
12:08:02FromGitter<krux02> yes that works
12:08:16FromGitter<krux02> I have astonishing 9 FPS
12:08:20FromGitter<krux02> but it works
12:08:36FromGitter<krux02> (mesa software rendering)
12:08:42ArrrrHope araq doesn't remove </> overloading
12:09:00FromGitter<krux02> why should he?
12:12:12FromGitter<ephja> I dunno lol
12:13:57FromGitter<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:57FromGitter... 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:59FromGitter<Varriount> @krux02 My phone gets 44 fps. :3
12:16:04FromGitter<ephja> hmmm always 50 fps
12:16:27FromGitter<krux02> yea I know my computer 3D rendering is super slow
12:16:38FromGitter<ephja> and then firefox hung when I switched to another tab. well, that should improve eventually
12:17:35FromGitter<krux02> eventually I hope I can write an sdl app and simply change from "nim c -r" to "nim c -wasm -r"
12:17:44FromGitter<krux02> and it will be executed
12:18:45FromGitter<krux02> @Jipok how do you launch the generated index.html?
12:18:50yglukhov_krux02: nimx nake supports that ;) nake -d:wasm
12:18:51FromGitter<krux02> opening it in a browser doesn't work
12:19:09yglukhov_also will start your browser with the build
12:19:22FromGitter<Jipok> with some restrictions. Browsers do not yet support multithreading for wasm.
12:19:40FromGitter<krux02> I don't need multithreading
12:19:50FromGitter<Jipok> @krux02 just open it
12:20:01FromGitter<krux02> as long as I don't load big assets in the background I don't think I need it
12:20:19FromGitter<krux02> yea opening it result in the error shown to you
12:20:36FromGitter<BigEpsilon> @krux02 , I'm implementing that in c2nim, so it will be better if I can make it work
12:20:45FromGitter<krux02> it is a security mechanism that prevents accessing local files
12:21:42FromGitter<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:17FromGitter<krux02> @jipok did you enable something in chromium to enable local file path access?
12:35:06FromGitter<Jipok> I turned on the local web server. So far, I do not see any other solutions.
12:35:26FromGitter<krux02> "the local web server"?
12:35:29FromGitter<krux02> what is that?
12:35:59FromGitter<krux02> and how do I do that, too?
12:36:16FromGitter<Jipok> Also you can start the chromium with the key --allow-file-access-from-files
12:36:44FromGitter<krux02> ahh thanks
12:36:47FromGitter<krux02> I try it
12:37:30FromGitter<Jipok> "the local web server"? - sudo systemctl start httpd
12:38:20FromGitter<krux02> ah, did not know it
12:38:22FromGitter<krux02> thanks a lot
12:38:30*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
12:38:56FromGitter<krux02> can you add those things somewhere in the readme?
12:39:03FromGitter<krux02> would have been great help to me
12:39:31FromGitter<Jipok> I will add, but later
12:39:37FromGitter<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:53FromGitter<krux02> @Jipok when I want to run the examples without webassembly just for faster development cycles, how do I do it
12:44:25FromGitter<krux02> ``nim c -r example.nim`` doesn't work: cannot open sdl
12:44:36cremIn 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:56FromGitter<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:16Araqcrem: 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:07FromGitter<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:02FromGitter<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:52FromGitter<Varriount> Don't forget that tar both bundles and compresses files!
14:27:01*endragor quit (Remote host closed the connection)
14:27:59FromGitter<Varriount> @Jipok I get 55 fps on my laptop
14:28:05FromGitter<Varriount> Very constant too.
14:28:34*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
14:29:59FromGitter<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:39FromGitter<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:37FromGitter<Jipok> @yglukhov What is difference between nimx/context.nim and NanoVG?
15:15:17Araqlol
15:16:09FromGitter<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:20FromGitter<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:08FromGitter<BigEpsilon> @Araq , can you help me with some thing ?
15:28:22Araqok
15:28:27FromGitter<BigEpsilon> Can an enum have generic parameter ?
15:28:59FromGitter<BigEpsilon> example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3acba177fb9fe7e33b7cc]
15:29:15FromGitter<BigEpsilon> that what I'm trying to do
15:29:21FromGitter<BigEpsilon> it compiles
15:29:26FromGitter<genotrance> yay I got the openssl SHA1 algorithm building into a nim module
15:29:34FromGitter<BigEpsilon> but I cannot access the enum elements
15:29:45*Sentreen quit (Ping timeout: 246 seconds)
15:30:10FromGitter<BigEpsilon> ```code paste, see link``` ⏎ ⏎ will fail [https://gitter.im/nim-lang/Nim?at=59d3ad01614889d4756db1fb]
15:31:02FromGitter<BigEpsilon> the generic param is here just to be passed to the parent class Foo
15:33:12FromGitter<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:59Araqbigepsilon: enums cannot be generic
15:34:04*endragor joined #nim
15:34:16AraqI guess syntactically it's allowed but what's the point?
15:35:05FromGitter<BigEpsilon> it is for the importcpp parameter
15:35:32FromGitter<BigEpsilon> so the anum can be mapped to the correct cpp representation
15:35:38FromGitter<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:04FromGitter<BigEpsilon> so I guess enums that are in generic classes cannot be used from nim
15:48:22FromGitter<krux02> I just found out that scancodes on webassembly don't work
15:49:15FromGitter<krux02> I mean sdl2 webassembly
15:54:16*derlafff quit (Remote host closed the connection)
15:55:32*derlafff joined #nim
15:55:37ArrrrOnce '<' is deprecated, will still be overridable?
15:56:13AraqArrrr: yeah, it's just a .deprecated annotation in system.nim
15:56:38Araqeventually 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:11FromGitter<krux02> do you mean the decrement `<`?
16:22:31FromGitter<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:50FromGitter<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:10FromGitter<exts> there's no real example anywhere and i don't know what it's called to google it
16:37:04miranisn't ^x the same as -x in python? that is - an index, counting from right to left
16:38:50FromGitter<Yardanico> @exts there's many of examples
16:39:10*d10n-work quit (Quit: Connection closed for inactivity)
16:39:13FromGitter<Yardanico> did you check the tutorial? https://nim-lang.org/docs/tut1.html#advanced-types-slices
16:50:00FromGitter<exts> must've missed that example, thanks
16:51:38FromGitter<krux02> ``data[^x]`` is equal to ``data[data.len-x]``
16:51:48FromGitter<exts> ah, yeah thanks :)
16:52:20FromGitter<krux02> so `^` only has a meaning in the ``[]`` operator
16:52:29FromGitter<exts> going to get back into gamedev w/ nim once i brush off my rust (no pun intended)
16:52:53FromGitter<krux02> well but it has double meaning
16:53:03FromGitter<krux02> so you need to clarify
16:53:21FromGitter<exts> rust as in, being rusty :P
16:53:28FromGitter<krux02> key
16:53:33FromGitter<exts> haven't used nim in forever
16:53:47FromGitter<exts> according to my rep almost 2 years
16:53:52FromGitter<exts> repo*
16:53:54FromGitter<exts> https://github.com/g4mr/enjoy2d
16:54:03FromGitter<exts> think im going to rewrite that
16:54:19FromGitter<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:42FromGitter<krux02> what platfor do you use?
16:55:03FromGitter<krux02> Windows Linux OSX?
16:55:05FromGitter<exts> windows
16:55:14FromGitter<krux02> ah, ok
16:55:21FromGitter<exts> well i have a linux box about 4 feet away from me so linux mint as well
16:55:41FromGitter<krux02> I would like to have a few volunteers for my rendering macro project
16:56:03FromGitter<krux02> well I only test on Arch and Manjaro
16:56:07FromGitter<krux02> but mint should be fine
16:56:11okapi210exit
16:56:18FromGitter<exts> ah
16:56:18FromGitter<krux02> lol
16:56:19FromGitter<Bennyelg> osx?
16:56:24*okapi210 quit (Remote host closed the connection)
16:56:25FromGitter<exts> have a repo?
16:56:41FromGitter<krux02> I sadly don't support OSX at the moment
16:57:03FromGitter<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:07FromGitter<krux02> I don't have that platform and the OpenGL support for that Platform is Antique
16:57:35FromGitter<Yardanico> @exts well you can do PRs to any public repo anyway :)
16:57:36FromGitter<krux02> https://github.com/krux02/opengl-sandbox
16:57:43FromGitter<Yardanico> and they will count for hacktoberfest too
16:58:10FromGitter<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:44FromGitter<exts> @Yardanico yeah
17:03:45FromGitter<krux02> @exts getting started: cd examples; nim c -r <example>
17:04:44FromGitter<exts> going to star it for now
17:14:04TjYoco@krux02 im getting cannot open glm what should I download?
17:14:49FromGitter<krux02> nimble install glm
17:15:23TjYoco*facepalm* im tired today
17:16:23FromGitter<krux02> you also need sdl2_nim
17:16:35FromGitter<krux02> it is the not_official sdl2 binding
17:17:50*nsf quit (Quit: WeeChat 1.9)
17:18:21FromGitter<genotrance> where can I find an example of variable argument types? int | string? and how do I detect one vs. other
17:21:24Araqgenotrance: 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:53FromGitter<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:37FromGitter<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:16FromGitter<genotrance> I see, will keep it in mind
17:54:58FromGitter<genotrance> @Yardanico @Araq thank you for the info!
17:55:21FromGitter<genotrance> what I was thinking is accepting a string or a seq of strings - if seq, run in a loop
17:55:35FromGitter<genotrance> but ya, can just make it a seq and call it a day
17:56:51FromGitter<Yardanico> you can accept varargs
17:57:59FromGitter<Yardanico> @genotrance ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3cfa77f323fc37501c9b9]
17:58:25FromGitter<Yardanico> https://nim-lang.org/docs/manual.html#types-varargs
17:59:39FromGitter<genotrance> neat
18:00:08*gokr joined #nim
18:00:33FromGitter<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:55FromGitter<Bennyelg> ```code paste, see link``` ⏎ ⏎ anyone see something wrong? [https://gitter.im/nim-lang/Nim?at=59d3d05601110b7231716144]
18:00:58FromGitter<Yardanico> I mean implicit array creation
18:01:11FromGitter<Yardanico> @Bennyelg ⏎ runForever() ?
18:01:19*ipjk joined #nim
18:01:25FromGitter<Yardanico> you need it to start endless jester loop :)
18:01:27FromGitter<Bennyelg> no it's not that, something in route
18:01:33FromGitter<Bennyelg> routes keyword
18:01:35FromGitter<Bennyelg> crying
18:01:37FromGitter<Yardanico> ???
18:01:48FromGitter<Bennyelg> only when I remove the let db its work
18:01:58FromGitter<Bennyelg> erver.nim(7, 1) template/generic instantiation from here ⏎ lib/core/macros.nim(369, 57) Error: undeclared identifier: 'Future'
18:02:01FromGitter<Bennyelg> this is what I get
18:02:10FromGitter<Yardanico> you forgot to import asyncdispatch
18:02:27FromGitter<Bennyelg> thanks
18:03:59FromGitter<Yardanico> ah, sorry
18:04:07FromGitter<Yardanico> I misread the manual about varargs :P
18:04:19FromGitter<Yardanico> ah wait, no, I didn't
18:04:37FromGitter<genotrance> c2nim replaces the void type with nil, this is broken right?
18:04:46FromGitter<Yardanico> @genotrance no
18:04:48*Arrrr quit (Ping timeout: 246 seconds)
18:04:51FromGitter<Yardanico> ah
18:04:57FromGitter<Yardanico> "void" type with nil? probably
18:05:10FromGitter<Yardanico> @Araq ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3d1567f323fc37501d31f]
18:05:25FromGitter<Yardanico> works - https://gist.github.com/Yardanico/e354e98ec97ec38514802d458e4c60b4
18:05:27FromGitter<krux02> you know you can join a path also with the ``/`` operator?
18:05:43FromGitter<Yardanico> I do :)
18:05:46FromGitter<krux02> getAppDir() / "file.dat"
18:05:56FromGitter<Yardanico> yeah, this is a neat thing
18:06:20FromGitter<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:53FromGitter<krux02> is there no system.free?
18:17:15FromGitter<krux02> there is just freeShared
18:17:20FromGitter<krux02> I am confused
18:18:29FromGitter<krux02> there is just resize(0)
18:18:37FromGitter<ephja> dealloc? :p
18:19:26*vivus joined #nim
18:20:05FromGitter<krux02> well the documentation of ``resize`` talks about ``free``
18:20:14FromGitter<krux02> that can be addressed
18:22:50FromGitter<Bennyelg> How can I make this work```nim ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59d3d57ab20c642429bb4bb6]
18:22:57FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3d580bbbf9f1a381ab8ef]
18:24:22vivushas anybody built a big/interactive website with nim/jester here?
18:24:31*zachk joined #nim
18:24:36dom96nimforum, if that counts
18:24:49FromGitter<Yardanico> @Bennyelg just use karax :)
18:24:52FromGitter<ephja> @Bennyelg 'add' takes 2 arguments
18:25:08FromGitter<Bennyelg> @Yardanico i WILL EVANTUALLY
18:25:45FromGitter<ephja> either add more calls to 'add' or concatenate strings with &
18:25:58vivusdom96: is your framework still the go-to for web-apps?
18:27:41dom96I'd say so
18:29:08AraqI agree.
18:29:32*Jesin joined #nim
18:29:46*TjYoco joined #nim
18:30:37CalinouI remember Jester having performance bottlenecks, is this still the case?
18:30:56*PMunch joined #nim
18:31:07*nsf joined #nim
18:31:19Araqmost of these bottlenecks are in Nim's stdlib
18:31:59Calinouthat kind of sucks… this means that most complex programs won't be fast
18:32:15Araqfile uploads and downloads used to be really super bad, now they are ok'ish, I hope?
18:32:20vivus"fast" is relative, as I assume jester is 'faster' than Flask
18:32:27Calinousurely it is, yeah
18:32:50CalinouI've only done back-end development in CodeIgniter/Django/Symfony myself :P
18:33:01Araqthe stdlib needs to use 'sendfile' but doesn't. PRs welcome
18:33:07Calinouhaven't really tried the lower-end options, I found them too cumbersome to use
18:33:18Calinou(lack of docs/community resources is also a big problem)
18:33:20vivusCalinou: whatever pays the bills. PHP gets loads of flack, but it runs more sites/apps than Go ever will
18:33:29Calinouvivus: true, PHP is not that bad if you follow good practices
18:33:34Calinouand it can be fairly speedy, too
18:33:43Calinou(not quite as fast as Go, but "fast enough" for a lot of use cases already)
18:34:24vivusDoes anybody use vim with auto-complete for nim?
18:34:32PMunchvivus, I do
18:34:45PMunchOr, well I'm not sure if I've got auto-complete..
18:34:51vivusPMunch: which vundle-plugin do you use?
18:34:55*endragor joined #nim
18:35:15PMunchzah/nim.vim
18:35:20PMunchAnd scroolose/syntastic
18:35:31PMunchThose are the only ones I've got for Nim I think
18:35:49FromGitter<BigEpsilon> I couldn't find a vim plugin thats support nimsuggest
18:36:20FromGitter<BigEpsilon> VS code is better in that regard
18:36:52PMunchhttps://medium.com/@caspervonb/why-i-still-use-vim-67afd76b4db6?h
18:37:02PMunchYes, but VC code is horrible in pretty much anything else..
18:37:46FromGitter<BigEpsilon> vim+tmux FTW
18:37:49vivusI saw a nimsuggest wrapper for vim like the other day
18:38:03*gokr joined #nim
18:38:07PMunchWhat do you need tmux for?
18:38:36FromGitter<ephja> obligatory announcement regarding nimsuggest leaks: https://gist.github.com/ephja/70375009b9b6de00e3e115e3d7682ec2
18:38:37FromGitter<BigEpsilon> panes and tabs
18:38:46FromGitter<BigEpsilon> with easy navigation
18:38:58FromGitter<BigEpsilon> and good integration with vim
18:39:02PMunchMultiple buffers and Vim keybindings :)
18:39:08*endragor quit (Ping timeout: 240 seconds)
18:39:22FromGitter<BigEpsilon> still I prefer using tmux terminal
18:39:33FromGitter<ephja> neovim terminals
18:39:36PMunchhttp://ix.io/AHC
18:39:43vivushttps://github.com/BitR/ycm-nimsuggest
18:39:43FromGitter<ephja> they seem broken on windows though
18:39:47PMunchThat's my buffer navigation bindings
18:39:54FromGitter<BigEpsilon> I tried neovim terminal
18:40:03FromGitter<BigEpsilon> but I prefer tmux
18:40:24vivuscompilation from within neovim?
18:40:35FromGitter<BigEpsilon> no need for extra keys strokes to enter/exit insert mode
18:40:57FromGitter<BigEpsilon> and I can save my entire workspace with tmux
18:41:10FromGitter<BigEpsilon> attach/detach
18:43:58FromGitter<ephja> vivus: yes, in a single quadrant for example
18:44:41FromGitter<ephja> that's the only thing I've wanted it for
18:44:42FromGitter<Jipok> Why does everyone choose between vim and vscode? Why not Sublime Text?
18:45:35miran"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:48FromGitter<Jipok> electron
18:45:59FromGitter<ephja> doesn't bother me
18:46:25PMunchmiran, check the link I sent
18:46:26FromGitter<ephja> what does is the fact that you can't have a symbol browser next to the editor for example
18:46:33PMunchHogs memory like there's no tomorrow
18:47:17PMunchAnd the sum of all those tiny inefficiencies than front-end devs like to sweep under the rug adds up
18:47:26dom96it doesn't for me
18:47:30dom96Using 63mb right now
18:47:30miranPMunch: i've read that before, but it didn't convince me it is horrible ;)
18:47:35PMunchNoticed a drastic boost in battery life after I switched to vim as well, which is always nice :)
18:47:49PMunchThe horrible part was a bit tongue in cheek
18:47:50dom96oh wait, there is a bunch of "Code Helper"s
18:48:03miraneh, i use desktop, so i have no idea about battery life
18:48:07PMunchIt's not horrible, just horribler than vim :P
18:48:24vivusVSCode is an Electron app?
18:48:28FromGitter<Jipok> +
18:48:33FromGitter<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:52ipjk63 mb isn't that bad
18:49:02PMunchvivus, yup
18:49:13dom96ipjk: nah, I'm wrong, it's way more than that
18:49:23vivuseven sublime is better than electron-apps
18:49:24ipjkMy emacs is running at 50 with all the files in lib/nim open
18:49:25miranPMunch: i'm vim noob, so i'm much more productive in vs code
18:49:33dom96But I've got 16GB, doesn't bother me
18:49:42PMunchOh yeah, that's definitely a factor miran :P
18:49:58miranand more memory consumption doesn't bother me, for the same reason dom96 just mentioned :)
18:50:16PMunchBut with a tiling WM and good keybindings in Nim I can blaze through all kinds of tasks in a jiffy
18:50:20FromGitter<ephja> it doesn't result in all the RAM being used, but unnecessary bloat still bothers me
18:50:22dom96I tried getting into vim. It simply has too many irregularities, VS Code is at least consistent with the rest of my OS...
18:51:01mirani started to use vim keybindings in vs code. so far - very nice experience
18:51:14FromGitter<Jipok> But using such software you support it. So it's not a matter of consumed memory.
18:51:15FromGitter<ephja> "Code requires a whopping 349 megabytes in order to open a 60 byte file" hmmm
18:51:57PMunchYeah, I would guess the 60 byte file accounts for about 60 bytes of that total :P
18:52:43FromGitter<ephja> doesn't correspond to dom's experience at all then
18:53:11ipjk349 isn't really that much in this day and age
18:53:23dom96Like I said, I was wrong about its memory usage.
18:53:28vivusthe only editor that matters is the 1 Araq uses XD
18:53:32FromGitter<ephja> ok
18:53:38PMunchipjk, still it's quite the overhead..
18:54:17miranwhat use is of 16GB of ram, if you constantly have 15GB free? ;)
18:54:23dom96^^
18:54:43vivusis anybody familiar with a reddit SPA? I don't see any on GH that I could build a Jester API for
18:54:46FromGitter<ephja> @Jipok well, I haven't mentioned it to that many people, so not much harm done :p
18:54:58PMunchSPA?
18:55:03vivusmiran: your chrome browser needs 2GB to see stackoverflow
18:55:04FromGitter<Yardanico> API maybe ? :)
18:55:14vivusPMunch: Single Page Application
18:55:17miranvivus: :)
18:56:20PMunchAah
18:56:28vivusI don't really like JS with all its fancy frameworks though ಠ_ಠ
18:56:45ipjkWhat's more to discuss about electron-based applications, are their filesize
18:58:55miranwould 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:02FromGitter<Yardanico> well also they're too heavy :(
18:59:05FromGitter<Yardanico> sublime is three
18:59:06FromGitter<Yardanico> *free
18:59:08FromGitter<Yardanico> all dev builds are
18:59:14PMunch"Free"
18:59:28PMunchIsn't it the same kind of free as WinRAR was?
18:59:58ipjk"Sublime Text 3 dev builds are currently available to licensed users only."
19:00:01miranwell, i don't want to constantly see popups to remind me i could pay for it
19:00:09planetis[m]With the latest Ast changes in nim you may need to create a StmtList for the result.
19:00:37miranand community/extensions seem on vsc side too
19:01:05ipjkAslong as users are happy with editor x, it doesn't really matte.
19:02:07vivusmiran: same can be said for electron, neovim, emacs and sublime
19:03:00*TjYoco quit (Quit: Leaving)
19:03:48FromGitter<Jipok> If you do not like closed Sublime, then maybe need to fix plugin for textadept?
19:03:57FromGitter<Jipok> https://github.com/xomachine/textadept-nim
19:05:12FromGitter<Jipok> Well, or contribute Aporia
19:05:37*Vladar quit (Quit: Leaving)
19:10:15miranvivus: what do you mean?
19:10:29vivuscommunity/extensions
19:10:33miranaha
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:02PMunchHmm, 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:16salewskiI assume there is a better way to write this:
20:05:21salewskiif 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:52FromGitter<Varriount> salewski: You could also use setlen
20:13:53salewskiAh yes, I think strutils.removeSuffix() will do.
20:14:47salewskiYes, setlen() is also good, thanks.
20:16:08*salewski quit (Quit: WeeChat 1.9)
20:16:12FromGitter<Bennyelg> who worte nim-template
20:16:19FromGitter<Bennyelg> does he chat somethings here?
20:16:32FromGitter<Bennyelg> @sschober
20:16:56onionhammernim-templates is mine, if you're talking about what im thinking of
20:17:06FromGitter<Bennyelg> Yea i need help for a sec
20:17:17FromGitter<Bennyelg> just let me grap my charger my laptop is going to shutdown
20:18:12FromGitter<Bennyelg> @onionhammer Did you ever tried to print Seq of custom types?
20:18:37FromGitter<Bennyelg> In example ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3f09d7f323fc375028e6e]
20:18:41onionhammerexample code?
20:19:51FromGitter<Bennyelg> what I am getting now is: 'category.name' is string and it has to be discarded
20:19:57onionhammerthat should work
20:20:12FromGitter<Bennyelg> well it doesn't :|
20:20:19onionhammercan you look at the code being generated?
20:20:33FromGitter<Bennyelg> how do I do that?
20:20:54FromGitter<Bennyelg> I can't compile it
20:20:57FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d3f129bac826f0542f1935]
20:20:59FromGitter<krux02> there is nimcache
20:21:43FromGitter<krux02> that error means that you have an expression that is not used for anything
20:21:52FromGitter<krux02> in most languages this isn't an error
20:21:54FromGitter<krux02> in Nim it is
20:21:57onionhammertry $() instead of ${}
20:22:07onionhammer${ statement } vs $( expression )
20:22:22FromGitter<krux02> you can sinlence it with a ``discard`` around that expression, but it is still code smell
20:22:32FromGitter<Bennyelg> I tried
20:22:38FromGitter<Bennyelg> it not shown in the page if I do that
20:22:44CalinouVisual Studio Code is the best editor (≠ IDE) I've ever used
20:22:54Calinouit's not really open source, unfortunately, but at least it's free of charge…
20:23:01FromGitter<krux02> where do you use the "category.name"?
20:23:01onionhammerdoes VSCode support tmpl highlighting for nim-templates?
20:23:08FromGitter<Bennyelg> ( ) worked @ onionhammer
20:23:10FromGitter<krux02> are you in a macro?
20:23:13FromGitter<krux02> can you print the ast?
20:23:20Calinou(see https://aur.archlinux.org/packages/visual-studio-code-oss/)
20:23:30onionhammer@Bennyyelg yeah sorry, it's been a while since I wrote that, forgot that detail.
20:23:35Calinouonionhammer: I don't know, I've only used its basic Nim support brought by the Nim add-on
20:23:56onionhammer@Calinou try pasting @Bennyelg's example above
20:24:01FromGitter<Bennyelg> Add more examples, maintane the package it's very useful, a specially hwen nothing is around
20:24:04FromGitter<krux02> onionhammer: what do you mean by tmpl highlighting?
20:24:05CalinouI'd like to see an IntelliJ plugin, but I don't think it's going to happen soon
20:24:07Calinou:P
20:24:12onionhammerit should highlight as HTML in Sublime
20:24:19*PMunch quit (Quit: leaving)
20:24:28FromGitter<krux02> semantic highlighting, different colors for templates procedures methods?
20:24:41onionhammercorrect
20:25:08FromGitter<krux02> I don't know
20:25:14onionhammermyproc = tmpl html""" highlight as html """ , where you can swap out "html" for "css", other languages
20:26:12FromGitter<krux02> ah that you mean
20:26:24FromGitter<krux02> almost forgot about that nim feature
20:26:35onionhammerit's not a nim feature ;)
20:26:45FromGitter<krux02> you mean the templating engine
20:26:53FromGitter<krux02> not nim templates
20:27:01onionhammerit's a nim-templates + syntax highlighting feature supported in github and nimlime
20:27:16onionhammersince github uses the nimlime grammar files
20:28:03onionhammersee samples here https://github.com/onionhammer/nim-templates
20:31:13FromGitter<Bennyelg> anyway to run jester with debug mode?
20:34:19*Snircle joined #nim
20:39:25FromGitter<Bennyelg> @dom96
20:42:28dom96it's debug by default
20:42:31dom96what are you looking for?
20:42:57FromGitter<Bennyelg> I am working on routes on server but every edit i need to recompile all
20:43:06FromGitter<Bennyelg> there is any way to auto recompile after every save ?
20:43:16dom96no
20:43:24FromGitter<Bennyelg> thanks
20:43:50onionhammer@dom96 what about nims
20:43:52onionhammernimscript files
20:44:29dom96what about them?
20:44:41onionhammerthose dont need to be "compiled", right? you just run them
20:44:47federico3Bennyelg: recompile nim code when a file is changed? https://github.com/FedericoCeratto/nim-testrunner/ does that
20:45:03dom96onionhammer: sure, how does this help here?
20:45:13onionhammerits not the same as hot reloading, but it might be a slightly faster development loop
20:45:54dom96nims doesn't support the ffi
20:46:04onionhammerahh, still? :P
20:46:30FromGitter<Bennyelg> Thanks I will look into that :D
20:54:54*Jesin joined #nim
21:01:48FromGitter<Bennyelg> How to extract the number ?
21:01:50FromGitter<Bennyelg> get re"/forums/forum_id[0-9]/":
21:05:40*libman quit (Quit: Connection closed for inactivity)
21:09:59FromGitter<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:22FromGitter<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:47FromGitter<zacharycarter> def-pri-pub: you around?
21:47:39dom96Bennyelg: get re"/forums/forum_id([0-9])/": echo request.matches[0]
21:48:01FromGitter<Bennyelg> @dom96 I did it:) thanks
22:01:34FromGitter<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:27FromGitter<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:30ipjkadamrezich: Isn't it possible to pass the address?