Author Topic: A random thread for small computing things that don't really warrant a thread of their own  (Read 176653 times)

Beardy

  • What’s this do?
  • I’ve always wondered where this was
I’ve spent a reasonable amount of this evening trying unsuccessfully to model a linkage in various graphics apps on my fondelslab. I could try again using Sketchup on the grown up computer (on the morrow as Dr Beardy (Mrs) has retired for the day and the computer hall is also our bedroom) but I think it would be quicker and simpler to make a cardboard model of my intended component and measure the moving distances directly from that. I’m sure a cleverer (or more patient) person than I could use maths to work it out, but BEER excludes me from attempting such mental gymnastics this evening.
Sorting my life out, one shed at a time.

Laptop pinging constantly with incoming emails, but nothing in inbox.   Ahah! I thinks with a random lightbulb moment, must be due to the outlook rules I have set up to shift the $h:t to relevant folders-to-be-ignored.

Search for new emails.   Nuffink.  New outlook is unworthy of being called a decent product.

Remember old days and ctrl-shift-f to bring up the search box.  Ahah!  it still works.    It cannot find emails I know I have received as I have them open in the other window.   Start the advanced search options........

Apparently you can search now for emails that "have been received"....    wait for it.....   
(click to show/hide)

Kim

  • Timelord
Well, you can search.  It's when it starts finding them that you need to worry...
Careful, Kim. Your sarcasm's showing...

Mr Larrington

  • A bit ov a lyv wyr by slof standirds
  • Custard Wallah
    • Mr Larrington's Automatic Diary

WTF microshit!   […]  have you sold your soul to the devil?


This is what lat. teachers mean when they speak of “questions expecting the answer 'yes'”
External Transparent Wall Inspection Operative & Mayor of Mortagne-au-Perche
Satisfying the Bloodlust of the Masses in Peacetime

TheLurker

  • Goes well with magnolia.
Ermm.  Date formatting issue?  You're entering d/m/y and it's reading m/d/y.  So you're entering a July date which *it* is interpreting as an August date.  I know this *shouldn't* be an issue becos your  Windoze locale will be set appropriately, but...
Τα πιο όμορφα ταξίδια γίνονται με τις δικές μας δυνάμεις - Φίλοι του Ποδήλατου

Apparently all astronauts use Linux.

(click to show/hide)

Beardy

  • What’s this do?
  • I’ve always wondered where this was
Apparently all astronauts use Linux.

(click to show/hide)
which one is your coat?
Sorting my life out, one shed at a time.

That'll be the vacuum formed mac.

Mr Larrington

  • A bit ov a lyv wyr by slof standirds
  • Custard Wallah
    • Mr Larrington's Automatic Diary
The Great Monthly Backup of All Things* has now been running for fifty-three hours, because some genius at SCS Software decided to bless us with a pile of unasked-for guff, measureless to Man and which, to judge from a comparison of its compressed and uncompressed sizes, consist largely of not much at all.  I shall have to rethink the strategy.

* from a tolerably brisk network disk to a dog-slow one
External Transparent Wall Inspection Operative & Mayor of Mortagne-au-Perche
Satisfying the Bloodlust of the Masses in Peacetime

If anyone is interested, this is a video of the issues that were present in the Post Office Horizon software that resulted in the dodgy convictions. A little bit on the noddy side, but that makes it simpler for anyone to understand. I'd wondered just how the impact had been so widespread, it turns out that the range of issues with the system, and therefore potential false indicators was breathtakingly large.

Mr Larrington

  • A bit ov a lyv wyr by slof standirds
  • Custard Wallah
    • Mr Larrington's Automatic Diary
I learned yesterday, somewhat to my surprise, that if you edit a Windows batch file while it’s executing the changes are applied immediately rather than waiting until the next time it runs.  'tis sorcery!
External Transparent Wall Inspection Operative & Mayor of Mortagne-au-Perche
Satisfying the Bloodlust of the Masses in Peacetime

Kim

  • Timelord
*ponders evil uses for self-modifying batch files*
Careful, Kim. Your sarcasm's showing...

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
I've just found an Ubuntu 6.06 CD-ROM in the pile of tat in a loft cupboard while we were sorting things for the move.

woollypigs

  • Mr Peli
    • woollypigs
ah that's was when I got into Linux :)
Current mood: AARRRGGGGHHHHH !!! #bollockstobrexit

*ponders evil uses for self-modifying batch files*

I was writing those, for non-evil uses, many years before microsith moved to powershell.  I still haven't moved to powershell as everything I need(ed) is all capable of in batch files with enough thought and research.  Colleagues have all followed the trend and belief that batch files are depreciated tech.  Luckily I no longer need to invest time considering a coding bodge to enable me to pretend to be busy with following a work procedure while the computer is actually doing it all for me.

Feanor

  • It's mostly downhill from here.
Whatever your computing requirements, self-modifying code is never the correct answer...

Agree it looks bad in principle, but it was a solution to a problem and it worked.    I forget the total logic (despite being so pleased when I got it working) but it was along the lines of reading an input file, spawning a new batch file from the variables input, making sure only x batch files were running concurrently, code in batch files self healing if certain conditions were met, then on completion a self destruction to delete the batch file that was running before closing down and thus freeing up a new session that the master batch file would see and so spawn a new one.   

A very dirty way to get through a source file, in multiple windows, where each window was running through a number of logical fixes to x remote computers based on the status it was reading and the results of what it was finding.  Big_Boss wanted me to fix lots of machines before the user had a bigger problem and called the helldesk, but the computer next to me was doing it for me.  All I needed to do was to look at any window that hadn't closed, remote on and diagnose the fault, and see if I could improve the source batch that was writing the other code so that a new fix went in; whether that was in the source or the crazy self changing code that the source had produced and was re-writing itself in the temporary code that was only existent for the time it had been created and before it deleted itself.

Biggest problems were keeping $Input_file current (ruddy machines kept breaking, users went offline), or turning up at the office to find a hotdesking colleague had stolen borrowed the network cable and not plugged it back in.

Luckily this was over a decade ago and long since not in use.

TheLurker

  • Goes well with magnolia.
Prompted by an, "I remember when this was all fields around here." thread in the Pub..

A long time ago* I tried to write a programme (sic) to work out square roots for an ancient** computer that the maths teachers had rescued from somewhere. As might be expected for a mid to late 1950s design it lacked a number of features that we have come to expect, like hardware / OS division & multiplication.  I never did get the programme to run because the function to divide kept hitting endless loops so today I finally wrote that function to calculate square roots.  It took 5 minutes.  Of course there are all sorts of flaws, the selection of the initial approximation is rubbish, there's no accounting for possible overflow errors, the large difference used as the end point, endless loops etc. etc. etc, but the itch has been scratched. :)

Code: [Select]
        static double squareRoot(double value) {
            double candidate = value / 10;
            while (Math.Abs(value - (candidate * candidate)) > 0.001) {
                candidate = (candidate + (value / candidate)) / 2;
            }
            return candidate;
        }


* Late 1976 or early 1977
** It was several years older than me.
Τα πιο όμορφα ταξίδια γίνονται με τις δικές μας δυνάμεις - Φίλοι του Ποδήλατου

Somewhere around 15 years ago, to find a square root using a processor that didn't do divide, here is what I did:-
The target is the number for which the square root is needed.
The iteration starts with a guess of 2048
The guess is squared
If the result is bigger than the target, then 1024 is subtracted from the guess
otherwise 1024 is added
next time, 512 is added or subtracted
and so on until 1 is added or subtracted
then the guess is the square root




Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

TheLurker

  • Goes well with magnolia.
That looks, sort of, like a bit shift division/multiplication to me which if I'd known about it then would have made life a *lot* easier.  :)
Τα πιο όμορφα ταξίδια γίνονται με τις δικές μας δυνάμεις - Φίλοι του Ποδήλατου

While writing code, there were odd bits of maths to be done, sometimes with a processor with no divide, and some even without a multiply function.

piclist.com gave me some ideas. It was quite often a combination of ideas that could have really good results.

In one bit of code I wanted to find a bearing from a latitude difference and a longitude difference. The first thing I did was to work out which 45° section the answer was in, so that the arctan function I needed was of a number less than 1. If I trapped the case where both differences were zero, that also meant that I could avoid dividing by zero as I was always dividing by the larger number.

Then I used a lookup table for arctan, with linear interpolation between points. It turns out that to get 1° accuracy in the range 0 - 45°, only 5 points are needed on the lookup table.
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

I've been looking at how to use microcontrollers, and came across this

https://create.arduino.cc/projecthub/Advanced/punch-activated-arm-flamethrowers-real-firebending-95bb80


What could go wrong?


My 2012 iMac bongs a semi-tone higher than my 2015 iMac when they start up.

slope

  • Ride Fettle Ride
    • Current pedalable joys
My 2012 iMac bongs a semi-tone higher than my 2015 iMac when they start up.

You need a larger diameter narghile for earlier models.

My 2019 iMac didn't bong at all until it I hacked it

My 2012 iMac bongs a semi-tone higher than my 2015 iMac when they start up.

You need a larger diameter narghile for earlier models.

My 2019 iMac didn't bong at all until it I hacked it

My 2020 MacBook Air is like a nun's fart when it starts up.
Silent.

ETA - Had to look up narghile