00:05:43 | reactormonk | flaviu, sounds like it |
00:12:35 | flaviu | Looks like I have the big green button: http://i.imgur.com/9nyxTZP.png |
00:13:24 | flaviu | Not sure if that's intentional though, so if someone could review and merge, that'd be great! |
00:17:28 | * | Pisuke joined #nim |
00:25:18 | * | Pisuke quit (Read error: Connection reset by peer) |
00:25:39 | * | dddddd quit (Ping timeout: 252 seconds) |
00:26:28 | * | Pisuke joined #nim |
00:27:42 | * | filwit joined #nim |
00:33:30 | * | askatasuna joined #nim |
00:34:22 | * | vikaton joined #nim |
00:36:37 | * | enquora quit (Quit: enquora) |
00:38:41 | * | khyperia joined #nim |
00:57:26 | * | tennix joined #nim |
01:10:43 | * | askatasuna quit (Ping timeout: 256 seconds) |
01:14:07 | * | johnsoft quit (Ping timeout: 256 seconds) |
01:19:12 | reactormonk | flaviu, you know casts are ugly |
01:19:25 | flaviu | reactormonk: yep. |
01:19:35 | reactormonk | so do something about it :-P |
01:20:15 | flaviu | If I get rid of the cast, it fails to compile with some "over- or underflow" error on that line. |
01:20:57 | reactormonk | using natural/uint somewhere? |
01:21:33 | flaviu | Nope, everything is int. |
01:24:44 | * | jaco60 quit (Ping timeout: 256 seconds) |
01:27:55 | * | kumul joined #nim |
01:37:40 | * | yglukhov_____ joined #nim |
01:41:54 | * | filwit quit (Quit: Leaving) |
01:42:08 | * | yglukhov_____ quit (Ping timeout: 265 seconds) |
02:10:43 | * | tennix quit (Remote host closed the connection) |
02:11:20 | * | tennix joined #nim |
02:31:46 | * | darkf joined #nim |
02:37:45 | * | askatasuna joined #nim |
02:50:07 | * | boop is now known as boopisaway |
03:23:36 | * | kumul quit (Quit: Leaving) |
03:23:57 | * | saml_ quit (Quit: Leaving) |
03:28:20 | * | Jesin quit (Quit: Leaving) |
03:56:34 | * | Pisuke quit (Ping timeout: 265 seconds) |
04:05:19 | * | askatasuna quit (Quit: WeeChat 1.2) |
04:06:46 | * | Senketsu quit (Ping timeout: 276 seconds) |
04:06:51 | * | Pisuke joined #nim |
04:08:07 | * | vikaton quit (Quit: Connection closed for inactivity) |
04:11:28 | * | Senketsu joined #nim |
04:13:19 | * | TEttinger joined #nim |
04:14:00 | * | rektide quit (Quit: Lost terminal) |
04:14:35 | * | rektide joined #nim |
04:29:55 | apense | what's the reasoning behind arrays not having `$`? |
04:32:38 | apense | n/m i found it in system.nim |
04:34:29 | * | rektide quit (Remote host closed the connection) |
04:37:54 | * | dalarmmst quit (Ping timeout: 252 seconds) |
04:54:40 | * | rgv151 quit (Read error: Connection reset by peer) |
04:55:16 | * | rgv151 joined #nim |
05:06:27 | * | BitPuffin|osx quit (Ping timeout: 256 seconds) |
05:12:40 | * | jszymanski joined #nim |
05:14:01 | * | gour joined #nim |
05:38:44 | * | jszymanski quit (Quit: computer sleeps...) |
06:17:37 | * | yglukhov_____ joined #nim |
06:17:46 | * | yglukhov_____ quit (Remote host closed the connection) |
06:18:20 | * | yglukhov_____ joined #nim |
06:19:37 | * | gour quit (Ping timeout: 240 seconds) |
06:20:19 | * | Kingsquee joined #nim |
06:31:44 | * | jszymanski joined #nim |
07:05:25 | * | johnsoft joined #nim |
07:20:55 | gokr | Good morning |
07:21:06 | Araq | Good morning |
07:21:11 | dtscode | Good morning |
07:24:45 | * | zahary quit (Ping timeout: 252 seconds) |
07:26:08 | * | gour joined #nim |
07:27:58 | gokr | Araq: You my blit image? |
07:28:01 | gokr | saw |
07:28:10 | Araq | yeah, very cool |
07:28:24 | Araq | but did you blit it or draw it? |
07:28:51 | gokr | It was extremely manually done - I explored down to the proper TRectangle and then wrote a snippet that used your prim to blit on it - and I ran it as a doit |
07:29:01 | gokr | You know, live programming ;) |
07:29:18 | gokr | But yes, the basic machinery works. |
07:29:29 | gokr | "Draw"? |
07:29:52 | pigmej | regarding that 'colors everywhere' my emacs buffers are now full broken colors because of that |
07:29:58 | * | Trustable joined #nim |
07:30:10 | gokr | For anyone wondering I am describing this wonderous piece of screenshot: http://snag.gy/lZF4b.jpg |
07:30:13 | * | egrep quit (Quit: Error -38: Black hole has swalled this client.) |
07:30:25 | pigmej | reactormonk: I updated yesterday "call-signatures" I think it will be renamed "thing-at-point" in near future |
07:30:45 | * | egrep joined #nim |
07:31:32 | * | gour quit (Quit: Using Circe, the loveliest of all IRC clients) |
07:32:08 | Araq | pigmej: hrm? so istty() doesn't work? |
07:32:55 | * | gour joined #nim |
07:33:34 | pigmej | Araq: not a tall |
07:33:36 | pigmej | not at all |
07:34:14 | pigmej | but that might be not the real issue, I mean, mabye istty() is ok, but something other is 'wrong' |
07:34:40 | pigmej | I will check tonight what's the reason |
07:34:41 | Araq | pigmej: the compiler only produces colors when the output stream is a tty |
07:34:47 | pigmej | hmm |
07:35:40 | pigmej | Araq: same applies to nimsuggest ? |
07:36:02 | pigmej | because I'm pretty sure that I saw yesterday "red" warning about "nim not in PATH" from nimsuggest |
07:36:14 | pigmej | where "red" was escape mess instead colors |
07:36:27 | pigmej | I will test tonight though (+8h or so) |
07:39:02 | Araq | pigmej: should apply to nimsuggest too yeah |
07:39:15 | Araq | but again I notice that I predicted these bugs ... |
07:40:29 | Araq | escape sequences to produce colors are fundamentally broken |
07:40:31 | * | Ven joined #nim |
07:41:10 | pigmej | Araq: +1 |
07:41:29 | pigmej | AND there is other problem also |
07:41:44 | pigmej | currently those colors are hardcoded ? |
07:43:05 | Araq | and would have been replaced by an API based approach to this problem if it weren't for the Unix beards who think that passing around untyped streams of bytes around everywhere is a "philosophy" to develop software. |
07:44:02 | pigmej | Araq: I only know that cmake colorizes output which is 'not' broken, all others are usually broken |
07:46:02 | Araq | pigmej: --usecolors:off should work though |
07:51:01 | Araq | pigmej: yup, these colors are hardcoded. |
07:55:02 | pigmej | so when one will have green background == fuckup ;p |
07:55:04 | pigmej | etc |
08:04:16 | * | coffeepot joined #nim |
08:09:43 | * | zahary joined #nim |
08:09:55 | * | woadwarrior joined #nim |
08:14:00 | * | kas joined #nim |
08:14:11 | * | woadwarrior quit (Client Quit) |
08:24:12 | * | jszymanski quit (Quit: computer sleeps...) |
08:33:37 | * | shiyaz_ quit (Quit: leaving) |
08:37:21 | * | kas quit (Remote host closed the connection) |
08:44:13 | * | johnsoft quit (Ping timeout: 264 seconds) |
08:44:51 | * | johnsoft joined #nim |
08:47:04 | * | dom96_ joined #nim |
09:27:33 | * | tennix quit (Remote host closed the connection) |
09:27:44 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:33:48 | * | tennix joined #nim |
09:33:48 | * | tennix quit (Changing host) |
09:33:48 | * | tennix joined #nim |
09:41:57 | * | tennix quit (Ping timeout: 240 seconds) |
09:42:50 | * | tennix joined #nim |
09:48:05 | * | BitR quit (Ping timeout: 256 seconds) |
09:49:24 | * | milosn quit (Ping timeout: 245 seconds) |
09:50:32 | * | milosn joined #nim |
09:51:44 | * | Demon_Fox_ joined #nim |
09:52:18 | * | Demon_Fox quit (Ping timeout: 265 seconds) |
09:55:09 | * | jaco60 joined #nim |
09:58:09 | * | woadwarrior joined #nim |
10:01:09 | * | boopisaway is now known as boop |
10:03:51 | * | woadwarr_ joined #nim |
10:05:37 | * | woadwarrior quit (Ping timeout: 240 seconds) |
10:07:25 | * | dom96_ quit (Ping timeout: 246 seconds) |
10:18:20 | * | BitPuffin|osx joined #nim |
10:24:11 | * | flaviu quit (Remote host closed the connection) |
10:24:22 | * | flaviu joined #nim |
10:24:55 | * | coffeepot quit (Ping timeout: 256 seconds) |
10:28:55 | * | johnsoft quit (Ping timeout: 250 seconds) |
10:29:35 | * | johnsoft joined #nim |
10:38:01 | * | xificurC quit (Ping timeout: 250 seconds) |
10:47:32 | * | xificurC joined #nim |
10:53:13 | * | xificurC quit (Ping timeout: 264 seconds) |
10:53:24 | * | xificurC_ joined #nim |
10:59:20 | * | johnsoft quit (Ping timeout: 256 seconds) |
10:59:37 | * | johnsoft joined #nim |
11:08:22 | * | kas joined #nim |
11:09:50 | * | jszymanski joined #nim |
11:11:17 | * | wedowmaker quit (Ping timeout: 240 seconds) |
11:15:03 | * | jaco60 quit (Quit: Leaving) |
11:18:07 | * | jszymanski1 joined #nim |
11:19:20 | * | dddddd joined #nim |
11:20:58 | * | jszymanski quit (Ping timeout: 255 seconds) |
11:21:50 | * | dom96_ joined #nim |
11:39:27 | * | rgv151 quit (Quit: Leaving...) |
11:53:28 | * | tennix quit (Remote host closed the connection) |
11:54:19 | * | ozra joined #nim |
11:54:34 | * | BitR joined #nim |
11:55:18 | * | xificurC_ quit (Quit: WeeChat 1.2) |
11:55:39 | * | xificurC joined #nim |
12:03:47 | * | tennix joined #nim |
12:08:20 | * | tennix quit (Ping timeout: 264 seconds) |
12:08:31 | * | dom96_ quit (Ping timeout: 246 seconds) |
12:19:20 | * | Ven joined #nim |
12:21:56 | * | NimBot joined #nim |
12:42:12 | * | kumul joined #nim |
12:47:43 | * | ggVGc quit (Quit: leaving) |
12:47:45 | * | Kingsquee quit (Quit: Konversation terminated!) |
12:48:42 | * | OnO quit (Ping timeout: 256 seconds) |
13:01:19 | * | jszymanski1 quit (Quit: computer sleeps...) |
13:08:15 | * | arunah quit (Remote host closed the connection) |
13:13:38 | * | kzisme_ joined #nim |
13:20:17 | * | darkf_ joined #nim |
13:20:26 | * | kas quit (Ping timeout: 256 seconds) |
13:21:09 | * | darkf quit (Disconnected by services) |
13:21:11 | * | darkf_ is now known as darkf |
13:22:47 | * | kzisme_ left #nim (#nim) |
13:31:42 | * | Senketsu quit (Read error: Connection reset by peer) |
13:37:46 | * | khyperia left #nim ("WeeChat 1.3-dev") |
13:53:48 | * | coffeepot joined #nim |
13:55:40 | * | Ven quit (Ping timeout: 276 seconds) |
14:03:20 | * | Ven joined #nim |
14:12:51 | * | saml joined #nim |
14:21:22 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:22:54 | * | kumul left #nim ("Leaving") |
14:25:38 | * | Arrrr joined #nim |
14:30:16 | * | Etheco quit (Quit: Leaving) |
14:32:56 | Arrrr | http://www.reddit.com/r/nim/comments/39o10h/when_i_compile_and_launch_win64_console_program/ |
14:37:51 | * | kas joined #nim |
14:54:58 | wuehlmaus | btw: i really love the look of nim-lang.org. Whoever did it: looks VERY nice IMO. |
15:00:44 | * | gour quit (Quit: Using Circe, the loveliest of all IRC clients) |
15:10:16 | * | kas quit (Ping timeout: 265 seconds) |
15:13:04 | * | gour joined #nim |
15:15:42 | * | jszymanski joined #nim |
15:33:19 | * | gokr quit (Quit: Leaving.) |
15:33:44 | * | gyeates joined #nim |
15:35:07 | * | gyeates quit (Client Quit) |
15:35:19 | * | gyeates joined #nim |
15:40:13 | * | ChrisMAN quit (Remote host closed the connection) |
15:41:29 | * | ChrisMAN joined #nim |
15:50:00 | * | darkf quit (Quit: Leaving) |
15:54:21 | * | enquora joined #nim |
15:56:35 | * | Sembei joined #nim |
15:58:36 | * | Pisuke quit (Ping timeout: 265 seconds) |
16:01:01 | * | gour quit (Ping timeout: 265 seconds) |
16:07:37 | * | yglukhov_____ quit (Ping timeout: 264 seconds) |
16:11:10 | * | gokr joined #nim |
16:14:46 | * | Ven joined #nim |
16:18:00 | * | kas joined #nim |
16:21:10 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:29:39 | * | dalarmmst joined #nim |
16:29:44 | * | gokr quit (Quit: Leaving.) |
16:35:39 | * | gokr joined #nim |
16:42:24 | * | OnO joined #nim |
16:43:18 | * | wb_ joined #nim |
16:43:22 | * | gnzh joined #nim |
16:43:24 | * | keypusher joined #nim |
16:43:28 | OnO | pigmej: regarding green on green, you will have a fuckup in any program, solution is simple as redefining green color in your Terminal app |
16:43:36 | * | wuehlmau1 joined #nim |
16:44:12 | * | vendethiel- joined #nim |
16:45:09 | * | vendethiel quit (*.net *.split) |
16:45:11 | * | wuehlmaus quit (*.net *.split) |
16:45:11 | * | Gonzih quit (*.net *.split) |
16:45:11 | * | wb quit (*.net *.split) |
16:45:11 | * | key_ quit (*.net *.split) |
16:45:22 | * | woadwarr_ quit (Quit: Textual IRC Client: www.textualapp.com) |
16:47:19 | * | yglukhov______ joined #nim |
16:51:55 | * | Matthias247 joined #nim |
16:52:32 | * | TEttinger left #nim (#nim) |
16:53:07 | * | brson joined #nim |
16:53:48 | * | askatasuna joined #nim |
16:57:43 | reactormonk | pigmej, sounds good to me |
16:59:49 | * | gokr quit (Quit: Leaving.) |
17:09:20 | * | Arrrrr joined #nim |
17:12:29 | * | Arrrr quit (Ping timeout: 246 seconds) |
17:16:01 | * | matkuki joined #nim |
17:17:37 | * | wuehlmau1 is now known as wuehlmaus |
17:20:25 | matkuki | Araq, def-, dom96: How do I define this in Nim (from a Python C header): PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */ |
17:20:27 | matkuki | array[?, PyObjectPtr] |
17:20:28 | matkuki | The dynamic part is what is confusing me. |
17:21:43 | fowl | Type uncheckedarray*{.unchecked.}[t] = array[1,t] |
17:22:45 | fowl | Uncheckedarray[pyObjPtr] |
17:22:55 | matkuki | fowl: Thanks, where in the source is 'uncheckedarray' ? |
17:22:58 | * | gnzh quit (Ping timeout: 256 seconds) |
17:23:09 | fowl | Wherever you define it |
17:23:31 | matkuki | Sorry, I mean where in the Nim source is it defined? |
17:23:41 | fowl | It isn't defined |
17:23:54 | fowl | Thats why I typed it out |
17:23:54 | dom96 | he's showing you how to define it |
17:31:18 | matkuki | dom96: Yes, I know. I meant it's type definition the Nim source code. It's in 'rtarrays.nim', right? |
17:31:29 | * | Jesin joined #nim |
17:31:52 | * | gokr joined #nim |
17:32:26 | matkuki | Sorry typo. 'I meant it's type definition in the Nim source code.' |
17:36:19 | matkuki | fowl: What library is UncheckedArray in? I'm getting: undeclared identifier: 'UncheckedArray' |
17:36:23 | * | keypusher quit (Quit: Konversation terminated!) |
17:36:55 | * | key_ joined #nim |
17:37:12 | fowl | matkuki: I just defined it. Its not in the standard lib anywhere. |
17:38:40 | matkuki | fowl, dom96: I totally misunderstood you guys, sorry. It just clicked to me. |
17:38:41 | matkuki | fowl: Thanks! |
17:39:24 | fowl | matkuki: its a pretty unsafe thing to do but with c libs its sometimes unavoidable |
17:40:09 | matkuki | fowl: Got it, thanks. I'm porting the Python 3 C API to Nim. There's no avoiding it. |
17:42:04 | matkuki | fowl, dom96: I was thrown of because there is a similar definition in 'rtarrays.nim': UncheckedArray* {.unchecked.}[T] = array[0..100_000_000, T] |
17:43:00 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:48:02 | matkuki | fowl: Are you the maintainer of the github nim-lang/python repo? |
17:49:45 | fowl | Nah I just moved it there |
17:55:44 | * | don_alfredo joined #nim |
17:57:25 | * | BitPuffin|osx quit (Ping timeout: 264 seconds) |
18:02:02 | Arrrrr | fowl, Do you think interfaces will make it to 1.0? |
18:07:47 | * | gour joined #nim |
18:08:02 | fowl | Arrrrr: I don't know |
18:09:12 | Arrrrr | Listen to your heart |
18:10:08 | fowl | Lol I mainly did it to see if a go feature could be implemented in nim |
18:10:59 | fowl | I had a macro where you could do 'import_repos github.com/user/repo' |
18:11:34 | fowl | Because go is so amazing with its import from github statement its just freaking revolutionary |
18:12:07 | Arrrrr | That should make it to core lib |
18:13:26 | * | Arrrrr quit (Quit: WeeChat 1.2) |
18:16:50 | * | Arrrr joined #nim |
18:23:36 | * | gour quit (Ping timeout: 256 seconds) |
18:32:07 | Araq | matkuki: chances are high you don't even need all the object fields since only a pointer to it is passed around |
18:32:42 | Araq | in general C headers are a mess of implementation details with tiny bits of the official public API in between |
18:35:30 | matkuki | Araq: Thanks for the tip. For now I'm going thoroughly through everything. Just finished the high level layer. You're right, it's a mess. |
18:36:50 | * | gyeates quit (Ping timeout: 246 seconds) |
18:39:45 | matkuki | Araq: I have to thank you again Andreas, Nim is absolutely great to work with! Used it for a couple of projects at work already. |
18:40:41 | Araq | always glad to hear. fyi we're collecting a couple of "success stories" for the website |
18:41:06 | Araq | so ... once we have a couple we can update the website |
18:41:58 | Araq | ozra: any progress? if not, there is lots of other things that require your attention ;-) |
18:43:30 | ozra | Yes, I'm digging further (got side tracked by lawn mowing and shit and some editor plugins coding) I'm trying to get a deeper understanding, I'd prefer to fix it more properly than just a tack on fix. |
18:43:34 | ozra | Is something on fire? |
18:45:41 | matkuki | Araq: It's a small and simple preprocessor/parser for PLC source code(CODESYS) and it's probably not good enough for a success story. |
18:45:42 | matkuki | When my game gets to the level I can show it off, I'll be happy to write a success story for it. That's also why I need the python bindings up and running. |
18:51:20 | Arrrr | The next minecraft will be programmed in nim |
18:52:10 | Araq | Arrrr: and it will be a voxel engine ;-) |
18:53:20 | Arrrr | You cannot take a language seriously if there isnt at least 2 voxel engines programmed there |
18:58:30 | dom96 | ugh, why is everything orange on Github |
18:58:57 | dom96 | did somebody change the Nim syntax highlighting that Github uses? |
19:00:57 | fowl | Does nim have a voxel engine? |
19:01:33 | Araq | fowl: who do you ask? usually it's you who knows these things |
19:01:56 | apense | there really is a lot of orange |
19:02:06 | fowl | Thought maybe there was one I dont know about |
19:04:03 | ozra | dom96: Damn has it fucked up? I fixed some bugs in the syntax but must have fucked something else up. Link please? |
19:04:40 | dom96 | ozra: just look at any source code |
19:04:52 | dom96 | where is the repo that contains the highlighter? |
19:05:17 | ozra | Any (!?) Wot! @dom96: Varriounts |
19:05:35 | dom96 | https://github.com/nim-lang/Nim/blob/devel/koch.nim#L70 |
19:06:27 | Araq | the problem is that you all try to do semantic highlighting with shitty additonal lexer rules |
19:06:53 | Araq | this can only fail. |
19:06:59 | dom96 | This one? https://github.com/Varriount/NimLime |
19:07:05 | dom96 | The highlighting was fine as it was. |
19:07:18 | Araq | dom96: no it wasn't. |
19:07:21 | dom96 | Please don't over-complicate it. |
19:07:24 | Araq | it was buggy like hell. |
19:07:35 | dom96 | yes, bugs. |
19:07:40 | ozra | Araq: Yeah, it's pretty much "the only way" for editors.. They can highlight without understanding the full context.. |
19:07:43 | Araq | 24'i32 never worked, for instance |
19:07:45 | dom96 | We don't need semantic highlighting |
19:07:50 | dom96 | that is a feature |
19:07:59 | Araq | ozra: highlighting should be based on lexing |
19:08:10 | Araq | if you have no real parser lying around |
19:08:39 | * | OmIkRoNiXz joined #nim |
19:08:44 | ozra | dom96: yeah, I added additional scope for params of procs, seems like github treats it differently than sublime. I'll look into it. |
19:09:14 | dom96 | ozra: yeah, and it doesn't just highlight params |
19:09:14 | * | rektide joined #nim |
19:11:07 | ozra | Araq: It's getting closer and closer to the real parsing rules, which argueably is a bit overkill for editing, but I wanted some additional classing. The problem here is that github matches some classes and puts colors that don't match with sublime methodology. I'm jumping on this right away @dom96, can make a fork of the highlighter ("simple" and "advanced"). |
19:12:10 | ozra | Araq: You're tied to the requirements of github / editors, and they all use regexp rules. |
19:17:36 | dom96 | ozra: thanks |
19:18:15 | ozra | anyways, the i32 etc., unicode, proc def I've fixed. And some other stuff. So I'll just tear away the extras for now so github goes back to normal when they pull for a new build. |
19:19:44 | * | filwit joined #nim |
19:35:02 | * | Arrrr quit (Quit: WeeChat 1.2) |
19:36:25 | * | silven quit (Ping timeout: 264 seconds) |
19:38:59 | Araq | ozra: I know, that's why I'm saying "stick to lexing rules" |
19:40:57 | ozra | Yeah it doesn't implement all of nim lexing rules atm. |
19:42:34 | * | silven joined #nim |
19:52:10 | * | sepisoad joined #nim |
19:52:26 | ozra | dom96: My latest fixes since quite a bunch of days ago are still not pulled. Which by extension means that github rebuilds rather seldom. Must get hold of Varriount - you here?. |
19:54:06 | * | Strikecarl joined #nim |
19:54:55 | OnO | is there any way to attach some meta attributes to class fields visible only to the macros (compile time)? |
19:55:03 | Strikecarl | how can i do this in nim? |
19:55:04 | Strikecarl | for (int i = 0; i < toEncrypt.size(); i++) |
19:55:50 | Araq | Strikecarl: for i in 0..< toEncrypt.size: |
19:56:03 | Strikecarl | ty |
19:56:13 | filwit | On0: depends on what you mean by "class" fields.. but try using pragmas |
19:58:16 | OnO | okay, I got some: type User = object of RootObj; name: string; pass: string |
19:58:38 | OnO | I want to attach some extra info to .name for example that I want to index on this field |
19:58:55 | OnO | apparently macro pragma does not work here |
19:59:09 | ozra | dom96: I think it is a great chance the highlights _will_ be fixed if that PR is pulled. Made a slight update to it also. Maybe there should be a specific github highlighter repo in nim-lang/ instead? |
19:59:36 | dom96 | ozra: That might be a good idea |
19:59:59 | dom96 | Any ideas why they changed from Pygments? |
20:00:49 | Strikecarl | Guys, http://pastebin.com/raw.php?i=iJAwttCy. |
20:00:54 | Strikecarl | Trying to implement XOR |
20:01:02 | Strikecarl | woopsie, http://pastebin.com/raw.php?i=iJAwttCy |
20:01:10 | Strikecarl | but, when i use the XOR(string) |
20:01:15 | Strikecarl | This happens: |
20:01:48 | fowl | Your function takes 2 args and you pass it one |
20:01:50 | Strikecarl | http://i.imgur.com/XmTpHSa.png |
20:01:58 | filwit | OnO: what do you mean 'macro pragmas' do not work? You've tried making a dummy "indexThis" macro which you put on the field as a pragma and you can't see it from inside a compile-time block via getType()? |
20:01:58 | Strikecarl | 2 args |
20:02:01 | Strikecarl | whats the second one, fowl? |
20:02:20 | filwit | OnO: I need to do some tests on that myself to know what's possible, but I'm pretty sure it is.. one sec |
20:02:28 | fowl | Strikecarl: two args string and toEncrypt |
20:02:34 | Strikecarl | oh shit |
20:02:44 | Strikecarl | i done goofed |
20:02:44 | fowl | Strikecarl: you probably meant toencrypt:string |
20:02:48 | Strikecarl | Yea |
20:02:52 | Strikecarl | just realized xD |
20:03:19 | filwit | OnO: though an alternative solution is to use distinct types.. eg: name: string; pass: IndexString; |
20:03:22 | ozra | dom96: I honestly know next to nothing of that stuff. I've just fixed bugs and extended on NimLime highlighting, and that is the current source for the highlighting for github. Which might not be the best option. |
20:03:28 | Strikecarl | hmh, this is harder than expected, is there such thing as "size" from C++? |
20:04:06 | filwit | sizeof |
20:04:15 | filwit | ? |
20:04:47 | OnO | filwit: pragma macros seem to work only on procs, but they don't work inside type blocks |
20:04:50 | filwit | or do you mean an array's 'len' ? |
20:05:07 | filwit | OnO: i see.. didn't realize that.. |
20:05:26 | OnO | filwit: unfortunatelly I want to encode lot more there, eg. name {.sql: index, lazy.}: string |
20:05:43 | OnO | and I was hanging around today how I can do it in Nim |
20:07:01 | Strikecarl | is there an ^/exclusive or in NIM? |
20:07:03 | Araq | OnO: read the pragma in your macro? why wouldn't that work? |
20:07:16 | Araq | Strikecarl: 'xor' |
20:07:22 | Strikecarl | ty |
20:07:39 | Strikecarl | xor expects int's |
20:07:41 | Strikecarl | i need it for strings |
20:07:46 | Strikecarl | what to do kek |
20:08:26 | filwit | OnO: pragma's on the members seem to work for me |
20:08:49 | filwit | Ono: you have to put them before the ':' though, like for vars |
20:09:17 | filwit | so: type Something = object; name {.sql: index, lazy.}: string; ... |
20:10:16 | filwit | so: type Something = object; name {.sql: index, lazy.}: string; ... |
20:10:27 | OnO | tried, getting error that it is invalid pragma: https://gist.github.com/nanoant/e478b88339aacecd6d59 |
20:10:29 | filwit | whoops |
20:10:32 | OnO | I must do something wrong |
20:10:39 | * | Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
20:10:43 | filwit | errr no i'm getting that error now too |
20:10:45 | filwit | one sec |
20:10:57 | don_alfredo | Strikecarl: treat a string as a sequence of bytes, xor each, then convert back to a string |
20:14:10 | Araq | OnO: macro invokations as pragmas only work for routines |
20:15:12 | OnO | that's what I thought, any way to attach some meta information to type field that will be visible for macros via AST? |
20:15:57 | Araq | OnO: not really, but you can add it. we need a way to access doc strings anyway, could use the same mechanism for it |
20:17:11 | Araq | or you could add another pragma |
20:17:15 | filwit | OnO: alternatively you could store meta-info about the types in a separate file which gets consumed and cross-checked by your macro at compile-time |
20:17:37 | * | Matthias247_ joined #nim |
20:17:59 | Araq | {.pragma sql, verbatim.} # compiler ignores 'sql' but keeps it in the AST |
20:18:29 | Araq | ^ yeah ... I ike this solution |
20:20:16 | Araq | or perhaps the compiler can special case field {.mymacro.}: Type |
20:20:34 | * | Matthias247 quit (Ping timeout: 272 seconds) |
20:20:39 | Araq | cause pragma pragmas are defective in the language right now, you cannot export them |
20:21:40 | OnO | that's interesting that you can define empty pragma: {.pragma: indexOn.} and then you can attach it to the field :) |
20:22:04 | Araq | yeah but it'll be gone in the AST after sem'check, I think |
20:22:08 | Araq | or maybe not |
20:22:17 | Araq | but you cannot access it via getType, quite sure |
20:22:33 | OnO | aaa.... that's bad, lemme check |
20:23:32 | filwit | OnO: just checked, doesn't show up |
20:23:55 | filwit | OnO, Araq: doesn't show up with getType() i mean |
20:24:13 | filwit | at least, not when i just echo treeRepr |
20:24:26 | Araq | OnO: any progress on the "TR macros shouldn't be applied recursively" problem? |
20:26:51 | OnO | okay, first thing was that we cannot avoid that, you remember my example of two TR macros one for "x.y" (read) other "x.y = v" (write) |
20:27:09 | OnO | apparently the write needs to protect itself from applying read TR too |
20:27:20 | OnO | so recursive barrier does not help here |
20:27:28 | pigmej | reactormonk: hey, do you have any idea how can I apply emacs "theme" + mode colors on string ? |
20:27:51 | OnO | another problem is {.noRewrite: macro.} param |
20:28:02 | OnO | so we specify which TR macro we block |
20:28:24 | Araq | no, you give it a list, not a single macro |
20:28:32 | OnO | okay, may be a list |
20:29:05 | OnO | but if I don't attach this to the NimNode, but keep it as kind of surrounding pragma node, I won't have access to such pragma node inside patterns |
20:29:46 | * | enquora quit (Quit: enquora) |
20:29:56 | OnO | since patterns first match part of AST, then rest happens, I have no idea how to check if the matched node is encapsulated in the .noRewrite pragma node |
20:30:15 | OnO | here: proc matches(c: PPatternContext, p, n: PNode): bool |
20:30:39 | OnO | just have a n which is a match, but have no access to its parent |
20:31:17 | Araq | doesn't look like a hard problem. in general you need to keep the relevant up pointers during the recursion |
20:31:39 | Araq | since as you noticed there is no .up field. (for lot's of reasons.) |
20:31:57 | reactormonk | pigmej, I think via face text properties |
20:32:04 | pigmej | yeah that's for sure |
20:32:10 | pigmej | but how to call it :) |
20:33:27 | reactormonk | err, nope |
20:35:19 | pigmej | I wanted to do some 'fancy' 'thing-at-point' |
20:35:20 | OnO | Araq: yeah okay, so this is inevitable |
20:37:14 | * | sepisoad quit (Ping timeout: 246 seconds) |
20:37:56 | OnO | Araq: any progress on this fancy const + set + arrays bug related to msgs.nim? |
20:38:30 | Araq | haven't looked into it yet, but I remember fixing a very similar bug |
20:42:21 | Araq | bbl |
20:44:23 | reactormonk | pigmej, see how the syntax HL is done |
20:44:43 | pigmej | I saw it and I have no idea what the heck |
20:45:06 | * | matkuki quit (Read error: Connection reset by peer) |
20:45:37 | * | matkuki joined #nim |
20:46:43 | apense | Strikecarl: check out https://github.com/apense/shimsham/blob/master/jh/simple.nim . the strToBytes and bytesToStr do what you're trying to, I think |
20:46:53 | apense | oh he quit |
20:54:02 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 38.0.5/20150525141253]) |
20:56:11 | * | kas quit (Ping timeout: 256 seconds) |
20:56:23 | * | gyeates joined #nim |
21:09:16 | * | reactormonk quit (Quit: WeeChat 1.1.1) |
21:29:10 | dom96 | hrm, so I just copied my Nim install (On Windows) onto some flash storage to transfer onto a Raspberry Pi. Linux tools sure get confused by Windows' line endings. |
21:30:27 | * | reactormonk joined #nim |
21:32:32 | filwit | was just running Nim on a Rasberri Pi 2 and Mips CI20 board for performance comparison yesterday :) |
21:32:51 | * | yglukhov______ quit (Quit: Be back later ...) |
21:33:38 | filwit | er... Raspberry* |
21:38:53 | * | askatasuna quit (Quit: WeeChat 1.2) |
21:42:16 | * | Matthias247_ quit (Ping timeout: 272 seconds) |
21:50:35 | * | jszymanski quit (Quit: computer sleeps...) |
21:50:37 | * | infinity0 joined #nim |
21:50:42 | infinity0 | 4497c785c6556e82a1ccc11688fd2425d326f3e95770bb266a234e87da7cc82b ../nim-0.11.2.zip |
21:50:45 | infinity0 | could someone confirm that? |
21:51:25 | * | gyeates quit (Ping timeout: 264 seconds) |
21:53:28 | * | elbow_jason joined #nim |
21:54:51 | * | elbow_jason quit (Client Quit) |
21:56:24 | * | Trustable quit (Remote host closed the connection) |
22:02:05 | ozra | what would be analogous to exit() in C? |
22:03:05 | * | gyeates joined #nim |
22:03:40 | ozra | nevermind. Was obvious to guess ;) |
22:05:24 | * | don_alfredo quit (Quit: WeeChat 1.2) |
22:07:40 | * | filwit quit (Quit: Leaving) |
22:13:59 | * | gyeates quit (Ping timeout: 245 seconds) |
22:24:58 | * | vikaton joined #nim |
22:25:08 | vikaton | forget compiling to JavaScript |
22:25:16 | vikaton | we need to compile to WebAssembly asap! |
22:25:54 | jackv | lol this is a thing now |
22:30:26 | ldlework | Its certainly welcome.. |
22:30:43 | * | gg_ joined #nim |
22:30:58 | * | wu-lee joined #nim |
22:31:02 | * | gg_ quit (Client Quit) |
22:36:17 | jackv | why is there a compile to JS feature? isn't Nim->C->JS preferred in a lot of cases? |
22:37:13 | reactormonk | jackv, why? native JS compilation produces better results |
22:37:26 | jackv | ah, wasn't aware of that |
22:38:33 | jackv | I think I was just going off of what def- said in his article http://hookrace.net/blog/porting-nes-go-nim/ |
22:38:43 | jackv | but I guess it was just that the JS backend wasn't stable enough |
22:40:37 | * | dddddd quit (Ping timeout: 264 seconds) |
22:48:57 | wu-lee | quick nube q: trying to write a proof-of-concept LED flasher for AVR in nim, |
22:49:19 | wu-lee | how to write to a fixed memory address (a port)? |
22:53:38 | * | gyeates joined #nim |
23:04:31 | * | doxavore joined #nim |
23:06:27 | * | boop is now known as boopisaway |
23:07:54 | * | boopisaway is now known as boop |
23:22:44 | ozra | Araq: Do you have a quick tip on how to dir/investigate the typemap? I have two solutions for getting the first stage of the bug to resolve, but now it's the typevars instead. Seems to me all keys and vals are nil (?) |
23:32:10 | * | g_ joined #nim |
23:32:34 | * | g_ is now known as Guest25461 |
23:33:35 | Guest25461 | does the e for "to the power of 10" as in 7e8 meaning 7 * 10 ^ 7 work for the negative numbers? can I do 5e-4 for example? |
23:33:44 | infinity0 | lib/impure/dialogs.nim(15, 3) Error: cannot open 'glib2' |
23:33:45 | infinity0 | lib/impure/dialogs.nim(15, 10) Error: cannot open 'gtk2' |
23:33:48 | infinity0 | what do i do with that |
23:34:01 | infinity0 | install gtk-dev or something? but "import" suggests a nim module, which doesn't exist there |
23:34:42 | infinity0 | this is in 0.11.2 but also git HEAD |
23:36:13 | jackv | infinity0, interesting |
23:36:24 | apense | Guest25461: sure does |
23:36:25 | jackv | I'm getting the same thing, but I have libglib2.0-dev installed |
23:36:47 | Guest25461 | thanks |
23:36:51 | apense | np |
23:36:55 | * | Guest25461 quit (Client Quit) |
23:37:24 | infinity0 | i see gtk module was removed on dec 1 in the git log |
23:37:30 | infinity0 | is the dialog module obsolete then? |
23:38:29 | infinity0 | commit ee520689d7e79f87078e3a764db182f647ac612a |
23:38:35 | jackv | infinity0, hang on, I'm installing libgtk |
23:39:44 | jackv | hmm, still can't find "glib2" |
23:40:12 | jackv | oh well duh, yeah it's an import |
23:40:25 | jackv | I'm on 0.11.2 stable so |
23:41:10 | infinity0 | yeah it affects both the release and HEAD |
23:41:32 | infinity0 | i guess i'll just rm it from the tree and try to build again |
23:41:33 | jackv | alright, found the problem |
23:41:40 | jackv | infinity0, nimble install gtk2 |
23:41:55 | jackv | relevant issue: https://github.com/nim-lang/Nim/issues/623 |
23:42:32 | infinity0 | ah ok |
23:42:37 | infinity0 | babel is like a packaging directory for nim? |
23:42:55 | jackv | infinity0, yeah |
23:43:06 | infinity0 | aha, i see this https://github.com/nim-lang/gtk2 |
23:43:06 | jackv | so apparently "dialogs" remains in the standard lib |
23:43:24 | jackv | but the things that "dialogs" requires need to be pulled in externally |
23:43:34 | jackv | I'll file an issue on github |
23:43:47 | infinity0 | ok, thanks |
23:47:19 | infinity0 | tools/nimrepl.nim also imports those things, fwiw |
23:48:08 | jackv | alright, I'll add that too, thanks |
23:50:25 | jackv | https://github.com/nim-lang/Nim/issues/2950 if there's anything more to add |
23:50:44 | infinity0 | sure |
23:57:40 | * | jaco60 joined #nim |
23:58:10 | * | filwit joined #nim |
23:58:34 | filwit | does Nim now use Clang as the default C compiler? |
23:59:05 | apense | if you're on windows, there's no need for dialog to import gtk2 |
23:59:13 | apense | that should be changed i think |
23:59:24 | apense | that might be what y'all are talking about. sry |