<<13-01-2013>>

00:51:37NimBotnimrod-code/Aporia 8d90677 Dominik Picheta [+0 ±1 -0]: Fixed segfaults when switching syntax highlighting.
02:27:30*q66 quit (Quit: Quit)
06:18:15reactormonkAny idea how to implement global properties aka fields?
06:24:02reactormonkhttp://pastie.org/5677196 current code, I don't think that's the way to go, since the options object is global anyway.
06:24:16reactormonksame with a toplevel object, but that one also inherits its fields to each client :-/
06:24:21reactormonk(and methods btw)
07:24:47*fowl quit (Quit: Leaving)
07:33:48*Trix[a]r_za quit (Ping timeout: 264 seconds)
07:34:19*Trix[a]r_za joined #nimrod
07:39:48*Trix[a]r_za is now known as Trixar_za
08:07:55*Trixar_za is now known as Trix[a]r_za
10:16:08Araqreactormonk: just use object fields like you already do
11:09:15*q66 joined #nimrod
11:18:20*fowl joined #nimrod
11:18:20*fowl quit (Client Quit)
11:22:22*fowl joined #nimrod
13:06:07*ekselkiu joined #nimrod
13:08:35ekselkiuBuild failure: https://gist.github.com/4524021
13:08:52ekselkiuv0.9.0 and master - probably something really simple.
13:09:11dom96ekselkiu: unzip build/csources.zip
13:09:32ekselkiuBleeurgh, jumped straight to the "On UNIX" section :P
13:09:45*ekselkiu feels stupid now
13:09:45ekselkiuthanks
13:11:09dom96no worries. It's a common mistake.
13:11:31ekselkiu"SUCCESS" - well that's reassuring :)
13:22:21*Trix[a]r_za is now known as Trixar_za
13:31:55libMANI still can't compile Aporia (v0.1.3, with nimrod 0.9.1 / 2012-11-18, both from git 2 days ago).
13:32:53libMANFirst of all, I had to add 'lib="/usr/local/lib/nimrod"' on top of /etc/nimrod.cfg
13:35:20libMAN`nimrod c aporia.nim` output on nimrod c aporia.nim
13:35:32libMAN`nimrod c aporia.nim` output on http://pastebin.com/Z2vhTxG2
13:36:12libMAN(Still didn't get used to pasting from browser to xterm properly.)
13:42:34libMANRunning FreeBSD 9.1-RELEASE, i386, which has gcc v4.2.1/20070831. Tried setting cc in /etc/nimrod.cfg to clang (v3.1 / 156863 / 2012-05-23), but stdout was identical as with gcc (in aforementioned pastebin).
13:43:37libMANLatest GTK/etc compiled from FreeBSD ports. (It's in my "gnushit" jail, hehe.)
13:44:03Araq{.push cdecl.} is wrong
13:44:17libMANekselkiu: it's OK, I made the same mistake (failure to unzip csources) before.
13:44:20Araqso no wonder it doesn't compile
13:44:40Araqlet me see if my compiler eats this shit ...
13:46:12Araqhm
13:46:30AraqlibMAN: did you bootstrap?
13:47:15Araqlatest compiler supports 'push cdecl' and dom96 used it without even noticing it's ugly
13:47:18libMANNot sure what that means. For nimrod or aporia?
13:47:24Araqfor nimrod
13:48:02libMANI got the code from git 2 days ago.
13:48:31Araqthat doesn't mean its C sources are from 2 days ago ;-)
13:48:48libMAN(BTW, I've been avoiding git so I'm ignorant - what's the command to update code you've previously "clone"d?)
13:48:59libMANDid I fail to read some readme file again?...
13:49:06Araq./build.sh # only builds pregenerated C
13:49:20fowlgit pull
13:49:45Araqhttps://github.com/Araq/Nimrod/wiki/Bootstrapping
13:50:24Araqit's also in install.txt and in readme.txt
13:53:37libMANMy src update script includes `cd $SRCDIR/Nimrod && git pull git://github.com/Araq/Nimrod.git` and `cd $SRCDIR/Aporia && git pull git://github.com/nimrod-code/Aporia.git` - is this ideal?
13:53:52libMANAraq: sorry, I missed it somehow.
13:55:10Araqthe pull commands seem fine but you have to either bootstrap or fix the 1 line in aporia
13:55:36Araq{.push cdecl.} --> {.push callConv:cdecl.}
13:58:38libMANI think I forgot to run `nimrod c koch; koch boot` between Nimrod `build.sh` and `install.sh` ...
13:59:39libMANs/koch boot/\.\/koch boot/
14:00:06fowlkoch boot -d:release -d:useGnuReadline (unless that offends you)
14:00:41libMAN`./koch boot` fails with "root/src/Nimrod/compiler/docgen.nim(16, 45) Error: cannot open 'rstast'" (lemme know if you need full output pastebin).
14:00:46libMANNothing offends me. ;)
14:01:39libMANIn the "gnushit" jail, everything is permissible. :P
14:03:30AraqlibMAN: the error means that compiler/nimrod.cfg is either not found or the relative path in there doesn't work
14:04:14libMANthe koch args fowl just gave result in identical error (with some logical differences in above output)
14:05:58Araqwhen I bootstrap it says:
14:06:01AraqHint: used config file '/home/andreas/projects/nimrod/config/nimrod.cfg' [Conf]
14:06:03AraqHint: used config file '/home/andreas/projects/nimrod/compiler/nimrod.cfg' [Conf]
14:06:13Araqwhat does it say for you?
14:06:20libMANThe $SRCDIR/Nimrod/compiler/nimrod.cfg is present. Does it need a 'lib="/usr/local/lib/nimrod"' change same as /etc/nimrod.cfg?
14:06:23libMANsec
14:08:44libMAN`./koch boot` ==> http://pastebin.com/dZdAtv3A
14:10:02libMAN(Probably useless but `./koch boot -d:release -d:useGnuReadline` ==> http://pastebin.com/4fuasb3S )
14:10:31AraqHint: used config file '/root/src/Nimrod/compiler/nimrod.cfg' [Conf]
14:10:36Araqso that works
14:11:15Araqbut the relative path in compiler/nimrod.cfg seems to not work for some reason ...
14:11:34Araqpath="$nimrod/packages/docutils"
14:11:48Araqis the offending line
14:12:05Araqwhat does 'nimrod dump' say?
14:13:14libMAN`nimrod dump` ==> http://pastebin.com/zHyQ8RN0
14:14:22Araqok so at least it knows it's freebsd ;-)
14:15:26libMANChanged it to absolue path...
14:16:11libMAN('path="/root/src/Nimrod/packages/docutils"' in /root/src/Nimrod/compiler/nimrod.cfg)
14:17:21libMAN`./koch boot` got a lot farther this time, but failed on: "gcc: root/src/Nimrod/compiler/nimcache/cgen.o: No such file or directory
14:17:24libMANError: execution of an external program failed
14:17:48libMAN" // sorry, new IRC client, bad old pasting habits
14:18:45Araqthe compiler has some path weirdness so maybe it doesn't output to root/src/Nimrod/compiler/nimcache/*
14:19:47Araqtake a look where the 'nimcache' dir is created please
14:22:24libMANWeird, I ran it a second time (forgot to `... >stdout 2>stderr` for pastebin when I got the above-pasted cgen error) and it seems to have worked.
14:23:09Araqoh
14:23:20Araqtry with --parallelBuild:1 then
14:24:00libMAN`./koch boot` (repeat attempt after the above cgen.o error) ==> http://pastebin.com/tTBHAWw1
14:24:24libMANEnds with "executables are equal: SUCCESS!"
14:25:57Araqthat's good :-)
14:26:20Araqbut the path issues are worrying nevertheless
14:27:01libMAN`find /root/src/Nimrod | grep -i nimcache` => http://pastebin.com/7fniS7dq // weirdness
14:27:47libMANSomething is using relative path instead of absolute, resulting in "/root/src/Nimrod/root/src/Nimrod/compiler"
14:30:29libMANSo did `./koch boot` succeed, am I ready to run `./install.sh`?
14:30:59AraqI never use install.sh ;-)
14:31:54Araqbut you can try it
14:33:30libMANQuestion: I'll want to have two nimrod installs, one with Aporia in my "gnushit" jail for development UI, and one in the base system (once it's copyfree).
14:34:33fowli leave nimrod in ~/projects and have a symlink to it on $PATH
14:34:41libMAN(You can think of jails as just fancypants chroot.) Can I just run `./install.sh` outside the jail (/jail/gnushit/root/src/Nimrod/), or will that cause path problems and I need to redo some earlier steps?
14:34:54ekselkiuBSD user detected :P
14:35:29libMANI'll treat it as a FreeBSD port (i.e. installing under /usr/local), which I hope it soon will be.
14:39:15libMANIs "nim-" a good prefix for nimrod-related ports? (Ex. perl5 modules in FreeBSD ports start with "p5-", "hs-" for haskell, etc.)
14:39:50Araqnim- is good yeah, in fact some people start to call the language nim ...
14:40:36Araqabout the 2 installations: it shouldn't be a problem and the code is actually quite consious about all sorts of path issues
14:40:57Araq(which makes the problems you encountered even more annoying to me btw)
14:41:15libMANYeah, running install.sh outside the jail seem to have worked.
14:41:44libMANMaybe I'll make a FreeBSD package just for the heck of it.
14:43:19libMANFreeBSD has two versions, x11-toolkits/gtksourceview (v1.8.5) and x11-toolkits/gtksourceview2 (v2.10.5). I should use the newer, right?
14:43:32Araqright
14:44:23libMANSadly, unlike Gentoo Portage, FreeBSD doesn't support versioning in the same port, so you often have alternative ports. Like there can be lang/nimrod for stable version and lang/nimrod-devel for the cutting edge, with editors/aporia requiring the latter...
14:45:24Araqtbh I consider this unix stuff an abomination and avoid it like the plague
14:45:47AraqI don't care whether it's all "nice and clean" in my packagement management
14:45:52libMANI respect that. You wouldn't be a logical language designer if you didn't. ;)
14:45:56Araqwhich breaks from time to time anyway
14:46:26libMANIt was UNIX-beards that gave us Perl...
14:46:33fowli wish gobolinux was still around :(
14:47:28Araqnot to mention that the package manager is mostly a workaround for the dreaded directory hierarchy
14:49:03fowlin gobo the hierarchy is the package manager
14:49:16AraqI know, love gobo's concept too
14:49:28Araqexcept it never ran on my machines -.-
14:55:06Araqhave to go, see you later
14:55:35libMANttyl
14:57:57libMANAporia compiled fine (after remembering to add the lib change to /etc/nimrod.cfg again, after install.sh overwrite it w/o warning).
14:58:53libMANUpon running `./aporia`, a "Warning" msgbox comes up: "Unable to bind socket. Aporia will not function properly as a single instance. Error was: Can't assign requested address"
15:44:06dom96libMAN: Aporia uses sockets as a "Single instance" mechanism.
15:44:42dom96(i.e. if aporia is running and you execute 'aporia file.txt' it will be opened in the currently running instance.)
15:45:08dom96Seems like a BSD sockets bug?
15:47:17ekselkiuWhat sort of socket is it using?
15:47:56dom96A TCP socket
15:50:29dom96https://github.com/nimrod-code/Aporia/blob/master/aporia.nim#L1984
15:50:38dom96libMAN: You could try changing the port in the config file.
15:50:59dom96The default port is "55679"
16:00:55*ekselkiu left #nimrod (#nimrod)
16:42:24*Trixar_za is now known as Trix[a]r_za
17:20:25libMANI've made http://libman.org/pkg/nimrod-0.9.1.txz - it's for FreeBSD 9.1R i386, but could work elsewhere. Very crudely created w/o a source port, just an experiment...
17:25:45*jse joined #nimrod
17:28:45libMANWhat's ugly about that package is that it uses @cwd of / instead of /usr/local. It was easier that way due to the three files it places in /etc.
17:31:53libMANIf I wasn't lazy, I'd move those files to like /usr/local/share/nimrod/etc/*.sample, and then add +CONTENTS @exec and @unexec commands to copy them into place (without overwriting existing).
17:38:31libMANCould the socket problem be related to FreeBSD jails?
17:39:36dom96maybe.
17:49:34libMANAporia just needs the ini file to run, nothing else from the build directory?
17:50:14libMANDoes it look for ini file in local directory only?
18:00:11*jse left #nimrod (#nimrod)
18:41:58dom96libMAN: A .ini should be created in ~/.config/aporia when running aporia for the first time
18:42:09reactormonkAraq, aaand how without passing the 'options' all the time?
18:42:41dom96Aporia depends on the share folder in its directory.
18:45:26*gradha joined #nimrod
18:48:50gradhaif gobolinux was good, why did people stop using it?
18:55:42libMANdom96: running `aporia` in the git dir where it was built works, but moving it to /usr/local/bin/aporia results in /usr/local/bin/aporia
18:55:51libMANerr, paste problem again...
18:55:56libMANhttp://pastebin.com/U5VXnQ5K
19:04:54dom96libMAN: You can copy share/language-specs/nimrod.lang to /usr/local/share/gtksourceview-2.0/language-specs/
19:05:04dom96or /usr/share/gtksourceview-2.0/language-specs
19:09:02libMANThat previous issue (socket problem) is indeed jail related. Running it in chroot instead of jail didn't have this problem.
19:11:01libMANCan probably be fixed with a right sysctl setting (set from /etc/rc.conf), will look into this later.
19:13:10dom96why are you running it in a jail?
19:14:06gradhadoesn't want free software to escape?
19:16:36libMANSeveral reasons. One is that I like to keep my stable base system separate from an "experimental" system. Secondly I only allow non-copyfree packages in the latter.
19:17:37libMANSo if aporia contained code to `rm -rf /`, it would only hurt a bunch of non-copyfree packages I only occasionally need, like gimp, and no important data.
19:25:21dom96Simply don't run aporia as root if you're so paranoid :P
20:48:44libMANWhy don't I have the rst module installed? (Playing with nimforum.)
21:14:15Araqreactormonk: use a default parameter? p(param1: int, options=options)
21:14:34AraqlibMAN: nimforum uses docutils from the nimrod distribution
21:15:00Araqagain you need to change some path
21:15:32Araqgradha: dunno if gobolinux was good, I could never try it, but it had the right ideas
21:16:07gradhacan you iterate a sequence of tuples unpacking the tuples? like "for var1, var2 in list_of_tuples: blah"?
21:18:23gradhahmm... looks like the iterator for such a list returns two values: the index position, then the tuple element
21:18:38*libMAN tries to figure out nimforum/nimrod.cfg ...
21:18:58gradhais this documented somewhere? it has really surprised me
21:20:39Araqfor val1, val2 in items(x)
21:21:03Araqit's 'items' if you have 1 for-loop var
21:21:12Araqbut 'pairs' if you have 2 for-loop vars
21:21:32gradhayes, the code "for jjj in joined: echo jjj" and the code "for s1, s2 in joined: echo s2" have the same output
21:21:59Araqpairs for an array yields (index, value)
21:23:01gradhawant me to patch the tutorial with this info?
21:23:27libMANnimforum compiled, but again it created ./`pwd`/nimcache instead of ./nimcache
21:23:36gradhaI guess it belongs to the for section rather than the sequence section
21:24:09Araqgradha: sure feel free
21:24:28gradhaI see now items(x) is used three times, but subtly
21:28:20libMANDo I create the sqlite schema somehow?
21:28:50gradhabtw, with the recent documentation changes to sequtils the docs for the filterIt template don't appear
21:29:39dom96libMAN: There is a createdb.nim file in the repo.
21:30:43libMANBah, I'm usually sharper than this... Sorry about the stupid questions.
21:33:44Araqgradha: are you sure that's not been missing ever since docgen defaults to doc2 now?
21:35:21libMAN`nimrod c createdb.nim` error: http://pastebin.ca/2301825
21:35:53gradhaAraq: does the version at http://nimrod-code.org/sequtils.html use the new doc2? can't remember now
21:36:27Araqgradha: it doesn't
21:36:51gradhawill try now an older version to verify
21:36:52Araqyou can see the difference because doc2 gets rid of the * export markers
21:38:31gradhayes, the problem is with doc2
21:38:49Araqso doc2 doesn't generate template definitions
21:38:50gradhathe docstring for the first template is eaten
21:38:58gradhadoc2 generates the second one, though
21:39:18Araqsounds easy to fix
21:39:36gradhaarray visitor pattern from hell?
21:39:54Araqwhat?
21:40:28gradhait's when you access incorrectly an array, here, somehow the first element is missing
21:41:49Araqwell filterIt is broken anyway
21:41:49gradhadescribed somewhere around http://www.tonymarston.net/php-mysql/design-patterns.html#resign.patterns, search for hell
21:44:10Araqgradha: doesn't apply we have array bounds checking in Nimrod ... :P
21:44:22AraqfilterIt is broken anyway btw
21:44:42Araqthe 'block: result' idiom has been broken by some codegen changes
21:44:49Araqblame zahary for it ;-)
21:44:56gradhazahary: bad boy!
21:45:40gradhathe tests I added to the module work, will they break with something more complex?
21:45:47*dallbee joined #nimrod
21:45:55dallbee<dom96> This will probably make you hate Nimrod a LOT.
21:45:56dallbee<dom96> But it disallows tabs :P
21:45:56dallbee<dallbee> what the fuck
21:45:56dallbee<dallbee> rofl
21:45:56dallbee<dallbee> Why does nimrod make so many choices FOR the developer
21:45:58dallbee<dallbee> The point of a programming language is to give the developer power
21:46:00dallbee<dallbee> not to limit the developer.
21:46:02dallbeeGood day.
21:46:04dallbeeOh, nimrod is really cool
21:46:06dom96dude. Don't spam the channel
21:46:06dallbeeThat just pissed me off.
21:46:09*dallbee left #nimrod ("Leaving")
21:46:51Araqnow that was quick at least
21:47:11JStokerOut of interest, why does nimrod forbid tabs?
21:48:01gradhatabs are just broken for so many human purposes, puny humans are incapable of understanding them
21:48:08Araqwell mixing tabs and spaces is bad for an indentation based language
21:48:36Araqallowing both causes some problems in python
21:48:43gradhaI believe part of the hate towards Makefiles is they require tabs
21:49:34dom96libMAN: "Operation successful" that doesn't seem like an error?
21:49:56JStokerI agree perfectly with the whole 'DO /NOT/ MIX TABS AND SPACES'. But, why not (assuming people are consistent, at least) let people use tabs? Or, replace them early on in the parser with a few spaces or whatever.
21:50:17gradhatabs won't play nice with multiline strings like """
21:50:31gradhaor at least they will create more confusion
21:50:54gradhaalso, do you allow tabs everywhere or only beginning of line?
21:51:55AraqI don't mind tabs everywhere that much but since I don't use tabs ... :P
21:52:37Araqplus if your editor can't produce spaces when you press TAB you need a new editor
21:53:05*JStoker dislikes having to switch between them because I always bloody forget, and it screws python code up, heh.
21:53:46Araqmost source code files I open use a combination of 4 spaces where 8 spaces are compressed to a \t
21:53:52gradhaI know of some editors which have special mixed tab modes: they logically ident to 3 spaces, but visual blocks of 8 columns are replaced with a single tab. Mayhem!
21:53:54Araqtry to change the tab width for that!
21:56:29gradhaplus we haven't touched the holy war of "how many columns does a tab character actually represent?"
21:57:07gradhamost people agree in defeat that 8, but some insist on using tabs as 3 or 4 columns, then indent code to align stuff visually, and everything is broken in diffs or other editors
21:57:42dom96gradha: could you explain more why tabs don't play nicely with multiline strings?
21:58:22gradhathey don't work for "human" purposes, nothing wrong at the computer level
21:58:45gradhasame reasons as for indenting code, you blast the string to stdout and figure why it looks broken
22:01:20gradhait's a pity nimrod disallows tabs, I like them, they tend to be a filter for bad programmers
22:02:01dom96hah
22:04:46libMANWeird how some nimrod compilations (ex. nimforum's createdb) error out the first time, but work the second time (when I re-run them to pipe output to pastebin)...
22:05:25AraqlibMAN: not weird, it's the same bug you encountered already I think
22:05:34dom96I need to try to set up a freebsd builder for nimbuild.
22:05:37Araqit generates 2 nimcaches
22:05:51Araqon bsd for some reasons
22:07:07libMANnext nimforum issue, after running `createdb`, relaunching `forum`, and connecting via browser, I get error message ending in: "no such column: lastOnline"...
22:08:15Araqhe he, dom96 forgot to update createdb I guess
22:08:27dom96possible
22:10:43libMANUsing latest git HEAD sources, I restarted `forum` after running `createdb`. nimforum.db is 10kb
22:11:03libMANContains tables: antibot, person, post, session, thread
22:14:58libMANThere's no person.lastOnline column...
22:15:43AraqlibMAN: yes we got that
22:15:59libMANSorry, I read that as "he [me] forgot to update createdb".
22:16:20libMANI'm having a very absentminded year so far...
22:29:23*gradha quit (Quit: Leaving)
22:32:50dom96libMAN: i'll fix this for you now
22:33:20libMANNo need to rush, I'm just reading some nimrod code for learning
22:34:07Araqdon't read the compiler's sources :P
22:34:19Araqthey are -er- special :DD
22:52:38dom96hah, just realised there is a editdb.nim ...
22:52:44dom96oh well
22:56:46dom96libMAN: Try it now