frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Build your own Command Line with ANSI escape codes (2016)

https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html
18•vinhnx•2d ago

Comments

esafak•1h ago
If you're going to do this also provide a way to disable it so parsers don't trip up on its escape-coded output.
klibertp•1h ago
Also, disable the formatting if stdout is not a terminal. That way, your colors and cursor movements won't be visible when piping to another program, and your tool will be usable in apps that don't understand the CSI and chars that follow. Use a command-line switch with more than two states, e.g., `ls` (and probably other GNU tools) has `--color=always|auto|never` which covers most use cases.

Also not mentioned in the article: there are a few syntaxes available for specifying things in control sequences, like

    \x1b[38;2;{r};{g};{b}m
for specifying colors. There's a nice list here: https://gist.github.com/ConnerWill/d4b6c776b509add763e17f9f1... You can also cram as many control codes as you want into a control sequence, though it probably isn't useful in a modern context in 99.9% of cases.
tl2do•27m ago
I've been programming for 20 years and apparently still don't understand what my terminal is doing. Recently I asked Claude Code to generate a small shell script. It came back full of escape codes and I just stared at it like a caveman looking at a smartphone. This article finally explains what's been happening right under my nose.

Motorola announces a partnership with GrapheneOS

https://motorolanews.com/motorola-three-new-b2b-solutions-at-mwc-2026/
1889•km•14h ago•670 comments

First in-utero stem cell therapy for fetal spina bifida repair is safe: study

https://health.ucdavis.edu/news/headlines/first-ever-in-utero-stem-cell-therapy-for-fetal-spina-b...
203•gmays•6h ago•25 comments

New iPad Air, powered by M4

https://www.apple.com/newsroom/2026/03/apple-introduces-the-new-ipad-air-powered-by-m4/
253•Garbage•7h ago•419 comments

Show HN: Govbase – Follow a bill from source text to news bias to social posts

https://govbase.com
107•foxfoxx•4h ago•55 comments

LFortran Compiles Fpm

https://lfortran.org/blog/2026/02/lfortran-compiles-fpm/
24•wtlin•2d ago•2 comments

"That Shape Had None" – A Horror of Substrate Independence (Short Fiction)

https://starlightconvenience.net/#that-shape-had-none
44•casmalia•2h ago•7 comments

British Columbia to end time changes, adopt year-round daylight time

https://www.cbc.ca/news/canada/british-columbia/b-c-adopting-year-round-daylight-time-9.7111657
80•ireflect•1h ago•32 comments

Launch HN: OctaPulse (YC W26) – Robotics and computer vision for fish farming

47•rohxnsxngh•4h ago•24 comments

Ask HN: Who is hiring? (March 2026)

127•whoishiring•5h ago•168 comments

Show HN: uBlock filter list to blur all Instagram Reels

https://gist.github.com/shraiwi/009c652da6ce8c99a6e1e0c86fe66886
49•shraiwi•1h ago•15 comments

Welcome (Back) to Macintosh

https://take.surf/2026/03/01/welcome-back-to-macintosh
4•Udo_Schmitz•27m ago•0 comments

Ask HN: Who wants to be hired? (March 2026)

37•whoishiring•5h ago•114 comments

How to talk to anyone and why you should

https://www.theguardian.com/lifeandstyle/2026/feb/24/stranger-secret-how-to-talk-to-anyone-why-yo...
486•Looky1173•14h ago•487 comments

Packaging a Gleam app into a single executable

https://www.dhzdhd.dev/blog/gleam-executable
64•todsacerdoti•5h ago•3 comments

Reflex (YC W23) Is Hiring Software Engineers – Python

https://www.ycombinator.com/companies/reflex/jobs
1•apetuskey•4h ago

Inside the M4 Apple Neural Engine, Part 1: Reverse Engineering

https://maderix.substack.com/p/inside-the-m4-apple-neural-engine
206•zdw•1d ago•54 comments

A case for Go as the best language for AI agents

https://getbruin.com/blog/go-is-the-best-language-for-agents/
102•karakanb•2h ago•157 comments

iPhone 17e

https://www.apple.com/newsroom/2026/03/apple-introduces-iphone-17e/
118•meetpateltech•7h ago•99 comments

Parallel coding agents with tmux and Markdown specs

https://schipper.ai/posts/parallel-coding-agents/
85•schipperai•7h ago•61 comments

Use the Mikado Method to do safe changes in a complex codebase

https://understandlegacycode.com/blog/a-process-to-do-safe-changes-in-a-complex-codebase/
124•foenix•4d ago•64 comments

Boss-CSS: I created another "CSS-in-JS" lib

https://dev.to/wintercounter/boss-css-i-created-another-css-in-js-lib-and-here-is-why-23kc
5•wintercounter•1h ago•0 comments

Why Objective-C

https://inessential.com/2026/02/27/why-objective-c.html
102•ingve•2d ago•92 comments

Zclaw – The 888 KiB Assistant

https://zclaw.dev
64•kristianpaul•2d ago•34 comments

Show HN: Pianoterm – Run shell commands from your Piano. A Linux CLI tool

https://github.com/vustagc/pianoterm
6•vustagc•47m ago•0 comments

Language Model Contains Personality Subnetworks

https://arxiv.org/abs/2602.07164
35•PaulHoule•5h ago•23 comments

Microsoft bans the word "Microslop" on its Discord, then locks the server

https://www.windowslatest.com/2026/03/02/microsoft-gets-tired-of-microslop-bans-the-word-on-its-d...
943•robtherobber•11h ago•414 comments

Build your own Command Line with ANSI escape codes (2016)

https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html
18•vinhnx•2d ago•3 comments

Making Video Games in 2025 (without an engine)

https://www.noelberry.ca/posts/making_games_in_2025/
383•alvivar•3d ago•181 comments

19th century silent film that first captured a robot attack

https://www.npr.org/2026/02/28/nx-s1-5730373/georges-melies-robot-film-1897-library-of-congress-g...
25•ynac•6h ago•8 comments

Notes on Lagrange Interpolating Polynomials

https://eli.thegreenplace.net/2026/notes-on-lagrange-interpolating-polynomials/
34•ibobev•5h ago•9 comments