00:11:02 | * | softinio joined #nim |
00:14:56 | * | Demon_Fox joined #nim |
00:15:09 | * | softinio quit (Ping timeout: 252 seconds) |
00:17:52 | * | keyle joined #nim |
00:20:47 | * | drewsrem quit (Quit: Leaving) |
00:49:17 | * | NimBot joined #nim |
00:58:12 | * | Noein quit (Ping timeout: 244 seconds) |
01:00:43 | * | NimBot joined #nim |
01:26:44 | * | umurgdk joined #nim |
01:28:57 | * | nande joined #nim |
01:31:23 | * | umurgdk quit (Ping timeout: 264 seconds) |
01:40:56 | * | chemist69_ joined #nim |
01:43:45 | * | chemist69 quit (Ping timeout: 240 seconds) |
01:52:38 | strcmp1 | Araq, where |
01:54:04 | * | strcmp1 quit (Quit: Leaving) |
01:57:46 | * | NimBot joined #nim |
02:49:40 | * | nande quit (Remote host closed the connection) |
03:18:45 | * | darkf joined #nim |
03:18:45 | * | darkf quit (Changing host) |
03:18:45 | * | darkf joined #nim |
03:27:27 | * | clone1018 quit (Ping timeout: 246 seconds) |
03:27:48 | * | lokulin quit (Ping timeout: 246 seconds) |
03:27:48 | * | zeph quit (Ping timeout: 246 seconds) |
03:28:51 | * | jck quit (Ping timeout: 246 seconds) |
03:28:51 | * | nchambers quit (Ping timeout: 246 seconds) |
03:30:03 | * | zeph joined #nim |
03:30:28 | * | jck joined #nim |
03:30:28 | * | nchambers joined #nim |
03:30:44 | * | clone1018 joined #nim |
03:35:46 | * | lokulin joined #nim |
03:40:45 | * | nchambers quit (Ping timeout: 246 seconds) |
03:40:45 | * | zeph quit (Ping timeout: 246 seconds) |
03:41:06 | * | jck quit (Ping timeout: 246 seconds) |
03:41:06 | * | lokulin quit (Ping timeout: 246 seconds) |
03:41:08 | * | Xe is now known as jneurlc |
03:41:55 | * | jneurlc is now known as jneruld |
03:43:13 | * | jck joined #nim |
03:46:39 | * | jneruld is now known as Xe |
04:02:39 | * | bendiken joined #nim |
04:03:36 | * | zeph joined #nim |
04:04:02 | * | nchambers joined #nim |
04:15:38 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:16:26 | * | bendiken joined #nim |
04:23:21 | * | lokulin joined #nim |
04:26:43 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:27:32 | * | bendiken joined #nim |
04:37:49 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:38:30 | * | bendiken joined #nim |
04:48:47 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:49:26 | * | bendiken joined #nim |
04:49:54 | * | softinio joined #nim |
04:54:05 | * | softinio quit (Ping timeout: 250 seconds) |
04:59:43 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
05:00:23 | * | bendiken joined #nim |
05:10:40 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
05:11:19 | * | bendiken joined #nim |
05:24:48 | * | BitPuffin|osx quit (Ping timeout: 244 seconds) |
05:38:26 | * | NimBot joined #nim |
05:41:28 | * | silven quit (Ping timeout: 265 seconds) |
05:41:50 | * | silven joined #nim |
06:12:13 | * | NimBot joined #nim |
06:16:35 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
06:17:23 | * | bendiken joined #nim |
06:19:51 | * | Demon_Fox quit (Quit: Leaving) |
06:27:40 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
06:28:28 | * | bendiken joined #nim |
06:36:20 | * | NimBot joined #nim |
06:37:03 | * | enamex joined #nim |
06:47:34 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
06:48:22 | * | bendiken joined #nim |
06:51:17 | enamex | This: http://nim-lang.org/docs/manual.html#limitations-of-the-method-call-syntax |
06:51:42 | enamex | ^Referenced from here: http://nim-lang.org/docs/manual.html#procedures-method-call-syntax |
06:51:57 | enamex | Should be: http://nim-lang.org/docs/manual.html#templates-limitations-of-the-method-call-syntax |
06:52:13 | * | NimBot joined #nim |
06:52:17 | enamex | "templates-limitations-of" instead of "limitations-of" |
06:52:45 | enamex | There're a lot of subtly broken navigation links in the manual. Breaks the flow of reading a bit. |
06:58:39 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
06:59:26 | * | bendiken joined #nim |
07:09:39 | * | umurgdk joined #nim |
07:09:44 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
07:10:26 | * | bendiken joined #nim |
07:13:45 | * | umurgdk quit (Ping timeout: 240 seconds) |
07:16:33 | * | Trustable joined #nim |
07:16:40 | * | matkuki joined #nim |
07:23:17 | * | beatmox quit (Remote host closed the connection) |
07:23:25 | * | pigmej joined #nim |
07:24:21 | * | matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]) |
07:35:09 | * | chemist69_ quit (Quit: WeeChat 1.3) |
07:35:46 | * | chemist69 joined #nim |
07:40:09 | * | Mat4 joined #nim |
07:41:29 | * | Noein joined #nim |
07:42:33 | * | Kingsquee quit (Read error: Connection reset by peer) |
07:42:43 | * | Kingsquee joined #nim |
07:46:50 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
07:47:37 | * | bendiken joined #nim |
07:51:10 | dom96 | enamex: could you fix them in a PR? |
08:05:50 | * | coffeepot joined #nim |
08:06:08 | * | Mat4 quit (Quit: Konversation terminated!) |
08:06:09 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
08:06:56 | * | bendiken joined #nim |
08:10:04 | * | bjz joined #nim |
08:13:25 | enamex | I'll see later today, hopefully |
08:14:33 | * | max2 quit (Remote host closed the connection) |
08:15:21 | dom96 | enamex: thanks |
08:21:07 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:21:22 | * | yglukhov joined #nim |
08:33:55 | * | EXetoC joined #nim |
08:38:22 | * | umurgdk joined #nim |
08:50:51 | * | yglukhov quit (Remote host closed the connection) |
08:53:21 | * | aziz joined #nim |
08:54:24 | * | bjz joined #nim |
08:57:51 | * | Noein quit (Ping timeout: 246 seconds) |
09:01:35 | * | boopisaway is now known as boop |
09:06:08 | * | yglukhov joined #nim |
09:09:17 | * | kilon quit () |
09:19:23 | * | kilon joined #nim |
09:19:41 | * | johnsoft joined #nim |
09:38:04 | NimBot | nim-lang/Nim devel b9df132 Reimer Behrends [+0 ±2 -0]: Provide access to getsockname()/getpeername().... 4 more lines |
09:38:04 | NimBot | nim-lang/Nim devel 01c99ff Dominik Picheta [+0 ±2 -0]: Merge branch 'socket-address' of https://github.com/rbehrends/Nim into rbehrends-socket-address |
09:38:04 | NimBot | nim-lang/Nim devel 4da5e47 Dominik Picheta [+0 ±3 -0]: Implements getPeerAddr/getPeerName on Windows and adds IDX. |
09:38:04 | NimBot | nim-lang/Nim devel d24eaf0 Dominik Picheta [+0 ±3 -0]: Merge branch 'rbehrends-socket-address' into devel |
09:38:43 | * | kilon quit (Ping timeout: 252 seconds) |
09:38:56 | * | kilon joined #nim |
09:39:01 | * | EXetoC quit (Quit: WeeChat 1.2) |
09:41:39 | * | zeph quit (Quit: ZNC - http://znc.in) |
09:56:22 | * | boop is now known as boopisaway |
10:00:15 | * | umurgdk quit (Remote host closed the connection) |
10:13:50 | * | umurgdk joined #nim |
10:17:00 | * | umurgdk quit (Remote host closed the connection) |
10:17:14 | * | umurgdk joined #nim |
10:21:07 | * | bendiken quit () |
10:23:34 | * | yglukhov quit (Remote host closed the connection) |
10:37:33 | * | matkuki joined #nim |
10:38:25 | * | elrood joined #nim |
10:39:08 | * | yglukhov joined #nim |
10:48:59 | * | Sornaensis quit (Ping timeout: 250 seconds) |
10:50:55 | * | Kingsquee quit (Quit: http://i.imgur.com/EsXzoum.png) |
10:51:40 | * | Sornaensis joined #nim |
10:54:19 | * | joelmo joined #nim |
10:54:24 | * | jaco60 quit (Ping timeout: 246 seconds) |
11:02:24 | * | enamex quit (Quit: Page closed) |
11:07:59 | * | Noein joined #nim |
11:16:45 | * | enamex_campus joined #nim |
11:21:20 | * | bendiken joined #nim |
11:23:27 | * | yglukhov quit (Remote host closed the connection) |
11:27:55 | * | yglukhov joined #nim |
11:34:06 | * | yglukhov quit (Remote host closed the connection) |
11:34:24 | * | NimBot joined #nim |
11:35:22 | * | yglukhov joined #nim |
11:36:24 | * | softinio joined #nim |
11:39:33 | * | yglukhov quit (Remote host closed the connection) |
11:40:06 | matkuki | dom96: Got time for a question? |
11:40:17 | dom96 | go ahead |
11:40:28 | dom96 | please just ask next time |
11:40:33 | matkuki | thanks, let me just type it up... |
11:41:04 | * | Noein quit (Ping timeout: 265 seconds) |
11:43:03 | * | BitPuffin joined #nim |
11:44:17 | softinio | everyone seems to be keen to learn go these days ... would it be a mistake to use nim on my next major project? |
11:44:22 | * | umurgdk quit (Remote host closed the connection) |
11:44:48 | coffeepot | i dont think so, nim is very capable |
11:45:02 | coffeepot | i dont think itd be a mistake i mean |
11:45:15 | matkuki | dom96: https://bpaste.net/show/ecc6632c7cd9 |
11:45:17 | matkuki | How do you make the procedure work for both types? |
11:46:09 | dom96 | var ParticleBase? |
11:46:15 | dom96 | You might need to use a method instead |
11:46:28 | * | umurgdk joined #nim |
11:49:36 | dom96 | softinio: what's your next project? |
11:49:51 | softinio | I have two projects I need to do |
11:50:01 | softinio | One is a web microservice rest api |
11:50:12 | softinio | and one is a command line database tool I need |
11:50:26 | * | umurgdk quit (Ping timeout: 240 seconds) |
11:51:13 | * | umurgdk joined #nim |
11:51:13 | softinio | Sorry if my earlier question was silly .... I asked as all the hipsters are going for go and as I am short of time these days for these side projects to my job want to spend it wisely |
11:51:26 | * | yglukhov joined #nim |
11:53:04 | enamex_campus | A mistake to /use/ is up to your judgement. You know your circusmstances better. |
11:54:24 | enamex_campus | A mistake as opposed to Go? Well, their flavors are really far apart for me so it's a difficult question to face. It's just... I wouldn't let both become the filtered final contenders for the same choice.... |
11:55:10 | * | umurgdk quit (Ping timeout: 240 seconds) |
11:56:41 | * | enamex_campus quit (Quit: Page closed) |
11:56:54 | dom96 | softinio: if you're worried about time then perhaps a language you already know would be the right choice? |
11:57:14 | dom96 | if your goal is to try something new then use Nim :) |
11:57:56 | softinio | @dom96 fair point. I think my question silly let me retract it. Think I asked in my frustration of wanting more time for doing both go and nim :) |
11:58:28 | softinio | on a different subject how big is the nim community? |
11:58:41 | coffeepot | also if you want metaprogramming, compiling to c and a forward looking head dev attitude then choose nim. I get the impression go is more focused on language leanness, whereas nim is very cutting edge |
11:58:53 | softinio | kind of nice to be an early adopter as the lang is great from what I have seen so far |
11:59:21 | softinio | @coffeepot +1 I like all those especially as I have a c background |
11:59:47 | softinio | btw on train may loose internet connection shortly back within hour if I disappear may miss messages |
11:59:49 | * | Noein joined #nim |
12:00:36 | dom96 | softinio: take a look at the IRC logs to catch up if you lose your internet http://irclogs.nim-lang.org/ |
12:00:48 | coffeepot | only thing to consider IMHO (and its a big one) is that go has more people using it. Having said that I've never had any problems getting helpful answers |
12:00:52 | dom96 | the Nim community is definitely smaller than Go's |
12:03:56 | coffeepot | softino: are you on windows? Are you planning on writing a service for your api? |
12:04:33 | coffeepot | I am hoping to do the same thing, in nim - however one thing lacking so far is a nice wrapper to the services api |
12:04:42 | * | vendethiel quit (Ping timeout: 244 seconds) |
12:07:33 | * | softinio quit (Ping timeout: 246 seconds) |
12:13:16 | * | softinio joined #nim |
12:17:42 | * | softinio quit (Ping timeout: 246 seconds) |
12:20:52 | matkuki | dom96: The ParticleBase type has no attributes/methods/procs, it's just a base type so I can have a seq[ParticleBase] which I need to loop over and call 'Update_Force' on each item in the seq. |
12:20:53 | matkuki | More complete example: https://bpaste.net/show/5d17a3dcfec3 |
12:20:55 | matkuki | Line 33 gives: 'Error: type mismatch: got (ParticleBase, float), but expected Update_Force(in_gravity_particle: var ParticleGravity, duration: float)' |
12:26:30 | Araq | matkuki: don't use .inheritable, use object of RootObj instead |
12:26:40 | Araq | and use 'ref object' for all your objects |
12:27:03 | * | umurgdk joined #nim |
12:27:08 | Araq | and use 'method' for every of your update_force |
12:27:50 | gokr | matkuki: You may want to check my OO in Nim articles |
12:28:05 | matkuki | Araq: Didn't know you were here, thanks! |
12:28:21 | matkuki | let me try... |
12:28:26 | gokr | But if you stick to Araq's three advice there - then objects behave basically like in most other OO langs. |
12:28:58 | matkuki | gokr: thanks |
12:29:14 | gokr | matkuki: I explored OO in Nim in excrutiating details: http://goran.krampe.se/category/nim/ |
12:30:07 | matkuki | gokr: Didn't know about your OO articles, will look into it. |
12:31:08 | * | umurgdk quit (Ping timeout: 250 seconds) |
12:31:11 | Araq | and your whole approach to the problem is wrong btw ;-) |
12:31:45 | * | umurgdk joined #nim |
12:32:16 | gokr | Araq: In what way you mean? |
12:32:34 | matkuki | Araq: Then tell me the right way, please. This it just a straight translation of some C++ code! |
12:35:16 | Araq | instead of seq[ref ParticleBase] you should use seq[ParticleSpring], seq[ParticleDrag] and use value-based datatypes for ParticleSpring |
12:35:31 | Araq | no ref, no inheritance, no dynamic binding |
12:36:18 | Araq | easily 5x times faster and ports more easily to GPUs |
12:37:17 | * | yglukhov quit (Remote host closed the connection) |
12:37:24 | Araq | also "and many more particles" indicates that you have a design problem here too. |
12:37:50 | gokr | matkuki: Basically, as soon as you start using a collection (seq) with objects of different types - you will need runtime dispatch (methods). |
12:38:26 | gokr | Its not "wrong" :) but Araq focuses on max performance. |
12:40:35 | * | xet7_ quit (Ping timeout: 252 seconds) |
12:40:40 | matkuki | gokr: That's my goal also. |
12:40:42 | matkuki | Araq: I like this principle, especially the 5x faster part! But can you elaborate on 'use value-based datatypes for ParticleSpring'. |
12:41:20 | gokr | A non ref type is simply a pure "value" and not a pointer to another memory region. |
12:41:56 | gokr | So the seq[ParticleSpring] (if ParticleSpring is non ref type) will simply have consequtive memory chunks of the proper size for ParticleSpring. |
12:42:59 | gokr | So the many calls to malloc can be removed - or at least turned into a very few. Right Araq? |
12:43:47 | Araq | right but it's not the memory allocations, you can usally move out of your hot loops |
12:44:03 | Araq | it's the memory indirections that 'ref' causes |
12:44:09 | gokr | right |
12:44:40 | gokr | matkuki: I come from a lang where everything is a "ref", so I am not used to value type thinking either. |
12:45:21 | Araq | also if you keep your data simple, you can run the "for every x: update(x)" in parallel |
12:46:36 | Araq | you can try the same with seq[ParticleBase] but then it quickly becomes non-obvious whether the transformation is correct |
12:47:10 | * | yglukhov joined #nim |
12:48:49 | * | yglukhov quit (Remote host closed the connection) |
12:49:30 | * | yglukhov joined #nim |
12:52:15 | * | UberLambda joined #nim |
12:57:31 | matkuki | Araq: Did you mean like this? https://bpaste.net/show/04382a22cd5f |
12:59:23 | * | softinio joined #nim |
12:59:34 | Araq | yeah that's much better. You can cut the boilerplate with generics and templates |
13:00:32 | * | softinio quit (Remote host closed the connection) |
13:00:54 | * | softinio joined #nim |
13:01:13 | * | xet7_ joined #nim |
13:01:54 | Araq | next step would be to create an ID mechanism and then you're on the way to creating a component system |
13:02:47 | softinio | coffeepot: I use a mac for development. In production Linux |
13:03:32 | matkuki | Araq: Thanks. I'm not familiar with this 'ID mechanism', any documentation on it? |
13:05:22 | matkuki | To be honest, I have no clue what is this component system you mentioned :) |
13:07:35 | Araq | well maybe you don't need it for your particles |
13:07:39 | coffeepot | softino: Ah I don't know anything about mac development so can't really comment on if anything is available in Nim for persistent service type stuff. |
13:07:41 | coffeepot | matkuki: what you're writing looks interesting, will it be in 3D or 2D? |
13:08:11 | matkuki | cofeepot: For now, strictly 2D. |
13:08:21 | matkuki | sorry, coffeepot |
13:10:47 | coffeepot | damnit lol :) I'm writing some 3D stuff atm that I'm hoping to turn into a library at some point, but my physics stuff is very disorganised so it's interesting seeing what you're doing |
13:11:08 | matkuki | It's from the book: Game Physics Engine Development - Ian Millington |
13:11:09 | matkuki | Great book. |
13:11:47 | coffeepot | I have a similar book 'physics for games' or something. I'll check out that one online, the more info the better! |
13:11:58 | matkuki | It's written for a 3D engine, I'm adapting it to my purposes. |
13:12:38 | * | wuehlmaus quit (Quit: Lost terminal) |
13:13:44 | coffeepot | I think I saw in the summer of code stuff last year that it might be possible to do a subset of Nim that compiles to GPU, rather like the parallel stuff. Does anyone know if that's still on the cards? |
13:16:21 | * | softinio quit (Remote host closed the connection) |
13:16:40 | matkuki | gokr: Yep, I programmed alot in Python the last couple of years, had the same problem when starting with Nim :) |
13:17:12 | * | FedeOmoto joined #nim |
13:17:27 | Araq | coffeepot: kind of, I'm trying to find people who can do it ;-) |
13:17:59 | * | softinio joined #nim |
13:19:00 | * | wuehlmaus joined #nim |
13:19:26 | * | NimBot joined #nim |
13:20:49 | matkuki | gokr: Uh, not what I need at the moment, but will look at it, thanks. |
13:23:09 | * | Noein quit (Ping timeout: 246 seconds) |
13:25:09 | * | umurgdk quit (Remote host closed the connection) |
13:28:38 | * | pregressive joined #nim |
13:30:01 | * | NimBot joined #nim |
13:31:28 | * | yglukhov quit (Remote host closed the connection) |
13:32:11 | * | umurgdk joined #nim |
13:33:22 | * | enamex_campus joined #nim |
13:37:12 | * | umurgdk quit (Ping timeout: 272 seconds) |
13:39:50 | softinio | how production ready is the httpserver module? |
13:40:07 | * | keyle quit (Quit: http://twitter.com/keyle/) |
13:42:04 | * | softinio quit (Remote host closed the connection) |
13:49:26 | * | softinio joined #nim |
13:51:00 | * | Jesin quit (Quit: Leaving) |
13:51:08 | * | Varriount joined #nim |
13:52:05 | * | yglukhov joined #nim |
13:53:13 | Araq | softinio: the async sever is used for nim's forum iirc |
13:56:51 | * | yglukhov quit (Ping timeout: 268 seconds) |
13:57:08 | coffeepot | Araq: Fair enough! I would help but am woefully inexperienced in language development and know nothing about GPU programming - yet. Having said that, I would like to learn the GPU stuff, might make some libraries for it at least if I get some time to hack it out |
13:57:11 | * | softinio quit (Ping timeout: 264 seconds) |
14:01:11 | * | softinio joined #nim |
14:02:06 | * | umurgdk joined #nim |
14:02:33 | * | Jesin joined #nim |
14:06:48 | * | softinio quit (Remote host closed the connection) |
14:07:51 | * | softinio joined #nim |
14:10:04 | * | umurgdk quit (Remote host closed the connection) |
14:12:54 | * | umurgdk joined #nim |
14:17:13 | * | umurgdk quit (Ping timeout: 246 seconds) |
14:22:24 | * | umurgdk joined #nim |
14:22:45 | * | yglukhov joined #nim |
14:28:03 | * | softinio quit (Remote host closed the connection) |
14:29:34 | * | softinio joined #nim |
14:32:00 | * | vendethiel joined #nim |
14:34:59 | * | softinio quit (Remote host closed the connection) |
14:37:32 | * | softinio joined #nim |
14:46:00 | * | softinio quit (Ping timeout: 264 seconds) |
14:49:12 | * | pregressive quit (Remote host closed the connection) |
14:53:34 | * | yglukhov quit (Remote host closed the connection) |
14:55:35 | * | softinio joined #nim |
14:55:50 | * | Noein joined #nim |
14:55:53 | matkuki | see ya |
14:55:56 | * | matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]) |
15:02:28 | * | yglukhov joined #nim |
15:08:21 | * | enamex_campus quit (Quit: Page closed) |
15:08:44 | * | umurgdk_ joined #nim |
15:09:00 | Araq | coffeepot: can you give me that template gist again that crashed the compiler? |
15:11:18 | * | umurgdk quit (Ping timeout: 246 seconds) |
15:11:39 | * | wuehlmaus quit (Quit: Aus, die Maus) |
15:11:54 | * | wuehlmaus joined #nim |
15:13:49 | * | jaco60 joined #nim |
15:15:23 | * | strcmp1 joined #nim |
15:16:43 | coffeepot | I think this is it, https://gist.github.com/coffeepots/9443d86b934cae5e02c0 |
15:17:05 | coffeepot | note that I now get a more reasonable error: internal error: proc has no result symbol |
15:24:34 | * | LeFF joined #nim |
15:24:51 | LeFF | has anyone tried doing compiler plugins yet? |
15:25:23 | LeFF | I'm confused about registerPlugin function, what are the string arguments that it takes? |
15:28:09 | Araq | hi LeFF |
15:28:56 | Araq | the arguments are nimble-package-name, module-name, proc-name |
15:30:03 | * | NimBot joined #nim |
15:30:08 | Araq | system.nim is in the stdlib package and we implement system.locals |
15:30:17 | Araq | so it's "stdlib", "system", "locals" |
15:30:29 | LeFF | hi, Araq, so... how can I run my custom transformation on each and every module in the whole code tree? |
15:30:57 | Araq | that's not a compiler plugin |
15:31:02 | Araq | that would be a "pass" |
15:31:25 | coffeepot | Araq: Putting in some of the missing details for that gist (ie; supplying the type for makeproc) gives a new internal error in evaltempl.nim at line 93 https://gist.github.com/coffeepots/f9c28c515ce039bb9cd3 |
15:32:44 | LeFF | okey, I guess adding my custom pass to the compiler is not that trivial thing as plugins)? |
15:32:51 | * | bendiken quit () |
15:33:37 | Araq | it's messy since the passes API will eventually disappear |
15:34:04 | Araq | want do you want to do? |
15:34:13 | coffeepot | interestingly, same error occurs when you supply the type for makeproc whether you pass tmpproc to 'a' or run tmpproc and return the result to 'a'. Anyway, my speculation is unlikely to be useful here, just found it interesting |
15:34:40 | LeFF | Araq, I want to add code obfuscation to the compiler. |
15:35:04 | Araq | why? |
15:35:24 | Araq | optimized native code is as obfuscated as it can get |
15:35:42 | softinio | reading the tutorial on nim lang website |
15:35:50 | softinio | finished part 1 |
15:36:01 | softinio | is part 2 worth reading? Its says obsolete! |
15:36:15 | Araq | read it. |
15:36:23 | Araq | it's not that bad |
15:36:35 | LeFF | Araq, not that really for a skillful cracker/researcher. To make code protected from disassembly and restoration of the algorithms. |
15:36:43 | softinio | ok will read it thanks @Araq |
15:36:54 | softinio | Can I say the docs are very well written |
15:37:12 | coffeepot | yeah I must say, love the nim docs too |
15:37:25 | Araq | thanks, gotta go. bbs |
15:38:26 | Araq | LeFF: stay a while, I can tell you how to write this pass |
15:38:28 | coffeepot | LeFF: how can you protect from disassembly? |
15:39:16 | * | pregressive joined #nim |
15:40:02 | LeFF | coffepot, I can encrypt static data/strings, add trash code, flatten control flow and etc... there's a lot of good algorithms of obfuscation. |
15:40:23 | coffeepot | cool, sounds interesting :) |
15:40:40 | * | Noein quit (Ping timeout: 244 seconds) |
15:40:42 | LeFF | I can even inline some asm code that will break common disasseblers) |
15:41:05 | coffeepot | wow, never would have thought of that! |
15:41:47 | * | yglukhov quit (Remote host closed the connection) |
15:44:07 | coffeepot | i once wrote something that was normally encrypted and after it decrypted itself in memory, it constantly checksummed itself and reset the PC if anything changed. Back then (~20 yrs ago) breakpoints would alter the code, triggering the reset. Fun project :D Doubt that'd be much use now though |
15:44:10 | * | gmpreussner|work joined #nim |
15:44:41 | coffeepot | Anyway, sounds like yours is an interesting nim project :) |
15:56:13 | * | yglukhov joined #nim |
15:56:49 | Araq | LeFF: compiler/passaux.nim has a verbosePass that's the minimum of what you need to implement |
15:57:17 | * | brill_ joined #nim |
15:57:27 | Araq | in main.nim there is this beauty: |
15:57:28 | * | brill_ is now known as brillan |
15:57:31 | Araq | proc semanticPasses = |
15:57:32 | Araq | registerPass verbosePass |
15:57:34 | Araq | registerPass semPass |
15:57:57 | Araq | you can add your pass here, after semPass so that symbol lookup and type checking has been performed |
15:58:05 | * | strcmp1 quit (Quit: Leaving) |
15:58:40 | brillan | how do I generate docs for imported packages? |
15:58:49 | LeFF | Araq, thanks, I'll try it tomorrow. But you said that passes api is going to be deprecated? |
15:59:35 | Araq | LeFF: don't worry about it. will take years before I deprecate it... |
16:00:03 | Araq | brillan: nim doc2 support a --project switch |
16:00:06 | LeFF | Araq, ok then, thanks. |
16:01:05 | * | kilon quit (Ping timeout: 240 seconds) |
16:01:18 | brillan | Araq: I've tried the --project switch. It shows a link to the sdl2 package, but when I click it I get "file not found" |
16:05:18 | * | kilon joined #nim |
16:05:38 | * | umurgdk joined #nim |
16:05:43 | * | joelmo quit (Quit: Connection closed for inactivity) |
16:08:35 | * | umurgdk_ quit (Ping timeout: 264 seconds) |
16:09:27 | * | yglukhov_ joined #nim |
16:12:38 | * | yglukhov quit (Ping timeout: 260 seconds) |
16:13:59 | * | yglukhov_ quit (Ping timeout: 264 seconds) |
16:14:48 | * | Demon_Fox joined #nim |
16:16:08 | * | aziz quit (Remote host closed the connection) |
16:17:26 | * | pregressive quit (Remote host closed the connection) |
16:19:21 | * | umurgdk quit (Remote host closed the connection) |
16:20:22 | * | softinio quit (Remote host closed the connection) |
16:23:45 | * | Noein joined #nim |
16:26:09 | * | softinio joined #nim |
16:28:21 | * | softinio_ joined #nim |
16:30:27 | * | softinio quit (Ping timeout: 250 seconds) |
16:30:46 | * | softinio_ quit (Remote host closed the connection) |
16:31:04 | * | softinio joined #nim |
16:32:04 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:36:24 | * | Noein quit (Ping timeout: 255 seconds) |
16:44:21 | * | yglukhov joined #nim |
16:47:15 | * | boopisaway is now known as boop |
16:49:06 | * | yglukhov quit (Ping timeout: 272 seconds) |
16:49:45 | * | kilon-alios joined #nim |
16:49:47 | Araq | brillan: dunno, I don't use --project. we have a script that generates all these docs |
16:50:25 | * | kilon quit (Ping timeout: 244 seconds) |
16:54:37 | * | umurgdk joined #nim |
16:57:04 | * | softinio quit (Remote host closed the connection) |
16:58:23 | * | Noein joined #nim |
16:58:58 | * | softinio joined #nim |
16:58:59 | * | umurgdk quit (Ping timeout: 264 seconds) |
17:01:53 | brillan | Araq: ok |
17:19:56 | * | yglukhov joined #nim |
17:20:34 | * | golak joined #nim |
17:21:28 | * | darkf quit (Quit: Leaving) |
17:24:14 | * | Noein quit (Ping timeout: 265 seconds) |
17:24:47 | * | yglukhov quit (Ping timeout: 264 seconds) |
17:28:14 | * | softinio quit (Remote host closed the connection) |
17:31:03 | * | pregressive joined #nim |
17:32:10 | * | strcmp1 joined #nim |
17:32:27 | * | softinio joined #nim |
17:35:22 | * | pregressive quit (Ping timeout: 244 seconds) |
17:43:39 | * | softinio quit (Remote host closed the connection) |
17:43:57 | * | pregressive joined #nim |
17:44:40 | * | softinio joined #nim |
17:51:09 | * | Noein joined #nim |
17:53:27 | * | Demon_Fox quit (Quit: Leaving) |
17:53:52 | * | softinio quit (Remote host closed the connection) |
17:54:36 | * | softinio joined #nim |
17:56:25 | * | UberLambda quit (Quit: GTG) |
18:01:02 | * | Mat4 joined #nim |
18:03:12 | Mat4 | hello |
18:03:26 | * | LeFF_ joined #nim |
18:04:16 | LeFF_ | So I tried creating a hello world compiler pass and it worked. |
18:05:15 | LeFF_ | Could you tell me where to find good examples on the api for creating and modifing PNode's? |
18:08:47 | LeFF_ | PNode is defined in ast.nim and all the api I need is there too? |
18:09:37 | Araq | LeFF_: yeah, there are helpers all over the place. "astalgo" is quite important too |
18:10:15 | Araq | if you know Nim's macro system, you know nim's AST. the compiler uses the same AST. |
18:13:47 | softinio | whats a PNode :-) ? |
18:14:11 | Araq | a NimNode |
18:14:24 | Araq | a node in Nim's AST |
18:18:41 | LeFF_ | Araq, thanks! How can I add a new created PNode after or before existing PNode? |
18:20:30 | Araq | usually you don't, you return a new AST instead |
18:20:58 | Araq | the passes API procs return a tranformed tree |
18:21:39 | LeFF_ | So I just create nkStmtList with added PNodes and return it? |
18:23:04 | LeFF_ | Araq, nevermind, at least now I know where to look for code) |
18:23:40 | Araq | LeFF_: yup |
18:23:54 | Araq | also read this: |
18:24:26 | Araq | http://nim-lang.org/docs/intern.html#debugging-the-compiler |
18:24:48 | LeFF_ | Araq, okey, thanks! |
18:25:11 | * | gsingh93_ joined #nim |
18:25:18 | Araq | and ignore the "git bisect" stuff. |
18:25:34 | * | Araq does not believe in bisect. |
18:26:55 | * | yglukhov joined #nim |
18:28:59 | * | BitPuffin quit (Ping timeout: 264 seconds) |
18:33:07 | * | boop is now known as boopisaway |
18:33:20 | * | boopisaway is now known as boop |
18:35:21 | * | LeFF_ quit (Ping timeout: 246 seconds) |
18:36:57 | * | NimBot joined #nim |
18:39:29 | * | umurgdk joined #nim |
18:45:05 | yglukhov | Hi all. How do i add one seq to another? |
18:46:12 | yglukhov | ah, nevermind. seq.add is the answer %) |
18:46:16 | * | golak quit (Quit: leaving) |
18:50:59 | * | softinio quit (Remote host closed the connection) |
19:00:06 | * | yglukhov quit (Ping timeout: 244 seconds) |
19:00:21 | * | yglukhov joined #nim |
19:04:06 | * | softinio joined #nim |
19:08:31 | * | umurgdk_ joined #nim |
19:09:41 | * | umurgdk quit (Read error: Connection reset by peer) |
19:14:02 | * | umurgdk_ quit (Read error: Connection reset by peer) |
19:14:17 | softinio | so read tutorial parts i and II, what next do you guys recommend? |
19:14:49 | softinio | So far everything clear. Only things I still need to get my head around and understand better are macros mainly and maybe little more about templates |
19:16:28 | softinio | preferred way of installng nim on macos? Any reason not to use brew? |
19:29:59 | * | umurgdk joined #nim |
19:30:02 | * | gokr quit (Read error: Connection reset by peer) |
19:32:21 | * | yglukhov quit (Remote host closed the connection) |
19:34:48 | Araq | dunno what brew's nim package does |
19:36:48 | Araq | softinio: next steps are usually to abuse user-definable operators and macros :-) |
19:37:27 | softinio | Looking at brews script it seems to do the right thing to install it see here for ref: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/nimrod.rb |
19:38:33 | Araq | outdated |
19:38:35 | * | yglukhov joined #nim |
19:39:12 | softinio | ok will remove brew install and install via git method u have detailed in the docs |
19:39:32 | Araq | nah, it's still fine I guess |
19:40:12 | softinio | what was outdated about it ? |
19:40:50 | Araq | it's not Araq/nim anymore |
19:40:58 | Araq | and it's not called nimrod anymore |
19:42:23 | softinio | best to be using master branch or devel ? |
19:43:15 | * | umurgdk quit (Read error: Connection reset by peer) |
19:43:19 | Araq | devel |
19:44:36 | * | umurgdk joined #nim |
19:59:03 | * | umurgdk quit (Read error: Connection reset by peer) |
20:04:01 | * | yglukhov quit (Remote host closed the connection) |
20:08:14 | * | Trustable quit (Remote host closed the connection) |
20:08:25 | * | umurgdk joined #nim |
20:13:02 | softinio | unlike C or Go , nim doesn't seem to have a main() proc/func as the starting point of the app. Is that correct? |
20:15:22 | * | umurgdk quit () |
20:16:22 | Araq | yeah, every top level statement is run for you. |
20:16:29 | Araq | usually people do |
20:16:36 | Araq | proc main() = ... |
20:16:37 | Araq | main() |
20:17:18 | * | NimBot joined #nim |
20:17:27 | softinio | is there an offline manual? |
20:20:28 | * | Noein is now known as enamex |
20:21:32 | Araq | you can build the manual as PDF |
20:21:48 | softinio | nice |
20:22:02 | enamex | proc main() = main() ?? Something's fishy or...? Gonna look around. |
20:23:48 | Araq | requires pdfrubber though |
20:24:42 | Araq | enamex: the three dots are essential and so is the indentation |
20:28:24 | * | NimBot joined #nim |
20:30:28 | softinio | @Araq pdfrubber? |
20:31:18 | * | softinio quit (Remote host closed the connection) |
20:32:09 | * | softinio joined #nim |
20:32:30 | Araq | the malapropism is proportional to my appreciation |
20:34:00 | Araq | (you know it as "pdflatex") |
20:34:41 | ldlework | "She says like literally, music is the air that she breates. And the malaprops make here want to fucking scream." |
20:34:53 | ldlework | "I wonder if she knows what that word means... well its literally not... that." |
20:35:00 | ldlework | breathes* |
20:36:14 | ldlework | http://open.spotify.com/track/5UXusQhn77o9f11H4NKFbM |
20:37:28 | elrood | *her ? ;) |
20:38:12 | elrood | and |
20:38:17 | elrood | *it's ? ;P |
20:38:18 | ldlework | yup |
20:39:03 | elrood | sorry, couldn't resist |
20:39:14 | * | krlan joined #nim |
20:39:18 | ldlework | Really good album btw |
20:39:19 | * | krlan left #nim ("Leaving") |
20:48:56 | * | softinio quit (Remote host closed the connection) |
20:59:05 | * | softinio joined #nim |
21:01:00 | * | zama quit (Ping timeout: 244 seconds) |
21:02:05 | * | zama joined #nim |
21:02:33 | Araq | so ... my mingw include has the right schannel.h file, but my mingw uses some other schannel.h from who knows where |
21:03:10 | * | softinio quit (Ping timeout: 240 seconds) |
21:04:07 | Araq | any ideas? can gcc output its search paths? |
21:13:57 | elrood | print-search-dirs ? |
21:14:21 | * | gsingh93_ quit (Quit: Connection closed for inactivity) |
21:21:48 | * | Kingsquee joined #nim |
21:26:31 | * | Demos joined #nim |
21:30:53 | * | Matthias247 joined #nim |
21:32:24 | * | NimBot joined #nim |
21:34:32 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:37:24 | * | Matthias247 joined #nim |
21:40:00 | * | xet7_ quit (Ping timeout: 264 seconds) |
21:43:22 | * | enamex quit (Ping timeout: 244 seconds) |
21:45:59 | * | softinio joined #nim |
21:48:29 | * | pregressive quit (Remote host closed the connection) |
21:49:19 | * | softinio_ joined #nim |
21:50:27 | * | softinio quit (Ping timeout: 268 seconds) |
21:52:00 | * | Matthias247_ joined #nim |
21:54:10 | * | BitPuffin|osx joined #nim |
21:55:28 | * | softinio joined #nim |
21:55:43 | * | Matthias247 quit (Ping timeout: 252 seconds) |
21:56:46 | * | softinio quit (Remote host closed the connection) |
21:57:13 | * | boop is now known as boopisaway |
21:57:34 | * | softinio joined #nim |
21:58:41 | * | softinio_ quit (Ping timeout: 246 seconds) |
22:03:52 | * | enamex joined #nim |
22:07:23 | * | softinio quit (Remote host closed the connection) |
22:12:18 | * | vendethiel quit (Ping timeout: 244 seconds) |
22:15:53 | * | yglukhov joined #nim |
22:17:58 | * | Matthias247_ quit (Read error: Connection reset by peer) |
22:20:35 | * | yglukhov quit (Ping timeout: 264 seconds) |
22:37:09 | * | Matthias247 joined #nim |
22:38:48 | * | Xe is now known as jnerule |
22:48:23 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:11:33 | * | jnerule is now known as Xe |
23:15:25 | * | elrood quit (Quit: Leaving) |
23:24:23 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:45:57 | * | Kingsqueee joined #nim |
23:45:59 | * | Kingsquee quit (Remote host closed the connection) |
23:46:43 | * | Mat4 quit (Quit: Konversation terminated!) |
23:51:24 | * | Demos quit (Ping timeout: 246 seconds) |