<< 05-10-2015 >>

00:16:03*jaco60 quit (Quit: Leaving)
00:31:04*strcmp1 joined #nim
00:41:25*strcmp2 joined #nim
00:43:16*strcmp1 quit (Ping timeout: 250 seconds)
00:50:15*juanfra joined #nim
00:53:24*Jesin joined #nim
00:54:57*PyHedgehog joined #nim
00:55:15*PyHedgehog-work joined #nim
01:04:11*superfunc quit (Ping timeout: 250 seconds)
01:12:13*strcmp2 quit ()
01:17:23*chemist69_ joined #nim
01:20:35*chemist69 quit (Ping timeout: 264 seconds)
01:32:37*pregressive joined #nim
02:09:20*nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting)
02:28:34*nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting)
02:30:01*superfunc joined #nim
02:35:35*superfunc quit (Ping timeout: 264 seconds)
02:35:48*joelmo quit (Quit: Connection closed for inactivity)
02:39:12*pregressive quit (Remote host closed the connection)
02:40:25*nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting)
02:40:44*pregressive joined #nim
02:44:06*Jesin quit (Ping timeout: 240 seconds)
02:44:58*pregressive quit (Ping timeout: 240 seconds)
02:48:40*Jesin joined #nim
02:51:26*nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting)
03:01:06gmpreussner|workwhen building ASTs in macros, is it ok to reuse nodes in sub-trees (granted that there are no circular graphs), or should i always copy the nodes via copyNimNode/copyNimTree?
03:17:31*darkf joined #nim
03:18:06*BitPuffin|osx quit (Ping timeout: 255 seconds)
03:43:05*pregressive joined #nim
04:05:26*Demos quit (Read error: Connection reset by peer)
04:09:56*vegansk quit (Ping timeout: 272 seconds)
04:15:49*milton joined #nim
04:30:55*pregressive quit (Remote host closed the connection)
05:35:46*Jesin quit (Ping timeout: 250 seconds)
06:00:38*Jesin joined #nim
06:30:32*n0xff quit (Quit: t)
06:31:17*Ven joined #nim
06:53:43*gokr joined #nim
07:12:07*vegansk joined #nim
07:19:11*Demon_Fox quit (Quit: Leaving)
07:37:07*bjz joined #nim
07:45:36*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:52:25*milton quit (Read error: Connection reset by peer)
07:52:36*milton joined #nim
07:57:55*Trustable joined #nim
08:01:08*bjz joined #nim
08:07:07*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:07:40*bjz joined #nim
08:10:55*coffeepot joined #nim
08:12:11*coffeepot quit (Client Quit)
08:12:23*coffeepot joined #nim
08:13:07*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:15:41*Trustable quit (Read error: Connection reset by peer)
08:15:46*Trustable_2 joined #nim
08:22:28*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:26:14*Ven joined #nim
08:27:27*irrequietus joined #nim
08:34:32*irrequietus quit ()
08:39:12*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:41:48*bjz joined #nim
08:45:20*bjz quit (Client Quit)
08:50:02*bjz joined #nim
09:14:12*Ven joined #nim
09:29:38*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:34:46*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
09:44:06*Sahnvour joined #nim
09:44:13miltonAraq: hey. you abandoned nim2pas?
09:56:04*Ven joined #nim
10:01:53Pisukeinteresting name for a program ... http://nim-labs.com/
10:14:08*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:28:25*vegansk quit (Ping timeout: 240 seconds)
10:31:23*coffeepot joined #nim
10:53:31*elrood joined #nim
10:54:47*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:55:11*coffeepot joined #nim
10:56:14*coffeepot quit (Client Quit)
11:21:16*Kingsquee quit (Quit: http://i.imgur.com/EsXzoum.png)
11:40:50*Ven joined #nim
11:44:04*smodo joined #nim
11:52:10*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:02:35*themagician quit ()
12:14:12*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:14:36*bjz joined #nim
12:16:25*Pisuke quit (Quit: WeeChat 1.4-dev)
12:17:19*Sembei joined #nim
12:31:05*themagician joined #nim
12:36:46softiniois aim's unittest module the best to use when writing unit tests or are there any other libs etc?
12:38:38softiniomeant nim not aim lol damn spellchecker
12:40:39*Ven joined #nim
12:42:54*coffeepot joined #nim
12:49:34*milton quit (Disconnected by services)
13:00:36federico3softinio: https://github.com/jyapayne/einheit
13:04:52*UberLambda joined #nim
13:08:00*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:21:22softinioso if I want to initialize a new sequence to nil, can I do: var myseq=@[]
13:21:34softinio@federico3 Ty looks good
13:37:23*FedeOmoto joined #nim
13:45:19*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
13:54:55*coffeepot joined #nim
14:19:33*saml joined #nim
14:27:05*pregressive joined #nim
14:58:46*jaco60 joined #nim
15:20:31*Ven joined #nim
15:31:59*xorbit joined #nim
15:35:21xorbitI'm trying to get a Nim program on an embedded system, when I run `nim c -c --cpu:arm --os:standalone --deadCodeElim:on --opt:size --genScript prog.nim` I get `Error: system module needs 'rawNewString'`. Any hints?
15:44:50*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:51:13*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
15:51:30*coffeepot joined #nim
15:57:55*enurlyx joined #nim
16:02:32*darkf quit (Quit: Leaving)
16:04:00*smodo quit (Remote host closed the connection)
16:17:59*smodo joined #nim
16:21:25*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:29:37NimBotnim-lang/Nim devel aead71c JamesP [+0 ±1 -0]: fix #3418 add example on openArray to types.txt
16:29:37NimBotnim-lang/Nim devel 0a8a207 Dominik Picheta [+0 ±1 -0]: Merge pull request #3420 from jlp765/manual1... 2 more lines
16:34:49*crack81 joined #nim
16:34:54crack81Hi guys
16:35:19xorbitHello :)
16:35:54crack81Exists some book of Nim
16:36:27xorbitDon't know, I'm a noob looking for experts here
16:39:57def-crack81: not yet
16:40:00crack81I speak spanish, but is very hard to find information of Nim
16:40:17crack81in my language
16:46:50crack81Can I create guis in Nim?
16:48:16xorbitYes, I know there's a library for GTK2
16:49:39crack81ok thanks for you help bye
16:49:42*crack81 quit (Quit: Page closed)
16:50:35xorbitCan anyone help with getting --os:standalone issues?
16:53:16r-kuxorbit the way it works: you post a question regarding your problem providing as much info as possible and then people try to help you if they know anything on the topic
16:53:25r-kuasking if anyone can help is asking to be ignored..
16:53:53xorbitOk, I'll be more specific and repeat my previous question:
16:54:12xorbitI'm trying to get a Nim program on an embedded system, when I run `nim c -c --cpu:arm --os:standalone --deadCodeElim:on --opt:size --genScript prog.nim` I get `Error: system module needs 'rawNewString'`. Any hints?
16:55:33xorbitI've meanwhile tried different things like: `nim --gc:none -d:release --noMain --noLinking --header:iothinq_sh.h --cpu:arm --deadCodeElim:on --os:standalone --opt:size --genScript --parallelBuild:1 c test.nim` where test.nim is a simple `var x = "test"`, which gives `Error: system module needs 'copyString'`
16:56:04xorbitDoes anything work when using --os:standalone?
16:57:06r-kui personally never tried standalone myself. its possible your program tries to use something that is not available in standalone mode
16:57:15r-kubear in mind standalone mode is VERY limited
16:57:28r-kuand i suspect its a bit neglected part of compiler too
16:57:55r-kudid you try building simple hello-world first?
16:58:08r-kuif you can get that to work - look for issue in your code
16:58:21r-kuif even hello-world cant work.. idk we must summon Araq maybe
17:00:57xorbitWell the simple `var x = "test"` program works (obviously) without standalone
17:01:15r-kuyou are supposed to try it with standalone
17:01:36r-kueverything works without standalone ;)
17:01:44xorbitIt works with `nim -d:release --deadCodeElim:on --opt:size --parallelBuild:1 c test.nim`
17:02:07xorbitIf I so `nim --os:standalone -d:release --deadCodeElim:on --opt:size --parallelBuild:1 c test.nim` instead I get `Error: system module needs 'copyStringRC1'`
17:02:48xorbitThe only difference is adding standalone
17:03:21r-kusounds like a bug then
17:03:33r-kulets see if manual outlines anything special needed for standalone
17:03:33xorbitIt seems half the system library is missing when doing standalone, not much use if you can't assign a string
17:04:08xorbitFrom stuff I find online it seems like this should have worked
17:04:52xorbit(or used to work)
17:05:50r-kunim -d:release --deadCodeElim:on --opt:size --parallelBuild:1 c --os:standalone test.nim works for me
17:05:56r-kutest.nim has echo "test"
17:06:13r-kuand o copied panicoverride.nim from tests
17:06:17r-kui*
17:06:32xorbitLet me try that
17:07:13*brson joined #nim
17:10:12xorbitThat works, but if I change test.nim to `var x = "test"; echo x`, it fails with `Error: system module needs 'copyStringRC1'` again
17:10:15*razaaa joined #nim
17:11:14xorbitSame error with `let x = "test"; echo x`
17:11:14*X67r joined #nim
17:11:58xorbitWorks with `const x = "test"; echo x` though
17:12:10*pregressive quit (Remote host closed the connection)
17:12:29*pregressive joined #nim
17:14:18xorbitYou would expect string assignment to work even with --os:standalone, wouldn't you?
17:15:18r-kupossibly, although string ops are heavily dependent on gc
17:15:46r-kuneed Araq to clarify really
17:16:16xorbitIt's interesting the error is different depending on my --gc setting. If I add --gc:none, the error changes to `Error: system module needs 'copyString'`
17:18:42*X67r quit (Ping timeout: 255 seconds)
17:20:05xorbit#r-ku When does Araq tend to be around?
17:22:00*bigfondue quit (Ping timeout: 264 seconds)
17:22:36r-kualways at random. can be any time here xorbit
17:22:43xorbitOk
17:22:50r-kuyou would probably have better luck posting on forum
17:23:00r-kuthat way it wont get lost so fast as here in chat
17:23:29*bigfondue joined #nim
17:26:00*X67r joined #nim
17:26:52*Matthias247 joined #nim
17:28:39*smodo quit (Remote host closed the connection)
17:38:25*chemist69_ quit (Quit: WeeChat 1.3)
17:48:18*chemist69 joined #nim
17:58:05*solidsnack joined #nim
18:05:05*solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…)
18:05:28*solidsnack joined #nim
18:29:42*tmm1 joined #nim
18:36:58*zaquest quit (Quit: Leaving)
18:37:13*zaquest joined #nim
18:37:20*boydgreenfield joined #nim
18:40:06boydgreenfieldQuick logging question: Can anyone recommend the best way to extend the logging.nim module to support logging to stderr? I thought I’d be able to just create a FileLogger pointing to stderr, but unfortunately it takes a *filepath*, and so now I’m wondering if it’s generally better to (1) wholesale “inclde” a stdlib module and then only use that patched version downstream (e.g., `import logging_ext`); (2) do
18:40:07boydgreenfieldsomething else…?
18:53:28*noobd joined #nim
18:55:37*pregressive quit (Remote host closed the connection)
18:57:27*Jehan_ joined #nim
19:03:37softiniocan I create a sequence of strings without knowing length it will be?
19:04:10*PyHedgehog-work quit (Quit: Page closed)
19:04:30noobdnewSeq[string](variable) ?
19:05:27noobdThat'll work if variable is an integer
19:07:05softinioDoesn't that mean I have to know the len?
19:07:18softinioie int variable being the len ?
19:07:19*pregressive joined #nim
19:07:41noobdI guess i'm not understanding the situation
19:08:42federico3Boy
19:08:53federico3boydgreenfield: ping me in query
19:09:05xorbitWarning: I'm a noob... but how about var x: seq[string] = @[]
19:09:22xorbitAnd than add to it as in x.add("test")
19:10:44noobdDoes anybody know if you can identify the type of child stored in a variable descendant from the parent?
19:11:12noobdSo type sample : obj: Parent;
19:11:54noobdErr so obj : Parent
19:12:08noobdobj = newChildA
19:12:42noobdCan i use obj to determine if the type of obj == ChildA
19:13:16dom96xorbit: what is your embedded system? You might not need to use `--os:standalone`.
19:13:42xorbitdom96: It's an STM32F030F4
19:14:01xorbitIt has 16K of flash and 4K RAM
19:14:57dom96boydgreenfield: The best way would likely be to extend the ConsoleLogger to support output to stderr via a param in newConsoleLogger.
19:20:35boydgreenfielddom96: That would require importing a new custom lib everywhere downstream though, no?
19:22:06dom96boydgreenfield: Unfortunately yeah. You can also just copy the ConsoleLogger-specific code and implement your own ConsoleStderrLogger for now.
19:23:55boydgreenfielddom96: Indeed… do you think Araq would be open to a PR that creates another newFileLogger proc which takes a File vs. string? Then you could just pass `stderr` in directly
19:25:38dom96xorbit: Nim strings are allocated on the heap and managed by the GC. I believe heap allocations managed by the GC are not available in standalone mode.
19:26:52boydgreenfield(this would also be trivial if the `f` File object on the logger were exported)
19:27:09dom96xorbit: I think you would need to implement the procedures which the compiler complains about specific to your target system.
19:29:55dom96boydgreenfield: Yeah, I don't think Araq would have a problem with that.
19:30:00xorbitdom96: That seems to be the case, but it also seems to be somewhat arbitrary, since you can tell Nim to use malloc. I'm experimenting with that, and after removing a whole lot of `when hostOS != "standalone"`s from the system.nim, I managed to compile and run my code "standalone" on Linux. Now seeing what it does when I cross compile...
19:30:59boydgreenfielddom96: Ok i’ll just do that then. There’s no hacky way to import a non-exported (no *) member is there? Then I could at least monkey patch this in the meantime vs. change all the downstream import code to use a patched lib
19:31:38Jehan_boydgreenfield: You can always include and extend.
19:31:40xorbitdom96: It looks to me like "standalone" wholesale disables stuff when a more fine-grained approach could keep it more functional.
19:31:54dom96yeah, include is the only way I'm aware of.
19:32:20Jehan_The only problem with that is that the types that you include are not compatible with types you get by also importing the module.
19:32:22*xificurC quit (Quit: WeeChat 1.3)
19:32:30Jehan_But for logging, this shouldn't be a problem.
19:33:00boydgreenfieldJehan_: I’ve only used include w/ local modules. How does one do that with the stdlib? (I get an error just trying to `include logging`
19:33:12Jehan_boydgreenfield: Huh.
19:33:47dom96that's odd
19:34:05*enurlyx left #nim (#nim)
19:34:33Jehan_Oh, it looks as though it's because there's a reference to logging.level
19:34:43boydgreenfieldJehan_ & dom96: Ohp… not an include error… didn’t look closely enough: `lib/pure/logging.nim(237, 8) Error: undeclared identifier: 'logging’`
19:35:23boydgreenfieldJehan_: Indeed… any way around that? Digging into `bind` quickly here…
19:35:24Jehan_Yeah, you can do include pure/logging as a workaround if you name your module `logging` also.
19:35:39Jehan_bind has nothing to do with it, it's the logging qualifier.
19:36:27boydgreenfieldah indeed, thanks
19:36:30Jehan_Note that if you create your own module in such a way, it will override the stdlib module. Which may be exactly what you want, but may not be portable in the long term.
19:37:06boydgreenfieldJehan_: No it’s not really what I want, agreed
19:37:33dom96Might be a good case for a 'self' or 'this' keyword which always identifies the current module.
19:42:33Jehan_dom96: Yeah, but the real solution would be to allow better extension of the Logger type.
19:43:06Jehan_You can create a StdErrLogger and define a method for that, but you don't have access to proc substituteLog.
19:43:26boydgreenfieldJehan_: Agreed. It doesn’t really have an exported extensible interface unfortunately atm.
19:44:24Jehan_If substituteLog were public, then extensibility would be easy.
19:44:46boydgreenfieldJehan_: Indeed, lots of workarounds, but unfortunately none of them *quite* work atm
19:44:50boydgreenfieldI’ll make a PR
19:45:00Jehan_This is where I really think that Eiffel got it right.
19:45:09boydgreenfieldwhich aspect?
19:45:53Jehan_In Eiffel, if you extend a class, then you do also have access to the internals the implementation relies on.
19:46:37Jehan_This is obviously a power that can be used for evil, but in general, if you don't have that flexibility, you tend to lose out on a fair amount of extensibility.
19:47:21*UberLambda quit (Quit: GTG)
19:56:40*shodan45 joined #nim
20:06:04*Demon_Fox joined #nim
20:15:14*shodan45 quit (Remote host closed the connection)
20:15:21*joelmo joined #nim
20:15:23*shodan45 joined #nim
20:17:36cnclhttps://gist.github.com/randrew/5172fb7c9513ad3dddf1 i can't tell what i'm doing wrong here, or if i'm misunderstanding nim's templates or block statements rules
20:17:46cnclsorry for the semi-crap code, i just started using nim yesterday
20:17:51cnclthe printed result (at the bottom) is not what i expect
20:17:53*boopsiesisaway is now known as boopsies
20:18:50*Kingsquee joined #nim
20:19:22*PyHedgehog-work joined #nim
20:23:58cncli would expect it to print the whole tree
20:24:14cnclbut it does not, after the first decrease in indentation
20:24:24cnclof nested levels, i mean, sorry
20:34:12*kulelu88 joined #nim
20:35:40cnclis this due to some sort of shadowing problem with the injected template symbols?
20:35:41Araqcncl: no idea what you're trying to accomplish.
20:36:09Araqdon't use .immediate, use untyped instead.
20:36:34cnclah. i'm just trying to have the printed results be the same tree as what's under "run:" here
20:36:49Araqalso why do you use templates? tree algorithms require recursion, templates cannot support recursion
20:37:12cncloh really?
20:37:20cncli didn't know that
20:37:30Araqhow could they? they just expand.
20:38:32Araqah, wait a sec
20:39:41Araqyour list template cannot work. you seem to want to override the template 'item'
20:40:26cnclright, i expected it to shadow the name 'item' of any inner template expansions
20:40:28Araqhrm, no ...
20:41:06*noobd quit (Ping timeout: 246 seconds)
20:41:17cnclabout 'untyped', i'm trying to look it up in the docs, is it documented somewhere?
20:42:18AraqI don't remember
20:43:28*solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…)
20:43:52cnclok, i'll keep looking
20:44:28cnclis this behavior what you would expect?
20:44:36cnclor is something strange happening here
20:45:07cncli'm using Nim Compiler Version 0.11.2 (2015-05-04)
20:45:13*nooob joined #nim
20:45:14AraqI'm beginning to think it is indeed a compiler bug
20:45:55cnclinteresting!
20:46:00Araqbut your code is a tricky beast. got some Lisp background? ;-)
20:46:26cnclhaskell and lisp yeah :)
20:47:23cnclif you're wondering why i was doing this, i was making a terminal gui layout module for fun, and i wanted to be able to layouts with a tree syntax like this
20:47:27nooobIs there a way I can find out what type of child an variable is? for example var x : Parent() , x = ChildA(), typeof(x) == childA or typeof(x) == childB
20:47:50nooobvar x: Parent*
20:47:51cnclbut i was getting strange behavior, so i reduced it down to this example that just prints
20:47:52Araqnooob: if x of ChildA:
20:48:05noooboh
20:48:07nooobits that easy?
20:48:10nooobsweet
20:48:23nooobThanks
20:48:50Araqcncl: usually I write a macro that understands what 'item' is supposed to mean in this context
20:49:13Araqit never occured to me to inject 'item' :-)
20:49:32cncli was going to do that next, i was just moving linearly through the docs and template came first :)
20:49:42*razaaa quit (Ping timeout: 260 seconds)
20:52:42cncli'll try doing it as a macro for now
20:53:39*CryptoToad joined #nim
20:55:15*nooob quit (Quit: Page closed)
21:16:26*NimBot joined #nim
21:33:08*pregressive quit ()
21:40:57cnclshould i open this as an issue on github?
21:41:07cncli don't think i know nim well enough yet to work on the compiler source myself
21:46:58*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:47:01*Trustable_2 quit (Remote host closed the connection)
21:57:45xorbitAraq: Can you explain the problems that exist with supporting string operations with --os:standalone? With systems that have malloc available and -d:useMalloc?
21:59:06*boopsies is now known as boopsiesisaway
21:59:26*Mat4 joined #nim
21:59:28Mat4hello
22:01:59*vendethiel quit (Ping timeout: 264 seconds)
22:02:46*bjz joined #nim
22:07:25*shodan45 quit (Quit: Konversation terminated!)
22:11:24*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:13:23*Mat4 quit (Quit: Leaving)
22:16:37*bigfondue quit (Quit: ZNC 1.6.1 - http://znc.in)
22:19:26*solidsnack joined #nim
22:21:39*FedeOmoto quit (Quit: Leaving)
22:32:43*elrood quit (Quit: Leaving)
22:37:59*Jehan_ quit (Quit: Leaving)
23:07:55*Matthias247 quit (Read error: Connection reset by peer)
23:27:56*MyMind joined #nim
23:30:42*Sembei quit (Ping timeout: 260 seconds)
23:37:48*NhanH is now known as nhanH
23:38:06*nhanH is now known as NhanHo
23:38:10*NhanHo is now known as NhanH
23:38:15*NhanH is now known as NhanHo
23:39:28*NhanHo is now known as NhanH
23:54:58*Sahnvour quit (Read error: Connection reset by peer)