Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Paclear – A Fun Twist on the 'Clear' Command with Pac-Man Animation (github.com/orangekame3)
112 points by orangekame3 6 months ago | hide | past | favorite | 42 comments
Delight your terminal with paclear, a whimsical take on the 'clear' command accompanied by a PAC-MAN animation. It's a fun way to clear your terminal screen and enjoy a bit of nostalgia at the same time.



Criticism from a place of love (This is such a great, whimsical idea!):

In the videos on the page, the Pac-Man starts completely on-screen, obliterating the content in one go, and proceeds to the right, and disappears as soon as it touches the right edge of the window.

The effect would be so much better if the Pac-Man started 'off-the-left', and came in column-by-column, not obliterating any content until it was covered by its body, and proceeded rightward until it was completely off screen.

To put it another way, this looks like the content is cleared, a Pac-Man is teleported in on the left, moves right, and is teleported out. It would be better if the terminal appeared sort of like a window that the Pac-Man passes through, obliterating the content only when it’s underneath the Pac-Man.

I hope I’m making sense!


I expected a small pacman going line by line, character by character.


Same, but then it could also be too slow or unpleasant to look at. Maybe a smaller pacman that eats multiple lines at once?

Either way it's a pretty cool idea and execution, well done OP :)


Or maybe multiple speedy pacmen ? :)


ppacman: parallel pacman clear


That might work for clearing a single word before the cursor (ctrl+w) or clearing from cursor to the end of the line (ctrl+k) etc


Even better if you could control the pacman!


And give him some enemies, maybe ghosts (since it's Halloween time).


Bingo, interactive terminal clear


"I've crated paclear in compliance with the official fan-made policy of Pac-Man. https://www.pacman.com/jp/policy/fanmade.php "

Well, unless you speak fluent Japanese to the point you can read lawyer-speak in it, you'll need to translate that, but it is surprisingly sensible. Worth a glance if you're into IP issues. I'm impressed.


I like the part about not infringing on BANDAI NAMCO Entertainment's honor. Going to start including that in my licenses.

Google translate link for the curious: https://www-pacman-com.translate.goog/jp/policy/fanmade.php?...


It’s kind of a goofy translation of 名誉 in that context, it’s probably less silly to translate it as “prestige”.


"I've crated paclear in compliance with the official fan-made policy of Pac-Man."

Nintendo needs to learn a lot from this.


I was able to override ^L (in BASH, at least) with this ~/.inputrc[1]:

"\f": "\C-upaclear -cyellow -s5\C-m"

...though the experience isn't great, which I blame Konsole for. (It also adds to shell history, where the builtin obviously does not.)

[1]: https://ss64.com/bash/syntax-inputrc.html


For bash, if `$HISTCONTROL` is `ignoreboth` or `ignorespace`, commands with a leading space are not added to the history, so you could try that as a workaround.


This is actually useful for teaching, thank you!

Sometimes junior devs get confused seeing the clear command at work, thinking I opened a new terminal window.

Having a small (fun!) animation actually makes it, um, clearer what's happening.


> Sometimes junior devs get confused seeing the clear command at work, thinking I opened a new terminal window.

I don't tend to type `clear`; I just press Ctrl-L, which clears the screen if typed at the start of a prompt. Quicker, and doesn't leave `clear` commands in your history.


Yep, same problem there, I have to explain why the screen is empty.

Clear UI informs the user when the information has changed. When I'm presenting they can't see me press a command, but they can see a fun Pac-Man.


Another similarly whimsical command is `sl`. (purportedly a common mistyping of ls) https://github.com/mtoyoda/sl


Once I built a patch for sl for typos for cat as "car". https://github.com/fsniper/sl-patch



That's really cool


Always loved the `man` page for `sl:

"BUGS - It sometimes lists directory contents."


Hello everyone, I'm the creator of paclear. Thank you for all the comments and stars. Your feedback here is invaluable, and I plan to incorporate it into future updates.

I would also like to extend my deepest gratitude to Bandai Namco for publishing the official fan-made policy of Pac-Man, which made this project possible. Thank you all for your support!


Congrats on making it to the front page of The Verge! https://www.theverge.com/2023/10/24/23930133/paclear-c-yello...


The animations made me laugh. I love silly little projects like this. It's the kind of thing I would simlink to clear and forget about. Then one frustrating day of coding, I'd clear the screen and see the chomping go by and lift my mood just a bit.


i wish it came in from the left instead of spawning on screen!


Yea, it needs to go fully off screen too!


I'm amazed when I see people type clear when ctrl+l has been around for decades.


In Alacritty, ctrl-l clears the screen but does not clear the scrollback buffer. Clear also clears the scrollback buffer. This is useful for running programs with lots of output containing escape codes that may get mangled by less; just run the program and press shift-home to scroll to the top of the buffer.


I have ctrl+k bound to clear the scrollback buffer in tmux, it's rare I use it but handy.


I've been typing "clear" for so long that it would take longer for me to think to override my muscle memory and use ctrl-l instead, and the time saved isn't enough to bother retraining myself on this.

Also, ctrl-l isn't universal, but "clear" very nearly is.


Out of interest, where doesn't ctrl-l work? I only use Linux these days and readline's ubiquity means it's pretty much everywhere I go.


I was thinking of operating systems I use aside from the Unices or Windows, such as VMS, z/OS, etc. But now that I consider it, I don't know for a fact that Ctrl-l doesn't work with standard terminal programs in other OSes. I just assumed it generally won't. So, grain of salt and all that.


Ah I thought you cleared the screen with cls rather than clear on Windows. Perhaps times have changed.


You're correct. I don't use terminal on windows much, and misremembered.


This is so stupid and pointless. I love it!


Fun on the bun. Looking forward for future release with sound option, wacka, wacka, wacka. Thanks.


I wish it would adjust to the height of my terminal and do it all in one go instead of jumping down line breaks.


Great job! Suggestion: make the Pac-Man have a fill color, yellow by default in color mode.


Fade-in and -out, size support and I'd totally use this!


Hilarious!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: