Tuesday, February 14, 2017

A strange day in Hawai'i...

A strange day in Hawai'i...  Well, after a meal of delicious “local style” Ahi poke, we drove up to Volcanoes National Park as planned, but things went a little differently than expected.  On the plus side, I paid $10 to get a lifetime pass that gives Debbie and I (and anyone else we can stuff in our car) free entrance to any federal facility (meaning National Parks, National Forest, etc.).  I qualified for that by being over 62 years old and being a U.S. citizen. That was good!

On the other hand, when we entered the park with our new pass, we found the entrances to the visitor center and art center blocked by police cars and policemen wearing gas masks.  Seriously!  Kilauea Crater is venting lots of fumes, and the trade winds are blowing them to the southwest – right where the visitor center and art center are.  They're closed until the fumes go away, which might be never.  Worse, the park was just overrunning with tourists.  We saw ten or so gigantic tour buses, many more smaller tour vehicles, and hundreds of cars.  Most of these people were making the most superficial tour of those features the National Park Service deigned to mark.  Most of them looked bored and unhappy.  Any wildlife that might have been there would have retreated to positions a few miles away.  We skedaddled – this was not our kind of scene!

So we decided to try driving up the Mauna Loa road, which takes you to about 9000' on the east flank of the volcano.  That road we've been on many times in the past; it winds through the most beautiful koa forests I know of, through several kipukas, and through some spectacular old lava flows.  We saw some interesting things along the way.  Mamane were in bloom all over the place (the yellow flowers in the photos below) between about 7,000' and 9,000' altitude – more than I've ever seen before, so we must have timed our visit perfectly.  We saw about ten Erkle's Francolins and a half dozen Kalij pheasants, both introduced (non-native) game birds.  These birds were almost fearless – they'd let us to within a few feet of them before sidling away.  I was even able to get some iPhone photos of them.

The next-to-last photo is a Mauna Kea silversword, a rare and endangered species planted by biologists near the summit of Mauna Loa road.  A short trail from the parking lot leads to a place where some silversword plants are living in a roped off area just a few feet from the trail.  This is new since our last trip here, and I don't know what the backstory is – but I'm guessing that it's related to success in cultivation. 

The last photo is a koa seedling, a baby koa if you will.  This seedling has both the juvenile leaves (the tiny ones growing in two rows) and some adult “leaves” (though they're not really leaves at all, as the linked article explains).  The first time I saw these half-and-half plants I was really puzzled, but on a trip here with my dad I got the explanation from him.  Apparently this is quite a common occurrence amongst members of the pea family, which the koa is.


After getting back down from the Mauna Loa road, Debbie pointed out that restaurants were likely to be crowded tonight (Valentine's Day), and besides she was tired and really just wanted some more of that delicious poke.  I'd be a poor excuse for a husband if I wouldn't indulge her in some more poke for Valentine's Day, wouldn't I?  So off we went, back down to the KTA in Hilo to buy some more poke.  It was a close call, though: the woman in front of us in the poke line bought nearly all the remaining of the “local style” ahi poke (which is the one Debbie wanted).  Luckily there was just barely a pound left when she got done, and we left with our poke and a nice bottle of champagne.  We'll be eating and drinking that soon!

The view out our window...

The view out our window ... this morning, at Cottage 44 in Hale Ohia.  We spent the morning down in Hilo, gathering essentials (coffee, tea, poke, wine, etc.).  Next stop: Volcanoes National Park, where I will buy my senior citizen pass. :(

Poke, if you don't know it, is a delightful sort of fish salad.  It's made with raw sushi-grade fish.  That fish is very abundant here, as there is a good-sized fishing industry based in Hilo.  The local grocery store (KTA) carries about 20 varieties of poke on any given day, most of it selling for around $15/pound.  That is an absurdly low price for something that closely resembles very good sushi.  We bought a pound of it this morning, and we've already eaten half of it! :)

Made it!

Made it!  We are in Hawai'i, on the Big Island.  It was a long travel day yesterday - we got up at 5 am Utah time, and got into our cottage at Hale Ohia at about 3:30 am Utah time (12:30 am local time).  Yikes!  On the good side: absolutely nothing went wrong.  The rental car folks were there after hours, as arranged and promised.  The cottage folks had all the arrangements done for us, even though we arrived long after their closing time.  And after some sleep, the two of us are ready to drive down to Hilo to do some stocking up for our visit.  We'll have a good meal, too, and then come back to visit the Volcano Art Center in the National Park, and pick up our pass...

Sunday, February 12, 2017

And visions of unums danced in his head...

And visions of unums danced in his head...  Over the years, I've posted here on several occasions here about my various battles with numeric representation in computers.  There are lots of specific problems I've run into, but I believe they all fall into one of just four general categories:
  • Programmer ignorance.  Up to about 15 years ago, this generally meant ignorance of how floating point numbers actually worked in a computer.  More recently, I'd have to add widespread ignorance about how even integers are actually represented (most especially two's complement representation, and underflow/overflow).
  • Trying to represent fractional decimal numbers in binary floating point, especially for money.
  • Performance issues, especially with conversions to-and-from strings.  To a much lesser extent, actual math operation performance, especially with divides.
  • Insufficient precision, usually the result of a poor choice in early design phases.  You might be thinking I mean single-precision floating point vs. double-precision floating point, but actually the most common issue I've run into is use of a low precision integer (say, 16 bit instead of a 32 or 64 bit), especially with overflow on a multiply.
I have spent hundreds of hours over the years learning for myself about these issues, implementing solutions and workarounds for them, fixing existing issues, and (more than anything else) teaching other engineers about them.  It's a topic near and dear to my geekly heart.  So, when I read an intriguing little headline the other day, I just had to go check it out.  There's a fellow named Dr. John Gustafson who has proposed an entirely new floating point numeric representation with the objective of eliminating at least some of these problems.  As best I can tell from the bit of reading I've done so far, it would deal handily with the first and last bullets above.  I'm reading more, in the hopes that he's also going to tackle the other two.

The core proposal he's got is for something he calls unums (short for Universal Number) – a new way to represent numbers (real or integer) in a computer.  If that name's not sufficiently grand for you, his book about the first version of unums is called “The End of Error” – that ought to do it!  I've purchased that book and I'm about fifty pages in at the moment.  My first comment has nothing to do with the subject matter, but rather with the style: this is one of the most readable and understandable books on a computer science topic that I've ever read (and I've read quite a few :).  Hats off and a bow to Dr. Gustafson for that!

I know from the web reading that I've done that Dr. Gustafson has proposed a quite different “unum 2.0” from what's described in his book (and what he now calls “unum 1.0”.  I'm going to read the book first, and get a good understanding of unum 1.0 before I tackle 2.0.

If unums look like they really would be as revolutionary as Dr. Gustafson would have them, they're going to need rather a lot of work to be done before they can be widely used.  For many applications (though not, I think, for business applications), hardware implementations will be a must.  He's already working with Intel on this idea, and there's no better way to make hardware happen.  There will also need to be implementations in language compilers/interpreters.  That will be a major challenge!  Just as with IEEE floating point, the compilers will have to work with or without hardware support.  There will be performance issues to worry about.  There will be legions of programmers to educate.  And so on.

If I get done with my reading and conclude that Dr. Gustafson has something worthwhile here, I'm going to consider volunteering to help with the Java implementations.  That could be a lot of fun!

Saturday, February 11, 2017

Paradise ponders...

Paradise ponders...  Well, we're almost packed for our Hawai'i trip – just have some last minute packing of electronics tomorrow night, and a tiny bit on Monday morning.  Then we're outta here.  A friend is driving us to Salt Lake City, where we'll catch a flight to San Francisco.  There we'll wait for 5 hours before catching our flight to Kona, on the west coast of the Big Island of Hawai'i.  There we'll pick up our rental 4x4, and make the long drive (about two and a half hours) all the way around the island to Volcano Village.  It will be about 11:30 pm (local time), or 2:30 am (Utah time) by the time we get there.  A long day, that will be!

Yesterday we took our friends and neighbors Tim and Jeannie D. out to lunch at Los Primos, where they'd never been before.  Both of them have lived near here their entire life, and for them the menus of Mexican restaurants are deep mysteries that are filled with terrifying things like “pollo” and “refried beans”.  We interpreted for them. :)  Tim, who likes spicy foods, ordered a pollo burrito mojado.  We had warned him of their immense size, but he figured he could take half of it home.  His first few bites had him reeling a bit from the spiciness level, but after a bit he started shoveling in a rhythm – until he finished the entire thing.  Jeannie and Debbie both ordered carne asada plates, and Jeannie made happy noises the whole time she was stuffing her face.  Both of them liked the relative quiet of the restaurant; it's entirely possible to have conversation while you're eating there.  Much fun for us to introduce them to one of our favorite haunts!  Plus they got to ride in the Tesla.  When I accelerated relatively gently out of their driveway, they both commented about the pickup - but when I stomped the accelerator a bit later, both of them were pretty amazed. :)  But from their reactions, clearly what impressed them the most were the falcon wing doors.  Tim cackled in delight when his door neatly avoided the car next to us as it opened...

Melotte 15...

Melotte 15 ... via APOD, of course.  Those are false colors, of course – but 'tis beautiful nonetheless...

Jupiter from below...

Jupiter from below...  “Below” here means above Jupiter's south pole.  This image was created by a “citizen scientist” using camera data from the Juno robotic explorer that NASA made publicly available (more here).

Friday, February 10, 2017

Botany Photo of the Day is back!

Botany Photo of the Day is back!  After a hiatus of over a year, this daily email with beautiful photos linked is back!  Hooray!  At right is one of the photos from today's email (click to embiggen), a plant I've seen often in some of the areas that Debbie and I love the best.  This photo looks like it was taken in northern Arizona or southern Utah – our stomping grounds!

If you like what you see here, you can subscribe to it yourself (it's free) by filling out the form on the left side of the page linked above...

How on earth does Scott Adams do it?

How on earth does Scott Adams do it?  Today's cartoon (below) captures perfectly one of my main complaints about the current engineering management fad, which goes by the moniker “agile”.  When I was subject to those agile processes, in the last year or so before I retired, I experienced interruptions to my work flow such as I had never had before.  It finally got to the point where I told my boss that I was going to work from home, cell phone off, not watching email or the oh-so-interrupty messaging application the engineering team used.  If he didn't like it, that was fine – I'd happily quit.  He caved and let me work from home most of the time.  My productivity skyrocketed once I was (mostly) out of that “agile” loop!

If I had any talent in any of the areas necessary for a Dilbert-like cartoon, you'd easily understand how I could come up with something like this.  But Scott Adams has been independent of any technology job for a long time, since long before the agile methodology was even a gleam in its cursed father's eye.  How does he manage to do this?  I have no idea; I just stand in awe...


I'm ancient enough that I can remember a half dozen or so engineering management fads that came and went, from the late '70s up until my retirement in 2013.  All of them shared some “features”:
  • Lots of work for the managers at every level.  This looked impressive to upper management, convincing them that something good was happening.
  • Produced numerous reports purporting to track progress and predict development completion.  In reality all of those reports were bullshit with varying degrees of stench.
  • Reduced the productivity of all the most productive engineers, and encouraged them to leave.
  • Encouraged the other engineers to value process over skill, experience, or knowledge.
  • Produced managers with all the fervor of psychotic badgers, but without the attractive personality.  Somehow these managers tended to rise in the ranks, exacerbating all the other bad effects of the current fad.
  • Fizzled out after enough time passed that even the least-aware upper management folks understand that it didn't work.
The joking response to this would be to encourage anarchy in small engineering teams, and get rid of all these engineering process schemes.  The thing is ... I'm not at all sure that's a bad idea.  In fact, it's more-or-less the situation at every startup I've ever been associated with – and they were definitely the most productive engineering teams I know of.

In other words, engineering process may well be a Communist plot!

Thursday, February 9, 2017

Model X update...

Model X update...  I took the photo at right just a couple minutes ago.  We've got fog here, the temperature is in the low 40s, it's raining intermittently, and the snow on the ground is melting at a prodigious rate.  We're forecast to get about an inch more rain between now and Saturday night; the snow may be completely gone by then.  That will be an amazing transformation!

I forgot to mention in my earlier post that we actually did have a chance to try out the auto-steer feature.  On one of our trips back from SLC, we were on I-15 in rush hour traffic.  For about three miles we were going slower than 45 MPH – so I engaged the auto-steer to see what would happen.  Bottom line: it worked just fine.  It wasn't very exciting; we were simply lane-keeping and the adaptive cruise control kept us at a safe distance behind the car in front of us.

One thing we've noticed (whether or not auto-steer is engaged) is that where there's a traffic sign that arches across the entire freeway the adaptive cruise control seems to be fooled.  Most of the time we just feel a brief deceleration as we approach the sign, then it picks up speed again right afterwards.  Sometimes, however, the car seems to think that a collision is imminent – the crash alarm starts sounding and the brakes are slammed on.  This always happens when it's far too late to actually stop before the sign, so what happens is we slow down abruptly, sometimes by 30 or 40 MPH, and then we pass the sign.  Once past the sign, the alarm goes off and we speed back up.  The first few times that happened it was quite disconcerting, as I had no idea what was causing it.  After a while I put the pattern of the signs together, so now I'm on the lookout for it.

I've also learned a bit more about how the adaptive cruise control works.  It uses forward-looking sensors to “see” the cars in front of us.  I know the car has radar, cameras, and ultrasonic sensors looking forward.  I know (from reading) that the radar is involved with the adaptive cruise control; I'm not sure about the cameras or ultrasonic sensors.  Anyway, what I've discovered is that the car the system is “looking” at is always the car directly in front of my car.  That's not always ideal.  Consider the case where there are two lanes of traffic going in each direction, and the road is turning to the left.  If I'm in the left lane, a car that's ahead of me in the right lane might be directly in front of my car.  In that case, if the other car is going more slowly than I am, the adaptive cruise control will slow me down – even though my lane is completely clear ahead of me.  That tells me that the adaptive cruise control has no sense of the layout of the road, despite having an excellent map available to it, and a vision system that is clearly tracking where my lane is (I know this because it shows the results on my dashboard!).  The left hand of their driving automation doesn't appear to know what the right hand is doing. :)  Hopefully they'll fix this one of these fine days...

Paradise ponders, surprises and hectic days edition...

Paradise ponders, surprises and hectic days edition...  I can't believe I missed two sequential days of posting.  I can't remember the last time that happened...

Nothing bad happened, but there was sure a lot of stuff that did! 

Debbie and I both got colds on Sunday, but I recovered within 24 hours and she's still miserable.  The poor girl is on the tail end of the current cold, where her pattern is to cough and cough and cough.  Ugh...

Monday we made a surprise trip down to SLC, for Debbie to get an injection.  This was for another drug (Prolia) to help with her osteoporosis.   A new drug means a new battle with the insurance company – they don't want to cover it, and her doctor insists that its the only one that will help her.  Her doctor says the insurance company's recommendation (which, of course, is much less expensive) is completely inappropriate for her.  So we're paying out of pocket, and the doctor is going to battle for us.  This tension between our healthcare provider and our insurer is becoming a pattern, and I'm afraid it may be the new norm.  We're not too happy about that, especially when we're paying an absurd amount for our health insurance premium, relative to the benefits being received.

I took my Tesla Model X down the service facility on Tuesday, as planned.  The problem with the spoiler they replicated immediately.  The first thing they tried was to “recalibrate” the spoiler.  After some discussion with the techs, I confirmed that what that meant was to recalibrate the position sensor for the spoiler.  Once they finished with that, the spoiler worked great!  But once I got the car home on Tuesday night, it again didn't work.  Tesla is still working on an answer for me on that.  The mirror problem that I thought I had turns out to just be my el stupido: The mirror wasn't dark, it was the rear window that I look through.  It is, in fact, tinted very dark – so even when the mirror is not darkened, it looks like it is.  Well, to me, anyway.  The techs there told me that nobody had ever complained about that before.  Oh, well.

That evening I met up with an old friend, Doug W., and his wife Dee.  We had dinner at the Red Iguana.  My entree is in the photo at right: a grilled chicken breast smothered in tomatillo sauce, with roasted (and seeded) jalapenos and some grilled shrimp.  Lovely, it was (both the company and the food)!

Yesterday Debbie had a hair appointment, which in her priority scheme ranks just behind life-saving emergency medical treatment.  Ordinarily she would drive herself down to Ogden (where her stylist has her offices), but because of her cold she's been getting very little sleep.  I didn't want to let her drive in that condition, so I drover her down and waited while she got her hair done.  That took five hours out of my day, so I got little else done.  But we did both get back here safely. :)  Also, we had a fine meal at Maddox, where I learned something interesting while reading a poster about their founder: he lived in Paradise until his early 20s!  I had no idea...

Today I'm concentrating on getting ready for our upcoming trip to Hawai'i.  We leave on Monday, bright and early, and we return on the 28th.  We're staying at our favorite bed and breakfast in the islands: the Hale Ohia Cottages, just outside of Volcano Village.  We've been there about eight or nine times over the past 25 years or so, but it's been about 12 years since our last visit.  We can hardly wait to be there again!  We'll be in Cottage 44; if you happen to be in the area, stop in and say hi!  They have WiFi there, and we'll have our laptop, so you can expect some posts and photos from there...

Monday, February 6, 2017

Yet another dichotomy...

Yet another dichotomy...  After an email conversation with a couple of friends, I've learned that the world of free electronic design automation (EDA) is mainly divided into two highly polarized camps: those who like Eagle, and those who like KiCad.  Years ago I had some very unhappy dealings with AutoCAD (who owns Eagle), and KiCad is a CERN project – so for me the choice was easy.  I'm now a KiCad guy! :)

After downloading it, getting completely flubberblated, reading some tutorials, cursing whoever it was that designed their user interface, gradually coming to understand that the OSX version is way behind, I finally managed to actually create a schematic.  This is the touch sensor part of the mud room switch project I posted about yesterday.  I'll keep publishing these in sections, as I build and test them.  This part works just fine.  Vcc, BTW, is 5 volts.

In all the years that I've been building electronics projects, I've never before used a schematic capture program (or EDA of any kind, unless you count circuit simulators).  The closest I've ever come is using Visio with a component outline library.  That's really just a drawing assistant; it doesn't “know” anything about the circuit.  KiCad, on the other hand, can generate net lists (for SPICE, for example) and directly generate the artwork for printed circuit boards.  Most of the (eighty bazillion) online prototype PCB houses will directly take KiCad (or Eagle) files, so presumably it would be pretty darned simple to get boards made for homebrew projects.  One of these days I might actually try that, but this is not that day. :)

If anybody actually wants this schematic, I'd be happy to share it.  It would make more sense to wait until I've actually finished, though!

Sunday, February 5, 2017

Some electronics fun...

Some electronics fun...  The photo at right (taken with my iPhone peering through a 2x magnifier) shows the current state of one of my projects (I have lots of projects!).  This is the beginning of a touch-activated switch that will go onto the new cabinetry being built for our new mud room.  The cabinetry will hide a three-way light switch for the mud room lights.  This project will let one of the cabinet's knobs take the place of that switch, by toggling the state of a relay each time the knob is briefly touched while the cabinet door is closed.

The stuff you see there is the regulated 5V power supply for the electronics, plus the touch sensor.  The little wire visible coming out from under the top of the vector board will connect to the knob.  The blue 20-turn potentiometer adjusts the sensitivity of the circuit.  The funny thing with a white cap below the potentiometer is a switch, for resetting the touch sensor chip if it gets stuck.  The chip is the tiny little black rectangle with six leads just above that blue potentiometer.  It's the smallest component of all – smaller than the quarter-watt resistors and absolutely dwarfed by the 0.47 microfarad capacitor (the green monster on the right side).

It's kind of mind-boggling for this old fart just how small this stuff has gotten.  I can still remember (not very fondly, actually) when I did all my electronic construction using lug strips and point-to-point wiring, most resistors I used were huge 5 or 10 watt things, and the active components were vacuum tubes with sockets an inch or more in diameter.  Things sure have gotten much smaller!

Much to my amazement, when I finished wiring all this stuff and fired it up, (a) there was no smoke in the air, and (b) it worked on the first try!

Model X update...

Model X update...  I just finished installing a software update.  This one promises to enable some more auto-driving functionality.  Though I read the release notes, it's still not entirely clear to me exactly what was just enabled.  Many of the release notes covered things that were released in the previous release, talking about them as though they were new.  Also, the same language is in there about “calibration” requiring potentially several days of driving before the features are actually enabled.  So ... all I really know is that I just installed an update.  I have no idea what it's going to do, or when. :)

Super bowl?

Super bowl?  Two readers emailed to ask why I haven't been commenting on the super bowl (or, as I like to call it, the “stupor bowl”) game that's happening today.  Obviously these two readers don't know me well.  For their benefit (as well as for my other readers who may not understand about me and sports):

I don't know anything about sports – I cannot even reliably identify which sport is being played in any particular game.  I don't know how the games are played, or what the rules are.  I don't watch or follow any sports.  I don't know the names of any sportsmen (or women).  I don't care about sports.  I don't have any favorite teams.  I don't “root” for any teams.  I don't even know the names of any teams.  I care about sports less than I care about the abundance of fleas in Irkutsk, less than Debbie cares about stray inductance in 5% carbon film resistors, but slightly more than I care about Hillary's career opportunities.

Just to be clear for the more obtuse: I will not be watching the super bowl game today.

Actually, the only reason I even knew it was today is because it showed up in the news that I read.

Saturday, February 4, 2017

More Milo...

More Milo ... this time on Tucker Carlson's show.  Again, excellent.

I just felt...

I just felt ... the strangest thing!  I walked from our house into our barn, about 50'.  I wasn't wearing a jacket or a hat.  It's nearly 50°F out, and the sun was out.  I felt the warm sun on my head – what an odd feeling, after a couple months of winter!

If you've ever done any electronic logic design...

If you've ever done any electronic logic design ... then most likely you already know that ROMs can be used to replace any collection of logic gates.  In effect they can be thought of as extremely simple FPLAs.  For instance, a 4kb ROM has 12 address lines and 8 data lines – which you can think of as 12 logic inputs and 8 logic outputs, and the outputs can be programmed to be any function of those inputs.

If you've actually used ROMs as logic in practice, then you've probably also run across their main drawback: glitches in the outputs when an input changes.  If you're circuit is synchronized this isn't an issue, but for pure logic without synchronization, it is potentially a major problem.

So when I ran across a homebrew computer that claimed to be built entirely with ROMs, I was really curious how this might have been done.  About a third of the way into the web page, I ran across this:
Some observations have led me to assume that when the address input changes from a value A to a value B, even if the same value X is memorized in all the addresses in T(A,B), a transient state can appear on the data outputs during a few nano seconds. This transient phenomenon can be enough to “break” the storage loop. I worked around this problem by putting a 1nf capacitor on each data output of the EPROMs used to implements registers. This solution gives no guarantee of reproducibility. It could be improved by using resistor capacitor circuits in the storage loop instead of single capacitors. Without this hack, the computer crashes after running a few tens of thousands of instructions.
Well, that's about as hacky as you can get!  Basically he's using capacitors as a sort of low-pass filter to keep the transients from affecting his ROM logic.  One would never engineer something for production like that, as the necessary values for those capacitors would be affected by all sorts of things, from ambient temperature to which production run of ROMs was being used.

Still ... having a computer built entirely from logic implemented in ROMs is pretty cool! :)

Paradise ponders, outdoor liquid water edition...

Paradise ponders, outdoor liquid water edition...  Yesterday morning was cold and very foggy (see photos below).  It wasn't cold enough to form hoarfrost, though.  Later in the day the temperature rose above freezing – and it stayed there all last night and so far today.  This means that the snow and ice that's accumulated over the past month is starting to melt.  Even yesterday morning (when I took the photos below) most of the snow had slipped out of the trees, as you can see.  This morning there's no fog, and it's wet outside – from some light rain and (lots of!) melting snow and ice.  Our driveway has running water on it, something we haven't seen outside for quite a while now. :)


Animated circuit simulator...

Animated circuit simulator...  At right is a screenshot I took from an animated circuit simulator I ran across yesterday.  It's called EveryCircuit, and it runs on Chrome browsers, IOS devices (iPad, iPhone), and droids.  The circuit is a simple relay driver with a diode snubber, copying something I have in real life – which let me look at the actual circuit with an oscilloscope, and compare it to the simulation.  They were remarkably close, even with the component's values at the default setting.

I go looking for simulators every once in a while, hoping to find something a bit more interactive and usable than the bog-standard SPICE simulators.  Those feel to me like I'm using hand tools to build a house – I wanted a circular saw, dammit!  I've found some interactive simulators before, including (if memory serves) an earlier version of EveryCircuit.  They were so simple as to be nearly useless.  EveryCircuit is not.  It is not as complete or as sophisticated (by far) as a decent SPICE implementation – but it is complete enough to serve for the vast majority of my purposes.  It works remarkably well on the iPad, and despite the small screen of an iPhone it's passable there as well.

There's a very active online community with vast quantities of user-contributed circuits.  I did a search for “zero crossing” and got 16 results.  The quality varied from pathetic to quite good.

It's free to try (even on IOS or Android), but the trial comes with some severe limitations.  To buy it is a one-time purchase of $14.99, which is the least expensive commercial simulator I've ever run across.  It's now part of my electronics toolkit.  I'm sure I'll still bump up against its limitations now and then, and for all I know they'll go out of business some day – so I'll still keep a “real” SPICE implementation lying about.  But for the common little jobs I need to do, this will do just fine...