<< 02-10-2017 >>

00:00:37*Sentreen quit (Ping timeout: 260 seconds)
00:12:00*Etheco joined #nim
00:12:58*Sentreen joined #nim
00:15:50*skrylar quit (Quit: Leaving)
00:25:05*Etheco quit (Quit: Leaving)
00:39:19*def-pri-pub joined #nim
00:40:05*loc8 joined #nim
00:41:06loc8Hey does Nim have any `parsec` port or something?
00:41:53loc8Any active parser combinator library, that is
00:42:21loc8I found a few abandoned ones, but they're pretty unstable and have little to no documentation
00:54:46loc8I found a few abandoned ones, but they're pretty unstable and have little to no documentation
01:00:24*Serenitor joined #nim
01:02:57*Serenit0r quit (Ping timeout: 248 seconds)
01:06:00*def-pri-pub quit (Quit: Leaving.)
01:08:13*vendethiel- joined #nim
01:09:25*vivus joined #nim
01:10:02*Ven`` quit (Ping timeout: 260 seconds)
01:11:36*chemist69 quit (Ping timeout: 258 seconds)
01:25:15*Demos quit (Quit: Demos)
01:25:23*chemist69 joined #nim
01:30:08*yglukhov quit (Remote host closed the connection)
01:39:58*vivus quit (Quit: Leaving)
01:52:01*dddddd quit (Remote host closed the connection)
01:53:59*Serenit0r joined #nim
01:55:41*Serenitor quit (Ping timeout: 240 seconds)
02:39:16*enthus1ast- quit (Quit: Lost terminal)
02:40:36*def-pri-pub joined #nim
02:41:47FromGitter<Varriount> Araq: I'd rather have a compile-time API to influence the import mechanism
02:42:05*SerenityStyle joined #nim
02:45:31*Serenit0r quit (Ping timeout: 258 seconds)
03:29:51*loc8 quit (Quit: WeeChat 1.9)
03:31:06*ftsf quit (Remote host closed the connection)
03:35:14*def-pri-pub quit (Quit: Leaving.)
04:11:46*chemist69 quit (Ping timeout: 264 seconds)
04:12:10*chemist69 joined #nim
04:15:44*sz0 joined #nim
04:23:54*def-pri-pub joined #nim
04:28:54*def-pri-pub quit (Quit: Leaving.)
05:00:38*Ven`` joined #nim
05:01:36*vendethiel- quit (Ping timeout: 258 seconds)
05:15:09*miran joined #nim
05:34:14*yglukhov joined #nim
05:38:35*yglukhov quit (Ping timeout: 240 seconds)
05:55:25*Vladar joined #nim
06:06:06*SerenityStyle quit (Ping timeout: 240 seconds)
06:07:35*Serenitor joined #nim
06:21:06*nsf joined #nim
06:24:01*miran quit (Ping timeout: 240 seconds)
06:24:13*sz0 quit (Quit: Connection closed for inactivity)
06:25:12*solitudesf joined #nim
06:36:33*yglukhov joined #nim
06:38:10*couven92 joined #nim
06:41:05*yglukhov quit (Ping timeout: 248 seconds)
06:42:14*PMunch joined #nim
06:47:49*claudiuinberlin joined #nim
06:59:41FromGitter<Bennyelg> when I declare Some type lets says: ⏎ ⏎ ```type ⏎ User = ref object ⏎ name: string ⏎ lastname: string``` ⏎ ⏎ If I want to export User it's enouge to export just the user by adding * ? so User to User* ? or Now I need to explicitly apply the rest of his fields also if I wanted them to be exported too ? [https://gitter.im/nim-lang/Nim?at=59d1e3dcb59d55b82360cd7d]
07:08:08Araqyes
07:15:39*Arrrr joined #nim
07:20:18FromGitter<Bennyelg> Thanks
07:24:45*ShalokShalom joined #nim
07:27:29*voiceftp quit (Remote host closed the connection)
07:28:53*Serenit0r joined #nim
07:29:17*voiceftp joined #nim
07:31:06ArrrrWhat is this scriptable import mechanism?
07:32:17*Serenitor quit (Ping timeout: 248 seconds)
07:36:24FromGitter<andreaferretti> @dom96 of course `neo` supports dot prodcut
07:36:33FromGitter<andreaferretti> `let a = v * w`
07:36:47FromGitter<andreaferretti> you are right that it does not support cross product
07:36:58FromGitter<andreaferretti> because, well, that is kind of a non existing operation :-)
07:37:47FromGitter<andreaferretti> in general there exists a `^` operation on skew tensors, but is not inner to a space
07:38:28FromGitter<andreaferretti> it just happens that in 3 dimensions you can choose some identification between `R^3 ^ R^3` and `R^3` itself
07:38:59FromGitter<andreaferretti> once one makes such a non canonical choice, you get an operation on `R^3` which is usually called cross product
07:39:08FromGitter<andreaferretti> but it only makes sense in 3 dimensions anyway
07:39:32FromGitter<andreaferretti> I may support tensor operations later
07:39:46FromGitter<andreaferretti> for now `neo` only deals with matrices and vectors
07:51:16*adamchainz left #nim ("Textual IRC Client: www.textualapp.com")
08:18:12FromGitter<ephja> the path string length limit of 255 for tar is so lame :p
08:27:55*gokr joined #nim
08:34:01*sz0 joined #nim
08:41:43*MyMind joined #nim
08:43:13*Sembei quit (Ping timeout: 248 seconds)
08:43:19*Serenit0r quit (Quit: Leaving)
08:55:14*yglukhov joined #nim
08:55:26gokrAraq: I am trying to understand GcUnsafe - I am using spawn and threadpool. But how can I understand why the compiler deems a proc/method unsafe?
08:56:32gokrOr am I meant to put pragmas in manually - to mark things gcsafe?
08:56:47*yglukhov quit (Remote host closed the connection)
08:57:03*yglukhov joined #nim
08:58:37FromGitter<Yardanico> Yay
09:02:37FromGitter<Yardanico> Araq deleted all old repos!
09:03:09FromGitter<Bennyelg> Someone over here used the parseSQL library ?
09:04:35FromGitter<Grabli66> gokr, i think you should mark all your global variables, that you use in that procedures with {.threadvar.} . It helps to me :)
09:05:27Araqbennyelg: I do.
09:06:26Araqyardanico: not all, but it is a start
09:06:36FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d2019b7b7d98d30d604a56]
09:09:30FromGitter<Bennyelg> if I removing the INSERT statement i get ⏎ the statemened parsed but not correctly. (VARCHAR Instead of VARCHAR(10)) ⏎ ⏎ ```CREATE TABLE test(name VARCHAR);``` [https://gitter.im/nim-lang/Nim?at=59d2024a177fb9fe7e2a73a3]
09:11:02gokrGrabli66: yeah, but that was not it. It seems the algorithm for gcsafe etc has issues with methods. I rewrote with generics, because I don't really need methods here, and then it stopped complaining.
09:12:11gokrI mean, sure, I can mark and then take on the responsibility myself - just wondering if I had missed something obvious.
09:12:16FromGitter<Grabli66> I dont use "methods" :)
09:12:36FromGitter<Grabli66> It's some kind of black macros magic :)
09:13:16gokrmethods is not magic, it's just plain old runtime polymorphic dispatch. Essential IMHO for any serious more complex OO models.
09:15:37FromGitter<Grabli66> All macros are magic. Dont know them and don't like them.
09:18:08*Etheco joined #nim
09:20:43Araqgokr: the .base methods need to be annotated with gcsafe explicitly
09:21:44gokrAh, ok, makes sense.
09:22:19gokrI just made you happy though and (for this simple case it's just fine) switched to an object variant and regular plain old case switch coding ;)
09:23:48FromGitter<ephja> @Grabli66 macros?
09:24:24FromGitter<Grabli66> Macros :)
09:26:11FromGitter<ephja> I'm not sure how it's related to macros
09:27:03FromGitter<Grabli66> What is related to macros?
09:54:39*obadz quit (Ping timeout: 248 seconds)
09:56:40*obadz joined #nim
09:58:02*claudiuinberlin quit (Read error: Connection reset by peer)
10:02:09*endragor joined #nim
10:03:08*fastrom quit (Quit: Leaving.)
10:03:14*ipjk joined #nim
10:10:32FromGitter<Yardanico> Methods are not related to macros
10:10:44FromGitter<Yardanico> "
10:10:55FromGitter<Yardanico> "I dont use "methods". It's some kind of black macros magic"
10:15:30ArrrrEnum with {.size:1.} and more than 256 elements will still return size 1. Is this ok?
10:16:50ArrrrThis returns 1 https://pastebin.com/yBM86Dqi
10:17:51FromGitter<Grabli66> I thought methods are built on macros
10:29:46*PMunch_ joined #nim
10:29:47Araqthey are not, they should have been though
10:31:34*PMunch quit (Ping timeout: 264 seconds)
10:32:04*Trustable joined #nim
10:43:43*sz0 quit (Quit: Connection closed for inactivity)
10:50:43*fastrom joined #nim
11:00:02FromGitter<Yardanico> @Grabli66 , also, learn macros, they're not magic :)
11:14:19FromGitter<Grabli66> I dont want :) . I think nim has everything for programming without macros.
11:20:41*Arrrr quit (Ping timeout: 240 seconds)
11:25:10*Arrrr joined #nim
11:49:07*ShalokShalom is now known as ShalokShalom2
12:08:17FromGitter<Yardanico> well I mean that macros are not "magic". you get AST of nim code - you return AST of nim code :)
12:09:18FromGitter<Grabli66> No no no. It's ancient magic. :)
12:11:58FromGitter<Grabli66> Maybe i am have macrosophobia.
12:13:45FromGitter<Yardanico> btw, Araq: ⏎ I think that ⏎ async-streams, json-macro, and more_concurrency branches are safe to delete too :) because they don't contain any commits which are not in devel
12:15:32FromGitter<Yardanico> @Grabli66 with macros you can for example make api calls like this: ⏎ "[email protected](count=30)"
12:16:03FromGitter<Yardanico> so macro "@" would check that API method name is correct (I'm too lazy to check all arguments though)
12:16:08FromGitter<Yardanico> https://github.com/VKBots/nimvkapi/blob/master/vkapi.nim
12:17:06FromGitter<Yardanico> also it uses asyncdispatch multisync pragma, which is a cool thing :)
12:18:36FromGitter<Grabli66> Why not myapi.wall.get(count=30)?
12:19:01*dddddd joined #nim
12:21:42FromGitter<Yardanico> this would require you to make many procs or some private types (if you would overload `.` and `()`)
12:22:12FromGitter<Yardanico> and I just have one macro
12:23:19FromGitter<Bennyelg> tainedString to string
12:23:35FromGitter<Yardanico> @Bennyelg it's already a string
12:23:42FromGitter<Yardanico> unless you've compiled in taintMode:on
12:23:55FromGitter<Yardanico> (it's not enabled by default)
12:24:22FromGitter<Bennyelg> I got string i.e: ⏎ ⏎ "CREATE TABLE test( ⏎ ⏎ ```name VARCHAR(10)``` ... [https://gitter.im/nim-lang/Nim?at=59d22ff5210ac26920995f25]
12:24:29FromGitter<Bennyelg> with 2 spaces
12:24:36FromGitter<Bennyelg> I split it and I get 2 elements
12:24:48FromGitter<Bennyelg> Donnu way, I tried to strip() it but not help
12:25:19FromGitter<Bennyelg> I tired to take the seq except the last element: [0..^-1] not helped
12:25:34*manjaro-kde5 joined #nim
12:25:51FromGitter<Yardanico> well I get @[CREATE, TABLE, test(, , name, VARCHAR(10), , );, , ] with split
12:26:03FromGitter<Bennyelg> no
12:26:06FromGitter<Bennyelg> assum you have this:
12:26:30FromGitter<Bennyelg> @[CREATE TABLE test( ⏎ ⏎ ```name VARCHAR(10)``` ⏎ ⏎ ), ... [https://gitter.im/nim-lang/Nim?at=59d230767b7d98d30d6151f0]
12:26:38FromGitter<Bennyelg> seq with 2 elements
12:27:09FromGitter<Bennyelg> How to I take all the elements except the last one? I thought mySeq[0..^1]
12:27:09FromGitter<Yardanico> @Bennyelg just paste a code snippet so I can see the whole thing :)
12:27:14FromGitter<Yardanico> ah, ok
12:27:41FromGitter<Grabli66> @Yardanico , may be you are right. But many languages does not have macros, like C# or Java. And people don't suffer from their absence.
12:27:47FromGitter<Yardanico> yes, it's mySeq[0..^2], not mySeq[0..^1]
12:27:53FromGitter<Yardanico> @Grabli66 C# or Java are managed languages
12:28:09FromGitter<Yardanico> you've got some "reflection" stuff there
12:28:55FromGitter<Grabli66> So what?
12:28:56FromGitter<Bennyelg> why ^2
12:29:18FromGitter<Yardanico> @Grabli66 so C# or Java have a VM so you can edit bytecode on-the-fly
12:30:35FromGitter<Grabli66> I hate reflection too. It's slow.
12:31:16FromGitter<Yardanico> @Bennyelg from first to the second from end
12:31:18*PMunch_ quit (Quit: Leaving)
12:31:21FromGitter<Yardanico> "^2" means second from the end
12:31:38*PMunch joined #nim
12:32:03FromGitter<Bennyelg> Yea now I got it, ⏎ I had a better way
12:32:05FromGitter<Bennyelg> var sqlCommands = filterIt(readAll(f).split(";"), it.strip().len != 0)
12:32:14FromGitter<Bennyelg> this is more sexy
12:32:52FromGitter<Yardanico> but slower :)
12:32:58FromGitter<Bennyelg> :D
12:33:20FromGitter<Bennyelg> I don't care the performance speed is not important here
12:33:29FromGitter<Grabli66> But with reflection you cant change language syntax, and with macros you can. Many people trying to change nim syntax with macros.
12:33:34FromGitter<Bennyelg> 1) you won't even feel it
12:33:45FromGitter<Yardanico> @Grabli66 no, you can't
12:34:20FromGitter<Yardanico> ```code paste, see link```
12:34:27FromGitter<Yardanico> https://nim-lang.org/docs/manual.html#macros
12:35:30FromGitter<Yardanico> @Bennyelg this is more sexy :P ⏎ ⏎ ```let sqlCommands = readAll(f).split(";").filterIt(it.strip().len != 0)``` [https://gitter.im/nim-lang/Nim?at=59d232917b7d98d30d615c71]
12:35:41FromGitter<Yardanico> change "let" back to "var" if you need to modify it
12:35:54PMunchYardanico, split on ; is a bit sketchy
12:36:07FromGitter<Yardanico> well it's not my code :)
12:36:27PMunchWhat about SELECT * FROM table WHERE name = "Hello;DROP TABLES"
12:36:50FromGitter<Yardanico> AFAIK developer provides these SQL statement
12:36:51FromGitter<Yardanico> not user
12:36:56FromGitter<Yardanico> ask @Bennyelg though
12:37:34FromGitter<Grabli66> @Yardanico Yes, you can.
12:37:56FromGitter<Yardanico> @Grabli66 show me please :)
12:38:12FromGitter<Yardanico> you already get parsed nim syntax into your Macro
12:38:18FromGitter<Yardanico> you can't pass invalid syntax to it
12:38:25FromGitter<Yardanico> so it can't change the syntax of the language
12:38:47FromGitter<Grabli66> @Yardanico , https://github.com/Yardanico/nimpylib
12:38:55FromGitter<Yardanico> I'm not changing any syntax here
12:38:58*TjYoco joined #nim
12:39:01FromGitter<Yardanico> all syntax is a valid nim syntax here :)
12:40:05FromGitter<Grabli66> But nim does not have class key word. And you add. And it's behavior. It's evil :)
12:40:16FromGitter<Yardanico> I don't add it actually
12:40:22FromGitter<Yardanico> "class" is a macro
12:41:09FromGitter<Yardanico> this project was written for fun as a small PoC :)
12:41:30FromGitter<Yardanico> for example I can add "with" template, because with is no longer a nim keyword
12:43:34FromGitter<Grabli66> I am for purity of nim. :)
12:44:02FromGitter<Yardanico> well I didn't use nimpylib in any of my projects, and it was written to show that it's possible to C+P some simple code from python to nim :P
12:44:15*ShalokShalom joined #nim
12:44:44FromGitter<Yardanico> however maybe https://github.com/Yardanico/nimpylib/blob/master/src/pylib/range.nim can be useful for someone (it only depends on nim stdlib and can be extended to support slices)
12:45:50FromGitter<Bennyelg> :( so sad for else not exists in nim
12:46:46FromGitter<Yardanico> you can do it with a template :P
12:46:49FromGitter<Yardanico> ah, no
12:47:06FromGitter<Yardanico> but it can be done with a temporary variable
12:47:20FromGitter<Bennyelg> what do you mean? with temporary variable
12:47:21*ShalokShalom2 quit (Ping timeout: 258 seconds)
12:48:40FromGitter<Yardanico> @Bennyelg ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d235a7614889d47565bc8a]
12:49:06FromGitter<Bennyelg> yea I know
12:49:13FromGitter<Bennyelg> I didnt want to do it
12:49:37FromGitter<Yardanico> well you don't need to expect that nim would have any syntax feature python has
12:50:12FromGitter<Bennyelg> I know
12:50:16FromGitter<Bennyelg> but it's just cleaner
12:52:03FromGitter<Bennyelg> walkDir(path).toSeq not work?
12:52:10FromGitter<Yardanico> yes it wouldn't work
12:52:18FromGitter<Bennyelg> :(
12:52:20FromGitter<Bennyelg> hehehe
12:52:21FromGitter<Yardanico> https://nim-lang.org/docs/manual.html#templates-limitations-of-the-method-call-syntax
12:52:30FromGitter<Yardanico> you should use toSeq(walkDir(path))
12:52:38FromGitter<Yardanico> The problem here is that the compiler already decided that something() as an iterator is not callable in this context before toSeq gets its chance to convert it into a sequence.
12:53:03FromGitter<Bennyelg> I see
12:53:05FromGitter<Bennyelg> thanks
12:53:29FromGitter<hawk-king> Hi, I'm starting learning nim, I'm mainly interested in embedded development, is there any change to make a linux kernel module in nim ?
12:54:11FromGitter<Yardanico> @hawk-king well I can say that it is surely possible (since nim compiles to C), but I don't know how hard or easy it is :)
12:54:47FromGitter<Yardanico> you would need to create a wrapper for linux kernel headers (only those you need)
12:55:32FromGitter<hawk-king> @Yardanico , hmm I'm trying to find a hello world example on the internet but nothing so far
12:55:45FromGitter<Yardanico> in nim? I doubt you will find any
12:56:02FromGitter<Bennyelg> lol
12:56:06FromGitter<Bennyelg> echo("hello world")
12:56:07FromGitter<Bennyelg> :D
12:56:18FromGitter<Yardanico> @Bennyelg linux kernel hello-world example
12:56:23FromGitter<Yardanico> (linux kernel module)
12:56:31FromGitter<hawk-king> @Bennyelg yes, but how to compile it to hello.ko :P
12:57:25FromGitter<Yardanico> @hawk-king you can compile Nim to C and then do whatever you want with resulting C file :)
12:58:57FromGitter<hawk-king> @Yardanico kernel module cannot use libc and of course i would like to use nim - c ... command to compile it,
13:01:47FromGitter<Yardanico> @hawk-king then you'll probably need to compile with --os:standalone
13:02:04FromGitter<Yardanico> but yeah, you'll need to do a lot of work like wrapping linux kernel
13:02:18FromGitter<Yardanico> (you don't need to wrap a whole kernel if you want only some functions though)
13:03:47FromGitter<hawk-king> @Yardanico thanks I will try to do it for a module with only one printk
13:08:38FromGitter<zacharycarter> red blob games hex code ported to nim
13:09:19FromGitter<zacharycarter> https://gist.github.com/zacharycarter/c5565930ba57af5554bb8180d566f067
13:10:17FromGitter<zacharycarter> in prep for a rts :P
13:17:29TjYocozacharycarter nice work. btw a physics engine is way too over my head rn lol gonna have to study it for a bit. But im really into game dev so trying to think of some things to contribute
13:19:41FromGitter<zacharycarter>  np
13:20:08gokrAraq: I am using the mqtt wrapper (https://github.com/barnybug/nim-mqtt) which works quite ok. But... when I build with threads:on I get into trouble.
13:21:20gokrThe library uses callbacks, and the underlying C library calls those in its own thread.
13:21:43gokrSo I get segfaults.
13:23:24Araqgokr: setupForeignThreadGc() ?
13:23:36gokrSounds promising :)
13:25:55*couven92 quit (Quit: Client disconnecting)
13:28:58*PMunch quit (Remote host closed the connection)
13:28:58*PMunch_ joined #nim
13:30:49gokrAraq: Didn't help actually
13:31:13Araqyou need to call it in the proper place
13:31:23gokrWhich I thought was first line in every callback?
13:31:40Araqhuh that sounds pretty ok
13:31:50*PMunch_ quit (Client Quit)
13:32:12*PMunch joined #nim
13:33:23gokrI am making this little Jester based server that uses threadpool btw to spawn off jobs etc. But it should also do MQTT, and things have been working fine up until this very point where I am receiving MQTT messages (sending has been working fine).
13:33:52gokrThe small test there in the MQTT library works - but not if you build it with --threads:on
13:35:19gokrOh, wait.
13:35:27Araqare there any GC safety warnings?
13:35:42gokrI need to add this inside the wrapper, right?
13:36:18Araqdepends
13:36:24Araqbut possible
13:36:44gokrLike here perhaps: https://github.com/barnybug/nim-mqtt/blob/master/src/mqtt.nim#L141
13:37:16gokrOk, gotta go - but thanks for the pointers. Would be neat if I get this working, this is going to be open source btw. And a fairly neat little thing.
13:43:21*gokr quit (Ping timeout: 240 seconds)
13:45:17*sz0 joined #nim
13:46:24*abeaumont quit (Ping timeout: 252 seconds)
13:53:34*relax joined #nim
13:55:35*smt` quit (Ping timeout: 258 seconds)
13:58:32FromGitter<Bennyelg> can I do something like this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d24607b59d55b82362f322]
14:02:16FromGitter<Bennyelg> well I switch to this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d246e7f7299e8f539b0dbc]
14:09:11*libman joined #nim
14:11:11FromGitter<Yardanico> well why not?
14:11:25FromGitter<Yardanico> btw you can use first example
14:11:31FromGitter<Yardanico> if you change newSeq to newSeqOfCap
14:12:07FromGitter<Yardanico> but I mean that you made these models yourself
14:12:09FromGitter<Bennyelg> I didnt knew that and eventually I ended up with: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d24938b59d55b8236306f5]
14:12:20FromGitter<Yardanico> it's not very efficient
14:12:29FromGitter<Yardanico> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d2494c614889d4756637a0]
14:12:29FromGitter<Bennyelg> the last one?
14:12:33FromGitter<Yardanico> yeah
14:12:59FromGitter<Bennyelg> So I'll probably need to use seqOfCap ?
14:13:22FromGitter<Yardanico> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d24982b20c642429b2d5bf]
14:13:45FromGitter<Bennyelg> oh yea you right I should get used to the result :D
14:14:45FromGitter<Yardanico> ah
14:15:02FromGitter<Yardanico> change newSeqOfCap(categorySeq.len) to newSeqOfCapCategory (categorySeq.len)
14:15:11FromGitter<Bennyelg> I know
14:15:12*PMunch_ joined #nim
14:15:14FromGitter<Bennyelg> I did already :]
14:15:19FromGitter<Yardanico> ok
14:15:23FromGitter<Bennyelg> thanks!
14:17:35*PMunch quit (Ping timeout: 248 seconds)
14:23:34*relax quit (Ping timeout: 258 seconds)
14:25:30*PMunch_ quit (Quit: Leaving)
14:25:39*PMunch joined #nim
14:36:39*gokr joined #nim
14:38:09*PMunch quit (Quit: Leaving)
14:39:36*relax joined #nim
14:47:22*gangstacat quit (Quit: Ĝis!)
14:56:15*PMunch joined #nim
14:58:29PMunchHaha, some company just sent a free sample to my "company" of a custom pen. It's actually a pretty neat pen, and it's got my name on it :P
14:59:25*gangstacat joined #nim
15:06:33*gangstacat quit (Quit: Ĝis!)
15:17:03*gokr quit (Read error: Connection reset by peer)
15:19:04FromGitter<mratsim> Msc PMunch cruise company?
15:19:36PMunchHaha, not quite. It's "<last name> IT Konsult"
15:21:04*gangstacat joined #nim
15:27:57*endragor quit (Remote host closed the connection)
15:28:24*endragor joined #nim
15:28:43*TjYoco quit (Remote host closed the connection)
15:29:08*TjYoco joined #nim
15:29:17*TjYoco quit (Client Quit)
15:29:33*francisl joined #nim
15:30:37*endragor_ joined #nim
15:32:49*endragor quit (Ping timeout: 248 seconds)
15:35:15*endragor_ quit (Ping timeout: 258 seconds)
15:36:00FromGitter<ephja> "konsult"? what language?
15:36:12*miran joined #nim
15:38:11PMunchNorwegian
15:38:41PMunchKonsult is a Consulting business
15:40:51*Jesin quit (Quit: Leaving)
15:42:10dom96This is a pretty good article https://blog.merovius.de/2017/09/12/diminishing-returns-of-static-typing.html#footnote1_back
15:42:22dom96oops: https://blog.merovius.de/2017/09/12/diminishing-returns-of-static-typing.html
15:42:26FromGitter<ephja> guleböj?
15:43:24*Jesin joined #nim
15:43:26PMunchHaha, you a Swede ephja?
15:43:33mirandom96: if only graphs were bigger / easier to read....
15:44:06PMunchmiran, Ctrl-<+>
15:44:36miranPMunch: text is getting bigger, pictures stay the same.... ;)
15:44:49PMunchThey got slightly bigger for me
15:45:05PMunchOh, they pop bigger at a certain lavel
15:45:07PMunchlevel*
15:45:36*abeaumont joined #nim
15:45:38miranoooh, true! it only happens at 190% zoom for me
15:47:52*xet7 quit (Quit: Leaving)
15:49:41FromGitter<ephja> PMunch: ofc
15:50:46*sz0 quit (Quit: Connection closed for inactivity)
15:54:03*endragor joined #nim
15:55:26*yglukhov quit (Remote host closed the connection)
15:58:16*fastrom quit (Quit: Leaving.)
16:02:19*relax quit (Ping timeout: 255 seconds)
16:05:17*Guest25476 joined #nim
16:06:00*couven92 joined #nim
16:06:42*solitudesf quit (Remote host closed the connection)
16:08:11*xet7 joined #nim
16:21:13*unclechu joined #nim
16:22:55*Arrrr quit (Ping timeout: 248 seconds)
16:23:26*Guest25476 quit (Quit: Guest25476)
16:23:42*Guest25476 joined #nim
16:27:11*dhalinar joined #nim
16:30:10*Jesin quit (Quit: Leaving)
16:32:56unclechuhey guys, is there any package manager for nim? where i could find some bindings to libraries?
16:33:04unclechuis there any bindings for dbus already?
16:33:14def-unclechu: hi. nimble
16:33:25def-https://github.com/zielmicha/nim-dbus
16:33:40*Jesin joined #nim
16:34:42FromGitter<Jipok> https://nimble.directory/search?query=dbus
16:34:55unclechuthanks
16:35:27unclechui couldn't find link to this on nim-lang.org, i think it should be added there
16:35:42unclechui mean link to nimble.directory
16:38:10FromGitter<Jipok> easier to use nimble, than a website
16:38:19FromGitter<Jipok> (https://files.gitter.im/nim-lang/Nim/8aJw/___________.png)
16:38:50federico3Jipok: the website provides hosted documentation
16:40:20*endragor_ joined #nim
16:43:13*endragor quit (Ping timeout: 248 seconds)
16:44:20*yglukhov joined #nim
16:48:51*yglukhov quit (Ping timeout: 258 seconds)
16:50:09*koranza joined #nim
16:51:49FromGitter<Yardanico> @dom96, also, about 2017 survey results: in "Reasons why respondents stopped using Nim" - “Compiler doesn’t conform to Unix traditions and outputs HUGE binaries.” is repeated twice :)
16:52:59dom96federico3: I've never seen the hosted docs working https://nimble.directory/docs/dbus :\
16:53:24*fastrom joined #nim
16:53:29FromGitter<Yardanico> also in "What critical libraries are missing in the Nim ecosystem?" some of libraries are already there :)
16:53:46FromGitter<Yardanico> e.g. Pandas like dataframes - NimData
16:53:56*Guest25476 quit (Ping timeout: 246 seconds)
16:54:05FromGitter<Yardanico> parsing - not sure what author meant, but there's a lot of parsers
16:54:12federico3dom96: ok, I'm going to chase that right now
16:54:34FromGitter<Yardanico> federico3: how hosted docs work?
16:54:38dom96Yardanico: I mentioned that I kept duplicates
16:54:46FromGitter<Yardanico> ah,ok
16:54:53FromGitter<Yardanico> federico3: you generate them for every file?
16:55:08federico3Yardanico it generates doc pages from upstream sources
16:55:10FromGitter<Yardanico> "Android support" also there :P
16:55:21*Guest25476 joined #nim
16:55:28FromGitter<Yardanico> "orm" - ormin
16:57:13*Demos joined #nim
16:57:26*Demos quit (Client Quit)
16:57:46*Demos joined #nim
16:57:51*Demos quit (Remote host closed the connection)
16:58:06FromGitter<mratsim> I guess awesome Nim needs to be updated so that people actually discover those critical libraries
16:58:11FromGitter<Yardanico> yeah
16:58:22AraqHUGE binaries? lol
16:58:40FromGitter<Yardanico> IDK :P
16:58:55FromGitter<Yardanico> maybe he compiled compiler in debug mode :D
16:59:05FromGitter<Yardanico> or he meant compiling programs?
16:59:17FromGitter<Yardanico> anyway probably he didn't knew about -d:release
16:59:56Araqdoesn't conform to Unix traditions? in what sense?
17:00:16*Demos joined #nim
17:00:18dom96Yes, there was a lot of misinformation
17:00:33dom96I decided to keep it to show you guys how prevalent it is
17:00:49*dhalinar quit (Ping timeout: 248 seconds)
17:00:54dom96(and I only kept it for "What critical libraries are missing in the Nim ecosystem?" actually)
17:01:19*Guest25476 quit (Ping timeout: 248 seconds)
17:02:24FromGitter<mratsim> when I try to go to nom-lang.org my browser autocomplete with the manual :/
17:02:29*koranza quit (Quit: leaving)
17:02:42Araq"nom-lang"?
17:02:52*koranza joined #nim
17:03:12FromGitter<Yardanico> he fixed that in gitter, sadly (or hopefully) IRC can't edit messages :D
17:05:43FromGitter<mratsim> :P
17:05:52FromGitter<mratsim> by the way, what is a "Bass audio library” ?
17:06:42FromGitter<Yardanico> http://www.un4seen.com/
17:06:53FromGitter<Yardanico> http://www.un4seen.com/bass.html
17:08:37FromGitter<mratsim> ah I see
17:09:53FromGitter<mratsim> "Lack of GOTO.” -> The C code is full of GOTO
17:10:18FromGitter<Yardanico> :D
17:10:28FromGitter<Yardanico> only bad programmer can say "lack of goto" :P
17:10:32FromGitter<Yardanico> (in nim)
17:12:18FromGitter<mratsim> My take away from this is to summon bluenote10 so that he can takes pandas for a ride
17:12:23FromGitter<genotrance> @Yardanico I did some work with bass
17:12:35FromGitter<genotrance> Anyone asking for a wrapper?
17:12:46FromGitter<mratsim> Someone did in the survey
17:12:58FromGitter<genotrance> Ok guess I need to do that
17:15:13*Sentreen quit (Ping timeout: 248 seconds)
17:20:53*Arrrr joined #nim
17:21:03*PMunch quit (Quit: leaving)
17:21:37FromGitter<andreaferretti> @Yardanico actually NimData is not very much like pandas
17:21:52FromGitter<andreaferretti> The whole point of pandas is that it is a columnar store
17:22:20FromGitter<andreaferretti> dataframes are essentially hashmaps from column names to sequences of data
17:22:36FromGitter<andreaferretti> SoA vs AoS in C++ parlance
17:22:47FromGitter<andreaferretti> NimData is just abstractions over sequences
17:22:57FromGitter<andreaferretti> More like a functional programming library
17:23:13FromGitter<andreaferretti> You get the usual map filter and so on
17:23:30*relax joined #nim
17:23:31FromGitter<andreaferretti> But the data is still stored as sequences of tuples
17:23:52FromGitter<andreaferretti> So it's fundamentally different from a dataframe
17:25:29FromGitter<mratsim> From a use case point of view, I think NimData could cover pandas use cases pretty well. Though it may have to switch to column vector instead of rows of tuples probably as most of the operations on a dataframe are on columns (mean, sum, count, etc …)
17:28:31*yglukhov joined #nim
17:28:57*Sentreen joined #nim
17:29:16*gokr joined #nim
17:35:22FromGitter<Jipok> 15 mentions of the GUI in "Nim Community Survey 2017"
17:35:37FromGitter<Jipok> niGui, nimx, gintro, libui?
17:36:15FromGitter<Jipok> on the other hand they are all raw and with a small number of components
17:38:07Araqgtk, wxWidgets... but most UI libraries are dying in the age of webapps
17:39:18*endragor joined #nim
17:40:36*endragor_ quit (Ping timeout: 258 seconds)
17:40:45*fastrom quit (Quit: Leaving.)
17:41:20FromGitter<Jipok> It seems that nimx supports a web application. But few components and lack of themes make me sad.
17:41:54*vivus joined #nim
17:44:11FromGitter<Jipok> By the way, is there a way to speed up the compilation of nimx applications? A dynamic library or something?
17:45:33AraqJipok, nimx is for games, for business apps I would use karax
17:45:38Araqwell I wrote karax, so there.
17:45:42*francisl quit (Quit: francisl)
17:47:46*gokr quit (Ping timeout: 264 seconds)
17:48:32FromGitter<Jipok> But it's only for web?
17:48:48FromGitter<Yardanico> " but most UI libraries are dying in the age of webapps"
17:49:20FromGitter<Yardanico> @Jipok sadly no until someone will revive and fix rod files :)
17:53:06*Demos quit (Quit: Demos)
17:53:23*Demos joined #nim
17:53:54FromGitter<zacharycarter> @Jipok - you can use zengine + nuklear + wasm :P
17:54:03FromGitter<zacharycarter> if you really want to get creative
17:54:18FromGitter<Yardanico> nimx supports web backend :)
17:54:29FromGitter<zacharycarter> true true
17:55:06FromGitter<genotrance> are the survey results posted for us to see?
17:56:03FromGitter<Yardanico> yes
17:56:09*Arrrr1 joined #nim
17:56:09*Arrrr quit (Disconnected by services)
17:56:11FromGitter<Yardanico> ah, no raw results if you mean them
17:57:31FromGitter<genotrance> oh it's posted to the blog
18:02:31*smt joined #nim
18:03:57Araqjipok: karax is web-only, yes
18:03:59*Arrrr1 quit (Ping timeout: 258 seconds)
18:10:16*vivus quit (Quit: Leaving)
18:18:49*Arrrr joined #nim
18:18:49*Arrrr quit (Changing host)
18:18:49*Arrrr joined #nim
18:21:01*zachk joined #nim
18:27:07*Demos quit (Quit: Demos)
18:27:26*Demos joined #nim
18:42:03*TjYoco joined #nim
18:45:07*Demos quit (Quit: Demos)
18:45:24*Demos joined #nim
18:46:43*Demos quit (Client Quit)
18:47:01*Demos joined #nim
18:47:07*Demos quit (Client Quit)
18:47:25*Guest52454 joined #nim
18:49:38FromGitter<Bennyelg> Hey I need cast date string to date object
18:49:42FromGitter<Bennyelg> what is the simplest way
18:55:12FromGitter<Bennyelg> I tried format("dd-MM-yyyy", "2017-08-09")
18:56:37*adeohluwa joined #nim
19:00:46dom96format?
19:00:51dom96You want to "parse"
19:00:56FromGitter<Bennyelg> *parse
19:01:03FromGitter<Bennyelg> but it dosn't work
19:01:33FromGitter<Bennyelg> got TimeInfo but expected distinct Timestamp
19:03:24FromGitter<Bennyelg>  toTime
19:04:09*francisl joined #nim
19:12:24FromGitter<Bennyelg> Assuming I have seq[User] how can i implement : ⏎ let users = seq[User] ⏎ users["Alex"] which will bring me "Alex" if he is present in the list of users?
19:12:45FromGitter<Yardanico> make your own overloaded procedure? :)
19:12:58FromGitter<Bennyelg> I tried to think about it
19:13:07FromGitter<Bennyelg> proc `[]` ?
19:13:20*okapi210 joined #nim
19:13:21FromGitter<Yardanico> yes
19:13:40FromGitter<Bennyelg> I did this: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59d28fe4b20c642429b48301]
19:13:43FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d28fe7177fb9fe7e2de021]
19:13:53FromGitter<Yardanico> change order of your arguments
19:14:04FromGitter<Bennyelg> is it matter ?
19:14:22FromGitter<Yardanico> yes, with yourobject["yourkey"] you firstly pass your object to your proc
19:14:27FromGitter<Yardanico> and only then yourkey
19:14:48FromGitter<Yardanico> try this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d29028614889d47567e5bd]
19:14:54FromGitter<Bennyelg> I was wondering how is it pass, thanks
19:20:27FromGitter<Yardanico> and order of argument always matters in almost all languages :)
19:21:31FromGitter<genotrance> I'm not able to access a file I've created within Nim from another process (execProcess) after I've closed it - is there any way to get Nim to free the resources?
19:21:34*solitudesf joined #nim
19:21:54FromGitter<Yardanico> @genotrance close(file) ?
19:21:58FromGitter<Yardanico> or file.close()
19:22:23FromGitter<Yardanico> ah, you've created it with another process
19:22:48FromGitter<genotrance> okay, nevermind, I think it is because I'm trying to run c2nim within my code and it is a .cmd file so not spawning
19:25:29*nsf quit (Quit: WeeChat 1.9)
19:27:05*nsf joined #nim
19:41:08*Guest52454 quit (Quit: Guest52454)
19:41:26*Guest52454 joined #nim
20:00:53*Guest52454 quit (Quit: Guest52454)
20:01:20*Demos joined #nim
20:05:58*Jesin quit (Quit: Leaving)
20:09:54zachkjust installed nim in msys2 from pacman, and am getting this compiling a simple file:
20:09:55zachkError: cannot open 'C:\msys64\mingw64\lib\system.nim'
20:10:01zachkhow do I resolve that
20:11:10*Jesin joined #nim
20:11:44ipjkmsys2 has an old version of nim
20:12:01ipjkand you have to be in bash, I presume.
20:19:35zachkim in an msys2 window and echo $SHELL says it's bash
20:19:56FromGitter<Yardanico> nim -v ?
20:20:07zachkhold on updating...
20:20:11Araqzachk: install Nim like the website says
20:22:29TjYocoIm trying out macros again: https://gist.github.com/Tyler-Yocolano/5bb593447efc894f30e3f32c2cbfec99 getting an Error. "request to generate code for .compileTime proc: parseStmt"
20:24:36Araqannotate findProc with {.compileTime.}
20:25:27TjYocoah, so obvious. It works. I have to read up on pragmas! not used to them.
20:30:51zachkNim Compiler Version 0.17.2 (2017-09-11) [Windows: amd64]
20:31:56FromGitter<genotrance> always get random failures with c2nim, hard to figure out what's wrong
20:32:47FromGitter<genotrance> ran it against this file: https://github.com/openssl/openssl/blob/master/include/openssl/sha.h ⏎ ⏎ Error: identifier expected, but found '[NewLine] (pxNewLine)
20:33:28*n0xff quit (Ping timeout: 240 seconds)
20:35:03*Trustable quit (Remote host closed the connection)
20:35:24*Demos quit (Quit: Demos)
20:35:30*n0xff joined #nim
20:35:43*Demos joined #nim
20:35:46*Demos quit (Remote host closed the connection)
20:36:02*Demos joined #nim
20:40:29*Jesin quit (Quit: Leaving)
20:43:35FromGitter<Yardanico> it's not perfect
20:43:41FromGitter<Yardanico> sometimes you need to edit header/C fil eby hand
20:43:46FromGitter<Yardanico> *file
20:44:03FromGitter<genotrance> i don't mind that, but what's the actual error here?
20:44:49FromGitter<genotrance> line 27, col 1
20:45:21*relax quit (Ping timeout: 248 seconds)
20:45:30*jaccarmac joined #nim
20:45:45*miran quit (Ping timeout: 258 seconds)
20:46:38jaccarmacI'm trying to track down a macro error due to a breaking compiler change. Bisected to the commit and know what caused it, but can't track down what part of the commit is causing the error and how to fix. Any tips for debugging hairy macro problems, perhaps some way to expand?
20:47:48jaccarmacI'm getting an error related to a quote form, the commit causing the problem is 61720e0df9475af647de171f6b2964c36234961a which doesn't seem to change quote.
20:48:15Araqjaccarmac: quote do used to produce an nnkStmtList with a single child
20:48:19Araqnow it doesn't anymore
20:48:39Araqin the code that means n[0] # skip nnkStmtList can be simplified to n
20:49:14Araqyou dont have to bisect things, you can ask me
20:49:35jaccarmacMy suspicion was it was that commit, just wanted to track it down and be sure ;)
20:49:46jaccarmacSo the error is a red herring then?
20:50:28jaccarmacProblem is the result from the quote gets assigned to a var and then appended to. So I need to create a nnkStmtList somehow still.
20:50:41jaccarmacAnd adding a discard void to the block to pad the macro or something blows up everything else.
20:51:16*TjYoco quit (Quit: Leaving)
20:53:27Araq'discard void' ? try 'discard 0'
20:53:51Araqyeah if you need a statement list, better create one
20:54:27jaccarmacHuh discard 0 works, what's up with that
20:54:29jaccarmacThanks for the help!
20:56:53Araqyou cannot discard types, only values
20:57:48Araqkaraxdsl now works in native code :D
20:59:06jaccarmacSo the one line in the quoted do form is a macro call. How do I expand that properly when I construct the statement list?
20:59:22jaccarmacNaively doing it just returns void instead of an ast so that doesnt work
20:59:27jaccarmacWait can I just use quote on the one form
21:00:16jaccarmacAnswered my own question, still want the code to work on 0.17.2 *and* devel though, hmmm
21:01:26Araqit's pretty easy
21:01:34Araqvar x = quote do: ...
21:01:48Araqif x.kind == nnkStmtList and x.len == 1: x = x[0]
21:01:58Araqresult = newStmtList()
21:02:02Araqresult.add x
21:02:09Araqresult.add moreStuffHere
21:02:23jaccarmacThankya
21:02:37FromGitter<genotrance> why doesn't c2nim like #define SHA_LONG unsigned int
21:03:50*koranza_ joined #nim
21:07:20*koranza quit (Ping timeout: 255 seconds)
21:13:41*banana33 joined #nim
21:14:52*francisl quit (Quit: francisl)
21:15:46banana33Any idea how I can make a simple global context object using Jester? I want to have some data that all the threads share
21:16:25*adeohluwa quit (Quit: Connection closed for inactivity)
21:20:33*solitudesf quit (Ping timeout: 248 seconds)
21:22:46*Vladar quit (Remote host closed the connection)
21:23:50dom96You need to create shared memory I guess
21:23:55dom96using createShared or whatever it's called
21:24:36jaccarmacAraq: Can newCall construct template/macro calls as well or only procs?
21:25:07*Elronnd quit (Ping timeout: 276 seconds)
21:25:11jaccarmaci.e. How do I construct an AST which contains macros
21:25:54*thmslld joined #nim
21:26:07AraqnewCall is actually very forgiving, I even use to construct type conversions
21:26:22jaccarmac\0/
21:26:29*Elronnd joined #nim
21:26:33Araqit's just f(a, b, ...) it's only syntax, not semantics
21:28:52*nsf quit (Quit: WeeChat 1.9)
21:29:13FromGitter<mratsim> Nim game dens, are you aware of this WebGPU API? https://en.wikipedia.org/wiki/WebGPU
21:29:34*banana33 quit (Ping timeout: 260 seconds)
21:29:35FromGitter<mratsim> devs*, autocorrect ….
21:29:46*Demos quit (Quit: Demos)
21:30:03*Demos joined #nim
21:30:07*francisl joined #nim
21:34:13jaccarmacAraq: Thanks again for all the help. Lib seems to be fixed, solution seems hacky and I'll let it ruminate and see what I can improve.
21:34:15*jaccarmac quit (Quit: ERC (IRC client for Emacs 25.3.1))
21:34:28Araqbtw guys karaxdsl now works in native code too, no more htmlgen
21:37:10*koranza_ quit (Quit: leaving)
21:40:30*Jesin joined #nim
21:42:10*Jesin quit (Remote host closed the connection)
21:45:51*Demos quit (Quit: Demos)
21:46:10*Demos joined #nim
21:49:51*Jesin joined #nim
22:00:23*ipjk quit (Read error: Connection reset by peer)
22:02:19*gangstacat quit (Ping timeout: 255 seconds)
22:03:03*Etheco quit (Read error: Connection reset by peer)
22:03:55*gangstacat joined #nim
22:10:08*Demos quit (Quit: Demos)
22:10:59*thmslld quit (Remote host closed the connection)
22:11:14*thmslld joined #nim
22:14:46*gangstacat quit (Ping timeout: 264 seconds)
22:22:51*Arrrr quit (Read error: Connection reset by peer)
22:23:14*gangstacat joined #nim
22:29:46*gangstacat quit (Ping timeout: 264 seconds)
22:30:13*francisl quit (Quit: francisl)
22:31:55*thmslld quit (Remote host closed the connection)
22:32:08*thmslld joined #nim
22:51:36*skrylar joined #nim
23:04:45koppeh1Mhh.. I just wanted to pick up a Nim project again (it's been a while) and ... for some reason sending to a channel is giving me a Stack Overflow..?
23:07:54FromGitter<genotrance> how do you do the equivalent of #define ABC DEF in Nim? I basically want to have one function with two names. Is this possible with const?
23:12:38skrylartemplate otherfunction(foo: bar) = firstfunction(foo)
23:13:40*def-pri-pub joined #nim
23:14:39*couven92 quit (Quit: Client Disconnecting)
23:14:45FromGitter<genotrance> thanks @skrylar, I'll try that out
23:24:49*def-pri-pub quit (Quit: Leaving.)
23:25:54koppeh1Stack overflow due to storeAux being called recursively it seems..?
23:35:40koppeh1I guess that's due to the thing deep copied. And there is actually a recursive reference in the object I'm passing.
23:36:58zachkwhat do I need to import to use newStringOfCaps ?
23:38:56FromGitter<ephja> zachk: Cap, not Caps; and it's defined in the 'system' module so you don't have to import anything
23:39:33zachkephja, thank you :D