<<18-03-2013>>

00:12:41*q66 quit (Remote host closed the connection)
00:41:22NimBotAraq/Nimrod 98d6027 Araq [+0 ±2 -0]: fixes #257
02:27:58*Trixar_za is now known as Trix[a]r_za
02:59:23*fowl joined #nimrod
04:31:51*Mathnerd314 joined #nimrod
04:55:52*ccssnet quit (Quit: http://atccss.net)
04:57:39*ccssnet joined #nimrod
05:39:37*gour joined #nimrod
06:10:28Araqhi Mathnerd314; action starts later here
06:10:59Araqfowl: can you please report that crash you encountered?
06:11:51Araqsee you later
06:21:33fowlwhich
08:15:53*Araq_ joined #nimrod
08:16:20Araq_fowl: a couple of days ago you came up with some pastebin
08:17:00Araq_(I'm too lazy to look it up again ... :P so please report the bug properly)
08:17:29fowlok
08:17:33fowlill look through the logs
08:17:47Araq_thanks
09:44:51*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931])
12:00:55*xcombelle joined #nimrod
12:06:32*Araq_ joined #nimrod
12:34:35dom96this would be cool in Nimrod: http://tyoverby.com/CanvaS/
12:36:45*Araq_ quit (Read error: Connection timed out)
12:37:46*Araq_ joined #nimrod
13:21:50gourjust read post about new OpenShot video editor...this sounds intriguing: "Due to cross-platform compatibility issues, our timeline will need to be re-built, using a new, and much improved canvas. Utilizing HTML5, JQuery, CSS, and WebKit, the new timeline out-performs previous versions of OpenShot by many magnitudes, and is much easier to "skin" and "theme", due to the power of HTML and CSS." what do you
13:21:52gourthink?
13:22:12gourhere is the link: http://www.kickstarter.com/projects/421164014/openshot-video-editor-for-windows-mac-and-linux
13:31:56Araq_gour: sounds like a bad idea ;-)
13:32:05Araq_webapps suck
13:34:07gourAraq_: why JS back-end then?
14:35:45*Mathnerd314 quit (Read error: Connection reset by peer)
14:38:25*Mathnerd314 joined #nimrod
14:53:18Araq_gour: so because I dislike web apps you shouldn't be able to use Nimrod for web apps?
14:55:23*Mathnerd314 finally gets around to figuring out what Nimrod is
14:55:24gourAraq_: not at all, but wonder why Nimrod has JS back-end when main designer does not like it
14:56:46Araq_because there is no alternative
14:59:12Araq_see you later
14:59:14*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931])
15:00:43Mathnerd314hm, case expressions... this looks OK.
15:01:42Mathnerd314"Postfix operators are not possible"... ok?
15:04:35*q66 joined #nimrod
15:04:46Mathnerd314but where are the lambdas?
15:07:02dom96http://build.nimrod-code.org/docs/manual.html#closures
15:09:39Mathnerd314but can you pass them around?
15:10:17dom96yes
15:11:07Mathnerd314OIC
15:11:46Mathnerd314but multi-methods are not passed around
15:57:39*silven_ joined #nimrod
15:59:29*silven quit (Ping timeout: 248 seconds)
16:15:58fowlooo neat i didnt see the do notation
16:38:13fowlermagehrd tuple unpacking
16:38:41fowlhow did these new features sneak past me
16:52:28reactormonkMathnerd314, ohh, welcome
17:15:43*xcombelle quit (Remote host closed the connection)
17:23:31*gour quit (Read error: Connection reset by peer)
17:23:37*gour joined #nimrod
17:47:27Araqfowl: the 'do' notation is horribly broken right now, unfortunately
17:47:37Araqand tuple unpacking is as it always was
17:50:39*Mathnerd314 quit (Read error: Connection reset by peer)
17:51:36*Mathnerd314 joined #nimrod
18:22:44reactormonkAraq, how does nimrod usually write to stdout?
18:24:02Araqreactormonk: yeah unless you pass --stdout or something
18:24:46reactormonkAraq, *how* - which function
18:26:02Araqreactormonk: stdout.write ... or 'echo'
18:26:36reactormonkAraq, and the generated C code?
18:26:41reactormonk msgs.gErrorMax = high(int) # do not stop after first error
18:26:48reactormonk^ don't like that one
18:30:22Araqwhats wrong with it?
18:31:32reactormonkhigh(int) is damn high, but it's going to fail at some point
18:33:35Araqridiculous
18:33:55Araqyou'd need to pass more than 2 billion of lines code to the compiler
18:34:08Araqit will break far sooner due to OOM
18:35:06reactormonkAraq, -1 for no checking?
18:39:07reactormonkAraq, I try to find the point where it writes to stdout in https://github.com/Araq/Nimrod/issues/369, but breaking both printf (echo) and fputs (write) doesn't break
18:45:56*exhu joined #nimrod
18:46:37Araqreactormonk: the compiler translates an expression yielding a value into 'echo expr' in the repl mode
18:46:49Araqthe code for that is in semstmts iirc
18:47:17reactormonkthere's no echo in that file :-)
18:47:53reactormonkcan I display the nimrod trace in gdb with bt?
18:48:58Araqif you bootstrapped with --debuginfo, yes
18:53:22reactormonkAraq, compiler/nimcache/llstream.c:617 <- oh well
18:53:40Araqreactormonk: --lineDir:on
18:57:42reactormonkAraq, can't you just throw that in to -d:debug ?
19:01:51Araqreactormonk: I thought about --debugger:gdb|endb instead of --debugger:on|off ;-)
19:02:28*ack006 joined #nimrod
19:03:05*exhu quit (Quit: Ex-Chat)
19:03:56NimBotAraq/Nimrod 920ef11 Araq [+5 ±2 -0]: tester supports large tests
19:13:02Araqack006: the 'repr' implementation is in lib/system/repr.nim; for a start you could make 'repr' produce nice output
19:13:15ack006thanks! :-)
19:13:45ack006i'm more worried about generating PNode's though that's deep stuff
19:13:52Araqwe need some 'reprEcho' in system.nim and the compiler should use that in the RPL
19:14:01Araqwell that's how to do it
19:14:09AraqI'm not so sure it's a good idea
19:14:15ack006why?
19:14:44ack006because it hides the need for users to make a proper `$` overload?
19:15:20Araqyeah exactly
19:15:21ack006that's a valid argument, but it would scare away newbies.
19:15:45AraqI'm the only one left who doesn't like 'repr' so go ahead
19:15:52ack006or we could mention 'repr' more prominently in the docs
19:16:04ack006well, you hid it in the tutorial, which is a smart move :-)
19:16:05fowlack006: i had typed out a response to the issue but forgot to submit it
19:16:09*exhu joined #nimrod
19:16:35ack006fowl: no probs, i'll read it when you do :-)
19:16:40fowli just did
19:16:48Araqfowl: I'd like to add some of your crazy wrappers and macro stuff to the test suite
19:17:03ack006fowl: thanks! that's the way :-)
19:17:03exhuhi, Araq
19:17:10Araqfowl: fine with you?
19:17:16fowlAraq: sure
19:17:18Araq(the licence doesn't change for that)
19:17:57exhuAraq, is it possible to convert undefined identifier into a string when passed to an immediate template?
19:18:22Araqexhu: yes and it's dead simple
19:19:28exhutemplate def(n: expr, t: typedesc) {.immediate.} = echo ($n & $t)
19:19:40exhuAraq, this is to explain the idea of what i need
19:20:32fowlugh
19:20:36fowlecho *.h > .gitignore
19:20:40exhuAraq, def(unknownId, TSomeType) -- this is the usage
19:20:50fowlcat .gitignore : a bunch of .h files -_-
19:21:19Araqexhu: system.astToStr
19:21:33Araqand the manual even contains an example for what you try to accomplish I think
19:22:15exhuastToStr doesn't work ,the compiler says undeclared identifier
19:22:29Araqhuh?
19:22:47Araqlet me try that
19:23:25exhuhttp://pastebin.com/5sZLWG5V
19:24:24Araqhow should $t work?
19:25:01exhuAraq, it says 'id' is undeclared -)
19:25:40exhuAraq, astToStr for t doesn't work either
19:28:10Araqexhu: indeed I misremembered; astToStr performs semantic checking for better or worse
19:29:23Araqit's easy to change but I don't know if I had a reason for the current behaviour ... :-/
19:29:55exhucan you propose a better way for me to declare an ORM ?
19:29:58Araqyou can easily use a macro though :P
19:30:45exhui can't figure out how a macro can be used except for collecting field-sql_column definitions and using emit()
19:32:07AraqI'd use this:
19:32:16AraqmyGreatMacro:
19:32:26Araq type TMyTable = object
19:32:41Araq id {.id.}: TEntityId
19:32:57Araq name {.name.}: string
19:33:00Araqetc.
19:33:28Araqyou remove the pragmas in the macro and otherwise pass that type back to the compiler (as result value)
19:34:04Araqwell the macro generates an nkStmtList with the type section and the procs that your macro created for accessing the database
19:34:41Araqbut tbh fowl should know these things much better by now; I never use macros ;-)
19:35:01exhuAraq, but i need to generate a type, an enum and a set of constants.
19:35:01AraqI'm always too busy working on the compiler
19:35:22Araqexhu: well that's what you put into an nkStmtList then
19:36:04fowlexhu: all the information in your col() can fit in a tuple
19:36:51exhuit seems designing such a macro would take more time than to write the working app.
19:37:07Araqyou only do it once and it's not that much work
19:37:39Araqand it's exactly the right tool for the job
19:37:46Araqusing templates will only get you so far ...
19:38:35exhui need more macro examples
19:41:04fowlexhu: check out defPacket() https://github.com/fowlmouth/keineSchweine/blob/master/dependencies/genpacket/genpacket_enet.nim
19:42:10fowlexhu: you pass in the type name and a tuple of the data the packet holds and it generates functions for $, constructing, and reading/writing it to a stream
19:42:14Araqfowl: add some helper to create a nnkProcDef please
19:42:31Araqin fact, add that helper to macros.nim
19:42:45Araqit's desperately needed
19:43:06fowlnewProc() ? https://github.com/fowlmouth/nimlibs/blob/master/macros/macro_dsl.nim
19:43:24exhufowl, thanks!
19:43:41exhufowl, but this macro is mind blowing -)
19:44:14fowlexhu: yea its not really that complicated, nowadays i wouldnt need the $ and constructor creation >_>
19:48:29ack006fowl: cool!
19:50:26Araqfowl: yeah newProc is it, but your example doesn't use it ;-)
19:54:11Araqfowl: I plan to deprecate the nnk* names, but I'm not sure what the new style should look like
19:54:51Araqthe reason for the verbose nnk prefix is archaic
19:57:01Araqbut then I can only think of 'nk' instead or use a .pure enum and force everybody to use the verbose TNodeKind.ProcDef or provide some operator to create an ast like: ^kind(child1, child2)
19:59:04fowli hoped i could make writing macros not require any nnk*
19:59:16fowlat least for the simple cases
19:59:33fowlresult = newCall("echo", infix(1.lit, "+", 2.lit))
20:00:30Araqyeah that's the way to go
20:01:47Araqthere is also a new quasi quoting system for that but I forgot its syntax. zahary implemented it ;-)
20:02:49Araqmacros.quote is it
20:04:05fowloh cool
20:06:43exhuthanks for help, guys! maybe tomorrow i'll end with some working macro. good night!
20:07:58fowlexhu: remember dumptree: the expected result and emulate that
20:09:05*exhu quit (Quit: Leaving)
20:12:03ack006oh how i love my oxford brackets, makes things seem so posh! ;-)
20:12:36ack006(i'm more a cambridge kind of guy, but have never been there, tho)
20:13:20Araqwhat are oxford brackets?
20:13:42ack006look here: http://www.hyperedsoftware.com/blog/entries/first-stab-th.html
20:13:53ack006search for: [| and |] ;-)
20:15:58ack006i always get the cringes of those names, like "blackboard bold", "Kleisl arrow" etc.
20:16:47ack006i enjoy academic challenge, just not always the "academic air" around some terms :-)
20:17:03Araq[| |] are not supported by nimrod's syntax btw
20:17:22Araqas [| is parsed as [ plus some prefix operator |
20:17:23ack006no problem, no need, find our own
20:17:28ack006aha
20:17:46dom96Use [- -] instead :P
20:17:56ack006;-)
20:18:14Araqdom96: don't confuse him please, [- is of course not valid either
20:18:48dom96how come .- is then?
20:19:23ack006because it's the `-` applied to what's before?
20:20:42ack00642.- doesn't work in the repl, (multiline), but 42.`-` => -42
20:20:43fowlbecause parsing matching brackets with random other characters between them is hella tedious
20:20:52ack006yep!!
20:21:25ack006so happy we have PEGs and semantic expressions yoo
20:21:29fowlack006: 42.- wouldnt be a valid expr, postfix is only used in nimrod for symbol visibility (name* for exported)
20:21:37ack006ok
20:21:50fowlif you try .-42 you'll get unknown symbol .- error
20:22:10ack006btw (ducks!) wouldn't it be nice to rewrite Nimrod's lexer/parser to use peg's?
20:23:00ack006note: ":-)" implied from now on
20:23:48Araqack006: read this to see why I don't really like pegs (anymore): http://tratt.net/laurie/tech_articles/articles/parsing_the_solved_problem_that_isnt
20:24:16ack006thanks, will do
20:27:49dom96This has some interesting ideas for async IO: https://www.dropbox.com/s/xknbe58zcvjhzhv/PyCon2013.pptx
20:27:55Araqand pegs are much slower than nimrod's lexer/parser anyway
20:28:32ack006true, but can be a 'reference' implementation, i.e. for bug hunting the grammar
20:29:18ack006unless you're using eagle mode (pro tip!), wading through a parser worth thousands of lines = not fun :-)
20:29:58dom96Araq: btw I don't believe you ever gave me that link which describes how you want me to use first class iterators for async io
20:30:48ack006shameless plug (not my work!) https://github.com/ackalker/eaglemode
20:31:19ack006zooming UI file manager. i _really_ like it for getting an overview of a large codebase
20:33:09ack006i've done a little mod that lets you soar around your filesystem like you're in some FPS timerun
20:33:28Araqdom96: I'm looking for it
20:33:37Araqwell I'm reading the link you gave
20:33:44Araqbut I will afterwards
20:33:57dom96yeah, let me know what you think about that link.
20:34:49ack006Araq: interesting article btw.
20:54:03Araqdom96: funny, the link you sent describes exactly the approach that I had in mind
20:54:23Araqand guido is right, it's very much like C#'s async/await
21:05:47Araqack006: eaglemode looks interesting. any screenshots?
21:06:57ack006sure, on its official sourceforge page, just a moment
21:07:13ack006http://eaglemode.sourceforge.net/screenshots.html
21:08:30ack006but here really counts: using is believing. i think this thing could revolutionize skimming through huge amounts of data
21:08:41ack006and i don't usually (?) go to superlatives
21:12:51ack006if you build my scrollock branch, run it, press F12, you can pan around without having to keep the middle mouse button down
21:13:01ack006and zoom with just Ctrl button down
21:13:19ack006don't let the dependencies bother you, you don't need them all
21:16:32Araqmight try later, sorry
21:16:46ack006sure :-)
21:44:09*AmatCoder joined #nimrod
22:42:46Araqdom96: I have been thinking about package management again
22:45:24dom96oh? Go on.
22:45:29Araqand I think it's worth to discuss the following idea: deal with packagement (= package management) like a browser deals with a website
22:46:33Araqlike a site contains links a nimrod module contanis imports
22:47:55Araqand the browser downloads and caches all the dependencies to render the site
22:48:02Araqso for us the browser is the compiler
22:48:41Araqthe dependencies are specified as "import actions" inside the module itself via a pragma
22:49:48Araqhowever the import action can simply be "ask babel where to find it"
22:50:22Araqso babel in fact only needs to keep where to find the latest version
22:50:46Araqfor a fixed version you may as well hard-code the URL
22:54:12*gour quit (Quit: WeeChat 0.4.0)
22:54:43dom96Example?
23:10:59Araqimport jester["http://jester.org/"]
23:11:12Araq(syntax not cast in stone of course)
23:13:51dom96I think a comma would be better
23:14:08dom96but lol no.
23:14:24dom96That wouldn't work.
23:15:01Araqer ... can we concentrate on the concept please? :P
23:15:08Araqthe syntax is irrelevant for now
23:16:11dom96hrm, so instead of supporting a .nimrod.pkg file you want the URLs to be present in the source code?
23:19:02Araqfor now, yes
23:19:25AraqI'm trying hard to come up with the simplest thing that can possibly work
23:31:54AmatCoderdom96: Is Aporia broken?
23:32:05dom96AmatCoder: Not for me, why?
23:32:58AmatCoderright now if there are not configuration files Aporia crash...
23:33:24AmatCoder..with "unhandled exception: not input == nil [EAssertionFailed]"
23:33:37dom96hrm, might be a new bug I introduced.
23:40:13NimBotnimrod-code/Aporia 6571a53 Dominik Picheta [+0 ±1 -0]: Fixes bug with new configuration.
23:40:20dom96AmatCoder: Try it now.
23:40:40AmatCoderOk
23:45:41dom96ok, I need to go to sleep.
23:45:43dom96Good night
23:46:34AmatCoderdom96: good night
23:46:41ack006dom96: ZzZzz
23:46:43ack006:-)
23:47:21ack006and: "don't listen to the graph paper in your head!" ;-)
23:48:23Araqbye