00:00:00 --- log: started retro/12.12.10 00:10:24 --- quit: beretta (Read error: Connection reset by peer) 02:33:32 --- quit: tangentstorm (Ping timeout: 260 seconds) 02:35:15 --- join: tangentstorm (~michal@108-218-151-22.lightspeed.rcsntx.sbcglobal.net) joined #retro 03:12:07 --- nick: yiyus_ -> yiyus 05:20:53 tangentstorm: what recursive code is segfaulting? 05:53:38 hey crc 05:53:52 it's not segfaulting anymore, but i was getting weird things yesterday 05:54:07 like floating point errors in the c code 05:57:01 crc: https://gist.github.com/4250692 05:58:10 i've gotten past it. I'm using using {{ and }} to hold procedure-local variables now, and wrapping the main block in a word definition called main 05:58:38 the generated code here is a complete mess, but it's still weird that it should trigger a floating point exception 06:01:21 this is the original source i'm compiling: https://github.com/tangentstorm/PL0-Language-Tools/blob/7569920a260c15281a631c9c961dc4f7af38775e/tests/41_recursion.pl0 06:03:21 hmm that can't be right. it's missing the number := number / 2 06:03:29 but that's the basic algorithm 06:05:57 https://github.com/tangentstorm/PL0-Language-Tools/blob/531afce98d935a189cc4971ef8fd86cfd57b68c2/tests/41_recursion.pl0 <- correct version 06:21:17 ---------- 06:21:25 https://gist.github.com/4250764 06:22:01 this new version does something completely different... once the code runs, it somehow corrupts the dictionary 06:22:25 you can see that "cr" no longer works and even "2" is no longer recognized 06:22:35 i tried it on both the c and pascal vms.. 06:49:18 {{ ---reveal--- }} isn't exposing the 'binary' as there's no hidden functions (this is probably a bug in retro) 06:49:45 so the definition of run is using the default 'binary' word, which changes 'base' to 2, so that only binary numbers are recognized 06:49:53 haha! 06:49:56 nice 06:50:21 let me just stick a dummy function in there then 06:52:44 hm. i added: : --retro-reveal-workaround-- ; in both blocks.. now pascal gives me a stack underflow and c gives me a floating point exception 06:53:05 right after invoking "run" 06:57:09 sticking some debugger / print statements in there now 07:04:13 i'm missing a dup before odd? 07:04:28 i mean i am missing a dup before "odd?" . 07:04:31 :) 07:05:06 hmm..no 07:13:20 : odd? 2 mod 1 = ; ... i had the 2 in the wrong place. now it just prints 0\n0\n0\n0\n which is the leftmost bit 4 times, because i'm not doing anything to preserve it 07:13:43 that was what i was going to implement when things started crashing. so i'm good now. thanks! 07:13:58 that's because in pl/0, the bit variable is a local IIRC, and a global in retro 07:14:09 yeah 07:14:36 i had planned to set up a whole separate stack somewhere in ram but i don't think i need to do that at all 07:14:57 i just need to detect recursion and keep a copy of the old value before/after the call 07:15:05 the {{ and }} are really helpful 07:15:11 I'll get a fix in for the ---reveal--- bug 07:15:20 cool 07:15:42 thanks for your help. this should be working today! :) 08:00:21 https://gist.github.com/4251447 <- working recursive code :) 08:08:56 tangentstorm: is that forth? whats with the infix? 08:09:04 cursor - 1 08:09:40 it's not infix 08:10:06 oh 08:10:08 wait 08:10:48 the pl0 file is a minimal pascal-like language ( all it has are procedures, assignments, if without else, and while loops ) 08:11:00 oh and an "odd" predicate :) 08:11:07 ah 08:11:20 so you already have a pascal-like interpreter coded? 08:11:29 i thought you meant cursor @ 1 - cursor ! 08:11:44 which of course is just decrementing the cursor variable 08:12:15 so you're saying: cursor := cursor - 1; turns into :cusor @ 1 - cursor ! ; ? 08:12:17 foucist: someone else made it in python. the original was written by niklaus wirth himself in a book on algorithms 08:12:24 (i don't know the current retro) 08:12:26 yep 08:12:30 coolio 08:12:41 @ takes the value of a variable and puts it on the stack 08:12:46 or the value at an address i guess 08:13:03 oh so :cursor cursor @ 1 - cursor !; 08:13:04 ! puts the value back at the address 08:13:31 i don't know where you're seeing ":cursor" 08:13:45 nowhere 08:13:47 cursor @ ( put value of cursor on stack ) 08:13:53 1 - subtract 1 08:13:58 cursor ! 08:14:01 put the value back 08:14:07 h gotcha 08:14:08 ah* 08:14:34 i haven't looked at forth for 6-7 years 08:14:42 foucist: in retro, ":cursor" would either be predefined or would use some magic ____: prefix word 08:14:59 yeah no it was my mistake 08:15:00 you need a space 08:15:06 same with the ; at the end 08:15:06 i was thinking of a regular : foo blah ; type of thing 08:15:08 yeah 08:48:55 tangentstorm: the preserve combinator might be helpful with saving locals (e.g., bit [ ... ] preserve would save the state of bit, and restore it when the quote is done executing) 08:54:40 oh yeah. i saw that in the docs again and then forgot about it 08:55:13 i'm torn between using the nice high-level functional style and raw ngaro bytecode 09:05:13 fwiw, I'd probably start with high level constructs and replace them later, once the initial implementation was working to my satisfaction 09:05:37 yeah 09:05:48 that's kind of what i did with if and while 09:05:54 it's much clearer 09:05:59 (when I had previously attempted a small-c to ngaro compiler, I tried doing raw bytecodes, and grew frustrated with the difficulty in debugging) 09:06:50 did you ever try the pascal vm? i've cleaned up the install process considerably since you asked me about it 09:07:03 it has a debugger and an extra opcode to trigger the debugger 09:07:16 external debugger i mean 09:08:22 crc: if i go that route, maybe it makes more sense to just use a subset of parable, and then have a parable -> ngaro compiler 09:09:16 tangentstorm: I still need to try the pascal implementation :( 09:09:59 no worries, i know it was a mess... now you can just type "make retro" to get all the dependencies and run it 09:11:01 something in that help.rx code causes it to crash, and causes the python vm to crash as well 09:11:09 but not the c version. 09:11:27 or probably in vt.rx... 09:12:29 i'll clean that up after i port this to pascal and fix the bugs in the optimized js runtime 10:13:32 tangentstorm: latest image has a hack in place to let {{ ---reveal--- }} work as expected (I'll do a better fix later) 10:23:27 thanks. I also fixed my compiler to not use it unless there's actually something to hide 11:42:56 --- join: Mat2 (~Claude@91-65-144-133-dynip.superkabel.de) joined #retro 11:43:00 hello 11:44:22 heya Mat2 :) 11:49:27 hi tangentstorm 11:49:59 I have found the error, ad now everything compiles so far 11:50:27 * Mat2 reanimating own GIT repro 11:52:08 :) 11:52:35 Mat2 : https://gist.github.com/4251447 11:54:08 your compiler uses recursions, ver nice :) 11:54:40 retro's {{ }} kept me from having to implement a second stack like i was planning 11:54:46 turned out much simpler 11:55:14 so... now i'm thinking that "b4" is going to be a minimal subset of retro 11:55:44 maybe even the pure forth-like subset that's already in kernel.rx and gets hidden by the newer features 11:56:17 this would ease porting 11:56:49 for me 11:57:24 your choosen syntax is PL/1 like, specially the call command 11:57:46 this is actually PL/0 by niklaus wirth 11:57:59 except the guy who made the python parser swapped the comment style 11:58:45 now I begin to see Wirth's inspiration *g* 11:59:30 the one i'm making will look more like a blend of oberon, pascal, and python 11:59:43 and haskell.. and prolog... and ... you get the idea :) 12:00:40 It took me a while to figure out how to do *anything* useful in this PL/0 language. *all* it can do as far as the outside world is concerned is print integers :) 12:00:41 that's fine, implement the best features from all of them 12:02:17 i am going to try and make a game next weekend for ludum dare 12:02:47 what's ludum dare ? 12:02:51 oh 12:02:59 A szene party I guess 12:03:08 it's a game jam / contest / competition thing 12:03:20 the main one is to make a game from scratch in 48 hours 12:03:56 i'm doing the laid-back 72 hour version which allows teams and using existing games 12:04:30 http://www.ludumdare.com/compo/ 12:05:52 nice contest ! 12:06:05 yeah, it's fun :) 12:06:37 I think something as pacman can be coded in some hours if the right platform was choosen 12:06:53 i am going to add a sprite engine device to the retro canvas for javascript 12:07:34 yeah. some of the games that come out of it are really polished even in 48 hours 12:08:58 retro is a good fit for such contests, because you can test out every word defination on the fly. I bet this speed up development a lot against conventional, imperative languages with IDE 12:09:01 oh i guess i'm wrong. even in the 72 hour one you have to start a new game from scratch, because of the theme 12:09:34 Mat2: well... only if you know the language :) 12:09:44 yes, of course 12:09:47 *g* 12:10:44 that's actually what motivated all the help stuff. the very first time i started using retro was in order to try making a game for a game jam 12:10:53 tangentstorm: printing integers is more output than parable technically has... :) 12:11:00 haha 12:11:11 the time is not the problem here, just code a pong clone 12:11:38 or a text adventure maybe? :) 12:12:16 ah, that's not so easy to implement a decent parser 12:12:21 but why not 12:12:23 crc: yeah, i think i'll just stick with the functional style retro. i like it 12:13:49 crc: Parable is unable to output integers ? 12:13:51 not that i don't like parable. :) i just don't know it 12:14:05 the ui is definitely much improved 12:14:50 what i meant is: i thought about it and agree with you to use the high level functional retro as the intermediate language, and let retro do the compiling rather than shooting at bytecode 12:15:43 when it comes time to write my lessons, i also want to do a bottom-up implementation using a straightforward imperative forth style 12:19:34 Mat2: that impomatic guy showed up a couple weeks ago and reminded me of this book: http://www.amazon.com/Programming-Your-Adventure-Games-Pascal/dp/083061768X 12:20:09 i had wanted it a long time ago and forgot about it so i ordered a copy 12:20:55 i hadn really been thinking graphical game, but text kind of makes sense... there's already a start in the retro library 12:21:04 Mat2: I haven't defined any I/O for parable yet, apart from the UI (input via evaluation of code, stack display) 12:21:46 I have a very old book here descriping text-adventure design in Commodore basic 12:21:55 crc: would you want to collaborate on a text adventure game next weekend? 12:22:07 the lack of i/o isn't bothering me yet... 12:22:21 tangentstorm: I should be able to 12:22:33 i know docl is a MUD fan. :) 12:22:58 crc: That should be change soon I guess, at last with your port to retro 12:23:17 hmm. this changes my plan quite a bit, but certainly makes things easier. :) 12:23:25 Mat2: true 12:23:37 howdy 12:23:40 Mat2: you interested in working on a text adventure game? :) 12:23:45 hi docl 12:23:48 docl! he lives! 12:23:56 hey :) 12:24:01 tangentstorm: yes 12:24:29 hmmm 12:25:14 I had written one of my own long time ago on a now forgotten computer: Commodore 128D 12:25:14 i would like to show off the canvas, but maybe we can make an illustrated one with a map or something. 12:25:31 or maybe maniac mansion style? 12:25:55 but not fully animated. i don't know 12:26:58 visualisation like in Lords Of Midnight would spend only some hours 12:27:01 for sure 12:28:38 http://www.mobygames.com/game/zx-spectrum/lords-of-midnight_/screenshots/gameShotId,122986/ 12:28:49 depends how well we can draw :) 12:29:39 no problem 12:30:04 Mat2: is that a text adventure with graphics? 12:31:06 it was basical a text adventure with RPG elements 12:32:06 isn't there an rpg combat engine in the retro examples too? 12:32:09 * tangentstorm looks 12:32:20 tangentstorm: I believe so, from docl 12:32:24 docl: you interested in joining us? 12:32:36 to each text description, a static visualisation (dependent on 4 view angels) was rendered out of some shapes 12:32:38 examples/games/dndsim.rx 12:32:45 really very simple 12:33:07 i'd like to see us get text/graphics working together in the canvas 12:37:50 taht's fun 12:38:02 sorry: that's fun I mean 12:42:18 poor alice. 12:42:54 erm, sorry, what this mean ? 12:44:23 Bob hits Alice (6) for 6 points of damage. Alice is reduced to 0 hp. 12:44:32 Alice dies. 12:44:35 :) 12:44:50 ./retro --with ~/vrx/examples/games/dndsim.rx 12:46:58 ah, I must upload retro again, because using a new installation with fresh formatted hard-drive 12:49:16 Mat2: so.. if i'm understanding this right... lords of midnight basically had a bunch of 2d sprites that it built up into a semi-3d scene? 12:49:52 yes 12:51:53 http://www.c64sets.com/details.html?id=1537 and http://www.c64sets.com/details.html?id=1539 - this looks interesting (screencaps of lords of midnight) 12:53:17 the whole sceneries are composed of shapes (graphical elements) which exist in 4 sizes for simulating image depth 12:55:20 you see this in the pictures crc posted, the trees for example are basical the same but exist in different sizes 12:58:14 building images is very straight forward from a map where the Z value of each object is computed from the distance to a given position on it 13:06:16 huh 13:06:27 were these still images? or animated? 13:06:44 there where absolutly statical images 13:07:09 http://www.youtube.com/watch?v=ilDgNSIhW5M 13:07:12 vid 13:07:14 eo 13:09:16 I think the commodore 64 version had implemented some sprite animations but not sure 13:09:37 man that screechy modem sound while it loads is awful :) 13:10:46 the spectrum redirecting the sound signal from cassette so you can hear file corruption :) 13:11:34 whew.. fast forwarding to 7:00 13:11:48 that's a long introduction 13:12:11 ahm, the loading speed was ~2400 bps 13:14:32 sorry, was afk. sounds like fun :) 13:14:56 I don't think the dnd combat sim was from me. 13:15:34 tangentstorm: that was fast if you imagine it's predecessor, the zx81 loads files from cassette with 300 bps 13:15:42 :) 13:16:02 docl: will you join us writing a text adventure ? 13:16:13 sure 13:16:27 this scene thing actually is pretty cool 13:16:51 it was the fastest rendering engine of it's time 13:18:08 ok, one of the fastest for zx spectrum 13:18:49 at these time Lucasfilm published games with real-time 3D rendering for the Atari 800 (in 256 colours) 13:18:50 i'd like to see an ngaro device for blitting sprites to the screen 13:19:03 huh :) 13:19:52 hmm, we can base it upon the SDL terminal stuff (it's prepared for a semigraphic mode) 13:20:51 having a browser version and a downloadable one would be great PR 13:21:37 to show off the portability i mean 13:22:32 I think porting to javascript would be straight forward, all needed for this is a graphical canvas 13:22:34 Mat2: do you already have canvas support? I'm still thinking aggpas. 13:22:54 yeah. and we already have the ngaro canvas device as an abstraction layer :) 13:23:09 it doesn't do sprites yet but we can add that 13:24:02 tangentstorm: no. I was thinking about the enlightment libraries or OpenGL for that 13:24:34 --- join: intothev01d (~intothev0@unaffiliated/intothev01d) joined #retro 13:25:00 hi intothev01d 13:25:03 do you already know how to use them? 13:25:28 hey guys... intothev01d is one of the founders of #lpmc, that mentoring community i've told you about 13:25:30 hello 13:25:50 cool! 13:26:01 tangentstorm: I have some OpenGL testing code 13:26:07 that doesn't mean I know much but I get by :D 13:26:39 hello 13:26:50 Mat2 has been leading the way on a new SDL console for retro... crc is the maintainer of retro, and docl is probably the oldest user besides him 13:27:24 in lpmc last month we were using melonjs, which is a javascript game engine that already has great support for sprites 13:27:45 i was picturing maybe using that if we do the scene thing 13:28:10 but still abstracted away as a ngaro device 13:28:33 I wonder what that would look like? 13:29:58 docl: http://www.youtube.com/watch?v=aoFK6GxQXho 13:30:24 tangentstorm: Looks like a nice library. It would be easy to port my code over 13:31:15 i'm kind of thinking like "load image #1" rather than trying to pipe sprites through the vm 13:31:26 tangentstorm: by the way, this was one of the first real-time 3D action shooter - www.youtube.com/watch?v=qVsV9X7S4Sc 13:32:43 wow, for 1985 that's pretty darn amazing. 13:33:56 the atari 800 have an 1 MHZ 6502 processor (and ANTIC+GTIA, the predessors of the AMIGA chipset from the same designer, Jef Miner) 13:36:14 so... my most developed compiler is actually the python->parrot one ... i'm thinking i take these same templates and merge them into pirate, and try to get it targeting retro... 13:37:31 because http://posted-stuff.blogspot.com/2010/08/quick-survey-of-python-mud-codebases.html 13:38:43 ok 13:39:03 maybe multi-user is over-reaching? 13:39:54 definitly 13:40:37 yeah.. never mind on that. 13:40:49 * tangentstorm looks at what we already have in the codebase here 13:46:37 intothev01d one thing i know for sure we need help with is 100% javascript 13:47:04 https://github.com/tangentstorm/ngaro-js 13:47:40 retro's vm is implemented in a bunch of different languages 13:48:32 that's my fork of the javascript version. it's much faster than the original, but it also has bugs in it :/ 13:49:27 then, at first we should debug it :) 13:49:36 we have a variety of tests for the vm, but i haven't been able to run them yet 13:50:15 for the js versions i mean, because i don't have it hooked up to nodejs yet 13:50:40 hrm. i did set up a package.json... maybe i can run it under node? 13:50:44 it's been a month :) 13:51:09 try it 13:51:58 I don't have the possibility to run it at moment (need install a decent javascript engine first) 13:52:30 * tangentstorm tries to picture Mat2's machine :) 13:54:37 * Mat2 a netbook with self cooked linux distribution using the GPU for data processing 13:58:09 :) 13:58:35 okay... so "node ngaro.js" runs and does nothing 13:59:39 looks like i got as far as identifying anything that was browser specific and wrapping it with if ( WEB_CONTEXT ) { ... } 14:00:39 but i didn't do anything with loading external files 14:01:14 huh 14:14:20 tangentstorm: you find the current state of my JIt compiler under avm-mcode, it's uploaded 14:19:17 you can test compilation with frontendTest. I'm add all instrution combinations test for test at moment 14:19:29 ^instruction 14:19:53 ok, what's the plan for the adventure ? 14:23:08 Mat2: cool :) 14:23:38 what does it compile? the nibblecode? 14:26:08 yes, into machine code 14:26:22 i see 14:26:38 how much of metro have you implemented? 14:27:06 the aprser, dictionary and listener 14:27:11 ^parser 14:27:30 is that online too? 14:28:01 not at current, I will create a new repro 14:28:22 and need access to my old hard-drive first 14:29:15 wit completing the JIT compiler, its should be finished (beside bugs) 14:29:27 were you wanting to use metro for the game? 14:30:09 or just the sdl terminal ? 14:30:51 no, I think needing half a month for finsihing the JIT compiler (or metro will only work with EMT64 comp. cpu's) 14:30:59 oh ok :) 14:31:34 SDL terminal and your vm will work fine for it I think 14:32:10 so then we stick to retro + ngaro.pas/ngaro.js + add a sprite blitter if we do the scene thing. 14:32:32 I think that would be the fastest way 14:33:24 we don't need a blitter, only sprite support 14:35:15 ok. in the repo, we've got libraries/fiction.rx + examples/games/dndsim.rx and examples/games/cloak-of-darkness.rx, which is a little demo of using fiction 14:38:32 http://code.google.com/p/retro-language/source/browse/library/fiction.rx 14:41:33 seems like we have a nice code base already there 14:41:40 Mat2: i'm not sure what the difference is. i didn't mean write our own sprite engine, just wrapping something that can already do the work ( which both sdl and the js canvas should do fine ) 14:43:36 the SDL code need a routine for this, I bet some javascript graphic libraries have this functionality already 14:44:34 Mat2: we've been using melonjs for sprites over in #lmpc... it works pretty well 14:44:46 so let's use this 14:45:27 and I port the used routines to SDL if needed 14:46:26 that should not much work because there exist a SDl library for this already 14:47:08 we still need to make an API so retro can talk to it 14:47:08 only one or two wrapper functions would be needed I guess 14:47:56 load, drawAt, scaledDrawAt ? 14:48:11 drawAt taking img#, x, y ? 14:48:46 maybe some way to set up clipping? 14:49:03 ... well for html we don't even need that 14:50:59 I think we need mainly a copy routine for graphic areas and a clipping one 14:51:06 Mat2: how do you see the scene drawing working with the room-based maps in fiction? 14:53:27 i don't see any complications because each object in a room can hold information about it's location 14:54:45 if we think the person centered in the room, this would be the origin 14:55:25 oh, so you were thinking like drawing each object that would be in the room as a sprite 14:55:37 yes 14:56:33 so it might actually be more like myst, where you click to move between rooms or something 14:56:48 myst uses this technique, yes 14:57:02 and you could view those rooms from different angles depending on what exit you went through 14:57:20 or maybe even have a rotate button? 14:58:05 if the view is composed of static graphics with 4 ore more depth renderings all kind of views can be realized 14:58:32 are you comfortable with the math behind all that? 14:58:42 yes, that's easy 14:59:16 are you comfortable with the math behind all that using only integers? 14:59:50 you don't need even vector transformations for this kind of stuff 15:00:37 i can see pretty easily how to display it on the screen, but i don't get the looking at it from different angles part 15:00:48 don't we need trig? 15:01:50 ... or we only look at things from 8 possible directions... 15:02:22 i think i saw that in the lords of z80 thing. that makes sense. huh. 15:03:39 you need 16 dfixed directions and a routine for rotating the shapes + one for compress it 15:04:20 that would be enough for the optical illusion of free angle sight 15:05:02 so each shape image is needed in 16 variations 15:05:30 i can see 8 directions, because they're just vertical, horizontal, and 45 degrees 15:05:37 and that's nice clean math 15:06:32 but it sounds like you've thought about it already :) 15:06:50 possible, but compression and rotation for other anges would result in bad image quality 15:07:44 I have read some sources for this kind of visualisation some time ago 15:08:31 also I have a book with a complete game engine of these kind 15:08:52 that are sources for Turbo Pascal 15:11:21 the easiest way would be limit sight to front view (all angles are rendered like front views) 15:12:01 this way only the x coordinate of each object must be recalculated dependent on the view angle 15:12:18 that's how Lords 15:12:19 wait.. you're actually talking about rotating the images? i'm confused 15:12:48 oh yeah... everything from the front. that's what i was picturing 15:13:03 DOOM did this for objects and monsters in the room ( though the walls were of course true 3d ) 15:13:21 you could walk all around whatever you were looking at and it always faced you 15:13:26 like a table or whatever 15:14:05 only needed for up and down views if combined with horizontal movement 15:15:32 Wing Commander had implemented such an engine 15:17:03 http://www.youtube.com/watch?v=GbzioZBTUIU 15:19:54 whoah. 15:20:18 i can't believe i never noticed that. i used to love this game :) 15:20:56 the whole game engine is 2D implemented with software sprites ! 15:22:26 huh. 15:22:35 well i know what i want to do for next ludum dare now :) 15:23:40 maybe we should scale back to just 4 angles and not worry about rotating. 15:23:53 or at least for the first iteration. 15:23:54 yes 15:25:30 or maybe even just 1 angle for most of the game, and have part of it that supports free movement 15:25:53 not free movement but like maybe one area with lots of rooms that's one big wide open space or something 15:26:07 and you could see the town approaching in the distance 15:26:28 er... and you could see the town in the distance *as you approach* :) 15:28:23 hmm, this would mean a very large map I guess 15:28:37 but why not ? 15:43:20 I will get some sleep, ciao 15:43:25 --- quit: Mat2 (Quit: Verlassend) 16:01:49 --- quit: karswell (Read error: Operation timed out) 16:07:47 --- join: karswell (~coat@93-97-29-243.zone5.bethere.co.uk) joined #retro 16:32:44 --- nick: tangentstorm -> tangentafk 17:49:40 --- nick: tangentafk -> tangentstorm 20:58:12 --- join: TRG (~TRG___@ip68-96-62-47.ph.ph.cox.net) joined #retro 20:58:25 is this a channel about old computers? 21:19:47 TRG: sometimes ;) 21:20:49 is 2004 considered old? 21:27:09 --- quit: intothev01d (Quit: intothev01d) 21:36:54 not really i guess 21:37:04 marginally 23:22:08 --- quit: tangentstorm (Ping timeout: 276 seconds) 23:22:52 --- join: tangentstorm (~michal@108-218-151-22.lightspeed.rcsntx.sbcglobal.net) joined #retro 23:59:59 --- log: ended retro/12.12.10