Jump to content


Photo

Hipi [1.0.0] Huge Update!


  • Please log in to reply
17 replies to this topic

#1 StapleGun

StapleGun

    GMC Member

  • New Member
  • 721 posts
  • Version:Unknown

Posted 18 October 2007 - 11:36 AM


Hipi Is a Piet Interpreter


Introduction

HIPI (Recursively acronymed) allows you to write and run Piet code. This is the first interpreter I've ever built in GM, well the first interpreter period. It handles all Piet instructions and should run all piet examples. (There are a few bugs I'm trying to track down)

Anyways I've no doubt that almost all of you have never seen or heard of Piet. Well it's an Esoteric language which using bitmap images instead of text to program. This also makes it a pain in the ass to code in and a perfect candidate for my first interpreter attempt.

Information

Window Size Locked to 680 x 660
File Size 1991kb
Release Version 1.0.0
GM Version 6.1
OS Compatability Windows XP (I'll upload a Vista compatible version shortly)

Download

MediaFire
Will Host For Food

Change Log

Beta
- v0.1.0 [18.10.07] The first beta of HIPI is released.
- v0.1.1 [19.10.07] Added save and load support. A debug feture. The ability to clear the canvas. Change the clear color so some colors are easier to see. Fixed many interpreter bugs.
- v0.1.2 [20.10.07] Redesigned the interface and added clear, save, load, run and debug buttons. Funtion keys are no longer used. fixed a few more interpreter bugs. Added buttons to automatically change the color to the instruction you want with a color preview. Added a status bar which explains how each instruction works when you mouse over it.
- v0.1.3 [21.10.07] Removed the message box that appears after an addition command. Added a message display what's in the stack during debug.

Release
- v1.0.0 [21.10.07] First release of HIPI! Completely re-wrote the interpreter. It is now faster and much more refractored. Source will be released soon. Allowed the dubug feature to step through the program, highlighting the current codel. In debug mode, the current stack data and instruction is printed to the status bar. Added a seperate console application for running Piet programs. It is a little faster than the HIPI development environment and has no message boxes.

Tutorial

I've written a short tutorial on how to write an addition program in Piet using HIPI. It also shows how to make a loop, which is a rather complicated task in Piet.

You can see the tutorial on my Blog.

Piet

You can read all the language specifications at the Piet Homepage.

Screenshots

This screenshot showing a program which prints the word "Piet". This screenshot is a little out of date but the devlopment environment is almost identical to the release.

Posted Image

Edited by StapleGun, 16 October 2008 - 03:21 AM.

  • 0
<div align='center'>Creating a program is easy. Creating software is difficult.</div>

#2 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 18 October 2007 - 12:31 PM

Interesting concept.

If you could add the ability to load and save bitmaps, it would be easier to use some of the sample programs available on the site you provided.
  • 0

#3 StapleGun

StapleGun

    GMC Member

  • New Member
  • 721 posts
  • Version:Unknown

Posted 18 October 2007 - 08:59 PM

I'm not sure if they work yet. :rolleyes: I still have to do some testing, but so far I haven't run into any runtime bugs. So we'll see.
  • 0
<div align='center'>Creating a program is easy. Creating software is difficult.</div>

#4 negen99

negen99

    GMC Member

  • New Member
  • 567 posts

Posted 20 October 2007 - 05:41 AM

I checked out your demo but I didn't really understand it could you add some small sample programs or maybe a tutorial? Also the programm seemed to crash after messing around a little I couldn't click on any of the colours any more.
  • 0

#5 StapleGun

StapleGun

    GMC Member

  • New Member
  • 721 posts
  • Version:Unknown

Posted 20 October 2007 - 08:41 AM

I've uploaded a new version of HIPI. The interface is much cleaner and much more helpful. There are additional buttons on the right which you can click to automically change the color for the isntruction you want. Also there are buttons up the top to replace the function keys. The status bar down the bottom gives you information about each instruction when you mouse over them.

I really need help trying to find all the bugs so if anyone wishes to try and write a more complicated program to try and find them that would be great!

I will be releasing this open source when it is complete in a few months.
  • 0
<div align='center'>Creating a program is easy. Creating software is difficult.</div>

#6 thetagames

thetagames

    Informatikmeister

  • GMC Member
  • 1005 posts

Posted 20 October 2007 - 02:40 PM

I noticed a lot of bugs as well. For example, it seemed as though every time I tried to run the program, it would hang up for a bit, and then display the message "execution is taking too long" or something like that. I don't know much about PIET, so I just tried something simple. It was a solid block of 5 red codels followed by a OutInt.

Also, when trying to debug, I often was stuck in an infinite loop of messages. I had to use <CTRL>, <ALT>, <DELETE> to get out.

I must say, this is a very ambitious project. PIET is one of the coolest programming languages that I have ever seen, and you are certainly off to a good start with this. One last suggestion: Don't use the GM default message boxes. In fact, I wouldn't use message boxes at all. Do you think it would be difficult to run a separate terminal window, for the actual program? I have never tried something like this, so I wouldn't know.

Good job!

~ Theta Games
  • 0

#7 StapleGun

StapleGun

    GMC Member

  • New Member
  • 721 posts
  • Version:Unknown

Posted 20 October 2007 - 02:48 PM

I noticed a lot of bugs as well.  For example, it seemed as though every time I tried to run the program, it would hang up for a bit, and then display the message "execution is taking too long" or something like that.  I don't know much about PIET, so I just tried something simple.  It was a solid block of 5 red codels followed by a OutInt.

Also, when trying to debug, I often was stuck in an infinite loop of messages.  I had to use <CTRL>, <ALT>, <DELETE> to get out.

I must say, this is a very ambitious project.  PIET is one of the coolest programming languages that I have ever seen, and you are certainly off to a good start with this.  One last suggestion:  Don't use the GM default message boxes.  In fact, I wouldn't use message boxes at all.  Do you think it would be difficult to run a separate terminal window, for the actual program?  I have never tried something like this, so I wouldn't know.

Good job!

~ Theta Games

<{POST_SNAPBACK}>


That's what I'm working on now. I'm planning to have a serperate executable which just runs bitmap images. This editor will be more of a debugging center, which is why I'm using message boxes for the time being.

I have a bloody english exam on monday so I won't be able to do much tommorrow, but then I have a week off and I should be able to get the first release of this done which will include a console window.

Right now I'm refractoring all the interpreter code so I can allow it to step through the program rather than going into an infinite loop. This will also allow it to wait for the user to type input in using a console instead of a message box.

(Ah, and the reason your trial program didn't work would probably be because you didnt push that block of red codels onto the stack, you just went to OutInt)

But thanks a lot for your reply, I was starting to wonder if I should even bother with this thing. :P Perhaps people will be more interested when I release the source code.

Edited by StapleGun, 20 October 2007 - 02:50 PM.

  • 0
<div align='center'>Creating a program is easy. Creating software is difficult.</div>

#8 Mailas

Mailas

    Send in the Mail

  • GMC Member
  • 5900 posts
  • Version:GM:Studio

Posted 20 October 2007 - 07:02 PM

Heh, I learned this language before.
Il have to try it out.
  • 0

omQasih.jpg


#9 StapleGun

StapleGun

    GMC Member

  • New Member
  • 721 posts
  • Version:Unknown

Posted 21 October 2007 - 01:45 AM

I've uploaded another version and have added a link to a short tutorial I've written on my blog in the main thread. But here's another link.

Piet - Addition Program Tutorial
  • 0
<div align='center'>Creating a program is easy. Creating software is difficult.</div>

#10 negen99

negen99

    GMC Member

  • New Member
  • 567 posts

Posted 21 October 2007 - 05:03 AM

I'll give this another go when I am more awake. It's too early right now.
  • 0

#11 StapleGun

StapleGun

    GMC Member

  • New Member
  • 721 posts
  • Version:Unknown

Posted 21 October 2007 - 12:46 PM

Well despite what I said, I managed to get the release done tonight. It's quite a large update so I don't really want to reiterate it here. Everythings in the change log.

I still need help tracking down the last few bugs in the interpreter so please have a go and tell me what you find. (A few nice comments here and there would be nice too :D)
  • 0
<div align='center'>Creating a program is easy. Creating software is difficult.</div>

#12 StapleGun

StapleGun

    GMC Member

  • New Member
  • 721 posts
  • Version:Unknown

Posted 26 October 2007 - 12:09 PM

Fixed the interpreter, it should be almost perfect now. Download in main thread.
  • 0
<div align='center'>Creating a program is easy. Creating software is difficult.</div>

#13 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 03 November 2007 - 12:19 PM

I've got to admit it's a very interesting concept. I used to use bitmaps a while back for game levels. But this seems a completely different concept. Well good luck with it! Downloaded btw :(
  • 0

#14 StapleGun

StapleGun

    GMC Member

  • New Member
  • 721 posts
  • Version:Unknown

Posted 03 November 2007 - 01:11 PM

I've got to admit it's a very interesting concept. I used to use bitmaps a while back for game levels. But this seems a completely different concept. Well good luck with it! Downloaded btw :(

<{POST_SNAPBACK}>


Thanks for the interest, but I'm afraid this project, altough very much complete, has died to lack of interest. I guess this community is a little below esoteric programming, despite how fun it is.

Brainfsck anyone?

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Print: Hello World!

  • 0
<div align='center'>Creating a program is easy. Creating software is difficult.</div>

#15 Bzrd

Bzrd

    GMC Member

  • New Member
  • 2 posts

Posted 04 December 2007 - 01:53 PM

Hi,
If you've gone to DM's Page, you know my name ... :P

I would like to test your programm (I whish I'd time to write such), but my bmp is 40x40 so it won't run !
I'll try to shrink it a bit.
I'd like to send my last BMP with this message too, but I don't know how ... :(

I would really appreciate to get a copy of your source code (may I help improve it ?).

Really cool pgm !
  • 0

#16 Bzrd

Bzrd

    GMC Member

  • New Member
  • 2 posts

Posted 04 December 2007 - 02:50 PM

There's a big problem with your pgm !
No way to add a white cell :(

There are many programs you can't 'draw' without that color !

ST
  • 0

#17 StapleGun

StapleGun

    GMC Member

  • New Member
  • 721 posts
  • Version:Unknown

Posted 16 October 2008 - 03:23 AM

Been almost a year since I've touched this project -- and quite some time since I've tinkered with GM -- but I've been going through various esoteric programming languages and got back into Piet. As a result I fixed a few bugs with this project and added a new version.

I know it's a little late but in response to Bzrd:

Using the Console program, I believe Hipi can interpret larger bitmaps. And the color white is indeed there, but in Piet white is simply a null color. Right clicking a cell will toggle it between black and gray, where gray is this null cell.
  • 0
<div align='center'>Creating a program is easy. Creating software is difficult.</div>

#18 heyheyhey27

heyheyhey27

    GMC Member

  • New Member
  • 351 posts

Posted 11 November 2009 - 07:37 PM

Well, this is funny. I thought I wouldn't be back on this community for a while, and here I find the Piet interpreter I was looking for, written in GM!

Edited by heyheyhey27, 11 November 2009 - 07:38 PM.

  • 0