yoy.be "Why-o-Why"

freeware

2005-06-10 20:46  freeware  freeware  [permalink]

---Here are a few applications I wrote, a few of them I use myself, a few were just for fun...

They're put public here as FreeWare, some are OpenSource. I haven't figured out yet if I need to put them here under a license or even which one. So for now they're all rights reserved and use em at your risk, though there's really nothing to fear because they really don't do more then they're supposed to do.

Anyway, if you really want to have a look at the SourceCode, let me know -- StijnSanders

(Click on these icons:)

[TreeBrowse] [DirDiff] [DirFind] [odo] [RE] [jsonDoc] [Connect 4] [CursorTime] [MetaClick] [MetaKeys][BarCode] [MailCount] [Ro] [Fa] [WebTop] [SideSwitch] [Drink]

AllSorts (shell extension)
Growthris
IconSuite
WikiEngine
TortoiseSVN icons
xxm
github.com/stijnsanders

A story about two task-keeping-applications.

2017-03-18 17:22  s2tka  coding delphi werk freeware  [permalink]

Let me tell you a story of two task-keeping-applications. Once there was a team that was struggling to keep track of the work it was doing, had done, and still had to do. It was frustrating to work on the team, hard to schedule things, almost impossible to estimate when things where going to get done. And since clients are what they are, changing requirements and additional requests would cause much more disruption than expected of a team that calmly and firmly is determined to deliver the best of market solution.

An internal brainstorming-session about what to do about it, ended in two opposing visions about what decent issue-tracking should be about, and how a system that (co-!)operates with the team members should be structured internally, should behave, and which duties it should perform either by itself, or by effect of using its rules and restrictions correctly as designed.

In an attempt to get to the best solution, two teams were formed to develop each a project based on one of the two views. An evaluation would follow determining a winner, or if would it be possible to synergize the best parts of both into a single system.

A side note: from a managerial point of view this is a very tough decision. Allocating a lot of resources to work on internal structure, takes resources away of the work that brings in revenue, and such undertakings typically risk getting frivolous or spinning out of control. But I guess it's normal that all stop rowing to help keep the boat from sinking. So, apart from being intrinsically aware of the exceptionality of this opportunity, coordinators were given instructions to keep to a strict schedule in these projects and a determined focus on delivering a workable proof-of-concept quick. Sounds like a good work-ethic to apply generally, if you ask me.

A few weeks later progress was made, and the prototypes were already being used to keep track of the issues of these new task-keeping-applications and other projects. The main difference between design visions became apparent soon enough.

One application centered around the list of work items. Care was taken the entry form was extensive enough to have fields for all of the details about a work item, its categorization, its relation to the project, an outline of the projected outcome. An overview would show the current list, possibly filtered for those items assigned to you.

The other application was centered around getting information out of the system, especially structure and relation between items. Users would enter small specific reports, and add them to the best suitable node in a tree-structure, optionally marking relations with other items over branches. The overview showed an expandable structure starting at the root items. It also could have a filter applied, but would potentially show you an entirely different structure of the same data, when using a different relation type.

Having two working prototypes, attention gradually reverted back to the serious work and some of the frustrations of before were abated. After a few months an evaluation was undertaken.

One application had rendered itself useless. The first weeks of usage, a lot of entry happened, but without consensus about categorization, the list was enormous without a clear way of grouping relevant items. Duplicate entries and ambiguous task-descriptions were unresolved, causing confusion.

The other application was doing better. It needed work, but offered a good view of what had to get done.


Enough about the story. Reality, of course, is much more bleak. As no sane manager would make such a shift in resources of a troubled organization, the 'two teams' actually stand for the existing team using an off-the-shelf something badly administered on one side, and on the other side, well, just me, toiling on something potentially better, in my off-time.

I started — like many — with a plain text-file, then a spreadsheet. Then I took the step to design a database for it, but wanted something to do entry and retrieval with roughly the same ease-of-use that a spreadsheet would offer. Working with tree-structures for some other projects, I wanted a single structure to serve as the basis to store data in. Specifically with projects and tasks — as projects tend to have sub-projects, and tasks split into sub-tasks — using branches of a tree would enable to keep this distinction conveniently vague. If you add representation for entities like users and clients into this tree-structure, and relation between nodes over branches, you've got a richness to model much more of the world, and keep track of its changes, past and future.

From there it grew slowly, over years, into what it is now: tx. First versions suffered a notoriously bad interface, but I hope that has improved. For long I was its only user, but some cooperation features have been added since. What's left for me is to keep improving tx where possible, and demonstrating it to people what it's about.

Though entry and structure is important, where a task-keeping-system can really shine is helping to keep an overview. A cleverly designed filter can limit your view to exactly these items that are relevant to you, but in tx you get the additional option of having these items display with exactly those sections of the tree-structure they have in common. Also, I personally feel the most important items on any list, as long as it may be, should be on top. So when tx displays a list of items, they get ordered using their weight, determined by a combination of factors such as task-type and current status. As a task progresses from an active state to a final state, it may move down the list or even fade from view into an archival state.

And there's much, much more I could talk about, but it's all created out of necessity and designed adhering closely to a central vision of what a task-keeping-system should be and what it should be doing for you in order to be able to depend on it.

In conclusion, and for those people that — like me — skip long stories to the last paragraph, it's so very important that information systems succeed at keeping an up-to-date model of reality, and offer you the freedom and easy to update it's view of the world. Especially so with task-keeping software you depend on to keep track of the progress you make with projects, and to help stay on top of what's important. All of that served as the basis for developing tx.

jsonDoc, jsonV 1.1.0

2017-03-09 01:22  jsonDoc110  delphi freeware  [permalink]

jsonDoc, jsonV v1.1.0

While working on TRethinkDB, I noticed something was wrong with document re-use. My original idea was to re-use a single IJSONDocument instance to process a list of similar documents, but keep the set of keys allocated, only overwriting the values from the new document. (If you're interested about the code, search jsonDoc.pas for FLoadIndex.) Nothing an extra internal-use interface can't fix. Then I noticed that IJSONDocument.ToString could do with a revision because it wasn't using the new IJSONEnumerator, though it should.

Then I noticed the feature I once added to function JSON, where you could declare embedded documents by listing a value of '[', and closing the document with a key of ']'.  The problem is that '[' could be a perfectly valid value! If it were to come via a variable, that would change the behaviour of the JSON call, and that's a big no-no. Also square brackets usually mean arrays in JSON-land,  so it's perhaps confusing that I chose square brackets because you already need them in the JSON([...]) call. So I changed it into a key suffix of '{', and a closing key of '}', counting on braces being really abnormal in key names. If you really need a key name that ends with '{', don't use the JSON function, but just d['x{']:='y';

A minor downside may be that JSON calls with braces in the string constants, break the comment block if you want to comment out a section of code with braces, but there's always (* *) or //. It by far doesn't outweigh how elegant this new solution is, but it's a breaking change (existing code using '[' values won't work correctly any more), so instead of version 1.0.6 I think it deserves a jump in minor version number to 1.1.0.

While I was at it I fixed some minor issues with jsonV, so remember to update that one as well. Hope you enjoy the changes. (Next up may be replacing TMongoWire's bsonDoc with jsonDoc...)

TRethinkDB

2017-03-06 23:03  TRethinkDB  delphi freeware  [permalink]

Delphi RethinkDB driver

I've given it another try and, in part thanks to a Windows executable that performs well,  and thanks to the gentle people over at the rethinkdb-dev group, I've got something working. It appears the basic functions you would expect from a driver work, but more advanced queries need some more extensive testing. (I've read about a driver testing harnass, but to replicate that around my driver, sounds like a separate project in its own.)

There are some strange sections in the design of ReSQL that show it was written for a weakly-typed language, but using variants and interfaces, I hope I've struck a nice balance between versatility and still having the best suitable methods showing up on auto-completion. Something that should be there may be hidden from view this way, but will probably be because of inaccuracy or error of my part.

Which leaves my in roughly the exact same position as I was closely after completing TMongoWire: having success learning about a new(ish) NoSQL DB the hard way by trying to connect to it directly with Delphi, but nothing in the way of an effective application that would use it for something vaguely useful. I've learned some people have effectively created things with TMongoWire (yey!) but I myself don't really have a good idea (or the motivation) to build something on its own that would use the features of these new database services to their best intent.

If you've got a good idea, please let me know. If you want to know more about TRethinkDB, let me know.

MetaClick v1.3.0.500

2017-02-03 22:54  MetaClick500  freeware  [permalink]

MetaClick v1.3.0.500


MetaKeys v1.1.0.500

2017-02-03 22:52  MetaKeys500  freeware  [permalink]

MetaKeys v1.1.0.500


DirFind v2.0.4.494

2016-12-16 22:30  DirFind494  delphi freeware  [permalink]

DirFind

version 2.0.4.494


MetaClick v1.2.3.497

2016-12-10 23:57  metaclick497  freeware  [permalink]

MetaClick

v1.2.3.497
- fixed issue about division by zero at start-up
- now open source on github

Another Multi-User Dungeon

2016-12-08 23:15  amud  coding delphi freeware  [permalink]

I wanted to make an extra demonstration of WebSockets from/on/with an xxm project. What I also have dreamed about is making a multi-user game where players would navigate a virtual realm and manipulate the objects in it. Problem is that I don't have too much experience with playing existing multi-player online games, and that animated graphics design is not one of my strong points. But still, I wondered if combining the two would lead to something that somehow works.

So I started a project and set out to get something working, without losing too much effort on anything non-essential. Not even on a name for it, so I called it "Another Multi-User Dungeon". I've put the source up on github and host a running version on this computer at home I use to run my xxm projects (so don't shoot me if it's not available, it's not an always-on full-fledged web-server, but it also shows xxm projects don't ask much of a machine to run stabily). Feel free to have a try:
yoy.be/home/amud

The view shows, from top to bottom:

Anything you type into the entry box, when you press enter, is passed on to your in-game persona to speak into the room it is in. Click on items or people to get a list of actions you can do with it or them. Some actions use the last statement that was spoken by your in-game persona, for example 'make a note' from the NoteBloc object (ask for a NoteBloc from the hotel's receptionist). Click on an item again to select it, and in some cases extra actions are available on other items, for example the 'give' action to pass something from your inventory to someone else in the room. Most 'door' objects have a 'go' action that will move your in-game persona to a different room, unless you don't have the key to its lock or the room is fully occupied.

For now I haven't put too much up into the virtual realm. By default you enter the world in the first free room of the Sunburst Hotel, and apart of a welcome leaflet there's not much there. I thought a decent virtual realm would have computer-operated agents you could interact with, so I remembered ELIZA. A lot has changed in the world of chat-bots since then, but I thought it would be nice to have just that in there. It turns out the syntax of the bot-script at its base serves nicely for other roles as well, so I fashioned a receptionist for the hotel that answers back to some questions (and for now can provide you with a NoteBloc if you ask politely). At the city hall, there's a registry office where you can change your display name, and perhaps leave your e-mail address into the internal database, I might make it required for some operations later or if someone wants system support. There's also money you can pick-up and drop, but nothing else you can do with it (yet!).

Under the hood, it's heavily based on a single WebSocket, your 'feed' through which you get information about the virtual realm, and through which you can send commands back. The set of commands is limited and any extra requests lauched by the client-side script use a personalized single-use key based on your personal authentication key stored in LocalStorage. (I could have gone with a cookie, but if the WebSocket were hosted over TLS, LocalStorage offers slightly better security.)

I'm not sure where to take it from here. I've been thinking about creating a shop you could use money to buy things, but then you'd need something you can earn money with... And transporters that could move you to locations further away. But I guess designing more of a city will take some effort already... Perhaps I've got what I wanted: to create a platform that has the basics to build a game on. Only the idea for a specific game isn't there yet. And thinking up a thrilling plot of an exploratory adventure isn't one of my strong points either. If you have ideas please let me know in an issue on GitHub. Perhaps I could hand out a few RoomMaker objects to people and see what they do with it...

DirDiff v2.0.0.460

2016-11-13 21:04  dirdiff2  coding delphi freeware  [permalink]

DirDiff

It feels like this was a very long time in the making, but all the little bits of time here and there probably still amount to a recent number of man-hours... It took a couple of attempts to get "An O(ND) Difference Algorithm and Its Variations" by Eugene W. Myers in an implementation of my own that performed to my liking. I've chosen to use xxHash to speed things up. Once I got that, I continued the grand re-work of DirDiff so it would accept, not 2 files, but n files (or folders); handle the work in background threads, and have both the folder-overview (and XML three) and content in the same window. In case anyone would like to have a peek inside, I've decided to open-source it as well, under the MIT license on github

I've open-sourced my productivity tools

2016-11-12 16:49  tools  coding delphi freeware  [permalink]

I've finally decided to open-source a set of my home-made tools, some of which I use almost every (working) day. Some may be very taylored to my personal taste, others may be easier to use by the broader public. Most are missing documentation, but the typical operation should be self-explanatory. (Except for handy hidden features, should make a list of those somehwere sometime soon...)

These tools have been available here for download in binary form since long, but by putting the source code in a public repository I hope I can inspire anyone that would like to know more what's going on behind the scenes to have a look, and who knows perhaps get someone to make improvements or additions.

→ github.com/stijnsanders/tools

RethinkDB: here to stay or on the way out

2016-10-07 23:23  RethinkDB-in-or-out  coding delphi freeware  [permalink]

I'm worried and confused.  The news these days is that RethinkDB is shutting down, at least the company.  The database itself may live on.  I had been attempting to write a really-thin Delphi wrapper for RethinkDB a number of times before, but got diverted into writing DelphiProtocolBuffer first, because it was used for the base of the server protocol and I couldn't find the Delphi support I was looking for (I'm sorry, but I'm a bit picky). Later it looked like they were planning on dropping this in favor of something else, but I wasn't able to investigate further at that time. In the mean time, I did a CouchDB, PostgreSQL and a MariaDB/MySQL wrapper, and a neat way to tie them together, and kept TMongoWire working, which turns out to be the one in the series of DB connectors that has the most success to date. (And which envolved learning all about PBKDF2...)

So now I'm confused about wether to keep RethinkDB on my to-do list? Or drop it? Or move it up to have a look sooner... Just like MongoDB, it may be that I won't really have a full-grown project anytime soon that is based on RethinkDB, but demand for a thin Delphi wrapper is out there and makes it worth it, I don't know. (Please let me know.)

And I'm worried about this new tale of an open-source-but-also-corporate endeavour going sour. It's only natural that when the projected sales don't appear to manifest, a project is best to get ended cleanly (as I recently witnessed over at the day-job). So I'm rooting for the open-source project to find a good new home. That the eco-system of volunteers may survive the orphanization. That the real-world users may carry enough weight to force the project into a viable after-life.

It's important to have a good climate to have entrepreneurs get enticed to take the step and start a company, but with this series of high-profile undertakings going bust, and aqui-hires where users get left in the dark, it starting to look like it's running out of control. Some people may called it a bubble, but I find the image of a pendulum swinging more appropriate. Is it swinging back already? I'm in no position to tell accurately. But I am worried.

For the record, I have had no economic gain from my open-source undertakings what-so-ever (up till now?) though OpenHub estimates about half a million went into xxm up till now. Not bad for a hobby...
But about RethinkDB, I guess I'll have to wait a little until the dust settles down...

Update 2017-02-06: RethinkDB's assets have been bought from RethinkDB Inc. By something something Linux Foundation, and a re-license to the Apache Public License. Sky is clearing up.

Update 2017-03-06: I've given it another try, and partly because there's a downloadable Windows executable that works, I've got something working. TRethinkDB appears to be able to perform all the basic functions you could require from a driver, but may need some more testing.

xxHash: an extremely fast non-cryptographic hash algorithm

2016-09-23 23:50  xxHash  delphi freeware  [permalink]

md5

I'm slowly but surely (finally!) working towards a (long overdue!) rewrite of DirDiff, but this time using threads and perhaps a different algorithm. Apparently there's still progress to make there, and I read good things about the diff git is using internally. Looking into that, some performance can be gained by doing the actual comparing on hashes of the data, instead of all of the data itself. Which lead me to xxHash,  which should hit the sweet spot between fast enough and safe enough against collisions. (Unless I misunderstood.) I'm not sure if anyone thought of combining those two. But I may be looking into that for DirDiff 2... But since I didn't find a Delphi implementation rightaway, here it is, and it fits nicely with this collection of other hashes I did before. (Though xxHash is specifically a non-cryptographic hash...)

Delphi and MySQL or MariaDB

2016-09-15 21:12  libmysql  coding delphi freeware  [permalink]

Tadaa! I added a wrapper around libmysql.dll (to connect with MySQL or MariaDB) to my collection of really (really!) thin wrappers around things like ADO, or LibPQ (to connect with PostgreSQL) or now libmysql.dll. I also had the idea to align them as much as possible into almost the same interface. It's specifically not my point to have them be exactly the same, but very much almost so, just in case when I use this for a project and need to switch database back-end later on, the work that goes into that is minimalised and can concentrate around the different in SQL dialects. (for example the postgres branch here)

https://github.com/stijnsanders/DataLank/blob/master/MyData.pas 

(previously)

AES, DES (TripleDES)

2016-09-09 23:08  aesdes  coding delphi freeware  [permalink]

→ md5

I've added AES and DES. DES may be deprecated, and Triple-DES may be soon, in any way it's cryptographically superceded by other ciphers, but still in use by some systems. I should do some work extra and change array[0..7] of byte into record l,r:cardinal; end;  or even int64 but I needed it only for something small and this works, so I'll leave it at that for now.

jsonV 1.0.3

2016-07-08 22:52  jsonv103  delphi freeware  [permalink]

jsonV

Update: v1.0.3
jsonV now shows more sensible type labels, and only the fout-digit-hex-internal-value only on the most exotic variant types.
Ctrl+Shift+C now copies the value only, not just the node caption.
I also discovered a blocking issue when jsonDoc was trying to construct an array of int64 values. (more about that here)

jsonV 1.0.2

2016-06-16 17:40  jsonv102  delphi freeware  [permalink]

jsonV

Update: v1.0.2
jsonV now accepts json-files that contain an array at the root level.
I also changed jsonDoc so all OleVariant arguments are passed const. This may break older versions, but should offer a little improvement in performance.

Delphi and PostgreSQL

2016-05-13 00:19  LibPQData  coding delphi freeware  [permalink]

Searching for an alternative way to use PostgreSQL from Delphi? In the spirit of the other as-light-as-it-gets database connector wrappers, I've converted the header(s) to the LibPQ dll. See the LibPQ and LibPQData units in this repository:

https://github.com/stijnsanders/DataLank#datalank 

To start an attempt to move to something more like a generic database layer, I've started this DataLank idea, but it needs more work. Actually I don't intend to develop it all the way into a full-fledged data-layer. Specialities of each specific database solution are so diverse and important, that I really don't want to hide them between an opaque abstraction layer. I want a database connector wrapper to be as light as possible, but also to allow access to the underlying technology. The main point for using DataLank, is to have less work changing DB's by using TDataConnection and TQueryResult types, but not no work. Adapting the used SQL to a different dialect will probably involve updating many (or all) calls the database anyway. But I'll post about that later when I put some more time in. (And perhaps write a libmysql.dll wrapper first...)

Play Assembler

2016-05-03 19:17  plasm  coding freeware  [permalink]

Look! It's my first parser in javascript: http://yoy.be/dev/plasm.html

It is also a play thing to try and tame this beast that is assembler. Not any assembler in particular, but just in general what it is to try and make things work with a limited set of registers and instructions and having to shuffle anything that doesn't fit in those to and from memory. If I put more work into this, it could go two ways:

I can evolve the machine code further and try to design a binary encoding for the possible instructions, and have the code turn up in the memory as it is accessed by the normal registers. (It is not now, the I register now indexes into a separate set of instructions, possibly with overlapping values.)

Otherways I could try and build a compiler that compiles code into this set of machine instructions (perhaps based on this one), finding out along the way what is all the fuss about register allocation and heuristic optimizations...

And ofcourse the both meet and I could try to build a compiler straight into these virtual machine instructions, but I have the luxury of not having to do this. And since it's all about learning and exploring by doing, it'll probably get me stuck faster.

But for now I think I'll let this rest for a little while. See how it looks when I come back to it after a while.

See also https://github.com/stijnsanders/plasm

 

xxm v1.2.4.430

2016-05-03 19:02  xxm430  delphi freeware  [permalink]

xxm

v1.2.4.430
- xxmISAPI: fixed issue with open connections not accepting new requests

v1.2.4.424
- revised context object lifetime management (lock-less reference counting)
- demo 7 "Resources": added "If-Modified-Since"
- demo 12 "Long Polling": added example EventSource (text/event-stream)

 

jsonV: plain and simple JSON viewer based on jsonDoc

2016-02-19 21:39  jsonV  delphi freeware  [permalink]

I decided to create a really simple JSON viewer based on a TTreeView instance and jsonDoc, which itself is heavily based on OleVariants (I really hate long lists of overloads!) so I have some VarType values handled, but show the rest '('+IntToHex(VarType(v),4)+')'. It could do so much more, but it then would be no longer a really simple JSON viewer. (I currently use Atom with beautify for JSON editing.) I've commited the source in the jsonDoc repository, see here for a ready-to-run executable (It's an exe in a zip, so some browsers and virus-scanners may cry havok about the security risk):

jsonV.zip (229KB)

MetaClick v1.2.2.466

2015-12-11 00:00  metaclick466  freeware  [permalink]

MetaClick

v1.2.2.466
- when suspended, time down to unsuspend only on self
- time down on buttons on self is always a normal click
- setting: hide unless mouse over (only show corners)
- setting: alpha blend level

MetaKeys v1.0.4.466

2015-12-10 23:56  metakeys446  freeware  [permalink]

MetaKeys

v1.0.4.466
- issue changing font with "hide unless mouse over"
- replaced "Wingdings 3" for "Symbol" in default kbl's

v1.0.3.355
- code 666 closes MetaClick
- code 777 opens settings dialog
- codes 1000..1999 loads "000.kbl".."999.kbl"
- code XXXYYY resizes to XXX by YYY pixels
- code KKKXXXYYY loads "KKK.kbl" and resizes to XXX by YYY pixels
- hide unless mouse over (only show corners)

CouchDB connector: TCouchDBConnection

2015-12-03 07:43  TCouchDB  delphi freeware  [permalink]

After creating my own wrapper around ADO with the least possible of extra's, but with the most ease-of-use I could get; I tried the same for mongoDBthen Redis; then RethinkDB, but first had to tackle protocol buffers, but in the mean time both advanced to a new version and RethinkDB dropped protocol buffers, so I dropped my RethinkDB connector and put both on the to-do list again.

So now I thought I'd look into CouchDB, it's all HTTP so it should be easy enough. The point is you connect to your CouchDB instance on an address and port that's not publicly accessible, so a full-fledged HTTP library would be too much (though it's still highly recommended nowadays to use TLS over internal connections as well, but that's on the roadmap for xxmHttp). For handling JSON I can re-use what I created for TMongoWire: jsonDoc. So there it is. For now it offers a basic call to exchange JSON with the server, but this should be enough to unlock the main features CouchDB has to offer.

→ github.com/stijnsanders/TCouchDB

tx

2015-10-16 22:24  tx  delphi freeware  [permalink]

tx started as a tool to keep track of things. From there it evolved into a new take on data, categorisation, oversight, structure, registration, evaluation...

To complete the configuration, set up a multi-user environment or tweak the project to your needs, it's advised to install and build from the source code.
To get started quickly with default configurations, download and install this easy installer. It has tx and xxm combined into a single executable (that conveniently launches the URL in the default browser at start-up), and a minimal database to get you started. Read more about configuring tx here.

txLocalOnlySetup.exe (~1.7MB)

jsonDoc: JSON object for Delphi based on IUnknown and OleVariant

2015-06-26 21:21  jsonDoc  coding delphi freeware  [permalink]

I was using bsonDoc.pas and bsonUtils.pas from the TMongoWire project in several projects that didn't have anything to do with MongoDB, so I thought this one deserved a repository of its own:

https://github.com/stijnsanders/jsonDoc#jsondoc 

 

Archive... Search...