News for hackers. Stuff that matters.
Re:I made a debugger that draws the state machine of the pro... by jacquesm on Tuesday January 06, 2015 @08:56PM (#8848415)
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 second across the bus of a modern pc).
Re:I made a debugger that draws the state machine of the pro... by arethuza on Wednesday January 07, 2015 @04:59AM (#8849670)
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.
Re:I made a debugger that draws the state machine of the pro... by whitten on Wednesday January 07, 2015 @08:41AM (#8850399)
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 addition. Memory access also had a particular pattern of repetitive circuitry.

This provided a base repetition that humans recognize. When code was stuck in a loop, or repeatedly accessed the same range of memory locations, the operators could hear the pattern and know something was wrong.

Re:I made a debugger that draws the state machine of the pro... by ansible on Wednesday January 07, 2015 @12:27PM (#8851802)
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 pro... by melloclello on Wednesday January 07, 2015 @03:07PM (#8852937)
I always thought that a something like this was how the computers on Star Trek worked.

"Computer! Run a level five diagnostic of the starboard nacelles!" bloop bloop bloop...

The foley artists did a pretty terrific job of using sound to differentiate between heavy computation, success, and failure etc. Makes me kinda wish my computer could play a minor third instead of just plopping up a dialog box when things go wrong.

Re:I made a debugger that draws the state machine of the pro... by digi_owl on Wednesday January 07, 2015 @09:57AM (#8850767)
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 handshake.

What i was thinking was setting up a sniffer, and hook that up so certain tones would play based on packets passing by.

I sometimes wonder if modern computing is too reliant on one human sense, vision. More mechanical devices can give us early warnings about developing issues based on sounds and vibrations.

Re:I made a debugger that draws the state machine of the pro... by reitanqild on Wednesday January 07, 2015 @11:59AM (#8851617)
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 pro... by digi_owl on Thursday January 08, 2015 @04:27AM (#8855625)
Don't find anything about that in the docs for Gnu ping...
Re:I made a debugger that draws the state machine of the pro... by arethuza on Wednesday January 07, 2015 @07:39AM (#8850147)
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 machines in the article - giving each state it's own tone?

Re:I made a debugger that draws the state machine of the pro... by r00nk on Wednesday January 07, 2015 @08:04AM (#8850239)
>giving each state it's own tone?

oh man that's such a good idea.

Re:I made a debugger that draws the state machine of the pro... by sitkack on Wednesday January 07, 2015 @01:50PM (#8852410)
Could output midi events and defer the sound rendering to another process.
Re:I made a debugger that draws the state machine of the pro... by mncolinlee on Thursday January 08, 2015 @02:26PM (#8858334)
The Radio Shack TRS-80 Model 1 was legendary for the amount of radio interference it caused. I used this at age 7 along with my older brother to add sounds and victory music to pinball games. You could tune the FM radio to a harmonic of the frequency of the processor. Then you constructed loops with short delays to alter the frequency of the sound. You'd hear all kinds of processing garbage during the game loop, but the sounds came out fine.
Re:I made a debugger that draws the state machine of the pro... by jloughry on Wednesday January 07, 2015 @01:35PM (#8852292)
> 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 pro... by jerryr on Wednesday January 07, 2015 @02:56PM (#8852874)
Bunnie Huang used an FPGA on a pretty fast bus to extract the XBox's ROM. Granted, that's no longer a "modern" CPU, but still interesting.

See the "Update on ROM extraction and decryption" section here: http://www.xenatera.com/bunnie/proj/anatak/xboxmod.html

More info here: http://www.xenatera.com/bunnie/proj/anatak/AIM-2002-008.pdf

And in his book: http://www.nostarch.com/xboxfree

Re:I made a debugger that draws the state machine of the pro... by jacquesm on Thursday January 08, 2015 @01:39PM (#8858007)
Besides that you'd have a serious problem getting a DAC that is fast enough and with enough bits.
Re:I made a debugger that draws the state machine of the pro... by timthorn on Wednesday January 07, 2015 @04:13AM (#8849550)
What did they drive?
Re:I made a debugger that draws the state machine of the pro... by jacquesm on Wednesday January 07, 2015 @05:33AM (#8849766)
X, Y, brightness on an army surplus scope.
Re:I made a debugger that draws the state machine of the pro... by melloclello on Wednesday January 07, 2015 @06:14AM (#8849887)
damn, that's gangster
Re:I made a debugger that draws the state machine of the pro... by Luyt on Wednesday January 07, 2015 @06:59AM (#8850020)
And you'll immediately see it when your program hangs in a loop ;-)
Re:I made a debugger that draws the state machine of the pro... by digi_owl on Wednesday January 07, 2015 @09:58AM (#8850773)
Spin cycle state :P
Re:I made a debugger that draws the state machine of the pro... by rmc on Wednesday January 07, 2015 @04:19AM (#8849567)
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.
Re:I made a debugger that draws the state machine of the pro... by nailer on Wednesday January 07, 2015 @06:08AM (#8849872)
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.

Re:I made a debugger that draws the state machine of the pro... by hyp0 on Wednesday January 07, 2015 @06:33AM (#8849930)
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).

Re:I made a debugger that draws the state machine of the pro... by cLeEOGPw on Wednesday January 07, 2015 @08:29AM (#8850353)
Text probably serves better because code is often too complex to visualize in some cases, and in others to comprehend generated visualized code.

Think about algorithm that switches values by using temporary variable for example. By looking at text, it's pretty simple to construct the flow follow the values traveling from one variable to other. But if you put it in 2D graphical interface, it becomes very problematic and hard to follow. I would imagine it would be easier if there was like a movie where value would move from one box symbolizing variable to other. But that would make it difficult to edit.

Another way would be to visually represent only change, but then it would be same as textual representation, only more redundant.

Re:I made a debugger that draws the state machine of the pro... by r00nk on Wednesday January 07, 2015 @09:16AM (#8850569)
Actually I can think of a simple way to visualize that.

The debugger actually displays what I call a folded lattice, meaning that execution starts at the top and goes down, so representing what your talking about would simply look like ">" with lines. It would need some representation of data flow, however, which it currently doesn't have.

Re:I made a debugger that draws the state machine of the pro... by porker on Wednesday January 07, 2015 @07:03AM (#8850034)
Thanks for the info, I'd never heard of that IDE before. With its common name it's been impossible to find screenshots so far.

> Although it sounded like a really cool idea, it didn't take off.

That could have been because it was bought by Boreland, who had a history of 'not succeeding' with projects, whose focus was elsewhere, who lost key staff at an important point, and then were bought out and mismanaged from there forward?

Delphi didn't have to die the death it has.

Re:I made a debugger that draws the state machine of the pro... by wodenokoto on Thursday January 08, 2015 @08:58AM (#8856344)
It still exist and Borland has ridiculous small screenshots on their website

http://www.borland.com/Products/Requirements-Management/Toge...

Re:I made a debugger that draws the state machine of the pro... by Chirael on Wednesday January 07, 2015 @08:07AM (#8850269)
porker, try searching for TogetherJ which was the Java specific version of Together. I may have even used it back around 2000 but don't remember much other than the name.
Re:I made a debugger that draws the state machine of the pro... by nailer on Wednesday January 07, 2015 @11:00AM (#8851234)
> 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 pro... by scott_s on Wednesday January 07, 2015 @10:16AM (#8850892)
The author, Philip Guo, is part of the HN community as pgbovine.
Re:I made a debugger that draws the state machine of the pro... by seanp2k2 on Wednesday January 07, 2015 @01:57PM (#8852476)
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 pro... by r00nk on Wednesday January 07, 2015 @07:35AM (#8850134)
Also, if anyone's interested, I need some help porting it to different platforms. If you can swim in the clusterfuck of x86 for a bit to port it to ward that would be awesome, or even getting working with gdb this could be an actual tool.
Re:I made a debugger that draws the state machine of the pro... by r00nk on Wednesday January 07, 2015 @08:40AM (#8850392)
might as well attach a src link here too: https://github.com/r0nk/ward
Re:I made a debugger that draws the state machine of the pro... by r00nk on Tuesday January 06, 2015 @08:46PM (#8848384)
Re:I made a debugger that draws the state machine of the pro... by desdiv on Wednesday January 07, 2015 @03:23AM (#8849427)
I'm slightly saddened that Github doesn't recognize Brainfuck files.
Re:I made a debugger that draws the state machine of the pro... by Argorak on Wednesday January 07, 2015 @04:33AM (#8849607)
Of course it does:

https://github.com/r0nk/ward/blob/master/hello.bf

https://github.com/github/linguist/blob/master/lib/linguist/...

Just not in Ace (their code editor).

It doesn't count it in language statistics, though.

Re:I made a debugger that draws the state machine of the pro... by gjtorikian on Thursday January 08, 2015 @01:02AM (#8855186)
Hmm, this looks like a different issue. Brainfuck is recognized in the stats, if you head to search: https://github.com/r0nk/ward/search?l=makefile

It's not showing up in the color bar, though. Loggin' dat issue.

Re:I made a debugger that draws the state machine of the pro... by hrjet on Wednesday January 07, 2015 @03:30AM (#8849443)
IIUC, you could probably use KLEE to ease the pain of capturing the state.

http://klee.github.io/

Re:I made a debugger that draws the state machine of the pro... by simias on Wednesday January 07, 2015 @05:44AM (#8849805)
I would have been more interested by the source code and some explanations...
Re:I made a debugger that draws the state machine of the pro... by MichaelMoser123 on Wednesday January 07, 2015 @07:14AM (#8850060)
shameles plug for my little project - the pooh programming language:

http://mosermichael.github.io/cstuff/all/pooh-lan/2012/12/11...

here you can get an execution trace of the program: each expression is displayed as it evaluates:

http://mosermichael.github.io/cstuff/docs/html/pooh/example/...

(they used to have something like that in some scheme interpreters, i used this featue a lot at the time)

Re:I made a debugger that draws the state machine of the pro... by r00nk on Wednesday January 07, 2015 @07:32AM (#8850125)
hey the projects open source, if you can add your language to ward then it might help your language have a unique IDE, It'll have something other (excluding bf) languages don't have.
Re:I made a debugger that draws the state machine of the pro... by dschubert on Wednesday January 07, 2015 @10:18AM (#8850903)
Shameless self-plug: Me and a friend developed a Java debugger [1] that visualizes (Java) programs with UML class and sequence diagrams [2]. It isn't actively developed anymore, but the demo version [3] (along with Help -> Tutorial) can still be used to give it a try.

It was quite an involved & fun project as we used Java VM Tool Interface directly instead of using JDI and the layout algorithms for the diagrams are quite fancy too :)

[1] http://www.jbixbe.com [2] http://www.jbixbe.com/VisualTour.html [3] http://www.jbixbe.com/download/jar/jbixbe.jar

Re:I made a debugger that draws the state machine of the pro... by avodonosov on Wednesday January 07, 2015 @05:31AM (#8849759)
That's useful, exactly the tool missing in my BrainFuck toolkit.

+1

Re:I made a debugger that draws the state machine of the pro... by PhasmaFelis on Thursday January 08, 2015 @02:16AM (#8855351)
All right, I'll be the first one to admit that I don't know what the hell I'm looking at. Would some sort of explanation, or at the very least some source code, be too much to ask?
Re:I made a debugger that draws the state machine of the pro... by VLM on Wednesday January 07, 2015 @07:55AM (#8850211)
Its interesting that its dynamic. Idea to think about would be snapshotting dot files for graphviz. Then you can do all kinds of crazy stuff with the graphviz output.

My databases at work snapshot out their schemas to graphviz to create diagrams of all the FK relationships automatically every day, which I find helpful, and more or less inspired this idea.

Re:I made a debugger that draws the state machine of the pro... by clarry on Wednesday January 07, 2015 @02:54PM (#8852860)
I would love to have a visual representation of all the possible branches that can be taken in a body of C code, with an easy way to ask the program to tell me what are all the conditions that must be met for this branch to execute.
Re:I made a debugger that draws the state machine of the pro... by r00nk on Wednesday January 07, 2015 @03:03PM (#8852918)
Yeah that was the idea, I'm posting it around to see if I can get a few folks interested in porting it to different languages. Maintaining everything is hard on a one man teenage team.
Re:I made a debugger that draws the state machine of the pro... by c-qjv0xfi on Wednesday January 07, 2015 @12:18PM (#8851752)
What is the widget in the top right corner? What WM are you using?
Re:I made a debugger that draws the state machine of the pro... by r00nk on Wednesday January 07, 2015 @12:24PM (#8851780)
WM cwm, the widget is just my conky setup, here are my dotfiles: https://github.com/r0nk/configs
Re:I made a debugger that draws the state machine of the pro... by jaskerr on Wednesday January 07, 2015 @02:29PM (#8852706)
Are you using OpenBSD, or one of the Linux ports (Neukirchen?)?
Re:I made a debugger that draws the state machine of the pro... by r00nk on Wednesday January 07, 2015 @02:47PM (#8852815)
Arch linux
Re:I made a debugger that draws the state machine of the pro... by partition on Wednesday January 07, 2015 @03:32AM (#8849447)
How did you get your terminal to look like that?
Re:I made a debugger that draws the state machine of the pro... by michaelx386 on Wednesday January 07, 2015 @06:12AM (#8849883)
The font looks like Terminus. The background transparency effect and hidden scrollbars can be set-up with most terminals, this one is probably urxvt. As for the borderless/undecorated window, that's probably done via the Window Manager. DWM[0] for example doesn't paint window decorations but there's usually a way to set this up in Gnome/Unity/KDE/etc as well.

[0] http://dwm.suckless.org

Re:I made a debugger that draws the state machine of the pro... by partition on Wednesday January 07, 2015 @07:03AM (#8850033)
Thanks!
Re:I made a debugger that draws the state machine of the pro... by r00nk on Wednesday January 07, 2015 @07:30AM (#8850114)
also, here are my dot files: https://github.com/r0nk/configs
Re:I made a debugger that draws the state machine of the pro... by faaar on Wednesday January 07, 2015 @04:28AM (#8849594)
what wallpaper is that
Re:I made a debugger that draws the state machine of the pro... by cyann on Wednesday January 07, 2015 @05:01AM (#8849685)
Looks like a screen cap from the BioShock game

http://en.wikipedia.org/wiki/BioShock_%28series%29

Re:I made a debugger that draws the state machine of the pro... by Lutin on Wednesday January 07, 2015 @01:39PM (#8852326)
It's concept art from the creation of BioShock 1

http://bioshock.wikia.com/wiki/File:1959.jpg