<< 17-06-2015 >>

00:05:43reactormonkflaviu, sounds like it
00:12:35flaviuLooks like I have the big green button: http://i.imgur.com/9nyxTZP.png
00:13:24flaviuNot 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:12reactormonkflaviu, you know casts are ugly
01:19:25flaviureactormonk: yep.
01:19:35reactormonkso do something about it :-P
01:20:15flaviuIf I get rid of the cast, it fails to compile with some "over- or underflow" error on that line.
01:20:57reactormonkusing natural/uint somewhere?
01:21:33flaviuNope, 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:55apensewhat's the reasoning behind arrays not having `$`?
04:32:38apensen/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:55gokrGood morning
07:21:06AraqGood morning
07:21:11dtscodeGood morning
07:24:45*zahary quit (Ping timeout: 252 seconds)
07:26:08*gour joined #nim
07:27:58gokrAraq: You my blit image?
07:28:01gokrsaw
07:28:10Araqyeah, very cool
07:28:24Araqbut did you blit it or draw it?
07:28:51gokrIt 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:01gokrYou know, live programming ;)
07:29:18gokrBut yes, the basic machinery works.
07:29:29gokr"Draw"?
07:29:52pigmejregarding that 'colors everywhere' my emacs buffers are now full broken colors because of that
07:29:58*Trustable joined #nim
07:30:10gokrFor 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:25pigmejreactormonk: 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:08Araqpigmej: hrm? so istty() doesn't work?
07:32:55*gour joined #nim
07:33:34pigmejAraq: not a tall
07:33:36pigmejnot at all
07:34:14pigmejbut that might be not the real issue, I mean, mabye istty() is ok, but something other is 'wrong'
07:34:40pigmejI will check tonight what's the reason
07:34:41Araqpigmej: the compiler only produces colors when the output stream is a tty
07:34:47pigmejhmm
07:35:40pigmejAraq: same applies to nimsuggest ?
07:36:02pigmejbecause I'm pretty sure that I saw yesterday "red" warning about "nim not in PATH" from nimsuggest
07:36:14pigmejwhere "red" was escape mess instead colors
07:36:27pigmejI will test tonight though (+8h or so)
07:39:02Araqpigmej: should apply to nimsuggest too yeah
07:39:15Araqbut again I notice that I predicted these bugs ...
07:40:29Araqescape sequences to produce colors are fundamentally broken
07:40:31*Ven joined #nim
07:41:10pigmejAraq: +1
07:41:29pigmejAND there is other problem also
07:41:44pigmejcurrently those colors are hardcoded ?
07:43:05Araqand 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:02pigmejAraq: I only know that cmake colorizes output which is 'not' broken, all others are usually broken
07:46:02Araqpigmej: --usecolors:off should work though
07:51:01Araqpigmej: yup, these colors are hardcoded.
07:55:02pigmejso when one will have green background == fuckup ;p
07:55:04pigmejetc
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:56Arrrrhttp://www.reddit.com/r/nim/comments/39o10h/when_i_compile_and_launch_win64_console_program/
14:37:51*kas joined #nim
14:54:58wuehlmausbtw: 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:28OnOpigmej: 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:43reactormonkpigmej, 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:25matkukiAraq, def-, dom96: How do I define this in Nim (from a Python C header): PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */
17:20:27matkukiarray[?, PyObjectPtr]
17:20:28matkukiThe dynamic part is what is confusing me.
17:21:43fowlType uncheckedarray*{.unchecked.}[t] = array[1,t]
17:22:45fowlUncheckedarray[pyObjPtr]
17:22:55matkukifowl: Thanks, where in the source is 'uncheckedarray' ?
17:22:58*gnzh quit (Ping timeout: 256 seconds)
17:23:09fowlWherever you define it
17:23:31matkukiSorry, I mean where in the Nim source is it defined?
17:23:41fowlIt isn't defined
17:23:54fowlThats why I typed it out
17:23:54dom96he's showing you how to define it
17:31:18matkukidom96: 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:26matkukiSorry typo. 'I meant it's type definition in the Nim source code.'
17:36:19matkukifowl: 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:12fowlmatkuki: I just defined it. Its not in the standard lib anywhere.
17:38:40matkukifowl, dom96: I totally misunderstood you guys, sorry. It just clicked to me.
17:38:41matkukifowl: Thanks!
17:39:24fowlmatkuki: its a pretty unsafe thing to do but with c libs its sometimes unavoidable
17:40:09matkukifowl: Got it, thanks. I'm porting the Python 3 C API to Nim. There's no avoiding it.
17:42:04matkukifowl, 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:02matkukifowl: Are you the maintainer of the github nim-lang/python repo?
17:49:45fowlNah I just moved it there
17:55:44*don_alfredo joined #nim
17:57:25*BitPuffin|osx quit (Ping timeout: 264 seconds)
18:02:02Arrrrrfowl, Do you think interfaces will make it to 1.0?
18:07:47*gour joined #nim
18:08:02fowlArrrrr: I don't know
18:09:12ArrrrrListen to your heart
18:10:08fowlLol I mainly did it to see if a go feature could be implemented in nim
18:10:59fowlI had a macro where you could do 'import_repos github.com/user/repo'
18:11:34fowlBecause go is so amazing with its import from github statement its just freaking revolutionary
18:12:07ArrrrrThat 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:07Araqmatkuki: chances are high you don't even need all the object fields since only a pointer to it is passed around
18:32:42Araqin general C headers are a mess of implementation details with tiny bits of the official public API in between
18:35:30matkukiAraq: 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:45matkukiAraq: 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:41Araqalways glad to hear. fyi we're collecting a couple of "success stories" for the website
18:41:06Araqso ... once we have a couple we can update the website
18:41:58Araqozra: any progress? if not, there is lots of other things that require your attention ;-)
18:43:30ozraYes, 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:34ozraIs something on fire?
18:45:41matkukiAraq: 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:42matkukiWhen 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:20ArrrrThe next minecraft will be programmed in nim
18:52:10AraqArrrr: and it will be a voxel engine ;-)
18:53:20ArrrrYou cannot take a language seriously if there isnt at least 2 voxel engines programmed there
18:58:30dom96ugh, why is everything orange on Github
18:58:57dom96did somebody change the Nim syntax highlighting that Github uses?
19:00:57fowlDoes nim have a voxel engine?
19:01:33Araqfowl: who do you ask? usually it's you who knows these things
19:01:56apensethere really is a lot of orange
19:02:06fowlThought maybe there was one I dont know about
19:04:03ozradom96: Damn has it fucked up? I fixed some bugs in the syntax but must have fucked something else up. Link please?
19:04:40dom96ozra: just look at any source code
19:04:52dom96where is the repo that contains the highlighter?
19:05:17ozraAny (!?) Wot! @dom96: Varriounts
19:05:35dom96https://github.com/nim-lang/Nim/blob/devel/koch.nim#L70
19:06:27Araqthe problem is that you all try to do semantic highlighting with shitty additonal lexer rules
19:06:53Araqthis can only fail.
19:06:59dom96This one? https://github.com/Varriount/NimLime
19:07:05dom96The highlighting was fine as it was.
19:07:18Araqdom96: no it wasn't.
19:07:21dom96Please don't over-complicate it.
19:07:24Araqit was buggy like hell.
19:07:35dom96yes, bugs.
19:07:40ozraAraq: Yeah, it's pretty much "the only way" for editors.. They can highlight without understanding the full context..
19:07:43Araq24'i32 never worked, for instance
19:07:45dom96We don't need semantic highlighting
19:07:50dom96that is a feature
19:07:59Araqozra: highlighting should be based on lexing
19:08:10Araqif you have no real parser lying around
19:08:39*OmIkRoNiXz joined #nim
19:08:44ozradom96: yeah, I added additional scope for params of procs, seems like github treats it differently than sublime. I'll look into it.
19:09:14dom96ozra: yeah, and it doesn't just highlight params
19:09:14*rektide joined #nim
19:11:07ozraAraq: 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:10ozraAraq: You're tied to the requirements of github / editors, and they all use regexp rules.
19:17:36dom96ozra: thanks
19:18:15ozraanyways, 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:59Araqozra: I know, that's why I'm saying "stick to lexing rules"
19:40:57ozraYeah it doesn't implement all of nim lexing rules atm.
19:42:34*silven joined #nim
19:52:10*sepisoad joined #nim
19:52:26ozradom96: 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:55OnOis there any way to attach some meta attributes to class fields visible only to the macros (compile time)?
19:55:03Strikecarlhow can i do this in nim?
19:55:04Strikecarlfor (int i = 0; i < toEncrypt.size(); i++)
19:55:50AraqStrikecarl: for i in 0..< toEncrypt.size:
19:56:03Strikecarlty
19:56:13filwitOn0: depends on what you mean by "class" fields.. but try using pragmas
19:58:16OnOokay, I got some: type User = object of RootObj; name: string; pass: string
19:58:38OnOI want to attach some extra info to .name for example that I want to index on this field
19:58:55OnOapparently macro pragma does not work here
19:59:09ozradom96: 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:36dom96ozra: That might be a good idea
19:59:59dom96Any ideas why they changed from Pygments?
20:00:49StrikecarlGuys, http://pastebin.com/raw.php?i=iJAwttCy.
20:00:54StrikecarlTrying to implement XOR
20:01:02Strikecarlwoopsie, http://pastebin.com/raw.php?i=iJAwttCy
20:01:10Strikecarlbut, when i use the XOR(string)
20:01:15StrikecarlThis happens:
20:01:48fowlYour function takes 2 args and you pass it one
20:01:50Strikecarlhttp://i.imgur.com/XmTpHSa.png
20:01:58filwitOnO: 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:58Strikecarl2 args
20:02:01Strikecarlwhats the second one, fowl?
20:02:20filwitOnO: 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:28fowlStrikecarl: two args string and toEncrypt
20:02:34Strikecarloh shit
20:02:44Strikecarli done goofed
20:02:44fowlStrikecarl: you probably meant toencrypt:string
20:02:48StrikecarlYea
20:02:52Strikecarljust realized xD
20:03:19filwitOnO: though an alternative solution is to use distinct types.. eg: name: string; pass: IndexString;
20:03:22ozradom96: 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:28Strikecarlhmh, this is harder than expected, is there such thing as "size" from C++?
20:04:06filwitsizeof
20:04:15filwit?
20:04:47OnOfilwit: pragma macros seem to work only on procs, but they don't work inside type blocks
20:04:50filwitor do you mean an array's 'len' ?
20:05:07filwitOnO: i see.. didn't realize that..
20:05:26OnOfilwit: unfortunatelly I want to encode lot more there, eg. name {.sql: index, lazy.}: string
20:05:43OnOand I was hanging around today how I can do it in Nim
20:07:01Strikecarlis there an ^/exclusive or in NIM?
20:07:03AraqOnO: read the pragma in your macro? why wouldn't that work?
20:07:16AraqStrikecarl: 'xor'
20:07:22Strikecarlty
20:07:39Strikecarlxor expects int's
20:07:41Strikecarli need it for strings
20:07:46Strikecarlwhat to do kek
20:08:26filwitOnO: pragma's on the members seem to work for me
20:08:49filwitOno: you have to put them before the ':' though, like for vars
20:09:17filwitso: type Something = object; name {.sql: index, lazy.}: string; ...
20:10:16filwitso: type Something = object; name {.sql: index, lazy.}: string; ...
20:10:27OnOtried, getting error that it is invalid pragma: https://gist.github.com/nanoant/e478b88339aacecd6d59
20:10:29filwitwhoops
20:10:32OnOI must do something wrong
20:10:39*Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
20:10:43filwiterrr no i'm getting that error now too
20:10:45filwitone sec
20:10:57don_alfredoStrikecarl: treat a string as a sequence of bytes, xor each, then convert back to a string
20:14:10AraqOnO: macro invokations as pragmas only work for routines
20:15:12OnOthat's what I thought, any way to attach some meta information to type field that will be visible for macros via AST?
20:15:57AraqOnO: 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:11Araqor you could add another pragma
20:17:15filwitOnO: 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:59Araq{.pragma sql, verbatim.} # compiler ignores 'sql' but keeps it in the AST
20:18:29Araq^ yeah ... I ike this solution
20:20:16Araqor perhaps the compiler can special case field {.mymacro.}: Type
20:20:34*Matthias247 quit (Ping timeout: 272 seconds)
20:20:39Araqcause pragma pragmas are defective in the language right now, you cannot export them
20:21:40OnOthat's interesting that you can define empty pragma: {.pragma: indexOn.} and then you can attach it to the field :)
20:22:04Araqyeah but it'll be gone in the AST after sem'check, I think
20:22:08Araqor maybe not
20:22:17Araqbut you cannot access it via getType, quite sure
20:22:33OnOaaa.... that's bad, lemme check
20:23:32filwitOnO: just checked, doesn't show up
20:23:55filwitOnO, Araq: doesn't show up with getType() i mean
20:24:13filwitat least, not when i just echo treeRepr
20:24:26AraqOnO: any progress on the "TR macros shouldn't be applied recursively" problem?
20:26:51OnOokay, 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:09OnOapparently the write needs to protect itself from applying read TR too
20:27:20OnOso recursive barrier does not help here
20:27:28pigmejreactormonk: hey, do you have any idea how can I apply emacs "theme" + mode colors on string ?
20:27:51OnOanother problem is {.noRewrite: macro.} param
20:28:02OnOso we specify which TR macro we block
20:28:24Araqno, you give it a list, not a single macro
20:28:32OnOokay, may be a list
20:29:05OnObut 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:56OnOsince 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:15OnOhere: proc matches(c: PPatternContext, p, n: PNode): bool
20:30:39OnOjust have a n which is a match, but have no access to its parent
20:31:17Araqdoesn't look like a hard problem. in general you need to keep the relevant up pointers during the recursion
20:31:39Araqsince as you noticed there is no .up field. (for lot's of reasons.)
20:31:57reactormonkpigmej, I think via face text properties
20:32:04pigmejyeah that's for sure
20:32:10pigmejbut how to call it :)
20:33:27reactormonkerr, nope
20:35:19pigmejI wanted to do some 'fancy' 'thing-at-point'
20:35:20OnOAraq: yeah okay, so this is inevitable
20:37:14*sepisoad quit (Ping timeout: 246 seconds)
20:37:56OnOAraq: any progress on this fancy const + set + arrays bug related to msgs.nim?
20:38:30Araqhaven't looked into it yet, but I remember fixing a very similar bug
20:42:21Araqbbl
20:44:23reactormonkpigmej, see how the syntax HL is done
20:44:43pigmejI 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:43apenseStrikecarl: 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:53apenseoh 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:10dom96hrm, 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:32filwitwas 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:38filwiter... 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:42infinity04497c785c6556e82a1ccc11688fd2425d326f3e95770bb266a234e87da7cc82b ../nim-0.11.2.zip
21:50:45infinity0could 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:05ozrawhat would be analogous to exit() in C?
22:03:05*gyeates joined #nim
22:03:40ozranevermind. 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:08vikatonforget compiling to JavaScript
22:25:16vikatonwe need to compile to WebAssembly asap!
22:25:54jackvlol this is a thing now
22:30:26ldleworkIts certainly welcome..
22:30:43*gg_ joined #nim
22:30:58*wu-lee joined #nim
22:31:02*gg_ quit (Client Quit)
22:36:17jackvwhy is there a compile to JS feature? isn't Nim->C->JS preferred in a lot of cases?
22:37:13reactormonkjackv, why? native JS compilation produces better results
22:37:26jackvah, wasn't aware of that
22:38:33jackvI think I was just going off of what def- said in his article http://hookrace.net/blog/porting-nes-go-nim/
22:38:43jackvbut I guess it was just that the JS backend wasn't stable enough
22:40:37*dddddd quit (Ping timeout: 264 seconds)
22:48:57wu-leequick nube q: trying to write a proof-of-concept LED flasher for AVR in nim,
22:49:19wu-leehow 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:44ozraAraq: 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:35Guest25461does 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:44infinity0lib/impure/dialogs.nim(15, 3) Error: cannot open 'glib2'
23:33:45infinity0lib/impure/dialogs.nim(15, 10) Error: cannot open 'gtk2'
23:33:48infinity0what do i do with that
23:34:01infinity0install gtk-dev or something? but "import" suggests a nim module, which doesn't exist there
23:34:42infinity0this is in 0.11.2 but also git HEAD
23:36:13jackvinfinity0, interesting
23:36:24apenseGuest25461: sure does
23:36:25jackvI'm getting the same thing, but I have libglib2.0-dev installed
23:36:47Guest25461thanks
23:36:51apensenp
23:36:55*Guest25461 quit (Client Quit)
23:37:24infinity0i see gtk module was removed on dec 1 in the git log
23:37:30infinity0is the dialog module obsolete then?
23:38:29infinity0commit ee520689d7e79f87078e3a764db182f647ac612a
23:38:35jackvinfinity0, hang on, I'm installing libgtk
23:39:44jackvhmm, still can't find "glib2"
23:40:12jackvoh well duh, yeah it's an import
23:40:25jackvI'm on 0.11.2 stable so
23:41:10infinity0yeah it affects both the release and HEAD
23:41:32infinity0i guess i'll just rm it from the tree and try to build again
23:41:33jackvalright, found the problem
23:41:40jackvinfinity0, nimble install gtk2
23:41:55jackvrelevant issue: https://github.com/nim-lang/Nim/issues/623
23:42:32infinity0ah ok
23:42:37infinity0babel is like a packaging directory for nim?
23:42:55jackvinfinity0, yeah
23:43:06infinity0aha, i see this https://github.com/nim-lang/gtk2
23:43:06jackvso apparently "dialogs" remains in the standard lib
23:43:24jackvbut the things that "dialogs" requires need to be pulled in externally
23:43:34jackvI'll file an issue on github
23:43:47infinity0ok, thanks
23:47:19infinity0tools/nimrepl.nim also imports those things, fwiw
23:48:08jackvalright, I'll add that too, thanks
23:50:25jackvhttps://github.com/nim-lang/Nim/issues/2950 if there's anything more to add
23:50:44infinity0sure
23:57:40*jaco60 joined #nim
23:58:10*filwit joined #nim
23:58:34filwitdoes Nim now use Clang as the default C compiler?
23:59:05apenseif you're on windows, there's no need for dialog to import gtk2
23:59:13apensethat should be changed i think
23:59:24apensethat might be what y'all are talking about. sry