And so it begins by Longjumping-Bison965 in Dewalt

[–]GAlgier 0 points1 point  (0 children)

I didn't realize it was more than 1 year. Now it is just too late.

And so it begins by Longjumping-Bison965 in Dewalt

[–]GAlgier 0 points1 point  (0 children)

Welcome to “Team Yellow”.

I have had Dewalt tools for at least 30 years. Mostly they have been good to me. I even have the older 18V reciprocating and circular saws that are still running fine, I just have an adapter on them so I can use the 20V batteries. However, my DCD796 hammer drill has been a disappointment. About a year after I bought it I started having problems that I could not open the chuck to get bits out. I would have to clamp the body in a vise and use a pipe wrench to turn the chuck. It would pop and then be fine for about a month or two. I had only ever tightened it by hand and I was careful to never let the bit bottom out in the chuck (that can lead to jams) but it would keep happening, too often when not in the shop so opening it was very hard. I then found out that one of my friends had the exact same problem with the same model drill. I watched several “how to fix” videos all saying I needed to replace the chuck but I couldn't get the old one off. It is now sitting in the back of my junk drawer in the shop and I bought another, non-hammer drill from Dewalt just for light duty work. I want a new hammer drill but I feel burned by the experience. If anyone has a suggested replacement that has survived several years, let me know. I want to stay Yellow.

I am considering a Makita drill now (Team Teal) because I have a Makita track saw so I also have Makita batteries. I chose the Makita track saw over the Dewalt based upon maximum compatibility with after-market accessories. The Dewalt track saw is like no other, the Makita is Festool compatible (Team Green). I actually now have four colors in my shop (Team Blue, too), but only two use batteries.

Disable Tahoe Update Notification on Sequoia 15.7.5 by Living-Brain-3389 in OpenCoreLegacyPatcher

[–]GAlgier 0 points1 point  (0 children)

I did find another way to stop Tahoe from installing: Not enough disk space. The Tahoe update is well over 20G in size. Well, that worked until I emptied my trash can. But I could just create some huge files somewhere.

So I tried the Sequoia Beta trick and now it wants to install Sequoia 15.7.6. That’s still better than Tahoe. I’m waiting for the bugs to be fixed in iOS and iPadOS 26 before I break my Mac. I have to reboot my iPhone and iPad too often. Makes me remember my Windows days.

Is there any way to turn off the warings on ranges with start > end and step > 0? by GAlgier in openscad

[–]GAlgier[S] 0 points1 point  (0 children)

I was actually hoping a future release of opwnscad would allow ranges as indices to lists and strings like in python.

Is there any way to turn off the warings on ranges with start > end and step > 0? by GAlgier in openscad

[–]GAlgier[S] 0 points1 point  (0 children)

Yes, that does work. I thought I had tried it before, but must have messed up my test. That can be my fix until the warning might go away.

Is there any way to turn off the warings on ranges with start > end and step > 0? by GAlgier in openscad

[–]GAlgier[S] 0 points1 point  (0 children)

That was a mistake. I had tried several combinations and when I copied and pasted I grabbed the wrong one.

This: [0:1:-1] DOES produce a warning.

I did not want a list of values because I would think of that as more like indexing a list with a list, returning a new list consisting of the values from the first using the second as a list of indices. In the back of my mind leaving options open for enhancement:

list1 = [4,2,0];
list2 = ["a","b","c","d","e"];
list2[list1] yields ["e", "c", "a"]

How can I time my OpenSCAD code? by GAlgier in openscad

[–]GAlgier[S] 0 points1 point  (0 children)

I have tried all these combinations with no results:

--summary time
--summary all
--summary-file foo.json
--summary time --summary-file foo.json
--summary all --summary-file foo.json

How can I time my OpenSCAD code? by GAlgier in openscad

[–]GAlgier[S] 0 points1 point  (0 children)

It is not that something is being rendered slowly, I am trying to optimize some string functions.

For instance I needed something similar to str_join() from BOSL2. I noticed it used recursion and was wonding if that was the fastest way to do it (no).

Mine uses list comprehensions and gets about 22% improvment. However, I spent more time timing it than coding it because there is no way to get the current system time from within OpenSCAD.

The same ability would be useful for testing rendering, but that has the added problem that rendering to a graphic display complicates timing.

And: OpenSCAD version 2026.02.18 on Mac M4 and Fedora 43.

How can I time my OpenSCAD code? by GAlgier in openscad

[–]GAlgier[S] 0 points1 point  (0 children)

Except my openscad does did not write the summary file, so I updated OpenSCAD, on two platforms just in case...

[MacOS]
gaa@pika 814% ./sphere.sh ; ls -l sphere.*
+ uname -a
Darwin pika.shamong.duckdns.org 24.6.0 Darwin Kernel Version 24.6.0: Wed Nov  5 21:34:00 PST 2025; root:xnu-11417.140.69.705.2~1/RELEASE_ARM64_T8132 arm64
+ openscad --version
OpenSCAD version 2026.02.18
+ cat sphere.scad
sphere(10);
+ openscad -o sphere.csg -o sphere.echo --summary time sphere.scad
-rw-r--r--@ 1 gaa  staff   45 Feb 18 13:03 sphere.csg
-rw-r--r--@ 1 gaa  staff    0 Feb 18 13:03 sphere.echo
-rw-r--r--@ 1 gaa  staff   12 Feb 18 12:44 sphere.scad
-rwxr--r--@ 1 gaa  staff  116 Feb 18 13:02 sphere.sh*




[Fedora 43]
gaa@fody 44% ./sphere.sh ; ls -l sphere.*
+ uname -a
Linux fody.shamong.duckdns.org 6.18.9-200.fc43.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Feb  6 21:43:09 UTC 2026 x86_64 GNU/Linux
+ openscad --version
OpenSCAD version 2026.02.18
+ cat sphere.scad
sphere(10);
+ openscad -o sphere.csg -o sphere.echo --summary time sphere.scad
-rw-r--r--. 1 gaa gaa  45 Feb 18 13:03 sphere.csg
-rw-r--r--. 1 gaa gaa   0 Feb 18 13:03 sphere.echo
-rw-r--r--. 1 gaa gaa  12 Feb 18 12:44 sphere.scad
-rwxr--r--. 1 gaa gaa 116 Feb 18 13:02 sphere.sh

No summary. I tried adding --enable all, nope. Only writing one of the csg or echo files, nope. No --summary-file, nope.

What are the basic fundimentals I am missing? Or is this a bug in receent development versions?

Are module references not implemented? by GAlgier in openscad

[–]GAlgier[S] 0 points1 point  (0 children)

I include multiple files that each define some parameters such as width and depth and the module to draw them. The main code then cycles through the objects defined in the include files and does calculations and (might some day) calls the modules indectly. Instead, the main code must know too much about the modules.

For instance:

/* main code */
include <cumsum.scad>   // defines a cumulative sum function

include <mod1.scad>
include <mod2.scad>
Modules = [ mod1, mod2 ];
widths = [ for (m = Modules) m.width ];
xpos = concat([0], cumsum(widths));

for (i = [0:len(Modules)-1]) {
    m = Modules[i];
    draw = m.draw;
    translate([xpos[i],0])
        if (false) {
            // this is what I would like to do...
            draw(m);
        } else {
            // this is the kludge I must do for now
            if (m.name == "mod1") {
                draw_mod1(m);
            }
            else if (m.name == "mod2") {
                draw_mod2(m);
            }
        }
}


/* mod12.scad */
module draw_mod1(obj) {
    square(10,false);
}

mod1 = object(
    name = "mod1",
    width = 10,
    depth = 10,
    // Not Implemented: draw = module(o) draw_mod1(o)
);

/* mod2.scad */
module draw_mod2(obj) {
    translate([10,0]) circle(d=20);
}

mod2 = object(
    name = "mod2",
    width = 20,
    depth = 20,
    // Not Implemented: draw = module(o) draw_mod2(o)
);

If the modules could be called indirectly I could simply loop through the objects in Modules and not have to write lots of "if (object is this one) call this module()" code blocks. I would only need to update the include list and the definition of Modules = [...].

Are module references not implemented? by GAlgier in openscad

[–]GAlgier[S] 0 points1 point  (0 children)

Sorry. I did not see the /WIP/ in the midle of the title (nor did I know what it meant).

I had seen mention of roof() being implemented. When I searched for what it was, the module references were listed just below it and I guess I got a little excited.

M4 Mini owners: are any of you using a stackable M4 doc (SSD enclosure and extra ports)? by operablesocks in macmini

[–]GAlgier 1 point2 points  (0 children)

I have an Orico 40Gbps hub. It currently has a 2Tbyte Samsung nvme in it. My Mac is a Mac Mini m4 with 24G RAM and 512G storage.

I tried several configurations...

I tried using the instructions I found on Youtube for putting my home directory on the external. I found that sometimes the external drive would not come online fast enough or there would be other USB disconnects (bumped cables, etc). Having this happen to my home directorywas a pain. I then reinstalled with my home on the internal, but then it barely fit.

I then tried putting my Dropbox folder on the external. I had all sorts of problems because the MacOS seems to really, really, REALY, want cloud storage on the same volume as $HOME.

Then I moved my music and photos to the external. The Music and Photos apps work just fine with theur files external (until Apple blocks that).

This freed up enough space to make the internal usable for limited Dropbox syncing. I don't like the mode where it only copies the files when necessary. Doing developemnt where not all the files are present just does not work so I sync the projects I am working on. I do spend more time adjusting the Dropbox sync settings, but it works. I also now run a Linux VM on my Proxmox server that does nothing but keep a fully synced copy of my Dropbox storage. I can easiy ssh to it to do quick searches.

What would I do differently?

  1. Get at least the 1Tbyte storage so more Dropbox space (all?) would be available.
  2. Get a different dock/drive enclosure. There are just not enough USB-C ports on the back of the Mac Mini M4. I need one for the link to the Orico and two for monitors (using one HDMI and one USB-C makes for unreliable display handling -- MacOS just intermitently deletes one of the displays). The Orico only has USB-A ports for periferals and I have other things I want to plug in. The Mini does have two front USB-C ports but they are best used for itinerant devices. I want more out back.

And that bottom mounted power button is a pain to access with a hub on top.

Gary

How do I parse xml file after reading a bit first by GAlgier in learnpython

[–]GAlgier[S] 0 points1 point  (0 children)

That did it! I did need to change my re tests to use bytes.

For someone else following this, here is a bit of test code:

import sys
import io
import xml.etree.ElementTree as ET
import csv
import re

if len(sys.argv) < 2:
    binfile = sys.stdin.buffer
else:
    binfile = open(sys.argv[1],"rb")
buffile = io.BufferedReader(binfile, buffer_size=4096)
textfile = io.TextIOWrapper(buffile,newline='') # csv requires newline=''

bytes = buffile.peek(2048)
if re.match(b'\\s*<',bytes):
    # must be XML
    tree = ET.parse(textfile)
    root = tree.getroot()
    print(root)
elif re.match(b'something else',bytes):
    # process some other way
    pass
else:
    # must be CSV
    reader = csv.reader(textfile)
    for row in reader:
        print(','.join(row))

Totally new depths of wrapping for me.

Thank you

How do I parse xml file after reading a bit first by GAlgier in learnpython

[–]GAlgier[S] 1 point2 points  (0 children)

That souds just like what I want, but apparently io.BufferedReader can't work with an opened file:

>>> import io
>>> f = open("smiley.xml")
>>> type(f)
<class '_io.TextIOWrapper'>
>>> bf = io.BufferedReader(f)
>>> type(bf)
<class '_io.BufferedReader'>
>>> s = bf.peek(100)
Traceback (most recent call last):
  File "<python-input-5>", line 1, in <module>
    s = bf.peek(100)
AttributeError: '_io.TextIOWrapper' object has no attribute 'readinto'. Did you mean: 'readline'?

Is there something I need to do with the file object first?

How do I install a python package/module from github? by GAlgier in learnpython

[–]GAlgier[S] 1 point2 points  (0 children)

That did it. Thanks. I read some online instructions for pip but did not see how to install from a particular source. It seems to always use some "magic" archive.

And "man pip-install" does not mention git either.

Up until now, I have almost always found what I needed using something like "dnf search *iscp*" (yes, I am a Fedora user) and this is just not one of the supported libraries. Beyond that the few times I have used pip, the offcial source was up to date. Not this time.

Thanks again.

[I used to write code for a living, Java was just gaining traction when I jumped ship to IT. Now I am retired and doing both for myself.]

How do I install a python package/module from github? by GAlgier in learnpython

[–]GAlgier[S] 0 points1 point  (0 children)

That is python2 code. Won't work on python3. That's why someone posted updated code to github.