| Velnias75 (27) | |
|
Hi, it just began as prove of concept, but now I would like to continue on an personal project, since it slowly gets quite usable. It is a "programming language" for generating resp. rendering pictures based on the HGL language. I tried to find some people taking a look over it via my "friends" on Facebook, but absolutely everybody there seems to ignore it. Only my sister struggles with it, but she is no big help, because she has even problems to tile to windows horizontally, i.e. she is not good with new things to do on a PC. So, I try to find some people to take a look, give comments, critics and bug reports here. The public Facebook note is here: https://www.facebook.com/notes/heiko-sch%C3%A4fer/hgl-0416svn-f%C3%BCr-windows-download/402075729876951 The direct download is here: http://www.rangun.de/hgl-0.4.16~svn.zip (3.6 MB) MD5: 4aa5cdcf2429be143079a3b498df5602 The ZIP contains all dependent DLLs too, so you can either start it from the directory itself or just copy missing or if newer DLLs into the system. The note is in German language, but the link is below in the note and HGL itself is in Englisch. It is currently a Windows version, but since all development is done on Linux I can provide Debian und Ubuntu packages on demand. Every questions, remarks and comments we can discuss in this thread. | |
|
Last edited on
|
|
| MiiNiPaa (226) | |
| I think it belongs to Lounge. | |
|
|
|
| Velnias75 (27) | |
| Now it is in the lounge, but I had the aim later to get the discussion into implementation details as well. | |
|
|
|
| chrisname (6181) | |
| So, is it something like a shader language but for general graphics rather than just shaders? Like HLSL/GLSL? Got any code examples? | |
|
|
|
| Velnias75 (27) | |||
|
Oh my goodness no! It is an independent application, resp. a set of two independent applications. A compiler and an interpreter. Proof of conecept means to design a program from the first line to the last line based on design patterns, reusability of code, effective implementation of algorithms, extensibility by plugins, portability as well as the pure theoretical compiler building. All together I try to bring into an application which finally is of some use. In my mind i.e. are websites which want to generate dynamically more or less complex pictures with the possibility of controlled interaction by a user. But the scope of use I finally let open. Currently it has 7396 LOC of pure C++ code. EDIT: The bison and flex code excluded. I use cxxmatric for quick metrics and it cannot handle this two. The Bison source has an estimated LOC of 400 and the Flex source an estimated LOC of 80. An example hgl input file looks like this:
| |||
|
Last edited on
|
|||
| L B (3805) | |||
http://stackoverflow.com/questions/1579162/are-design-patterns-really-language-weaknesses By "design pattern" I mean "the boilerplate code you have to write over and over" | |||
|
Last edited on
|
|||
| Velnias75 (27) | |
|
@L B: I guess you misunderstood me, the code of the applications, the compiler and interpreter are using this concepts. The language itself should stay as easy as possible, but powerful enough to create images, complex or not. For the moment I want feedback on the product as it is, not how it is implemented. This was only additional information on the history of it. But of course, if somebody is ambitious enough, I'm at a level where help is appreciated. EDIT: found the time now to read on stackoverflow.com (one of my fav sites too). Ok, it seems not all people are fans of DP, but the GoF stated in their book they didn't invented them, but just want to make them a catalogue for easier communication between developers. Just read the final chapters of the book too. Many developer used patterns without knowing how to name them, now there is terminology where people have the same "language". But actually this is too much offtopic and I'm willing to discuss DP in another thread. Here I would prefer to stick on HGL. | |
|
Last edited on
|
|
| NGen (630) | |
|
The source code looks like some sort of structured HTML5 canvas rendering in JavaScript. What sort of support do you plan on adding for animations? What would the syntax of this animation look like? Is this just a language to define a scene that must be manipulated within another language, or is this an entire language that can be ran on its own? | |
|
Last edited on
|
|
| Velnias75 (27) | |
|
Actually it is of sort "entirely developed by Heiko without looking left or right" ;-) In fact, I just developed the language according the needs to perform its task. So I'm happy it looks like similar to something known. In this example all regarding the "real" programming language is missing. My personal test file for it looks so horrible nobody can imagine, because it has to test the parser to its limits. This example was developed to give users an insight what and how is possible currently with HGL. Therefore it is missing the complete procedure definition part and focuses only on rendering to get an image out of it. You can try this example with the download I put in my first post. It will render you a picture in currently one of three (as plugins) implemented output formats: JPG, PNG, and PPM. BTW: the comment style, of course, is copied from the C++ comment style. | |
|
|
|
| Velnias75 (27) | |
|
@NGen: animations are a bit far away now. HGL renders normal bitmap pictures, but sure, with help I could produce a sequence of images to support animations, maybe even with a plugin for direct video output. But so far I'm not with my project. I have even to improve the rendering engine, since it has sometimes some problems with floating point calculations. Your second question: it is planned as an independent program, but it is separated into libraries which can be linked to every app who wants to. Look at the binaries: the executables are ridicously small, because all is within the DLLs (Windows) or the SOs (Linux). The separation into libs at the moment is for a GUI if somebody is helping me to develop one. Graphics programming is a new field for me, which have chosen because of all the algorithms which are unknown to me yet. I like algorithms, to understand them and finally to implement them, therefore, except font rendering all graphics algorithms are implemented by myself and to my surprise even quite fast and efficient. | |
|
Last edited on
|
|
| naraku9333 (1037) | |
| Can you explain the usage? Will you be releasing the source? | |
|
|
|
| Velnias75 (27) | |||
|
It is a console application (for the moment). Usage is quite simple. Here is a typical line I use often for testing: cat src/examples/example.hgl | debug/src/compiler/hglc | debug/src/interpreter/hgl -O png > /tmp/example.png (without line break of course). In that case I input via stdin the source, compile it to stdout and again use stdin as input to the interpreter and redirect stdout to the generated file. Of course specifying input and output as files is possible too: debug/src/compiler/hglc src/examples/example.hgl -o /tmp/example.hglz debug/src/interpreter/hgl /tmp/example.hglz -O png -o /tmp/example.png About distribution I'm quite unsure at the moment. So I give away source code not to the general, but to people willing to audit it, submit patches and giving feedback to me. A friendly PM should be enough ;-) One note on the example code: I forgot to show that references work quite well already, even if their full power if the programming language is fully implemented. Replace starting line 107:
EDIT: on usage using option -S or omitting -O to get it it on stderr, you can get a dump of the internal structure. I personally prefer -S to easily redirect it into a file. The option -? shows all available options. | |||
|
Last edited on
|
|||
| Velnias75 (27) | |
|
New Version uploaded: http://www.rangun.de/hgl-0.4.13~svn.zip (3.5 MB) MD5: b793f36b29d2341f8259a079b345f77c Changes are: * in the last build there was a "duplicate section has different size" linker error, so recompiled it from scratch * consequently added line numbers to warnings and errors in the compiler | |
|
Last edited on
|
|
| Filiprei (219) | |
| Please don't make this a blog, it will remind me too much of a certain other thread in this forum... | |
|
|
|
| Velnias75 (27) | |
| Please point me out where it is like a blog. The last post was only an announcement. | |
|
|
|
| Filiprei (219) | |
| I didn't mean that this is a blog, I was just saying that if you make to many announcements people will get annoyed and call it a blog. Don't worry though, the people at cplusplus.com is very forgiving. Good luck with the project. I am not that advanced yet so I can't comment much on the project itself. | |
|
|
|
| Velnias75 (27) | |
|
Ok, the announcement was because the app could crash on some or all systems, so it was important to provide that. I have to admit, I rarely test it on Windows, but thouroughly on Linux. So by accident I saw that linker error and wanted to provide a surely working version. For the people worrying now: only 2 parts are Windows specific and this parts are tested on Windows. @Filiprei (especially): you can also contribute just by trying it from the view of a user and reporting back your experiences. | |
|
Last edited on
|
|
| Zereo (410) | |
|
@Velnias I think the whole point behind Filiprei posting what he did was because just recently we had a forum post by someone called Jackson Marie (then changed her name to something else) that was about 20 pages long with like 300+ posts and about all them posts was her just giving useless updates to everyone here that we couldn't understand because we didn't have the source. She just recently got banned. You can probably still see the thread in lounge (I think?). So don't think he ment any offense or anything. | |
|
|
|
| Velnias75 (27) | |
|
I would like to remove some legacy bytes in the compiled binary, because they are now obsolete. Who started working with HGL and would be annoyed by that? Otherwise I think as early as possible to get the binary stable, would be better than to force to recompile all their projects with Version 1.0. Version 1.0 is without compromise the release where I would introduce the last neccessary changes to the binary and from that release all following would stay compatible. | |
|
|
|
| chrisname (6181) | |
| What would you be removing? | |
|
|
|