<<29-05-2013>>

00:49:22*NimBot joined #nimrod
00:49:47*dom96_ quit (Quit: Leaving)
01:02:21dom96good night
01:03:39fowlnight
01:18:30*ARCADIVS joined #nimrod
01:23:43*q66 quit (Remote host closed the connection)
01:32:45reactormonkany way to get line information about 'system module needs X'?
02:45:53reactormonkError: system module needs 'TNimType'
02:46:04reactormonktriggered by const pccHack = if defined(pcc): "_" else: "" # Hack for PCC
02:46:17reactormonkbut I included hti beforehand
03:20:53reactormonk... strange
03:41:32fowlneed more compiler devs in the western hemisphere
04:13:23*comex is now known as Sir_Burpalot
04:13:52*Sir_Burpalot is now known as comex
04:23:42*OrionPK quit (Read error: Connection reset by peer)
05:31:52*ARCADIVS quit (Quit: WeeChat 0.3.8)
06:50:35*Trix[a]r_za is now known as Trixar_za
07:19:55*Araq joined #nimrod
07:20:35*toolmaker joined #nimrod
07:21:11toolmakerAraq: knock knock
07:22:40toolmakerAnyone here used threads with nimrod?
07:22:43*Araq quit (Client Quit)
07:33:25toolmakerAnyone here?
07:33:27fowltoolmaker, best to post on the forums
07:33:41fowlsince you're in that 4th dimension time zone
07:33:47toolmakerreally?
07:33:51toolmakerhaha..oh.ok...
07:34:05fowlwell activity starts up here in about 6 hours
07:34:41toolmakerok..that's perfect for me too… I'll join then..
07:34:45toolmakerthanks for the tip man.
07:34:53fowlno problem
07:35:04*toolmaker left #nimrod (#nimrod)
08:19:48*Trixar_za is now known as Trix[a]r_za
08:29:22*zahary_ left #nimrod (#nimrod)
08:40:53*Araq joined #nimrod
08:42:32*zahary_ joined #nimrod
09:20:45*Araq quit (Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931])
10:41:13*Araq joined #nimrod
10:47:05Araqzahary_: changing the order of .global. variables breaks bootstrapping
10:47:22AraqI'm not sure why ... something rope related
10:47:46Araqthe booting iteration then fails at the last step, the compiler produces wrong C code then
10:48:09zahary_I'll bump into it, right? if I start messing with the order
10:48:27Araqyeah
10:48:45zahary_I think the bigger problem is that we still put generics in the first module that uses them
10:48:50zahary_this breaks my spec too
10:49:03Araqwell I implemented a hacky solution to get rid of the preInit proc
10:49:17zahary_because, these injected globals end up being inserted all over the place
10:49:26Araqthat lead to reverse order for .globals
10:49:27Araqbrb
11:03:38*toolmaker joined #nimrod
11:03:42*Araq quit (Read error: Connection timed out)
11:04:28*Araq joined #nimrod
11:05:22toolmakerAraq: Have two minutes to spare?
11:08:25*toolmaker left #nimrod (#nimrod)
11:12:00*q66 joined #nimrod
11:34:15fowlsomeone should do a wrapper for kolibriOS
11:34:19fowlhttp://wiki.kolibrios.org/wiki/C/C%2B%2B_programming#GCC.2FG.2B.2B
11:50:30*Araq quit (Read error: Connection timed out)
11:51:28*Araq joined #nimrod
13:15:06dom96'morning
13:15:45zahary_dom96, weren't you in the UK?
13:15:58dom96yeah, it's technically afternoon :P
13:16:35zahary_I use to wake up late back at your age, but nat that much :)
13:17:15dom96lol. I stayed up to migrate the Linode VPS, so I have an excuse :P
13:17:26zahary_:)
13:52:54*Araq quit (Read error: Connection timed out)
13:54:25*Araq joined #nimrod
13:55:45*Araq quit (Client Quit)
14:39:41reactormonkError: system module needs 'TNimType' triggered by const pccHack = if defined(pcc): "_" else: "" # Hack for PCC but I included hti beforehand
15:22:24*Endy joined #nimrod
17:20:31reactormonkAraq_bnc, any idea?
17:29:17*Araq_bnc is now known as Araq
17:30:29Araqreactormonk: ensure that NimString is defined before you include hti
17:30:51Araqor whatever the symbol was it depends on to determine it's included by system.nim
17:55:17*OrionPK joined #nimrod
18:02:40*[1]Endy joined #nimrod
18:02:48*Endy quit (Ping timeout: 252 seconds)
18:26:10*amarsahinovic joined #nimrod
18:26:52*burntsushi quit (Read error: Connection reset by peer)
18:27:10*burntsushi joined #nimrod
18:34:02*[1]Endy quit (Ping timeout: 252 seconds)
18:42:04reactormonkkk
18:43:08reactormonkAraq, it is
18:45:32reactormonkwill const SystemModule = true trigger defined(SystemModule) ?
18:50:14reactormonkyep.
18:50:39reactormonkjust did the above. Now I'm at Error: system module needs 'nimGCvisit'
18:57:43*Endy joined #nimrod
18:58:37reactormonkAraq, now I know why the system.nim is one big file
18:58:52Araqreactormonk: good ;-)
19:00:11reactormonkAraq, slightly messy now
19:02:52Araqand yet you always get a "nice" compiletime error
19:03:37reactormonkyou could say that ;-)
19:23:58reactormonkAraq, argh, I'm not really sure the stuff is cleaner afterwards
19:30:38reactormonkARGH
19:34:22Araqwelcome to the internals of Nimrod ;-)
19:34:31*amarsahinovic quit (Ping timeout: 276 seconds)
19:35:03Araqlets see what the manual has to say about it:
19:35:05Araq"Complexity" seems to be a lot like "energy": you can transfer it from the end user to one/some of the other players, but the total amount seems to remain pretty much constant for a given task."
19:36:38*amarsahinovic joined #nimrod
19:42:27*amarsahinovic quit (Ping timeout: 256 seconds)
19:48:41*OnionPK joined #nimrod
19:51:56*Endy quit (Ping timeout: 290 seconds)
19:54:42*OrionPK quit (Ping timeout: 276 seconds)
19:57:19reactormonkAraq, or you can spend a great effort to vent it
19:57:37*tangentstorm joined #nimrod
19:57:43tangentstormhello!
19:57:44Araqhi tangentstorm, welcome
19:58:09tangentstormgreat job on the redesign :)
19:58:49tangentstormI had seen the site many months ago and went away without discovering how cool nimrod is :)
19:59:42tangentstormI'm curious about the bootstrap compiler in pascal. Where is it?
20:03:10Araqin the history of git perhaps
20:03:22tangentstormhunting through the history now...
20:03:44Araqwhy? it can't compile Nimrod
20:04:00Araqeven nimrod 0.9.0 can't compile 0.9.2
20:05:42tangentstormI'm interested in bootstrapping in general, I guess. :)
20:06:29tangentstormAlso I do much of my work in pascal at the moment.
20:06:37AraqI think it's not even in git's history, I used "bzr" back in the days
20:06:41Araqinteresting
20:06:46dom96https://github.com/Araq/Nimrod/tree/7bcb14aaf27ee451a8c922f27bf41f15125ab52b/nim
20:06:51dom96it is
20:06:56tangentstormheya dom96 :)
20:07:01dom96hi tangentstorm
20:07:13Araqalright, dom96 proved me wrong
20:07:19dom96:P
20:07:26tangentstorm<- the b4 guy from reddit ... you hung out in my game dev channel a while back and introduced me to nimrod in the first place
20:07:52reactormonktangentstorm, given Araq used pascal to bootstrap nimrod, there will be some similarities
20:08:50tangentstormwhat's with the {@ignore} and {@emit ...} comments?
20:08:53dom96tangentstorm: whoa, I can't remember that at all. What game dev channel was this?
20:08:56tangentstormeg: https://github.com/Araq/Nimrod/blob/7bcb14aaf27ee451a8c922f27bf41f15125ab52b/nim/ast.pas
20:09:25tangentstormdom96: #b4 or possibly #b4lang
20:09:51tangentstormdom96: https://github.com/sabren/b4/
20:10:29Araqtangentstorm: there is a tool pas2nim to translate pascal into Nimrod
20:10:42Araqignore/emit influence the translation process
20:11:09Araqnote how they have been designed in a way that a proper Pascal compiler simply ignores them
20:12:15Araqit's quite easy to see which parts of the compiler have been translated and never been rewritten (lots of code I think)
20:13:09tangentstorm:) very cool
20:13:49dom96tangentstorm: I see. Nice to see you finally made your way here :)
20:14:53tangentstormhere you go. this should be more memorable: https://github.com/goldsmile/eg4d/blob/master/ref/concept.org
20:16:02tangentstorm<still haven't made the game though :/>
20:16:28Araqwrite it in Nimrod then, it's much more productive than Pascal
20:16:32tangentstorm:D
20:21:01reactormonktangentstorm, get on with it.
20:21:12dom96indeed, I have logs of #b4 and I remember it vaguely. Still feel like i'm missing a big chunk of memory though hah
20:21:19fowltangentstorm, there are wrappers for SDL2, SFML, ODE, GLFW, Horde3d, AssIMP, chipmunk, etc
20:21:27tangentstormi see that
20:21:36fowlso there's no reason not to now :D
20:22:43tangentstormhaha.. this was going to be a little tiny console mode text game :D
20:23:17dom96Some 3D graphics can't hurt.
20:23:30dom96:P
20:25:35tangentstormthere is a game jam coming up in a few days...
20:25:42tangentstormhttp://bacongamejam.org/jams/bacongamejam-05/
20:45:20tangentstormAraq: I notice the old pascal code was under the GPL. Would it be okay to fork it under the new license?
20:51:10reactormonkAraq, would it be possible to get a line information on 'system module needs X'?
20:52:24fowltangentstorm, why do you want to fork old code?
20:54:07tangentstormfowl: well i'd really like to write a decent compiler for oberon
20:54:30tangentstormand i'm writing a series of lessons on bootstrapping.
20:54:47tangentstormoberon is very similar semantically to nimrod (or a subset of nimrod anyway)
20:55:29tangentstormmy bootstrapping path starts with a simple stack based virtual machine, then implements a little forth dialect (b4) then a pascal/oberon dialect
20:56:00tangentstormI want something pretty low level and even "primitive"
20:56:39tangentstormlike personally i love iterators and classes and generics but for a beginner class i'd like to stick to the basics.
20:57:05tangentstorm(oberon was made by the guy who made pascal, but it's removed a bunch of features)
21:03:13reactormonktangentstorm, you could bootstrap it in nimrod, you know
21:04:03tangentstormreactormonk: no I can't :)
21:04:07tangentstormwell
21:04:12tangentstormi'm mis-using the word bootstrap
21:04:55tangentstormThe idea is you start with this virtual machine.
21:05:11tangentstormit's a stack machine very close to this: http://retroforth.org/docs/The_Ngaro_Virtual_Machine.html
21:05:44tangentstormexcept probably reduced down to 16 core opcodes and probably ditching some of the virtual devices.
21:06:40tangentstormThe idea is the machine ought to be simple enough that you can implement it in any language you want.
21:06:55tangentstorm(in very few lines of code)
21:07:32tangentstormWhat brought me here today is there's a guy who hangs out in #retro writing a similar vm in nimrod :)
21:07:57tangentstormAnyway... Then the next step would be a very simple assembler.
21:08:16dom96somebody is writing a VM in nimrod? :O
21:08:19tangentstormAlso very tiny.
21:08:22tangentstormYes.
21:08:28fowli wrote a couple small vms in nimrod, very doable
21:08:40tangentstormHis name is Mat2 and he's writing a vm for Parable, which is the sister language of retro.
21:09:25tangentstormhttp://rx-core.org/parable/
21:09:56dom96Interesting. I'm not sure he mentioned this when he was here.
21:11:33tangentstormmat2 moves in mysterious ways :)
21:12:31tangentstormanyway my course would start with this tiny assembler and vm, and then proceed bottom up to implement a language.
21:12:45tangentstormideally the assembler would be implemented in a hex editor
21:13:09tangentstormwhere you just typed the raw bytecode instructions
21:13:34tangentstormbut i'm probably going to cheat a bit and just provide implementations in the same languages that have the vm
21:13:43tangentstorms/have/provide/
21:22:10*gradha joined #nimrod
21:26:33Araqtangentstorm: if it's for teaching purposes why is the GPL meaningful?
21:27:26Araqand how does an early nimrod compiler implement oberon?
21:28:10Araqthe nimrod compiler implements vastly different parser, a complex semantic checker, and a C code generator
21:28:28Araqnone of which you would want for an Oberon compiler
21:28:29tangentstormAraq: i just don't like the gpl :)
21:28:35gradhatangentstorm: for your text only game maybe http://forum.nimrod-code.org/t/111 could be useful
21:28:48tangentstormhey gradha! i know you from somewhere too. :)
21:29:09gradhathe world is a small 32bit chip
21:31:05Araqand fyi Wirth's languages got worse and worse; Oberon is a bad joke IMO
21:32:13tangentstormthey just changed is all.
21:32:27Araqwhat?
21:32:34tangentstormoberon the language doesn't really make much sense without oberon the system.
21:33:05reactormonkAraq, https://github.com/Araq/Nimrod/issues/459 whatcha think?
21:34:11tangentstormthe language has terrible string support in the language itself, but the text module gives you a really amazing datatype that's more like a full text editor.
21:34:15fowlreactormonk, nobody wants to bother with OSX because its a broken rip-off of BSD
21:34:19tangentstorm(minus the gui)
21:34:44Araqreactormonk: I'm replying
21:36:10reactormonkAraq, oh, --lib apparently
21:37:32tangentstormAraq: mostly i'm just working on compiler stuff in pascal and I've looked at a number of compilers and the style is either too old (https://github.com/tangentstorm/pascal/) or too big and complicated and using a lot of delphi features that my little pascal dialect won't have.
21:38:01tangentstormyour old pascal code looks a lot more like what i'm looking for :)
21:38:54tangentstormIf you're willing to put it under the new license, i'd like to play around with it. Maybe I can get it up to par with the current nimrod compiler.
21:39:00reactormonkAraq, I'm running in circles...
21:39:35reactormonkhttp://sprunge.us/LdYD but grep "proc add" system/**/*.nim -Ri | grep cstring doesn't give me anything
21:40:02reactormonkhttp://sprunge.us/XIiV without the grep cstring
21:41:05Araqtangentstorm: put it under the MIT license then and start hacking
21:41:16tangentstormAraq: thank you! :)
21:41:46Araqthe pascal version leaks memory btw
21:42:09tangentstormfair enough :)
21:42:45AraqI guess the git repo also has a pascal version of pas2nim then for you
21:43:51Araqreactormonk: the implementation is directly in system.nim then?
21:44:01fowli wrote some nimrod that looked like pascal yesterday
21:44:27fowli just uppercased all keywords and function names >_>
21:45:24Araquppercased keywords are more like oberon
21:45:32Araqthough modula 2 had them too iirc
21:45:39tangentstormpascal comes from the days when bytes weren't large enough to distinguish upper and lower case.
21:54:48gradhalooking at cgi.XMLencode, is there an inverse proc somewhere? &amp; -> &
21:55:14Araqcgi.xmlDecode?
21:55:57Araqoh that exists only for urls
21:56:31gradhait's a really incovenient proc to implement, since it requires knowing the whole &whatever; symbol table
21:56:41Araqxmlencode should go into some xml module anyway
21:57:04gradhaso deprecate, move to xml, and implement decode?
21:57:38Araqhtmlparser.entityToUtf8 does the hard part of the job for you
21:59:01Araqit seems to have been written before we had hash tables ...
21:59:15Araqor string case statements ...
22:01:01Araqand no, don't move it, the xml modules need to be cleaned up too I think
22:02:16gradhaI'll indeed follow your direct orders telling me to do nothing
22:02:32fowl:D
22:03:57Araqyay we have parsexml and xmlparser and xmldomparser
22:04:26gradhaI bet dom96 wrote the last one
22:04:33Araqtrue
22:04:40dom96haha, yes.
22:04:53gradhaonly 95 more to go
22:05:53Araqwe need an xmlpath module
22:06:20dom96^^
22:06:21Araqglaring omission in the stdlib
22:06:43dom96the xmldom module is still missing some things IIRC
22:07:10dom96Although I bet the module won't ever be used anyway.
22:07:17gradhaI've never actually used xml paths before, I guess I haven't experienced real pain yet
22:12:39reactormonkAraq, oh
22:13:15reactormonkAraq, nope
22:15:24*fowl quit (Ping timeout: 252 seconds)
22:21:12*fowl joined #nimrod
22:21:48reactormonkAraq, there is no such proc... only the ones with var string
22:23:26Araqreactormonk: system.nim:1746
22:25:23fowlAraq, mind if i edit the wiki bootstrapping page? I want to make it a getting started page and add instructions for setting up babel
22:26:06reactormonkAraq, that's a var?
22:26:36Araqfowl: feel free
22:26:43Araqgradha: http://lambda-the-ultimate.org/node/4749#comment-75483
22:27:13Araqapparently the docs are so bad people need to read bug reports to learn about the language
22:27:47gradhabug reports are definitely more fun
22:29:14AraqI suppose I'm the only one who can't take him seriously?
22:29:38Araq"Sometimes a wall of text is better. "
22:30:37gradhaoh, he's quoting a feature request as bug? awesome
22:31:16Araqyeah and your feature request if of higher quality than my docs
22:31:21Araq*is of
22:32:54Araqand when you remove the examples the docs are short
22:33:12Araqwell yeah ... that's often the point
22:34:03Araq"examples are not one way of learning, they are the only way" said Einstein iirc
22:35:21gradhamaybe if he had picked https://github.com/Araq/Nimrod/issues/423 at random his brain would have imploded due to the recursiveness
22:35:43fowlAraq, dont waste time battling aspies
22:36:09fowlsame guy, same comment thread http://lambda-the-ultimate.org/node/4749#comment-75485
22:36:15gradhasaying gradha with a capital G is clearly wrong, nothing else matters, the whole comment is ridiculous
22:37:48fowlthat kid just wants attention
22:37:56fowlnice wall of text with minimal content
22:38:05Araqfowl: TL;DR
22:40:15gradhaactually what he says on docs is true, but he's short, I would include even more stuff in the docs, fortunately my forms of criticism are pull requests
22:41:21fowlare there different csources for each platform?
22:42:21Araqfowl: kind of, yes that's why it's build/1_1, etc.
22:42:50Araqbut "koch csource" builds for every platform that's listed in nimrod.ini
22:43:15fowlneat
22:43:35Araqstrange ...
22:43:46AraqI wrote one sentence and fowl was able to understand me
22:44:22Araqlet's write a paragraph instead why things are this way
22:45:17Araqyou know, Nimrod actually has this thing called system.hostOS and so you can have platform specific code and ... argh, I'm too lazy
22:45:53gradha"As you may have noticed, the build directory contains several other subdirectories with the name pattern number_number. Luckily for end users, no manual massaging of their contents has to be done, since "koch csource" will iteratively build all the appropriate subdirectories mentioned in the nimrod.ini file, which can be configured at any time"
22:46:36Araq"But warning: running 'koch csource' looks like it runs into an endless loop"
22:47:22Araq"Maybe you should consider that the core devs use 'koch' too and use the very same commands to build a release and that means it's pretty well tested and doesn't run into an endless loop"
22:48:12gradhayeah, but then developers don't know how to upload some html files
22:48:33gradhatime for "koch upload"!
22:49:02Araq"Or maybe you're using Mac OS X and it really DOES run into an endless loop, it's just that nobody ever experienced this bug and it only happens for you because it's full moon."
22:49:31gradhacome on, Mac OS X (does anybody spell it like that?) manages to be buggy even when there's no full moon
22:51:01gradhaAraq: what's your opinion on https://github.com/Araq/Nimrod/issues/422 ?
22:51:55gradhazahary_ wanted to add to idetools some option to return the syntax of whole lines, does something like that exist internally which you already use for syntax highlighting?
22:52:44Araqthe docgen uses highlite.nim to highlight source snippets, no parsing is done, only lexing
22:53:27AraqI consider .. code-block:: idetools overkill as long as we don't even have proper cross references in the docgen
22:54:02gradhait also requires a first pass parsing of all modules to build the link index
22:54:33AraqI'm not against it, but it looks hard to implement and we don't even generate proper persistent links yet
22:57:17gradhapackages/docutils seems missing from the library index
22:59:29AraqI know
22:59:50Araqthe library index is hard to keep up to date
23:00:05AraqI don't know how to automate it
23:01:27Araqwell it can't be done really a tool can't guess the proper sections
23:03:14*gradha quit (Quit: bbl, have youtube videos to watch)
23:08:50reactormonklib/system/excpt.nim(276, 15) Error: type mismatch: got (ref E_Base)
23:08:56reactormonksystem.isNil(x: T): bool
23:09:01reactormonkshouldn't this one match?
23:09:21Araqnot declared yet?
23:10:36Araqit is this: proc isNil*[T: proc](x: T): bool
23:10:59Araqunfortunately the compiler doesn't show generic constraints in error messages
23:11:17AraqT: proc doesn't match ref E_Base
23:11:40dom96hrm, this reminds me. It would be nice if 'raise EBlah(msg: "message")' would work. Sadly only 'ref' exceptions can be raised, and all exceptions are not defined as such.
23:12:24Araqmaybe they should
23:12:41Araqnow that we have the "ref object" shortcut
23:12:43reactormonkAraq, yep
23:13:08dom96indeed
23:13:17Araqalso newException really leads to code bloat and needs a different implementation at least
23:14:59Araqraise EBlah(msg: "message") would produce the same bloat. hm.
23:15:42dom96what's the bloat in this case?
23:16:33Araqa raise statement is in a cold code path and so the construction should not be inlined
23:17:23Araqthe compiler currently always inlines the construction
23:17:43reactormonklib/sys/strings2.nim(299, 31) Error: pragmas are only allowed in the header of a proc
23:17:48reactormonkproc len*[T](x: seq[T]): int {.magic: "LengthSeq", noSideEffect.}
23:18:37Araqwell? the error message is clear
23:18:49reactormonkoh, crap
23:48:51reactormonkAraq, I'm sure I triggered at least three bugs we won't find in a while
23:50:08reactormonkhttp://sprunge.us/hLcL
23:50:10reactormonkfirst one...
23:50:21reactormonkbtw, why is {.pragma progmem, extern: "PROGMEM $1".}
23:50:24reactormonkinvalid?
23:51:10fowlyou dont have to pop all the push's, pragmas only apply to one module
23:52:13reactormonkit's the system.nim we're talking about