Live data from Hacker News

Emacs Is Not Enough

project-mage.org

141–150 of 163 posts

Re: Emacs Is Not Enough

#141
post #133

Earlier quoted context omitted.

Any system that is capable of emitting any data, can emit bytes from print debugging. Could be log file, socket, or even pulses along a GPIO pin. If the system can't emit any data, well, you're kind of stuck anyway.

Pulses on a GPIO pin are not print statements. A huge proportion of computing devices have no method of producing any out put, other than to some form of actuator, at all. "print statements" are useless in this class of device. Stretching the definition of "print statement" to recording pulses from a pin is, well, a stretch! Poor young programmers. If the only tool you have is a hemmer, every problem is a thumb.

> Pulses on a GPIO pin are not print statements.

Yes, they are. How do you think text terminals work?

Re: Emacs Is Not Enough

#142
post #141
post #133

Earlier quoted context omitted.

Pulses on a GPIO pin are not print statements. A huge proportion of computing devices have no method of producing any out put, other than to some form of actuator, at all. "print statements" are useless in this class of device. Stretching the definition of "print statement" to recording pulses from a pin is, well, a stretch! Poor young programmers. If the only tool you have is a hemmer, every problem is a thumb.

> Pulses on a GPIO pin are not print statements. Yes, they are. How do you think text terminals work?

Really? You are being disingenuous.

It is a long way from "pulses on GPIO pins" to a print statement.

Re: Emacs Is Not Enough

#143
post #142
post #141

Earlier quoted context omitted.

> Pulses on a GPIO pin are not print statements. Yes, they are. How do you think text terminals work?

Really? You are being disingenuous. It is a long way from "pulses on GPIO pins" to a print statement.

It's precisely one text terminal or LED scroller away.

Re: Emacs Is Not Enough

#144
post #134

Earlier quoted context omitted.

Do you have an example of one that doesn't have one?

This is in the realm of ignorant questions. It could well be that the majority of computer devices have none. E.g. the micro controller in my washing machine

Why is it an ignorant question? The nicer ones let you use JTAG etc connections, and debug to console using ITM or RTT. (STM, nRF etc) Others allow debugging via serial.

Re: Emacs Is Not Enough

#145
post #143
post #142

Earlier quoted context omitted.

Really? You are being disingenuous. It is a long way from "pulses on GPIO pins" to a print statement.

It's precisely one text terminal or LED scroller away.

> It's precisely one text terminal or LED scroller away.

This is quite strange. Let us remember the context

> Print debugging is a technique that will never go out of style. It works on any system,

So you are suggesting that watching the blinking of a GPIO pin (I hope you have an oscilloscope, or some other probe, rather than applying to to your tongue) is the same as "Print debugging"?

I contend that in any sensible use of technical English "print debugging" is text output to a console.

In that context there are a lot of systems, possibly most computer systems, do not have access to that. It is not unusual for developers to go to elaborate lengths to attach consoles to these systems - not the same as " It works on any system, "

Re: Emacs Is Not Enough

#146
post #134

Earlier quoted context omitted.

This is in the realm of ignorant questions. It could well be that the majority of computer devices have none. E.g. the micro controller in my washing machine

Why is it an ignorant question? The nicer ones let you use JTAG etc connections, and debug to console using ITM or RTT. (STM, nRF etc) Others allow debugging via serial.

> Why is it an ignorant question? The nicer ones let you use JTAG etc connections, and debug to console using ITM or RTT. (STM, nRF etc) Others allow debugging via serial.

Because all those systems, even the very nicest, all over the palnet, very really have "JTAG etc connections,"

Those are things you attached to the system. You attach them in a complex error prone process, at the end of it you have a different system.

A lot of (most?) computers do not have consoles.

It is a common error amongst developers (who do not work in embedded systems) to assume there is a screen supporting text of some sort. It is an error

Re: Emacs Is Not Enough

#147

Earlier quoted context omitted.

Unless you're debugging something so simple that it can only flash a led, you can have a serial console onto it You can print debug on an Arduino for example So, yes, it works on pretty much any system.

Even then, you could write a print function that writes morse code pattern to the led :p

> Even then, you could write a print function that writes morse code pattern to the led :p

And you then have a different system.

My point is consoles are not ubiquitous in computing. Computer systems that lack them are very common

Re: Emacs Is Not Enough

#148
post #146

Earlier quoted context omitted.

Why is it an ignorant question? The nicer ones let you use JTAG etc connections, and debug to console using ITM or RTT. (STM, nRF etc) Others allow debugging via serial.

> Why is it an ignorant question? The nicer ones let you use JTAG etc connections, and debug to console using ITM or RTT. (STM, nRF etc) Others allow debugging via serial. Because all those systems, even the very nicest, all over the palnet, very really have "JTAG etc connections," Those are things you attached to the system. You attach them in a complex error prone process, at the end of it you have a different syst…

You connect the debug probe to your MCU (pogo pins or w/e is convenient for the form factor), connect it to a PC over USB, and print to a terminal window in Windows, Linux etc. Or a serial-USB bridge if it doesn't support debug probes. If the MCU is so basic it doesn't support UART, bit-bang it with GPIO. Too easy!

Re: Emacs Is Not Enough

#149
post #16
post #11

I can't but reflect back on another post I made today, which is that everything fails at scale. Literally everything. They just fail in different ways and made different tradeoffs along the way. For example, this is why I find myself using "print" debugging on a process of 10^4 values. It is fun to think that, "maybe I can step debug this" on that many values, but... that is well beyond my capability to keep it in my…

Print debugging is a technique that will never go out of style. It works on any system, is used by programmers of any level of experience, is very quick to use and requires no tooling to understand. And sometimes, even if you do have other great tools at your disposal, it’s still the easiest way to track down a problem.

Logging - for debugging or for other purposes - is a very useful tool.

Re: Emacs Is Not Enough

#150
post #101
post #21

Earlier quoted context omitted.

Well yes, but I must quibble... > Print debugging.... It works on any system No it does not. It requires a console, and not all systems have a console.

> No it does not. It requires a console, and not all systems have a console. It does not. You just send the log output somewhere (often a different system). If you have a deployment with no logging infrastructure (either local for smaller setups or distributed for large scale), you have a major problem beyond just debugging visibility.

> You just send the log output somewhere

How?

Post reply on HN