<< 07-01-2018 >>

00:05:55*qwertotter is now known as qwertfisch
00:16:44*subsetpark_ quit (Ping timeout: 252 seconds)
00:17:16*subsetpark_ joined #nim
00:31:26*endragor joined #nim
00:35:35*endragor quit (Ping timeout: 240 seconds)
00:35:35*Yardanico[Phone] quit (Read error: Connection reset by peer)
00:37:27*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
00:38:30*devdri quit ()
00:41:36*gokr quit (Ping timeout: 248 seconds)
01:01:17*zama joined #nim
01:04:57*marenz__ quit (Ping timeout: 265 seconds)
01:06:00*pleiosaur joined #nim
01:55:35*MJCaley joined #nim
02:05:37*dddddd quit (Remote host closed the connection)
02:10:00*S1tiSchu joined #nim
02:13:48*SitiSchu quit (Ping timeout: 268 seconds)
02:29:32*yglukhov quit (Remote host closed the connection)
02:30:09*yglukhov joined #nim
02:31:30*vlad1777d joined #nim
02:34:51*yglukhov quit (Ping timeout: 265 seconds)
02:58:35*benoliver999 quit (Ping timeout: 240 seconds)
03:00:28*chemist69 quit (Ping timeout: 265 seconds)
03:14:01*chemist69 joined #nim
03:32:11*endragor joined #nim
03:36:57*endragor quit (Ping timeout: 264 seconds)
03:55:56*yglukhov joined #nim
04:00:05*yglukhov quit (Ping timeout: 240 seconds)
04:32:27*MJCaley quit (Quit: MJCaley)
04:36:57*user0 quit (Ping timeout: 264 seconds)
04:47:02*xet7 joined #nim
05:23:33*endragor joined #nim
05:27:59*endragor quit (Ping timeout: 248 seconds)
05:59:41*xet7 quit (Quit: Leaving)
06:04:23*rauss quit (Quit: WeeChat 2.0.1)
06:17:32*dandevelo quit (Ping timeout: 276 seconds)
07:03:25*kevingolding joined #nim
07:11:59*kevingolding quit ()
07:17:48*gokr joined #nim
07:18:49*azur_kind joined #nim
07:24:03*earenndil quit (Quit: ZNC 1.6.3+deb1 - http://znc.in)
07:25:02*endragor joined #nim
07:26:11*earenndil joined #nim
07:30:10*endragor quit (Ping timeout: 265 seconds)
07:32:57*craigger quit (Ping timeout: 256 seconds)
07:33:16*craigger joined #nim
07:38:19*Yardanico[Phone] joined #nim
07:44:10*dandevelo joined #nim
07:47:22*miran joined #nim
07:59:50*benoliver999 joined #nim
08:00:34*yglukhov joined #nim
08:04:00*dandevelo quit (Ping timeout: 265 seconds)
08:05:05*yglukhov quit (Ping timeout: 240 seconds)
08:10:21*Yardanico joined #nim
08:14:40Yardanicohi everyone, I assume it's currently night in NA?
08:14:53Yardanicooh, it seems so
08:15:46miran...but morning in europe
08:16:17Yardanicoyes, that's why I'm here :)
08:22:20*nsf joined #nim
08:24:43*gangstacat joined #nim
08:32:34miranYardanico: if you're bored waiting for more people, i just posted something on the forum.... ;)
08:55:56*gokr quit (Ping timeout: 252 seconds)
09:02:29*gmpreussner quit (Ping timeout: 256 seconds)
09:05:38*gmpreussner joined #nim
09:18:17Araqmuhaha, I finally figured out how 'sink' parameters need to work. I think.
09:23:36*yglukhov joined #nim
09:26:52*endragor joined #nim
09:27:33*Yardanico quit (Remote host closed the connection)
09:29:06*user0 joined #nim
09:29:16*Yardanico joined #nim
09:31:29*endragor quit (Ping timeout: 265 seconds)
09:32:57*Vladar joined #nim
09:35:35*yglukhov quit (Remote host closed the connection)
09:36:20*yglukhov joined #nim
09:37:06*yglukhov quit (Remote host closed the connection)
09:38:26*Yardanico quit (Remote host closed the connection)
09:41:14*Yardanico_ joined #nim
09:44:41*Yardanico_ quit (Remote host closed the connection)
09:46:01*Yardanico joined #nim
09:51:08*Yardanico quit (Remote host closed the connection)
09:52:40*Yardanico joined #nim
09:58:04*Yardanico quit (Remote host closed the connection)
09:58:55*Yardanico joined #nim
10:00:50*dandevelo joined #nim
10:05:51*dandevelo quit (Ping timeout: 248 seconds)
10:06:35FromGitter<data-man> @Araq: Have you seen my new PR? :-)
10:11:23Araqwhich one?
10:12:16*endragor joined #nim
10:12:47*claudiuinberlin joined #nim
10:13:17FromGitter<data-man> https://github.com/nim-lang/Nim/pull/7037
10:14:13*gangstacat quit (Quit: Ĝis!)
10:15:01*arecaceae joined #nim
10:15:56FromGitter<ervinbosenbacher> Hey everyone, I am getting familiar with the language, tools, compiler, etc and I am in love :D. Anyway once I am comfortable I am happy to contribute to those 1146 open issues.
10:18:21*gangstacat joined #nim
10:20:33Araqdata-man: huh? That's not a fix, that's a worse design :P
10:20:40FromGitter<data-man> @ervinbosenbacher: Welcome!
10:23:58*devdri joined #nim
10:25:28FromGitter<data-man> @Araq: Why? ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5a51f598232e79134dd6f9ef]
10:26:12FromGitter<data-man> ```code paste, see link``` ⏎ ⏎ Is worked [https://gitter.im/nim-lang/Nim?at=5a51f5c45355812e57605388]
10:27:13FromGitter<data-man> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a51f6010505ad8b45c486bb]
10:28:59FromGitter<data-man> *It's worked :-)
10:30:03Araqdata-man: the allocator argument doesn't hurt, you can make the existing allocator compatible with it anyway
10:30:17Araqwhy do you think it should be removed?
10:31:05FromGitter<ervinbosenbacher> just a quick question, in order to link with C++ libraries do I have to compile using the C++ switched my code and proceed like that? Warning newbie question. Mangling and all. Or is there somewhere a simple example where I can have a look how to use c++ libraries from Nim?
10:33:08Yardanicoervimbosenbacher: AFAIK there's some support for compiling to C and using C++ libraries at the same time
10:35:46FromGitter<ervinbosenbacher> Probably. I have a bunch of c++17 code that is compiled using gcc 7.2 unil this point I have used them from Python 3.6 I would like to sitch to NIM and searching for a simple solution or example that can show me the way :D
10:36:29miranbtw, it is Nim, not NIM - i've seen you're regularly using all caps :)
10:36:32FromGitter<ervinbosenbacher> Ill find it but thought I ask if someone knows
10:36:43FromGitter<ervinbosenbacher> Ok ok sorry :D
10:36:45FromGitter<ervinbosenbacher> Nim
10:37:32Yardanicoif you compile your C++ code to dll/so/dylib, you don't need to use C++ compilation target in nim
10:37:53FromGitter<ervinbosenbacher> good point.
10:40:38FromGitter<ervinbosenbacher> It is such a big relief after rust by the way. Like a 200 kg stone fell of my soul.
10:41:18FromGitter<ervinbosenbacher> and D, where I had my GC headache. Now I can choose.
10:41:39FromGitter<data-man> @Araq: I was just trying to make it work, because the code did not compile. :-)
10:43:04FromGitter<data-man> And new string type too.
10:43:18Araqok but don't change the interface unless you have good arguments. Note that the allocator interface is part of the wiki page
10:43:38Araqwhich is a work-in-progress *spec* :P
10:47:05FromGitter<ervinbosenbacher> is this how I interface with c or c++ (extern “C”) code?
10:47:05FromGitter<ervinbosenbacher> https://nim-lang.org/docs/manual.html#foreign-function-interface
10:47:52Yardanicoit's how you interface with C code
10:48:01Yardanicoit's more complicated with C++
10:48:12FromGitter<ervinbosenbacher> i will use the dynlib pragma
10:48:27Yardanicowell you still need to use importc/importcpp
10:48:40FromGitter<ervinbosenbacher> its ok
10:49:02FromGitter<ervinbosenbacher> ill find out
10:54:06Araqthere are multiple ways to interface with C or C++ code...
10:54:13FromGitter<ervinbosenbacher> Thx for the help @Yardanico Ill browse the docs if I have a question Ill ask :)
10:54:22AraqI think "c2nim" covers the basics quite well
10:54:52FromGitter<ervinbosenbacher> Yes that is what I am looking ar
10:54:55FromGitter<ervinbosenbacher> at
10:55:42FromGitter<ervinbosenbacher> managed to nstall it after some pain, I had to install Nim head and compiler head after some errors
10:57:29*vlad1777d quit (Ping timeout: 252 seconds)
10:58:18FromGitter<ervinbosenbacher> so I can use c2nim to translate the header than use it to call into the c/c++ code?
10:58:49Yardanicoyes, but almost always you need to manually modify C/C++ header
11:00:02FromGitter<ervinbosenbacher> its fine as long the reult is that I can use C++ code from Nim and I dont have to rewrite the entire thing, essentially I am loking for to replace tust/d/python code with Nim
11:00:19FromGitter<ervinbosenbacher> Sorry for the typos
11:03:39*dddddd joined #nim
11:04:43Araqthe wise option is to use {.reorder: on.} for c2nim'ed code
11:05:03Araqyou can keep a patchset and reapply the patches the header files
11:05:34Araqshould the header files change in the future. Your goal should be to *not* edit the produced Nim code.
11:06:02FromGitter<ervinbosenbacher> So i create it the first time and then I just apply patches?
11:06:20Araqwell that has never worked before.
11:06:30FromGitter<ervinbosenbacher> Sounds good to me. I will test this today with some simple stuff
11:06:43Araqbut it's what you should strive for and the tooling keeps getting better for it.
11:06:51FromGitter<ervinbosenbacher> Never mind , if I have to I will do it manually
11:07:22Araq{.reorder: on.} is new and was a missing piece in the puzzle
11:07:23FromGitter<ervinbosenbacher> I can help with the tooling at some point, once I am done with the learning curve of everyting
11:08:17FromGitter<ervinbosenbacher> For me this is critical piece of the puzzle have several 100k loc in C++
11:10:35*Yardanico[Phone] quit (Ping timeout: 260 seconds)
11:11:43Araqwell it's some work but we wrapped, wxWidgets, Urho3D and Unreal Engine 4.
11:12:06FromGitter<ervinbosenbacher> Is that open source?
11:12:11Araqyes.
11:12:18FromGitter<ervinbosenbacher> So I can have a look?
11:12:40*xet7 joined #nim
11:12:41FromGitter<ervinbosenbacher> ok got it thx
11:14:20FromGitter<ervinbosenbacher> i will need rocksdb, tensorflow, a bunch of low level things. Compression , filesystem libs my own code
11:21:15FromGitter<ervinbosenbacher> i will use nimue4 as a reference, I used to work a lot with UE4 so i can relate to that
11:39:58FromGitter<ervinbosenbacher> I put this on my todo list
11:40:12FromGitter<ervinbosenbacher> will write tooling for cuda and openmp
11:40:34FromGitter<ervinbosenbacher> Basically that is critical for a my whole AI ;ayer
11:40:55FromGitter<ervinbosenbacher> it iwll be fun
11:41:56FromGitter<ervinbosenbacher> OpenCL I meant
11:58:11FromGitter<stisa> @ervinbosenbacher have a look at Arraymancer and Neo, they both have support for cuda I think
11:58:47FromGitter<stisa> https://github.com/unicredit/neo/ and https://github.com/mratsim/Arraymancer
12:00:42Yardanicoarraymancer is meant for be used for AI btw
12:01:18*endragor quit (Remote host closed the connection)
12:03:12*dandevelo joined #nim
12:07:27*dandevelo quit (Ping timeout: 248 seconds)
12:10:26*gokr joined #nim
12:18:30*Yardanico quit (Remote host closed the connection)
12:19:53*Yardanico joined #nim
12:22:12*Yardanico quit (Remote host closed the connection)
12:28:11*Yardanico joined #nim
12:37:11*marenz__ joined #nim
12:39:29*user0 quit (Quit: user0)
12:41:22*user0 joined #nim
12:42:05FromGitter<ervinbosenbacher> yes thx, I’ve discovered them yester
12:44:07FromGitter<ervinbosenbacher> We need a unch of other things to have a proper scientific stack, at least my amition. Nim is very well suited for that, especially that it has a Pythonic syntax.
12:45:42*user0 quit (Client Quit)
12:45:58*user0 joined #nim
12:50:31*user0 quit (Client Quit)
12:50:49*user0 joined #nim
12:52:38*S1tiSchu is now known as SitiSchu
12:53:24*dandevelo joined #nim
12:54:59*Vladar quit (Quit: Leaving)
12:58:44*SitiSchu quit (Quit: Leaving)
12:58:55*SitiSchu joined #nim
13:17:39*rokups joined #nim
13:23:27*nsf quit (Quit: WeeChat 2.0.1)
13:30:57*user0 quit (Quit: user0)
13:31:17*user0 joined #nim
13:31:56*devdri quit ()
13:35:31*user0 quit (Client Quit)
13:35:48*user0 joined #nim
13:38:02*MJCaley joined #nim
13:43:20*devdri joined #nim
13:56:24*vlad1777d joined #nim
14:34:03*devdri quit (Ping timeout: 265 seconds)
14:40:36*devdri joined #nim
14:46:42*MJCaley quit (Quit: MJCaley)
14:53:09*Senketsu quit (Ping timeout: 264 seconds)
15:13:03*derlafff quit (Remote host closed the connection)
15:13:59*MJCaley joined #nim
15:14:23*derlafff joined #nim
15:24:20*MJCaley quit (Quit: MJCaley)
15:27:13*gokr quit (Ping timeout: 265 seconds)
15:30:57*devdri quit (Ping timeout: 264 seconds)
15:33:48*devdri joined #nim
15:39:04FromGitter<mratsim> @ervinbosenbacher I’m currently adding OpenCL support to Arraymancer: https://github.com/mratsim/Arraymancer/pull/184 though I’ve taken 2 weeks off to recharge
15:40:50*Yardanico_ joined #nim
15:42:56*Yardanico quit (Ping timeout: 248 seconds)
15:44:51*Yardanico_ quit (Client Quit)
15:45:10*Yardanico_ joined #nim
15:53:12*nc-x joined #nim
15:53:46nc-xWhat does this error mean `Error: unhandled exception: cannot dispatch; dispatcher is nil [NilAccessError]`? I am trying to define `$` for objects inherited from other objects using `method` and getting this error.
15:56:50nc-xOkay i got it
15:57:00nc-xnvm
15:58:42*MJCaley joined #nim
16:10:38*Yardanico_ is now known as Yardanico
16:10:49*nc-x quit (Ping timeout: 260 seconds)
16:17:33*devdri quit ()
16:17:52*devdri joined #nim
16:18:08*xet7 quit (Ping timeout: 252 seconds)
16:25:57*user0 quit (Quit: user0)
16:26:14*user0 joined #nim
16:30:49*xet7 joined #nim
16:33:35*MJCaley quit (Quit: MJCaley)
16:34:45*Trustable joined #nim
16:35:31*user0 quit (Quit: user0)
16:35:44*user0 joined #nim
16:38:45*dandevelo quit (Ping timeout: 265 seconds)
16:38:53*yglukhov joined #nim
16:43:56*endragor joined #nim
16:46:05*S1tiSchu joined #nim
16:46:16*SitiSchu quit (Remote host closed the connection)
17:06:18*devdri quit ()
17:06:47*devdri joined #nim
17:07:06*rokups quit (Quit: Connection closed for inactivity)
17:07:45*Yardanico quit (Ping timeout: 248 seconds)
17:09:50*Yardanico joined #nim
17:21:52FromGitter<ervinbosenbacher> @mratsim that is good to know. I am planning to use your library in my search engine
17:22:29FromGitter<ervinbosenbacher> which is really nice as I dont have to hunt down for an ML lib :)
17:51:11FromGitter<data-man> D's tests moved from Travis to SemaphoreCI https://github.com/dlang/dmd/pull/7617
17:58:26Yardanicotime to move our tests :D
17:58:46Yardanico"Always free for open source. " in case someone is wondering
17:59:25Yardanico"Each execution environment ("Box") is powered by an Intel Core i7 Skylark CPU, 8 GB DDR4 RAM and high-end I/O throughput."
17:59:29Yardanicowow
18:00:09*MJCaley joined #nim
18:01:01YardanicoI'll fork nim and test how much time tests will take! (if I'm not lazy)
18:02:34FromGitter<RedBeard0531> Skylark?
18:03:07YardanicoIDK, ask them :)
18:03:15FromGitter<ervinbosenbacher> I have moved away from D 2 days ago in favor of Nim
18:03:26FromGitter<ervinbosenbacher> I stick with Nam skylark or not :D
18:03:28YardanicoLOL
18:03:35YardanicoI added forked nim, and warning says: "
18:03:35YardanicoThis looks like a cool Nimrod project.
18:03:35YardanicoSemaphore doesn’t fully support it yet, but here’s the deal. Check out what’s on our platform, fill in your test commands below, email us what you did on [email protected] and we’ll improve our service. Thanks!
18:03:35Yardanico"
18:05:40*nsf joined #nim
18:06:40FromGitter<ervinbosenbacher> D is a pile of mess + I can comple Nim to c or C++ or Javascript or Objective-c and I dont have to mess with building bridges. My all time favourite is Rust on iOS. Rust->C->C++->Objective-C++->Swift
18:06:44FromGitter<ervinbosenbacher> and my head hurts
18:07:02FromGitter<ervinbosenbacher> No i just build Nim to Objective-C and done
18:07:32FromGitter<ervinbosenbacher> That alone worth to switch
18:07:34Yardanicowait, nim uses clang for testing?
18:07:37Yardanico*for testament
18:07:43Yardanicohttps://github.com/Yardanico/Nim/blob/devel/.travis.yml#L32
18:10:42YardanicoI mean that's good
18:10:54FromGitter<ervinbosenbacher> yes it is
18:11:49AraqI disagree but it is what it is
18:11:56YardanicoAraq, for speed?
18:12:08FromGitter<ervinbosenbacher> Cant you change? If you want to?
18:12:15Yardanicoyes he can, but testing will take more time
18:12:17AraqGCC is the default for Linux so we should test against GCC
18:12:20Yardanicogcc is slower than clang
18:12:24FromGitter<ervinbosenbacher> for example to gcc
18:12:25Yardanicobut yeah, GCC is default
18:12:29FromGitter<ervinbosenbacher> i disagree
18:12:35FromGitter<ervinbosenbacher> Gcc-7.2 is fast hell
18:12:35Araqclang on osx, GCC on linux, msvc on Windows
18:12:36Yardanicoervinbosenbacher: nim has gcc by default
18:12:41Yardanicoit's not really :)
18:12:48YardanicoI compared gcc 7.2 vs clang 5.0.1
18:12:52Yardanicoclang is still faster
18:12:54FromGitter<ervinbosenbacher> On my mac its faster
18:12:58Araqbut we use mingw on Windows, so *shrug*
18:13:05FromGitter<ervinbosenbacher> :D
18:13:23Araqervinbosenbacher: does GCC even run on OSX? :-)
18:13:40Yardanicoyes
18:13:47Yardanicomaybe patched, but yes
18:13:50FromGitter<ervinbosenbacher> i have blinders on my wndows I dont test anything on it ;D
18:13:53Yardanicoyou can install it via brew for example
18:14:08FromGitter<ervinbosenbacher> i have built gcc from sources
18:14:24FromGitter<ervinbosenbacher> on my mac yes its fine that is what I am using y default for c++ et al
18:15:12Yardanicoervinbosenbacher: you can use nim with gcc/clang/icc/tcc/msvc/mingw/can't remember others
18:15:13FromGitter<ervinbosenbacher> i needed c++17 features so I grabbed it
18:15:26FromGitter<ervinbosenbacher> gcc is fine :D thx
18:15:44YardanicoAraq, I'm testing Semaphore CI with gcc
18:15:48dom96There is so many different CI services out there now
18:15:54Yardanicolet's see how much time tests will take
18:15:57Yardanicohttps://semaphoreci.com/yardanico/nim/branches/devel/builds/3
18:15:57dom96But what about custom-hosted CI software?
18:16:08Yardanicodom96, gitlab?
18:16:10dom96s/custom/self/ I should say
18:16:27dom96Oh I've been there. Was quite painful.
18:17:10*Trustable quit (Remote host closed the connection)
18:17:20Yardanicook let's go, testament started! https://semaphoreci.com/yardanico/nim/branches/devel/builds/3
18:17:38Yardanicoeverything before testament took 3 mins
18:17:41Yardanico(with gcc)
18:18:29FromGitter<ervinbosenbacher> grab a coffee
18:18:39*azur_kind quit (Remote host closed the connection)
18:19:12*xet7 quit (Quit: Leaving)
18:19:23dom96Nice, can't wait to run on Travis, Circle CI /and/ Semaphore
18:19:33dom96More CIs can't hurt, right? :P
18:19:57FromGitter<ervinbosenbacher> No
18:20:36Yardanicoso if semaphore ci with gcc is faster than travis ci with clang...
18:20:47Yardanico(some tests fail because boehm gc is not installed by default)
18:21:36Yardanico(of course you can use apt-get)
18:21:44Yardanicoand they have ubuntu 17.04 by default
18:22:19Yardanicoah, no, ubuntu 14.04 is default
18:22:30Yardanicooh I'm blind
18:22:37Yardanicothey ONLY have ubuntu 14.04 :D sorry for spam
18:24:33Yardanicook, testament finished in 6 mins, BUT I haven't installed boehm or other dependencies, so it might be very inaccurate
18:24:36Yardanicooh wait
18:24:38Yardanicoit's done in 9 mins
18:24:47Yardanicoah wait no?
18:25:01YardanicoAHH, it fails if one command returns non-zero exit code, wtf
18:25:13FromGitter<ervinbosenbacher> Hhaha
18:25:22Yardanicowell I probably can change that
18:25:41FromGitter<ervinbosenbacher> having fun ?
18:26:43*Ven`` joined #nim
18:30:40*xet7 joined #nim
18:33:27dom96Yardanico: If you want some brownie points: set up one of these CI services to store build artefacts on our VPS so that choosenim can use them :)
18:33:37*xet7 quit (Client Quit)
18:34:47Yardanicodom96, semaphore ci has ftp deployment
18:35:04dom96sftp? :)
18:35:12dom96cause that'd be nice
18:35:20Yardanicoprobably, and it also has generic deploy
18:35:25Yardanico(any your custom commands)
18:35:32YardanicoSemaphore has LFTP, an FTP/HTTP client and a file transfer program, installed by default. LFTP can be used with the Generic Deployment method on Semaphore.
18:35:42Yardanicoyes, lftp supports fpt
18:35:44Yardanicosfpt
18:35:45Yardanicosftp
18:36:15dom96Even if LFTP supports it, semaphore might not
18:36:29dom96They'd need to give you an SSH key that you can trust.
18:36:57Yardanicofirstly I need to understand how to make builds not fail if some command failed
18:38:32FromGitter<RedBeard0531> Can you just say `|| true` to hide the failure from it
18:38:38Yardanicowell I can
18:38:46Yardanicobut this would be a hack, no?
18:38:55YardanicoI firstly need to make sure I can't do it other way
18:39:15Yardanicoalso, why we don't use IRC notifications on travis?
18:39:26Yardanicohttps://docs.travis-ci.com/user/notifications/#Configuring-IRC-notifications
18:39:37FromGitter<RedBeard0531> Total hack, but good enough to benchmark, no?
18:39:41Yardanicoah, ok :)
18:39:42Yardanicoyes
18:39:49Yardanicoyou're right
18:40:11*xet7 joined #nim
18:40:16FromGitter<RedBeard0531> Then you can decide if it's worth the effort to do it right ☺
18:41:44*xet7 quit (Remote host closed the connection)
18:45:57*Ven`` quit (Ping timeout: 264 seconds)
18:46:04*xet7 joined #nim
18:48:53*Ven`` joined #nim
18:51:35*chemist69 quit (Ping timeout: 252 seconds)
18:54:56FromGitter<tim-st> Is it necessary for the compiler to write the function names (the same I use in source code) to the binary or why is it done? That makes reverse engineering quite easy...
18:55:20Yardanicoehm?
18:55:25Yardanicoask gcc or clang
18:56:05FromGitter<tim-st> I thought I saw the same in the nim generated code with underscore etc so I asked here
18:56:21FromGitter<tim-st> readMediaWikiXML_WPIqozUJE9cp18PTbwX5Cew
18:56:55Yardanicoit's needed for things like different generic instantiations of one proc
18:57:17FromGitter<tim-st> Yes, but the compiler could use random names from md5 or similar
18:57:30FromGitter<RedBeard0531> You could probably edit the compiler's name mangling scheme to leave out the original function name.
18:57:53Yardanicotim-st: you can't read generated C code then at all
18:58:14Yardanicoit will be really unreadable
18:58:31FromGitter<RedBeard0531> But try compiling with lto and no debug symbols first. That is probably good enough
18:58:35Yardanicouse strip
18:58:40Yardanicoit helps too
18:59:01YardanicoGuys, SemaphoreCi completed Nim test in 15 minutes! WITH GCC!
18:59:10Yardanico(compared to travis with clang - 24 mins last commit)
18:59:16Yardanicohttps://semaphoreci.com/yardanico/nim/branches/devel/builds/5
18:59:21FromGitter<RedBeard0531> Nice
18:59:38Yardanicodom96, ^^
19:01:00shashlickquestion on nimble - you have to put in the version string into the .nimble file, how can you use that value in the build/install process so that the binary built can contain the same version string?
19:01:56*Ven`` quit (Ping timeout: 276 seconds)
19:02:01Araqeither use a common include file or include the nimble file
19:02:13Araqthe .nimble file is Nim code.
19:02:27*endragor quit (Remote host closed the connection)
19:02:49YardanicoSadly semaphore ci doesn't support osx
19:02:56Yardanicobut it indeed is faster than travis
19:03:46FromGitter<tim-st> @Yardanico @RedBeard0531 Thanks, `nim -d:release --opt:size c "file.nim" && strip -s "file.exe"` solves it
19:03:57Araq15 minutes vs 24 minutes is not relevant.
19:04:07YardanicoAraq, well I know, but it definitely helps :)
19:04:09*Ven`` joined #nim
19:04:20Araqsince in either case I stop waiting for the result and play some game :P
19:04:32Araqwhich lasts for one hour.
19:04:39Yardanicolet me guess... starcraft?
19:04:40Araq(nah, just kidding, but you get the idea)
19:04:45Yardanicoah, ok :)
19:04:57*chemist69 joined #nim
19:05:08Yardanicoat least we can use semaphore ci to produce nightly binaries for choosenim (as dom96 suggested)
19:05:33*dandevelo joined #nim
19:05:37Araqmy New Year's pledge is to play Prey
19:09:56dom96shashlick: see Nimble's .nimble file for how to do it, it's a bit too messy still but doable
19:10:18FromGitter<RedBeard0531> Tim try --passc:-flto --passl:-flto
19:10:19dom96Yardanico: Can't we do that with travis too? :P
19:10:31*dandevelo quit (Ping timeout: 265 seconds)
19:12:53shashlickAraq: dom96 thanks guys, will check it out
19:13:05Yardanicodom96, we can :)
19:14:54Yardanicodom96, but I have a feeling that compiled nim binary wouldn't work on other distros or even ubuntu versions
19:15:12Yardanicobut IDK
19:15:42dom96it will
19:16:01Yardanicodom96, https://docs.travis-ci.com/user/deployment/script/
19:16:03dom96well, if you compile it on latest ubuntu it won't
19:16:16Yardanicoor we can use github releases
19:16:19*Ven`` quit (Ping timeout: 265 seconds)
19:16:23dom96If you want the best compatibility for Linux you should compiling on a system with the oldest glibc
19:16:30dom96*should be
19:16:45Yardanicoah, yes
19:16:47Yardanicocentos 6 :D
19:17:34shashlickdom96: I see how you did it for nimble, but then when it comes to pulling the right version of a module, you rely on the github tags and not the value in the nimble file right?
19:18:56*Ven`` joined #nim
19:21:10Yardanicodom96, we can use github releases for nightly builds, not sure if that's OK or not
19:21:16Yardanicoand tag them as prerelease
19:21:23*nsf quit (Quit: WeeChat 2.0.1)
19:22:20Yardanicodom96, because you can't use sftp - travis will run testing on a random host
19:22:37Yardanicomaybe just normal FTP? (and don't be scared - you can encrypt passwords)
19:22:50Yardanicohttps://docs.travis-ci.com/user/encryption-keys/
19:23:52dom96We would need to set up FTP on the server then.
19:24:14Yardanicodom96, maybe scp?
19:24:19Yardanicoah, no
19:25:14Yardanicowe can use bintray btw
19:25:36Yardanicobut only 1 terabyte/month :P
19:25:43Yardanicoand 10gb storage
19:25:46Yardanico(for open source)
19:25:59Yardanicohttps://docs.travis-ci.com/user/deployment/bintray/ https://bintray.com/
19:26:38dom96or we could write a little Nim binary that accepts files from travis ;)
19:26:46Yardanicohow?
19:27:01Yardanicowell I mean travis needs to upload them somewhere
19:28:00Yardanicoand bintray looks nice
19:31:06shashlickhow do you access a -d:NAME:VALUE within the code?
19:32:17shashlickaccessing NAME directly in the code gives me undeclared identifier
19:32:42FromGitter<RedBeard0531> {..}
19:33:50dom96Yardanico: PUT via curl?
19:33:52FromGitter<RedBeard0531> const NAME {.strdefine.}: string
19:34:14FromGitter<RedBeard0531> Or intdefine for ints
19:34:38FromGitter<RedBeard0531> Shashlick^^
19:35:00Yardanicodom96, hmm, so you want to set up a separate web-server which will check for some password and accept upload?
19:35:16dom96yes, or checks for travis IP
19:35:36Yardanicohmm, yes
19:35:36Yardanicohttps://docs.travis-ci.com/user/ip-addresses/
19:35:47dom96easy peasy :P
19:36:03Yardanicobut Sudo-enabled Linux
19:36:09Yardanicowe use it right?
19:36:14Yardanicoor not?
19:36:24*gokr joined #nim
19:36:44YardanicoAraq, also this semaphore ci is 15 mins only using gcc :)
19:36:46Yardaniconot clang
19:36:51Yardanicomaybe you didn't notice
19:37:20FromGitter<ervinbosenbacher> :)
19:37:22shashlick@RedBeard0531: thank you!
19:38:13shashlickokay, and how can I pass extra params to the build or install nim command that nimble generates?
19:40:50*endragor joined #nim
19:42:38FromGitter<RedBeard0531> Shashlick https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files
19:48:13shashlick@RedBeard0531: ya but I won't be able to pass a value from within nimble that way - nim.cfg would be hard coded and not a value I can pass
19:50:22FromGitter<RedBeard0531> If you are fine passing things manually, keep doing that...
19:53:49shashlickbasically, I want to use the nimble version value to build the executable, however, since nimble generates the nim commandline, I cannot add the -d:VERSION=xyz
19:54:31shashlicki was trying to avoid having to split out the version info into a separate .nim file since the entire code is in a single file
19:59:36Araqnimble should be able to forward most args you can pass to nim
20:04:47*sz0 joined #nim
20:06:58shashlicknimble doesn't seem to allow this, it's either -d:release or no args per the code
20:07:08shashlickhttps://github.com/nim-lang/nimble/blob/master/src/nimble.nim#L252
20:07:30*dandevelo joined #nim
20:09:50Yardanicoshashlick, are you sure?
20:09:59Yardanicoah, built from dir
20:11:57*dandevelo quit (Ping timeout: 240 seconds)
20:13:58*rauss joined #nim
20:17:42dom96add it into a nim.cfg file?
20:24:31Araqdom96: now I remember, this *needs* to be added to nimble, is there an issue open for that?
20:24:54AraqI often have strange flags I need to add to nim and nimble wouldn't let me
20:25:12dom96Why does nim.cfg not work?
20:27:41FromGitter<RedBeard0531> That can't be customized by the end user (easily)
20:29:57dom96yes it can: use nimble c file.nim
20:32:01*Ven`` quit (Ping timeout: 248 seconds)
20:33:39*gsingh93- joined #nim
20:35:02*MJCaley quit (Quit: MJCaley)
20:35:04*Syneh_ quit (*.net *.split)
20:35:04*enigmeta quit (*.net *.split)
20:35:06*byteflame quit (*.net *.split)
20:35:07*EastByte quit (*.net *.split)
20:35:07*gsingh93 quit (*.net *.split)
20:35:08*gsingh93- is now known as gsingh93
20:36:25*Ven`` joined #nim
20:36:42Araqdom96: it means I need to git stash the config changes, it works but it's not good enough
20:37:28dom96nimble c file.nim?
20:37:33dom96not good enough?
20:49:44*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:52:34*MJCaley joined #nim
20:52:55Araqno.
20:53:27*nsf joined #nim
20:54:26dom96I can guess why, but do please explain.
20:54:34dom96My guess is that you've got a Nimble task that does the building
20:55:06dom96Support for argument passing to tasks is already on my to-do list
20:56:09*Trustable joined #nim
20:57:24FromGitter<kasrasadeghi> Hi everyone!
20:58:18Yardanicohi
20:59:24shashlickdom96: it's not just on the command line, has to be possible through the .nimble file itself
20:59:40shashlicksince the end user simply types nimble install xyz and won't know what extra flags are needed
20:59:57FromGitter<kasrasadeghi> does anybody know what it means when the compiler says `Hint: main [Processing]`
20:59:58Yardanicoshashlick, there's nims and nim.cfg for this
21:00:06shashlickfor the most part, i include most arguments as pragmas within the code, but that doesn't always work
21:00:13Yardanicokasrasadeghi: it means that compiler currently compiles main.nim file
21:00:18Yardanicoshashlick, use nim.cfg?
21:00:21Yardanicoit works with nimble
21:00:33shashlicknim.cfg is static, cannot have any dynamic info in it
21:00:54FromGitter<kasrasadeghi> @Yardanico: why would it need to tell me that though? it says the same thing for os, strutils, math, etc.
21:01:28Yardanicobecause it's a compiler?
21:01:33Yardanicoand you want to see the progress
21:01:38Yardanicoyou can disable that
21:01:53Yardanico--hint[Processing]=off in nim.cfg or command-line
21:01:56FromGitter<kasrasadeghi> is that the -hint:off
21:02:00dom96shashlick: What dynamic info do you want in it?
21:02:02FromGitter<kasrasadeghi> ooo alright thank you!
21:02:06Yardanico--hint:off will disable all hints whatsoever
21:02:22dom96You can also do --verbosity:0 IIRC
21:04:04FromGitter<kasrasadeghi> --verbosity:0 seems to take away all of the hints that aren't hint[Processing]
21:04:23dom96yep
21:04:51shashlickdom96: the same nimble version info - i know you did it the other way in nimble by having a common file
21:04:52shashlickbut i'll have to create separate file and a directory structure
21:04:52shashlickall my code is in one file
21:04:55shashlickfile.nim, file.nimble
21:04:56shashlicki cannot import file.nim into file.nimble for whatever reason
21:07:15*Syneh_ joined #nim
21:07:15*enigmeta joined #nim
21:07:15*byteflame joined #nim
21:07:15*EastByte joined #nim
21:09:32FromGitter<kasrasadeghi> looking at the tutorials, it seems like you don't really have a main() in nim
21:10:30FromGitter<ervinbosenbacher> main file
21:10:42*user0 quit (Quit: user0)
21:11:05*user0 joined #nim
21:12:52FromGitter<tim-st> in module `htmlparser` the lookup table `Entities` is implemented as an array this has probably worse lookup time than HashMap unless the compiler changes it
21:13:52dom96shashlick: Just create the file and directory, don't be disgusted by it :)
21:14:40Yardanicokasrasadeghi: there's no need for it
21:14:52Yardanicoyou can of course still make main() proc and just call it
21:15:31*user0 quit (Client Quit)
21:15:47*user0 joined #nim
21:17:28FromGitter<kasrasadeghi> @Yardanico: that's the plan buddy :D
21:18:04Yardanicowell why would you want main proc?
21:18:11Yardanicodon't use styles from other languages
21:18:36FromGitter<kasrasadeghi> i don't want to entry point to have global names
21:18:57FromGitter<kasrasadeghi> that always bothered me about python scripts, and i'm using nim to rewrite a python script
21:19:18*MJCaley quit (Quit: MJCaley)
21:19:26Yardanicoglobal names?
21:19:26FromGitter<kasrasadeghi> plus I like having main because it marks the root of the execution tree. You have one place to look for where things are happening
21:19:40Yardanicoby default variables and procedures are not exported
21:19:41FromGitter<kasrasadeghi> if I use a name like
21:19:48Yardanicoto other modules
21:20:04FromGitter<ervinbosenbacher> you need the * operator right?
21:20:09*Yardanico[Phone] joined #nim
21:20:11Yardanicoyes
21:20:15Yardanicobut it's not an operator :)
21:20:21FromGitter<kasrasadeghi> file_name, and then somewhere else in the file, inside a procedure, i want to call something file_name, then it would shadow the outside one.
21:20:49Yardanicowell if you will re-declare it you won't have issues
21:20:52shashlickdom96: the whole point is for nimble install xyz to abstract all internal flags and whatnot, I can always build this manually any way I want by adding custom tasks, just that I want to use the standard method so that others can leverage it
21:21:07FromGitter<kasrasadeghi> i'd rather have them be encapsulated.
21:21:12shashlickdom96: looks like that's the only option at this time - I'm able to build with -d:VERSION=xyz but cannot do it by default in nimble install
21:21:34*Yardanico quit (Remote host closed the connection)
21:22:09FromGitter<tim-st> Is there a proc that takes a string with possible html entity within and returns a new string with translated entities to utf8? I've only seen htmlparser.entityToUtf8 which does it for single entities and I dont have a html document to parse
21:22:41FromGitter<tim-st> e.g. "A &amp; B" --> "A & B"
21:23:02FromGitter<tim-st> `"A &amp; B" --> "A & B"`
21:24:37*Trustable quit (Remote host closed the connection)
21:28:43FromGitter<kasrasadeghi> can't you do a map()
21:28:47FromGitter<kasrasadeghi> does nim have map()
21:29:22miranyes, in sequtils
21:30:27FromGitter<tim-st> It seems Entities table is only for special chars `&amp;` is not there so there is no html decoding proc it seems
21:32:34FromGitter<kasrasadeghi> `proc applyT (data: var seq[T]; op: proc (x: var T) {..}) {..}` ⏎ `proc applyT (data: var seq[T]; op: proc (x: T): T {..}) {..}`
21:32:39FromGitter<kasrasadeghi> how are these two different?
21:32:56FromGitter<ervinbosenbacher> syntax
21:33:15FromGitter<tim-st> The first returns new T, the seconds writes on the T and changes it afaik
21:33:19FromGitter<ervinbosenbacher> its the same i think
21:33:33FromGitter<tim-st> I mean the opposite..
21:33:40FromGitter<ervinbosenbacher> second assumes let
21:34:07FromGitter<ervinbosenbacher> ?
21:34:42FromGitter<kasrasadeghi> so the first one you give it a proc that mutates and apply does it for all elements ⏎ ⏎ and the second you give it a proc that does not mutate, and apply replaces each element with the result
21:34:56FromGitter<kasrasadeghi> i think
21:40:11*crem quit (Ping timeout: 255 seconds)
21:41:11*crem joined #nim
21:41:49FromGitter<kasrasadeghi> how would you guys make a GUI with nim?
21:42:23FromGitter<ervinbosenbacher> i think wxwidgets
21:42:53Yardanico[Phone]IUP/libui/wxwidgets/nigui/gintro
21:42:59Yardanico[Phone]Also nuklear
21:43:28Yardanico[Phone]These all use external libraries/c/c++ sources except nigui
21:43:36FromGitter<tim-st> I would write a gui using web based method and create a tcp server
21:44:03Yardanico[Phone]Maybe just use websockets?
21:44:20FromGitter<kasrasadeghi> that's true
21:44:24FromGitter<kasrasadeghi> might be good to learn
21:44:27FromGitter<ervinbosenbacher> @Tim I second that
21:44:38FromGitter<ervinbosenbacher> and I do that by the way
21:44:51FromGitter<kasrasadeghi> anyone know a good tutorial to get started?
21:44:59FromGitter<ervinbosenbacher> https://github.com/h3rald/litestore
21:45:17FromGitter<ervinbosenbacher> https://h3rald.com/litestore/
21:45:17FromGitter<tim-st> I think today it's the best way and most compatible and there are nice frameworks
21:45:37FromGitter<ervinbosenbacher> look at the admin interface
21:45:58FromGitter<ervinbosenbacher> https://github.com/dom96/jester
21:46:16FromGitter<ervinbosenbacher> for the other web framework and maybe youcould use electron
21:46:45FromGitter<kasrasadeghi> this is nice! i did something similar with kotlin-spark
21:46:52FromGitter<tim-st> are there preview images?
21:46:54FromGitter<ervinbosenbacher> also I am still learning this bit but Nim can compile to Javascript directly
21:46:56dom96shashlick: What I described is the standard method and won't affect your package's users.
21:47:58FromGitter<ervinbosenbacher> yeah it is nice one of the reasons I am here so I can build the c,c++, objective-c and javascript code in one languages
21:48:34FromGitter<kasrasadeghi> i should look into that. Do they have a thing like react too?
21:48:43FromGitter<ervinbosenbacher> and I am not limited cause uing FFI i can use whatever I want
21:48:49FromGitter<kasrasadeghi> wow they do
21:48:53FromGitter<kasrasadeghi> https://github.com/andreaferretti/react.nim
21:49:44FromGitter<ervinbosenbacher> yeah. I use this https://github.com/oskca/nimjs-vue
21:50:14*miran quit (Quit: Konversation terminated!)
21:50:29FromGitter<ervinbosenbacher> or the basis of that, anyway as our front is based on vue not react
21:50:37FromGitter<ervinbosenbacher> but react is good too
21:50:58FromGitter<kasrasadeghi> i'll look into both. thank you!
21:51:25FromGitter<ervinbosenbacher> its pretty awesome
21:53:03Yardanico[Phone]Nonono
21:53:14FromGitter<kasrasadeghi> https://github.com/pragmagic/karax
21:53:16FromGitter<kasrasadeghi> there's this too
21:53:35Yardanico[Phone]Use this one, yes :)
21:54:02FromGitter<ervinbosenbacher> brilliant thx!!!
21:55:23FromGitter<kasrasadeghi> to compile it to JS, do you do anything special?
21:55:40shashlickdom96: I presume you mean the common.nim and not the nimble c file.nim right?
21:56:14dom96yes
21:56:18Araqdom96: I have nimble tasks yes and want to influence the building without editing the config/nimble file
21:56:32Araqglad to hear it's on your radar.
21:56:41Yardanico[Phone]Kasrasadeghi: nim js file.nim
21:56:51FromGitter<ervinbosenbacher> can you combine karax with electron?
21:57:17FromGitter<kasrasadeghi> @Yardanico: net thanks
21:57:20FromGitter<kasrasadeghi> neat*
21:57:26FromGitter<ervinbosenbacher> And there is Ormin
21:57:33FromGitter<ervinbosenbacher> https://nim-lang.org/araq/karax.html
21:58:11FromGitter<kasrasadeghi> what's the different between `include` and `import`
21:58:25FromGitter<ervinbosenbacher> Ok there is a lot to learn especially metaprgramming features of the language it seems
21:58:34Yardanico[Phone]Include just includes the file as is
21:58:47FromGitter<kasrasadeghi> C-style copypasta
21:58:48FromGitter<kasrasadeghi> classic
21:58:50FromGitter<ervinbosenbacher> I biught the book nim in action hopefully it coverks most of the stuff
21:59:06FromGitter<ervinbosenbacher> nope
21:59:13Yardanico[Phone]And import does a normal import like in Python
21:59:13FromGitter<ervinbosenbacher> include is not the same as import
21:59:38Yardanico[Phone]I didn't say it's the same
22:00:04FromGitter<ervinbosenbacher> no not you
22:00:13FromGitter<ervinbosenbacher> (just lazy typing out names)
22:02:18FromGitter<ervinbosenbacher> in the middle of code
22:02:54FromGitter<ervinbosenbacher> Wow karax is pretty awesome. I was thinking actually whether such thing exists where the framework is already written in Nim
22:03:01FromGitter<ervinbosenbacher> wow thx!!! :)
22:03:08FromGitter<ervinbosenbacher> an all nighter again
22:04:07FromGitter<kasrasadeghi> https://github.com/pragmagic/karax/blob/master/examples/todoapp/todoapp.nim
22:04:17FromGitter<kasrasadeghi> this has been helpful so far
22:05:03FromGitter<ervinbosenbacher> quick question/ is it production ready?
22:05:18Araqyes.
22:05:57FromGitter<ervinbosenbacher> Thanks. We will move our Electron app to this, I will look into it
22:06:05*nsf quit (Quit: WeeChat 2.0.1)
22:07:03*Yardanico[Phone] quit (Remote host closed the connection)
22:07:19FromGitter<ervinbosenbacher> inspired by vue and elm?
22:07:45FromGitter<kasrasadeghi> elm is great, can confirm
22:08:05FromGitter<kasrasadeghi> very very nice error reporting
22:08:31*dandevelo joined #nim
22:08:55FromGitter<ervinbosenbacher> :) yeah i know we went from react hype to angular then to vuejes 2 and then was looking into elm
22:09:25*Yardanico[Phone] joined #nim
22:12:23FromGitter<ervinbosenbacher> so what does karax actually do?
22:13:03FromGitter<kasrasadeghi> makes a DSL for integrating nim and html, as far as i can tell
22:13:13*dandevelo quit (Ping timeout: 265 seconds)
22:13:16FromGitter<kasrasadeghi> like jsx, but using nim's macros
22:13:37FromGitter<ervinbosenbacher> i just need to figure out how to integrate back the countless controls we have implemented in vim
22:13:43*gokr left #nim (#nim)
22:13:45FromGitter<ervinbosenbacher> or karax
22:14:15FromGitter<ervinbosenbacher> keep writing vim instead of nim :D
22:14:50FromGitter<ervinbosenbacher> i think i got this I will play withit later
22:14:54FromGitter<ervinbosenbacher> have fun
22:16:20FromGitter<kasrasadeghi> is there an autoimport thing?
22:20:41Yardanico[Phone]What it would do?
22:21:03FromGitter<kasrasadeghi> Like in vscode, when it shows that a symbol is missing
22:21:13FromGitter<kasrasadeghi> it would import the library that the symbol is probably from
22:21:47Yardanico[Phone]No
22:22:01Yardanico[Phone]But this can be implemented
22:27:05FromGitter<ervinbosenbacher> i have a question
22:27:34FromGitter<ervinbosenbacher> say one part tagets JS the other targets C how do we talk to each other? Sockets?
22:27:42FromGitter<ervinbosenbacher> using futures channels and sockets?
22:30:22FromGitter<kasrasadeghi> sockets are probably the way to go
22:31:08FromGitter<ervinbosenbacher> yeah I figured i would go with zmq or dRPC in any other case I just need to figure out what is the Nim way
22:31:24Yardanico[Phone]Also websockets?
22:31:27FromGitter<ervinbosenbacher> or microservices
22:31:38FromGitter<ervinbosenbacher> yes that websockets
22:32:57FromGitter<ervinbosenbacher> https://nim-lang.org/araq/karax.html
22:33:10FromGitter<ervinbosenbacher> is there a second part to this? with Ormin?
22:36:11Yardanico[Phone]No t yet
22:36:52FromGitter<ervinbosenbacher> Can I use Nim without GC?
22:36:59FromGitter<ervinbosenbacher> https://nim-lang.org/araq/destructors.html
22:37:08FromGitter<ervinbosenbacher> just quickly looking at this?
22:39:46Yardanico[Phone]This is not really tested, but you can
22:40:07Yardanico[Phone]Start with (two -)gc:none
22:40:27Yardanico[Phone]--gc:none but two - instead of --
22:40:41Yardanico[Phone]Also why would you want to avoid GC?
22:41:30FromGitter<ervinbosenbacher> Just theoretical question for the future
22:41:37FromGitter<ervinbosenbacher> right now I dont, its fine
22:42:33FromGitter<zetashift> Also I think you lose some stdlib support if you disable it
22:42:46FromGitter<zetashift> The destructor thing is planned for the future(Nim v2)
22:43:09Araqthe second part is done since forever but websockets don't work for some reason
22:43:23Araq-.-
22:43:23FromGitter<ervinbosenbacher> Nah its fine, if I dont need GC I use c++11/14/17 and talk to it using some IPC mechanism
22:43:49FromGitter<ervinbosenbacher> or I will use Nim v2
22:44:07FromGitter<ervinbosenbacher> maybe I can contribute to Nim v2
22:44:25Yardanico[Phone]It's just started :)
22:44:33FromGitter<ervinbosenbacher> Where?
22:44:50Yardanico[Phone]https://github.com/nim-lang/Nim/tree/nimv2?files=1
22:45:18FromGitter<ervinbosenbacher> ah thx
22:45:20FromGitter<ervinbosenbacher> :)
22:45:33Yardanico[Phone]Also read https://github.com/nim-lang/Nim/wiki/Destructors
22:46:12FromGitter<ervinbosenbacher> Thats oretty cool stuff, actually I was searching for that about 30 minutes ago :D
22:47:03Yardanico[Phone]This page is about v2 destructors, not current ones :)
22:47:22FromGitter<ervinbosenbacher> is it safe to use v2?
22:47:45Yardanico[Phone]It's not really implemented yet
22:47:52Yardanico[Phone]As you can see by commits
22:47:53FromGitter<zetashift> @mratsim you there by any chance?
22:47:57FromGitter<ervinbosenbacher> yes
22:48:02FromGitter<ervinbosenbacher> browsing the source
22:48:44Yardanico[Phone]I think Araq will merge changes from devel where possible
22:49:27Araqyeah it's not really done in a branch but via a --newruntime switch
22:49:42FromGitter<ervinbosenbacher> its fine, I will spend next week to get fully knee deep in this so I understnad inside out. Really want to use it and contribute to it
22:49:59Araq--newruntime will use a cleaned up system.nim and a modified code generator
22:50:26FromGitter<ervinbosenbacher> faster? Smaller? Both?
22:51:10Araqeventually faster but more importantly better suited for embedded devices, interop with C++ and Python, etc
22:51:19FromGitter<ervinbosenbacher> I am writing a search engine aka Lucene nw I have a whole set of ideas around DSL for search
22:51:30FromGitter<tim-st> @Araq does nimsuggest evaluates results of const vars? if I type `const var1 = someCall` my system goes at 100% for ten minutes and now there is 3.3gb in memory
22:51:33FromGitter<ervinbosenbacher> awesome,
22:51:44Araqtim-st wow what?
22:51:45FromGitter<ervinbosenbacher> actually I am targetting embedded devices with this
22:51:52Yardanico[Phone]tim-st: on devel? Probably some bug in Nim vm
22:52:15Yardanico[Phone]Also is this proc really computation intensive?
22:52:17Araqbut yes, nimsuggest is pretty much the full compiler without codegen
22:52:20FromGitter<tim-st> the call is pretty massiv: inserting wikipedia index in an orderedTable
22:52:23Araqso it does evaluate your consts
22:52:26Yardanico[Phone]Ah, it's nimsuggest
22:52:32Araqah ouch.
22:52:44FromGitter<tim-st> does it do it again if I change nothing?
22:53:09FromGitter<ervinbosenbacher> ok @araq let me know if I can and where to contribute with v2
22:53:10Araqif you don't touch the file it will be refreshed eventually iirc
22:53:35Araqervinbosenbacher: I wrote this wiki for people like you. :-)
22:53:42FromGitter<tim-st> ok I will do `when false: .. else: ... ` for now
22:53:50*endragor quit (Remote host closed the connection)
22:54:00Araqwhen defined(nimsuggest) could also work
22:54:15FromGitter<ervinbosenbacher> this https://github.com/nim-lang/Nim/wiki/Destructors?
22:54:22Araqyes
22:54:54FromGitter<tim-st> btw can I do binarysearch on ordered set?
22:54:57FromGitter<ervinbosenbacher> i just dig into the issues list and go slowly
22:55:35FromGitter<tim-st> or better: return the next x results from position y
22:56:51*devdri quit ()
22:58:22Araqtim-st: it's a set, so no.
22:58:43FromGitter<tim-st> but for what use case it's ordered than?
22:58:51FromGitter<tim-st> only echo?
22:59:01Araqordered means it remembers the insertion order.
22:59:28FromGitter<tim-st> yes, and if I preorder it, it is ordered
22:59:33Araqthe search uses hashing and doesn't support range queries, sad, I know.
22:59:48FromGitter<tim-st> can I access the underlying array?
22:59:49FromGitter<ervinbosenbacher> yes
23:00:49FromGitter<tim-st> Otherwise I will use ordered array with binarysearch but the lookup is Olog_2(n) vs O(1)
23:01:47Araqthat doesn't mean much, you can also use an interpolation search to get it to O(log log N) or something like that
23:01:52FromGitter<ervinbosenbacher> just the classic batlle of what algo what data structure what search algo?
23:01:52*dddddd quit (Remote host closed the connection)
23:01:55FromGitter<ervinbosenbacher> :D
23:02:12Araqthe real problem with the ordered array is that insertions are O(N)
23:02:30Araqas there are no holes to take advantage of.
23:02:38FromGitter<tim-st> no, problem because its constant and I do it once
23:02:41FromGitter<ervinbosenbacher> or just order it when you need to seacrch
23:03:11Araqervinbosenbacher: That never works for hard realtime, unfortunately.
23:03:39FromGitter<tim-st> I dont see a use case for orderedSet/OrderedTable when this doesnt work
23:03:49FromGitter<tim-st> unless echo
23:04:13FromGitter<tim-st> and iterating all
23:04:14Araqhuh? the benefits of ordered dicts are widely documented, Python moved to one
23:04:47FromGitter<ervinbosenbacher> :D :D yeah
23:04:53Araqthe use case of "non pseudo random iteration order" is always nice for end users.
23:05:00FromGitter<ervinbosenbacher> my head is all over the place that is correct
23:05:06*MJCaley joined #nim
23:05:32FromGitter<ervinbosenbacher> its too late, python and related libs in C have a bnch of solutions
23:05:59Araqin fact, the compiler itself has bugs because it uses non-ordered dicts :P
23:06:24Araqor let's say the non-order makes the bugs more severe
23:07:08FromGitter<tim-st> If I think about my use case again ordered array is enough, but a combination of both would be best
23:07:29FromGitter<ervinbosenbacher> okay how abot hash tables
23:08:05FromGitter<tim-st> Hashtable is the same as set, with the difference that it store is value at this pos, I dont need the values, my keys are my values
23:08:14FromGitter<tim-st> *a
23:08:32FromGitter<ervinbosenbacher> ok
23:09:18FromGitter<tim-st> Maybe a third Set would be needed SortedSet this would be the thing I need
23:09:51FromGitter<tim-st> this would have insertion of O(n*lg(n)) but for const it's good
23:10:18FromGitter<ervinbosenbacher> python http://www.grantjenks.com/docs/sortedcontainers/index.html
23:10:22FromGitter<tim-st> no O(lg(n)) only :/
23:10:32FromGitter<ervinbosenbacher> do we have that in nim?
23:13:36AraqI have a BTree implementation but it's not stdlib ready, in particular it lacks the 'delete' feature
23:14:05FromGitter<ervinbosenbacher> Actually i am working on a similar thing
23:14:15FromGitter<ervinbosenbacher> as of right now
23:14:24Araqa BTree is an excellent SortedSet
23:15:02FromGitter<ervinbosenbacher> Can you share?
23:15:22FromGitter<tim-st> Would be a really good type, if the proc names are the same or similar like the ones exists and if one can make it const like the others
23:16:05Araqoh it cannot easily be 'const', hmm. you're better off with a simple sorted seq then for now
23:16:22Araqervinbosenbacker: it's not ready, sorry.
23:17:19FromGitter<tim-st> yes, that's ok. lg2(n) is already a very good runtime
23:18:33Araqas I said, use interpolation search, it's more fun
23:18:58FromGitter<tim-st> is it implemented? is this something like "minimal perfect hash function"?
23:21:32Araqno but https://en.wikipedia.org/wiki/Interpolation_search is not hard to implement
23:21:47FromGitter<tim-st> Have read it now sounds interesting, never heard before of it
23:22:41Araqkeep your Sedgewick under your pillow
23:25:17FromGitter<tim-st> I will implement both for the wikipedia lookup and compare later which one does better
23:28:57Araqonce you picked your pivot x compare the range y .. y+7 where y = x mod 64 since its free
23:30:08FromGitter<tim-st> why is it free?
23:30:20FromGitter<tim-st> shift?
23:30:22Araqwell my math is wrong but you get the idea
23:30:59Araqdata close to what you load is in the cache anyway so you might as well look at it
23:31:26FromGitter<tim-st> ok, thanks
23:32:59*Senketsu joined #nim
23:37:00FromGitter<ervinbosenbacher> I cant wat for v2, i desperately need that, embedded c++ and python. Ill see where I can help next week.
23:40:02Araqhey I feel your pain. I can guide you.
23:40:24Araqit's a ton of work but it's also pretty clear what and how to do.
23:40:28FromGitter<ervinbosenbacher> is there a roadmap somewhere?
23:40:40FromGitter<ervinbosenbacher> or a list of tasks?
23:40:53FromGitter<ervinbosenbacher> ETA?
23:41:17*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
23:41:31AraqI will write an RFC.
23:41:40FromGitter<ervinbosenbacher> look, initiallay I wanted to build something like Nim to meet my needs similar goals but then I found Nim 2 days ago and said yeah thats the stuff I want.
23:43:14FromGitter<ervinbosenbacher> The problem was that we wrote one thing in oen lang and another thing in another lang the porting libs back and forth between langs
23:43:26FromGitter<ervinbosenbacher> Rust, go, D c++ c and python
23:43:38Araq:-)
23:43:44FromGitter<ervinbosenbacher> Nim is perfect
23:44:09Araqwell, no, but it's getting really good with the best things yet to come
23:44:56FromGitter<ervinbosenbacher> well yes I meant that is a perfect solution to my problem, cutting down that problem quite a bit
23:45:40FromGitter<ervinbosenbacher> anyway I need to know you plans so I can gear up and help as much as I can to get to that stage s fast as possible.
23:46:16FromGitter<ervinbosenbacher> I am building a startup called finddit.com and the more I am thinking about this the more I would like to base our core dev efforts on Nim
23:46:49Araqthat's nice. any remarks on my destructor design?
23:47:33FromGitter<ervinbosenbacher> Not yet, still reading multitasking between coding, reading, learning.
23:47:47FromGitter<ervinbosenbacher> We are targeting Jetson TX2 with cuda
23:48:15FromGitter<ervinbosenbacher> and I am building a quick POC using Nim see how it performs
23:48:39FromGitter<ervinbosenbacher> rebasing some of the search engine code next week.
23:48:58Araqdon't overheat ;-)
23:49:02FromGitter<ervinbosenbacher> Ok I get back to you
23:49:28AraqI'm always here, I never sleep. (nah, just kidding)
23:49:30FromGitter<ervinbosenbacher> I cant stop now, its been a long time i was that excited as now
23:49:47FromGitter<ervinbosenbacher> Right i do the same shit
23:49:50FromGitter<ervinbosenbacher> :D
23:49:52FromGitter<ervinbosenbacher> lol
23:50:32FromGitter<ervinbosenbacher> Need to try this on our embedded hardware
23:50:50FromGitter<ervinbosenbacher> i am building an embedded ubuntu image with Nim
23:54:26FromGitter<ervinbosenbacher> i was contributig to GCC and LLVM
23:54:26FromGitter<ervinbosenbacher> i will do this here now
23:54:58Araqcool more compiler devs is what we need :D
23:55:25Araqmaybe you can help me with my dataflow analysis
23:55:35FromGitter<ervinbosenbacher> i was planning to contribute to D, after 2 key people left I got disapointed
23:55:43FromGitter<ervinbosenbacher> yes I can
23:56:06FromGitter<ervinbosenbacher> I have experience with Python code base, gcc and llvm,
23:56:27AraqI can't get the fixpoint iteration through the control flow graph to behave properly
23:57:08FromGitter<ervinbosenbacher> I will have a look next week, I need to get familar wit the compiler code
23:57:21FromGitter<ervinbosenbacher> and need to know what s the exact problem
23:58:12Araqwell it's not important for anything
23:58:23FromGitter<ervinbosenbacher> cn you send me some logs?
23:58:26Araqbut it would be nice to know how to do it properly
23:58:51FromGitter<ervinbosenbacher> and what is the misbeehavior
23:59:23Araqhttps://github.com/nim-lang/Nim/blob/devel/compiler/dfa.nim#L337
23:59:27FromGitter<ervinbosenbacher> look, I am going to spend considerable time helping to build the tooling and the compiler I made up my mind today
23:59:38FromGitter<ervinbosenbacher> just give me some time to get familar