Live data from Hacker News

I made a debugger that draws the state machine of the program

i.imgur.com

41–50 of 62 posts

Re: I made a debugger that draws the state machine of the program

#41
post #20
post #17

Earlier quoted context omitted.

Apple Swift and Unreal Engine Blueprint both have amazing state visualization tools built in. See: https://docs.unrealengine.com/latest/images/Engine/Blueprint... I think a deep visual debugging tools are going to be 'built in' in future in much the same way that HTTP primitives were recently with node and string manipulation was with Python 2.

There used to be an IDE called "Together" that supported bi-directional transformation between source code and diagrams. Although it sounded like a really cool idea, it didn't take off. Seems text is best (maybe because it supports incompatible hierarchies better).

> Seems text is best (maybe because it supports incompatible hierarchies better).

Both text and visual programming languages are simple representations of the structure of your program - what we normally call an AST. Neither is more 'true' than the other, and things in the text that don't match the structure are syntax errors.

Re: I made a debugger that draws the state machine of the program

#42

Earlier quoted context omitted.

That reminds me of the old story of people having a audio speaker connected to the address but of their mainframe so they could detect error conditions by the sounds being made.

Been pondering something like that for networking. A while back i read about a guy who had set up his phone so that it would play certain tones when it detected APs while walking around town. This based on their signal strenght, security settings etc. This got me thinking back to my analog modem days, and how i could tell if i was getting a good connection or not depending on the noise it would make during the handsh…

For those who don't know:

Ping makes a ping sound on linux.

You can choose ping on success or ping on timeout (or silent.) Fantastic for live work.

Re: I made a debugger that draws the state machine of the program

#45
post #34

Earlier quoted context omitted.

That reminds me of the old story of people having a audio speaker connected to the address but of their mainframe so they could detect error conditions by the sounds being made.

As I recall, it was a radio that was tuned to the Kilohertz band. This was before the FCC was so careful about computers emitting radio waves. A computer that has a clock cycle measured in Kilohertz can emit radio waves in the Kilohertz band. This makes "music" of a sort, especially when the program running does many things repetitiously. In the early days of computing, multiplication was implemented as repeated addi…

That reminds me of the time I was poking (literally POKE'ing) around with my TRS-80 Color Computer. I (somehow) had changed it to one of the graphics modes and then set the base address to the start of RAM.

So on the screen you could sort of see the BASIC stack, other important system variables, and even a squashed representation of the text console. So when it was sitting idle you'd see one kind of pattern, and running programs produced other kinds of patterns.

Fun times.

Re: I made a debugger that draws the state machine of the program

#46
post #3

That is absolutely awesome. I used to have something like this: a pair of very fast dacs hooked up to the 16 address lines of my computer and another dac hooked up to the databus. It allowed me to look straight into the memory of the machine as the processor was accessing it, quite a powerful tool. Yours is nicer though (and with todays memory size I'd hate to think about the quantity of data that passes in a split s…

> a pair of very fast dacs hooked up to the 16 address lines of my computer and another dac hooked up to the databus.

Here's an article about it, with photos [1]. I remember reading it in BYTE, years ago.

https://archive.org/stream/byte-magazine-1978-02/1978_02_BYT...

Edit: I'll bet it's no longer possible to do this on modern CPUs; either the memory busses are inaccessible (SoC) or so highly optimised (DDR4) that it's infeasible to probe them without disrupting the transmission line.

[1] Ciarcia, S. "A Penny Pinching Address State Analyzer". BYTE 3(2), pp. 6--12. February, 1978.

Re: I made a debugger that draws the state machine of the program

#48
post #30

Earlier quoted context omitted.

I found at least one old system that did this (although the version I heard related to the old mainframes Edinburgh University had decades ago): EDSAC II had a speaker to help with debugging and this "feature" was also incorporated into versions of the LEO, the worlds first computer for business applications: http://en.wikipedia.org/wiki/LEO_%28computer%29 I wonder if something similar could be created for the state…

>giving each state it's own tone? oh man that's such a good idea.

Could output midi events and defer the sound rendering to another process.

Re: I made a debugger that draws the state machine of the program

#49
post #8

Here's one for Python. http://pythontutor.com/ It shows the variables, and allows you to step forward and backward. Great for explaining programming to new people who haven't grokked computing yet.

Fwiw, most debuggers will let you step through execution and look at variables and the stack frames.

Re: I made a debugger that draws the state machine of the program

#50
post #44

What is the widget in the top right corner? What WM are you using?

WM cwm, the widget is just my conky setup, here are my dotfiles: https://github.com/r0nk/configs

Are you using OpenBSD, or one of the Linux ports (Neukirchen?)?
Post reply on HN