frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Plain Text. With Lines

https://akkartik.name/lines.html
39•bpierre•6mo ago

Comments

sxp•6mo ago
Why use a new format instead of SVG or JS+canvas? The latter would deviate from "plain text" but it's still pretty close. It avoids reinventing the wheel and a webbrower is installed on almost every computer with a display.

Another format to look at is Markdeep which has support for rendering ASCII diagrams and is very close to plain text: https://casual-effects.com/markdeep/features.md.html

Personally, I just wrote a thin wrapper around the somewhat verbose JS Canvas API that lets me write code such as

  ctx4b.save();
    ctx4b.translate(x+=10, 10);
    new Line(ctx4b).b().m(36,50).lAD(180 + 50, 56).lXY(0, -7.1).lXY(7, 0).lAD(50, 55).f();
    ctx4b.fillRect(36, 0, 10, 50);
  ctx4b.restore();
when I want to draw diagrams in my Markdeep notes.
akkartik•6mo ago
> I just wrote a thin wrapper around the somewhat verbose JS Canvas API that lets me write code such as

As I said at the start of OP, I want to draw by doodling. So writing code would seem to be disqualified.

> Why use a new format instead of SVG or JS+canvas? It avoids reinventing the wheel and a webbrower is installed on almost every computer with a display.

My goal is to move off browsers. Reinventing the wheel can also often be a good thing.

I do have tools to export documents to html/markdown/SVG: https://git.sr.ht/~akkartik/lines2.love#associated-tools But I myself am trying to live outside the browser as much as possible.

akkartik•6mo ago
I wasn't aware of Markdeep when I built this, but looking at it now, it's 6k+ lines of code: https://casual-effects.com/markdeep/latest/markdeep.js And then you need a browser underneath that weighs in at multiple GB (a scale that transcends lines of code metrics) By comparison, lines.love contains 2.6k LoC, and underneath it is LÖVE containing 100k LoC. This sort of analysis of the total size of the software supply chain and total hackability of the entire stack is what motivates me to look past web browsers. Once they grow past a certain size there is zero value to being open source for 99.99% of people.

(I do love that Markdeep is a single file of js without the ubiquitous pox of 1k-line package-lock.json!)

eadmund•6mo ago
> Why use a new format instead of SVG or JS+canvas?

Because those are both hellaciously complex, and implementing a usable fraction of the functionality of either is not a job for a single hobbyist programmer. At least, I don’t think they are — I could be wrong. Even if I am, the number of programmers who can write code to draw a line given a JSON description has to be orders of magnitude of orders of magnitude larger than the number who can write an XML parser, an SVG implementation, a Javascript parser and runtime or a canvas implementation.

xigoi•6mo ago
What about TinyVG? Seems fit for this purpose.

https://tinyvg.tech/

eadmund•6mo ago
It looks pretty neat. I like that it has a textual representation!
akkartik•6mo ago
Oh this is awesome! I might try my hand at implementing it, though maybe not in lines.love..
akkartik•6mo ago
Previously: https://news.ycombinator.com/item?id=31637910 (Jun 2022, 192 comments)
eadmund•6mo ago
> {"p2":{"x":141,"y":85},"mode":"line","p1":{"x":34,"y":44}}

Embracing ordered rather than named parameters can make this so much cleaner (that’s why most folks would prefer add(1, 2) to {"function":"add", "augend": 1, "addend": 2}). It’s strange that p2 comes before p1.

    ["line",{"x":34,"y":44},{"x":141,"y":85}]
The same argument applies to points — way name their components when they will always be the same?

    ["line",[34,44],[141,85]]
If you’re willing to abandon JSON, you can make it even cleaner. There’s no real need for quotes around the mode:

    [line,[34,44],[141,85]]
And it’d be nice to have some whitespace:

    [line, [34, 44], [141, 85]]
And come to think of it, those commas don’t really add anything:

    [line [34 44] [141 85]]
Hmmm, if you switched from brackets to parentheses I bet you have a library which could handle this for you:

    (line (34 44) (141 85))
xigoi•6mo ago
Any sufficiently complicated C or Fortran program…
jauco•6mo ago
The solution I use for this problem is a vs code excalidraw plugin that saves the drawing inside the png rendering of it.

So you include the image into your markdown or code comments and can then edit it in a vscode window.

Another one I used for a while is asciiflow.com or the monodraw mac app

https://marketplace.visualstudio.com/items?itemName=pomdtr.e... (I didn’t make it, just a happy user)

yencabulator•6mo ago
There's also Obsidian's https://jsoncanvas.org/ which is aimed at connecting boxes with lines.

Sebastian Galiani on the Marginal Revolution

https://marginalrevolution.com/marginalrevolution/2026/02/sebastian-galiani-on-the-marginal-revol...
1•paulpauper•1m ago•0 comments

Ask HN: Are we at the point where software can improve itself?

1•ManuelKiessling•1m ago•0 comments

Binance Gives Trump Family's Crypto Firm a Leg Up

https://www.nytimes.com/2026/02/07/business/binance-trump-crypto.html
1•paulpauper•2m ago•0 comments

Reverse engineering Chinese 'shit-program' for absolute glory: R/ClaudeCode

https://old.reddit.com/r/ClaudeCode/comments/1qy5l0n/reverse_engineering_chinese_shitprogram_for/
1•edward•2m ago•0 comments

Indian Culture

https://indianculture.gov.in/
1•saikatsg•5m ago•0 comments

Show HN: Maravel-Framework 10.61 prevents circular dependency

https://marius-ciclistu.medium.com/maravel-framework-10-61-0-prevents-circular-dependency-cdb5d25...
1•marius-ciclistu•5m ago•0 comments

The age of a treacherous, falling dollar

https://www.economist.com/leaders/2026/02/05/the-age-of-a-treacherous-falling-dollar
2•stopbulying•5m ago•0 comments

Ask HN: AI Generated Diagrams

1•voidhorse•8m ago•0 comments

Microsoft Account bugs locked me out of Notepad – are Thin Clients ruining PCs?

https://www.windowscentral.com/microsoft/windows-11/windows-locked-me-out-of-notepad-is-the-thin-...
2•josephcsible•8m ago•0 comments

Show HN: A delightful Mac app to vibe code beautiful iOS apps

https://milq.ai/hacker-news
2•jdjuwadi•11m ago•1 comments

Show HN: Gemini Station – A local Chrome extension to organize AI chats

https://github.com/rajeshkumarblr/gemini_station
1•rajeshkumar_dev•11m ago•0 comments

Welfare states build financial markets through social policy design

https://theloop.ecpr.eu/its-not-finance-its-your-pensions/
2•kome•15m ago•0 comments

Market orientation and national homicide rates

https://onlinelibrary.wiley.com/doi/10.1111/1745-9125.70023
3•PaulHoule•15m ago•0 comments

California urges people avoid wild mushrooms after 4 deaths, 3 liver transplants

https://www.cbsnews.com/news/california-death-cap-mushrooms-poisonings-liver-transplants/
1•rolph•16m ago•0 comments

Matthew Shulman, co-creator of Intellisense, died 2019 March 22

https://www.capenews.net/falmouth/obituaries/matthew-a-shulman/article_33af6330-4f52-5f69-a9ff-58...
3•canucker2016•17m ago•1 comments

Show HN: SuperLocalMemory – AI memory that stays on your machine, forever free

https://github.com/varun369/SuperLocalMemoryV2
1•varunpratap369•18m ago•0 comments

Show HN: Pyrig – One command to set up a production-ready Python project

https://github.com/Winipedia/pyrig
1•Winipedia•20m ago•0 comments

Fast Response or Silence: Conversation Persistence in an AI-Agent Social Network [pdf]

https://github.com/AysajanE/moltbook-persistence/blob/main/paper/main.pdf
1•EagleEdge•20m ago•0 comments

C and C++ dependencies: don't dream it, be it

https://nibblestew.blogspot.com/2026/02/c-and-c-dependencies-dont-dream-it-be-it.html
1•ingve•20m ago•0 comments

Show HN: Vbuckets – Infinite virtual S3 buckets

https://github.com/danthegoodman1/vbuckets
1•dangoodmanUT•21m ago•0 comments

Open Molten Claw: Post-Eval as a Service

https://idiallo.com/blog/open-molten-claw
1•watchful_moose•21m ago•0 comments

New York Budget Bill Mandates File Scans for 3D Printers

https://reclaimthenet.org/new-york-3d-printer-law-mandates-firearm-file-blocking
2•bilsbie•22m ago•1 comments

The End of Software as a Business?

https://www.thatwastheweek.com/p/ai-is-growing-up-its-ceos-arent
1•kteare•23m ago•0 comments

Exploring 1,400 reusable skills for AI coding tools

https://ai-devkit.com/skills/
1•hoangnnguyen•24m ago•0 comments

Show HN: A unique twist on Tetris and block puzzle

https://playdropstack.com/
1•lastodyssey•27m ago•1 comments

The logs I never read

https://pydantic.dev/articles/the-logs-i-never-read
1•nojito•28m ago•0 comments

How to use AI with expressive writing without generating AI slop

https://idratherbewriting.com/blog/bakhtin-collapse-ai-expressive-writing
1•cnunciato•30m ago•0 comments

Show HN: LinkScope – Real-Time UART Analyzer Using ESP32-S3 and PC GUI

https://github.com/choihimchan/linkscope-bpu-uart-analyzer
1•octablock•30m ago•0 comments

Cppsp v1.4.5–custom pattern-driven, nested, namespace-scoped templates

https://github.com/user19870/cppsp
1•user19870•31m ago•1 comments

The next frontier in weight-loss drugs: one-time gene therapy

https://www.washingtonpost.com/health/2026/01/24/fractyl-glp1-gene-therapy/
2•bookofjoe•34m ago•1 comments