Jump to content

Type keyword(s) to search

Small Talk: The Welcome Mat


Recommended Posts

Perfected the logic of my package dependency program. It now correctly identifies packages required to build the base package.

I tried three separate algorithms to guarantee that the packages are built in an order that guaranteed that each package is built after any/all dependencies. The third algorithm works well and is quite simple.

The list of packages are in no particular order and the final code does not care. It processes each package in the list and if it finds packages flagged as installed, it skips over them. If it finds a package that is a leaf-node (no dependencies) it builds/installs it, flags it as installed, and moved on. If it finds a package that is not a leaf-node, it checks it's children. If all of them are installed, the node I'd is built, installed and flagged and we move on. When the end of the list is reached, you start again at the top. Eventually, you will traverse from top to bottom and not find any packages that are not installed. That means that all packages are installed and there is nothing else to do because you're done. 

Now that the mechanism works to identify the order of installation, I will work on extending the program to generate a script to actually do the download, build and install for each package in turn, in the proper order. 

Watched Walking Tall, with The Rock as a soldier returning from his years of service to discover his home town is now overrun with crooks and corrupt cops. He runs for local sheriff, wins and cleans up the town. Based on a true story. 

I had tuna rice with pumpkin, broccoli, cucumber and lentils for lunch. Tasted pretty good. Mo got chow. I bought 5Kg of chow a while back and he will get that (not exclusively) while it lasts. My dinner was boiled potatoes, carrots and cabbage with the last of the bully stew over the top. 

Thank goodness I like simple food. That doesn't mean I don't enjoy fancy food too, but it's good that simple dishes can be made tastily and are enjoyable to me. 

Mo is here in bed with me and he seems to have finally found a spot he finds comfortable. He was moving around and rooting about but has settled at last. I will bet that when I turn over he will be sleeping directly on top of a nest made from my cover-sheet.....

Edited by Netfoot
  • Like 1

Phone keeps rebooting every few mintes.  Sometimes it reboots and the keyboard won't work.  A few minutes later after the next reboot, the keyboard comes back.  Gotta use the desktop tom to post this.

Mo right here with me, cleaning his feet. He is obscessive about his feet.

We had penne pasta with tuna, broccoli, onion & cabbage.  Tasted pretty good. Mo ate his in a real hurry!  There was sufficient leftovers for dinner.  I was going to warm it up but Mozie came along and demanded his dinner unexpectedly early so we had it at room temperture.  It still tasted pretty good. I grated the last of the cheese over it at lunchtime but there was n0one none left for dinner -- didn't matter.  We are low on teabags. I have only 4 left.  That would get me through the day tomorrow but there wouldn't be any tea on Tuesday morning.  I have to get more and I could go tomorrow or wait until Tuesday morning.  

I could get another 80 decaf bags for $11.49 or buy 25 fully caffinated bags for $2.75 instead.  14⅓¢  or 11¢ per bag.  The caffinated ones are not good for me. I can decaf them by steeping them in hot water for 30 seconds before using them but its a PITA.  If I'm buying teabags I might as well buy more milk.  Only got ½L remaining.  Sugar is good for now.  The more expensive bags are from the supermarket where the Book Tent ladies set up on the first Tuesday of each month. That would be day after tomorrow.  Mo & I have not seen the ladies for many months.  

Or I could stop drinking tea and save our $80 for groceries later if we don't get a woodworking job soon.

My program is making slow progress.  Having successfully build the dependency tree of packages and generated a build-order list, I am now extending the program to use that build-order list to create a separate program which will actually do the job. A package processing script that can be run stand-alone. 

The package processing script will process each package in the build-order list, and for each, it will 

  1. Switch to the working directory.
  2. Fetch the build script archive from the net.
  3. Fetch the script signature from the net.
  4. Use the signature to confirm that the script archive is not corrupted. 
  5. Unpack the build script archive to create a build directory.
  6. Move the build script archive into the build directoy.
  7. Switch to the build directory.
  8. Fetch the package source tarball(s) from the net.
  9. Run the build script to build the package.
  10. Move the new package to the packages directory.
  11. Run the package installer to install the package. 
  12. If more packages remain, goto #1.

I love writing a program whose job is to write another program which has to do an entirely different job. It's always tricky as hell. What makes it challenging is double-interpolation.  

Suppose we want a simple program that asks for your name and then prints a simple greeting:

print "Who are you?\n";
chomp( $yourname = <STDIN> );
print "Greetings, $yourname! Nice to meet you!\n";

This is fairly easy to follow. Line #1 prompts for information. Line #2 reads your response from the Standard Input (keyboard), stores the response in a variable ($yourname) and then "chomps" that value.  (In the language I'm using here, chomp removes a trailing NEWLINE character.) Line #3 prints a greeting, with your name embedded:

Who are you?
Joe
Greetings, Joe! Nice to meet you!

All well and good. but suppose we wanted to write a program that wrote this program? We might try:

$new_program = "
       print "Who are you?\n";
       chomp( $yourname = <STDIN> );
       print "Greetings, $yourname! Nice to meet you!\n";
";
print $new_program;

But when we run this, we get this response:

Bareword found where operator expected at line 2, near "print "Who"
 (Might be a runaway multi-line "" string starting on line 1)
       (Do you need to predeclare print?)
String found where operator expected at 2, near "print ""
       (Missing semicolon on previous line?)
String found where operator expected at /home/amcleod/bin/quick line 4, near """
       (Missing semicolon on previous line?)
syntax error at line 2, near "print "Who are "
Execution of program aborted due to compilation errors.


The problem is simple. Our $new_program = " . . . "; statement defines a value limited by double-quotes. That value is our new program.  But the contents of the double-quotes include other double-quotes.  We need to escape the inner double-quotes to prevent them terminating our new program early:

$program = "
       print \"Who are you?\n\";
       chomp( $yourname = <STDIN> );
       print \"Greetings, $yourname! Nice to meet you!\n\";
";
print $program;

Notice we have escaped (by adding a leading backslash) the four inner double-quotes of our new program.  This prevents the errors caused by the inner double-quotes, and the program now runs fine, generating our new program:

       print "Who are you?
";
       chomp(  = <STDIN> );
       print "Greetings, ! Nice to meet you!
";

But wait.  Why are our two print statements now each split onto two lines? Because the original print statements were terminated with \n ( an escaped "n"). This is secret programmer code (shhh!) for "Insert a NEWLINE character at this point". Backslashes in double-quotes strings  introduce "escape sequences".  The \n escape sequence tells the first program to insert NEWLINEs into the second program.  Which is not what we want.  What we want is for the second program to insert NEWLINEs into it's output. Simple solution?  Escape the escapes!

Also, what happened to the $yourname variables in our generated code?  Well, if a variable name appears in a double-quoted string, it is interpolated.  The variable name is replaced by the value of the variable.  And since the first program does not have a value for the variable, it interpolates an empty string in place of the variable name.  So we have to escape the variable name a well:

$program = "
    print \"Who are you?\\n\";
    chomp( \$yourname = <STDIN> );
    print \"Greetings, \$yourname! Nice to meet you!\\n\";
";
print $program;

When  we run this, we generate our second program which looks as follows:

       print "Who are you?\n";
       chomp( $yourname = <STDIN> );
       print "Greetings, $yourname! Nice to meet you!\n";


which when run in turn produces:

Who are you?
Nancy
Greetings, Nancy! Nice to meet you!


which looks correct. As you can see a simple three-line program had to have eight escapes added.  It gets progressively more difficult as the program your are writing gets larger.

But who would want to write a program to write another program. That hardly ever happens, right?

Go back and look at the end of the error messages included above.  You will see mention of "compilation errors". A compiler is a program which reads another program and converts it into an equivilent third program in another language. In this case, the compiler program is translating my program source code (in Perl) into the equivilent program in machine code. Because the only language a computer can understand is machine code. So unless it is written directly in machine code from the start (possible but very difficult and time consuming) every single program has to be compiled.  As a result, compilers are used millions of times a day all over the world to translate source code programs into machine code programs. Which is essetially analyzing the source code and writing a new program in machine code that is the functional equivilent.

Nowe that I've successfully fried your brain with all this crap, I am going to bed!

Edited by Netfoot
  • Useful 2

Just watched a video about the incredible climb-rate of the McDonnell Douglas F-15 Eagle.

spacer.png

First introduced in 1976, it has a maximum rate of climb of 50,000 feet per minute.

Yawn!

The English Electric Lightning also has a maximum rate of climb of 50,000 feet per minute.

spacer.png

It was introduced in 1954, 22 years before the Eagle.  (This photo is of the BAe Lightning, built under license from English Electric. Vertical fin flat instead of rounded.) It had an operational speed over twice the speed of sound and could climb vertically at mach 1. It not only could, it did!  That was it's normal operating envelope (see photo). Sit on the ground until the snooping Soviet Tupolev bombers got close and then go straight up and chase the away.

The "Thunder & Lightning" takeoff was so famous that Lightnings displayed in aircraft museums are usually displayed vertically. Here is a photo I took at in the museum at RAF Cosford  in 2017.

YT videos here, here and here. (Third one has a cameo appearance of a Bone in the background, right at the beginning.}

The Lightning had another common trick that it used to perform: The cockpit would often burst into flames on touch-down. It's pilots were rather blasé about that.

The Lightning was the only aircraft ever, to intercept a U2 spy plane.  U2s have been shot down by missiles (Gary Powers, etc) But the only interception was by a Lightning. The U2 pilot, secure at 88,000 feet, didn't see the Lightning coming because it attacked from above.

There was a company called "Thunder City" in South Africa that maintained a fleet of airworthy warbirds and you could pay a fee and go for a flight (as a passenger, of course). I worked out that a trip to SA and the fee would come to about $8000. You would be trained how to wear the flight suit, communuicate with the pilot, etc, and if necessary, eject. (Hopefully not!) After that, you told them what type of "mission" you wanted to participate in.

If you chose to go for a ride in a Blackburn Buccaneer, for example, you might want to experience an NOE flight. Nap Of the Earth. The unofficial catchphrase of the Buccaneer was "Twice the speed of sound, ten feet from the ground." They were used to fly undetected into other countries by following the roads below the levels of the surrounding trees.

Naturally, if you were riding a Lightning, you would want a mission that featured that "Thunder & Lightning" takeoff.

When my mother died she left me a little cash and I decided to go for this once in a lifetime opportunity to ride in a Lightning. My mission plan was "Take off, point her straight up and make the sky turn black in 60 seconds." I contacted Thunder City in SA... only to discover that they had closed their business 8 months prior, due to increasing government regulations.  It was a huge disappointment. 

If you ever saw Those Magnificent Men in Their Flying Machines you may remember that right at the end of the movie as the racers were landing their wood & canvas aircraft at the finish line, a flight of jets made a fly-by.  Those were Lightnings. I can't find a YT clip of that fly-by.  Maybe I should make one. 

Edited by Netfoot
  • Useful 1

Phone playing the arse. It was discharging st state of about 3% per minute this morning. Seems to have slowed now.  I tested it with a timer and got 2% in 15 minutes which is 12½ hours to 0%.

Had a great rice for lunch and corned beef & cabbage with onion & broccoli for dinner. Both tasted great! Mo enjoyed rice for lunch but had chow flavoured with a very little corned beef for dinner. He inhaled both. If cabbage was not do expensive and less likely to spoil, I'd eat corned beef g cabbage more often. Tasty and low carb.

Got a mug of tea here and two tea bags for tomorrow. This by rationing tea bags today. I drink tea a lot because it helps me eat less by making me feel full. Not to mention I enjoy a mugga!

 I think i will buy a box of cheap caffeinated tea bags tomorrow, along with a liter of milk. I must remember to lift up the gas cylinder and see how light it is. It might be time to get a refill so I don't get surprised in the middle of cooking meal. The gas station near Popular demands cash, and the ATM there charges me $3 to withdraw. I will need to go to my own ATM and draw off $50 if I decide to get the refill.

Been bingeing Survivor episodes. I don't understand how it is that the most loathsome players get kept around.

My program that writes another program? The program it writes now writes another program. Yes, the program writes a program that writes a program that in turn writes a third program. Why? For fun, of course. Naturally it doesn't work.

I thought I'd write a program that builds the dependency tree, then creates a second program that uses the dependency tree to build all the packages, and then writes a third program that installs all the packages it just built. Unfortunately, I didn't think it through.  

When you build a package, it will not build successfully if any required packages are missing.  In this case, missing means not installed. So I can't build them all and then install them all. Because having a dependent package built but not yet installed, means the parent package build(s) will fail for want of an installed dependency. 

So the build process for each package in the build-order list must include installation, before the next package is processed. And if I build and install each package in turn, there will be nothing for the third program to do. It was supposed to do. So my brain fart cost me a day of stupid coding and tomorrow I got to go and carefully remove all that useless code.  Without breaking the original code. I am an idiot!

Puppy stole my shoe several mornings in a row, now. No photos because the camera takes photos that are just dark & murky.

Wonder what the blood sugar will be tomorrow after I ate. Carb-free meal for dinner? It's been difficult these last few weeks. You can see where the change occurred round the middle of April. But I think I may be getting it back under control. 

Screenshot_20250602-223454.thumb.png.f2d8dc98f63d534fbc365ec4d82df0d9.png

Seems like the numbers are still up & down, but the amount of red is diminishing and the green is coming back. I'd like Dr. Kristi to look at this but I will wait until next month when I go for a prescription next month and see what she says then. She might say it is nothing to worry about or she might increase my meds. 

Mo was lying here behind me a short while ago but he had ninja'd away. He will be back when the lights go out. But that wont be for a while because I want to do some netsurfing. 

So I will drink my tea and surf away. 

ETA: In the time it took to write this post, the battery fell from 100% to 67%.....

Edited by Netfoot
  • Like 1
9 hours ago, Quilt Fairy said:

I was a mainframe programmer.  The only job I had where I was truly happy and looked forward to going to work in the morning. 

God bless you!

I started my journey in 1975, learning my trade on mainframes. Assembler, Fortran, Cobol, Basic, Algol 60 & 68, Snobol... Punch your code on cards with an IBM 029. Submit and wait for the results to come back off the line printer.  The DecWriter IIs were far more convenient. Glass terminals came later. All mainframes with huge banks of flashing lights like something you'd see in that phallic submarine on Voyage To See What's On The Bottom.  

Voyage-3L.thumb.jpg.509aee7dbd5129c6ee71d6135d38af8b.jpg

The machines ran on the most outrageous mechanical UPS ever. Simple, clever, functional, but crazy! So crazy that if I described it to you here, you would think I was lying about it!  

I decided I would actually buy my own computer the moment I discovered you could get a PDP-11/34 second hand for the very reasonable price of only £28,000.  

Menwhile some clever person realized that these new fangled microprocessor chips like Intel's 4-bit 4004 could be used for mor than embedded systems. I've actually used a Science of Cambridge MK14!

spacer.png

And it isn't the most primitive machine I've ever used, either! A very talanted guy I knew, built a machine from his own designs which used rows of LEDs to display address and data busses in binary and a row of 16 toggle-switches for input!

A couple years later I was soldering together a NASCOM-1 with a Zilog Z80A CPU, 1K of EPROM and 2K or RAM, a 48-key QWERTY keyboard and output to a TV modulator. Hand-coding in hex, using op-codes from memory and computing relative offsets in my head. Never looked back.

I don't know if it would be presumptious to describe my life as a Journey, but if so, these machines have been with me all the way. 

Edited by Netfoot
  • Like 1

Shopping!

  • Gas Cylinder: $42.52
  • Gasoline: $10.00
  • 4x ¼L Milk: $8.76
  • Tea bags (50): $5.50
  • 2x Corned Beef: $9.58
  • 840 gr. Cabbage: $5.87
  • 986 gr. Onions: $3.40
  • 30 oz. Mayo: $9.45

Total of $95.08 leaving a whopping $36.91 in the bank.  

Gasoline has gone up by 6¢ a liter.  Milk not availabhle in 1L cartons so had to buy four quarters which works out more expensive.  Bought the cheap teabags. A mayo addiction is a terrible thing. 

With what's left in the bank plus the next welfare cheque (when it drop in 10 days time) I will be able to pay the telephone bill, eight days before the next telephone bill drops.

went to open the gate to go out and fouunf my new(ish) bath towel all balled up on th driveway.  I wonder how that happened. 

 

  • Like 1

On my way out this morning, I found this on the road to Popular:

PXL_20250603_161538485.thumb.jpg.a083e7b63c4bd9828ce8f59e1ef8b96c.jpg

To the left of the container is a building being renovated and they are storing tools and materials in the container. 

To the right of the truck is a building site that I'd is having foundations dug out and concrete cast. The truck contains steel and cement.

In the middle, is where an asshole driving an SUV thought would be a good place to park, lock the vehicle and go over into the mall.

(Only assholes drive SUVs.)

I had to reverse a long way before I could turn around and find an alternative route out.

Edited by Netfoot
  • Mind Blown 1
4 hours ago, Netfoot said:

Shopping!

  • Gas Cylinder: $42.52
  • Gasoline: $10.00
  • 4x ¼L Milk: $8.76
  • Tea bags (50): $5.50
  • 2x Corned Beef: $9.58
  • 840 gr. Cabbage: $5.87
  • 986 gr. Onions: $3.40
  • 30 oz. Mayo: $9.45

Total of $95.08 leaving a whopping $36.91 in the bank.  

Gasoline has gone up by 6¢ a liter.  Milk not availabhle in 1L cartons so had to buy four quarters which works out more expensive.  Bought the cheap teabags. A mayo addiction is a terrible thing. 

With what's left in the bank plus the next welfare cheque (when it drop in 10 days time) I will be able to pay the telephone bill, eight days before the next telephone bill drops.

went to open the gate to go out and fouunf my new(ish) bath towel all balled up on th driveway.  I wonder how that happened. 

 

I grew up with condiments, love me some mayo! My son will not eat any condiments-no mayo, mustard, ketchup etc. He will only eat ranch dressing on fries or pizza. LOL

  • Like 1

Mo is with me, here in bed.  I went off on Garden Patrol and he did not come with me. I thought I'd be patrolling alone for the first time since he came home as a 5 lb. puppy but I had not gone far before a patch of darkness shot past me and took the lead. 

Puppy had chow for lunch & dinner. I cooked a nice rice with bully, black beans, broccoli and onion. Had half for lunch and half for dinner.

I have noticed that when I buy broccoli these days, each flower Vines with a long, thick stem attached. I know that a lot of people cut the stems off and throw them away. I cut the stems off and eat them! I use my cleaver and go chop-chop-chop-chop-..... and cut the stems into very thin slices. Much thinner than my mandolin will cut, because it is stuck on ⅛" slices. Those thin slices of stem cooked with the chopped flowers eat very well. In fact today, there was no broccoli flowers, just stems.

Anyway, the rice tasted great despite the fact that I am almost out of granulated garlic and completely out of onion powder. I decided not to buy more today because I wanted to hold back enough that I can pay the phone bill.

Followed up with a mugga. Using caffeinated tea bags and have to decaf them before use. A real PITA but it is $5.50 vs. $11.49 so...

Getting little glitchy issues with my program. For instance one if the package source tarballs turned out to be a .tar.lz file and my program was not able to uncompress .lz files. It could handle .zip, .gz, .tgz, .xz and .bz2 compression but today I had to replace the 5-line subroutine with a 46-line block of code comprised of three subroutines to cater for .lz files as well. At least it is now easily extensible, in the event that additional compression types crop up. 

But another issue has cropped up in that sometimes I try to acquire the build script from the net and the program fails to find the link to it. If I look at the page I can see it right there but when the program searches forgot, it does not find it. I have checked my code and mentally worked out exactly what it is doing, step by step, to locate the link and it seems fine. It looks like it should reliably find it without issue. But it isn't finding it. It was yesterday but it no longer is. I have not changed that code. It looks like it should find it but it doesn't. So obviously there is something wrong with the code but I just can't spot it. 

Mo has vanished again.

  • Like 1
14 hours ago, Netfoot said:

Punch your code on cards with an IBM 029. Submit and wait for the results to come back off the line printer

I remember doing that!  Sadly, I was a few years too early (I graduated in '73) for programming to be an option I'd even considered as a career.  So I wasted 20 years as an engineer at the phone company anxiously wondering how early I could retire.  Then they laid me off before that became an option.  So I went back to school and became a Cobol / DB2 programmer.  Not the best or most creative, but I was competent, and, as mentioned above, happy. 

Never worked with DB2.  Finished up in an Oracle shop.

Being happy is the goal.  And I was.  Honestly, when I was at college, I became extremely interested in system software.  Used to write simple compilers and assemblers for fun!  My career was entirely accounting, but that can be fun too. And I was responsible for the system infrastructure as well - developing networking strategies, building and configuring firewalls...

And I've always done fun stuff at home too, just to keep my interests alive. Built me a Beowulf cluster once.  Just for fun.  Eight nodes. Pentium 90s, which will tell you how long ago this was.  They talked via an 8-port, 10/100 switch.  One of the nodes was double-homed so I could get in and talk to the cluster.  It really was fun to play with, but I didn't have any true use for it.  All I ever did with it was encode ripped WAV files to MP3.  Had a ball, though.

(edited)

Been working on my package build/install script.

What prompted this is that I was using the old package "mplayer" as my video playback engine and I wanted to switch to the later "mpv" package.  MPV was not installed on my system so I would have to download the source code and a matching package-building script which would create an installable software package for MPV. But MPV depends upon other packages to function.  Before the MPV package can be built, the dependent packages must already be installed.  If they aren't, you must download/build/install them.  Which may require that their dependencies be downloaded/buildt/installed. 

My program (SBcrawler) starts with a link to the package I want (MPV). It isolates links to the source code and the build-scripts and also links to any dependent "children" packages,  It follows the child-package links to identify their source, build-script and children links and keeps drilling down until there are no more dependent child-packages unaccounted for.  The tree looks like this:

mpv
 +-luajit
 +-libass
 +-mujs
 +-libplacebo
       +-meson-opt
       |     +-build
       |      |    +-project-hooks
       |      +-wheel
       |           +-installer
       |           +-flit_core
      +-glad
            +-setuptools-opt
            +-wheel
            |     +-installer
            |     +-flit_core
            +-packaging-opt
                  +-build
                        +-project-hooks

It looks like a total of 19 packages to be installed. But if you look close, you will see that build and wheel  get used twice, but they (and their dependent children) don't need to be installed twice.  And in fact, a check on the system shows that both build and wheel were already installed at a previous date (April 27th), so they and their children (in red) don't need to be installed at all!  This drops the number of required packages from 19 to 9 (in black), including the final target of mpv.

SBcrawler sorts these 9 packages into build-order so that packaging-opt and setuptools-opt are built & installed before glad, that glad and meson-opt are built & installed before libplacebo and that libplacebo and mujs and libass and luajit are built and ijnstalled before we (finally!) build & install mpv!

Finally, SBcrawler writes a second program (in this case it's called Build_Package_mpv) that automatically downloads, builds and installs the 9 packages in the correct order.  It's taken several days to get it to where I thought it might actually work.  So I just executed Build_Package_mpv and sat back while it did all the work I would otherwise have had to do by hand.

It worked perfectly!  I just tested it out on an episode of Survivor. (Yes, I know...)

I've always said that the primary characeristic needed for programming is laziness.  You don't want to spend six hours manually downloading, building and installing packages?  Simple! Lazily spend six days writing a program to do it for you! I know, it sounds counter-productive: six days of work instead of six hours.  But the next package I decide to install won't take six days.  Or six hours.  I will simply run  SBcrawler again to produce Build_Package_nextpkg and run that. It will be all over in six minutes while I while I make a mug of tea.

Edited by Netfoot
  • Useful 1
(edited)

After the trouble I had yesterday manually drawing up that dependency tree, I wrote a subroutine called tree() that produces tree diagrams automatically.  With or without pre-installed packages shown.

Since I already installed mpv and therefore all the packages in that dependency tree are now installed, I switched to a new package: yt-dlp for testing.  This is a program that downloads YT videos.  I watch a lot of YT videos but I hardly ever download them, but it is useable as a test vehicle for the tree() subroutine.

Here is the tree including all pre-installed packages and showing multiple uses of the same package:

-- yt-dlp
   +- build ✔
   |  +- project-hooks ✔
   |     +- installer ✔
   |        +- flit_core ✔
   +- hatchling
      +- pluggy
      |  +- setuptools-scm-opt
      |     +- importlib_metadata
      |     |  +- zipp
      |     |     +- setuptools-opt ✔
      |     |        +- wheel ✔
      |     |        |  +- installer ✔
      |     |        |     +- flit_core ✔
      |     |        +- packaging-opt ✔
      |     |           +- build ✔
      |     |              +- project-hooks ✔
      |     |                 +- installer ✔
      |     |                    +- flit_core ✔
      |     +- typing-extensions
      |        +- build ✔
      |           +- project-hooks ✔
      |              +- installer ✔
      |                 +- flit_core ✔
      +- editables
      |  +- build ✔
      |  |  +- project-hooks ✔
      |  |     +- installer ✔
      |  |        +- flit_core ✔
      |  +- wheel ✔
      |     +- installer ✔
      |        +- flit_core ✔
      +- pathspec
      |  +- build ✔
      |     +- project-hooks ✔
      |        +- installer ✔
      |           +- flit_core ✔
      +- trove-classifiers
      |  +- calver
      |     +- setuptools-opt ✔
      |        +- wheel ✔
      |        |  +- installer ✔
      |        |     +- flit_core ✔
      |        +- packaging-opt ✔
      |           +- build ✔
      |              +- project-hooks ✔
      |                 +- installer ✔
      |                    +- flit_core ✔
      +- setuptools-opt ✔
         +- wheel ✔
         |  +- installer ✔
         |     +- flit_core ✔
         +- packaging-opt ✔
            +- build ✔
               +- project-hooks ✔
                  +- installer ✔
                     +- flit_core ✔

Notice that there are many packages, a number of which are used more than once.  You will also see the ones that are ticked/checked -- these are already on the system.

Here is a dependency tree without the pre-installed packages:

-- yt-dlp
   +- hatchling
      +- pluggy
      |  +- setuptools-scm-opt
      |     +- importlib_metadata
      |     |  +- zipp
      |     +- typing-extensions
      +- editables
      +- pathspec
      +- trove-classifiers
         +- calver

Much simpler.  Far simpler.  No tickmarks because no pre-installed packages are included.  It would have taken me hours to go through the packages one by one, looking for packages already on the system and handling duplicates. SBcrawler did it for me in 8.795 seconds.

And when I run SBcrawler with the --script option instead of the --tree option, it generated Build_Package_yt-dlp for me in  8.347 seconds.  Running that will take considerably longer than 8 seconds because there is downloading, package building and package installing involved. But it will take far less time than downloading the source code and build scripts for each of the eleven required packages and building and intsalling each one by hand.

By the way, the dependency tree display looks much better on my system than cut'n'pasted to this forum:

dependency-tree.png.69e8f40de080e48c2bf47a43dce8cf97.png

I'm rather pleased with this little program. Later, I will fiddle with it to see if I can add minor, unnecessary, cosmetic improvements without totally screwing the code up so bad it never works again!

Edited by Netfoot
  • Useful 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...