<<08-07-2012>>

00:03:40dom96hello SchalaZeal
00:04:09dom96SchalaZeal: What do you mean?
00:05:23dom96filwit: Haha. Nice.
00:05:33filwitnot really...
00:05:35dom96Better protect your gmail more.
00:05:46filwitluckly it actually blocked their login
00:05:58filwitcause it was so far out of my usual login locations
00:06:01filwitso I should be fine
00:06:16filwitmy previous password was crap anyways
00:06:44dom96I have both a password and a code which can only be generated by my phone :D
00:08:00SchalaZealoops
00:08:06SchalaZealthought you were all in bed
00:08:55SchalaZealanyway, what I mean is that the compiler could simply delegate the generated code to a cross compiler toolchain like..... arm-wince-gcc
00:09:46SchalaZealBut instead it stops at the generated code and makes the developer take it to a computer with the targetted system
00:10:30SchalaZealIn the case of say, iPhone or Android, that isn't an option really.
00:10:40dom96Well ARM support was quite trivial to implement.
00:10:52SchalaZealso I've seen
00:11:08dom96Cross compilation should be possible though quite easily.
00:11:18dom96IIRC nimrod already supports it
00:11:51dom96Maybe you could improve it?
00:12:13SchalaZealI wish I could directly but I suck at understanding internals
00:12:31SchalaZealcurrently coding a helper program
00:13:24dom96That's fine too.
00:14:20SchalaZealMy biggest peeve about Nimrod has to be the cross compiler system that's not really cross compiling anything as much as it is processing defines and leaving it at that.
00:15:06dom96Submit a bug report on github perhaps
00:15:15dom96or create a new thread on the forum
00:15:21dom96Araq has gone to sleep unfortunately.
00:15:29SchalaZealhmm
00:16:45dom96Araq: oh, btw when you get back. Nimrod does bootstrap with -d:release on ARM :)
00:17:15SchalaZealwoah... looking at internal docs and....... "ref object" syntax is implemented??
00:17:48SchalaZeallike pfoo = ref object x, y, z: int?
00:18:22dom96it is? 0_O
00:19:05SchalaZealuses it as an example of compiler hacking
00:19:28SchalaZealhttp://nimrod-code.org/intern.html#code-generation-for-closures
00:19:41SchalaZeallook at the example code
00:21:23dom96Maybe its been there all along but I never realised.
00:21:34dom96Those docs are quite old though.
00:21:58SchalaZealbuild.nimrod-code.org/docs are the new ones?
00:22:08dom96yes
00:23:35SchalaZealk
00:24:57SchalaZealah no... got an error... guess it doesn't
00:30:19SchalaZealpull requests sync my fork with the original, yes?
00:30:46dom96hrm, i'm not sure.
00:39:21SchalaZealwell, here's my first commit anyway: https://github.com/Schala/Nimrod
00:42:15SchalaZealadded unsigned C types and switched cint to int and clong to int32, they were reversed
00:43:36dom96I think Araq is implementing something to do with that so your changes will clash with his.
00:46:42SchalaZeal........oh
00:46:55SchalaZeal*junks my fork*
00:47:25Trixar_zaNo, forking is fun
00:47:28Trixar_zaI do it all the time
00:47:45dom96I prefer sporking
00:48:18SchalaZealsporking = forking and deleting original for lolz?
00:49:12dom96I have no clue what sporking means, I don't think it means anything :P
00:49:44SchalaZealheh I know
00:50:14SchalaZealThe lineage of sporking goes back several eons, in fact predating the dinosaurs!
00:59:00SchalaZealAlmost done with my StormLib and JPEG wrapperS. Which means after a bit of testing Nimrod code can soon deal with .jpg and .mpq files
00:59:34dom96nice
01:00:45SchalaZealMPQ files are a propritary archive format used by Blizzard in their games
01:02:46SchalaZealand I have an implementation of Minecraft's map API in the works. It won't be easy though because Java's API has stuff Nimrod lacks somewhat.
01:03:18dom96Now that would be cool :)
01:03:55SchalaZealthe source code in Java is on the wiki, so I'm trying to rewrite that in Nimrod
01:05:26SchalaZealmy work so far: https://github.com/Schala/nimrod-modules/blob/master/lib/pure/minecraft.nim
01:07:35fowlSchalaZeal, cool work on the png/jpeg wrappers
01:07:53fowli tried to wrap freeimage but gave up pretty quickly >_<
01:08:12SchalaZealC++ wrapper?
01:09:02SchalaZealI do have a PNG wrapper in the works but doing all the structs is tedious
01:09:36*dom96 shall follow you :)
01:18:55*SchalaZeal quit ()
01:48:34*Trixar_za is now known as Trix[a]r_za
02:45:37*filwit quit (Quit: Leaving)
05:27:09*SchalaZeal joined #nimrod
05:27:28SchalaZealWell, an even better undertaking came to mind.
05:29:41SchalaZealTerraria's developer was answering a Q/A about the cease of development. When someone asked about open sourcing, they replied "There's a reason we didn't obfuscate the code ;)" ..... which gives me the idea of rewriting it in Nimrod
08:38:33Araqhi SchalaZeal
08:38:54AraqI'm working on the unsigned stuff, so please be patient ;-)
08:40:08AraqI also have a much better system for integer promotion rules in the works
08:40:41Araqand 'ref object' is in the internal documentation as pseudo code ;-)
08:40:49Araqthe compiler still does not support it
08:56:46AraqI have to go; answered about the cross compilation in the forum
08:56:48Araqbye
09:07:22SchalaZealah ok
09:07:30SchalaZealI was busy heh
09:24:23SchalaZealby the way, in regards to calling a compiler with a name like "arm.linux.gcc", having some of these myself they are known to have hyphens instead of dots, like arm-linux-gcc, and some vendors have different names to the executable name (ie. Ubuntu's MinGW is i586-mingw32msvc-gcc while Arch's is i486-mingw32-gcc) So there might need to be some flexibility regarding the toolchain's prefix, like
09:24:23SchalaZealthe option to explicitly specify it, like FPC does with binutils
09:24:44SchalaZealwith its -XP switch
09:48:52*Trix[a]r_za is now known as Trixar_za
09:52:12*mal`` quit (Quit: ERC Version 5.3 (IRC client for Emacs))
09:56:28*mal`` joined #nimrod
10:12:36Araqback
10:13:13AraqSchalaZeal: the config system takes care of the details of the naming of the exes
10:13:48Araqthe name arm.linux.gcc is the name for the config system
10:14:00Araqit will be mapped to some exe like so:
10:14:13Araqarm.linux.gcc = "arm-linx-gcc"
10:15:08SchalaZealah
10:15:19SchalaZealthat sounds awesome
10:15:57SchalaZealman my arm is tired
10:16:15Araqtry a powerpc then ;-)
10:16:23Araqsorry, couldn't resist ...
10:17:35SchalaZealtrying to get banned from Warcraft since despite removing my payment info I'm still getting charged because of that stupid agreement, and the company behind it are dinks, so I sort of hit a milestone
10:18:27Araqha you should have lots of time for nimrod now :D
10:18:27SchalaZealbeen flooding its chat channel at a fast rate by manually hammering my macro button
10:18:39SchalaZealgot autobanned
10:18:55AraqWOW is quite time consuming I heard ...
10:19:38SchalaZealand to try to make it seem like I'm up to even more bad, I just googled "wow gold" and spammed the description of the first result on the list
10:21:23fowllol
10:21:35fowli've lost many friends to WOW :(
10:22:16SchalaZealon top of that I've been attempting to quote-unquote "scam" people by sending obviously suspicious letters complete with "cash on delivery" price for 10000g each........only really dumb people fall for these and I'm hoping at least one of the 12 people I sent that stuff to actually reports me for scamming them in the game
10:22:47SchalaZealsome people tend to simply disregard them
10:22:55AraqSchalaZeal: sounds you have lots of fun these days :P
10:23:24fowlSchalaZeal, why would you agree to continue to be charged
10:23:35SchalaZealwell I tried using Cheat Engine to modify my stats and cheat but the game is virtually unhackable
10:23:47SchalaZealthat was before I hated the game
10:24:00SchalaZealthe "annual pass" feature
10:24:26SchalaZealif I'm not barred from WOW, the charges end in January
10:24:50SchalaZealhopefully though the account won't survive to see a July 9th payment :D
10:25:43SchalaZealtrying to annoy customer service did no good though...
10:27:17SchalaZealeven tried trolling them by asking really bad questions such as "What was your favorite part of 9/11?" .... now 9/11 did upset me, make no mistake... but I was willing to say anything to get them to consider banning me
10:28:28SchalaZealthe most humorous result was this one rep who replied "You sound grumpy. Let me read you one of my favorite poems" and he actually did post a poem in the reply
10:28:36Araqbrb
10:28:39SchalaZealanyway, rant's over
10:29:00SchalaZealTLDR: I had a fulfilling night
10:31:00Trixar_zaTraceback (most recent call last) tazpanel_inc.nim(124) tazpanel_inc tazpanel_inc.nim(90) cat Error: unhandled exception: index out of bounds [EInvalidIndex]
10:34:01SchalaZealbtw, yeah I'll have more time for Nimrod, but I've been into 3D modelling too..... hard to choose what I wanted to do more so I do both
10:34:27SchalaZealthough honestly, modelling gets my attention much more
10:34:48SchalaZealcoding I need a break from after an hour
10:35:16SchalaZealmodelling I can do up to a full 8 hours with possible restroom breaks/drink
10:40:28SchalaZealOFF TEH BED
10:40:30SchalaZealoops
10:40:33SchalaZealoff to bed
10:40:40*SchalaZeal quit ()
10:42:38AraqTrixar_za: what's wrong with an "EInvalidIndex" exception? :P
10:43:06Trixar_zaI don't know how to make it go away
10:43:52Trixar_zahttp://forum.slitaz.org/topic/nimrod-the-great
10:43:54Trixar_za:P
10:45:04Trixar_zaAh, looks like a bug in the package management
10:45:05Trixar_zalol
11:04:08*zahary_ joined #nimrod
11:20:15dom96good morning, er, I mean afternoon!
11:21:25Trixar_zaGood afternoon dom96
11:21:57dom96hey Trixar_za!
11:23:35dom96A package manager in Nimrod :O
11:23:37dom96COOL
11:24:04Trixar_zaWell, part of it
11:26:49dom96Tell him to put the source of that on github ;P
11:32:09Trixar_zalol, you want everything to be on github
11:35:19dom96yes!
11:35:44Trixar_zahttp://forum.slitaz.org/topic/nimrod-the-great#post-11974
11:36:19dom96hehe, thanks.
11:55:47fowlif i have type Foo = object; bar: proc() is there a way to get the object (caller) from (Foo instance).bar() ?
11:58:25fowlother than defining it as Foo = object; bar: proc(f: Foo) and calling with f.bar(f)
12:13:12dom96No. But you should call it like so: f.bar()
12:13:21dom96f.bar() is the same as bar(f)
12:19:26fowldom96, not when bar is a field on f
12:19:46dom96oh that's what you mean
12:20:04dom96No, that's the only way.
12:20:17dom96Actually you might want to tell Araq about that.
12:20:18fowl:(
12:20:28dom96It seems like it should just work like f.bar()
12:20:36fowlf.bar() does work
12:20:47fowlbut how can i know about f from inside f.bar()
12:21:03dom96Yeah, in that case you have to pass it.
12:21:14dom96The compiler should perhaps infer this
12:21:36dom96I'm not sure how complicated implementing this would be.
12:21:53dom96But yeah, submit a feature request to github. Or ask Araq when he's around.
12:22:08fowlok
12:22:13dom96The only way to do it in this situation right now is to do: f.bar(f)
12:22:22dom96or, I guess:
12:22:31dom96var barFunc = f.bar
12:22:37dom96f.barFunc()
12:23:03*Trixar_za is now known as Trix[a]r_za
13:13:28Araqfowl: you need to do f.bar(f) in this case
13:13:35Araqor you use a method ;-)
13:13:45Araqor a closure
13:22:01Araqping zahary_
13:27:42fowli cant see how a method is different, and i need more info about this hidden implicit parameter ._.
13:38:09Araqwell
13:38:20Araqif you use a proc var, you need dynamic binding
13:38:32Araqyou can get dynamic binding with methods too
13:38:59AraqI had the same problem as you for the streams module
13:39:02AraqI used:
13:39:27Araqoo = object; barImpl: proc(f: Foo)
13:39:45Araqproc bar(f: Foo) = f.barImpl(f)
13:40:01Araqand was done with it :P
15:56:21*SchalaZeal joined #nimrod
17:51:20*SchalaZeal quit ()
18:23:02Araqping zahary_
18:26:57dom96Araq: So, tell us about these integer promotion rules :P
18:27:37Araqthe compiler is now smart ;-)
18:28:00Araqsome built-in operators produce an implicit 'range' type, for instance 'mod' and 'and'
18:28:23Araqso the compiler now knows that
18:28:27Araqcase x mod 3
18:28:38Araqof 0, 1, 2: echo "true"
18:28:46Araqcovers all cases
18:29:23dom96Very nice.
18:29:28Araqand 'range' is convertible to a smaller int type, so:
18:29:39AraqmyByte = myInt and 0xff
18:29:42Araqis valid code now
18:30:11Araqbasically if the compiler can prove it safe at compile time, it is valid
18:30:16Araqotherwise it's invalid
18:30:30Araqthis means that 'int' is not convertible to 'int32' implicitely anymore
18:30:34Araqwhich breaks lots of code
18:30:43fowldo you have objections to &(), |(), ~() for ints
18:30:44Araqbut IMHO it improves code quality
18:31:21Araqfowl: yeah because & | and ~ are nicer for more common operations
18:31:37Araqbut you can easily define them for your own code
18:32:06fowli did, and felt powerful when it "just worked" :p
18:32:16Araqbitwise ops are less common in Nimrod code since Nimrod has proper bitsets
18:32:33Araqflags are supposed to be done with set[T]
18:33:39Araqoh and yes, the new rules make the compiler slower ... 0.1s for bootstrapping on my machine
18:36:09dom96That's not super bad.
18:37:02Araqyeah it's acceptable
18:37:20Araqoh and I broke bootstrapping :P
19:08:00*SchalaZeal joined #nimrod
19:32:13Araqso SchalaZeal, I'm impementing the cross-compilation stuff now
19:32:20Araqwill you test it? :P
19:32:45SchalaZealoops
19:32:54SchalaZealyeah I definately will
19:33:10SchalaZealmIRC has no alerts >.<
19:37:27Araqwell change that
19:38:18SchalaZealI don't develop it.... some ignoramus does
19:39:26AraqI meant "change it in the settings" ...
19:40:18SchalaZealhang on
19:41:10SchalaZealnope... I see nothing...heh
19:41:39Araquse another application then :P
19:42:29*fowl starts writing "string".echo() >_>
19:45:28Araqfowl: write "string".echo instead
19:45:35AraqI dislike trailing empty ()
19:46:06Araqer what?
19:46:11Araqthat doesn't work? o.O
19:47:41fowlnope <_<
19:48:31*Araq is fixing it
19:49:38fowli assume x.someproc wont call someproc if its a procvar
19:51:16Araqyeah but 'echo' is hardly a procvar
19:52:50dom96Araq: You broke quite a few tests :P
19:53:09Araqyeah and I bet aporia too :P
19:54:26dom96Now it's personal :P
19:56:21Araqyummy 96.07%
19:56:27Araqworst result since a long time
19:59:38Araqdom96: please try to recompile aporia the next days; should it be too painful I'll add the implicit conversion from int to int32 back ...
20:00:00dom96will do
20:17:44SchalaZealpas2nim is apparently broken, heh
20:18:04SchalaZealas is c2nim
20:19:42SchalaZealshould I rebuild from C sources?
20:21:32SchalaZealcause it seems even the compiler itself is failing
20:22:26Araqwell when I say "I broke bootstrapping"
20:22:40AraqI really mean it and you need to recompile from C sources first :P
20:23:06SchalaZealah
20:23:07Araqand yeah I know I broke lots of tests as well ... working on it
20:23:28SchalaZealis there a way to configure which C compiler to use for bootstrapping?
20:23:42Araqyou can edit the build.sh script
20:23:57Araqit's quite edit-friendly even though it's generated code
20:26:37Araqdom96: does docgen still work?
20:27:55SchalaZealWell, other than making the compiler 'cl', I don't know about flags... heh
20:28:05dom96Araq: Looked at Nimbuild?
20:28:25dom96Araq: When the "Documentation" button is green it means the latest commit has built docs successfully
20:28:34Araqoh I see :-)
20:42:09Araqok a minor detail
20:42:24Araqhow should the compiler output "int literal of value X"?
20:42:38Araqright now it uses "int(X)"
20:42:56Araqfor instance the type "int(6)" is produced for the literal 6
20:43:08Araqhowever, this could be confusing I guess
20:43:14Araqso how should it be done?
20:54:20dom96Can't really think of a better way
20:54:22SchalaZealnim_dat.c isn't being outputted, keep getting "no such file or directory"
20:55:08SchalaZealbootstrapped the new compiler but that happens when I try to use it
20:55:21Araqstrange
20:55:31Araqwhat did you do exactly?
20:56:54SchalaZealwell I set up MinGW, ran the bootstrap which reported a success, then moved the new compiler binary to my install folder and ran it with no config changes other than what I had before which was setting the compiler to vcc
20:58:17Araqwell the compiler obviously produces nim__dat.c otherwise it wouldn't bootstrap on 4 machines
20:58:39Araqtry to compile with -f
20:58:53SchalaZealoh, wait... running it with MinGW helps a bit, but now it's saying koch.res doesn't exist
21:00:31SchalaZealthis is nuts
21:00:45SchalaZeal-f doesn't make a difference either
21:03:07SchalaZealoh wait
21:03:14SchalaZealwell got VC build fixed
21:03:31SchalaZealGCC still chokes on koch.res not being around though
21:03:54Araqbtw you can't just replace the nimrod.exe
21:04:02Araqyou need to update the stdlib too
21:05:56SchalaZealwell running the script I made to automate the build does that and.... that won't work
21:08:06SchalaZealit compiles koch.nim and nimrtl.nim fine but the new koch gives an unknown exception and nothing else builds
21:08:48Araqwhat's an "unknown exception"?
21:09:21SchalaZealError: unhandled exception: unknown OS error [EOS]
21:09:34SchalaZealthat's all koch will do is output that
21:10:39Araqcompile koch in debug mode then
21:11:01SchalaZealk
21:12:18SchalaZealhttp://pastebin.com/SHkzkLrN
21:13:07SchalaZealoh!
21:13:16SchalaZealit needs bin\nimrod.exe
21:13:34SchalaZealwon't use the one in install folder or %PATH%
21:14:55SchalaZealthere we go
21:15:39SchalaZealGCC is still broken because <appname>.res won't be found
21:16:48Araqwell does <appname>.res exist or not?
21:17:47SchalaZealno, but GCC is supposed to use windres to generate it from <appname>.rc
21:18:00SchalaZealwhich does exist
21:20:36Araqwell you could do without a nice icon for now ...
21:26:40SchalaZealI would but it seems mandatory in the build process, but the VC build works so I'm ok for now
21:27:41Araqyou need to edit 'koch.nim' to get rid of it
21:30:13SchalaZealah ok
21:34:17Araqthere you go, SchalaZeal, I even documented it :P
21:34:50dom96So, should I sacrifice my precious time to set up nimbuild on my RPI? :P
21:36:07Araqhrm yes
21:37:07SchalaZealoops
21:37:10SchalaZealthanks!
21:55:02*Trix[a]r_za is now known as Trixar_za
23:00:15SchalaZealhmm... complains about the times module missing now
23:03:57SchalaZealI think one of the paths in nimrod.cfg was accidentally removed
23:04:05SchalaZealin the cross commit
23:04:28SchalaZealhmm
23:05:02SchalaZealoh
23:05:04SchalaZealmy bad
23:05:19SchalaZealmust've moved the new cfg rather than copying it... doy!
23:05:53SchalaZealah yes, fixed
23:14:52*SchalaZeal quit ()
23:23:49*SchalaZeal joined #nimrod
23:31:37SchalaZealHmm... I have a question about babel.
23:43:48SchalaZealaw nuts... cross compilation's a bit off
23:44:34SchalaZealtries to call i486-mingw32-gcc.exe instead of just i486-mingw32-gcc, my Linux-to-Win32 cross compiler
23:48:16SchalaZealTo be honest though, the '.exe' suffix, when calling from command prompt in Windows, is optional. I think it would be better just to omit the explicit '.exe' suffix in the Win32 C compiler calls