Difference between revisions of "User:Tangentstorm"
Tangentstorm (talk | contribs) (start on a page about my github repos) |
Tangentstorm (talk | contribs) (added a bunch of links and screenshots for my various projects) |
||
Line 1: | Line 1: | ||
I am a regular in the #fpc [[IRC Channel]] and an enthusiastic supporter of free pascal. | I am a regular in the #fpc [[IRC Channel]] and an enthusiastic supporter of free pascal. | ||
+ | |||
+ | One day, after about 12 years of doing mostly python work, I found myself looking over my ancient TP5.5 code and thought it might be fun to get it working again. I was pleasantly surprised by how far pascal's come over the years, and have found myself reaching for FPC as my default tool. | ||
+ | |||
+ | I think Lazarus is pretty darn slick, but I grew up with text screens and keyboards, and still tend to find myself shelled into my FreeBSD box, editing my pascal code with emacs, and often using [http://orgmode.org/worg/org-contrib/babel/ org-mode and babel] for literate programming. | ||
Most of my pascal code is available for free on github: | Most of my pascal code is available for free on github: | ||
− | + | ||
− | * [https://github.com/tangentstorm/tangentlabs/tree/master/pascal tangentlabs] | + | == libraries == |
+ | |||
+ | * [https://github.com/tangentstorm/xpl/tree/master/code tangentstorm/xpl] contains many general purpose units. A few interesting ones: | ||
+ | ** [https://github.com/tangentstorm/xpl/blob/master/code/sqlite3ext.pp sqlite3ext.pp] extends the standard sqlite3 package to allow extending sqlite with custom functions or virtual tables written in pascal. ([https://github.com/tangentstorm/xpl/blob/master/demo/sqlrange.pas demo/sqlrange.pas] hos an example) | ||
+ | ** [https://github.com/tangentstorm/xpl/blob/master/code/ubp.pas ubp.pas] implements a b+ tree ([ bpdemo]) | ||
+ | ** [https://github.com/tangentstorm/xpl/blob/master/code/unda.pas unda.pas] provides n-dimensional arrays | ||
+ | ** [https://github.com/tangentstorm/xpl/blob/master/code/kvm.pas kvm.pas] ([http://tangentstorm.github.io/xpl/kvm.pas.html literate version]) and [https://github.com/tangentstorm/xpl/blob/master/code/kbd.pas kbd.pas] together implement a terminal library similar to the old <code>crt</code> unit, but with support for widechars and 256-color displays. | ||
+ | ** [https://github.com/tangentstorm/xpl/blob/master/code/arrays.pas arrays.pas] ([http://tangentstorm.github.io/xpl/arrays.pas.html literate version]) contains some generic array-like classes and interfaces). | ||
+ | ** [https://github.com/tangentstorm/xpl/blob/master/code/cw.pas cw] is a rather cryptic mini-language for generating colored text output (ported from turbo pascal when I was in high school, so kind of messy) | ||
+ | ** There's also a [https://github.com/tangentstorm/xpl/tree/master/test console-based unit testing framework] that I use on almost all of my projects. | ||
+ | ** [https://github.com/tangentstorm/xpl/blob/master/code/lined.pas lined.pas] is my port of a simple line editor called LineNoise (like gnu readline, but tiny). | ||
+ | ** The [https://github.com/tangentstorm/xpl/tree/master/code/ui /code/ui] directory has a bunch of other console widgets (but based on my old turbo pascal code, and not fully modernized/debugged yet)] | ||
+ | |||
+ | * [https://github.com/tangentstorm/py4d tangentstorm/py4d] is my fork of [[Python4Delphi]]. I'm still learning about everything it can do, but the repo includes a python wrapper for the kvm unit mentioned above. | ||
+ | |||
+ | == example code == | ||
+ | |||
+ | * [https://github.com/tangentstorm/zworld tangentstorm/zworld] is a small sketch of a lazarus project. I had bigger plans for it, but right now it just uses [[BGRABitmap]] to draw a huge number of little sprites. I only link to it here because it might be of interest to someone wanting to use Lazarus for non-traditional graphic stuff (games, animation, etc as opposed to traditional GUI apps). | ||
+ | |||
+ | * [https://github.com/tangentstorm/tangentlabs/tree/master/pascal tangentstorm/tangentlabs/pascal] contains a whole bunch of small pascal examples and experiments. Some especially fun ones (which may or may not require fpc 2.7.1 from the svn trunk): | ||
** [https://github.com/tangentstorm/tangentlabs/blob/master/pascal/GoGoSDL.pas GoGoSDL.pas] is a basic demo of using SDL (1.x) from fpc, intended as a template for quickly creating SDL apps. | ** [https://github.com/tangentstorm/tangentlabs/blob/master/pascal/GoGoSDL.pas GoGoSDL.pas] is a basic demo of using SDL (1.x) from fpc, intended as a template for quickly creating SDL apps. | ||
** [https://github.com/tangentstorm/tangentlabs/blob/master/pascal/zenglagg.pas zenglagg.pas] shows how to use [[AggPas]] to dynamically create smooth vector images for use as sprites in [[ZenGL]]. | ** [https://github.com/tangentstorm/tangentlabs/blob/master/pascal/zenglagg.pas zenglagg.pas] shows how to use [[AggPas]] to dynamically create smooth vector images for use as sprites in [[ZenGL]]. | ||
Line 13: | Line 36: | ||
** [https://github.com/tangentstorm/tangentlabs/blob/master/pascal/jcolor.pas jcolor.pas] and [https://github.com/tangentstorm/tangentlabs/blob/master/pascal/jscan.pas] implement a hand-written syntax highlighter for java. | ** [https://github.com/tangentstorm/tangentlabs/blob/master/pascal/jcolor.pas jcolor.pas] and [https://github.com/tangentstorm/tangentlabs/blob/master/pascal/jscan.pas] implement a hand-written syntax highlighter for java. | ||
** [https://github.com/tangentstorm/tangentlabs/blob/master/pascal/helpers.pas helpers.pas] demonstrates how to use helpers, by adding some python-style methods to pascal strings. | ** [https://github.com/tangentstorm/tangentlabs/blob/master/pascal/helpers.pas helpers.pas] demonstrates how to use helpers, by adding some python-style methods to pascal strings. | ||
+ | |||
+ | * [https://github.com/goldsmile/zgld25 goldsmile/zgld25] was a start on a game that I put together in a few hours after giving up on a different game entry for ludum dare 25. | ||
+ | |||
+ | [[Image:2012-12-18-zengl-landscaping.png|320px|reverse defender game]] | ||
+ | |||
+ | * [https://github.com/tangentstorm/lazmvc lazmvc] is an example GUI program I made in Lazarus that illustrates the Observer pattern. (It's a small custom implementation that doesn't take advantage of the standard fpObserver unit, but maybe someone out there will find it enlightening.) | ||
+ | |||
+ | * I've collected all my ancient Turbo Pascal code in [https://github.com/tangentstorm/silverware/ tangentstorm/silverware]. | ||
+ | |||
+ | == educational stuff == | ||
+ | |||
+ | * [https://github.com/sabren/b4 sabren/b4] contains a bunch of experiments related to a programming course I hope to present to the world some day. Of particular interest is the [https://github.com/sabren/b4/tree/master/ng /ng] directory, which contains a complete implementation of the [http://retroforth.org/docs/The_Ngaro_Virtual_Machine.html ngaro virtual machine] from [http://retroforth.org/ retroforth], including implementations of the text/graphics console using SDL and ZenGL. | ||
+ | |||
+ | [[Image:2013-04-09-rxsdl-circles-hurrah.png|320px|text/graphics console using SDL]] | ||
+ | |||
+ | * [http://tangentstorm.github.io/mr/ minrel] is a start on a minimal relational database, written as a literate program. Eventually I hope to guide readers step by step through building this system, but right now there are only 3 lessons. Much of what I eventually want to write about is already working in minneron (below) using SQLite for the database. | ||
+ | |||
+ | * I also have some programming videos online at [https://www.youtube.com/user/tangentstorm/videos user/tangentstorm] on youtube. Sadly, there's not anything pascal related right now, except for a little [https://www.youtube.com/watch?v=P0ZGmOm36SY&list=UUznGnOteb8vQ0fJyHys_OQg turbo pascal experiment] I made from scratch in a few hours, showing off various console-mode micro-processes and widgets. (The code also works under fpc and you can see it at [https://github.com/sabren/b4/tree/master/turbo sabren/b4/turbo]) | ||
+ | |||
+ | == minneron == | ||
+ | |||
+ | [https://github.com/minneron/minneron minneron/minneron] contains my main project, a novel computing environment that combines a hypertext editor, graph database, and scripting engine. It's nowhere near ready for public consumption, but there's plenty of neat stuff already working. | ||
+ | |||
+ | [[Image:2014-04-14-minneron-impshell.med.png|320px|minneron screenshot]] |
Latest revision as of 15:54, 22 October 2014
I am a regular in the #fpc IRC Channel and an enthusiastic supporter of free pascal.
One day, after about 12 years of doing mostly python work, I found myself looking over my ancient TP5.5 code and thought it might be fun to get it working again. I was pleasantly surprised by how far pascal's come over the years, and have found myself reaching for FPC as my default tool.
I think Lazarus is pretty darn slick, but I grew up with text screens and keyboards, and still tend to find myself shelled into my FreeBSD box, editing my pascal code with emacs, and often using org-mode and babel for literate programming.
Most of my pascal code is available for free on github:
libraries
- tangentstorm/xpl contains many general purpose units. A few interesting ones:
- sqlite3ext.pp extends the standard sqlite3 package to allow extending sqlite with custom functions or virtual tables written in pascal. (demo/sqlrange.pas hos an example)
- ubp.pas implements a b+ tree ([ bpdemo])
- unda.pas provides n-dimensional arrays
- kvm.pas (literate version) and kbd.pas together implement a terminal library similar to the old
crt
unit, but with support for widechars and 256-color displays. - arrays.pas (literate version) contains some generic array-like classes and interfaces).
- cw is a rather cryptic mini-language for generating colored text output (ported from turbo pascal when I was in high school, so kind of messy)
- There's also a console-based unit testing framework that I use on almost all of my projects.
- lined.pas is my port of a simple line editor called LineNoise (like gnu readline, but tiny).
- The /code/ui directory has a bunch of other console widgets (but based on my old turbo pascal code, and not fully modernized/debugged yet)]
- tangentstorm/py4d is my fork of Python4Delphi. I'm still learning about everything it can do, but the repo includes a python wrapper for the kvm unit mentioned above.
example code
- tangentstorm/zworld is a small sketch of a lazarus project. I had bigger plans for it, but right now it just uses BGRABitmap to draw a huge number of little sprites. I only link to it here because it might be of interest to someone wanting to use Lazarus for non-traditional graphic stuff (games, animation, etc as opposed to traditional GUI apps).
- tangentstorm/tangentlabs/pascal contains a whole bunch of small pascal examples and experiments. Some especially fun ones (which may or may not require fpc 2.7.1 from the svn trunk):
- GoGoSDL.pas is a basic demo of using SDL (1.x) from fpc, intended as a template for quickly creating SDL apps.
- zenglagg.pas shows how to use AggPas to dynamically create smooth vector images for use as sprites in ZenGL.
- arrayprops.pas shows how to override the bracket operator so you can say things like
grid[5,3];
or evendict['strings as keys'];
. - xpathdemo.pas shows how to use xpath.
- dispatch.pas is a hopefully entertaining look at various approaches to dynamic dispatch/multimethods. (Short answer: dynamic dispatch semantics are possible in fpc, but require complicated setup or creative use of exceptions.)
- hofmap.pas shows how to implement higher order functions as class methods in a generic class. (Probably requires trunk.)
- funops demonstrates another style of higher order function based on function composition. In particular, it shows how to implement J-style hooks and forks.
- jcolor.pas and [1] implement a hand-written syntax highlighter for java.
- helpers.pas demonstrates how to use helpers, by adding some python-style methods to pascal strings.
- goldsmile/zgld25 was a start on a game that I put together in a few hours after giving up on a different game entry for ludum dare 25.
- lazmvc is an example GUI program I made in Lazarus that illustrates the Observer pattern. (It's a small custom implementation that doesn't take advantage of the standard fpObserver unit, but maybe someone out there will find it enlightening.)
- I've collected all my ancient Turbo Pascal code in tangentstorm/silverware.
educational stuff
- sabren/b4 contains a bunch of experiments related to a programming course I hope to present to the world some day. Of particular interest is the /ng directory, which contains a complete implementation of the ngaro virtual machine from retroforth, including implementations of the text/graphics console using SDL and ZenGL.
- minrel is a start on a minimal relational database, written as a literate program. Eventually I hope to guide readers step by step through building this system, but right now there are only 3 lessons. Much of what I eventually want to write about is already working in minneron (below) using SQLite for the database.
- I also have some programming videos online at user/tangentstorm on youtube. Sadly, there's not anything pascal related right now, except for a little turbo pascal experiment I made from scratch in a few hours, showing off various console-mode micro-processes and widgets. (The code also works under fpc and you can see it at sabren/b4/turbo)
minneron
minneron/minneron contains my main project, a novel computing environment that combines a hypertext editor, graph database, and scripting engine. It's nowhere near ready for public consumption, but there's plenty of neat stuff already working.