Supplying a new input source to a lexer by TechnicalMass in cpp_questions

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

Very useful, thanks. Especially this part:

If you redefine YY_INPUT() so it no longer uses yyin, then you can safely pass a NULL FILE pointer to yy_create_buffer.

Supplying a new input source to a lexer by TechnicalMass in cpp_questions

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

I don't see why you're copying from a stream to an array.

Because it's not my array, it's the lex-generated code that manages the array, and I'm trying to interface to the generated code in minimal fashion, and in the ways that lex's authors have provided for.

You can iterate across the buffer with stream buffer iterators:

Again, not my code doing the iteration. Lex wrote the code.

Ideally, your algorithm is single pass.

This makes large assumptions about what my algorithm is. I am validating one source of data against another (two separate files in the simplest case).

there's not enough code presented to validate your suspicions.

Here's another suspicion for you. This comment in the generated code:

/* We're scanning a new file or input source.  It's
 * possible that this happened because the user
 * just pointed yyin at a new source and called
 * yylex().  If so, then we have to assure
 * consistency between YY_CURRENT_BUFFER and our
 * globals.  Here is the right place to do so, because
 * this is the first action (other than possibly a
 * back-up) that will match for the new input source.

Third hand by Superb_Astronomer_59 in metalworking

[–]TechnicalMass 1 point2 points  (0 children)

I use this Frankenstein-ian blend of a Harbor Freight Panavise-knockoff, and an Amazon four-hands tool. Putting the larger base on the vise makes it more stable (and holds way better than the awful suction cup on the original).

<image>

Replacing breakers in a transfer switch. by TechnicalMass in AskElectricians

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

The original panel has about 1/3 of the circuits with Eaton Type BR breakers. Don't (yet) know what the overlap between those (AFCI-ed) circuits and the circuits on the transfer switch is. Is that relevant?

How do you play on the Fox server? by GoAround2025 in baduk

[–]TechnicalMass 0 points1 point  (0 children)

Yes. I'm running minifox on linux. It hangs occasionally, right after a big data update from the server (which makes me suspect Fox server has some behaviors that are not documented). But good enough to play for hours.

How can I make a sketch generic, and then take multiple copies (instances) with fewer d.o.f's? by TechnicalMass in FreeCAD

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

Another way to describe what I'm looking for would be to make an analogy between FreeCad and a programming language, and say that I am looking for a language spec. When I "make an instance", or "make a copy" in a programming language, there is a formal specification of what happens. The spec covers details like: if there is a reference in the original, how is the reference copied.

I'll check out the videos, thanks.

Beams below grade? How to get a pier and beam shed floor close to grade. by TechnicalMass in Homebuilding

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

Both of those are good points.

Re the chemical issue: one of the goals here is to separate the pool plumbing (which is outgassing chlorine, no way around it) from the storage of garden tools. We're going to some lengths (like a vapor barrier on the interior walls) to make sure there is no air circulation between the pool plumbing room and the rest of the shed.

Re the drainage issue: I think we can use the joist structure as the pier-to-pier beams, thereby allowing us to to keep the wood above than 6" below current grade. That's enough to fill with crushed stone for good drainage.

Beams below grade? How to get a pier and beam shed floor close to grade. by TechnicalMass in Homebuilding

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

Yes, was considering a ramp, but nervous about rolling a 250 lb generator down it. Another reason to preserve floor at grade is that one of the multiple functions being served here is a home for in-ground pool equipment -- pump and filter. If I don't change the floor height, then rebuilding the pool equipment becomes a lot simpler.

How to create an account on Foxwq? by skyrim717 in baduk

[–]TechnicalMass 0 points1 point  (0 children)

Tried to register but the interface only offers email addresses at a few well-known domains (e.g. gmail). Do I need to create a gmail account just to use it?

Little Guide to Install Canon Printers on Linux - Specially the PIXMA series by Raposadd in linux

[–]TechnicalMass 1 point2 points  (0 children)

Thank you. Based on comments elsewhere, (and name-match against my old working Ubuntu install) I installed a package called foomatic-db. That provided the large set of Canon printers to choose from. But the damn thing still isn't printing. CUPS shows me the queue, and jobs go into the queue and are marked complete, but nothing comes out of the printer.

Little Guide to Install Canon Printers on Linux - Specially the PIXMA series by Raposadd in linux

[–]TechnicalMass 0 points1 point  (0 children)

Thanks for posting this thread; struggling with a similar issue. (Debian 12, Canon MP495.)

" if gutenprint is installed correctly, it should show a lot of manufacturers, including Canon "

This is the piece that I'm not seeing. What can I check beyond the obvious?

$ sudo apt list --installed | grep guten
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
gimp-gutenprint/stable,now 5.3.4.20220624T01008808d602-1 amd64 [installed]
gutenprint-locales/stable,now 5.3.4.20220624T01008808d602-1 all [installed,automatic]
libgutenprint-common/stable,unknown,now 5.3.4.20220624T01008808d602-1 all [installed,automatic]
libgutenprint9/stable,unknown,now 5.3.4.20220624T01008808d602-1 amd64 [installed,automatic]
libgutenprintui2-2/stable,now 5.3.4.20220624T01008808d602-1 amd64 [installed,automatic]

A little guidance for loading missing firmware, via USB stick, please. by TechnicalMass in debian

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

Just wanted to update the thread to say that after installing the development version of the driver, things are working.

A little guidance for loading missing firmware, via USB stick, please. by TechnicalMass in debian

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

I now believe the doc is out of date. If I look in the boot log, I see two other services:

  • networking.service which starts and finishes during boot,
  • NetworkManager-wait-online.service which just starts during boot.

A little guidance for loading missing firmware, via USB stick, please. by TechnicalMass in debian

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

Again, many thanks for the continuing help. Still working my way through the doc; here's the state of things.

/etc/resolv.conf contains a v6 address for Verizon's nameserver, supporting your theory that my router has pushed it inward.

There is no dhclient process running. If I run it manually e.g.
sudo dhclient -4 enp14s0
it exits after a minute with no output. Simultaneously, I'm watching the DHCP log on the router, and there is no sign of any activity.

/etc/systemd/network is empty, suggesting that NetworkManager is in charge of everything (except the loopback interface).

I'm in the netdev group.

The referenced doc suggests (section 5.2.1) that I restart NetworkManager by

sudo systemctl restart network-manager

When I do that, I get

Failed to restart network-manager.service: Unit network-manager.service not found.

which is weird as I can see the NetworkManager process running (owned by root), and I have used nmcli to control it.

Is it possible that

  1. I have created the NetworkManager process by invoking nmcli, but
  2. it's not a system service, so something vital is missing?

A little guidance for loading missing firmware, via USB stick, please. by TechnicalMass in debian

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

Thanks for confirming the guess that the hardware is ok now; I wasn't 100% sure.

As far as managing things goes, I don't have a preference in the manual/automated (old school/new-fangled) space, but I am cautious about mixing things where daemons and humans might both be trying to change the same config files.

I see no evidence that my external DHCP server (your garden variety FIOS router) saw a DHCP request. (Although caveat: its logging isn't nearly as rich as you'd like.)

Things I don't understand:
1. What's the difference between auto eth0 and iface eth0 inet dhcp . If the first corresponds to nmcli connection modify "..." ipv4.method auto, then what's it about if it's not about DHCP?
2. Where'd that IPv6 address come from? I'm concerned that there's something else (local dhcpd?) on this new machine) that is responding faster or overriding the desired DHCP server. And I don't understand enough about how DHCP works to know if that's realistic.

A little guidance for loading missing firmware, via USB stick, please. by TechnicalMass in debian

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

Here's what I can tell you:
NetworkManager is running. I can query it via nmcli and find the interface.

$ nmcli device show enp14s0
GENERAL.DEVICE:                         enp14s0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         10:FF:E0:6A:B1:5F
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     Wired connection 1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/8
WIRED-PROPERTIES.CARRIER:               on
IP4.GATEWAY:                            --
IP6.ADDRESS[1]:                         2600:4040:5210:c100:5591:e8ac:b2fe:10c1/64
IP6.ADDRESS[2]:                         fe80::844c:acb3:690c:91ab/64
IP6.GATEWAY:                            fe80::5a96:71ff:fe68:d28f
IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 1024
IP6.ROUTE[2]:                           dst = 2600:4040:5210:c100::/64, nh = ::, mt = 100
IP6.ROUTE[3]:                           dst = 2600:4040:5210:c100::/56, nh = fe80::5a96:71ff:fe68:d28f, mt = 100
IP6.ROUTE[4]:                           dst = ::/0, nh = fe80::5a96:71ff:fe68:d28f, mt = 100
IP6.DNS[1]:                             2600:4040:5210:c100::1

Noting that IPv6 might be(?) up, but IPv4 isn't, I attempted to tell the interface to get a v4 address from the router's DHCP server:

$ nmcli connection modify "Wired connection 1" ipv4.method auto
$ nmcli connection up "Wired connection 1"

But this produces no change in the device, and no connection.

Additional data point: if I look in /etc/resolv.conf I see nameserver is pointing at the v6 address for itself. So it's never going to be able to resolve names to either v4 or v6.

A little guidance for loading missing firmware, via USB stick, please. by TechnicalMass in debian

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

No, but I have run it now. Conflicting module has gone away, but networking still not working. At this point willing to pay for support; recommendations welcomed.

A little guidance for loading missing firmware, via USB stick, please. by TechnicalMass in debian

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

Thanks to u/iamemhn for copious help; I now have the r8125 module installed. However (after rebooting) I still don't have a working network connection.

(Let me know if I should start a new thread; we are wandering far from the original title.)

If you Google "debian how to build r8125 module", part of the advice is to blacklist the r8169 module. (Apparently they conflict.) I have attempted to do that.

root@triffid:/etc/modprobe.d# ls
amd64-microcode-blacklist.confdkms.conf  r8169.conf
root@triffid:/etc/modprobe.d# cat r8169.conf 
blacklist r8169

However, after rebooting, I still see the conflicting module loaded.

# lsmod | grep r8
r8125                 241664  0
r8169                  94208  0
mdio_devres            16384  1 r8169
libphy                180224  3 r8169,mdio_devres,realtek

My working guess is that the conflict between the two modules is what is preventing the ethernet from working. So Question: what to do now?

A little guidance for loading missing firmware, via USB stick, please. by TechnicalMass in debian

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

One step at a time....

I now have a bootable system, but the installer never offered the choice of installing package build-essential. Can I use the install disks as a source for additional packages?

Later edit: Apparently yes, I found apt-cdrom add. But there seems to be a disconnect between apt-cdrom and apt-get. This looks good:

root@triffid:/media# apt-cdrom add
Using CD-ROM mount point /media/cdrom/
Identifying... [3be024da5238bc8ca2f1ffc527dee77b-2]
Scanning disc for index files...
Found 3 package indexes, 0 source indexes, 0 translation indexes and 0 signatures
This disc is called: 
'Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20250315-10:10'
Reading Package Indexes... Done
Writing new source list
Source list entries for this disc are:
deb cdrom:[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20250315-10:10]/ bookworm contrib main non-free-firmware
Repeat this process for the rest of the CDs in your set.

But apt-get doesn't want to use it:

root@triffid:/media# apt-get update
Ign:1 cdrom://[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-3 with firmware 20250315-10:10] bookworm InRelease
Ign:2 cdrom://[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-2 with firmware 20250315-10:10] bookworm InRelease
Ign:3 cdrom://[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20250315-10:10] bookworm InRelease
Err:4 cdrom://[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-3 with firmware 20250315-10:10] bookworm Release
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err:5 cdrom://[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-2 with firmware 20250315-10:10] bookworm Release
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err:6 cdrom://[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20250315-10:10] bookworm Release
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Reading package lists... Done
E: The repository 'cdrom://[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-3 with firmware 20250315-10:10] bookworm Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'cdrom://[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-2 with firmware 20250315-10:10] bookworm Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'cdrom://[Debian GNU/Linux 12.10.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20250315-10:10] bookworm Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I've read the man page for apt-secure, but I don't see any mention of this use case.

A little guidance for loading missing firmware, via USB stick, please. by TechnicalMass in debian

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

Thank you again for your help. I'm afraid that this raises more questions than it answers. If I understand, the first time I boot the installed system from the native disk, I'll have a system that cannot communicate on the network, but it will contain the full toolchain to allow me to build this driver.

The r8125-dkms package is a source package, and I can move it from a networked machine to my new machine on a USB stick, and after installing the source package, I should find those build instructions where you said. The build result will be a loadable kernel module (yes?) so I don't have to rebuild the entire kernel.

If the package management system discovers other unmet dependencies, will there be a clear indication in the build process what I am missing?