4 ms·
I wanted to take a peek the state diagram (ASCII version). But I was feeling lazy, so apologies for having ChatGPT do the work for me. I wasn't going for correc
by aargh_aargh 2y ago
I wanted to take a peek the state diagram (ASCII version). But I was feeling lazy, so apologies for having ChatGPT do the work for me. I wasn't going for correctness and didn't check it. If you're like me, here you go:
https://dreampuf.github.io/GraphvizOnline/#digraph%20StateMachine%20%7B%0A%20%20%20%20rankdir%3DLR%3B%0A%20%20%20%20size%3D%228%2C5%22%3B%0A%20%20%20%20node%20%5Bshape%20%3D%20circle%5D%3B%0A%20%20%20%20%0A%20%20%20%20LookingForWord%20-%3E%20InsideWord%20%5Blabel%3D%22Non-space%22%5D%3B%0A%20%20%20%20LookingForWord%20-%3E%20LookingForWord%20%5Blabel%3D%22Space%22%5D%3B%0A%20%20%20%20LookingForWord%20-%3E%20Newline%20%5Blabel%3D%22Newline%22%5D%3B%0A%20%20%20%20LookingForWord%20-%3E%20LookingForWord%20%5Blabel%3D%22Other%22%5D%3B%0A%20%20%20%20%0A%20%20%20%20Newline%20-%3E%20InsideWord%20%5Blabel%3D%22Non-space%22%5D%3B%0A%20%20%20%20Newline%20-%3E%20LookingForWord%20%5Blabel%3D%22Space%22%5D%3B%0A%20%20%20%20Newline%20-%3E%20Newline%20%5Blabel%3D%22Newline%22%5D%3B%0A%20%20%20%20Newline%20-%3E%20LookingForWord%20%5Blabel%3D%22Other%22%5D%3B%0A%20%20%20%20%0A%20%20%20%20InsideWord%20-%3E%20ContinueWord%20%5Blabel%3D%22Non-space%22%5D%3B%0A%20%20%20%20InsideWord%20-%3E%20LookingForWord%20%5Blabel%3D%22Space%22%5D%3B%0A%20%20%20%20InsideWord%20-%3E%20Newline%20%5Blabel%3D%22Newline%22%5D%3B%0A%20%20%20%20InsideWord%20-%3E%20LookingForWord%20%5Blabel%3D%22Other%22%5D%3B%0A%20%20%20%20%0A%20%20%20%20ContinueWord%20-%3E%20ContinueWord%20%5Blabel%3D%22Non-space%22%5D%3B%0A%20%20%20%20ContinueWord%20-%3E%20LookingForWord%20%5Blabel%3D%22Space%22%5D%3B%0A%20%20%20%20ContinueWord%20-%3E%20Newline%20%5Blabel%3D%22Newline%22%5D%3B%0A%20%20%20%20ContinueWord%20-%3E%20LookingForWord%20%5Blabel%3D%22Other%22%5D%3B%0A%7D%0A https://dreampuf.github.io/GraphvizOnline/#digraph%20StateMa...
digraph StateMachine {
rankdir=LR;
size="8,5";
node [shape = circle];
LookingForWord -> InsideWord [label="Non-space"];
LookingForWord -> LookingForWord [label="Space"];
LookingForWord -> Newline [label="Newline"];
LookingForWord -> LookingForWord [label="Other"];
Newline -> InsideWord [label="Non-space"];
Newline -> LookingForWord [label="Space"];
Newline -> Newline [label="Newline"];
Newline -> LookingForWord [label="Other"];
InsideWord -> ContinueWord [label="Non-space"];
InsideWord -> LookingForWord [label="Space"];
InsideWord -> Newline [label="Newline"];
InsideWord -> LookingForWord [label="Other"];
ContinueWord -> ContinueWord [label="Non-space"];
ContinueWord -> LookingForWord [label="Space"];
ContinueWord -> Newline [label="Newline"];
ContinueWord -> LookingForWord [label="Other"];
}
EDIT: Under peer pressure, I checked it and it correctly reflects the code apart from being designed for one specific line ending sequence (as it should, being an example optimized for brevity).
As for the replies, as opposed to my approach, I'm sure when you're browsing research papers, you're doing a full reproducibility study for each one. I'm sorry I commented, I should have waited for you to post your results.
- bruce343434 2y agoThis is a useless contribution to the discussion, maybe even negative... Why didn't you check it at least before sharing?
- aftbit 2y agoWhy? Because it's wrong? If it were correct, wouldn't it be useful?
- roywiggins 2y agoThis is a bit like presenting someone with a raw egg on a plate and saying "ah, but if I had cooked it, might it not be a tasty omelet?" Correctness is the hard part!
- arp242 2y agoMore like a covered plate you're expected to eat without looking. "This may be an amazing omelet and you will have a great meal, or you may eat a raw egg, get salmonella, and be sick for a week. It's probably an omelet, but I'm not sure, so you'll probably be fine. Enjoy!"
- aftbit 2y agoRight, but are its labels of the state actually incorrect? I don't know well enough how to check.
- roywiggins 2y agoSurely correctness is the most important thing? Anyone can produce an incorrect state diagram.