<< 26-08-2017 >>

00:03:38*mahmudov joined #nim
00:03:50FromGitter<BontaVlad> content
00:11:23PMunchHaha, now I just picture people talking about strings being content :P
00:14:12FromGitter<Varriount> Happy strings are strings with more than zero characters. :D
00:20:01*arnetheduck joined #nim
00:21:24*couven92 quit (Quit: Client Disconnecting)
00:21:27*Matthias247 quit (Read error: Connection reset by peer)
00:33:07PMunchAre string happier the longer they are?
00:33:23PMunchOr is there a middle ground for string length vs. happiness
00:46:21*pilne joined #nim
00:49:56*PMunch quit (Quit: leaving)
00:52:07*gangstacat joined #nim
00:53:20*xet7 quit (Quit: Leaving)
01:07:08*chemist69 quit (Ping timeout: 240 seconds)
01:21:04*chemist69 joined #nim
01:25:19*endragor joined #nim
01:35:24*Nobabs27 joined #nim
01:42:00*Nobabs27 quit (Quit: Leaving)
01:44:35*Nobabs27 joined #nim
01:54:11*endragor quit (Remote host closed the connection)
02:02:21*gangstacat quit (Quit: Leaving)
02:02:50*linsword13 joined #nim
02:03:43*BitPuffin|osx quit (Ping timeout: 248 seconds)
02:05:05*endragor joined #nim
02:24:17*sz0 quit (Quit: Connection closed for inactivity)
02:37:01*dddddd quit (Ping timeout: 240 seconds)
02:57:24*yglukhov joined #nim
02:59:32*linsword13 quit (Quit: WeeChat 1.9)
02:59:53*linsword13 joined #nim
03:02:57*yglukhov quit (Ping timeout: 248 seconds)
03:17:37*haha_ joined #nim
03:20:30*haha_ quit (Client Quit)
03:21:09*linsword13 quit (Quit: WeeChat 1.9)
03:21:57*endragor quit (Remote host closed the connection)
03:27:59*vivus quit (Quit: Leaving)
03:37:39*Ven`` joined #nim
03:43:59*Ven`` quit (Ping timeout: 248 seconds)
04:22:29*endragor joined #nim
04:26:18*Nobabs27 quit (Quit: Leaving)
04:27:27*endragor quit (Ping timeout: 252 seconds)
04:35:12FromGitter<citycide> is there a way to set the output file name when using `nimble build`? using the `-o:dist/file` flag doesn't seem to do anything
04:54:46*gangstacat joined #nim
05:00:29*yglukhov joined #nim
05:03:51*mahmudov quit (Remote host closed the connection)
05:04:51*yglukhov quit (Ping timeout: 252 seconds)
05:22:58*pilne quit (Quit: Quitting!)
06:28:14*sleepyqt joined #nim
07:02:23*yglukhov joined #nim
07:02:53*endragor joined #nim
07:06:41*yglukhov quit (Ping timeout: 248 seconds)
07:07:59*Trustable joined #nim
07:25:43*Yardanico joined #nim
07:26:42*Trustable quit (Remote host closed the connection)
07:34:37*gangstacat quit (Quit: Leaving)
07:42:05YardanicoHow do I make nimble project structure where I "src" directory, pylib.nim in this folder, and also private directory in "src"?
07:42:13Yardanicopylib.nim imports all modules from private directory
07:42:21Yardaniconimble says
07:42:21YardanicoPackage 'pylib' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'pylib', but file 'pyclass.nim' is in a directory named 'private' instead. This will be an error in the future
07:42:55Yardanicoah, I really need to put them in "pylib" directory
07:42:56Yardanicooh
07:43:30Yardanicohmm, still not clear
07:45:34*ftsf joined #nim
07:48:08FromGitter<Yardanico> (https://files.gitter.im/nim-lang/Nim/Yh4v/image.png)
07:48:11FromGitter<Yardanico> What is wrong here?
07:48:13FromGitter<Yardanico> (https://files.gitter.im/nim-lang/Nim/VSJn/image.png)
07:48:17FromGitter<Yardanico> (https://files.gitter.im/nim-lang/Nim/PQHp/image.png)
07:49:20Yardanicoif I remove "srcDir" from nimble - package installs, but I can't import it
07:51:33Yardanicoah, ok
07:51:38Yardanicoso nimble doesn't support this
07:51:56YardanicoI either place pylib.nim in root directory, or "import pylib/pylib"
07:56:19FromGitter<stisa> Yardanico: try the last structure listed here https://gist.github.com/stisa/09474a952a420448778685507d3fbd51
07:58:26*endragor quit (Remote host closed the connection)
07:59:58Yardanicostisa: thanks!
08:00:20YardanicoMaybe we should add this to nim/nimble wiki?
08:02:32FromGitter<stisa> I think they are in nimble readme, just scattered between sections
08:03:54Yardanicodom96, https://github.com/nim-lang/packages/pull/573
08:04:08*endragor joined #nim
08:09:06*endragor quit (Ping timeout: 252 seconds)
08:10:24*xet7 joined #nim
08:14:11*Vladar joined #nim
08:17:35Yardanicohmmm
08:17:47Yardanicoit seems I can't call "range" iterator from another module
08:17:52Yardanicobecause it clashes with system.range
08:17:58*endragor joined #nim
08:18:03Yardanicobut if I include this module - everything works fine
08:18:37YardanicoI mean I can call range(start, stop)
08:18:41Yardanicobut I can't call range(stop)
08:19:41YardanicoI don't see why
08:22:06Yardanicohttps://gist.github.com/Yardanico/a1b714f921c2b8cab8210902620d84c0
08:22:23*endragor quit (Ping timeout: 248 seconds)
08:22:25Yardanicoreplace import with include - it works. but I can't use include sadly
08:22:37Yardanicobecause it would insert module in all source files
08:25:12*yglukhov joined #nim
08:29:04*endragor joined #nim
08:31:32Yardanicocan this be considered as a bug?
08:36:38*endragor quit (Remote host closed the connection)
08:39:20*yglukhov quit (Remote host closed the connection)
08:41:23*endragor joined #nim
08:43:45*chemist69 quit (Ping timeout: 252 seconds)
08:53:27*endragor quit (Remote host closed the connection)
08:55:44Yardanicook, for now I'll use include
08:57:32*chemist69 joined #nim
08:57:52*yglukhov joined #nim
08:59:34*endragor joined #nim
09:04:01*endragor quit (Ping timeout: 248 seconds)
09:04:47*couven92 joined #nim
09:05:39*vlad1777d joined #nim
09:15:27*endragor joined #nim
09:17:45*yglukhov quit (Remote host closed the connection)
09:19:48*yglukhov joined #nim
09:20:01*endragor quit (Ping timeout: 255 seconds)
09:20:57*yglukhov quit (Remote host closed the connection)
09:23:10*endragor joined #nim
09:37:57*Matthias247 joined #nim
09:42:51*endragor quit (Remote host closed the connection)
09:45:43*aziz joined #nim
09:45:54*aziz quit (Client Quit)
10:08:14*Yardanico quit (Remote host closed the connection)
10:11:49*Yardanico joined #nim
10:14:03*endragor joined #nim
10:35:34*endragor quit (Remote host closed the connection)
10:35:53*Matthias247 quit (Read error: Connection reset by peer)
10:38:54FromGitter<dom96> @citycide use ``binDir`` (see nimble readme for details)
10:41:10*BitPuffin|osx joined #nim
10:41:50FromGitter<BigEpsilon> Hi, just a little question: is it possible to merge these two templates into one ? the only thins that distinguish them is the "varness": ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a1506e578b44a046ed7d2a]
10:42:29*Yardanico quit (Remote host closed the connection)
10:46:57FromGitter<Yardanico> You don't need var template
10:47:35FromGitter<Yardanico> If you have a template which accepts array, it will accept var array too
10:48:19*Arrrr joined #nim
10:50:16FromGitter<BigEpsilon> ah yes sorry I thought by implemeting the [] operator vor var array I'll implement the []= operator at the same time
10:50:38FromGitter<BigEpsilon> but it is not the case I've just seen
10:52:24FromGitter<BigEpsilon> thanks !
10:56:46*Ven`` joined #nim
10:59:37*dddddd_ joined #nim
11:01:06*endragor joined #nim
11:12:42*dddddd_ quit (Ping timeout: 260 seconds)
11:15:41*Trustable joined #nim
11:18:45*endragor quit (Remote host closed the connection)
11:25:05*dddddd_ joined #nim
11:26:33*endragor joined #nim
11:31:17*endragor quit (Ping timeout: 240 seconds)
11:49:47*sleepyqt quit (Quit: WeeChat 1.9)
12:03:24*nattefrost joined #nim
12:07:44*Yardanico joined #nim
12:13:03Yardanicook it's time to try to use circle ci :) never used it before
12:16:50*mahmudov joined #nim
12:19:52*endragor joined #nim
12:22:50*relax joined #nim
12:24:18*endragor quit (Ping timeout: 252 seconds)
12:41:35*relax quit (Ping timeout: 248 seconds)
12:42:55dom96hrm, the 'var', 'let' and 'const' predicates don't seem to work in macros:
12:42:56dom96macro `...`(props: untyped{let | var | const}): untyped =
12:43:23federico3 Yardanico: https://github.com/nim-lang/Nim/wiki/BuildServices
12:43:41Yardanicofederico3, but there's only config using docker and circleci v1.0
12:43:51YardanicoI want to build for devel :)
12:44:04federico3docker?
12:44:06Yardanicoah, no, it's actually version 2
12:44:14Yardanicofederico3, there's no docker image for nim devel
12:44:15Yardanicosadly
12:44:31federico3Yardanico: those examples are not using docker
12:44:49Yardanicofederico3, ehm?
12:45:28Yardanicobut it says "docker image nimlang/nim"
12:47:24Yardanicoyeah
12:47:30YardanicoIt's building for 0.17.0
12:47:36YardanicoError: undeclared identifier: 'newCommentStmtNode'
12:47:48Yardanicothis procedure wasn't available in 0.17.0
12:48:55federico3oh I see the change from euantor
12:49:54*PMunch joined #nim
12:51:26federico3Yardanico: I'll update the wiki
12:55:03dom96bah, is there no way to get the type of an ident?
12:59:01dom96oh, I see. The parameter must be `typed` to get a sym.
12:59:19dom96Then you can look up the type of a Sym using getType :)
13:00:02Yardanicodom96, doing something interesting?
13:00:16dom96Creating a spread operator macro (`...`)
13:00:26dom96To perhaps show off in my talk :)
13:02:18*haha_ joined #nim
13:05:26*Arrrr quit (Quit: Leaving.)
13:06:16YardanicoWant a funny thing? In english wiki Nim examples are "valid as of Nim 0.13.0". They're actually valid now too, but no one changed this :) Well, I've changed it, but in russian wiki
13:06:24YardanicoI'll change it here too
13:10:25*xet7 quit (Quit: Leaving)
13:22:19dom96sadly this spread operator doesn't seem possible :\
13:24:25dom96sadly this spread operator doesn't seem possible :\
13:24:29dom96oops
13:32:03dom96Tried both nnkMetaNode and nnkArgList
13:32:21dom96This has reached a point where IMO the compiler should support it:
13:32:22dom96Error: invalid expression: 'myProps.name, myProps.age'
13:32:42dom96I wonder what this MetaNode thing is
13:33:06dom96Sounds ominous
13:36:31*couven92 quit (Ping timeout: 248 seconds)
13:39:02dom96Screw it, let's hack the compiler
13:40:31*PMunch quit (Quit: leaving)
13:40:50*PMunch joined #nim
13:41:16PMunchSpread operator?
13:43:02*haha_ quit (Quit: haha_)
13:45:29dom96https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Spread_operator
13:53:58*couven92 joined #nim
14:00:10PMunchAah
14:00:14PMunchYeah that would be practical
14:02:14dom96Hopefully Araq will show up here soon.
14:02:37dom96Araq: how do I make the compiler accept: procCall(nnkArgList(arg1, arg2))?
14:02:53dom96or is there a better node I could put my args into?
14:05:51*Sentreen quit (Ping timeout: 248 seconds)
14:07:48federico3Yardanico: https://github.com/FedericoCeratto/nim-package-directory/blob/circleci2.0/.circleci/config.yml
14:07:57Yardanicofederico3, thanks!
14:08:03federico3just a little preview
14:08:08*endragor joined #nim
14:09:52Yardanicolol :D https://gist.github.com/Yardanico/1fa55be3fe9f080b74ab7c03a7c7a162
14:09:57Yardanicoscroll to line 58
14:10:43Yardanicoit seems that nim is *very* close to python syntax
14:11:05Yardanicoif nim compiler can parse this python code as Nim AST
14:11:38Yardanicobut I need to use pylib.int
14:11:53Yardanicobecause I either would need to traverse all nodes to change "int" to something like "toInt"
14:12:10Yardanicobecause if "int" template is imported (or included) from another file - nim uses only system.int
14:14:10Yardaniconow I really believe that "Nim's syntax is flexible enough"
14:16:22*haha_ joined #nim
14:17:20Yardanicoit seems that I've better understanding of nim macros now
14:19:43*Sentreen joined #nim
14:23:41*dddddd_ quit (Remote host closed the connection)
14:25:17Yardanicotonim is very small macro, it mostly uses my previous macro to generate procedure
14:26:55*vlad1777d quit (Ping timeout: 255 seconds)
14:31:26*def-pri-pub joined #nim
14:34:09FromGitter<zacharycarter> morning
14:34:45FromGitter<krux02> it's afternoon here
14:35:44Yardanicohere too
14:35:51Yardanicotimezones are funny :)
14:35:52FromGitter<zacharycarter> you crazy Euros
14:35:55Yardanicoyeah
14:36:21FromGitter<krux02> there is gamescom in the city
14:36:25Yardanicowow
14:36:29FromGitter<zacharycarter> awesome
14:38:02def-pri-pubzacharycarter: morning
14:38:37FromGitter<krux02> gamescom is very crowded
14:38:47Yardanicoit's 17:38 here btw
14:38:56Yardanico5:38 PM* for non euros :)
14:39:01def-pri-pubDidn't Mrs. Merkel open up the conference?
14:39:13FromGitter<krux02> well she did
14:39:19FromGitter<krux02> there are elections soon
14:39:21FromGitter<krux02> so yea
14:39:49*vlad1777d joined #nim
14:39:51FromGitter<krux02> and oh wonder politishens are interested in gamescom
14:39:59def-pri-pubAh, I was wondering why the benign queen of Europe did that.
14:40:26FromGitter<krux02> yea election, I already have the election notification
14:40:49*nhywyll joined #nim
14:43:49*endragor quit (Remote host closed the connection)
14:44:24FromGitter<zacharycarter> hey def-pri-pub
14:44:51FromGitter<zacharycarter> still working on that ortho camera example - I found a bug in matrix math in zgl.nim that I'm trying to sort out
14:45:10def-pri-pubGotcha
14:45:35def-pri-pubI've taken a little bit of a break for the past few days to work on some other projects, but for the most part I think that .zsprite file parsing is done
14:45:53def-pri-pubThen next step for me is to write the `SpriteBatch` and rendering code.
14:45:56FromGitter<zacharycarter> :D yeah I haven't been giving zengine as much time as I'd like either
14:46:12def-pri-pubMy problem is that I try to juggle too many thins.
14:46:18def-pri-pubthings*
14:46:30def-pri-pubToo many things I want to do... too little time...
14:46:36FromGitter<zacharycarter> I know the feeling
14:47:14FromGitter<krux02> just buy a self duplicating machine
14:47:27YardanicoI don't know why, but macros for me are more understandable than things like metaclasses, abstract classes etc
14:47:28def-pri-pubI was joking with one of my friends who had the same problem that he should switch to the Uberman sleep schedule and only drink soylent for meals.
14:47:47FromGitter<zacharycarter> gross
14:47:57FromGitter<krux02> I think in Stargate there was a guy who selfduplicated himself a lot to become more powerful, but then he realized that he couldn't live with himself
14:48:11def-pri-pubProblem with uberman is if you skip sleep you'll probably die.
14:48:14FromGitter<zacharycarter> I loved stargate I've seen every episode
14:48:27ehmryits not a good idea, code doesn't get better the longer you sit and write it
14:48:34*Arrrr joined #nim
14:48:46dom96Yardanico: You should build on jboy's work :)
14:48:51FromGitter<krux02> I am currently rewatching tha last two seasons with the Ori
14:48:53def-pri-pubAs for soylent, I've only had one bottle in my life. Mixxed it with Nutella after trying it plain; Plain = gross.
14:49:28FromGitter<zacharycarter> we need a graphql nim library
14:49:30Yardanicodom96, but nim-pymod has opposite goal
14:49:35dom96krux02: Araq went to gamescom, is it still on today?
14:49:42FromGitter<krux02> If you saw the movie "Soylent Green" then the idea of that as food is pretty gross
14:49:44dom96Maybe that's why he's been away
14:50:00FromGitter<krux02> yes the entire weekend
14:50:06FromGitter<zacharycarter> I just have no idea how to go about starting one
14:50:15dom96krux02: pretty sure it was on before as well.
14:50:21FromGitter<zacharycarter> the JS example implementation scares me
14:50:26def-pri-pubWell, there are other problems that sticking to a soylet only diet causes. 1. Some sort of vitamin deficcienty. 2. Poop.
14:50:30dom96zacharycarter: see how it's implemented in Python
14:50:41FromGitter<zacharycarter> ooo that's a good idea @dom96
14:50:45Yardanicowell python can be a bit noisy too :D
14:50:51FromGitter<zacharycarter> I do think a graphql library for Nim would help improve it's visibility
14:50:52Yardanicobecause we have templates and macros in nim :)
14:51:20dom96Yardanico: Well do whatever you love doing, but we could use an easy way to bridge Nim <-> Python (both ways)
14:51:36FromGitter<krux02> I don't have the experience, but doesn't python also have metaprogramming?
14:51:41dom96I'm not sure how well the existing packages work for that.
14:51:47FromGitter<zacharycarter> https://github.com/graphql-python/graphql-core/blob/master/graphql/language/ast.py
14:51:52Yardanicokrux02: yes it does, but it seems that it's very limited
14:51:57FromGitter<zacharycarter> doesn't look any better
14:52:27Yardanicowhy they need to implement this? lol
14:52:28Yardanicohttps://github.com/graphql-python/graphql-core/blob/master/graphql/language/ast.py#L181
14:52:28federico3Yardanico: https://github.com/FedericoCeratto/nim-package-directory/blob/circleci2.0/.circleci/config.yml - now the caching works
14:52:53FromGitter<krux02> I like the nim patter to write a generic proc that then calls a macro to instanciate it.
14:52:56YardanicoIt seems that ast.py is auto-generated, isn't it?
14:53:04FromGitter<zacharycarter> I don't think so Yardanico
14:53:08Yardanicoohh
14:53:11dom96zacharycarter: I guess you need to implement a graphql parser D:
14:53:17dom96That makes sense.
14:53:19FromGitter<zacharycarter> yeah :/
14:53:25Yardanicofederico3, much thanks!
14:53:30dom96Nim is very good at parser though
14:53:34dom96So you shouldn't have trouble.
14:53:45dom96And you'll be able to make it work at compile-time which will be awesome
14:54:25FromGitter<zacharycarter> I need to find one written in a sane language
14:54:28Yardaniconim is the first language where I learned what metaprogramming and compile-time execution is
14:54:38FromGitter<zacharycarter> so I can understand how one actually works / needs to function
14:54:39Yardanicobecause I've used only python before :D
14:54:45def-pri-pubI know that Nim has built in zlib bindings, but is there a pure Nim implementation of compression/decompression code out there?
14:55:05Yardanicodef-pri-pub, I don't think so, I didn't find any pure-nim LZMA
14:55:15Yardanicoso I created a simple binding for easylzma
14:55:22federico3Yardanico: updated https://github.com/nim-lang/Nim/wiki/BuildServices
14:55:28dom96There is one out there somewhere
14:55:38dom96in the nimPDF package IIRC
14:55:45FromGitter<zacharycarter> someone wrote one I thought
14:55:48FromGitter<zacharycarter> not too long ago
14:55:54FromGitter<zacharycarter> unless it was encryption / decryption
14:55:57FromGitter<zacharycarter> I'm thinking of
14:56:31dom96My untar package links zlib on Windows statically: https://github.com/dom96/untar
14:57:01Yardanicowell yeah, my lzma binding just uses {.compile.} statement :P
14:57:15Yardanicohttps://github.com/Yardanico/nim-osureplay/blob/master/src/lzma.nim
14:57:37Yardanicobut sadly github nim highlighting is broken here
14:57:48dom96lol
14:57:55dom96Nimble really needs to support these C libraries
14:58:00FromGitter<stisa> def-pri-pub https://github.com/jangko/nimPNG/blob/master/private/nimz.nim is a deflate implementation I think
14:58:31dom96oh yeah, nimPNG is what I was thinking of not nimPDF
15:03:51*rauss joined #nim
15:11:09*vlad1777d quit (Remote host closed the connection)
15:13:09*yglukhov joined #nim
15:32:37*yglukhov quit (Remote host closed the connection)
15:44:19*def-pri-pub quit (Quit: leaving)
15:53:51*arnetheduck quit (Ping timeout: 252 seconds)
16:01:29*Jesin quit (Quit: Leaving)
16:05:59federico3Yardanico: I really miss Python's ability to extract the first or last N items of a sequence *if present*
16:06:40*yglukhov joined #nim
16:09:20Yardanicofederico3, ah, slices?
16:14:02*Jesin joined #nim
16:26:06*Nikky joined #nim
16:26:15*sleepyqt joined #nim
16:32:08*haha_ quit (Quit: haha_)
16:35:09*haha_ joined #nim
16:36:05*Ven`` quit (Ping timeout: 240 seconds)
16:37:25FromGitter<citycide> @dom96 `binDir` works but I was hoping to be able to have a different output for various cross compiled binaries
16:37:56dom96citycide: you should be able to use `nimble c --out:...` for that
16:38:31FromGitter<citycide> ah I see. I did end up using `nim c`. is there a difference in the two?
16:41:21Nikkyi am trying to use libui with nim
16:42:05Nikkyi am not very familliar with nim and nimble.. but i assume just `nimble install ui` an then running the provided examples should work ?
16:43:32Nikkywhen i just install ui and try to use it.. https://ptpb.pw/ziMw
16:43:47*Matthias247 joined #nim
16:43:56Nikkywhen i clone ui and libui and execute the examples as instructed in the readme
16:44:03Nikkyhttps://ptpb.pw/8_3q
16:44:47Nikkythe latter looks a lot better but i am not sure what std_lib is
16:45:11Nikky*stdlib_
16:45:17Nikkyor where its supposed to be
16:46:28Nikkyi am on archlinux btw
16:47:47*nattefrost quit (Remote host closed the connection)
16:49:55PMunchNikky nim --version
16:54:47YardanicoPMunch, well arch has nim 0.17.0 in repos (not in aur)
16:54:54PMunchYeah I know
16:55:18PMunchI was bugging them about updating, they had some horrible outdated version before
16:55:35Yardanicowell there's always aur :)
16:55:45PMunchOr source :)
16:55:47Nikkyits 0.17.0
16:55:55YardanicoNikky, hmm
16:55:59PMunchHmm, this is strange
16:56:05*def-pri-pub joined #nim
16:56:05*def-pri-pub quit (Changing host)
16:56:05*def-pri-pub joined #nim
16:56:09Nikkyand a friend helped me point at nim c -r -d:useLibUiDll uitests.nim
16:56:12PMunchI managed to run it fine before. But now I'm getting the same issues as you
16:56:15Nikkynow there is just a single error
16:56:23Yardanicosadly Araq isn't here
16:56:36Araqhmm?
16:56:45Nikkyi hope the libui.so is the same version
16:56:48YardanicoAraq, oh, hi :)
16:56:57Nikkyhi i am tryin to use ui
16:57:05Nikkyor at least get the examples to run
16:57:12PMunchNikky, with that switch I was able to run controlgallery.nim to run
16:57:18PMunchBut not controlgallery2.nim
16:57:33YardanicoI'll try now
16:57:38Nikkyi am trying to run the snippet fro mthe readme.. i will try those examples next
16:58:12Yardanicowell I don't know
16:58:18YardanicoI have nim devel built by myself
16:58:21Yardanicoand everything works
16:58:26Yardanicoah, I used clang
16:58:28Yardanicolet me try with gcc
16:58:39Yardanicohmm, no, it still works
16:58:52YardanicoI'm on Antergos (basically Arch Linux). controlgallery2 just works
16:58:57PMunchHmm
16:58:58PMunchStrange
16:59:07PMunchI get could not import: uiMainSteps
16:59:17PMunchOn Manjaro (also basically Arch)
16:59:35Yardanicowell manjaro has a bit older packages than arch, but yeah, still not clear
16:59:41Nikkycontrollgallery.nim(4, 3) Error: cannot open '../ui/rawui'
16:59:56Nikkyi guess it needs to be along with the ui
17:00:05YardanicoNikky, did you read readme of the ui?
17:00:11PMunchYardanico, about a week or two :P Not something that should matter for this :P
17:00:18YardanicoNikky, https://github.com/nim-lang/ui
17:00:27Yardanicoyou need to ensure you have "libui" and "ui" in the same folder
17:00:54Nikkyi did and if i dod that without the -d:useLibUiDll flag it fails
17:01:22Nikkyeither failing for find ui_ stuff or stdlib
17:01:26PMunchYeah the -d:useLibUiDll should theoretically use the system installed .so file instead of the built one next to it
17:01:51Nikkywi will try to have ui, libui and the flag at once
17:01:52dom96citycide: `nimble` will verify that you've specified correct packages in your .nimble file.
17:02:31Nikkyalso something i noticed nimble complined aout example directories on other packages even though they were listed in ignored
17:02:49Nikkybut that is not related to this..
17:02:50PMunchAh
17:03:30PMunchI got it working by doing this http://ix.io/zqk
17:04:00Nikky-r does what on compile ?
17:04:04PMunchBasically do what the thing on the GitHub page said. But can't get it to work through Nimble
17:04:10PMunch-r just means run after compilation
17:04:18Nikkyah yes
17:07:51Nikkyehh
17:07:55Nikkyit.. works ?
17:08:14PMunchYou're not sure if it worked or not?
17:08:16Nikkyok well
17:08:23Nikkyit opened the window
17:08:28Nikkyi am not sure why
17:08:37Nikkybecause i am pretty sure i did the same before
17:08:43FromGitter<Yardanico> Well maybe there's some possibility to print a warning of user installs it from nimble?
17:08:52FromGitter<Yardanico> *if
17:10:22PMunchOh Yardanico, it was you who commented with me on the GenUI thing for nigui :)
17:10:52Araqwell I don't use nimble so I suppose my packages don't work well with nimble
17:11:34Yardanicoor maybe we should remove it from nimble for now
17:11:48YardanicoPMunch, yeah, I've changed my nickname like 3-5 days ago
17:12:00PMunchAaah, that's why it wasn't familiar :P
17:12:06PMunchWhat was it before again?
17:12:17PMunchT-something?
17:12:17YardanicoPMunch, Tiberium here, TiberiumN on Github
17:12:29PMunchAh yes
17:14:15Yardanicoalso it seems that you can't change nickname on many services
17:14:17Yardanicoreddit for example
17:14:47Yardanicowell that's not a big issue
17:15:47Yardanicowhat was the purpose of http://www.nimrod-code.org/ ?
17:15:58Yardanicosharing code snippets?
17:17:28PMunchYeah, some sites don't you like changing your name. Adds confusion to who's who I guess
17:18:14PMunchIRC as a protocol don't really have a concept of a registered user. So on some network it would be possible to force a netsplit and steal someones nick :P
17:18:48Yardanicowell I use passwords on freenode :)
17:18:55Yardaniconot the best ones, but still
17:19:20YardanicoPMunch, sometimes it's very useful - for example #python channel is available only for registered users
17:19:22PMunchHmm, I'd wish I could help more with NiGui, but I haven't really used the WinAPI so I would only be able to create the Linux side of the code..
17:19:35*def-pri-pub quit (Ping timeout: 240 seconds)
17:19:57dom96Yardanico: no, it was the original Nim website
17:19:57Yardanicoso they get a bit less spammers and trolls
17:20:00Yardanicodom96, ah
17:20:02PMunchYeah, and when you log on it tells you that your nick is registered and you need to identify :)
17:20:02FromGitter<krux02> which isn't that bad ‽
17:20:29PMunchWe get surprisingly few trolls in here actually
17:20:50PMunchApart from that one guy the other day
17:20:52FromGitter<krux02> yes we are the blessing to be very unknown
17:20:59PMunchHaha :P
17:21:31*krux02 joined #nim
17:21:43Yardanicounderground programming community :D
17:21:47krux02ok I just opened irc again
17:21:53*def-pri-pub joined #nim
17:21:53*def-pri-pub quit (Changing host)
17:21:53*def-pri-pub joined #nim
17:22:02krux02just for curiosity, what do you think is the best irc client?
17:22:11Yardanicokrux02, I don't know really, I just use HexChat on linux
17:22:14couven92krux02, HexChat
17:22:27couven92and AndIRC on Android
17:22:30PMunchYeah, HexChat is pretty good
17:22:42krux02I used hexchat, which was ok, but somehow also too much visual noise for a chat application, and this at the moment is just in irc integrated in emacs
17:23:03PMunchWell, HexChat is pretty customisable
17:23:13PMunchI've turned off much of the visual noise
17:23:13krux02yes I liked that hexchat actually kept the log after restart
17:23:47PMunchI've got the chat window with the time of each message, the list of users, and the channels I'm in
17:24:06couven92PMunch, I actually hide the user list :P
17:24:06krux02yea like emacs, but I am not really a fan of "customize before it is usable"
17:24:23krux02but yea it's free and it works
17:24:46couven92Pidgin actually also has built-in IRC support
17:24:49krux02the users list isn't that informative after all
17:25:08PMunchYeah, that's fair. I've just kept it at the default config from my Manjaro install :P
17:25:22PMunchI've got to say, it's got pretty good defaults for a lot of stuff
17:25:24krux02yay manjaro is on the rise
17:25:36krux02I think it is 3rd most popular linux distro I think?
17:25:38PMunchI've been using it for years. Really like it
17:25:53krux02This computer here is Arch
17:26:07krux02I have another computer at work that is Manjaro
17:26:19krux02I had little interest to go through the install of arch again
17:26:34Yardanicokrux02, I solved this problem by installing antergos
17:26:47Yardanicoit's literally arch with ubuntu-like installation
17:27:03Yardanicoand it uses pure arch repos + it's own repo for themes
17:27:48YardanicoPMunch, what font do you use? default one?
17:28:05PMunchInconsolata for anything Monospace
17:28:15PMunchAnd M+ 2p for most UI things
17:28:35PMunchWith a bit of Raleway thrown in whenever I have larger text
17:29:10krux02Terminus, best font ever :P
17:29:28krux02especially for low resolution screens
17:29:31krux02like my laptop
17:29:33*def-pri-pub quit (Ping timeout: 252 seconds)
17:29:55Yardanicohow many users here have OP?
17:29:58PMunchYeah it's been popping up quite a lot lately
17:30:13krux021280x800 and a lot of code visible, because of a very nice pixel font
17:30:22YardanicoPMunch, I've just asked :)
17:30:34PMunchNot sure really Yardanico
17:30:39krux02sorry people I made you go of topic :D
17:30:41PMunchNot a whole lot I think
17:31:09PMunchkrux02, no worries. I don't think we were talking about anything in particular
17:31:12*def-pri-pub joined #nim
17:31:13*def-pri-pub quit (Changing host)
17:31:13*def-pri-pub joined #nim
17:32:52*Yardanico left #nim ("Bye :)")
17:32:57*Yardanico joined #nim
17:33:24*Yardanico quit (Quit: Quit)
17:33:39*Yardanico joined #nim
17:34:01PMunchkrux02, Terminus looks a bit blocky
17:35:35*Arrrr quit (Ping timeout: 240 seconds)
17:35:45YardanicoPMunch, thanks about info on HexChat, I've disabled user list and moved channel list to the bottom
17:36:17PMunchOh yeah, forgot that was not default :)
17:36:21PMunchMuch better at the bottom
17:36:52PMunchEspecially for me who tend to keep HexChat on a standing monitor
17:37:51PMunchSpeaking of tools and things. Found a pretty cool editor the other day Kakoune
17:38:27PMunchIt's like Vim but built with multi-selections from the ground up
17:38:40PMunchIt's pretty neat
17:39:28Yardanicothere's also a neovim and electron based editor (I saw it on github trending):D
17:39:46PMunchElectron *shivers*
17:39:56Yardanicohttps://github.com/extr0py/oni
17:40:04YardanicoPMunch, well I still use VSCode as my main Nim editor
17:40:15PMunchI tend to use Sublime or Vim mostly
17:40:46Yardanicooh, it also uses react
17:40:55Yardanicofunny thing
17:41:03Yardanicogithub shows that 96.6% of it is Vim script
17:41:12Yardanicoah, it's neovim code
17:41:16PMunchHaha
17:42:45*nsf joined #nim
17:47:45Yardanicov cb
17:47:48Yardanicooops
18:01:07*dddddd joined #nim
18:07:48*def-pri-pub quit (Quit: leaving)
18:10:30FromGitter<Jipok> How to force to work nim with russian name of user in windows?
18:11:09Yardanicowell it's not a nim-only problem
18:11:17Yardanicopython has this problem with many pip packages too
18:11:22Yardanicomy suggestion: rename your account
18:11:32FromGitter<Jipok> i know, but how to fix?
18:11:45Yardanicorename your account?
18:12:14YardanicoA lot of programs have issues with username in unicode
18:12:29FromGitter<ephja> is it currently possible to get the underlying type of a range?
18:12:34FromGitter<Jipok> renaming account does not rename folder
18:13:08Yardanicoyou can still rename it yourself :)
18:13:14FromGitter<ephja> I'm trying to implements 'contains' for ranges which I think would be a good addition
18:13:22Yardanicoor cut + paste (this wouldn't do any copying)
18:13:38*dddddd quit (Ping timeout: 255 seconds)
18:14:10Yardanicowell really it probably *would* be possible to fix
18:14:17Yardanicobut how easy - I don't know
18:15:00Yardanicowell literally everyone recommends to don't use non-latin characters in windows usernames
18:15:24FromGitter<krux02> well a range is a type isn't it?
18:16:19Yardanicoyeah it is
18:16:27FromGitter<Jipok> except Microsoft
18:16:38Yardanicothey do it too :)
18:17:06Yardanicojust look at this:
18:17:06Yardanicohttps://www.google.ru/search?q=windows+non-english+username
18:17:16Yardanicoeveryone is having issues with non-english usernames
18:17:42PMunchWhat does Nim actually complain about?
18:18:24YardanicoPMunch, probably crashes
18:18:39YardanicoJipok - yeah, what's the exact error?
18:19:37FromGitter<ephja> @krux02 yes but it's an abstraction over some integer type
18:20:29FromGitter<ephja> I don't think there's a way so I'll have a look at the compiler code again
18:24:12*Yardanico quit (Remote host closed the connection)
18:26:47*dddddd joined #nim
18:31:54*linsword13 joined #nim
18:51:59*Arrrr joined #nim
18:51:59*Arrrr quit (Changing host)
18:51:59*Arrrr joined #nim
18:53:06*sz0 joined #nim
19:07:13*linsword13 quit (Quit: WeeChat 1.9)
19:10:05*Vladar quit (Quit: Leaving)
19:20:17*xet7 joined #nim
19:33:21*ludocode quit (Ping timeout: 248 seconds)
19:33:42*PMunch quit (Quit: leaving)
19:38:12*noctisdb joined #nim
19:40:46noctisdbHi there, is there an issue with the 32 bit Win installer and incompatability with nimble with 0.17.0
19:42:58noctisdbRephrase if it helps, 32 bit package installer, nimble.exe is not compatible with 32 bit operating system
19:54:51*programisto joined #nim
19:55:35programistohi. have read some about how nim can wrap c++ libraries; would it be possible to use something like bullet3d in nim?
19:56:09*xet7 quit (Remote host closed the connection)
20:01:46FromGitter<Yardanico> yes
20:18:35*couven92 quit (Ping timeout: 240 seconds)
20:20:25*qwertfisch quit (Remote host closed the connection)
20:25:21*qwertfisch joined #nim
20:26:10*haha_ quit (Quit: haha_)
20:31:09*haha_ joined #nim
20:39:52*gangstacat joined #nim
20:51:56*krux02 quit (Remote host closed the connection)
20:52:24noctisdbWell, looks like manually installing worked fine, not sure whats going on with the installer
20:59:06FromGitter<Yardanico> What installer did you use?
20:59:53FromGitter<Yardanico> Well it's deprecated and no longer maintained. Use choosenim (it has Windows binaries)
21:00:02FromGitter<Yardanico> Ehm
21:00:23FromGitter<Varriount> programisto: Certainly
21:04:13*francisl joined #nim
21:04:28*francisl quit (Client Quit)
21:05:37*francisl joined #nim
21:07:50FromGitter<Yardanico> Why JavaScript programmers put emojis in their projects readme?
21:08:34FromGitter<Yardanico> It's this a cool trend? Maybe we should add emojis to Nim readme? :D
21:10:47*francisl quit (Quit: francisl)
21:17:24*gangstacat quit (Quit: Leaving)
21:20:58*vivus joined #nim
21:22:17*Arrrr quit (Read error: Connection reset by peer)
21:26:00*haha_ quit (Quit: haha_)
21:27:31Nikkyok i so i continued playing with libui in in nim and the examples..
21:28:11Nikkywhen i use the shared library it cannot import some stuff.. eg. uiMainSteps
21:28:46*yglukhov quit (Read error: Connection reset by peer)
21:28:56Nikkywhen i use the shared library it cannot import some stuff.. eg. uiMainSteps
21:29:00Nikkyuups
21:29:19*yglukhov joined #nim
21:29:24Nikkytoy.nim does nothing apparently.. and does not even load when i try to use it with the dll
21:38:43FromGitter<citycide> trying to statically read a file, but when cross-compiling for windows the path doesn't work. is there a way to tell the difference between compiling & running *on* windows vs. compiling on linux *for* windows?
21:39:25FromGitter<Yardanico> Yes, use / procedure
21:39:36*Pisuke quit (Read error: Connection reset by peer)
21:39:45*ludocode joined #nim
21:39:45FromGitter<citycide> that doesn't work though, because it thinks it's actually on windows, and it's not
21:40:28FromGitter<Yardanico> Did you change --os?
21:40:36FromGitter<citycide> for cross compiling yes
21:40:43*Pisuke joined #nim
21:40:52FromGitter<Yardanico> You need to pass -d:windows --os:windows
21:41:27FromGitter<Yardanico> Well this may not work
21:41:32FromGitter<Yardanico> But you can try
21:42:04*francisl joined #nim
21:42:16FromGitter<Yardanico> Also you can just define some symbol like "crosswin", and make unix like path if it is defined
21:42:34FromGitter<citycide> how would I do the last part?
21:43:17FromGitter<Yardanico> Firstly pass -d:crosswin if you want to cross compile
21:43:27FromGitter<Yardanico> Then write code like this:
21:43:34FromGitter<Yardanico> ``````
21:43:37FromGitter<Yardanico> Oh
21:44:00FromGitter<Yardanico> when defined(crosswin):
21:44:05FromGitter<Yardanico> do stuff
21:44:11FromGitter<citycide> ah I see. wasn't aware that's all `-d` did
21:44:17FromGitter<citycide> makes total sense now heh
21:44:58FromGitter<Yardanico> AFAIK it just defines a symbol
21:45:39FromGitter<Yardanico> nim c -d:hiImADefine example
21:45:46FromGitter<Yardanico> Would compile as usual
21:46:22FromGitter<Yardanico> Also your can omit .nim extension while calling the compiler
21:46:31FromGitter<Yardanico> e.g nim c -r hello
21:46:41FromGitter<Yardanico> Instead of hello.nim
21:47:49FromGitter<citycide> yeah
21:48:08FromGitter<ephja> Nikky: have you defined useLibUiDll?
21:48:41Nikkyi tried with that and without
21:48:51Nikkywhen its defined it does not find the step thing
21:49:15Nikkywhen its defined it loads and does nothing (toys.nim)
21:49:23FromGitter<ephja> I can't figure out what might be the cause by looking at the bindings and the code for the original library
21:49:43*sz0 quit (Quit: Connection closed for inactivity)
21:50:48FromGitter<ephja> "On Windows currently Visual Studio is required, so you need to use" not sure if that's relevant. I'm guessing you will simply get a compilation error if you don't use that compiler
21:51:38FromGitter<Yardanico> He's on arch iirv
21:51:40FromGitter<Yardanico> Iirc
21:55:28*couven92 joined #nim
21:55:44*yglukhov quit (Remote host closed the connection)
21:56:18*yglukhov joined #nim
21:57:50*francisl quit (Quit: francisl)
21:58:39*francisl joined #nim
21:59:21*Trustable quit (Remote host closed the connection)
22:00:31*yglukhov quit (Ping timeout: 248 seconds)
22:04:25*literal left #nim (#nim)
22:06:50Nikkywell it does not matter right now.. we wil try to use it and see what breaks
22:07:14Nikkythen i come back and complain to Araq :P
22:10:06*nhywyll quit (Quit: nhywyll)
22:12:44*francisl quit (Quit: francisl)
22:18:49*qwertfisch quit (Quit: ZNC - http://znc.in)
22:21:37FromGitter<adamrezich> nim noob here, making a game engine as I learn the language—how do I do the equivalent of a C++ placement new, i.e. instantiate an object at a specified preallocated memory address?
22:24:26dom96why do you want to do that?
22:28:11FromGitter<adamrezich> engine efficiency. it's complex, but I have a data-driven component-based engine design (that I've made with C++ before) where component instances of the same type are stored in contiguous arrays, so they can be iterated through quickly each frame. i.e. to process physics, quickly iterate through an array of RigidBody components instead of iterating through every object and processing its RigidBody component if it
22:28:11FromGitter... has one
22:32:45*qwertfisch joined #nim
22:33:24*Ven`` joined #nim
22:36:07FromGitter<ephja> `castptr T (address)[] = initT()`? I don't think that will result in a copy, but if it does then another approach would be to define a function that takes a pointer
22:36:58FromGitter<Yardanico> noinit array?
22:38:00FromGitter<ephja> or a sequence
22:41:51FromGitter<adamrezich> cool thanks, I'll give that a try
22:42:08FromGitter<adamrezich> I know it's not the best idea to try complex stuff right out the gate as you're learning, but that's just how I learn :p
22:42:52FromGitter<ephja> foo[i] = initT(). newSeqT (x) will give you a sequence of length 'x'. the elements will be zeroed though, and if that's too slow then you could use this https://nim-lang.org/docs/system.html#newSeqOfCap,Natural
22:44:12Araqthis is a weird C++ way of thinking about things :P
22:44:28AraqNim does *not* have C++'s 'new'
22:45:01Araqthere is no special construction syntax, there is only the newT / initT convention
22:45:36FromGitter<adamrezich> is that convention documented anywhere btw? I've been scanning the docs and I see mention of it but I can't find an explicit explanation of it
22:46:54*dddddd quit (Ping timeout: 252 seconds)
22:47:07watzonQuick question: have there been talks anywhere about making a nim compiler that compiles directly to machine code rather than C?
22:47:47FromGitter<Yardanico> Do you mean assembler or real machine code?
22:48:13dom96watzon: I've actually started a branch for this, but it was something very experimental and "for fun".
22:48:34dom96It's severely behind now too, heh https://github.com/nim-lang/Nim/tree/asmgen
22:48:48FromGitter<Yardanico> Well it's assembler
22:48:59FromGitter<Yardanico> Maybe he's taking about native binary
22:49:23dom96That is how you do it.
22:49:25FromGitter<Yardanico> I think there was fasm backend?
22:49:50dom96Even GCC output asm
22:49:54watzon@Yardanico I'm talking about compiling to native machine code with something like LLVM
22:49:55dom96*outputs
22:50:14FromGitter<Yardanico> watzon: maybe no talks
22:50:23FromGitter<Yardanico> But there's llvm backend for Nim
22:50:25dom96oh, for LLVM there is a project by arnetheduck https://github.com/arnetheduck/nlvm
22:50:29FromGitter<Yardanico> Yeah
22:50:59watzonI love nim, but compiling to C rather than strait to machine code has to have some performance impact
22:51:04watzonAhh nice dom96
22:51:18dom96watzon: it really doesn't
22:51:25watzonNo?
22:51:29FromGitter<Yardanico> Watzon compiling to llvm would have impact too
22:51:43*BitPuffin|osx quit (Ping timeout: 248 seconds)
22:51:46watzonYeah I guess that's true
22:51:51dom96I can compile the Nim compiler in 6 seconds on my machine.
22:52:05watzonI'm still learning about this compiler crap
22:52:17watzonBut you're right, I just compiled nim very quickly
22:52:18FromGitter<Yardanico> And it would be a lot more work to support assembler
22:52:30FromGitter<Yardanico> And it would be even slower
22:52:48FromGitter<Yardanico> Because with gcc/clang we get free optimisations
22:53:00FromGitter<Yardanico> There's less of them in assemblers
22:53:21FromGitter<ephja> Araq: docgen.isVisible contains checks like these: "v.id == ord(wStar)," but can't it check for the presence of sfExported instead since the docgen pass follows the semantic pass?
22:54:52dom96I'd guess that sfExported is newer than the docgen ;)
22:55:45FromGitter<ephja> I forgot that I considered that lol
22:55:53Araqalmost. :-)
22:56:07Araqdocgen version1 actually runs before sem'check
22:58:19FromGitter<Yardanico> Should we mangle field names too?
22:58:21FromGitter<Yardanico> https://github.com/nim-lang/Nim/issues/6282
22:58:25FromGitter<ephja> right
22:58:57FromGitter<ephja> @Yardanico probably
22:59:38FromGitter<Yardanico> Because there's no other way to check for all these C functions
22:59:45*dddddd joined #nim
23:00:16*sz0 joined #nim
23:00:18Araqactually we have different mechanisms to deal with that
23:10:37FromGitter<ephja> "const C1 = C2" the semantic pass will not include the symbol for C2 anywhere in the node, right?
23:14:59*SomeDumbKid420 joined #nim
23:30:37FromGitter<ephja> removed by fitRemoveHiddenConv perhaps?
23:39:01FromGitter<adamrezich> is there a way to get the typedesc of a generic parameter?
23:41:33FromGitter<adamrezich> nvm, you can pass typedescs as non-generic parameters
23:41:38*sleepyqt quit (Quit: WeeChat 1.9)
23:46:31FromGitter<ephja> typedesc[T], where T is the generic parameter in question, I think
23:48:17FromGitter<adamrezich> oh really? good to know
23:49:57FromGitter<ephja> also, if you have an instantiation of a generic type Foo[T, U, V, ...] then you can reference those generics parameters in the same way you would access a field (foo.T)
23:51:09*SomeDumbKid420 left #nim (#nim)
23:53:22FromGitter<adamrezich> oh wow that's neat
23:54:29FromGitter<adamrezich> are generic procs with UFCS going to ever work? i.e. `foo.barBaz ()` ?
23:58:26*yglukhov joined #nim