Showing posts with label libre software. Show all posts
Showing posts with label libre software. Show all posts

Monday, August 10, 2026

Unlimited Lock-free Online Looped Water Distribution Network Modeling with EPANET solver

I added a looped water supply pipe network modeling application to my FLOSS (GPL = totally unchained to say "I love you") suite of online engineering calculators that allow multiple units selections and serve multiple languages (recently expanded to 26 for coverage focus in the developing world). It includes a "use EPANET solver" option. Here are some introductory walk-throughs for new shoppers, new users, and new projects. I also put it up at LibreWaterNet.org in hopes of starting a foundation or donating it and my time to an existing org like Open Water Foundation.

Tuesday, January 3, 2012

MaTireLire Palm OS Budget Manager Yearly Database Pruning


I have been a happy and loyal user since 2010 of MaTireLire (French for MyPiggyBank), the free and open source personal accounting software for Palm OS. It makes budgeting and balancing my checkbook easy and fun, and I love its cute little piggy bank icon. It's hard to convey just how wonderful this program is. I will gladly at any moment get a used Handspring Visor Deluxe or a Palm for $20 to $60 just so I can carry MaTireLire in my pocket everywhere I go.

To manage my budgets, I just make a negative "account" for each budget and a positive account each for the real money (checking and cash) accounts. As long as all the "accounts" (the negative budgets and the positive real money) add up to zero and none of the budgets go into the positive (unbudgeted!) territory or the real money into the negative (broke!) territory, I'm budgeted and solvent. (Tip: if a budget goes into positive territory, but your real money is far from negative, don't panic. It just means you need to rob another budget to get that budget back below zero.) And after (at the moment or at home with my receipts) I spend money, I just assign (link) all expenditures and receipts to a budget. Other than a few other procedural nuances I've developed to deal with special situations like pre-budget money (taxes, savings), that's all I do.

The database (Tom's household, for example) summary page gives me an instant glance at my budgets any time I wonder, keeping me always out of trouble.

Over the course of a year, the transactions accumulate, and MaTireLire starts to slow down. At the end of the year, here's what I do to prune the data.

1. Clone the database. Set up the new names (Tom 2011, Tom 2012, etc.) and whether each database is launchable from its own Palm OS home screen icon.

2. Perform a soft reset on your device to rebuild the home screen icons.

3. Purge the cleared transactions from all accounts (like checking) where you are using "clearing".


4. Delete all transactions from all other accounts, and set their initial balances to match the ending balances of the original database.

That's it. Happy New Year.

Tip: You can track unrelated accounts (like savings) in your main database without affecting the bottom line. 1. Tap (to select) the balances of a group of accounts. 2. At the upper right corner of the database summary screen, choose to add up only "Selected" or "Not Selected" instead of "All" .

Saturday, February 12, 2011

Extracting time from date in OpenOffice/LibreOffice Calc

If I have a spreadsheet cell that contains a date and time, formatted to display according to my preferences--say something like "Saturday, February 12, 2011 11:41:32", I can extract the time portion of that date for use in another cell. The secret to accomplishing this is understanding that date-times in OpenOffice Calc are stored as real numbers like this: "40586.4877". The integer part of the serial number is the number of days since 30 December 1899 (by default), and the decimal part is the fraction of the day that corresponds to the time. So I simply use a math function to extract the fraction, then format it as a time.

Like this:

=mod(A1,1)

The mod function simply is a remainder function. It gives the remainder (remember remainders from elementary school?) that results from dividing the number in A1 by 1. For example, 234.56 divided by 1 equals 234 with a remainder of 0.56. So mod(234.56,1) equals 0.56. And that's how our solution works. Happy calculating. :-)

Tuesday, April 7, 2009

AutoCAD customization -- Search to replace Autolisp with Java or Python or such

I'm fluent in AutoLISP, and I have used it since the early '90s to customize AutoCAD. I sell custom tools, and people tell me my customizations have made a huge difference in their AutoCAD productivity. More recently I have been converted and have done several Software Libre projects using AutoLISP.

But I have not branched out much beyond basic AutoLISP. My tools include a couple of Visual Basic for Applications (VBA) forms (a GPL help tip form and a file list creator I still need to release under the GPL) I programmed a few years ago. I have dabbled here and there (but only recently begun to be conversant) in Dialog Control Language (DCL). And I have generally shied away from the "newer" Visual Lisp functions. But I now am seeing that those functions, and the Object Model they give AutoLISP the ability to access, are the window to a new world of possibilities, because the very same Object Model they control can be controlled by more popular and broadly useful (and Open Source) languages like Java and Python.

As a Software Libre (hypocritical) true believer, using broader languages is increasingly important and practical to me. It's important because I desire to be platform agnostic, which isn't well served by my programming only in AUTOlisp. It's practical because potential programming partners--fellow Software Libre believers--are not super likely to prefer a proprietary language like AutoLISP.

So I have been at the same time both exploring the AutoCAD and Civil3D Object Model and exploring how to program it with Java or Python (I recently made the acquaintance of civil programmer Darren Waschow who turned me on again to using Python for Turning Path Tracker) . I don't know either of those languages, but I can learn them. After seeing today this Python & Java: Side by Side Comparison and noting how friendly and AutoLISP-like Python is, I am definitely leaning toward Python. And to my delight, I found this explanation from Tim Riley on Automating AutoCAD with Python and COM, of which I will post a snippet here:

Riley says all you need for this to work (besides AutoCAD) is Python 2.4 and the win32all package. You can get both of these from ActiveState’s ActivePython product.

import win32com.client
acad = win32com.client.Dispatch("AutoCAD.Application")
doc = acad.ActiveDocument
doc.Utility.Prompt("Hello from Python\n")


Wow, Riley! That's extremely simple. And that's all it takes apparently (haven't tried yet) to control AutoCAD with Python.

Now, as for Java, I'm not so close yet, and to tell the truth, I am waning on the prospect, but I believe it would be done in 2009 using Jawin. I haven't found any examples specific to AutoCAD, but I believe this PowerPoint example is on the right track. Not as pretty as Python!


try {
Ole32.CoInitialize();
DispatchPtr app = new DispatchPtr("new:PowerPoint.Application");
app.put("Visible", true);
DispatchPtr preses = app.getObject("Presentations");
DispatchPtr pres = (DispatchPtr) preses.invoke("add", -1);
DispatchPtr slides = pres.getObject("Slides");
DispatchPtr slide = (DispatchPtr) slides.invoke("Add", 1, 2);
DispatchPtr shapes = slide.getObject("Shapes");
DispatchPtr shape = (DispatchPtr) shapes.invoke("Item", 1);
DispatchPtr frame = shape.getObject("TextFrame");
DispatchPtr range = frame.getObject("TextRange");
range.put("Text", "Using Jawin to call COM objects");
Ole32.CoUninitialize();
}
catch (Exception e) {
e.printStackTrace();
}


Next, see my successful connection to AutoCAD with Python in Part 2.

Monday, March 9, 2009

Free Libre Music Notation Software Search Part 2

In Part 1 I introduced my search to upgrade from Melody Assistant to FLOSS, and I listed the main FLOSS Music notation software I found, together with the operating systems they run on. Since then I have installed the following:
  • Lilypond in Windows XP
  • MuseScore 0.9.4 in Windows XP
  • Denemo in Windows XP (0.8.2) and Ubuntu Linux 8.10 (Denemo includes Lilypond since it is a Lilypond GUI front end.)
  • Canorus 0.5 in Windows XP
My hope was to take a song I had entered into Melody Assistant (which I really have enjoyed over the years) and somehow pipe it through as many programs as required to come out the other end unharmed and ready to print. Alas, it was not that easy. The song did not yet have lyrics. It was a barbershop quartet song in four voices on two staffs (Youtube video here). Melody Assistant had trouble directing stem, note-head, accidental, and other mark traffic between the two voices on each staff, and it seemed to me I would be forever fine-tuning spacing if I didn't upgrade. This is what it looked like in Melody Assistant.





First Canorus 0.5. Canorus and I never did hit it off very well. The interface is pretty and inviting enough. It may be a great piece of software now or soon. But the task at hand was all about data transfer, and Canorus does not yet have any Import capabilities to speak of. Also, I was pre-conditioned by my reasearch to expectslow development from Canorus (though I see 0.7 was released March 10). Also on the bad side, Canorus file dialogs don't work properly with the Windows My Documents folder. I do like the promise of close interface with Lilypond including raw data file editing.

Second Denemo. My Ubuntu version was not as advanced as my Windows version 0.8.2. (Why do I experience this often with Ubuntu?). From the start, identical with Canorus, the file dialogs don't work right with Windows. The midi file from Melody Assistant did import, but not as well as with MuseScore 0.9.4. View scrolling didn't work well. It wasn't apparent how to get the midi playback to work in either Windows or Ubuntu Linux. I didn't go far with Denemo.

I finished my task with MuseScore 0.9.4. The midi file came in on four separate staffs, which I was not able (even with forum help) to combine into two. I had to re-enter two of the voices. In the process, I fell in love with the MuseScore entry keys. QWERTY A, B, C, D, E, F, and G enter notes, with MuseScore guessing the octave and CTRL+UP or CTRL+DOWN correcting octave mistakes. 10-key (or other) numbers and dot select note durations. S adds a slur, and + adds a tie, with SHIFT+RIGHT extending them further. With slight conditioning, I was moving right along in my note entry at a speed I never attained with Melody Assistant. I had wondered about their choice of keys (which I understand are customizable), but I ended up sold. Muse Score spaced all notes well before and after I added lyrics. It flipped stems well when I added the Lead part below the Tenor part on the Octava bassa (Treble) staff. Due to a strange glitch it didn't flip them when I added the Bass part below the Baritone part, so I had to flip the stem for each note or beam set individually using the "x" key and the arrow keys to advance. The final printed score looks great. I had to manually shorten only two beam sets due to conflicts with the lyrics, and it was a simple matter of double-clicking the beam to do this. I was disappointed with Muse Score's export to Lilypond. The lyrics didn't survive. Nor did the stem directions for the two-voiced staves. But Muse Score's native printing is admirable and sufficient for my present need. This (other than a MuseScore PNG export glitch) is what it looked like from MuseScore.





I will probably remember to try all three (Denemo, Lilypond, and Canorus) next time I have a task. And if I am in Linux more regularly at that time, I will also try Rosegarden.

If the developers are listening, my parting message to them this time is, "It's the data, buddy!" We want not only Libre software, but Libre Data. Please put emphasis on accurate imports and exports with Lilypond, MusicXML, and midi, or whatever you know is best (I don't). We write music to communicate, to share. Please let us do that by freeing your data.

Update March 21, 2009: MuseScore (not Muse Score or Musescore) appears to be the correct "brand" name.

Update March 18, 2018: MuseScore is what I have been using all the time.

Sunday, March 1, 2009

Free Libre Music Notation Software Search

I'm looking to start using Free Libre Open Source Software (FLOSS) for my occasional music notation and midi creation. I bought Myriad's Melody Assistant ages ago and have used it pretty happily, but I now have a piece I would like to print with a little higher quality notation, so I'd like to upgrade to Myriad's Harmony Assistant or go some other way. I have Linux up and running, but at the moment, Windows is still more convenient for me.

Here's my summary that's perhaps more up to date and contributes in some way beyond Dave Phillips's Feb 2008 summary.

I'm looking into:
  • Lilypond (Linux/Win). The standard music engraver. But I don't want to write text files directly. I want a GUI with audio playback. All the GUI packages export for Lilypad.
  • Denemo (Linux/Win). Front end GUI for Lilypond, but not very popular.
  • Noteedit (Linux only). Dead project, but still very popular.
  • Rosegarden (Linux only ). Widely used.
  • Canorus (Linux/Win). A successor to Noteedit. People have high hopes, but slow development.
  • Musescore (Linux/Win/Mac). Very new. Lot of excitement. Mac version not incorporated into main branch yet.
  • Nted (Linux only). A successor from the founder of Noteedit.
I downloaded Lilypond and Musescore to a WinXP machine so far, and I hope to post again when I have some further results.

See Part 2

Sunday, May 25, 2008

I am amazed and grateful for my escape

I'm not sure why I am here tonight, and I am not sure where this will end up. I am not trying to produce a polished piece, but lately I have felt a resurgent desire to have the blessings of journaling. And lying in bed tonight praying, I was overwhelmed with some feelings I'll go ahead and express here without any apology or regard for modesty. They are mine in all their unreserved humanity.

I came out from the Father for some great purpose. And I wish to fulfill that purpose.

Whew! How can it be that I have escaped the entanglements of this world? How can it be that I have seen and felt and known? My skin is saved! The jaws of the trap slammed shut millimeters from my escape!

I lived to 37 years earnestly desiring to know of the things of eternity. I am sure I was and am largely a slacker, a jerk, a tyrant, and a snob. "But somewhere in that wicked, miserable past, there must have been a moment of truth." For in my time of crisis, when blaming the world would no longer do, when I begged Heaven scramble and re-mold me for good, rob me of my dearly beloved lies, and show me the scary truth, God showed me a whole new and glorious reality.

I had many excuses and arguments why I must be entangled in the world. I could have continued like that until the days of my time in the world were used up. I could have been taken before I made this greater escape. And I suppose it would have been well. My time would not have been in vain. But having seen, felt, and known unspeakable things, I feel to shout Hallelujah now. And I live daily in anticipation of what discovery and escape for me is around the next corner.

But somehow this single escape was central. I will continue learning of my quirks and how to better relate to and love my neighbor. And in that sense I will continue escaping my limitations. But it was in this central escape that I joined the host of souls whose hearts turn in a blinding and glorious miracle from the deceitfulness of riches and the cares of the world to the treasure of heaven. I joined the host who would hope to lay down their own life rather than shed the blood of a brother. And I became the brother of mankind, unable any more to keep wearing the blinders that allow me to put self ahead of household and household ahead of global neighbor.

I thank Thee, O God, for remembering me and for leading me along through this life. I thank thee for revealing to me the simple and peaceful way. I thank thee that I have, as I suppose, another so many years to live here. And I ask thee to bless me to turn to thee that I may glorify thee and bring delight and salvation to my own soul and those of my household, people, faith house, and community. Amen.

Thursday, March 6, 2008

The Judgement of God

A correspondent reminded me of these Bible attributions to God:
  • In the Garden, 'do not eat of that tree or you will die.'
  • At the Flood, 'repent or you will die.'
  • To the Pharaoh, 'let my people go or your children will die.'
  • To the Israelite gathering wood, 'do not work on the Sabbath or you will die.'
  • To the gathered Israelites, 'do not go up the mountain or you will die.'
  • To Korah, 'you have provoked me, the earth shall open and you will die.'
  • To the Israelites, 'do not worship idols, for I am jealous and you will be taken into captivity.'
  • To the Israelites in the Law, 'do not commit adultery or you will die.'
Here's my view:

Karma or the Law of the Harvest is real. If I live prodigally I will suffer the realization in heaven, and I will shrink from the presence of the Holy One. But the Holy One himself won't be goading me or closing the door on me.

A PERSONAL STORY


When I was 19 I entered the LDS missionary training center with a large cohort of new missionaries. Entrance day was full of a lot of cattle processing lines and inspectors and forms, like Ellis Island, the military, or any people processing operation. As I moved down a long table I suddenly came in front of a man who looked up at me and said, "¿Habla usted español?" (Do you speak Spanish?)

I answered, "Sí", or "Sí, un poco."

He replied, "¿Dónde lo aprendió?" (Where did you learn it?)

"En la escuela," (In school) I said.

That was it. That was the test. Unannounced and reality-graded. After those two questions, he informed me I would be placed in the short program without language training. I'd be in the center for two weeks instead of eight. If I had been flustered by the questions or asked, "Huh?" he simply would have sent me on down the line.

I picture the eternal judgement (or our daily judgement as parents and ministers) as such an occasion. Our preparation and being can't be faked in those moments of truth. It is self-evident. And that is what we should fear. That is the righteous fear. I fear only myself, that I will yell or grab or be fierce with my children. Or that I will shrink from the glory of the Father. As some Near Death Experiencers say, "The brightness increased and increased. I thought, 'This is going to kill me!' Then it stopped." But others say, "The brightness increased and increased. Then I was one with the giver of life. I will never forget that moment, that eternity."