00:03:38 | * | mahmudov joined #nim |
00:03:50 | FromGitter | <BontaVlad> content |
00:11:23 | PMunch | Haha, now I just picture people talking about strings being content :P |
00:14:12 | FromGitter | <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:07 | PMunch | Are string happier the longer they are? |
00:33:23 | PMunch | Or 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:12 | FromGitter | <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:05 | Yardanico | How do I make nimble project structure where I "src" directory, pylib.nim in this folder, and also private directory in "src"? |
07:42:13 | Yardanico | pylib.nim imports all modules from private directory |
07:42:21 | Yardanico | nimble says |
07:42:21 | Yardanico | Package '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:55 | Yardanico | ah, I really need to put them in "pylib" directory |
07:42:56 | Yardanico | oh |
07:43:30 | Yardanico | hmm, still not clear |
07:45:34 | * | ftsf joined #nim |
07:48:08 | FromGitter | <Yardanico> (https://files.gitter.im/nim-lang/Nim/Yh4v/image.png) |
07:48:11 | FromGitter | <Yardanico> What is wrong here? |
07:48:13 | FromGitter | <Yardanico> (https://files.gitter.im/nim-lang/Nim/VSJn/image.png) |
07:48:17 | FromGitter | <Yardanico> (https://files.gitter.im/nim-lang/Nim/PQHp/image.png) |
07:49:20 | Yardanico | if I remove "srcDir" from nimble - package installs, but I can't import it |
07:51:33 | Yardanico | ah, ok |
07:51:38 | Yardanico | so nimble doesn't support this |
07:51:56 | Yardanico | I either place pylib.nim in root directory, or "import pylib/pylib" |
07:56:19 | FromGitter | <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:58 | Yardanico | stisa: thanks! |
08:00:20 | Yardanico | Maybe we should add this to nim/nimble wiki? |
08:02:32 | FromGitter | <stisa> I think they are in nimble readme, just scattered between sections |
08:03:54 | Yardanico | dom96, 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:35 | Yardanico | hmmm |
08:17:47 | Yardanico | it seems I can't call "range" iterator from another module |
08:17:52 | Yardanico | because it clashes with system.range |
08:17:58 | * | endragor joined #nim |
08:18:03 | Yardanico | but if I include this module - everything works fine |
08:18:37 | Yardanico | I mean I can call range(start, stop) |
08:18:41 | Yardanico | but I can't call range(stop) |
08:19:41 | Yardanico | I don't see why |
08:22:06 | Yardanico | https://gist.github.com/Yardanico/a1b714f921c2b8cab8210902620d84c0 |
08:22:23 | * | endragor quit (Ping timeout: 248 seconds) |
08:22:25 | Yardanico | replace import with include - it works. but I can't use include sadly |
08:22:37 | Yardanico | because it would insert module in all source files |
08:25:12 | * | yglukhov joined #nim |
08:29:04 | * | endragor joined #nim |
08:31:32 | Yardanico | can 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:44 | Yardanico | ok, 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:54 | FromGitter | <dom96> @citycide use ``binDir`` (see nimble readme for details) |
10:41:10 | * | BitPuffin|osx joined #nim |
10:41:50 | FromGitter | <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:57 | FromGitter | <Yardanico> You don't need var template |
10:47:35 | FromGitter | <Yardanico> If you have a template which accepts array, it will accept var array too |
10:48:19 | * | Arrrr joined #nim |
10:50:16 | FromGitter | <BigEpsilon> ah yes sorry I thought by implemeting the [] operator vor var array I'll implement the []= operator at the same time |
10:50:38 | FromGitter | <BigEpsilon> but it is not the case I've just seen |
10:52:24 | FromGitter | <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:03 | Yardanico | ok 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:55 | dom96 | hrm, the 'var', 'let' and 'const' predicates don't seem to work in macros: |
12:42:56 | dom96 | macro `...`(props: untyped{let | var | const}): untyped = |
12:43:23 | federico3 | Yardanico: https://github.com/nim-lang/Nim/wiki/BuildServices |
12:43:41 | Yardanico | federico3, but there's only config using docker and circleci v1.0 |
12:43:51 | Yardanico | I want to build for devel :) |
12:44:04 | federico3 | docker? |
12:44:06 | Yardanico | ah, no, it's actually version 2 |
12:44:14 | Yardanico | federico3, there's no docker image for nim devel |
12:44:15 | Yardanico | sadly |
12:44:31 | federico3 | Yardanico: those examples are not using docker |
12:44:49 | Yardanico | federico3, ehm? |
12:45:28 | Yardanico | but it says "docker image nimlang/nim" |
12:47:24 | Yardanico | yeah |
12:47:30 | Yardanico | It's building for 0.17.0 |
12:47:36 | Yardanico | Error: undeclared identifier: 'newCommentStmtNode' |
12:47:48 | Yardanico | this procedure wasn't available in 0.17.0 |
12:48:55 | federico3 | oh I see the change from euantor |
12:49:54 | * | PMunch joined #nim |
12:51:26 | federico3 | Yardanico: I'll update the wiki |
12:55:03 | dom96 | bah, is there no way to get the type of an ident? |
12:59:01 | dom96 | oh, I see. The parameter must be `typed` to get a sym. |
12:59:19 | dom96 | Then you can look up the type of a Sym using getType :) |
13:00:02 | Yardanico | dom96, doing something interesting? |
13:00:16 | dom96 | Creating a spread operator macro (`...`) |
13:00:26 | dom96 | To perhaps show off in my talk :) |
13:02:18 | * | haha_ joined #nim |
13:05:26 | * | Arrrr quit (Quit: Leaving.) |
13:06:16 | Yardanico | Want 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:24 | Yardanico | I'll change it here too |
13:10:25 | * | xet7 quit (Quit: Leaving) |
13:22:19 | dom96 | sadly this spread operator doesn't seem possible :\ |
13:24:25 | dom96 | sadly this spread operator doesn't seem possible :\ |
13:24:29 | dom96 | oops |
13:32:03 | dom96 | Tried both nnkMetaNode and nnkArgList |
13:32:21 | dom96 | This has reached a point where IMO the compiler should support it: |
13:32:22 | dom96 | Error: invalid expression: 'myProps.name, myProps.age' |
13:32:42 | dom96 | I wonder what this MetaNode thing is |
13:33:06 | dom96 | Sounds ominous |
13:36:31 | * | couven92 quit (Ping timeout: 248 seconds) |
13:39:02 | dom96 | Screw it, let's hack the compiler |
13:40:31 | * | PMunch quit (Quit: leaving) |
13:40:50 | * | PMunch joined #nim |
13:41:16 | PMunch | Spread operator? |
13:43:02 | * | haha_ quit (Quit: haha_) |
13:45:29 | dom96 | https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Spread_operator |
13:53:58 | * | couven92 joined #nim |
14:00:10 | PMunch | Aah |
14:00:14 | PMunch | Yeah that would be practical |
14:02:14 | dom96 | Hopefully Araq will show up here soon. |
14:02:37 | dom96 | Araq: how do I make the compiler accept: procCall(nnkArgList(arg1, arg2))? |
14:02:53 | dom96 | or is there a better node I could put my args into? |
14:05:51 | * | Sentreen quit (Ping timeout: 248 seconds) |
14:07:48 | federico3 | Yardanico: https://github.com/FedericoCeratto/nim-package-directory/blob/circleci2.0/.circleci/config.yml |
14:07:57 | Yardanico | federico3, thanks! |
14:08:03 | federico3 | just a little preview |
14:08:08 | * | endragor joined #nim |
14:09:52 | Yardanico | lol :D https://gist.github.com/Yardanico/1fa55be3fe9f080b74ab7c03a7c7a162 |
14:09:57 | Yardanico | scroll to line 58 |
14:10:43 | Yardanico | it seems that nim is *very* close to python syntax |
14:11:05 | Yardanico | if nim compiler can parse this python code as Nim AST |
14:11:38 | Yardanico | but I need to use pylib.int |
14:11:53 | Yardanico | because I either would need to traverse all nodes to change "int" to something like "toInt" |
14:12:10 | Yardanico | because if "int" template is imported (or included) from another file - nim uses only system.int |
14:14:10 | Yardanico | now I really believe that "Nim's syntax is flexible enough" |
14:16:22 | * | haha_ joined #nim |
14:17:20 | Yardanico | it 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:17 | Yardanico | tonim 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:09 | FromGitter | <zacharycarter> morning |
14:34:45 | FromGitter | <krux02> it's afternoon here |
14:35:44 | Yardanico | here too |
14:35:51 | Yardanico | timezones are funny :) |
14:35:52 | FromGitter | <zacharycarter> you crazy Euros |
14:35:55 | Yardanico | yeah |
14:36:21 | FromGitter | <krux02> there is gamescom in the city |
14:36:25 | Yardanico | wow |
14:36:29 | FromGitter | <zacharycarter> awesome |
14:38:02 | def-pri-pub | zacharycarter: morning |
14:38:37 | FromGitter | <krux02> gamescom is very crowded |
14:38:47 | Yardanico | it's 17:38 here btw |
14:38:56 | Yardanico | 5:38 PM* for non euros :) |
14:39:01 | def-pri-pub | Didn't Mrs. Merkel open up the conference? |
14:39:13 | FromGitter | <krux02> well she did |
14:39:19 | FromGitter | <krux02> there are elections soon |
14:39:21 | FromGitter | <krux02> so yea |
14:39:49 | * | vlad1777d joined #nim |
14:39:51 | FromGitter | <krux02> and oh wonder politishens are interested in gamescom |
14:39:59 | def-pri-pub | Ah, I was wondering why the benign queen of Europe did that. |
14:40:26 | FromGitter | <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:24 | FromGitter | <zacharycarter> hey def-pri-pub |
14:44:51 | FromGitter | <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:10 | def-pri-pub | Gotcha |
14:45:35 | def-pri-pub | I'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:53 | def-pri-pub | Then next step for me is to write the `SpriteBatch` and rendering code. |
14:45:56 | FromGitter | <zacharycarter> :D yeah I haven't been giving zengine as much time as I'd like either |
14:46:12 | def-pri-pub | My problem is that I try to juggle too many thins. |
14:46:18 | def-pri-pub | things* |
14:46:30 | def-pri-pub | Too many things I want to do... too little time... |
14:46:36 | FromGitter | <zacharycarter> I know the feeling |
14:47:14 | FromGitter | <krux02> just buy a self duplicating machine |
14:47:27 | Yardanico | I don't know why, but macros for me are more understandable than things like metaclasses, abstract classes etc |
14:47:28 | def-pri-pub | I 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:47 | FromGitter | <zacharycarter> gross |
14:47:57 | FromGitter | <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:11 | def-pri-pub | Problem with uberman is if you skip sleep you'll probably die. |
14:48:14 | FromGitter | <zacharycarter> I loved stargate I've seen every episode |
14:48:27 | ehmry | its not a good idea, code doesn't get better the longer you sit and write it |
14:48:34 | * | Arrrr joined #nim |
14:48:46 | dom96 | Yardanico: You should build on jboy's work :) |
14:48:51 | FromGitter | <krux02> I am currently rewatching tha last two seasons with the Ori |
14:48:53 | def-pri-pub | As for soylent, I've only had one bottle in my life. Mixxed it with Nutella after trying it plain; Plain = gross. |
14:49:28 | FromGitter | <zacharycarter> we need a graphql nim library |
14:49:30 | Yardanico | dom96, but nim-pymod has opposite goal |
14:49:35 | dom96 | krux02: Araq went to gamescom, is it still on today? |
14:49:42 | FromGitter | <krux02> If you saw the movie "Soylent Green" then the idea of that as food is pretty gross |
14:49:44 | dom96 | Maybe that's why he's been away |
14:50:00 | FromGitter | <krux02> yes the entire weekend |
14:50:06 | FromGitter | <zacharycarter> I just have no idea how to go about starting one |
14:50:15 | dom96 | krux02: pretty sure it was on before as well. |
14:50:21 | FromGitter | <zacharycarter> the JS example implementation scares me |
14:50:26 | def-pri-pub | Well, there are other problems that sticking to a soylet only diet causes. 1. Some sort of vitamin deficcienty. 2. Poop. |
14:50:30 | dom96 | zacharycarter: see how it's implemented in Python |
14:50:41 | FromGitter | <zacharycarter> ooo that's a good idea @dom96 |
14:50:45 | Yardanico | well python can be a bit noisy too :D |
14:50:51 | FromGitter | <zacharycarter> I do think a graphql library for Nim would help improve it's visibility |
14:50:52 | Yardanico | because we have templates and macros in nim :) |
14:51:20 | dom96 | Yardanico: Well do whatever you love doing, but we could use an easy way to bridge Nim <-> Python (both ways) |
14:51:36 | FromGitter | <krux02> I don't have the experience, but doesn't python also have metaprogramming? |
14:51:41 | dom96 | I'm not sure how well the existing packages work for that. |
14:51:47 | FromGitter | <zacharycarter> https://github.com/graphql-python/graphql-core/blob/master/graphql/language/ast.py |
14:51:52 | Yardanico | krux02: yes it does, but it seems that it's very limited |
14:51:57 | FromGitter | <zacharycarter> doesn't look any better |
14:52:27 | Yardanico | why they need to implement this? lol |
14:52:28 | Yardanico | https://github.com/graphql-python/graphql-core/blob/master/graphql/language/ast.py#L181 |
14:52:28 | federico3 | Yardanico: https://github.com/FedericoCeratto/nim-package-directory/blob/circleci2.0/.circleci/config.yml - now the caching works |
14:52:53 | FromGitter | <krux02> I like the nim patter to write a generic proc that then calls a macro to instanciate it. |
14:52:56 | Yardanico | It seems that ast.py is auto-generated, isn't it? |
14:53:04 | FromGitter | <zacharycarter> I don't think so Yardanico |
14:53:08 | Yardanico | ohh |
14:53:11 | dom96 | zacharycarter: I guess you need to implement a graphql parser D: |
14:53:17 | dom96 | That makes sense. |
14:53:19 | FromGitter | <zacharycarter> yeah :/ |
14:53:25 | Yardanico | federico3, much thanks! |
14:53:30 | dom96 | Nim is very good at parser though |
14:53:34 | dom96 | So you shouldn't have trouble. |
14:53:45 | dom96 | And you'll be able to make it work at compile-time which will be awesome |
14:54:25 | FromGitter | <zacharycarter> I need to find one written in a sane language |
14:54:28 | Yardanico | nim is the first language where I learned what metaprogramming and compile-time execution is |
14:54:38 | FromGitter | <zacharycarter> so I can understand how one actually works / needs to function |
14:54:39 | Yardanico | because I've used only python before :D |
14:54:45 | def-pri-pub | I know that Nim has built in zlib bindings, but is there a pure Nim implementation of compression/decompression code out there? |
14:55:05 | Yardanico | def-pri-pub, I don't think so, I didn't find any pure-nim LZMA |
14:55:15 | Yardanico | so I created a simple binding for easylzma |
14:55:22 | federico3 | Yardanico: updated https://github.com/nim-lang/Nim/wiki/BuildServices |
14:55:28 | dom96 | There is one out there somewhere |
14:55:38 | dom96 | in the nimPDF package IIRC |
14:55:45 | FromGitter | <zacharycarter> someone wrote one I thought |
14:55:48 | FromGitter | <zacharycarter> not too long ago |
14:55:54 | FromGitter | <zacharycarter> unless it was encryption / decryption |
14:55:57 | FromGitter | <zacharycarter> I'm thinking of |
14:56:31 | dom96 | My untar package links zlib on Windows statically: https://github.com/dom96/untar |
14:57:01 | Yardanico | well yeah, my lzma binding just uses {.compile.} statement :P |
14:57:15 | Yardanico | https://github.com/Yardanico/nim-osureplay/blob/master/src/lzma.nim |
14:57:37 | Yardanico | but sadly github nim highlighting is broken here |
14:57:48 | dom96 | lol |
14:57:55 | dom96 | Nimble really needs to support these C libraries |
14:58:00 | FromGitter | <stisa> def-pri-pub https://github.com/jangko/nimPNG/blob/master/private/nimz.nim is a deflate implementation I think |
14:58:31 | dom96 | oh 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:59 | federico3 | Yardanico: 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:20 | Yardanico | federico3, 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:25 | FromGitter | <citycide> @dom96 `binDir` works but I was hoping to be able to have a different output for various cross compiled binaries |
16:37:56 | dom96 | citycide: you should be able to use `nimble c --out:...` for that |
16:38:31 | FromGitter | <citycide> ah I see. I did end up using `nim c`. is there a difference in the two? |
16:41:21 | Nikky | i am trying to use libui with nim |
16:42:05 | Nikky | i 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:32 | Nikky | when i just install ui and try to use it.. https://ptpb.pw/ziMw |
16:43:47 | * | Matthias247 joined #nim |
16:43:56 | Nikky | when i clone ui and libui and execute the examples as instructed in the readme |
16:44:03 | Nikky | https://ptpb.pw/8_3q |
16:44:47 | Nikky | the latter looks a lot better but i am not sure what std_lib is |
16:45:11 | Nikky | *stdlib_ |
16:45:17 | Nikky | or where its supposed to be |
16:46:28 | Nikky | i am on archlinux btw |
16:47:47 | * | nattefrost quit (Remote host closed the connection) |
16:49:55 | PMunch | Nikky nim --version |
16:54:47 | Yardanico | PMunch, well arch has nim 0.17.0 in repos (not in aur) |
16:54:54 | PMunch | Yeah I know |
16:55:18 | PMunch | I was bugging them about updating, they had some horrible outdated version before |
16:55:35 | Yardanico | well there's always aur :) |
16:55:45 | PMunch | Or source :) |
16:55:47 | Nikky | its 0.17.0 |
16:55:55 | Yardanico | Nikky, hmm |
16:55:59 | PMunch | Hmm, 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:09 | Nikky | and a friend helped me point at nim c -r -d:useLibUiDll uitests.nim |
16:56:12 | PMunch | I managed to run it fine before. But now I'm getting the same issues as you |
16:56:15 | Nikky | now there is just a single error |
16:56:23 | Yardanico | sadly Araq isn't here |
16:56:36 | Araq | hmm? |
16:56:45 | Nikky | i hope the libui.so is the same version |
16:56:48 | Yardanico | Araq, oh, hi :) |
16:56:57 | Nikky | hi i am tryin to use ui |
16:57:05 | Nikky | or at least get the examples to run |
16:57:12 | PMunch | Nikky, with that switch I was able to run controlgallery.nim to run |
16:57:18 | PMunch | But not controlgallery2.nim |
16:57:33 | Yardanico | I'll try now |
16:57:38 | Nikky | i am trying to run the snippet fro mthe readme.. i will try those examples next |
16:58:12 | Yardanico | well I don't know |
16:58:18 | Yardanico | I have nim devel built by myself |
16:58:21 | Yardanico | and everything works |
16:58:26 | Yardanico | ah, I used clang |
16:58:28 | Yardanico | let me try with gcc |
16:58:39 | Yardanico | hmm, no, it still works |
16:58:52 | Yardanico | I'm on Antergos (basically Arch Linux). controlgallery2 just works |
16:58:57 | PMunch | Hmm |
16:58:58 | PMunch | Strange |
16:59:07 | PMunch | I get could not import: uiMainSteps |
16:59:17 | PMunch | On Manjaro (also basically Arch) |
16:59:35 | Yardanico | well manjaro has a bit older packages than arch, but yeah, still not clear |
16:59:41 | Nikky | controllgallery.nim(4, 3) Error: cannot open '../ui/rawui' |
16:59:56 | Nikky | i guess it needs to be along with the ui |
17:00:05 | Yardanico | Nikky, did you read readme of the ui? |
17:00:11 | PMunch | Yardanico, about a week or two :P Not something that should matter for this :P |
17:00:18 | Yardanico | Nikky, https://github.com/nim-lang/ui |
17:00:27 | Yardanico | you need to ensure you have "libui" and "ui" in the same folder |
17:00:54 | Nikky | i did and if i dod that without the -d:useLibUiDll flag it fails |
17:01:22 | Nikky | either failing for find ui_ stuff or stdlib |
17:01:26 | PMunch | Yeah the -d:useLibUiDll should theoretically use the system installed .so file instead of the built one next to it |
17:01:51 | Nikky | wi will try to have ui, libui and the flag at once |
17:01:52 | dom96 | citycide: `nimble` will verify that you've specified correct packages in your .nimble file. |
17:02:31 | Nikky | also something i noticed nimble complined aout example directories on other packages even though they were listed in ignored |
17:02:49 | Nikky | but that is not related to this.. |
17:02:50 | PMunch | Ah |
17:03:30 | PMunch | I got it working by doing this http://ix.io/zqk |
17:04:00 | Nikky | -r does what on compile ? |
17:04:04 | PMunch | Basically do what the thing on the GitHub page said. But can't get it to work through Nimble |
17:04:10 | PMunch | -r just means run after compilation |
17:04:18 | Nikky | ah yes |
17:07:51 | Nikky | ehh |
17:07:55 | Nikky | it.. works ? |
17:08:14 | PMunch | You're not sure if it worked or not? |
17:08:16 | Nikky | ok well |
17:08:23 | Nikky | it opened the window |
17:08:28 | Nikky | i am not sure why |
17:08:37 | Nikky | because i am pretty sure i did the same before |
17:08:43 | FromGitter | <Yardanico> Well maybe there's some possibility to print a warning of user installs it from nimble? |
17:08:52 | FromGitter | <Yardanico> *if |
17:10:22 | PMunch | Oh Yardanico, it was you who commented with me on the GenUI thing for nigui :) |
17:10:52 | Araq | well I don't use nimble so I suppose my packages don't work well with nimble |
17:11:34 | Yardanico | or maybe we should remove it from nimble for now |
17:11:48 | Yardanico | PMunch, yeah, I've changed my nickname like 3-5 days ago |
17:12:00 | PMunch | Aaah, that's why it wasn't familiar :P |
17:12:06 | PMunch | What was it before again? |
17:12:17 | PMunch | T-something? |
17:12:17 | Yardanico | PMunch, Tiberium here, TiberiumN on Github |
17:12:29 | PMunch | Ah yes |
17:14:15 | Yardanico | also it seems that you can't change nickname on many services |
17:14:17 | Yardanico | reddit for example |
17:14:47 | Yardanico | well that's not a big issue |
17:15:47 | Yardanico | what was the purpose of http://www.nimrod-code.org/ ? |
17:15:58 | Yardanico | sharing code snippets? |
17:17:28 | PMunch | Yeah, some sites don't you like changing your name. Adds confusion to who's who I guess |
17:18:14 | PMunch | IRC 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:48 | Yardanico | well I use passwords on freenode :) |
17:18:55 | Yardanico | not the best ones, but still |
17:19:20 | Yardanico | PMunch, sometimes it's very useful - for example #python channel is available only for registered users |
17:19:22 | PMunch | Hmm, 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:57 | dom96 | Yardanico: no, it was the original Nim website |
17:19:57 | Yardanico | so they get a bit less spammers and trolls |
17:20:00 | Yardanico | dom96, ah |
17:20:02 | PMunch | Yeah, and when you log on it tells you that your nick is registered and you need to identify :) |
17:20:02 | FromGitter | <krux02> which isn't that bad ‽ |
17:20:29 | PMunch | We get surprisingly few trolls in here actually |
17:20:50 | PMunch | Apart from that one guy the other day |
17:20:52 | FromGitter | <krux02> yes we are the blessing to be very unknown |
17:20:59 | PMunch | Haha :P |
17:21:31 | * | krux02 joined #nim |
17:21:43 | Yardanico | underground programming community :D |
17:21:47 | krux02 | ok 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:02 | krux02 | just for curiosity, what do you think is the best irc client? |
17:22:11 | Yardanico | krux02, I don't know really, I just use HexChat on linux |
17:22:14 | couven92 | krux02, HexChat |
17:22:27 | couven92 | and AndIRC on Android |
17:22:30 | PMunch | Yeah, HexChat is pretty good |
17:22:42 | krux02 | I 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:03 | PMunch | Well, HexChat is pretty customisable |
17:23:13 | PMunch | I've turned off much of the visual noise |
17:23:13 | krux02 | yes I liked that hexchat actually kept the log after restart |
17:23:47 | PMunch | I've got the chat window with the time of each message, the list of users, and the channels I'm in |
17:24:06 | couven92 | PMunch, I actually hide the user list :P |
17:24:06 | krux02 | yea like emacs, but I am not really a fan of "customize before it is usable" |
17:24:23 | krux02 | but yea it's free and it works |
17:24:46 | couven92 | Pidgin actually also has built-in IRC support |
17:24:49 | krux02 | the users list isn't that informative after all |
17:25:08 | PMunch | Yeah, that's fair. I've just kept it at the default config from my Manjaro install :P |
17:25:22 | PMunch | I've got to say, it's got pretty good defaults for a lot of stuff |
17:25:24 | krux02 | yay manjaro is on the rise |
17:25:36 | krux02 | I think it is 3rd most popular linux distro I think? |
17:25:38 | PMunch | I've been using it for years. Really like it |
17:25:53 | krux02 | This computer here is Arch |
17:26:07 | krux02 | I have another computer at work that is Manjaro |
17:26:19 | krux02 | I had little interest to go through the install of arch again |
17:26:34 | Yardanico | krux02, I solved this problem by installing antergos |
17:26:47 | Yardanico | it's literally arch with ubuntu-like installation |
17:27:03 | Yardanico | and it uses pure arch repos + it's own repo for themes |
17:27:48 | Yardanico | PMunch, what font do you use? default one? |
17:28:05 | PMunch | Inconsolata for anything Monospace |
17:28:15 | PMunch | And M+ 2p for most UI things |
17:28:35 | PMunch | With a bit of Raleway thrown in whenever I have larger text |
17:29:10 | krux02 | Terminus, best font ever :P |
17:29:28 | krux02 | especially for low resolution screens |
17:29:31 | krux02 | like my laptop |
17:29:33 | * | def-pri-pub quit (Ping timeout: 252 seconds) |
17:29:55 | Yardanico | how many users here have OP? |
17:29:58 | PMunch | Yeah it's been popping up quite a lot lately |
17:30:13 | krux02 | 1280x800 and a lot of code visible, because of a very nice pixel font |
17:30:22 | Yardanico | PMunch, I've just asked :) |
17:30:34 | PMunch | Not sure really Yardanico |
17:30:39 | krux02 | sorry people I made you go of topic :D |
17:30:41 | PMunch | Not a whole lot I think |
17:31:09 | PMunch | krux02, 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:01 | PMunch | krux02, Terminus looks a bit blocky |
17:35:35 | * | Arrrr quit (Ping timeout: 240 seconds) |
17:35:45 | Yardanico | PMunch, thanks about info on HexChat, I've disabled user list and moved channel list to the bottom |
17:36:17 | PMunch | Oh yeah, forgot that was not default :) |
17:36:21 | PMunch | Much better at the bottom |
17:36:52 | PMunch | Especially for me who tend to keep HexChat on a standing monitor |
17:37:51 | PMunch | Speaking of tools and things. Found a pretty cool editor the other day Kakoune |
17:38:27 | PMunch | It's like Vim but built with multi-selections from the ground up |
17:38:40 | PMunch | It's pretty neat |
17:39:28 | Yardanico | there's also a neovim and electron based editor (I saw it on github trending):D |
17:39:46 | PMunch | Electron *shivers* |
17:39:56 | Yardanico | https://github.com/extr0py/oni |
17:40:04 | Yardanico | PMunch, well I still use VSCode as my main Nim editor |
17:40:15 | PMunch | I tend to use Sublime or Vim mostly |
17:40:46 | Yardanico | oh, it also uses react |
17:40:55 | Yardanico | funny thing |
17:41:03 | Yardanico | github shows that 96.6% of it is Vim script |
17:41:12 | Yardanico | ah, it's neovim code |
17:41:16 | PMunch | Haha |
17:42:45 | * | nsf joined #nim |
17:47:45 | Yardanico | v cb |
17:47:48 | Yardanico | oops |
18:01:07 | * | dddddd joined #nim |
18:07:48 | * | def-pri-pub quit (Quit: leaving) |
18:10:30 | FromGitter | <Jipok> How to force to work nim with russian name of user in windows? |
18:11:09 | Yardanico | well it's not a nim-only problem |
18:11:17 | Yardanico | python has this problem with many pip packages too |
18:11:22 | Yardanico | my suggestion: rename your account |
18:11:32 | FromGitter | <Jipok> i know, but how to fix? |
18:11:45 | Yardanico | rename your account? |
18:12:14 | Yardanico | A lot of programs have issues with username in unicode |
18:12:29 | FromGitter | <ephja> is it currently possible to get the underlying type of a range? |
18:12:34 | FromGitter | <Jipok> renaming account does not rename folder |
18:13:08 | Yardanico | you can still rename it yourself :) |
18:13:14 | FromGitter | <ephja> I'm trying to implements 'contains' for ranges which I think would be a good addition |
18:13:22 | Yardanico | or cut + paste (this wouldn't do any copying) |
18:13:38 | * | dddddd quit (Ping timeout: 255 seconds) |
18:14:10 | Yardanico | well really it probably *would* be possible to fix |
18:14:17 | Yardanico | but how easy - I don't know |
18:15:00 | Yardanico | well literally everyone recommends to don't use non-latin characters in windows usernames |
18:15:24 | FromGitter | <krux02> well a range is a type isn't it? |
18:16:19 | Yardanico | yeah it is |
18:16:27 | FromGitter | <Jipok> except Microsoft |
18:16:38 | Yardanico | they do it too :) |
18:17:06 | Yardanico | just look at this: |
18:17:06 | Yardanico | https://www.google.ru/search?q=windows+non-english+username |
18:17:16 | Yardanico | everyone is having issues with non-english usernames |
18:17:42 | PMunch | What does Nim actually complain about? |
18:18:24 | Yardanico | PMunch, probably crashes |
18:18:39 | Yardanico | Jipok - yeah, what's the exact error? |
18:19:37 | FromGitter | <ephja> @krux02 yes but it's an abstraction over some integer type |
18:20:29 | FromGitter | <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:46 | noctisdb | Hi there, is there an issue with the 32 bit Win installer and incompatability with nimble with 0.17.0 |
19:42:58 | noctisdb | Rephrase 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:35 | programisto | hi. 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:46 | FromGitter | <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:24 | noctisdb | Well, looks like manually installing worked fine, not sure whats going on with the installer |
20:59:06 | FromGitter | <Yardanico> What installer did you use? |
20:59:53 | FromGitter | <Yardanico> Well it's deprecated and no longer maintained. Use choosenim (it has Windows binaries) |
21:00:02 | FromGitter | <Yardanico> Ehm |
21:00:23 | FromGitter | <Varriount> programisto: Certainly |
21:04:13 | * | francisl joined #nim |
21:04:28 | * | francisl quit (Client Quit) |
21:05:37 | * | francisl joined #nim |
21:07:50 | FromGitter | <Yardanico> Why JavaScript programmers put emojis in their projects readme? |
21:08:34 | FromGitter | <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:31 | Nikky | ok i so i continued playing with libui in in nim and the examples.. |
21:28:11 | Nikky | when 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:56 | Nikky | when i use the shared library it cannot import some stuff.. eg. uiMainSteps |
21:29:00 | Nikky | uups |
21:29:19 | * | yglukhov joined #nim |
21:29:24 | Nikky | toy.nim does nothing apparently.. and does not even load when i try to use it with the dll |
21:38:43 | FromGitter | <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:25 | FromGitter | <Yardanico> Yes, use / procedure |
21:39:36 | * | Pisuke quit (Read error: Connection reset by peer) |
21:39:45 | * | ludocode joined #nim |
21:39:45 | FromGitter | <citycide> that doesn't work though, because it thinks it's actually on windows, and it's not |
21:40:28 | FromGitter | <Yardanico> Did you change --os? |
21:40:36 | FromGitter | <citycide> for cross compiling yes |
21:40:43 | * | Pisuke joined #nim |
21:40:52 | FromGitter | <Yardanico> You need to pass -d:windows --os:windows |
21:41:27 | FromGitter | <Yardanico> Well this may not work |
21:41:32 | FromGitter | <Yardanico> But you can try |
21:42:04 | * | francisl joined #nim |
21:42:16 | FromGitter | <Yardanico> Also you can just define some symbol like "crosswin", and make unix like path if it is defined |
21:42:34 | FromGitter | <citycide> how would I do the last part? |
21:43:17 | FromGitter | <Yardanico> Firstly pass -d:crosswin if you want to cross compile |
21:43:27 | FromGitter | <Yardanico> Then write code like this: |
21:43:34 | FromGitter | <Yardanico> `````` |
21:43:37 | FromGitter | <Yardanico> Oh |
21:44:00 | FromGitter | <Yardanico> when defined(crosswin): |
21:44:05 | FromGitter | <Yardanico> do stuff |
21:44:11 | FromGitter | <citycide> ah I see. wasn't aware that's all `-d` did |
21:44:17 | FromGitter | <citycide> makes total sense now heh |
21:44:58 | FromGitter | <Yardanico> AFAIK it just defines a symbol |
21:45:39 | FromGitter | <Yardanico> nim c -d:hiImADefine example |
21:45:46 | FromGitter | <Yardanico> Would compile as usual |
21:46:22 | FromGitter | <Yardanico> Also your can omit .nim extension while calling the compiler |
21:46:31 | FromGitter | <Yardanico> e.g nim c -r hello |
21:46:41 | FromGitter | <Yardanico> Instead of hello.nim |
21:47:49 | FromGitter | <citycide> yeah |
21:48:08 | FromGitter | <ephja> Nikky: have you defined useLibUiDll? |
21:48:41 | Nikky | i tried with that and without |
21:48:51 | Nikky | when its defined it does not find the step thing |
21:49:15 | Nikky | when its defined it loads and does nothing (toys.nim) |
21:49:23 | FromGitter | <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:48 | FromGitter | <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:38 | FromGitter | <Yardanico> He's on arch iirv |
21:51:40 | FromGitter | <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:50 | Nikky | well it does not matter right now.. we wil try to use it and see what breaks |
22:07:14 | Nikky | then 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:37 | FromGitter | <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:26 | dom96 | why do you want to do that? |
22:28:11 | FromGitter | <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:11 | FromGitter | ... has one |
22:32:45 | * | qwertfisch joined #nim |
22:33:24 | * | Ven`` joined #nim |
22:36:07 | FromGitter | <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:58 | FromGitter | <Yardanico> noinit array? |
22:38:00 | FromGitter | <ephja> or a sequence |
22:41:51 | FromGitter | <adamrezich> cool thanks, I'll give that a try |
22:42:08 | FromGitter | <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:52 | FromGitter | <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:12 | Araq | this is a weird C++ way of thinking about things :P |
22:44:28 | Araq | Nim does *not* have C++'s 'new' |
22:45:01 | Araq | there is no special construction syntax, there is only the newT / initT convention |
22:45:36 | FromGitter | <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:07 | watzon | Quick question: have there been talks anywhere about making a nim compiler that compiles directly to machine code rather than C? |
22:47:47 | FromGitter | <Yardanico> Do you mean assembler or real machine code? |
22:48:13 | dom96 | watzon: I've actually started a branch for this, but it was something very experimental and "for fun". |
22:48:34 | dom96 | It's severely behind now too, heh https://github.com/nim-lang/Nim/tree/asmgen |
22:48:48 | FromGitter | <Yardanico> Well it's assembler |
22:48:59 | FromGitter | <Yardanico> Maybe he's taking about native binary |
22:49:23 | dom96 | That is how you do it. |
22:49:25 | FromGitter | <Yardanico> I think there was fasm backend? |
22:49:50 | dom96 | Even GCC output asm |
22:49:54 | watzon | @Yardanico I'm talking about compiling to native machine code with something like LLVM |
22:49:55 | dom96 | *outputs |
22:50:14 | FromGitter | <Yardanico> watzon: maybe no talks |
22:50:23 | FromGitter | <Yardanico> But there's llvm backend for Nim |
22:50:25 | dom96 | oh, for LLVM there is a project by arnetheduck https://github.com/arnetheduck/nlvm |
22:50:29 | FromGitter | <Yardanico> Yeah |
22:50:59 | watzon | I love nim, but compiling to C rather than strait to machine code has to have some performance impact |
22:51:04 | watzon | Ahh nice dom96 |
22:51:18 | dom96 | watzon: it really doesn't |
22:51:25 | watzon | No? |
22:51:29 | FromGitter | <Yardanico> Watzon compiling to llvm would have impact too |
22:51:43 | * | BitPuffin|osx quit (Ping timeout: 248 seconds) |
22:51:46 | watzon | Yeah I guess that's true |
22:51:51 | dom96 | I can compile the Nim compiler in 6 seconds on my machine. |
22:52:05 | watzon | I'm still learning about this compiler crap |
22:52:17 | watzon | But you're right, I just compiled nim very quickly |
22:52:18 | FromGitter | <Yardanico> And it would be a lot more work to support assembler |
22:52:30 | FromGitter | <Yardanico> And it would be even slower |
22:52:48 | FromGitter | <Yardanico> Because with gcc/clang we get free optimisations |
22:53:00 | FromGitter | <Yardanico> There's less of them in assemblers |
22:53:21 | FromGitter | <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:52 | dom96 | I'd guess that sfExported is newer than the docgen ;) |
22:55:45 | FromGitter | <ephja> I forgot that I considered that lol |
22:55:53 | Araq | almost. :-) |
22:56:07 | Araq | docgen version1 actually runs before sem'check |
22:58:19 | FromGitter | <Yardanico> Should we mangle field names too? |
22:58:21 | FromGitter | <Yardanico> https://github.com/nim-lang/Nim/issues/6282 |
22:58:25 | FromGitter | <ephja> right |
22:58:57 | FromGitter | <ephja> @Yardanico probably |
22:59:38 | FromGitter | <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:18 | Araq | actually we have different mechanisms to deal with that |
23:10:37 | FromGitter | <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:37 | FromGitter | <ephja> removed by fitRemoveHiddenConv perhaps? |
23:39:01 | FromGitter | <adamrezich> is there a way to get the typedesc of a generic parameter? |
23:41:33 | FromGitter | <adamrezich> nvm, you can pass typedescs as non-generic parameters |
23:41:38 | * | sleepyqt quit (Quit: WeeChat 1.9) |
23:46:31 | FromGitter | <ephja> typedesc[T], where T is the generic parameter in question, I think |
23:48:17 | FromGitter | <adamrezich> oh really? good to know |
23:49:57 | FromGitter | <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:22 | FromGitter | <adamrezich> oh wow that's neat |
23:54:29 | FromGitter | <adamrezich> are generic procs with UFCS going to ever work? i.e. `foo.barBaz ()` ? |
23:58:26 | * | yglukhov joined #nim |